[Haskell-beginners] How to improve the accuracy of floating point calculation?
hollister at fafoh.com
Tue Feb 5 23:52:34 CET 2013
The issue is that floating point numbers are really not precise.
This is not inherent to Haskell in particular - any given computer (and programming language) is subject to lack of precision for floating point numbers. You can take a look at the wikipedia entry (http://en.wikipedia.org/wiki/Floating_point_numbers).
If you want a really "meaty" description of the issues involved, take a look at Knuth's "Seminumerical Algorithms".
On Feb 5, 2013, at 4:41 PM, yi lu wrote:
> I found that in ghci, I input
> and run, I get a result of
> But, as you know, it is not the exact answer.
> So, I wonder if there is something I can do to achieve a better performance and get [0.1,0.2,0.3,0.4..] as the result.
> Beginners mailing list
> Beginners at haskell.org
More information about the Beginners