octave-maintainers
[Top][All Lists]
Advanced

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

Re: [Changeset] Re: Single Precision versus double precision NA


From: David Bateman
Subject: Re: [Changeset] Re: Single Precision versus double precision NA
Date: Fri, 06 Jun 2008 08:43:56 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

John W. Eaton wrote:
> On  5-Jun-2008, David Bateman wrote:
> 
> | Ok, then the attached changeset addresses this by changing the NA values
> | as above. I still have no confirmation that the above code worked as
> | expected for other machines than my own. However I added a couple of
> | tests that check that the translation of NA values from single to double
> | precision and visa-versa is done correctly and so if make check is run
> | on different systems we'll quickly find if there is an issue with this
> | change. I also added code to data-conv.cc (read_doubles) to check for
> | the old NA value and convert it to the new one. So there is forward
> | compatibility for the NA values saved with older versions of Octave.
> | However, NA values saved after this change won't be loaded correctly
> | with older version of Octave. In any case if the conversion in this
> | changeset works correctly for other platforms, OS and compilers then
> | this is probably the simplest way to address this issue.
> 
> With this change will a binary file of double-precision values
> containing some NA values and written by Octave still be readable by
> R with the NA values preserved?
> 
> jwe
> 

No, not unless R makes a change to support the new NA value. I think the
change can be justified for R as well if they ever want to support
single precision values, and any other way to handle this issue is going
to be ugly (ie wrapping float/double and overloading the assignment
operators to trap the NA values, or some such)

D.


reply via email to

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