-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Haskell interface to GMP
--   
--   Types and instances, and marshalling between Integer and Rational and
--   the corresponding GMP types, along with raw foreign imports of GMP
--   functions. Allows FFI to GMP code (whether in GMP itself or in
--   third-party code that uses GMP).
--   
--   Supports only GHC with integer-gmp or ghc-bignum, this might change if
--   there's any demand.
@package hgmp
@version 0.1.2.1

-- | GMP types.
module Numeric.GMP.Types

-- | 
--   mpz_t
--   
data MPZ
MPZ :: !CInt -> !CInt -> !Ptr MPLimb -> MPZ
[mpzAlloc] :: MPZ -> !CInt
[mpzSize] :: MPZ -> !CInt
[mpzD] :: MPZ -> !Ptr MPLimb

-- | 
--   mpq_t
--   
data MPQ
MPQ :: !MPZ -> !MPZ -> MPQ
[mpqNum] :: MPQ -> !MPZ
[mpqDen] :: MPQ -> !MPZ

-- | Get pointers to numerator and denominator (these are macros in the C
--   API).
mpq_numref :: Ptr MPQ -> Ptr MPZ

-- | Get pointers to numerator and denominator (these are macros in the C
--   API).
mpq_denref :: Ptr MPQ -> Ptr MPZ

-- | 
--   mpf_t
--   
data MPF
MPF :: !CInt -> !CInt -> !MPExp -> !Ptr MPLimb -> MPF
[mpfPrec] :: MPF -> !CInt
[mpfSize] :: MPF -> !CInt
[mpfExp] :: MPF -> !MPExp
[mpfD] :: MPF -> !Ptr MPLimb

-- | 
--   gmp_randstate_t
--   
data GMPRandState
GMPRandState :: !MPZ -> !GMPRandAlg -> !Ptr () -> GMPRandState
[gmprsSeed] :: GMPRandState -> !MPZ
[gmprsAlg] :: GMPRandState -> !GMPRandAlg
[gmprsAlgData] :: GMPRandState -> !Ptr ()

-- | 
--   mp_limb_t
--   
newtype MPLimb
MPLimb :: Word64 -> MPLimb

-- | 
--   mp_limb_signed_t
--   
newtype MPLimbSigned
MPLimbSigned :: Int64 -> MPLimbSigned

-- | 
--   mp_size_t
--   
newtype MPSize
MPSize :: Int64 -> MPSize

-- | 
--   mp_exp_t
--   
newtype MPExp
MPExp :: Int64 -> MPExp

-- | 
--   mp_bitcnt_t
--   
newtype MPBitCnt
MPBitCnt :: Word64 -> MPBitCnt

-- | 
--   gmp_randalg_t
--   
newtype GMPRandAlg
GMPRandAlg :: Word32 -> GMPRandAlg
instance Foreign.Storable.Storable Numeric.GMP.Types.MPLimb
instance Data.Data.Data Numeric.GMP.Types.MPLimb
instance GHC.Bits.FiniteBits Numeric.GMP.Types.MPLimb
instance GHC.Bits.Bits Numeric.GMP.Types.MPLimb
instance GHC.Ix.Ix Numeric.GMP.Types.MPLimb
instance GHC.Real.Real Numeric.GMP.Types.MPLimb
instance GHC.Real.Integral Numeric.GMP.Types.MPLimb
instance GHC.Num.Num Numeric.GMP.Types.MPLimb
instance GHC.Enum.Bounded Numeric.GMP.Types.MPLimb
instance GHC.Enum.Enum Numeric.GMP.Types.MPLimb
instance GHC.Show.Show Numeric.GMP.Types.MPLimb
instance GHC.Read.Read Numeric.GMP.Types.MPLimb
instance GHC.Classes.Ord Numeric.GMP.Types.MPLimb
instance GHC.Classes.Eq Numeric.GMP.Types.MPLimb
instance Foreign.Storable.Storable Numeric.GMP.Types.MPLimbSigned
instance Data.Data.Data Numeric.GMP.Types.MPLimbSigned
instance GHC.Bits.FiniteBits Numeric.GMP.Types.MPLimbSigned
instance GHC.Bits.Bits Numeric.GMP.Types.MPLimbSigned
instance GHC.Ix.Ix Numeric.GMP.Types.MPLimbSigned
instance GHC.Real.Real Numeric.GMP.Types.MPLimbSigned
instance GHC.Real.Integral Numeric.GMP.Types.MPLimbSigned
instance GHC.Num.Num Numeric.GMP.Types.MPLimbSigned
instance GHC.Enum.Bounded Numeric.GMP.Types.MPLimbSigned
instance GHC.Enum.Enum Numeric.GMP.Types.MPLimbSigned
instance GHC.Show.Show Numeric.GMP.Types.MPLimbSigned
instance GHC.Read.Read Numeric.GMP.Types.MPLimbSigned
instance GHC.Classes.Ord Numeric.GMP.Types.MPLimbSigned
instance GHC.Classes.Eq Numeric.GMP.Types.MPLimbSigned
instance Foreign.Storable.Storable Numeric.GMP.Types.MPSize
instance Data.Data.Data Numeric.GMP.Types.MPSize
instance GHC.Bits.FiniteBits Numeric.GMP.Types.MPSize
instance GHC.Bits.Bits Numeric.GMP.Types.MPSize
instance GHC.Ix.Ix Numeric.GMP.Types.MPSize
instance GHC.Real.Real Numeric.GMP.Types.MPSize
instance GHC.Real.Integral Numeric.GMP.Types.MPSize
instance GHC.Num.Num Numeric.GMP.Types.MPSize
instance GHC.Enum.Bounded Numeric.GMP.Types.MPSize
instance GHC.Enum.Enum Numeric.GMP.Types.MPSize
instance GHC.Show.Show Numeric.GMP.Types.MPSize
instance GHC.Read.Read Numeric.GMP.Types.MPSize
instance GHC.Classes.Ord Numeric.GMP.Types.MPSize
instance GHC.Classes.Eq Numeric.GMP.Types.MPSize
instance Foreign.Storable.Storable Numeric.GMP.Types.MPExp
instance Data.Data.Data Numeric.GMP.Types.MPExp
instance GHC.Bits.FiniteBits Numeric.GMP.Types.MPExp
instance GHC.Bits.Bits Numeric.GMP.Types.MPExp
instance GHC.Ix.Ix Numeric.GMP.Types.MPExp
instance GHC.Real.Real Numeric.GMP.Types.MPExp
instance GHC.Real.Integral Numeric.GMP.Types.MPExp
instance GHC.Num.Num Numeric.GMP.Types.MPExp
instance GHC.Enum.Bounded Numeric.GMP.Types.MPExp
instance GHC.Enum.Enum Numeric.GMP.Types.MPExp
instance GHC.Show.Show Numeric.GMP.Types.MPExp
instance GHC.Read.Read Numeric.GMP.Types.MPExp
instance GHC.Classes.Ord Numeric.GMP.Types.MPExp
instance GHC.Classes.Eq Numeric.GMP.Types.MPExp
instance Foreign.Storable.Storable Numeric.GMP.Types.MPBitCnt
instance Data.Data.Data Numeric.GMP.Types.MPBitCnt
instance GHC.Bits.FiniteBits Numeric.GMP.Types.MPBitCnt
instance GHC.Bits.Bits Numeric.GMP.Types.MPBitCnt
instance GHC.Ix.Ix Numeric.GMP.Types.MPBitCnt
instance GHC.Real.Real Numeric.GMP.Types.MPBitCnt
instance GHC.Real.Integral Numeric.GMP.Types.MPBitCnt
instance GHC.Num.Num Numeric.GMP.Types.MPBitCnt
instance GHC.Enum.Bounded Numeric.GMP.Types.MPBitCnt
instance GHC.Enum.Enum Numeric.GMP.Types.MPBitCnt
instance GHC.Show.Show Numeric.GMP.Types.MPBitCnt
instance GHC.Read.Read Numeric.GMP.Types.MPBitCnt
instance GHC.Classes.Ord Numeric.GMP.Types.MPBitCnt
instance GHC.Classes.Eq Numeric.GMP.Types.MPBitCnt
instance Foreign.Storable.Storable Numeric.GMP.Types.GMPRandAlg
instance Data.Data.Data Numeric.GMP.Types.GMPRandAlg
instance GHC.Bits.FiniteBits Numeric.GMP.Types.GMPRandAlg
instance GHC.Bits.Bits Numeric.GMP.Types.GMPRandAlg
instance GHC.Ix.Ix Numeric.GMP.Types.GMPRandAlg
instance GHC.Real.Real Numeric.GMP.Types.GMPRandAlg
instance GHC.Real.Integral Numeric.GMP.Types.GMPRandAlg
instance GHC.Num.Num Numeric.GMP.Types.GMPRandAlg
instance GHC.Enum.Bounded Numeric.GMP.Types.GMPRandAlg
instance GHC.Enum.Enum Numeric.GMP.Types.GMPRandAlg
instance GHC.Show.Show Numeric.GMP.Types.GMPRandAlg
instance GHC.Read.Read Numeric.GMP.Types.GMPRandAlg
instance GHC.Classes.Ord Numeric.GMP.Types.GMPRandAlg
instance GHC.Classes.Eq Numeric.GMP.Types.GMPRandAlg
instance Foreign.Storable.Storable Numeric.GMP.Types.GMPRandState
instance Foreign.Storable.Storable Numeric.GMP.Types.MPF
instance Foreign.Storable.Storable Numeric.GMP.Types.MPQ
instance Foreign.Storable.Storable Numeric.GMP.Types.MPZ

-- | Raw GMP foreign bindings, imported unsafe.
module Numeric.GMP.Raw.Unsafe
type SrcPtr = Ptr
type VolatilePtr = Ptr
type VolatileSrcPtr = Ptr
mpz_init :: Ptr MPZ -> IO ()
mpz_init2 :: Ptr MPZ -> MPBitCnt -> IO ()
mpz_clear :: Ptr MPZ -> IO ()
mpz_realloc2 :: Ptr MPZ -> MPBitCnt -> IO ()
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_set_str :: Ptr MPZ -> SrcPtr CChar -> CInt -> IO CInt
mpz_swap :: Ptr MPZ -> Ptr MPZ -> IO ()
mpz_init_set :: Ptr MPZ -> SrcPtr MPZ -> IO ()
mpz_init_set_ui :: Ptr MPZ -> CULong -> IO ()
mpz_init_set_si :: Ptr MPZ -> CLong -> IO ()
mpz_init_set_d :: Ptr MPZ -> CDouble -> IO ()
mpz_init_set_str :: Ptr MPZ -> SrcPtr CChar -> CInt -> IO CInt
mpz_get_ui :: SrcPtr MPZ -> IO CLong
mpz_get_si :: SrcPtr MPZ -> IO CLong
mpz_get_d :: SrcPtr MPZ -> IO CDouble
mpz_get_d_2exp :: Ptr CLong -> SrcPtr MPZ -> IO CDouble
mpz_get_str :: Ptr CChar -> CInt -> SrcPtr MPZ -> IO CChar
mpz_add :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_add_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_sub :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_sub_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_ui_sub :: Ptr MPZ -> CULong -> SrcPtr MPZ -> IO ()
mpz_mul :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_mul_si :: Ptr MPZ -> SrcPtr MPZ -> CLong -> IO ()
mpz_mul_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_addmul :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_addmul_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_submul :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_submul_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_mul_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_cdiv_q :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_cdiv_r :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_cdiv_qr :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_cdiv_q_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_cdiv_r_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_cdiv_qr_ui :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_cdiv_ui :: SrcPtr MPZ -> CULong -> IO CULong
mpz_cdiv_q_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_cdiv_r_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_fdiv_q :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_fdiv_r :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_fdiv_qr :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_fdiv_q_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_fdiv_r_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_fdiv_qr_ui :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_fdiv_ui :: SrcPtr MPZ -> CULong -> IO CULong
mpz_fdiv_r_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_fdiv_q_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_tdiv_q :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_tdiv_r :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_tdiv_qr :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_tdiv_q_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_tdiv_r_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_tdiv_qr_ui :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_tdiv_ui :: SrcPtr MPZ -> CULong -> IO CULong
mpz_tdiv_q_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_tdiv_r_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_mod :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_divexact :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_divexact_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_divisible_p :: SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_divisible_ui_p :: SrcPtr MPZ -> CULong -> IO CInt
mpz_divisible_2exp_p :: SrcPtr MPZ -> MPBitCnt -> IO CInt
mpz_congruent_p :: SrcPtr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_congruent_ui_p :: SrcPtr MPZ -> CULong -> CULong -> IO CInt
mpz_congruent_2exp_p :: SrcPtr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO CInt
mpz_powm :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_powm_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> SrcPtr MPZ -> IO ()
mpz_powm_sec :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_pow_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_ui_pow_ui :: Ptr MPZ -> CULong -> CULong -> IO ()
mpz_root :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CInt
mpz_rootrem :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_sqrt :: Ptr MPZ -> SrcPtr MPZ -> IO ()
mpz_sqrtrem :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> IO ()
mpz_perfect_power_p :: SrcPtr MPZ -> IO CInt
mpz_probab_prime_p :: SrcPtr MPZ -> CInt -> IO CInt
mpz_nextprime :: Ptr MPZ -> SrcPtr MPZ -> IO ()
mpz_gcd :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_gcd_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_gcdext :: Ptr MPZ -> Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_lcm :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_lcm_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_invert :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_jacobi :: SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_kronecker_si :: SrcPtr MPZ -> CLong -> IO CInt
mpz_kronecker_ui :: SrcPtr MPZ -> CULong -> IO CInt
mpz_si_kronecker :: CLong -> SrcPtr MPZ -> IO CInt
mpz_ui_kronecker :: CULong -> SrcPtr MPZ -> IO CInt
mpz_remove :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO MPBitCnt
mpz_fac_ui :: Ptr MPZ -> CULong -> IO ()
mpz_2fac_ui :: Ptr MPZ -> CULong -> IO ()
mpz_mfac_uiui :: Ptr MPZ -> CULong -> CULong -> IO ()
mpz_primorial_ui :: Ptr MPZ -> CULong -> IO ()
mpz_bin_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_bin_uiui :: Ptr MPZ -> CULong -> CULong -> IO ()
mpz_fib_ui :: Ptr MPZ -> CULong -> IO ()
mpz_fib2_ui :: Ptr MPZ -> Ptr MPZ -> CULong -> IO ()
mpz_lucnum_ui :: Ptr MPZ -> CULong -> IO ()
mpz_lucnum2_ui :: Ptr MPZ -> Ptr MPZ -> CULong -> IO ()
mpz_cmp :: SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_cmp_d :: SrcPtr MPZ -> CDouble -> IO CInt
mpz_cmp_si :: SrcPtr MPZ -> CLong -> IO CInt
mpz_cmp_ui :: SrcPtr MPZ -> CULong -> IO CInt
mpz_cmpabs :: SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_cmpabs_d :: SrcPtr MPZ -> CDouble -> IO CInt
mpz_cmpabs_ui :: SrcPtr MPZ -> CULong -> IO CInt
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 ()
mpz_hamdist :: SrcPtr MPZ -> SrcPtr MPZ -> IO MPBitCnt
mpz_scan0 :: SrcPtr MPZ -> MPBitCnt -> IO MPBitCnt
mpz_scan1 :: SrcPtr MPZ -> MPBitCnt -> IO MPBitCnt
mpz_setbit :: Ptr MPZ -> MPBitCnt -> IO ()
mpz_clrbit :: Ptr MPZ -> MPBitCnt -> IO ()
mpz_combit :: Ptr MPZ -> MPBitCnt -> IO ()
mpz_tstbit :: SrcPtr MPZ -> MPBitCnt -> IO CInt
mpz_out_str :: Ptr CFile -> CInt -> SrcPtr MPZ -> IO CSize
mpz_inp_str :: Ptr MPZ -> Ptr CFile -> CInt -> IO CSize
mpz_out_raw :: Ptr CFile -> SrcPtr MPZ -> IO CSize
mpz_inp_raw :: Ptr MPZ -> Ptr CFile -> IO CSize
mpz_urandomb :: Ptr MPZ -> Ptr GMPRandState -> MPBitCnt -> IO ()
mpz_urandomm :: Ptr MPZ -> Ptr GMPRandState -> SrcPtr MPZ -> IO ()
mpz_rrandomb :: Ptr MPZ -> Ptr GMPRandState -> MPBitCnt -> IO ()
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 ()
mpz_fits_slong_p :: SrcPtr MPZ -> IO CInt
mpz_fits_sint_p :: SrcPtr MPZ -> IO CInt
mpz_fits_sshort_p :: SrcPtr MPZ -> IO CInt
mpz_sizeinbase :: SrcPtr MPZ -> CInt -> IO CSize
mpz_realloc :: Ptr MPZ -> MPSize -> IO ()
mpz_limbs_read :: SrcPtr MPZ -> IO (SrcPtr MPLimb)
mpz_limbs_write :: Ptr MPZ -> MPSize -> IO (Ptr MPLimb)
mpz_limbs_modify :: Ptr MPZ -> MPSize -> IO (Ptr MPLimb)
mpz_limbs_finish :: Ptr MPZ -> MPSize -> IO ()
mpz_roinit_n :: Ptr MPZ -> SrcPtr MPLimb -> MPSize -> IO (SrcPtr MPZ)
mpq_canonicalize :: Ptr MPQ -> IO ()
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_set_str :: Ptr MPQ -> SrcPtr CChar -> CInt -> IO CInt
mpq_swap :: Ptr MPQ -> Ptr MPQ -> IO ()
mpq_get_d :: SrcPtr MPQ -> IO CDouble
mpq_set_d :: Ptr MPQ -> CDouble -> IO ()
mpq_set_f :: Ptr MPQ -> SrcPtr MPF -> IO ()
mpq_get_str :: Ptr CChar -> CInt -> SrcPtr MPQ -> IO (Ptr CChar)
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_mul_2exp :: Ptr MPQ -> SrcPtr MPQ -> MPBitCnt -> IO ()
mpq_div :: Ptr MPQ -> SrcPtr MPQ -> SrcPtr MPQ -> IO ()
mpq_div_2exp :: Ptr MPQ -> SrcPtr MPQ -> MPBitCnt -> IO ()
mpq_inv :: Ptr MPQ -> SrcPtr MPQ -> IO ()
mpq_cmp :: SrcPtr MPQ -> SrcPtr MPQ -> IO CInt
mpq_cmp_z :: SrcPtr MPQ -> SrcPtr MPZ -> IO CInt
mpq_cmp_ui :: SrcPtr MPQ -> CULong -> CULong -> IO CInt
mpq_cmp_si :: SrcPtr MPQ -> CLong -> CULong -> IO CInt
mpq_equal :: SrcPtr MPQ -> SrcPtr MPQ -> IO CInt
mpq_get_num :: Ptr MPZ -> SrcPtr MPQ -> IO ()
mpq_get_den :: Ptr MPZ -> SrcPtr MPQ -> IO ()
mpq_set_num :: Ptr MPQ -> SrcPtr MPZ -> IO ()
mpq_set_den :: Ptr MPQ -> SrcPtr MPZ -> IO ()
mpq_out_str :: Ptr CFile -> CInt -> SrcPtr MPQ -> IO CSize
mpq_inp_str :: Ptr MPQ -> Ptr CFile -> CInt -> IO CSize
mpf_init2 :: Ptr MPF -> MPBitCnt -> IO ()
mpf_clear :: Ptr MPF -> IO ()
mpf_get_prec :: SrcPtr MPF -> IO MPBitCnt
mpf_set_prec :: Ptr MPF -> MPBitCnt -> IO ()
mpf_set_prec_raw :: Ptr MPF -> MPBitCnt -> IO ()
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_set_str :: Ptr MPF -> SrcPtr CChar -> CInt -> IO CInt
mpf_swap :: Ptr MPF -> Ptr MPF -> IO ()
mpf_init_set :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_init_set_ui :: Ptr MPF -> CULong -> IO ()
mpf_init_set_si :: Ptr MPF -> CLong -> IO ()
mpf_init_set_d :: Ptr MPF -> CDouble -> IO ()
mpf_init_set_str :: Ptr MPF -> SrcPtr CChar -> CInt -> IO CInt
mpf_get_d :: SrcPtr MPF -> IO CDouble
mpf_get_d_2exp :: Ptr CLong -> SrcPtr MPF -> IO CDouble
mpf_get_si :: SrcPtr MPF -> IO CLong
mpf_get_ui :: SrcPtr MPF -> IO CULong
mpf_get_str :: Ptr CChar -> Ptr MPExp -> CInt -> CSize -> SrcPtr MPF -> IO (Ptr CChar)
mpf_add :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO ()
mpf_add_ui :: Ptr MPF -> SrcPtr MPF -> CULong -> IO ()
mpf_sub :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO ()
mpf_sub_ui :: Ptr MPF -> SrcPtr MPF -> CULong -> IO ()
mpf_ui_sub :: Ptr MPF -> CULong -> SrcPtr MPF -> IO ()
mpf_mul :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO ()
mpf_mul_ui :: Ptr MPF -> SrcPtr MPF -> CULong -> IO ()
mpf_div :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO ()
mpf_ui_div :: Ptr MPF -> CULong -> SrcPtr MPF -> IO ()
mpf_div_ui :: Ptr MPF -> SrcPtr MPF -> CULong -> IO ()
mpf_sqrt :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_sqrt_ui :: Ptr MPF -> CULong -> IO ()
mpf_pow_ui :: Ptr MPF -> SrcPtr MPF -> CULong -> IO ()
mpf_neg :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_abs :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_mul_2exp :: Ptr MPF -> SrcPtr MPF -> MPBitCnt -> IO ()
mpf_div_2exp :: Ptr MPF -> SrcPtr MPF -> MPBitCnt -> IO ()
mpf_cmp :: SrcPtr MPF -> SrcPtr MPF -> IO CInt
mpf_cmp_z :: SrcPtr MPF -> SrcPtr MPZ -> IO CInt
mpf_cmp_d :: SrcPtr MPF -> CDouble -> IO CInt
mpf_cmp_ui :: SrcPtr MPF -> CULong -> IO CInt
mpf_cmp_si :: SrcPtr MPF -> CLong -> IO CInt
mpf_reldiff :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO ()
mpf_out_str :: Ptr CFile -> CInt -> CSize -> SrcPtr MPF -> IO CSize
mpf_inp_str :: Ptr MPF -> Ptr CFile -> CInt -> IO CSize
mpf_ceil :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_floor :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_trunc :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_integer_p :: SrcPtr MPF -> IO CInt
mpf_fits_ulong_p :: SrcPtr MPF -> IO CInt
mpf_fits_slong_p :: SrcPtr MPF -> IO CInt
mpf_fits_uint_p :: SrcPtr MPF -> IO CInt
mpf_fits_sint_p :: SrcPtr MPF -> IO CInt
mpf_fits_ushort_p :: SrcPtr MPF -> IO CInt
mpf_fits_sshort_p :: SrcPtr MPF -> IO CInt
mpf_urandomb :: Ptr MPF -> Ptr GMPRandState -> MPBitCnt -> IO ()
mpf_random2 :: Ptr MPF -> MPSize -> MPExp -> IO ()
gmp_randinit_default :: Ptr GMPRandState -> IO ()
gmp_randinit_mt :: Ptr GMPRandState -> IO ()
gmp_randinit_lc_2exp :: Ptr GMPRandState -> SrcPtr MPZ -> CULong -> MPBitCnt -> IO ()
gmp_randinit_lc_2exp_size :: Ptr GMPRandState -> MPBitCnt -> IO CInt
gmp_randinit_set :: Ptr GMPRandState -> SrcPtr GMPRandState -> IO ()
gmp_randclear :: Ptr GMPRandState -> IO ()
gmp_randseed :: Ptr GMPRandState -> SrcPtr MPZ -> IO ()
gmp_randseed_ui :: Ptr GMPRandState -> CULong -> IO ()
gmp_urandomb_ui :: Ptr GMPRandState -> CULong -> IO CULong
gmp_urandomm_ui :: Ptr GMPRandState -> CULong -> IO CULong
mpn_add_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_addmul_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_divexact_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO ()
mpn_divexact_by3c :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_divrem :: Ptr MPLimb -> MPSize -> Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_divrem_1 :: Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_divrem_2 :: Ptr MPLimb -> MPSize -> Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> IO MPLimb
mpn_div_qr_1 :: Ptr MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_div_qr_2 :: Ptr MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> SrcPtr MPLimb -> IO MPLimb
mpn_gcd :: Ptr MPLimb -> Ptr MPLimb -> MPSize -> Ptr MPLimb -> MPSize -> IO MPSize
mpn_gcd_1 :: SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_gcdext_1 :: Ptr MPLimbSigned -> Ptr MPLimbSigned -> MPLimb -> MPLimb -> IO MPLimb
mpn_gcdext :: Ptr MPLimb -> Ptr MPLimb -> Ptr MPSize -> Ptr MPLimb -> MPSize -> Ptr MPLimb -> MPSize -> IO MPSize
mpn_get_str :: Ptr CUChar -> CInt -> Ptr MPLimb -> MPSize -> IO CSize
mpn_hamdist :: SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPBitCnt
mpn_lshift :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> CUInt -> IO MPLimb
mpn_mod_1 :: SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_mul :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_mul_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_mul_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_sqr :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_com :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_perfect_square_p :: SrcPtr MPLimb -> MPSize -> IO CInt
mpn_perfect_power_p :: SrcPtr MPLimb -> MPSize -> IO CInt
mpn_popcount :: SrcPtr MPLimb -> MPSize -> IO MPBitCnt
mpn_pow_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> Ptr MPLimb -> IO MPSize
mpn_preinv_mod_1 :: SrcPtr MPLimb -> MPSize -> MPLimb -> MPLimb -> IO MPLimb
mpn_random :: Ptr MPLimb -> MPSize -> IO ()
mpn_random2 :: Ptr MPLimb -> MPSize -> IO ()
mpn_rshift :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> CUInt -> IO MPLimb
mpn_scan0 :: SrcPtr MPLimb -> MPBitCnt -> IO MPBitCnt
mpn_scan1 :: SrcPtr MPLimb -> MPBitCnt -> IO MPBitCnt
mpn_set_str :: Ptr MPLimb -> SrcPtr CChar -> CSize -> CInt -> IO MPSize
mpn_sizeinbase :: SrcPtr MPLimb -> MPSize -> CInt -> IO CSize
mpn_sqrtrem :: Ptr MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPSize
mpn_sub_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_submul_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_tdiv_qr :: Ptr MPLimb -> Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_and_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_andn_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_nand_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_ior_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_iorn_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_nior_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_xor_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_xnor_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_copyi :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_copyd :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_zero :: Ptr MPLimb -> MPSize -> IO ()
mpn_cnd_add_n :: MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_cnd_sub_n :: MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_sec_add_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> Ptr MPLimb -> IO MPLimb
mpn_sec_add_1_itch :: MPSize -> IO MPSize
mpn_sec_sub_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> Ptr MPLimb -> IO MPLimb
mpn_sec_sub_1_itch :: MPSize -> IO MPSize
mpn_cnd_swap :: MPLimb -> VolatilePtr MPLimb -> VolatilePtr MPLimb -> MPSize -> IO ()
mpn_sec_mul :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> Ptr MPLimb -> IO ()
mpn_sec_mul_itch :: MPSize -> MPSize -> IO MPSize
mpn_sec_sqr :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> Ptr MPLimb -> IO ()
mpn_sec_sqr_itch :: MPSize -> IO MPSize
mpn_sec_powm :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> SrcPtr MPLimb -> MPBitCnt -> SrcPtr MPLimb -> MPSize -> Ptr MPLimb -> IO ()
mpn_sec_powm_itch :: MPSize -> MPBitCnt -> MPSize -> IO MPSize
mpn_sec_tabselect :: VolatilePtr MPLimb -> VolatileSrcPtr MPLimb -> MPSize -> MPSize -> MPSize -> IO ()
mpn_sec_div_qr :: Ptr MPLimb -> Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> Ptr MPLimb -> IO MPLimb
mpn_sec_div_qr_itch :: MPSize -> MPSize -> IO MPSize
mpn_sec_div_r :: Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> Ptr MPLimb -> IO ()
mpn_sec_div_r_itch :: MPSize -> MPSize -> IO MPSize
mpn_sec_invert :: Ptr MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPBitCnt -> Ptr MPLimb -> IO CInt
mpn_sec_invert_itch :: MPSize -> IO MPSize

-- | Raw GMP foreign bindings, imported safe.
module Numeric.GMP.Raw.Safe
type SrcPtr = Ptr
type VolatilePtr = Ptr
type VolatileSrcPtr = Ptr
mpz_init :: Ptr MPZ -> IO ()
mpz_init2 :: Ptr MPZ -> MPBitCnt -> IO ()
mpz_clear :: Ptr MPZ -> IO ()
mpz_realloc2 :: Ptr MPZ -> MPBitCnt -> IO ()
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_set_str :: Ptr MPZ -> SrcPtr CChar -> CInt -> IO CInt
mpz_swap :: Ptr MPZ -> Ptr MPZ -> IO ()
mpz_init_set :: Ptr MPZ -> SrcPtr MPZ -> IO ()
mpz_init_set_ui :: Ptr MPZ -> CULong -> IO ()
mpz_init_set_si :: Ptr MPZ -> CLong -> IO ()
mpz_init_set_d :: Ptr MPZ -> CDouble -> IO ()
mpz_init_set_str :: Ptr MPZ -> SrcPtr CChar -> CInt -> IO CInt
mpz_get_ui :: SrcPtr MPZ -> IO CLong
mpz_get_si :: SrcPtr MPZ -> IO CLong
mpz_get_d :: SrcPtr MPZ -> IO CDouble
mpz_get_d_2exp :: Ptr CLong -> SrcPtr MPZ -> IO CDouble
mpz_get_str :: Ptr CChar -> CInt -> SrcPtr MPZ -> IO CChar
mpz_add :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_add_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_sub :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_sub_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_ui_sub :: Ptr MPZ -> CULong -> SrcPtr MPZ -> IO ()
mpz_mul :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_mul_si :: Ptr MPZ -> SrcPtr MPZ -> CLong -> IO ()
mpz_mul_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_addmul :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_addmul_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_submul :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_submul_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_mul_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_cdiv_q :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_cdiv_r :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_cdiv_qr :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_cdiv_q_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_cdiv_r_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_cdiv_qr_ui :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_cdiv_ui :: SrcPtr MPZ -> CULong -> IO CULong
mpz_cdiv_q_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_cdiv_r_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_fdiv_q :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_fdiv_r :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_fdiv_qr :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_fdiv_q_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_fdiv_r_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_fdiv_qr_ui :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_fdiv_ui :: SrcPtr MPZ -> CULong -> IO CULong
mpz_fdiv_r_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_fdiv_q_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_tdiv_q :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_tdiv_r :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_tdiv_qr :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_tdiv_q_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_tdiv_r_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_tdiv_qr_ui :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_tdiv_ui :: SrcPtr MPZ -> CULong -> IO CULong
mpz_tdiv_q_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_tdiv_r_2exp :: Ptr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO ()
mpz_mod :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_divexact :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_divexact_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_divisible_p :: SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_divisible_ui_p :: SrcPtr MPZ -> CULong -> IO CInt
mpz_divisible_2exp_p :: SrcPtr MPZ -> MPBitCnt -> IO CInt
mpz_congruent_p :: SrcPtr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_congruent_ui_p :: SrcPtr MPZ -> CULong -> CULong -> IO CInt
mpz_congruent_2exp_p :: SrcPtr MPZ -> SrcPtr MPZ -> MPBitCnt -> IO CInt
mpz_powm :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_powm_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> SrcPtr MPZ -> IO ()
mpz_powm_sec :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_pow_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_ui_pow_ui :: Ptr MPZ -> CULong -> CULong -> IO ()
mpz_root :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CInt
mpz_rootrem :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_sqrt :: Ptr MPZ -> SrcPtr MPZ -> IO ()
mpz_sqrtrem :: Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> IO ()
mpz_perfect_power_p :: SrcPtr MPZ -> IO CInt
mpz_probab_prime_p :: SrcPtr MPZ -> CInt -> IO CInt
mpz_nextprime :: Ptr MPZ -> SrcPtr MPZ -> IO ()
mpz_gcd :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_gcd_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO CULong
mpz_gcdext :: Ptr MPZ -> Ptr MPZ -> Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_lcm :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO ()
mpz_lcm_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_invert :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_jacobi :: SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_kronecker_si :: SrcPtr MPZ -> CLong -> IO CInt
mpz_kronecker_ui :: SrcPtr MPZ -> CULong -> IO CInt
mpz_si_kronecker :: CLong -> SrcPtr MPZ -> IO CInt
mpz_ui_kronecker :: CULong -> SrcPtr MPZ -> IO CInt
mpz_remove :: Ptr MPZ -> SrcPtr MPZ -> SrcPtr MPZ -> IO MPBitCnt
mpz_fac_ui :: Ptr MPZ -> CULong -> IO ()
mpz_2fac_ui :: Ptr MPZ -> CULong -> IO ()
mpz_mfac_uiui :: Ptr MPZ -> CULong -> CULong -> IO ()
mpz_primorial_ui :: Ptr MPZ -> CULong -> IO ()
mpz_bin_ui :: Ptr MPZ -> SrcPtr MPZ -> CULong -> IO ()
mpz_bin_uiui :: Ptr MPZ -> CULong -> CULong -> IO ()
mpz_fib_ui :: Ptr MPZ -> CULong -> IO ()
mpz_fib2_ui :: Ptr MPZ -> Ptr MPZ -> CULong -> IO ()
mpz_lucnum_ui :: Ptr MPZ -> CULong -> IO ()
mpz_lucnum2_ui :: Ptr MPZ -> Ptr MPZ -> CULong -> IO ()
mpz_cmp :: SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_cmp_d :: SrcPtr MPZ -> CDouble -> IO CInt
mpz_cmp_si :: SrcPtr MPZ -> CLong -> IO CInt
mpz_cmp_ui :: SrcPtr MPZ -> CULong -> IO CInt
mpz_cmpabs :: SrcPtr MPZ -> SrcPtr MPZ -> IO CInt
mpz_cmpabs_d :: SrcPtr MPZ -> CDouble -> IO CInt
mpz_cmpabs_ui :: SrcPtr MPZ -> CULong -> IO CInt
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 ()
mpz_hamdist :: SrcPtr MPZ -> SrcPtr MPZ -> IO MPBitCnt
mpz_scan0 :: SrcPtr MPZ -> MPBitCnt -> IO MPBitCnt
mpz_scan1 :: SrcPtr MPZ -> MPBitCnt -> IO MPBitCnt
mpz_setbit :: Ptr MPZ -> MPBitCnt -> IO ()
mpz_clrbit :: Ptr MPZ -> MPBitCnt -> IO ()
mpz_combit :: Ptr MPZ -> MPBitCnt -> IO ()
mpz_tstbit :: SrcPtr MPZ -> MPBitCnt -> IO CInt
mpz_out_str :: Ptr CFile -> CInt -> SrcPtr MPZ -> IO CSize
mpz_inp_str :: Ptr MPZ -> Ptr CFile -> CInt -> IO CSize
mpz_out_raw :: Ptr CFile -> SrcPtr MPZ -> IO CSize
mpz_inp_raw :: Ptr MPZ -> Ptr CFile -> IO CSize
mpz_urandomb :: Ptr MPZ -> Ptr GMPRandState -> MPBitCnt -> IO ()
mpz_urandomm :: Ptr MPZ -> Ptr GMPRandState -> SrcPtr MPZ -> IO ()
mpz_rrandomb :: Ptr MPZ -> Ptr GMPRandState -> MPBitCnt -> IO ()
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 ()
mpz_fits_slong_p :: SrcPtr MPZ -> IO CInt
mpz_fits_sint_p :: SrcPtr MPZ -> IO CInt
mpz_fits_sshort_p :: SrcPtr MPZ -> IO CInt
mpz_sizeinbase :: SrcPtr MPZ -> CInt -> IO CSize
mpz_realloc :: Ptr MPZ -> MPSize -> IO ()
mpz_limbs_read :: SrcPtr MPZ -> IO (SrcPtr MPLimb)
mpz_limbs_write :: Ptr MPZ -> MPSize -> IO (Ptr MPLimb)
mpz_limbs_modify :: Ptr MPZ -> MPSize -> IO (Ptr MPLimb)
mpz_limbs_finish :: Ptr MPZ -> MPSize -> IO ()
mpz_roinit_n :: Ptr MPZ -> SrcPtr MPLimb -> MPSize -> IO (SrcPtr MPZ)
mpq_canonicalize :: Ptr MPQ -> IO ()
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_set_str :: Ptr MPQ -> SrcPtr CChar -> CInt -> IO CInt
mpq_swap :: Ptr MPQ -> Ptr MPQ -> IO ()
mpq_get_d :: SrcPtr MPQ -> IO CDouble
mpq_set_d :: Ptr MPQ -> CDouble -> IO ()
mpq_set_f :: Ptr MPQ -> SrcPtr MPF -> IO ()
mpq_get_str :: Ptr CChar -> CInt -> SrcPtr MPQ -> IO (Ptr CChar)
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_mul_2exp :: Ptr MPQ -> SrcPtr MPQ -> MPBitCnt -> IO ()
mpq_div :: Ptr MPQ -> SrcPtr MPQ -> SrcPtr MPQ -> IO ()
mpq_div_2exp :: Ptr MPQ -> SrcPtr MPQ -> MPBitCnt -> IO ()
mpq_inv :: Ptr MPQ -> SrcPtr MPQ -> IO ()
mpq_cmp :: SrcPtr MPQ -> SrcPtr MPQ -> IO CInt
mpq_cmp_z :: SrcPtr MPQ -> SrcPtr MPZ -> IO CInt
mpq_cmp_ui :: SrcPtr MPQ -> CULong -> CULong -> IO CInt
mpq_cmp_si :: SrcPtr MPQ -> CLong -> CULong -> IO CInt
mpq_equal :: SrcPtr MPQ -> SrcPtr MPQ -> IO CInt
mpq_get_num :: Ptr MPZ -> SrcPtr MPQ -> IO ()
mpq_get_den :: Ptr MPZ -> SrcPtr MPQ -> IO ()
mpq_set_num :: Ptr MPQ -> SrcPtr MPZ -> IO ()
mpq_set_den :: Ptr MPQ -> SrcPtr MPZ -> IO ()
mpq_out_str :: Ptr CFile -> CInt -> SrcPtr MPQ -> IO CSize
mpq_inp_str :: Ptr MPQ -> Ptr CFile -> CInt -> IO CSize
mpf_init2 :: Ptr MPF -> MPBitCnt -> IO ()
mpf_clear :: Ptr MPF -> IO ()
mpf_get_prec :: SrcPtr MPF -> IO MPBitCnt
mpf_set_prec :: Ptr MPF -> MPBitCnt -> IO ()
mpf_set_prec_raw :: Ptr MPF -> MPBitCnt -> IO ()
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_set_str :: Ptr MPF -> SrcPtr CChar -> CInt -> IO CInt
mpf_swap :: Ptr MPF -> Ptr MPF -> IO ()
mpf_init_set :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_init_set_ui :: Ptr MPF -> CULong -> IO ()
mpf_init_set_si :: Ptr MPF -> CLong -> IO ()
mpf_init_set_d :: Ptr MPF -> CDouble -> IO ()
mpf_init_set_str :: Ptr MPF -> SrcPtr CChar -> CInt -> IO CInt
mpf_get_d :: SrcPtr MPF -> IO CDouble
mpf_get_d_2exp :: Ptr CLong -> SrcPtr MPF -> IO CDouble
mpf_get_si :: SrcPtr MPF -> IO CLong
mpf_get_ui :: SrcPtr MPF -> IO CULong
mpf_get_str :: Ptr CChar -> Ptr MPExp -> CInt -> CSize -> SrcPtr MPF -> IO (Ptr CChar)
mpf_add :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO ()
mpf_add_ui :: Ptr MPF -> SrcPtr MPF -> CULong -> IO ()
mpf_sub :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO ()
mpf_sub_ui :: Ptr MPF -> SrcPtr MPF -> CULong -> IO ()
mpf_ui_sub :: Ptr MPF -> CULong -> SrcPtr MPF -> IO ()
mpf_mul :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO ()
mpf_mul_ui :: Ptr MPF -> SrcPtr MPF -> CULong -> IO ()
mpf_div :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO ()
mpf_ui_div :: Ptr MPF -> CULong -> SrcPtr MPF -> IO ()
mpf_div_ui :: Ptr MPF -> SrcPtr MPF -> CULong -> IO ()
mpf_sqrt :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_sqrt_ui :: Ptr MPF -> CULong -> IO ()
mpf_pow_ui :: Ptr MPF -> SrcPtr MPF -> CULong -> IO ()
mpf_neg :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_abs :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_mul_2exp :: Ptr MPF -> SrcPtr MPF -> MPBitCnt -> IO ()
mpf_div_2exp :: Ptr MPF -> SrcPtr MPF -> MPBitCnt -> IO ()
mpf_cmp :: SrcPtr MPF -> SrcPtr MPF -> IO CInt
mpf_cmp_z :: SrcPtr MPF -> SrcPtr MPZ -> IO CInt
mpf_cmp_d :: SrcPtr MPF -> CDouble -> IO CInt
mpf_cmp_ui :: SrcPtr MPF -> CULong -> IO CInt
mpf_cmp_si :: SrcPtr MPF -> CLong -> IO CInt
mpf_reldiff :: Ptr MPF -> SrcPtr MPF -> SrcPtr MPF -> IO ()
mpf_out_str :: Ptr CFile -> CInt -> CSize -> SrcPtr MPF -> IO CSize
mpf_inp_str :: Ptr MPF -> Ptr CFile -> CInt -> IO CSize
mpf_ceil :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_floor :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_trunc :: Ptr MPF -> SrcPtr MPF -> IO ()
mpf_integer_p :: SrcPtr MPF -> IO CInt
mpf_fits_ulong_p :: SrcPtr MPF -> IO CInt
mpf_fits_slong_p :: SrcPtr MPF -> IO CInt
mpf_fits_uint_p :: SrcPtr MPF -> IO CInt
mpf_fits_sint_p :: SrcPtr MPF -> IO CInt
mpf_fits_ushort_p :: SrcPtr MPF -> IO CInt
mpf_fits_sshort_p :: SrcPtr MPF -> IO CInt
mpf_urandomb :: Ptr MPF -> Ptr GMPRandState -> MPBitCnt -> IO ()
mpf_random2 :: Ptr MPF -> MPSize -> MPExp -> IO ()
gmp_randinit_default :: Ptr GMPRandState -> IO ()
gmp_randinit_mt :: Ptr GMPRandState -> IO ()
gmp_randinit_lc_2exp :: Ptr GMPRandState -> SrcPtr MPZ -> CULong -> MPBitCnt -> IO ()
gmp_randinit_lc_2exp_size :: Ptr GMPRandState -> MPBitCnt -> IO CInt
gmp_randinit_set :: Ptr GMPRandState -> SrcPtr GMPRandState -> IO ()
gmp_randclear :: Ptr GMPRandState -> IO ()
gmp_randseed :: Ptr GMPRandState -> SrcPtr MPZ -> IO ()
gmp_randseed_ui :: Ptr GMPRandState -> CULong -> IO ()
gmp_urandomb_ui :: Ptr GMPRandState -> CULong -> IO CULong
gmp_urandomm_ui :: Ptr GMPRandState -> CULong -> IO CULong
mpn_add_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_addmul_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_divexact_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO ()
mpn_divexact_by3c :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_divrem :: Ptr MPLimb -> MPSize -> Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_divrem_1 :: Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_divrem_2 :: Ptr MPLimb -> MPSize -> Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> IO MPLimb
mpn_div_qr_1 :: Ptr MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_div_qr_2 :: Ptr MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> SrcPtr MPLimb -> IO MPLimb
mpn_gcd :: Ptr MPLimb -> Ptr MPLimb -> MPSize -> Ptr MPLimb -> MPSize -> IO MPSize
mpn_gcd_1 :: SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_gcdext_1 :: Ptr MPLimbSigned -> Ptr MPLimbSigned -> MPLimb -> MPLimb -> IO MPLimb
mpn_gcdext :: Ptr MPLimb -> Ptr MPLimb -> Ptr MPSize -> Ptr MPLimb -> MPSize -> Ptr MPLimb -> MPSize -> IO MPSize
mpn_get_str :: Ptr CUChar -> CInt -> Ptr MPLimb -> MPSize -> IO CSize
mpn_hamdist :: SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPBitCnt
mpn_lshift :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> CUInt -> IO MPLimb
mpn_mod_1 :: SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_mul :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_mul_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_mul_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_sqr :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_com :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_perfect_square_p :: SrcPtr MPLimb -> MPSize -> IO CInt
mpn_perfect_power_p :: SrcPtr MPLimb -> MPSize -> IO CInt
mpn_popcount :: SrcPtr MPLimb -> MPSize -> IO MPBitCnt
mpn_pow_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> Ptr MPLimb -> IO MPSize
mpn_preinv_mod_1 :: SrcPtr MPLimb -> MPSize -> MPLimb -> MPLimb -> IO MPLimb
mpn_random :: Ptr MPLimb -> MPSize -> IO ()
mpn_random2 :: Ptr MPLimb -> MPSize -> IO ()
mpn_rshift :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> CUInt -> IO MPLimb
mpn_scan0 :: SrcPtr MPLimb -> MPBitCnt -> IO MPBitCnt
mpn_scan1 :: SrcPtr MPLimb -> MPBitCnt -> IO MPBitCnt
mpn_set_str :: Ptr MPLimb -> SrcPtr CChar -> CSize -> CInt -> IO MPSize
mpn_sizeinbase :: SrcPtr MPLimb -> MPSize -> CInt -> IO CSize
mpn_sqrtrem :: Ptr MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPSize
mpn_sub_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_submul_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> IO MPLimb
mpn_tdiv_qr :: Ptr MPLimb -> Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_and_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_andn_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_nand_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_ior_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_iorn_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_nior_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_xor_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_xnor_n :: Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_copyi :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_copyd :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> IO ()
mpn_zero :: Ptr MPLimb -> MPSize -> IO ()
mpn_cnd_add_n :: MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_cnd_sub_n :: MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> SrcPtr MPLimb -> MPSize -> IO MPLimb
mpn_sec_add_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> Ptr MPLimb -> IO MPLimb
mpn_sec_add_1_itch :: MPSize -> IO MPSize
mpn_sec_sub_1 :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPLimb -> Ptr MPLimb -> IO MPLimb
mpn_sec_sub_1_itch :: MPSize -> IO MPSize
mpn_cnd_swap :: MPLimb -> VolatilePtr MPLimb -> VolatilePtr MPLimb -> MPSize -> IO ()
mpn_sec_mul :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> Ptr MPLimb -> IO ()
mpn_sec_mul_itch :: MPSize -> MPSize -> IO MPSize
mpn_sec_sqr :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> Ptr MPLimb -> IO ()
mpn_sec_sqr_itch :: MPSize -> IO MPSize
mpn_sec_powm :: Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> SrcPtr MPLimb -> MPBitCnt -> SrcPtr MPLimb -> MPSize -> Ptr MPLimb -> IO ()
mpn_sec_powm_itch :: MPSize -> MPBitCnt -> MPSize -> IO MPSize
mpn_sec_tabselect :: VolatilePtr MPLimb -> VolatileSrcPtr MPLimb -> MPSize -> MPSize -> MPSize -> IO ()
mpn_sec_div_qr :: Ptr MPLimb -> Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> Ptr MPLimb -> IO MPLimb
mpn_sec_div_qr_itch :: MPSize -> MPSize -> IO MPSize
mpn_sec_div_r :: Ptr MPLimb -> MPSize -> SrcPtr MPLimb -> MPSize -> Ptr MPLimb -> IO ()
mpn_sec_div_r_itch :: MPSize -> MPSize -> IO MPSize
mpn_sec_invert :: Ptr MPLimb -> Ptr MPLimb -> SrcPtr MPLimb -> MPSize -> MPBitCnt -> Ptr MPLimb -> IO CInt
mpn_sec_invert_itch :: MPSize -> IO MPSize

-- | GMP utilities. A simple example with probable primes:
--   
--   
--   import Numeric.GMP.Raw.Safe (mpz_nextprime)
--   
--   nextPrime :: Integer -> Integer
--   nextPrime n =
--     unsafePerformIO $
--       withOutInteger_ $ \rop ->
--         withInInteger n $ \op ->
--           mpz_nextprime rop op
--   
module Numeric.GMP.Utils

-- | Store an Integer into a temporary MPZ. The action must
--   use it only as an mpz_srcptr (ie, constant/immutable), and
--   must not allow references to it to escape its scope.
withInInteger' :: Integer -> (MPZ -> IO r) -> IO r

-- | Combination of withInInteger' and with. The action must
--   use it only as an mpz_srcptr (ie, constant/immutable), and
--   must not allow the pointer to escape its scope. If in doubt about
--   potential mutation by the action, use withInOutInteger instead.
withInInteger :: Integer -> (Ptr MPZ -> IO r) -> IO r

-- | Allocates and initializes an mpz_t, pokes the value, and
--   peeks and clears it after the action. The pointer must not escape the
--   scope of the action.
withInOutInteger :: Integer -> (Ptr MPZ -> IO a) -> IO (Integer, a)

-- | Allocates and initializes an mpz_t, pokes the value, and
--   peeks and clears it after the action. The pointer must not escape the
--   scope of the action. The result of the action is discarded.
withInOutInteger_ :: Integer -> (Ptr MPZ -> IO a) -> IO Integer

-- | Allocates and initializes an mpz_t, then peeks and clears it
--   after the action. The pointer must not escape the scope of the action.
withOutInteger :: (Ptr MPZ -> IO a) -> IO (Integer, a)

-- | Allocates and initializes an mpz_t, then peeks and clears it
--   after the action. The pointer must not escape the scope of the action.
--   The result of the action is discarded.
withOutInteger_ :: (Ptr MPZ -> IO a) -> IO Integer

-- | Read an Integer from an MPZ.
peekInteger' :: MPZ -> IO Integer

-- | Combination of peek and peekInteger'.
peekInteger :: Ptr MPZ -> IO Integer

-- | Store an Integer into an mpz_t, which must have been
--   initialized with mpz_init.
pokeInteger :: Ptr MPZ -> Integer -> IO ()

-- | Store a Rational into a temporary MPQ. The action must
--   use it only as an mpq_srcptr (ie, constant/immutable), and
--   must not allow the pointer to escape its scope.
withInRational' :: Rational -> (MPQ -> IO r) -> IO r

-- | Combination of withInRational' and with. The action must
--   use it only as an mpq_srcptr (ie, constant/immutable), and
--   must not allow the pointer to escape its scope. If in doubt about
--   potential mutation by the action, use withInOutRational
--   instead.
withInRational :: Rational -> (Ptr MPQ -> IO r) -> IO r

-- | Allocates and initializes an mpq_t, pokes the value, and
--   peeks and clears it after the action. The pointer must not escaep the
--   scope of the action.
withInOutRational :: Rational -> (Ptr MPQ -> IO a) -> IO (Rational, a)

-- | Allocates and initializes an mpq_t, pokes the value, and
--   peeks and clears it after the action. The pointer must not escaep the
--   scope of the action. The result of the action is discarded.
withInOutRational_ :: Rational -> (Ptr MPQ -> IO a) -> IO Rational

-- | Allocates and initializes an mpq_t, then peeks and clears it
--   after the action. The pointer must not escape the scope of the action.
withOutRational :: (Ptr MPQ -> IO a) -> IO (Rational, a)

-- | Allocates and initializes an mpq_t, then peeks and clears it
--   after the action. The pointer must not escape the scope of the action.
--   The result of the action is discarded.
withOutRational_ :: (Ptr MPQ -> IO a) -> IO Rational

-- | Read a Rational from an MPQ.
peekRational' :: MPQ -> IO Rational

-- | Combination of peek and peekRational'.
peekRational :: Ptr MPQ -> IO Rational

-- | Store a Rational into an mpq_t, which must have been
--   initialized with mpq_init.
pokeRational :: Ptr MPQ -> Rational -> IO ()
