octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61143] Functions sum and mean returns wrong a


From: Michael Leitner
Subject: [Octave-bug-tracker] [bug #61143] Functions sum and mean returns wrong answer for single precision input
Date: Tue, 14 Sep 2021 04:27:32 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #24, bug #61143 (project octave):

Yes, there is no "one size fits all", because there are so ill-conditioned
problems that you really would have to do infinite-precision arithmetics
(which is what the human mind does) to decide on which code branches to use.
However, the question is rather whether the one size we hand out by default
should rather be the most simple conceivable (in the simile with garments, a
plain sheet) or whether we should use an algorithm that fits all problems at
least as good as the plain sheet, and some much better. And I would say that
pairwise summation is such a solution.

So, what are the advantages of staying with the present algorithm? Just the
absence of effort in implementing it?

And in order to have something we can discuss about, I suggest the following
accuracy aim: the error of  summing a vector a of length N should be bounded
by a constant times eps(sum(abs(a)))*sqrt(N).

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61143>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]