octave-bug-tracker
[Top][All Lists]
Advanced

[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/




reply via email to

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