changeset 1308:8c8a83cf184a

[project @ 1995-06-08 20:23:21 by jwe]
author jwe
date Thu, 08 Jun 1995 20:23:21 +0000
parents e357dced2de7
children c0187e1c02f9
files src/mappers.cc
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/mappers.cc	Wed Jun 07 03:34:02 1995 +0000
+++ b/src/mappers.cc	Thu Jun 08 20:23:21 1995 +0000
@@ -33,6 +33,7 @@
 #include "f77-uscore.h"
 #include "variables.h"
 #include "mappers.h"
+#include "sysdep.h"
 #include "error.h"
 #include "utils.h"
 #include "defun.h"
@@ -68,7 +69,11 @@
   if (x < 0.0)
     return M_PI;
   else
+#if defined (HAVE_ISNAN)
+    return xisnan (x) ? octave_NaN : 0.0;
+#else
     return 0.0;
+#endif
 }
 
 double
@@ -88,7 +93,11 @@
 double
 imag (double x)
 {
+#if defined (HAVE_ISNAN)
+  return xisnan (x) ? octave_NaN : 0.0;
+#else
   return 0.0;
+#endif
 }
 
 double
@@ -111,7 +120,12 @@
     tmp = -1.0;
   else if (x > 0.0)
     tmp = 1.0;
+
+#if defined (HAVE_ISNAN)
+  return xisnan (x) ? octave_NaN : tmp;
+#else
   return tmp;
+#endif
 }
 
 double