2 <label id="sec:NumExts">
5 The <tt/NumExts/ interface collect together various numeric
6 operations that have proven to be commonly useful
9 -- Going between Doubles and Floats:
10 doubleToFloat :: Double -> Float
11 floatToDouble :: Float -> Double
13 showHex :: Integral a => a -> ShowS
14 showOct :: Integral a => a -> ShowS
20 If <tt/doubleToFloat/ is applied to a <tt/Double/ that is within
21 the representable range for <tt/Float/, the result may be the next
22 higher or lower representable <tt/Float/ value. If the <tt/Double/
23 is out of range, the result is undefined.
25 No loss of precision occurs in the other direction with
26 <tt/floatToDouble/, the floating value remains unchanged.
28 <tt/showOct/ and <tt/showHex/ will prefix <tt/0o/ and <tt/0x/
29 respectively. Like <tt/Numeric.showInt/, these show functions
30 work on positive numbers only.