diff liboctave/lo-ieee.cc @ 2560:6fa1ac46c980

[project @ 1996-12-03 17:49:38 by jwe]
author jwe
date Tue, 03 Dec 1996 17:49:40 +0000
parents f8d5dbbbc50a
children 36a4daa9e3c7
line wrap: on
line diff
--- a/liboctave/lo-ieee.cc	Mon Dec 02 06:34:27 1996 +0000
+++ b/liboctave/lo-ieee.cc	Tue Dec 03 17:49:40 1996 +0000
@@ -31,8 +31,10 @@
 #include <floatingpoint.h>
 #endif
 
-#if defined (HAVE_NAN_H)
+#if defined (HAVE_NAN_H) && defined (SCO)
+#define _IEEE 1
 #include <nan.h>
+#undef _IEEE
 #endif
 
 #include "lo-ieee.h"
@@ -58,6 +60,9 @@
 #elif defined (__alpha__)
   extern unsigned int DINFINITY[2];
   octave_Inf =  (*((double *) (DINFINITY)));
+#elif defined (SCO)
+  double tmp = 1.0;
+  octave_Inf = 1.0 / (tmp - tmp);
 #else
   double tmp = 1e+10;
   octave_Inf = tmp;
@@ -89,18 +94,19 @@
 }
 
 #if defined (SCO)
-#define _IEEE 1
+
 extern "C" int
 isnan (double x)
 {
-  return (IsNANorINF(x) && NaN(x)) ? 1 : 0;
+  return (IsNANorINF (x) && NaN (x) && ! IsINF (x)) ? 1 : 0;
 }
 
 extern "C" int
 isinf (double x)
 {
-  return (IsNANorINF(x) && IsINF(x)) ? 1 : 0;
+  return (IsNANorINF (x) && IsINF (x)) ? 1 : 0;
 }
+
 #endif
 
 /*