On Aug 4, 2010, at 11:30 AM, Omari Norman wrote:
Why is toRational a method of Real? I thought that real numbers need
not
be rational, such as the square root of two. Wouldn't it make more
sense
to have some sort of Rational typeclass with this method? Thanks.
You can't build the real number field using a computer. So you have
to turn what "should" be a real into something you can express on a
computer. You can either choose to use the field of "computable real
numbers", which is slow, or you can just go with a "near enough"
rational approximation.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe