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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64692] colon range includes an extra value


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #64692] colon range includes an extra value
Date: Fri, 22 Sep 2023 16:41:12 -0400 (EDT)

Follow-up Comment #19, bug #64692 (project octave):

There is no way to know that the intended end point is 0, is there?  We only
know that the value is approximately -eps.  It is not an integer but the base
and increment are exact integer values.

In the other cases considered in this report so far, the base and increment
are not exactly integers.

I'm just suggesting that in the name of compatibility we avoid computing a
final value that is larger than the specified limit of the range when both the
base and increment are integers.  Does that improve compatibility?  If so,
then I think we should do it.   Can we find *any* case where Matlab computes a
final value that is larger than the specified limit of the range when the base
and increment are both exact integers?  For example, what does it do with
-10:-1e200 or similar expressions?  If it doesn't create a range that includes
zero in that case, then I'm pretty sure it is never using tolerant rounding to
guess that the intent was a final value of zero when the base and increment
are exact integers.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64692>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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