lrint() incorrect results.

Dave Korn
Mon Jun 13 10:01:00 GMT 2005

----Original Message----
>From: Luke Hutchinson
>Sent: 04 June 2005 18:27

> Is there any particular reason the same inline functions as defined in the
> MinGW header files are not used?  They work correctly, and being inlined,
> are more efficient.

  Well, the main reason is that cygwin uses newlib for libc/libm support,
and newlib is generic across all CPUs, so it can't use x86-specific inline
assembler in quite the same way.  However it would be an eminently suitable
workaround for your applications.

  (BTW I've started looking at the code for this.  It seems it must never
have worked, since these files haven't been modified since they were first
added three years ago.  I haven't exactly understood the problem yet, but
I've figured out that lrintf ought to be just as broken as lrint and only
isn't because of a signed-vs-unsigned bug in the code!  I have a hunch there
may just be a broken endian-ness assumption in the code somewhere, but I'll
know more later).

Can't think of a witty .sigline today....

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list