bugGNU Octave - Bugs: bug #31135, Incorrect result when multiplicate...

 
 

bug #31135: Incorrect result when multiplicate two big numbers

Submitted by:  None
Submitted on:  Sun 26 Sep 2010 08:41:58 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: David CernyOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.3
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 26 Sep 2010 10:55:24 AM UTC, comment #1:

Read and understand the paper by Goldberg, "What every engineer should know about float-point arithmetic", which you can find at

http://www.validlab.com/goldberg/paper.ps

You have a difference in the 16th digit, which is the double precision machine precision. This is expected as Octave is not a CAS.

D.

David Bateman <dbateman>
Project Member
Sun 26 Sep 2010 08:41:58 AM UTC, original submission:

I've done my own script for multiplication of two big numbers. I wanted to check my result with result from octave, but I found out that octave is actually wrong.

Here are my tested numbers

a=29039049309956
b=9977777778

printf(" %1.30e ", a*b);

But I received wrong result from octave on ~16th digit.

this is result from octave
2.897451808991252274216960000000e+23
and this is result from ordinary calculator
2.897451808991252109577680000000e+23
^here starts difference

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dbateman (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 26 Sep 2010 10:55:24 AM UTCdbatemanStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1