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: Dmitri A. Sergatskov
Subject: [Octave-bug-tracker] [bug #61143] Functions sum and mean returns wrong answer for single precision input
Date: Sat, 11 Sep 2021 17:33:53 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

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

More:


octave:10> tic; sum(x, "double"); toc
Elapsed time is 0.0703928 seconds.
octave:11> tic; sum(x, "double"); toc
Elapsed time is 0.070359 seconds.
octave:12> tic; sum(x,"extra"); toc
Elapsed time is 0.0702491 seconds.
octave:13> tic; sum(x); toc
Elapsed time is 0.0703919 seconds.


So it looks to me that the easiest fix is to make "extra" 
to be a default algorithm for calculation and set the output 
type according to the explicit parameter.

Dmitri.
-- 


    _______________________________________________________

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]