"Data.Scientific" provides the number type 'Scientific'. Scientific numbers are arbitrary precision and space efficient. They are represented using <http://en.wikipedia.org/wiki/Scientific_notation scientific notation>. The implementation uses a coefficient 'c :: 'Integer'' and a base10 exponent 'e :: 'Int''. A scientific number corresponds to the 'Fractional' number: ''fromInteger' c * 10 '^^' e'.
Note that since we're using an 'Int' to represent the exponent these numbers aren't truly arbitrary precision. I intend to change the type of the exponent to 'Integer' in a future release.
The main application of 'Scientific' is to be used as the target of parsing arbitrary precision numbers coming from an untrusted source. The advantages over using 'Rational' for this are that:
A 'Scientific' is more efficient to construct. Rational numbers need to be constructed using '%' which has to compute the 'gcd' of the 'numerator' and 'denominator'.
'Scientific' is safe against numbers with huge exponents. For example: '1e1000000000 :: 'Rational'' will fill up all space and crash your program. Scientific works as expected:
>>> read "1e1000000000" :: Scientific 1.0e1000000000
Package Version  Update ID  Released  Package Hub Version  Platforms  Subpackages 

0.3.4.43.1 info  openSUSE2016291  20160704  12 GASP5 


0.3.4.96.5 info  5585  20160914  12 GASP5 


0.3.4.96.9 info  5585  20160914  12 GASP5 


0.3.5.1bp150.2.4 info  GA Release  20180730  15 


0.3.5.1bp150.2.5 info  GA Release  20180731  15 


0.3.6.2bp151.1.10 info  GA Release  20190531  15 SP1 


0.3.6.2bp151.2.2 info  GA Release  20190717  15 SP1 


0.3.6.2bp152.4.15 info  GA Release  20200616  15 SP2 


0.3.6.2bp153.1.20 info  GA Release  20210408  15 SP3 

