Numbers in Haskell are complicated because in the Haskell world there are many different kinds of number, including:
Intlimited-precision integers in at least the range
[−229, 229). Integer overflow is not detected.
Rationalarbitrary-precision rational numbers
Floatsingle-precision floating-point numbers
Doubledouble-precision floating-point numbers
Complexcomplex numbers (defined in Data.Complex)
Most programs make use of numbers in one way or another, so we have to get at least a working idea of what Haskell offers us and how to convert between the different kinds. That is what the present chapter is about.
In Haskell all numbers are instances of the type class ...