changeset 1384:083787534e18

[project @ 1995-09-13 08:25:37 by jwe]
author jwe
date Wed, 13 Sep 1995 08:32:00 +0000
parents d0bdfca51b42
children 152b9813cd63
files configure.in src/mappers.cc src/sysdep.cc src/variables.cc
diffstat 4 files changed, 9 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Wed Sep 13 08:19:04 1995 +0000
+++ b/configure.in	Wed Sep 13 08:32:00 1995 +0000
@@ -20,7 +20,7 @@
 ### along with Octave; see the file COPYING.  If not, write to the Free
 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-AC_REVISION($Revision: 1.131 $)
+AC_REVISION($Revision: 1.132 $)
 AC_PREREQ(2.0)
 AC_INIT(src/octave.cc)
 AC_CONFIG_HEADER(config.h)
@@ -640,11 +640,10 @@
 XCFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS $GCC_IEEE_FP_FLAG"
 
-### Inf and NaN don't work with gcc on the Alpha yet.  I am also told
-### that they don't work on m68k HP sytems either.
+### I am told that Inf and NaN don't work on m68k HP sytems.
 
 case "$canonical_host_type" in
-  alpha-dec-osf* | m68k-hp-hpux*)
+  m68k-hp-hpux*)
   ;;
   *)
     AC_CHECK_FUNCS(finite isnan isinf infinity quiet_nan)
--- a/src/mappers.cc	Wed Sep 13 08:19:04 1995 +0000
+++ b/src/mappers.cc	Wed Sep 13 08:32:00 1995 +0000
@@ -167,7 +167,7 @@
 #elif defined (HAVE_ISINF) && defined (HAVE_ISNAN)
   return (double) (! isinf (x) && ! isnan (x));
 #else
-  return (double) (x > -DBL_MAX && x < DBL_MAX);
+  return 1;
 #endif
 }
 
@@ -185,7 +185,7 @@
 #elif defined (HAVE_FINITE) && defined (HAVE_ISNAN)
   return (double) (! (finite (x) || isnan (x)));
 #else
-  return (double) (x == DBL_MAX || x == -DBL_MAX);
+  return 0;
 #endif
 }
 
--- a/src/sysdep.cc	Wed Sep 13 08:19:04 1995 +0000
+++ b/src/sysdep.cc	Wed Sep 13 08:32:00 1995 +0000
@@ -178,6 +178,10 @@
     }
 #endif
 
+#endif
+
+#if defined (HAVE_ISNAN)
+
 #if defined (HAVE_QUIET_NAN)
   octave_NaN = (double) quiet_nan ();
 #elif defined (linux)
@@ -189,14 +193,6 @@
   octave_NaN = octave_Inf / octave_Inf;
 #endif
 
-#else
-
-  // This is sort of cheesy, but what can we do, other than blowing it
-  // off completely, or writing an entire IEEE emulation package?
-
-  octave_Inf = DBL_MAX;
-  octave_NaN = DBL_MAX;
-
 #endif
 
   float_params fp[5];
--- a/src/variables.cc	Wed Sep 13 08:19:04 1995 +0000
+++ b/src/variables.cc	Wed Sep 13 08:32:00 1995 +0000
@@ -1508,10 +1508,8 @@
   DEFVAR ("J", SBV_J, Complex (0.0, 1.0), 0, 1, 1, 0,
     "sqrt (-1)");
 
-  #if defined (HAVE_ISNAN)
   DEFVAR ("NaN", SBV_NaN, octave_NaN, 0, 1, 1, 0,
     "not a number");
-  #endif
 
   DEFVAR ("LOADPATH", SBV_LOADPATH, load_path, 0, 0, 1, sv_loadpath,
     "colon separated list of directories to search for scripts");
@@ -1609,10 +1607,8 @@
   DEFVAR ("j", SBV_j, Complex (0.0, 1.0), 1, 1, 1, 0,
     "sqrt (-1)");
 
-  #if defined (HAVE_ISNAN)
   DEFVAR ("nan", SBV_nan, octave_NaN, 0, 1, 1, 0,
     "not a number");
-  #endif
 
   DEFVAR ("ok_to_lose_imaginary_part", SBV_ok_to_lose_imaginary_part,
 	  "warn", 0, 0, 1, ok_to_lose_imaginary_part,