hgmp-0.1.1: Haskell interface to GMP

Safe HaskellNone
LanguageHaskell2010

Numeric.GMP.Raw.Unsafe

Contents

Description

Raw GMP foreign bindings, imported unsafe.

Synopsis

Types for Documentation

type SrcPtr = Ptr #

Integer Functions

Initialization Functions

mpz_init :: Ptr MPZ -> IO () #

mpz_clear :: Ptr MPZ -> IO () #

Assignment Functions

mpz_set :: Ptr MPZ -> SrcPtr MPZ -> IO () #

mpz_set_ui :: Ptr MPZ -> CULong -> IO () #

mpz_set_si :: Ptr MPZ -> CLong -> IO () #

mpz_set_d :: Ptr MPZ -> CDouble -> IO () #

mpz_set_q :: Ptr MPZ -> SrcPtr MPQ -> IO () #

mpz_set_f :: Ptr MPZ -> SrcPtr MPF -> IO () #

mpz_swap :: Ptr MPZ -> Ptr MPZ -> IO () #

Combined Initialization and Assignment Functions

Conversion Functions

Arithmetic Functions

mpz_add :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO () #

mpz_sub :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO () #

mpz_mul :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO () #

mpz_mul_si :: Ptr MPZ -> SrcPtr MPZ -> CLong -> IO () #

Division Functions

mpz_mod :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO () #

Exponentiation Functions

Root Extraction Functions

mpz_sqrt :: Ptr MPZ -> SrcPtr MPZ -> IO () #

Number Theoretic Functions

mpz_gcd :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO () #

mpz_gcdext :: Ptr MPZ -> Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO () #

mpz_lcm :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO () #

mpz_fac_ui :: Ptr MPZ -> CULong -> IO () #

mpz_fib_ui :: Ptr MPZ -> CULong -> IO () #

mpz_fib2_ui :: Ptr MPZ -> Ptr MPZ -> CULong -> IO () #

Comparison Functions

Logical and Bit Manipulation Functions

mpz_and :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO () #

mpz_ior :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO () #

mpz_xor :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO () #

mpz_com :: Ptr MPZ -> SrcPtr MPZ -> IO () #

Input and Output Functions

Random Number Functions

Integer Import and Export

mpz_import :: Ptr MPZ -> CSize -> CInt -> CSize -> CInt -> CSize -> Ptr a -> IO () #

mpz_export :: Ptr a -> Ptr CSize -> CInt -> CSize -> CInt -> CSize -> SrcPtr MPZ -> IO () #

Miscellaneous Functions

Special Functions

Rational Number Functions

Initialization and Assignment Functions

mpq_init :: Ptr MPQ -> IO () #

mpq_clear :: Ptr MPQ -> IO () #

mpq_set :: Ptr MPQ -> SrcPtr MPQ -> IO () #

mpq_set_z :: Ptr MPQ -> SrcPtr MPZ -> IO () #

mpq_set_ui :: Ptr MPQ -> CULong -> CULong -> IO () #

mpq_set_si :: Ptr MPQ -> CLong -> CULong -> IO () #

mpq_swap :: Ptr MPQ -> Ptr MPQ -> IO () #

Conversion Functions

mpq_set_d :: Ptr MPQ -> CDouble -> IO () #

mpq_set_f :: Ptr MPQ -> SrcPtr MPF -> IO () #

Arithmetic Functions

mpq_add :: Ptr MPQ -> SrcPtr MPQ -> SrcPtr MPQ -> IO () #

mpq_sub :: Ptr MPQ -> SrcPtr MPQ -> SrcPtr MPQ -> IO () #

mpq_mul :: Ptr MPQ -> SrcPtr MPQ -> SrcPtr MPQ -> IO () #

mpq_div :: Ptr MPQ -> SrcPtr MPQ -> SrcPtr MPQ -> IO () #

mpq_inv :: Ptr MPQ -> SrcPtr MPQ -> IO () #

Comparison Functions

Applying Integer Functions to Rationals

Input and Output Functions

Floating-point Functions

Initialization Functions

mpf_clear :: Ptr MPF -> IO () #

Assignment Functions

mpf_set :: Ptr MPF -> SrcPtr MPF -> IO () #

mpf_set_ui :: Ptr MPF -> CULong -> IO () #

mpf_set_si :: Ptr MPF -> CLong -> IO () #

mpf_set_d :: Ptr MPF -> CDouble -> IO () #

mpf_set_z :: Ptr MPF -> SrcPtr MPZ -> IO () #

mpf_set_q :: Ptr MPF -> SrcPtr MPQ -> IO () #

mpf_swap :: Ptr MPF -> Ptr MPF -> IO () #

Combined Initialization and Assignment Functions

Conversion Functions

Arithmetic Functions

mpf_add :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO () #

mpf_sub :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO () #

mpf_mul :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO () #

mpf_div :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO () #

mpf_sqrt :: Ptr MPF -> SrcPtr MPF -> IO () #

mpf_neg :: Ptr MPF -> SrcPtr MPF -> IO () #

mpf_abs :: Ptr MPF -> SrcPtr MPF -> IO () #

Comparison Functions

Input and Output Functions

Miscellaneous Functions

mpf_ceil :: Ptr MPF -> SrcPtr MPF -> IO () #

mpf_floor :: Ptr MPF -> SrcPtr MPF -> IO () #

mpf_trunc :: Ptr MPF -> SrcPtr MPF -> IO () #

mpf_random2 :: Ptr MPF -> MPSize -> MPExp -> IO () #

Random Number Functions

Random State Initialization

Random State Seeding

Random State Miscellaneous

Low-level Functions