This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

numtestf is broken


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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]