Re: [patch] lrint/lrintf oddity

2005-09-08 Thread Jeff Johnston
Thanks Brian. Patch checked in and s_lrint.c modified similiarly. -- Jeff J. Brian Dessent wrote: Erik de Castro Lopo wrote: $ gcc -Wall -O3 lrintf_test.c -o lrintf_test $ ./lrintf_test.exe lrintf_test ( .00) : ok lrint_test ( .00) : ok lrintf_test (3.000

Re: [patch] lrint/lrintf oddity

2005-09-03 Thread Erik de Castro Lopo
Brian Dessent wrote: > Linux uses glibc, Cygwin uses newlib. They're not the same thing. OK. > Glibc is highly optimized and tweaked, newlib is designed as a small and > portable libc for embedded systems. Is the target small source code size or small executable size? If its small executable

Re: [patch] lrint/lrintf oddity

2005-09-03 Thread Brian Dessent
Erik de Castro Lopo wrote: > Err, what?? > > On Linux, the lrintf() function is an inline function that reduces to > a single asm instruction. Linux uses glibc, Cygwin uses newlib. They're not the same thing. Glibc is highly optimized and tweaked, newlib is designed as a small and

Re: [patch] lrint/lrintf oddity

2005-09-03 Thread Erik de Castro Lopo
Brian Dessent wrote: > Yes, this does in fact seem to be a bug in lrintf. A reduced testcase > is: > > #include > #include > > int main () > { > float f = -8399916.0; > printf ("f = %f, k = %ld\n", f, lrintf (f)); > } > > The value -8399916.0 in binary is > > 1 10010110 01011000