[Haskell-cafe] How to round off frational number?
rootbeer at redcat.com
Fri Sep 8 22:27:29 EDT 2006
On 9/8/06, Sara Kenedy <sarakenedy at gmail.com> wrote:
> 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,
You're talking about a number-to-string conversion, right?
You probably want showFFloat, from the Numeric module. There's also
the Text.Printf module. Or you could write your own display code; but
it's tricky to get it right for every possible case.
Hope this helps!
More information about the Haskell-Cafe