[Top][All Lists]

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

fscanf accuracy for floats

From: gOS
Subject: fscanf accuracy for floats
Date: Thu, 3 Jan 2008 12:37:07 -0800 (PST)

I'm attempting to read in data from a file: (ex, -0.285121188808)

There are multiple columns in the file etc. And I'm able to import all of
the data into Octave. The problem is that -0.285121188808 becomes -0.28512
which is not precise enough for the calculations that need done with this
data. I can't seem to find anyway to make this more accurate. I've switched
between f,e, and g. I've tried multiple permutations of the format, and it
just isn't panning out. It's worth noting that in Matlab -0.28512 is
displayed on screen when printed, but the rest of the data is still there
(multiply by 10 for isntance and you get -2.285121). Octave yields -2.28512.

Is there a better way to do this, or does this qualify as a bug?

View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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