octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #31942] Save/load single precision variables w


From: David Bateman
Subject: [Octave-bug-tracker] [bug #31942] Save/load single precision variables with MATLAB data format fails
Date: Wed, 05 Jan 2011 22:26:10 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009091010 Iceweasel/3.0.14 (Debian-3.0.14-1)

Follow-up Comment #7, bug #31942 (project octave):

Ok, I see the problem.. There was no version of get_save_type function in
ls-util.cc for float values and the data was saved as LS_DOUBLE rather than
LS_FLOAT as it should have been. Adding a version of this function 

extern save_type
get_save_type (float max_val, float min_val);

that returns LS_FLOAT fixes this problem for me. I should probably also
replace the code

(nel + 1) & ~0x1LL 

with something generic that handles both 32 and 64-bit versions of
octave_idx_type cleanly as well and propose replacing this as well. I believe
the changeset attached fully fixes this issue, but I prefer feedback before
pushing it and closing this bug

D.



(file #22361)
    _______________________________________________________

Additional Item Attachment:

File name: changeset.single               Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31942>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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