[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: |
Mon, 18 Sep 2023 09:57:09 -0400 (EDT) |
Update of bug #64692 (project octave):
Category: Interpreter => None
Status: Confirmed => None
Release: 8.3.0 => 6.4.0
_______________________________________________________
Follow-up Comment #2:
Comment: this seems to be a conscious choice as shown by comments in Range.h
and Range.cc.
Example:
https://hg.savannah.gnu.org/hgweb/octave/file/489e63504a94/liboctave/array/Range.h#l58
// LIMIT is an upper limit and may be outside the range of actual values. For
floating point ranges, we perform a tolerant check to attempt to capture limit
in the set of values if it is "close" to the value of base + a multiple of the
increment.
There are various helper functions in Range.cc aimed at achieving that
effect.
Since the numerical value of -2.7e-17 is close to 0, the 0 gets included. If
the final value is more than some 2.3e-15 away, then it is not included.
Speaking for myself, this behavior seems to be less astonishing than strict
application of limit rules due to floating point artifacts.
What do others think?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64692>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, anonymous, 2023/09/18
- Message not available
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Pantxo Diribarne, 2023/09/18
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value,
Arun Giridhar <=
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Arun Giridhar, 2023/09/18
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Arun Giridhar, 2023/09/18
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Nicholas Jankowski, 2023/09/18
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Jeremie Knuesel, 2023/09/18
- Message not available
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Arun Giridhar, 2023/09/18
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Nicholas Jankowski, 2023/09/19
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Arun Giridhar, 2023/09/22
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Nicholas Jankowski, 2023/09/22
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Arun Giridhar, 2023/09/22
- [Octave-bug-tracker] [bug #64692] colon range includes an extra value, Nicholas Jankowski, 2023/09/22