[bug #61143] sum of single precision numbers hits precision limit due to naive summation

Andreas Bertsatos <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Update of bug #61143 (group octave):

             Open/Closed:                    Open => Closed
           Fixed Release:                    None => 11.1.0 (current stable)

    _______________________________________________________

Follow-up Comment #36:

This has been fixed in Octave 11, with the relevant updates to the core
statistics functions.

octave:1> x=single(100*ones(100e+6,1));
octave:2> sum(x,'double')
ans = 1.0000e+10
octave:3> mean(x, 'double')
ans = 100
octave:4> mean(x)
ans = 100

Closing report.


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaZGoQgAKCRCqLAuaBUf3
TiqqAP4uUBrra3oVyo/p1Vh1R/l11paUG8m630ZSYqYN/cKSVgEAipIGsP8ML6X2
Rk/mkiuN/2hYPojSv6TlTb25vpFCcQw=
=3Hyg
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.