|
From: | John W. Eaton |
Subject: | [Octave-bug-tracker] [bug #61143] Functions sum and mean returns wrong answer for single precision input |
Date: | Sat, 11 Sep 2021 16:21:20 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Follow-up Comment #7, bug #61143 (project octave): Can reordering ever help this case? sum ([flintmax, 1]) Performing the summation using double can also help, but only until it doesn't. I don't think there is a simple "fix" for this problem except to understand that numerical computations using a floating point representation are not exact. You kind of have to know what you are doing. I don't see a way around that. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?61143> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |