This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: beta 20.1 and 19 and 18 'rint' function with gcc is broken
- To: Jeff Deifik <jdeifik at weasel dot com>
- Subject: Re: beta 20.1 and 19 and 18 'rint' function with gcc is broken
- From: Mumit Khan <khan at xraylith dot wisc dot edu>
- Date: Tue, 15 Dec 1998 16:35:34 -0600
- cc: gnu-win32 at cygnus dot com
Jeff Deifik <jdeifik@weasel.com> writes:
> I have reported a bug with the math function rint.
> It is still not fixed with the latest beta-20.1
Hi Jeff,
I did take a look when you posted the test case the first time around,
and I apologize for forgetting all about it.
The problem is the way rint is written in newlib -- it's using the old
Sun code that I'm not too fond of. In fact, most of newlib's math functions
are not up to par if you're going to develop numerical code on ix86.
The simple fix, albeit awkward, is to declare the variable "w" volatile in
newlib/libm/math/s_rint.c and then the compiler wouldn't optimize away the
critical section at the end. Another quick fix is to use a an assembly
version of rint (see glibc2 sources) and use that for cygwin.
The real fix is to dump the math library and use one of the better tested
ones. Even glibc2 does quite a bit better than newlib as long as you steer
clear of some of the buggy inlined routines.
The *real* fix IMO is to dump newlib, but that's a whole different topic.
Regards,
Mumit
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".