Haskell: Force floats to have two decimals

Viewed 15787

Using the following code snippet:

(fromIntegral 100)/10.00

Using the Haskell '98 standard prelude, how do I represent the result with two decimals?

Thanks.

2 Answers

Just for the record:

import Numeric 
formatFloatN floatNum numOfDecimals = showFFloat (Just numOfDecimals) floatNum ""
Related