[Top][All Lists]

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

[Octave-bug-tracker] [bug #44272] dlmwrite makes inaccurate floating poi

From: Rik
Subject: [Octave-bug-tracker] [bug #44272] dlmwrite makes inaccurate floating point conversions
Date: Mon, 16 Feb 2015 15:30:49 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)

Update of bug #44272 (project octave):

                  Status:                    None => Wont Fix               
             Open/Closed:                    Open => Closed                 


Follow-up Comment #1:

This is a consequence of the limited precision that all IEEE-754 floating
point numbers have.  In Octave, for example, try

format long
x = 0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1
  x =  1.000000000000000
x - 1
  ans =   -1.11022302462516e-16

On the other hand,

x = dlmread ("test.csv")
  x =  66.5940000000000
x - 66.594
  ans = 0

So the limited precision precision works both ways with dlmwrite/dlmread.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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