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: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #64692] colon range includes an extra value
Date: Fri, 22 Sep 2023 14:33:11 -0400 (EDT)

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

I tried some experiments with the multiple of eps. It looks zero-sum to me
though. The best of the bunch is between 1*eps and 3*eps, but there are edge
cases like "1.85 : 0.05 : 1.9" which sometimes return only one value 1.85 and
not the second one 1.9. Changing eps or commenting or the special override
code to make that work causes some other test to break. At this point, I'm not
sure which test to favor.

Has Matlab published their rounding rules on a public site? If not,  try
these:

1.85 : 0.05 : 1.9

1.8 : 0.05 : 1.9

-2 : (0.3 - 0.2 - 0.1)

In all cases, the code should be written in a more defensive way anyway.


    _______________________________________________________

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]