This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
numtestf is broken
- From: Matthias Braun <matze at braunis dot de>
- To: newlib at sourceware dot org
- Date: Tue, 04 Feb 2014 13:13:10 +0100
- Subject: numtestf is broken
- Authentication-results: sourceware.org; auth=none
Attached is a patch for numtestf which did not detect NaN and INF
correctly.
Greetings
Matthias Braun
Index: newlib/libm/mathfp/sf_numtest.c
===================================================================
RCS file: /cvs/src/src/newlib/libm/mathfp/sf_numtest.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 sf_numtest.c
--- newlib/libm/mathfp/sf_numtest.c 17 Feb 2000 19:39:52 -0000 1.1.1.1
+++ newlib/libm/mathfp/sf_numtest.c 4 Feb 2014 12:09:17 -0000
@@ -40,7 +40,7 @@
}
/* Check for not a number or infinity. */
- if (exp == 0x7f8)
+ if (exp == 0xff)
{
if(wx & 0x7fffff)
return (NAN);