Class LibGmp


  • public class LibGmp
    extends java.lang.Object
    This class contains the static native methods corresponding to GMP functions. This class also contains constants for the size of native GMP structures and some global variables.

    Direct mapping is used for almost all the functions, with the exception of a few ones with a variable number of arguments which require interface mapping.

    Some documented GMP functions are actually macros: they have been reimplemented here. Low-level Function, as defined in the GMP documentation, as well as those functions which depend on types provided by the C standard library (such as the FILE type), have been omitted entirely.

    We strived to be type safe, by defining different subclasses of com.sun.jna.PointerType and com.sun.jna.IntegerType for different native types. Newly defined types have the same name of GMP native types but converted to camel case. For example, mpf_t becomes MpfT, while mp_exp_t is MpExpT. The only exception is NativeUnsignedLong which should be used for native unsigned longs.

    • Field Detail

      • LIBNAME

        private static final java.lang.String LIBNAME
        The undecorated name of the GMP library.
        See Also:
        Constant Field Values
      • mp_bits_per_limb

        public static final int mp_bits_per_limb
        The number of bits per limb.
      • __GNU_MP_VERSION

        public static final int __GNU_MP_VERSION
        The major GMP version. It is the "i" component in gmp_version.
      • __GNU_MP_VERSION_MINOR

        public static final int __GNU_MP_VERSION_MINOR
        The minor GMP version. It is the "j" component in gmp_version.
      • __GNU_MP_VERSION_PATCHLEVEL

        public static final int __GNU_MP_VERSION_PATCHLEVEL
        The patch level GMP version. It is the "k" component in gmp_version.
      • gmp_version

        public static final java.lang.String gmp_version
        The native GMP version number, in the form “i.j.k”.
      • gmp_errno_pointer

        private static final com.sun.jna.Pointer gmp_errno_pointer
        Pointer to the gmp_errno variable.
      • GMP_ERROR_UNSUPPORTED_ARGUMENT

        public static final int GMP_ERROR_UNSUPPORTED_ARGUMENT
        See Also:
        Constant Field Values
      • GMP_ERROR_DIVISION_BY_ZERO

        public static final int GMP_ERROR_DIVISION_BY_ZERO
        See Also:
        Constant Field Values
      • GMP_ERROR_SQRT_OF_NEGATIVE

        public static final int GMP_ERROR_SQRT_OF_NEGATIVE
        See Also:
        Constant Field Values
      • GMP_ERROR_INVALID_ARGUMENT

        public static final int GMP_ERROR_INVALID_ARGUMENT
        See Also:
        Constant Field Values
      • mpz_zero

        private static MpzT mpz_zero
        The integer 0 (assuming no one changes it)
      • mpq_zero

        private static MpqT mpq_zero
        The rational 0 (assuming no one changes it)
      • mpf_zero

        private static MpfT mpf_zero
        The floating point 0 (assuming no one changes it)
      • gmp_deallocator

        private static FreeFunc gmp_deallocator
        The native deallocator used by the GMP library.
      • gmp_default_deallocator

        private static FreeFunc gmp_default_deallocator
        The default native deallocator used by the GMP library.
      • decimalSeparator

        public static final java.lang.String decimalSeparator
        The system decimal separator. We compute this value when the LibGmp class is loaded, and we assume it is not changed later.
      • gmpextra

        private static final LibGmp.LibGmpExtra gmpextra
        Instance of the LibGmpExtra interface created at initialization time.
    • Constructor Detail

      • LibGmp

        private LibGmp()
        A private constructor, since this class should never be instantiated.
    • Method Detail

      • gmp_errno

        public static int gmp_errno()
        Return the value of the global error variable, used by obsolete random number functions. Every bit of this variable has a different meaning, encoded by the GMP_ERROR_xx
      • deallocate

        public static void deallocate​(com.sun.jna.Pointer p,
                                      SizeT size)
        Call the native deallocator used by the GMP library. In general, it is not possible to deallocate memory allocated by GMP (such as from the mpz_get_str function) using Native.free, since in some environments (e.g., Windows) GMP runs using a Unix compatibility layer which uses a non-standard allocation methods.
      • getDecimalSeparator

        private static java.lang.String getDecimalSeparator()
        Return the system decimal separator. Just called one to initialize the decimalSeparator field.
      • mpz_init

        public static void mpz_init​(MpzT x)
      • mpz_inits

        public static void mpz_inits​(MpzT... xs)
      • mpz_init2

        public static void mpz_init2​(MpzT x,
                                     MpBitcntT n)
      • mpz_clear

        public static void mpz_clear​(MpzT x)
      • __gmpz_clear

        public static void __gmpz_clear​(com.sun.jna.Pointer x)
      • mpz_clears

        public static void mpz_clears​(MpzT... xs)
      • mpz_realloc2

        public static void mpz_realloc2​(MpzT x,
                                        MpBitcntT n)
      • mpz_set

        public static void mpz_set​(MpzT rop,
                                   MpzT op)
      • mpz_set_si

        public static void mpz_set_si​(MpzT rop,
                                      com.sun.jna.NativeLong op)
      • mpz_set_d

        public static void mpz_set_d​(MpzT rop,
                                     double op)
      • mpz_set_q

        public static void mpz_set_q​(MpzT rop,
                                     MpqT op)
      • mpz_set_f

        public static void mpz_set_f​(MpzT rop,
                                     MpfT op)
      • mpz_set_str

        public static int mpz_set_str​(MpzT rop,
                                      java.lang.String str,
                                      int base)
      • mpz_swap

        public static void mpz_swap​(MpzT rop1,
                                    MpzT rop2)
      • mpz_init_set

        public static void mpz_init_set​(MpzT rop,
                                        MpzT op)
      • mpz_init_set_si

        public static void mpz_init_set_si​(MpzT rop,
                                           com.sun.jna.NativeLong op)
      • mpz_init_set_d

        public static void mpz_init_set_d​(MpzT rop,
                                          double op)
      • mpz_init_set_str

        public static int mpz_init_set_str​(MpzT rop,
                                           java.lang.String str,
                                           int base)
      • mpz_get_si

        public static com.sun.jna.NativeLong mpz_get_si​(MpzT op)
      • mpz_get_d

        public static double mpz_get_d​(MpzT op)
      • mpz_get_d_2exp

        public static double mpz_get_d_2exp​(com.sun.jna.ptr.NativeLongByReference exp,
                                            MpzT op)
      • mpz_get_str

        public static com.sun.jna.Pointer mpz_get_str​(java.nio.ByteBuffer str,
                                                      int base,
                                                      MpzT op)
      • mpz_add

        public static void mpz_add​(MpzT rop,
                                   MpzT op1,
                                   MpzT op2)
      • mpz_sub

        public static void mpz_sub​(MpzT rop,
                                   MpzT op1,
                                   MpzT op2)
      • mpz_mul

        public static void mpz_mul​(MpzT rop,
                                   MpzT op1,
                                   MpzT op2)
      • mpz_mul_si

        public static void mpz_mul_si​(MpzT rop,
                                      MpzT op1,
                                      com.sun.jna.NativeLong op2)
      • mpz_addmul

        public static void mpz_addmul​(MpzT rop,
                                      MpzT op1,
                                      MpzT op2)
      • mpz_submul

        public static void mpz_submul​(MpzT rop,
                                      MpzT op1,
                                      MpzT op2)
      • mpz_mul_2exp

        public static void mpz_mul_2exp​(MpzT rop,
                                        MpzT op1,
                                        MpBitcntT op2)
      • mpz_neg

        public static void mpz_neg​(MpzT rop,
                                   MpzT op)
      • mpz_abs

        public static void mpz_abs​(MpzT rop,
                                   MpzT op)
      • mpz_cdiv_q

        public static void mpz_cdiv_q​(MpzT q,
                                      MpzT n,
                                      MpzT d)
      • mpz_cdiv_r

        public static void mpz_cdiv_r​(MpzT r,
                                      MpzT n,
                                      MpzT d)
      • mpz_cdiv_qr

        public static void mpz_cdiv_qr​(MpzT q,
                                       MpzT r,
                                       MpzT n,
                                       MpzT d)
      • mpz_cdiv_q_2exp

        public static void mpz_cdiv_q_2exp​(MpzT q,
                                           MpzT n,
                                           MpBitcntT b)
      • mpz_cdiv_r_2exp

        public static void mpz_cdiv_r_2exp​(MpzT r,
                                           MpzT n,
                                           MpBitcntT b)
      • mpz_fdiv_q

        public static void mpz_fdiv_q​(MpzT q,
                                      MpzT n,
                                      MpzT d)
      • mpz_fdiv_r

        public static void mpz_fdiv_r​(MpzT r,
                                      MpzT n,
                                      MpzT d)
      • mpz_fdiv_qr

        public static void mpz_fdiv_qr​(MpzT q,
                                       MpzT r,
                                       MpzT n,
                                       MpzT d)
      • mpz_tdiv_q

        public static void mpz_tdiv_q​(MpzT q,
                                      MpzT n,
                                      MpzT d)
      • mpz_tdiv_r

        public static void mpz_tdiv_r​(MpzT r,
                                      MpzT n,
                                      MpzT d)
      • mpz_tdiv_qr

        public static void mpz_tdiv_qr​(MpzT q,
                                       MpzT r,
                                       MpzT n,
                                       MpzT d)
      • mpz_mod

        public static void mpz_mod​(MpzT r,
                                   MpzT n,
                                   MpzT d)
      • mpz_divexact

        public static void mpz_divexact​(MpzT r,
                                        MpzT n,
                                        MpzT d)
      • mpz_divisible_p

        public static boolean mpz_divisible_p​(MpzT n,
                                              MpzT d)
      • mpz_divisible_2exp_p

        public static boolean mpz_divisible_2exp_p​(MpzT n,
                                                   MpBitcntT b)
      • mpz_congruent_p

        public static boolean mpz_congruent_p​(MpzT n,
                                              MpzT c,
                                              MpzT d)
      • mpz_congruent_2exp_p

        public static boolean mpz_congruent_2exp_p​(MpzT n,
                                                   MpzT c,
                                                   MpBitcntT b)
      • mpz_powm

        public static void mpz_powm​(MpzT rop,
                                    MpzT base,
                                    MpzT exp,
                                    MpzT mod)
      • mpz_powm_sec

        public static void mpz_powm_sec​(MpzT rop,
                                        MpzT base,
                                        MpzT exp,
                                        MpzT mod)
      • mpz_sqrt

        public static void mpz_sqrt​(MpzT rop,
                                    MpzT op)
      • mpz_sqrtrem

        public static void mpz_sqrtrem​(MpzT rop,
                                       MpzT rem,
                                       MpzT op)
      • mpz_perfect_power_p

        public static boolean mpz_perfect_power_p​(MpzT op)
      • mpz_perfect_square_p

        public static boolean mpz_perfect_square_p​(MpzT op)
      • mpz_probab_prime_p

        public static int mpz_probab_prime_p​(MpzT op,
                                             int reps)
      • mpz_nextprime

        public static void mpz_nextprime​(MpzT rop,
                                         MpzT op)
      • mpz_gcd

        public static void mpz_gcd​(MpzT rop,
                                   MpzT op1,
                                   MpzT op2)
      • mpz_lcm

        public static void mpz_lcm​(MpzT rop,
                                   MpzT op1,
                                   MpzT op2)
      • mpz_invert

        public static boolean mpz_invert​(MpzT rop,
                                         MpzT op1,
                                         MpzT op2)
      • mpz_jacobi

        public static int mpz_jacobi​(MpzT a,
                                     MpzT b)
      • mpz_legendre

        public static int mpz_legendre​(MpzT a,
                                       MpzT b)
      • mpz_kronecker_si

        public static int mpz_kronecker_si​(MpzT a,
                                           com.sun.jna.NativeLong b)
      • mpz_si_kronecker

        public static int mpz_si_kronecker​(com.sun.jna.NativeLong a,
                                           MpzT b)
      • mpz_cmp

        public static int mpz_cmp​(MpzT op1,
                                  MpzT op2)
      • mpz_cmp_d

        public static int mpz_cmp_d​(MpzT op1,
                                    double op2)
      • mpz_cmp_si

        public static int mpz_cmp_si​(MpzT op1,
                                     com.sun.jna.NativeLong op2)
      • mpz_cmpabs

        public static int mpz_cmpabs​(MpzT op1,
                                     MpzT op2)
      • mpz_cmpabs_d

        public static int mpz_cmpabs_d​(MpzT op1,
                                       double op2)
      • mpz_sgn

        public static int mpz_sgn​(MpzT op)
      • mpz_and

        public static void mpz_and​(MpzT rop,
                                   MpzT op1,
                                   MpzT op2)
      • mpz_ior

        public static void mpz_ior​(MpzT rop,
                                   MpzT op1,
                                   MpzT op2)
      • mpz_xor

        public static void mpz_xor​(MpzT rop,
                                   MpzT op1,
                                   MpzT op2)
      • mpz_com

        public static void mpz_com​(MpzT rop,
                                   MpzT op)
      • mpz_popcount

        public static MpBitcntT mpz_popcount​(MpzT op)
      • mpz_tstbit

        public static int mpz_tstbit​(MpzT rop,
                                     MpBitcntT index)
      • mpz_out_str

        public static SizeT mpz_out_str​(com.sun.jna.Pointer stream,
                                        int base,
                                        MpzT op)
      • mpz_inp_str

        public static SizeT mpz_inp_str​(MpzT rop,
                                        com.sun.jna.Pointer stream,
                                        int base)
      • mpz_out_raw

        public static SizeT mpz_out_raw​(com.sun.jna.Pointer stream,
                                        MpzT op)
      • mpz_inp_raw

        public static SizeT mpz_inp_raw​(MpzT rop,
                                        com.sun.jna.Pointer stream)
      • mpz_random

        public static void mpz_random​(MpzT rop,
                                      MpSizeT max_size)
      • mpz_random2

        public static void mpz_random2​(MpzT rop,
                                       MpSizeT max_size)
      • mpz_import

        public static void mpz_import​(MpzT rop,
                                      SizeT count,
                                      int order,
                                      SizeT size,
                                      int endian,
                                      SizeT nails,
                                      java.nio.ByteBuffer op)
      • mpz_export

        public static com.sun.jna.Pointer mpz_export​(java.nio.ByteBuffer rop,
                                                     SizeTByReference count,
                                                     int order,
                                                     SizeT size,
                                                     int endian,
                                                     SizeT nails,
                                                     MpzT op)
      • mpz_fits_ulong_p

        public static boolean mpz_fits_ulong_p​(MpzT op)
      • mpz_fits_slong_p

        public static boolean mpz_fits_slong_p​(MpzT op)
      • mpz_fits_uint_p

        public static boolean mpz_fits_uint_p​(MpzT op)
      • mpz_fits_sint_p

        public static boolean mpz_fits_sint_p​(MpzT op)
      • mpz_fits_ushort_p

        public static boolean mpz_fits_ushort_p​(MpzT op)
      • mpz_fits_sshort_p

        public static boolean mpz_fits_sshort_p​(MpzT op)
      • mpz_odd_p

        public static boolean mpz_odd_p​(MpzT op)
      • mpz_even_p

        public static boolean mpz_even_p​(MpzT op)
      • mpz_sizeinbase

        public static SizeT mpz_sizeinbase​(MpzT op,
                                           int base)
      • mpq_canonicalize

        public static void mpq_canonicalize​(MpqT x)
      • mpq_init

        public static void mpq_init​(MpqT x)
      • mpq_inits

        public static void mpq_inits​(MpqT... xs)
      • mpq_clear

        public static void mpq_clear​(MpqT x)
      • __gmpq_clear

        public static void __gmpq_clear​(com.sun.jna.Pointer x)
      • mpq_clears

        public static void mpq_clears​(MpqT... xs)
      • mpq_set

        public static void mpq_set​(MpqT rop,
                                   MpqT op)
      • mpq_set_z

        public static void mpq_set_z​(MpqT rop,
                                     MpzT op)
      • mpq_set_si

        public static void mpq_set_si​(MpqT rop,
                                      com.sun.jna.NativeLong op1,
                                      com.sun.jna.NativeLong op2)
      • mpq_set_str

        public static int mpq_set_str​(MpqT rop,
                                      java.lang.String str,
                                      int base)
      • mpq_swap

        public static void mpq_swap​(MpqT rop1,
                                    MpqT rop2)
      • mpq_get_d

        public static double mpq_get_d​(MpqT op)
      • mpq_set_d

        public static void mpq_set_d​(MpqT rop,
                                     double op)
      • mpq_set_f

        public static void mpq_set_f​(MpqT rop,
                                     MpfT op)
      • mpq_get_str

        public static com.sun.jna.Pointer mpq_get_str​(java.nio.ByteBuffer str,
                                                      int base,
                                                      MpqT op)
      • mpq_add

        public static void mpq_add​(MpqT rop,
                                   MpqT addend1,
                                   MpqT addend2)
      • mpq_sub

        public static void mpq_sub​(MpqT rop,
                                   MpqT minuend,
                                   MpqT subtrahend)
      • mpq_mul

        public static void mpq_mul​(MpqT rop,
                                   MpqT multiplier,
                                   MpqT multiplicand)
      • mpq_mul_2exp

        public static void mpq_mul_2exp​(MpqT rop,
                                        MpqT op1,
                                        MpBitcntT op2)
      • mpq_div

        public static void mpq_div​(MpqT rop,
                                   MpqT dividend,
                                   MpqT divisor)
      • mpq_div_2exp

        public static void mpq_div_2exp​(MpqT rop,
                                        MpqT op1,
                                        MpBitcntT op2)
      • mpq_neg

        public static void mpq_neg​(MpqT rop,
                                   MpqT operand)
      • mpq_abs

        public static void mpq_abs​(MpqT rop,
                                   MpqT operand)
      • mpq_inv

        public static void mpq_inv​(MpqT rop,
                                   MpqT number)
      • mpq_cmp

        public static int mpq_cmp​(MpqT op1,
                                  MpqT op2)
      • mpq_cmp_z

        public static int mpq_cmp_z​(MpqT op1,
                                    MpzT op2)
      • mpq_cmp_si

        public static int mpq_cmp_si​(MpqT op1,
                                     com.sun.jna.NativeLong op2,
                                     NativeUnsignedLong den2)
      • mpq_sgn

        public static int mpq_sgn​(MpqT op)
      • mpq_equal

        public static boolean mpq_equal​(MpqT op1,
                                        MpqT op2)
      • mpq_numref

        public static MpzT mpq_numref​(MpqT op)
      • mpq_denref

        public static MpzT mpq_denref​(MpqT op)
      • mpq_get_num

        public static void mpq_get_num​(MpzT numerator,
                                       MpqT rational)
      • mpq_get_den

        public static void mpq_get_den​(MpzT denominator,
                                       MpqT rational)
      • mpq_set_num

        public static void mpq_set_num​(MpqT rational,
                                       MpzT numerator)
      • mpq_set_den

        public static void mpq_set_den​(MpqT rational,
                                       MpzT denominator)
      • mpq_out_str

        public static SizeT mpq_out_str​(com.sun.jna.Pointer stream,
                                        int base,
                                        MpqT op)
      • mpq_inp_str

        public static SizeT mpq_inp_str​(MpqT rop,
                                        com.sun.jna.Pointer stream,
                                        int base)
      • mpf_set_default_prec

        public static void mpf_set_default_prec​(MpBitcntT prec)
      • mpf_get_default_prec

        public static MpBitcntT mpf_get_default_prec()
      • mpf_init

        public static void mpf_init​(MpfT x)
      • mpf_init2

        public static void mpf_init2​(MpfT x,
                                     MpBitcntT n)
      • mpf_inits

        public static void mpf_inits​(MpfT... xs)
      • mpf_clear

        public static void mpf_clear​(MpfT x)
      • __gmpf_clear

        public static void __gmpf_clear​(com.sun.jna.Pointer x)
      • mpf_clears

        public static void mpf_clears​(MpfT... xs)
      • mpf_get_prec

        public static MpBitcntT mpf_get_prec​(MpfT op)
      • mpf_set_prec

        public static void mpf_set_prec​(MpfT rop,
                                        MpBitcntT prec)
      • mpf_set_prec_raw

        public static void mpf_set_prec_raw​(MpfT rop,
                                            MpBitcntT prec)
      • mpf_set

        public static void mpf_set​(MpfT rop,
                                   MpfT op)
      • mpf_set_si

        public static void mpf_set_si​(MpfT rop,
                                      com.sun.jna.NativeLong op)
      • mpf_set_d

        public static void mpf_set_d​(MpfT rop,
                                     double op)
      • mpf_set_z

        public static void mpf_set_z​(MpfT rop,
                                     MpzT op)
      • mpf_set_q

        public static void mpf_set_q​(MpfT rop,
                                     MpqT op)
      • mpf_set_str

        public static int mpf_set_str​(MpfT rop,
                                      java.lang.String str,
                                      int base)
      • mpf_swap

        public static void mpf_swap​(MpfT rop1,
                                    MpfT rop2)
      • mpf_init_set

        public static void mpf_init_set​(MpfT rop,
                                        MpfT op)
      • mpf_init_set_si

        public static void mpf_init_set_si​(MpfT rop,
                                           com.sun.jna.NativeLong op)
      • mpf_init_set_d

        public static void mpf_init_set_d​(MpfT rop,
                                          double op)
      • mpf_init_set_str

        public static int mpf_init_set_str​(MpfT rop,
                                           java.lang.String str,
                                           int base)
      • mpf_get_d

        public static double mpf_get_d​(MpfT op)
      • mpf_get_d_2exp

        public static double mpf_get_d_2exp​(com.sun.jna.ptr.NativeLongByReference exp,
                                            MpfT op)
      • mpf_get_si

        public static com.sun.jna.NativeLong mpf_get_si​(MpfT op)
      • mpf_get_str

        public static com.sun.jna.Pointer mpf_get_str​(java.nio.ByteBuffer str,
                                                      MpExpTByReference exp,
                                                      int base,
                                                      MpSizeT nDigits,
                                                      MpfT op)
      • mpf_add

        public static void mpf_add​(MpfT rop,
                                   MpfT op1,
                                   MpfT op2)
      • mpf_sub

        public static void mpf_sub​(MpfT rop,
                                   MpfT op1,
                                   MpfT op2)
      • mpf_mul

        public static void mpf_mul​(MpfT rop,
                                   MpfT op1,
                                   MpfT op2)
      • mpf_div

        public static void mpf_div​(MpfT rop,
                                   MpfT op1,
                                   MpfT op2)
      • mpf_sqrt

        public static void mpf_sqrt​(MpfT rop,
                                    MpfT op)
      • mpf_neg

        public static void mpf_neg​(MpfT rop,
                                   MpfT op)
      • mpf_abs

        public static void mpf_abs​(MpfT rop,
                                   MpfT op)
      • mpf_mul_2exp

        public static void mpf_mul_2exp​(MpfT rop,
                                        MpfT op1,
                                        MpBitcntT op2)
      • mpf_div_2exp

        public static void mpf_div_2exp​(MpfT rop,
                                        MpfT op1,
                                        MpBitcntT op2)
      • mpf_cmp

        public static int mpf_cmp​(MpfT op1,
                                  MpfT op2)
      • mpf_cmp_z

        public static int mpf_cmp_z​(MpfT op1,
                                    MpzT op2)
      • mpf_cmp_d

        public static int mpf_cmp_d​(MpfT op1,
                                    double op2)
      • mpf_cmp_si

        public static int mpf_cmp_si​(MpfT op1,
                                     com.sun.jna.NativeLong op2)
      • mpf_reldiff

        public static int mpf_reldiff​(MpfT rop,
                                      MpfT op1,
                                      MpfT op2)
      • mpf_sgn

        public static int mpf_sgn​(MpfT op)
      • mpf_out_str

        public static SizeT mpf_out_str​(com.sun.jna.Pointer stream,
                                        int base,
                                        SizeT nDigits,
                                        MpfT op)
      • mpf_inp_str

        public static SizeT mpf_inp_str​(MpqT rop,
                                        com.sun.jna.Pointer stream,
                                        int base)
      • mpf_ceil

        public static void mpf_ceil​(MpfT rop,
                                    MpfT op)
      • mpf_floor

        public static void mpf_floor​(MpfT rop,
                                     MpfT op)
      • mpf_trunc

        public static void mpf_trunc​(MpfT rop,
                                     MpfT op)
      • mpf_integer_p

        public static boolean mpf_integer_p​(MpfT op)
      • mpf_fits_ulong_p

        public static boolean mpf_fits_ulong_p​(MpfT op)
      • mpf_fits_slong_p

        public static boolean mpf_fits_slong_p​(MpfT op)
      • mpf_fits_uint_p

        public static boolean mpf_fits_uint_p​(MpfT op)
      • mpf_fits_sint_p

        public static boolean mpf_fits_sint_p​(MpfT op)
      • mpf_fits_ushort_p

        public static boolean mpf_fits_ushort_p​(MpfT op)
      • mpf_fits_sshort_p

        public static boolean mpf_fits_sshort_p​(MpfT op)
      • mpf_random2

        public static void mpf_random2​(MpfT rop,
                                       MpSizeT max_size,
                                       MpExpT exp)
      • gmp_randinit_default

        public static void gmp_randinit_default​(GmpRandstateT state)
      • gmp_randinit_mt

        public static void gmp_randinit_mt​(GmpRandstateT state)
      • gmp_randinit_lc_2exp_size

        public static int gmp_randinit_lc_2exp_size​(GmpRandstateT state,
                                                    MpBitcntT m2exp)
      • gmp_randinit

        public static void gmp_randinit​(GmpRandstateT state,
                                        int alg,
                                        com.sun.jna.NativeLong l)
      • gmp_randclear

        public static void gmp_randclear​(GmpRandstateT state)
      • __gmp_randclear

        public static void __gmp_randclear​(com.sun.jna.Pointer x)
      • gmp_randseed

        public static void gmp_randseed​(GmpRandstateT state,
                                        MpzT seed)
      • gmp_printf

        public static int gmp_printf​(java.lang.String fmt,
                                     java.lang.Object... args)
      • gmp_vprintf

        public static int gmp_vprintf​(java.lang.String fmt,
                                      com.sun.jna.Pointer ap)
      • gmp_fprintf

        public static int gmp_fprintf​(com.sun.jna.Pointer fp,
                                      java.lang.String fmt,
                                      java.lang.Object... args)
      • gmp_vfprintf

        public static int gmp_vfprintf​(com.sun.jna.Pointer fp,
                                       java.lang.String fmt,
                                       com.sun.jna.Pointer ap)
      • gmp_sprintf

        public static int gmp_sprintf​(java.nio.ByteBuffer buf,
                                      java.lang.String fmt,
                                      java.lang.Object... args)
      • gmp_vsprintf

        public static int gmp_vsprintf​(java.nio.ByteBuffer buf,
                                       java.lang.String fmt,
                                       com.sun.jna.Pointer ap)
      • gmp_snprintf

        public static int gmp_snprintf​(java.nio.ByteBuffer buf,
                                       SizeT size,
                                       java.lang.String fmt,
                                       java.lang.Object... args)
      • gmp_vsnprintf

        public static int gmp_vsnprintf​(java.nio.ByteBuffer buf,
                                        SizeT size,
                                        java.lang.String fmt,
                                        com.sun.jna.Pointer ap)
      • gmp_asprintf

        public static int gmp_asprintf​(com.sun.jna.ptr.PointerByReference pp,
                                       java.lang.String fmt,
                                       java.lang.Object... args)
      • gmp_vasprintf

        public static int gmp_vasprintf​(com.sun.jna.ptr.PointerByReference pp,
                                        java.lang.String fmt,
                                        com.sun.jna.Pointer ap)
      • gmp_scanf

        public static int gmp_scanf​(java.lang.String fmt,
                                    java.lang.Object... args)
      • gmp_vscanf

        public static int gmp_vscanf​(java.lang.String fmt,
                                     com.sun.jna.Pointer ap)
      • gmp_fscanf

        public static int gmp_fscanf​(com.sun.jna.Pointer fp,
                                     java.lang.String fmt,
                                     java.lang.Object... args)
      • gmp_vfscanf

        public static int gmp_vfscanf​(com.sun.jna.Pointer fp,
                                      java.lang.String fmt,
                                      com.sun.jna.Pointer ap)
      • gmp_sscanf

        public static int gmp_sscanf​(java.lang.String s,
                                     java.lang.String fmt,
                                     java.lang.Object... args)
      • gmp_vsscanf

        public static int gmp_vsscanf​(java.lang.String s,
                                      java.lang.String fmt,
                                      com.sun.jna.Pointer ap)
      • __gmp_set_memory_functions

        private static void __gmp_set_memory_functions​(AllocFunc alloc_func_ptr,
                                                       ReallocFunc realloc_func_ptr,
                                                       FreeFunc free_func_ptr)
      • mp_set_memory_functions

        public static void mp_set_memory_functions​(AllocFunc alloc_func_ptr,
                                                   ReallocFunc realloc_func_ptr,
                                                   FreeFunc free_func_ptr)