problem with Double and Rational Number

Posted by altair211 on Stack Overflow See other posts from Stack Overflow or by altair211
Published on 2010-04-01T00:28:04Z Indexed on 2010/04/01 0:33 UTC
Read the original article Hit count: 273

Filed under:

Hi, I am writing a function in which I need to read a string contains floating point number and turn it back to Rational. But When I do toRational (read input :: Double), it will not turn for eg: 0.9 into 9 % 10 as expected, but instead 81..... % 9007... Thx

© Stack Overflow or respective owner

Related posts about haskell