|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #46859] floating point error in range results in non-integer value |
Date: | Thu, 16 Aug 2018 16:28:52 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 |
Update of bug #46859 (project octave): Item Group: Incorrect Result => Unexpected Error _______________________________________________________ Follow-up Comment #10: I think this issue is important and should be re-visited. The error message that results from indexing with a double value that is close to an integer obscures what is going on. Today's behavior: octave:1> x = [1:5]; octave:2> x(1+100*eps) error: x(1): subscripts must be either integers 1 to (2^63)-1 or logicals The patch from Lachlan to print out more detail about the invalid index no longer applies. I updated it to target the correct file and to use C++ rather than C library functions. I checked that in here: https://hg.savannah.gnu.org/hgweb/octave/rev/0360ed7c39a8. The new behavior is octave:2> x(1+100*eps) error: x(1+2.22045e-14): subscripts must be either integers 1 to (2^63)-1 or logicals _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?46859> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |