Mercurial > hg > octave-terminal
changeset 4605:c430e537efad
[project @ 2003-11-13 04:46:25 by jwe]
author | jwe |
---|---|
date | Thu, 13 Nov 2003 04:46:49 +0000 |
parents | cba347c642e2 |
children | a08b7f567bda |
files | libcruft/ChangeLog libcruft/misc/machar.c liboctave/ChangeLog liboctave/mach-info.cc |
diffstat | 4 files changed, 33 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,3 +1,7 @@ +2003-11-12 John Eaton <jwe@bevo.che.wisc.edu> + + * misc/machar.c (machar) [CRAY]: Kluge to make it work. + 2003-10-31 John W. Eaton <jwe@bevo.che.wisc.edu> * odepack/dlsode.f: Rename from odepack/lsode.f.
--- a/libcruft/misc/machar.c +++ b/libcruft/misc/machar.c @@ -2,6 +2,8 @@ #include <config.h> #endif +#include <float.h> + #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);
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,4 +1,7 @@ -2003-11-12 John W. Eaton <jwe@bevo.che.wisc.edu> +2003-11-12 John Eaton <jwe@bevo.che.wisc.edu> + + * 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.
--- a/liboctave/mach-info.cc +++ b/liboctave/mach-info.cc @@ -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