[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50924] Different result between range operati
From: |
Arthur HUGEAT |
Subject: |
[Octave-bug-tracker] [bug #50924] Different result between range operation and vector operation |
Date: |
Thu, 4 May 2017 04:39:10 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 |
Follow-up Comment #4, bug #50924 (project octave):
Thank you for your answers, I understand better the problem.
With range operator we sum two double variables at each step. As explained
here:
https://en.wikipedia.org/wiki/Kahan_summation_algorithm
The summation between a 'little' number and 'big' number create a numerical
error.
When octave create the range, the last values ('big' numbers) is add to the
step ('little' number).
A possible solution is to implement the compensated summation when octave
compute a range but I don't know if it's easy to do this or it's a good
approach.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50924>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/