scientific: Numbers represented using scientific notation

[ bsd3, data, library ] [ Propose Tags ]
Change log changelog
Dependencies array (>=0.1 && <0.6), base (>=4.3 && <4.9), bytestring (==0.10.*), deepseq (>=1.3 && <1.5), ghc‑prim, hashable (>=1.1.2 && <1.3), integer‑gmp, integer‑simple, text (>=0.8 && <1.3) [details]
License BSD-3-Clause
Author Bas van Dijk
Maintainer Bas van Dijk <>
Category Data
Home page
Bug tracker
Source repo head: git clone git://
Uploaded by BasVanDijk at Thu Mar 19 08:28:05 UTC 2015
Distributions Arch:, Debian:, Fedora:, FreeBSD:, LTSHaskell:, NixOS:, Stackage:, openSUSE:
Downloads 330431 total (656 in the last 30 days)
Rating 1.75 (votes: 2) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-03-19 [all 1 reports]
Hackage Matrix CI

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





Provide the Data.ByteString.Builder.Scientific module (requires bytestring >= 0.10)


Use the integer-simple package instead of integer-gmp


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


Maintainer's Corner

For package maintainers and hackage trustees