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

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

OK. Thanks. So a more sophisticated summation algorithm could help. For
example for the modification of OP's test case  
works fine:



x=single(100*ones(100e+6,1));
xx=reshape(x, 1e4, 1e4);
sum(sum(xx))
mean(mean(xx))



WWMD? 

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]