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: Sun, 19 Sep 2021 16:13:29 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Firefox/60.0

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

Your recursivesum is a variant of what is otherwise called pairwise summation
(e.g. comments #10, #12 and #13) -- it divides into four parts instead of two
per recursion, and it divides into at most 4^7 parts altogether. 

It is a much better algorithm than what Matlab seemingly uses, but as summing
a vector is a very basic operation, it should be done in compiled code. I will
see whether I can put something together to see how it compares in terms of
efficiency.

    _______________________________________________________

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]