help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Save produces large files


From: John W. Eaton
Subject: Re: Save produces large files
Date: Tue, 14 Jun 2005 13:50:44 -0400

On 14-Jun-2005, David Bateman wrote:

| You also need similar changes in ls-mat5.cc as it has independent code 
| to calculate whether float will be used...

Fixed.

BTW, the test is now

      if (! (octave_is_NaN_or_NA (val) || xisinf (val))
          && fabs (val) > FLT_MAX)
        return true;

so NaN, NA, and Inf values are allowed, and we only check if the
absolute value is out of range.  Small (absolute) values (i.e., <
FLT_MIN, or approximately 1e-38) will be silently converted to zero.
Is that OK?  I haven't checked the Matlab docs to see whether this is
compatible behavior.

Also, NA is not preserved.  On writing, it is converted to an ordinary
float NaN, without the special value in the mantissa.  To preserve NA
when saving in single precision, we will need special code to convert
a double NA to a float NA when saving, and also to convert a float NA
to a double NA when reading.

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]