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:19:48 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

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

Here is some benchmarks on a Ryzen computer (with avx optimization):


octave:1> x=single(100*ones(100e+6,1));
octave:2> sum(x)
ans = 2.1475e+09
octave:3> sum(x,"extra")
ans = 1.0000e+10
octave:4> tic; sum(x); toc
Elapsed time is 0.068001 seconds.
octave:5> tic; sum(double(x)); toc
Elapsed time is 0.140945 seconds.
octave:6> tic; sum(x,"extra"); toc
Elapsed time is 0.0682781 seconds.
octave:7> tic; sum(double(x), "extra"); toc
Elapsed time is 0.182113 seconds.


The issue is that it is impossible at the moment to pass "extra" parameters to
the functions that use sum() internally.

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]