[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong num
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers |
Date: |
Tue, 11 Jan 2022 10:43:30 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 |
Follow-up Comment #8, bug #61788 (project octave):
We could begin by keeping the special range type for floating point ranges (as
in previous versions of Octave) but making integer range expressions always
generate arrays. This change is very low risk because integer range
expressions were not supported in previous versions of Octave. For example,
in Octave 6 and earlier versions:
octave:1> x = uint8(1):uint8(10)
x =
1 2 3 4 5 6 7 8 9 10
octave:2> class (x)
ans = double
which was not Matlab compatible, so fixing compatibility in this case could
mean
0 generating a uint8 object from the range expression
0 generating an array instead of a special range object
In a later version (when we have had more time for testing) we could make
Octave also generate arrays by default for floating point range expressions.
To make maintenance easier, I would be in favor of simply eliminating range
objects entirely, but if we do keep them, I would argue for making that
behavior optional with the default being to create arrays from range
expressions.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61788>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Hartmut, 2022/01/10
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, John W. Eaton, 2022/01/10
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Arun Giridhar, 2022/01/10
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Arun Giridhar, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, John W. Eaton, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Arun Giridhar, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Arun Giridhar, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, John W. Eaton, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers,
John W. Eaton <=
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Arun Giridhar, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Arun Giridhar, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Markus Mützel, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, John W. Eaton, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Rik, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Hartmut, 2022/01/14
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Rik, 2022/01/14
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, Hartmut, 2022/01/18
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, John W. Eaton, 2022/01/18