[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59830] Architecture-dependent results for ari
From: |
Rafael Laboissiere |
Subject: |
[Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA |
Date: |
Sun, 10 Jan 2021 04:19:49 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 |
Follow-up Comment #11, bug #59830 (project octave):
[comment #8 comment #8:]
> Instead, you might try re-defining the high word of Octave NA so that the
quiet signaling bit is '0' to match MIPS. As another test, I would ask you to
try changing liboctave/util/lo-ieee.h.
>
>
> diff -r e4c152e827aa liboctave/util/lo-ieee.h
> --- a/liboctave/util/lo-ieee.h Thu Jan 07 18:34:18 2021 +0100
> +++ b/liboctave/util/lo-ieee.h Fri Jan 08 14:09:31 2021 -0800
> @@ -69,7 +69,7 @@ typedef union
>
> #define LO_IEEE_NA_HW_OLD 0x7ff00000
> #define LO_IEEE_NA_LW_OLD 1954
> -#define LO_IEEE_NA_HW 0x7FF840F4
> +#define LO_IEEE_NA_HW 0x7FF040F4
> #define LO_IEEE_NA_LW 0x40000000
> #define LO_IEEE_NA_FLOAT 0x7FC207A2
>
>
>
> Apply the patch with 'patch -p1 < mypatch' and then re-compile.
>
> Try
>
>
> format native-bit
> x = NA
> y = x / 4
> isna (y)
>
I recompiled Octave on a Debian mips64el system with Rik's patch above. It
yields this:
octave:1> format native-bit
octave:2> x = NA
x = 0000000000000000000000000000001000101111000000100000111111111110
octave:3> y = x / NA
y = 0000000000000000000000000000001000101111000000100000111111111110
octave:4> isna (y)
ans = 10000000
Just for the record, this is what happens without the patch:
octave:1> format native-bit
octave:2> x = NA
x = 0000000000000000000000000000001000101111000000100001111111111110
octave:3> y = x / NA
y = 1111111111111111111111111111111111111111111111111110111111111110
octave:4> isna (y)
ans = 00000000
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59830>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, (continued)
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rafael Laboissiere, 2021/01/06
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rik, 2021/01/06
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rafael Laboissiere, 2021/01/07
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rik, 2021/01/07
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rafael Laboissiere, 2021/01/07
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rik, 2021/01/08
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rafael Laboissiere, 2021/01/08
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rik, 2021/01/08
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rafael Laboissiere, 2021/01/09
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, John W. Eaton, 2021/01/09
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA,
Rafael Laboissiere <=
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rik, 2021/01/10
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rik, 2021/01/12
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rafael Laboissiere, 2021/01/19
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rafael Laboissiere, 2021/01/19
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rik, 2021/01/19
- [Octave-bug-tracker] [bug #59830] Architecture-dependent results for arithmetic operations involving NA, Rafael Laboissiere, 2021/01/20