# HG changeset patch # User jwe # Date 1068698809 0 # Node ID c430e537efad04089e532d824826cc7af5b1d931 # Parent cba347c642e2df19741fbf8d02eace796871ea3b [project @ 2003-11-13 04:46:25 by jwe] diff -r cba347c642e2 -r c430e537efad libcruft/ChangeLog --- a/libcruft/ChangeLog Thu Nov 13 04:38:05 2003 +0000 +++ b/libcruft/ChangeLog Thu Nov 13 04:46:49 2003 +0000 @@ -1,3 +1,7 @@ +2003-11-12 John Eaton + + * misc/machar.c (machar) [CRAY]: Kluge to make it work. + 2003-10-31 John W. Eaton * odepack/dlsode.f: Rename from odepack/lsode.f. diff -r cba347c642e2 -r c430e537efad libcruft/misc/machar.c --- a/libcruft/misc/machar.c Thu Nov 13 04:38:05 2003 +0000 +++ b/libcruft/misc/machar.c Thu Nov 13 04:46:49 2003 +0000 @@ -2,6 +2,8 @@ #include #endif +#include + #include "f77-fcn.h" /* @@ -368,10 +370,23 @@ F77_FUNC (machar, MACHAR) (REAL *xmin, REAL *xmax, REAL *epsneg, REAL *eps, REAL *log10_ibeta) { +#if defined (_CRAY) + + // XXX FIXME XXX -- make machar work for the Cray too. + + int ibeta = FLT_RADIX; + *xmin = DBL_MIN; + *xmax = DBL_MAX; + *epsneg = DBL_EPSILON; + *eps = DBL_EPSILON; + +#else + int ibeta, iexp, irnd, it, machep, maxexp, minexp, negep, ngrd; rmachar (&ibeta, &it, &irnd, &ngrd, &machep, &negep, &iexp, &minexp, &maxexp, eps, epsneg, xmin, xmax); +#endif *log10_ibeta = log10 ((REAL) ibeta); diff -r cba347c642e2 -r c430e537efad liboctave/ChangeLog --- a/liboctave/ChangeLog Thu Nov 13 04:38:05 2003 +0000 +++ b/liboctave/ChangeLog Thu Nov 13 04:46:49 2003 +0000 @@ -1,4 +1,7 @@ -2003-11-12 John W. Eaton +2003-11-12 John Eaton + + * mach-info.c (oct_mach_info::init_float_format) [CRAY]: + Kluge to make it work. * lo-ieee.cc (octave_ieee_init): Set octave_Inf, octave_NaN, and octave_NA to DBL_MAX if native float format is vaxd, vaxg, or cray. diff -r cba347c642e2 -r c430e537efad liboctave/mach-info.cc --- a/liboctave/mach-info.cc Thu Nov 13 04:38:05 2003 +0000 +++ b/liboctave/mach-info.cc Thu Nov 13 04:46:49 2003 +0000 @@ -72,6 +72,14 @@ void oct_mach_info::init_float_format (void) const { +#if defined (CRAY) + + // XXX FIXME XXX -- this should be determined automatically. + + native_float_fmt = oct_mach_info::flt_fmt_cray; + +#else + float_params fp[5]; INIT_FLT_PAR (fp[0], oct_mach_info::flt_fmt_ieee_big_endian, @@ -121,6 +129,8 @@ } } while (fp[++i].fp_fmt != oct_mach_info::flt_fmt_unknown); + +#endif } void