name: scientific version: 0.3.6.2 id: scientific-0.3.6.2-Fh5KwhDTkJp3K2933gCxvC key: scientific-0.3.6.2-Fh5KwhDTkJp3K2933gCxvC license: BSD-3-Clause maintainer: Bas van Dijk author: Bas van Dijk homepage: https://github.com/basvandijk/scientific synopsis: Numbers represented using scientific notation description: "Data.Scientific" provides the number type 'Scientific'. Scientific numbers are arbitrary precision and space efficient. They are represented using . The implementation uses a coefficient @c :: 'Integer'@ and a base-10 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 . * Also, the space usage of converting scientific numbers with huge exponents to @'Integral's@ (like: 'Int') or @'RealFloat's@ (like: 'Double' or 'Float') will always be bounded by the target type. category: Data abi: 58cd7a09574eb2729a05d00613cce4fd exposed: True exposed-modules: Data.ByteString.Builder.Scientific Data.Scientific Data.Text.Lazy.Builder.Scientific hidden-modules: GHC.Integer.Compat Utils import-dirs: /var/lib/jenkins/workspace/JHCR/.cabal-sandbox/lib/x86_64-linux-ghc-8.6.3/scientific-0.3.6.2-Fh5KwhDTkJp3K2933gCxvC library-dirs: /var/lib/jenkins/workspace/JHCR/.cabal-sandbox/lib/x86_64-linux-ghc-8.6.3/scientific-0.3.6.2-Fh5KwhDTkJp3K2933gCxvC dynamic-library-dirs: /var/lib/jenkins/workspace/JHCR/.cabal-sandbox/lib/x86_64-linux-ghc-8.6.3 data-dir: /var/lib/jenkins/workspace/JHCR/.cabal-sandbox/share/x86_64-linux-ghc-8.6.3/scientific-0.3.6.2 hs-libraries: HSscientific-0.3.6.2-Fh5KwhDTkJp3K2933gCxvC depends: base-4.12.0.0 binary-0.8.6.0 bytestring-0.10.8.2 containers-0.6.0.1 deepseq-1.4.4.0 hashable-1.2.7.0-2SI038axTEd7AEZJ275kpi integer-gmp-1.0.2.0 integer-logarithms-1.0.2.2-33gHWvkkotvKqvHmbqy5m0 primitive-0.6.4.0-1mvPxVOk6Q6KOkWCZxqESf text-1.2.3.1 haddock-interfaces: /var/lib/jenkins/workspace/JHCR/.cabal-sandbox/share/doc/x86_64-linux-ghc-8.6.3/scientific-0.3.6.2/html/scientific.haddock haddock-html: /var/lib/jenkins/workspace/JHCR/.cabal-sandbox/share/doc/x86_64-linux-ghc-8.6.3/scientific-0.3.6.2/html