[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40668] -NA is inconsistent with other operati
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #40668] -NA is inconsistent with other operations on NA |
Date: |
Wed, 16 Nov 2016 23:17:03 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 |
Follow-up Comment #8, bug #40668 (project octave):
I assume you are asking about unpatched Octave as we know it? That's what I
tested here.
I know almost nothing about R, but here is what I tried:
$ R
> fid = file ("foo.dat", "wb")
> writeBin (c (1, -1) * NA, fid)
> close (fid)
$ octave
>> fid = fopen ("foo.dat", "rb");
>> x = fread (fid, "double");
>> fclose (fid);
>> x
x =
NaN
NaN
So that's one direction. In the other direction:
$ octave
>> fid = fopen ("foo.dat", "wb");
>> fwrite (fid, [1, -1] * NA, "double");
>> fclose (fid);
$ R
> fid = file ("foo.dat", "rb")
> x = readBin (fid, double (), n = 2)
> close (fid)
> x
[1] NaN NaN
Is that what you are looking for? If not what can I test differently?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40668>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #40668] -NA is inconsistent with other operations on NA,
Mike Miller <=