# HG changeset patch # User jwe # Date 810981120 0 # Node ID 083787534e181c5f6a64006b6ddcfd4b189578c9 # Parent d0bdfca51b425cd9ba8208d75d02ae77b477c3eb [project @ 1995-09-13 08:25:37 by jwe] diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -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) diff --git a/src/mappers.cc b/src/mappers.cc --- a/src/mappers.cc +++ b/src/mappers.cc @@ -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 } diff --git a/src/sysdep.cc b/src/sysdep.cc --- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -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]; diff --git a/src/variables.cc b/src/variables.cc --- a/src/variables.cc +++ b/src/variables.cc @@ -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,