[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close |
Date: |
Thu, 9 May 2024 21:46:08 -0400 (EDT) |
Follow-up Comment #2, bug #65714 (group octave):
ok, so when setting bins for x, it checks:
if (min_val != max_val)
x = 1:2:2*n;
x = ((max_val - min_val) * x + 2*n*min_val) / (2*n);
else
x = (-floor ((n-1)/2):ceil ((n-1)/2)) + min_val;
endif
for [1, 1+0.1*eps], min_val == max_val, so it does the else. for 1+eps it
sees min_val != max_val, so it tries to do the math to figure what the x's
should be.
even in matlab the behavior of the min/max values for x are ... strange for
small y values like this. It always does two bars of height 1, with bar width
and separation and xlim related somehow to the spacing between the values.
(matlab obviously has plotting values that support doubles). We probably don't
need to perfectly emulate this corner case, but it doesn't error, and we
should try not to do that.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65714>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close, Hartmut, 2024/05/08
- [Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close, Nicholas Jankowski, 2024/05/09
- [Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close,
Nicholas Jankowski <=
- [Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close, Nicholas Jankowski, 2024/05/09
- [Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close, Nicholas Jankowski, 2024/05/09
- [Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close, Hartmut, 2024/05/10
- [Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close, Nicholas Jankowski, 2024/05/17
- [Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close, Arun Giridhar, 2024/05/18
- [Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close, Nicholas Jankowski, 2024/05/18
- [Octave-bug-tracker] [bug #65714] "hist" throws error when input numbers are very close, Nicholas Jankowski, 2024/05/18