[Mplayer-cvslog] CVS: main/libmpcodecs vd.c,1.54,1.55
Arpi
arpi at thot.banki.hu
Tue Oct 8 00:52:35 CEST 2002
Hi,
> > Modified Files:
> > vd.c
> > Log Message:
> > argh. gcc sux. someone please explain why float x=0; if(x>0) ... is true.
>
> It's not gcc that sux, it's float that sux. :-)
> You should *NEVER* write code like that. Instead, do it like this:
> float x=0.0; if (x>0.0) ...
i've tried this way, same.
> Although on both gcc 2.nine-sux and 3.1 it works both ways for me.
yes it also works for alex, while it doesn't for me.
maybe an unknown p4 fpu bug :)
> Oh, and never check if float is zero like this:
> if (x==0.0) ...
> Always do it like this:
> if (abs(x)<0.00001) ...
>
> But you know all that, don't you?
i know
but since x=0.0; if(x>0.0) don't work...
note that i didn't try this line in a sample .c file but the whole stiff in
libmpcodecs/vd.c, with printf right before the if().
so maybe the environmental code or sth fsck it up.. maybe mmx state
not restored (emms) there?
A'rpi / Astral & ESP-team
--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
More information about the MPlayer-cvslog
mailing list