./math/hs-scientific, Numbers represented using scientific notation

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]

Branch: CURRENT, Version:, Package name: hs-scientific-, Maintainer: szptvlfn

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.

Required to run:
[devel/hs-hashable] [devel/hs-primitive] [math/hs-integer-logarithms] [lang/ghc88]

Required to build:

Master sites:

SHA1: ae0dcfaf9f4087e6147d1acb69a7deb826b85702
RMD160: 8dd3b320db88ed7a239197ec212e221c584ecfa3
Filesize: 22.959 KB

Version history: (Expand)

CVS history: (Expand)

   2020-01-11 10:32:03 by Masatake Daimon | Files touched by this commit (2)
Log message:
Remove dependency on devel/hs-text

It's now part of GHC.
Also fail and semigroups are no longer required as of GHC 8.
   2019-12-31 18:27:24 by Masatake Daimon | Files touched by this commit (2)
Log message:
Add missing dependency on devel/hs-primitive
   2019-12-31 15:10:51 by Masatake Daimon | Files touched by this commit (4) | Package updated
Log message:
Update to scientific-
* Due to a regression introduced in the RealFrac methods and
  floatingOrInteger became vulnerable to a space blowup when applied
  to scientifics with huge exponents. This has now been fixed again.
* Fix build on GHC < 8.
* Make the methods of the Hashable, Eq and Ord instances safe to use
  when applied to scientific numbers coming from untrusted
  sources. Previously these methods first converted their arguments to
  Rational before applying the operation. This is unsafe because
  converting a Scientific to a Rational could fill up all space and
  crash your program when the Scientific has a huge base10Exponent.

  Do note that the hash computation of the Hashable Scientific
  instance has been changed because of this improvement!

  Thanks to Tom Sydney Kerckhove (@NorfairKing) for pushing me to fix

* fromRational :: Rational -> Scientific now throws an error instead
  of diverging when applied to a repeating decimal. This does mean it
  will consume space linear in the number of digits of the resulting
  scientific. This makes "fromRational" and the other Fractional
  methods "recip" and "/" a bit safer to use.

* To get the old unsafe but more efficient behaviour the following
  function was added: unsafeFromRational :: Rational -> Scientific.

* Add alternatives for fromRationalRepetend:

      :: Int -- ^ limit
      -> Rational
      -> Either (Scientific, Rational)
            (Scientific, Maybe Int)


      :: Rational -> (Scientific, Maybe Int)

  Thanks to Ian Jeffries (@seagreen) for the idea.
* Dropped upper version bounds of dependencies because it's to much
  work to maintain.
* Remove unused ghc-prim dependency.
* Added unit tests for read and scientificP
* Replace use of Vector from vector with Array from primitive.
* Export scientificP :: ReadP Scientific
  (Courtesy of Shlok Datye @shlok)
* Fix build for base < 4.8.
* Some minor performance improvements.
* Support criterion-1.2
* Support base-4.10
* Support tasty-ant-xml-1.1.0
* Tighten lower bound on vector from 0.5 to 0.7 because building with
  vector < 0.7 results in a build error.

* Move the internal modules Math.NumberTheory.Logarithms and
  GHC.Integer.Logarithms.Compat to their own package
  integer-logarithms so other people can share that code.
* Support QuickCheck-2.9.
* Make bytestring-builder's installation conditional based on a Cabal flag.
* Unconditionally export Data.ByteString.Builder.Scientific. The
  bytestring-builder cabal flag has been removed. Depend on
  bytestring-builder for backwards compatibility for GHC < 7.8.
* Made toDecimalDigits more similar to floatToDigits

    toDecimalDigits 0 == ([0],1)

    toDecimalDigits 0 == ([0],0)

    Numeric.floatToDigits 10 (0 :: Double) == ([0],0)

* Introduce a special case for 0 in fromFloatDigits

    fromFloatDigits 0 = 0

  This should fix https://github.com/bos/aeson/issues/369
* The following are all a courtesy of Oleg Grenrus (phadej):
  * Support GHC-8.0.1
  * Support binary-0.8
  * Enable Travis continuous integration
* Improved performance of toDecimalDigits by 13%.
* Fix build with integer-simple.
* Fix build on GHC-7.4. Courtesy of Adam Bergmark..
* Fix build on GHC-7.0.4
* Added fromRationalRepetend & toRationalRepetend for safely
  converting from and to rationals which have a repeating decimal
  representation like:
  1 % 28 = 0.03(571428).
* Added a Binary instance.
* Various performance improvements.
* Support vector-0.11
* Support tasty-0.11
* Support criterion-
* Support QuickCheck-2.8.
* Fixed both the

      Prelude Data.Scientific> reads "0.0" :: \ 

  problem and the

      read " 8" :: Scientific fails, while read " 8" :: \ 
Double succeeds

  problem. Courtesy of neongreen.
* Fixed bug in the x / y method for Scientific. Since I was using the
  default implementation: `x * recip y` the operation would diverge
  when `recip y` had an infinite decimal output. This shouldn't happen
  when the result of / is finite again. For example: 0.6 / 0.3 should
  yield 2.0.

  This is now fixed by using the following implementation:

  `x / y = fromRational $ toRational x / toRational y`
   2016-01-10 12:49:11 by Ryosuke Moro | Files touched by this commit (48) | Package updated
Log message:
Bump PKGREVISION for hs-text- || hs-hashable-
   2015-11-04 00:33:46 by Alistair G. Crooks | Files touched by this commit (262)
Log message:
Add SHA512 digests for distfiles for math category

Problems found locating distfiles:
	Package dfftpack: missing distfile dfftpack-20001209.tar.gz
	Package eispack: missing distfile eispack-20001130.tar.gz
	Package fftpack: missing distfile fftpack-20001130.tar.gz
	Package linpack: missing distfile linpack-20010510.tar.gz
	Package minpack: missing distfile minpack-20001130.tar.gz
	Package odepack: missing distfile odepack-20001130.tar.gz
	Package py-networkx: missing distfile networkx-1.10.tar.gz
	Package py-sympy: missing distfile sympy-
	Package quadpack: missing distfile quadpack-20001130.tar.gz

Otherwise, existing SHA1 digests verified and found to be the same on
the machine holding the existing distfiles (morden).  All existing
SHA1 digests retained for now as an audit trail.
   2015-08-02 13:27:06 by Ryosuke Moro | Files touched by this commit (44) | Package updated
Log message:
Bump PKGREVISION for hs-text-
   2015-06-08 22:56:15 by Ryosuke Moro | Files touched by this commit (25) | Package updated
Log message:
Bump PKGREVISION for hs-hashable-
   2015-06-04 22:09:00 by Ryosuke Moro | Files touched by this commit (50) | Package updated
Log message:
Bump PKGREVISION for hs-text-