help-octave
[Top][All Lists]
Advanced

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

Re: Save produces large files


From: David Bateman
Subject: Re: Save produces large files
Date: Tue, 14 Jun 2005 17:10:38 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Frank Palazzolo a écrit :

The funny thing is, if you save a=NaN (as a scalar), it doesn't give you the
warning.

Are scalars different than matrices to -float-binary?
Yes, consider the code that does the saving

bool
octave_scalar::save_binary (std::ostream& os, bool& /* save_as_floats */)
{
 char tmp = (char) LS_DOUBLE;
 os.write (X_CAST (char *, &tmp), 1);
 double dtmp = double_value ();
 os.write (X_CAST (char *, &dtmp), 8);

 return true;
}

It ignores the save_as_float argument and always saves as a double, as the cost saving is negligible....

D.



-------------------------------------------------------------
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]