tadd isNaN - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit cdccf023aab367870fa53273d2078eb4e6ecd807
parent e686c2b35e2d6aaed5f0aa4ce9183ac0821264bf
Author: rsc 
Date:   Mon, 27 Dec 2004 00:11:13 +0000

add isNaN

Diffstat:
  M src/lib9/fmt/fltfmt.c               |       7 ++++---

1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/lib9/fmt/fltfmt.c b/src/lib9/fmt/fltfmt.c
t@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "plan9.h"
 #include "fmt.h"
t@@ -142,15 +143,15 @@ xdtoa(Fmt *fmt, char *s2, double f)
                 prec = fmt->prec;
         if(prec > FDIGIT)
                 prec = FDIGIT;
-        if(isNaN(f)) {
+        if(__isNaN(f)) {
                 strcpy(s2, "NaN");
                 return;
         }
-        if(isInf(f, 1)) {
+        if(__isInf(f, 1)) {
                 strcpy(s2, "+Inf");
                 return;
         }
-        if(isInf(f, -1)) {
+        if(__isInf(f, -1)) {
                 strcpy(s2, "-Inf");
                 return;
         }