The scientific package

[Tags: bsd3, library]

Data.Scientific provides a space efficient and arbitrary precision scientific number type.

Scientific numbers are represented using scientific notation. It uses a coefficient c :: Integer and a base-10 exponent e :: Int (do note that since we're using an Int to represent the exponent these numbers aren't truly arbitrary precision). A scientific number corresponds to the Fractional number: fromInteger c * 10 ^^ e.

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:

 > read "1e1000000000" :: Scientific
 1.0e1000000000

Properties

Versions0.0.0.0, 0.0.0.1, 0.0.0.2, 0.1.0.0, 0.1.0.1, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.3.0.0, 0.3.0.1, 0.3.0.2, 0.3.1.0, 0.3.2.0, 0.3.2.1, 0.3.2.2, 0.3.3.0
Dependenciesarray (>=0.1 && <0.6), base (>=4.3 && <4.8), deepseq (==1.3.*), ghc-prim, hashable (>=1.1.2 && <1.3), integer-gmp, text (>=0.8 && <1.3) or
array (>=0.1 && <0.6), base (>=4.3 && <4.8), deepseq (==1.3.*), ghc-prim, hashable (>=1.1.2 && <1.3), integer-simple, text (>=0.8 && <1.3)
LicenseBSD3
AuthorBas van Dijk
MaintainerBas van Dijk <v.dijk.bas@gmail.com>
CategoryData
Home pagehttps://github.com/basvandijk/scientific
Bug trackerhttps://github.com/basvandijk/scientific/issues
Source repositoryhead: git clone git://github.com/basvandijk/scientific.git
Upload dateSat Jul 12 20:16:02 UTC 2014
Uploaded byBasVanDijk
DistributionsDebian:0.2.0.2, Fedora:0.3.2.1, NixOS:0.3.3.0
Downloads99272 total (17753 in last 30 days)

Modules

[Index]

Flags

NameDescriptionDefault
bytestring-builderProvide the Data.ByteString.Builder.Scientific module (requires bytestring >= 0.10)Enabled
integer-simpleUse the integer-simple package instead of integer-gmpDisabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainers' corner

For package maintainers and hackage trustees