Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37047179
en ru br
ALT Linux repositórios
S:0.3.6.2-alt1

Group :: Desenvolvimento/Haskell
RPM: ghc8.6.4-scientific

 Principal   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

A versão atual: 0.3.6.2-alt1
Data da compilação: 18 junho 2019, 18:48 ( 249.4 weeks ago )
Tamanho:: 24.26 Kb

Home page:   https://github.com/basvandijk/scientific

Licença: BSD3
Sumário: Numbers represented using scientific notation
Descrição:

"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_notatio… scientific notation>. 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.

Mantenedor currente: Evgeny Sinelnikov

Lista dos contribuidores

Lista dos rpms provida por esta srpm:

  • ghc8.6.4-scientific
ACL:
     
    projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
    mantenedor atual: Michael Shigorin
    mantenedor da tradução: Fernando Martini aka fmartini © 2009