[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: |
Arun Giridhar |
Subject: |
[Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers |
Date: |
Mon, 10 Jan 2022 16:47:34 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0 |
Follow-up Comment #2, bug #61788 (project octave):
@jwe: Which file has the code you refer to?
Without knowing the ramifications in detail yet, one way to do it is to say
element(i) = element(i-1) + increment;
Such a serial definition will avoid overflow, but there may be a performance
penalty because that code is serial, compared with the expression in your
comment which can be loop-unrolled by the compiler, etc. I do not know the
tradeoff yet.
Also, how is it possible that test/range.tst is passing while the range in
comment #0 is clearly saturating and not reaching the final value? Do we need
range tests closer to the respective intmax?
_______________________________________________________
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 <=
- [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, 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, Markus Mützel, 2022/01/11
- [Octave-bug-tracker] [bug #61788] arrays of type int16 contain wrong numbers, John W. Eaton, 2022/01/11