[Haskell-beginners] High precision doubles

Aaron MacDonald aaronjm at eastlink.ca
Wed Jun 24 19:46:04 EDT 2009


Is there anything in Haskell that can represent doubles with higher  
precision than the regular kind? I'm working with formulas that  
generate sets of values, and values that I know should be zero are  
ending up as things like -7.105427357601002e-15 or  
-1.7763568394002505e-14, which is causing all kinds of butterfly  
effects.

I've heard of Rational, but I need to also work with irrational  
numbers (namely, pi and anything that comes from cos and sin). What  
other options do I have?

- Aaron


More information about the Beginners mailing list