|
From: | Arun Giridhar |
Subject: | [Octave-bug-tracker] [bug #61300] integer range might exceed upper limit |
Date: | Sun, 28 Nov 2021 12:52:35 -0500 (EST) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0 |
Follow-up Comment #13, bug #61300 (project octave): Improved patch attached for the integer range bug in Range.h. This one gets rid of the if-check and uses the standard technique of converting to double and taking the floor. Since m_numel is of type octave_idx_type, I chose to cast it to that type instead of type T. All range tests from comment #12 pass with both integers and floating points. Make check passes with no regressions and no new failures: PASS 17028 FAIL 0 XFAIL (reported bug) 27 SKIP (missing feature) 43 SKIP (run-time condition) 25 Please verify the behavior and the performance. This is independent of the integer division bug in primes.m (patch in comment #9). (file #52361) _______________________________________________________ Additional Item Attachment: File name: range_patch.patch Size:1 KB <https://file.savannah.gnu.org/file/range_patch.patch?file_id=52361> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?61300> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |