[MPlayer-dev-eng] Patch for gcc 3.4 against MPlayer-1.0pre5

Torinthiel torinthiel at megapolis.pl
Thu Sep 2 12:40:33 CEST 2004


On Thu, Sep 02, 2004 at 11:24:23AM +0200, Alexander Strasser wrote:
> No matter what you say MPlayer never gets under ANSI C. It may go under
> partially GCC version standard or whatever. But some/many extensions used
> in MPlayer source are also in C99 or however you want to express it.
> At least I remember to have seen them...

I haven't said it does. I've only said that it does not have to be
implemented as a sidenote. But the main problem is that it doesn't
specify what to do if FE_TONEAREST is set.

And if I would like lrintf(0.3) to be 1, then I would use ceil(0.3).
Not fesetround(FE_TOUPPER); lrintf(0.3). It's faster IMHO, as no
setting in fe* is done and no checking in lrintf.

also, can somebody explain me this?
kraken:~/tmp/test$ cat test.c
#include <stdio.h>
#include <fenv.h>
int main(void)
{
  fesetround(FE_TONEAREST);
  printf("TONEAREST: %f %f\n", round(0.5), round(-0.5));
  return 0;
}
kraken:~/tmp/test$ gcc --version
2.95.4
kraken:~/tmp/test$ gcc -o test test.c -lm
kraken:~/tmp/test$ ./test
TONEAREST: -1.000000 2.085267

Now that's not exactly what I would expect.
And, by man lrintf,
       These functions round their argument  to  the  nearest  integer  value,
       using  the  current rounding direction.
So it is unspecified which way it should round. We have to specify it.
Torinthiel

-- 
 Waclaw "Torinthiel" Schiller       GG#: 542916, 3073512
   torinthiel(at)megapolis(dot)pl
   gpg: B06901F1 fpr: FAA3 559F CAE9 34DE CDC8  7346 2B6E 39F2 B069 01F1
 "No classmates may be used during this examination"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040902/6b1d6791/attachment.pgp>


More information about the MPlayer-dev-eng mailing list