[Haskell-cafe] How to round off frational number?

Sara Kenedy sarakenedy at gmail.com
Fri Sep 8 21:12:01 EDT 2006


Hello all,

I try to find some functions in Haskell library to deal with numeric
such that the result in the following format (but I did not find)
For example,
>1/3
0.33
>1/6
0.17
>8/3
2.67
>9/3
3.00

It seems a so "baby" question, but I really did not find the answer
after trying on that for some hours.
Thanks for any help.


More information about the Haskell-Cafe mailing list