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

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

[Octave-bug-tracker] [bug #32991] Incorrect result, product of bignumber


From: Pedro Quaresma
Subject: [Octave-bug-tracker] [bug #32991] Incorrect result, product of bignumbers
Date: Mon, 04 Apr 2011 10:23:27 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; pt-PT; rv:1.9.1.17) Gecko/20110302 Iceweasel/3.5.17 (like Firefox/3.5.17)

URL:
  <http://savannah.gnu.org/bugs/?32991>

                 Summary: Incorrect result, product of bignumbers
                 Project: GNU Octave
            Submitted by: pedroquaresma
            Submitted on: Seg 04 Abr 2011 10:23:26 GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Pedro Quaresma
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.2.4
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Given the commands

octave:2> format long
octave:3> 322426889*404781269
ans =  130512365289142144

the correct result is 130512365289142141

The result is obviously wrong 9x9=81 so the product cannot end with a 4.

And if I do

octave:4> 130512365289142141/322426889
ans =  404781269
octave:5> 130512365289142141/404781269
ans =  322426889

Is it a problem of overflow? It is strange, the two results differ by 3.

Pedro Quaresma
University of Coimbra, Portugal






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32991>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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