isnan and isinf when double_is_32bits
Ran Cabell
rcabell@norfolk.infi.net
Mon Feb 14 05:44:00 GMT 2000
isnan and isinf are missing in mathfp when DOUBLE_IS_32BITS is defined.
To correct this I've inserted calls to isnanf and isinff in s_isnan.c
and s_isinf.c, e.g:
diff -uNr -x *~ newlib-1.8.2.vanilla/newlib/libm/mathfp/s_isnan.c
newlib-1.8.2/newlib/libm/mathfp/s_isnan.c
--- newlib-1.8.2.vanilla/newlib/libm/mathfp/s_isnan.c Tue Mar 2
18:05:33 1999
+++ newlib-1.8.2/newlib/libm/mathfp/s_isnan.c Sun Feb 13 20:28:26 2000
@@ -122,4 +122,11 @@
return (0);
}
-#endif /* _DOUBLE_IS_32BITS */
+#else
+
+int isnan (double x)
+{
+ return isnanf((float)x);
+}
+
+#endif /* DOUBLE_IS_32BITS */
This may not be the best way to handle this case in general. Would the
maintainers have any better ideas?
Thanks,
Ran Cabell
rcabell@norfolk.infi.net
More information about the Newlib
mailing list