octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61041] Sum behaves unexpectedly for large uin


From: anonymous
Subject: [Octave-bug-tracker] [bug #61041] Sum behaves unexpectedly for large uint64 values when not using native mode
Date: Sat, 14 Aug 2021 13:56:01 -0400 (EDT)
User-agent: Mozilla/5.0 (Android 8.0.0; Mobile; rv:91.0) Gecko/91.0 Firefox/91.0

URL:
  <https://savannah.gnu.org/bugs/?61041>

                 Summary: Sum behaves unexpectedly for large uint64 values
when not using native mode
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sat 14 Aug 2021 05:55:59 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Foo is a uint64 vector of length 88 million, whose values are all in the range
0 to 2**41. The sum of those numbers in foo comes to about 4.3e17 and is an
integer, so using sum(foo,"native") is very much warranted to avoid rounding
problems with converting uint64 to double and back.

The unexpected behavior is that the relative difference between sum(foo) and
sum(foo,"native") is about 90*eps, not close to eps like expected but two
orders of magnitude larger. Is this an expected discrepancy for sum without
using native mode? If so, it's not a bug. If it's unexpected for you too, it
might warrant looking into why it's so big.

This was on Octave 7 with OpenBlas 3.17.




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]