integer-gmp

Integer library based on GMP

Latest on Hackage:1.0.3.0

See all snapshots integer-gmp appears in

BSD-3-Clause licensed
Maintained by libraries@haskell.org

Module documentation for 0.5.1.0

This version can be pinned in stack with:integer-gmp-0.5.1.0@sha256:316da1299dadafcfd62e0797d619dcf911e77bf63579d1b39cb0d9e92b64c1ae,2357
  • GHC
    • GHC.Integer
      • GHC.Integer.GMP
        • GHC.Integer.GMP.Internals
        • GHC.Integer.GMP.Prim
      • GHC.Integer.Logarithms
        • GHC.Integer.Logarithms.Internals

This package provides the low-level implementation of the standard Integer type based on the GNU Multiple Precision Arithmetic Library (GMP).

This package provides access to the internal representation of Integer as well as primitive operations with no proper error handling, and should only be used directly with the utmost care.

For more details about the design of integer-gmp, see GHC Commentary: Libraries/Integer.

Changes

Changelog for integer-gmp package

0.5.1.0 Feb 2014

  • Bundled with GHC 7.8.1

  • Improved Haddock documentation

  • New PrimBool versions of comparison predicates in GHC.Integer:

    eqInteger# :: Integer -> Integer -> Int#
    geInteger# :: Integer -> Integer -> Int#
    gtInteger# :: Integer -> Integer -> Int#
    leInteger# :: Integer -> Integer -> Int#
    ltInteger# :: Integer -> Integer -> Int#
    neqInteger# :: Integer -> Integer -> Int#
    
  • New GHC.Integer.testBitInteger primitive for use with Data.Bits

  • Reduce short-lived heap allocation and try to demote J# back to S# more aggressively. See also #8647 for more details.

  • New GMP-specific binary (de)serialization primitives added to GHC.Integer.GMP.Internals:

    importIntegerFromByteArray
    importIntegerFromAddr
    exportIntegerToAddr
    exportIntegerToMutableByteArray
    sizeInBaseInteger
    
  • New GMP-implemented number-theoretic operations added to GHC.Integer.GMP.Internals:

    gcdExtInteger
    nextPrimeInteger
    testPrimeInteger
    powInteger
    powModInteger
    powModSecInteger
    recipModInteger