Malachite for Users of Other Libraries
These pages map the functions of established arithmetic libraries onto their Malachite counterparts, section by section, following the organization of each library’s manual. They are meant to be read in two directions: if you are porting code, look up the function you are using and find what to write instead; if you are wondering what Malachite is still missing, look for the rows marked ✗, which are the ones it is committed to filling in.
GMP
- Integers: the
mpz_ttype, mapped ontoNaturalandInteger. - Rationals: the
mpq_ttype, mapped ontoRational.
GMP’s floating-point type, mpf_t, will not get a page of its own. GMP’s manual steers new
projects toward MPFR, and Malachite’s
Float follows
MPFR, so the float mapping belongs with
the MPFR page.
FLINT
- Integers: the
fmpz_ttype, mapped ontoNaturalandInteger. - Integers mod n: the
fmpz_mod.hmodule, mapped onto theMod*traits overNaturalresidues. - Rationals: the
fmpq_ttype, mapped ontoRational. - Arithmetic functions: the
arith.hmodule, which computes number-theoretic and combinatorial sequences.
FLINT is much larger than GMP, and its pages will arrive module by module.
MPFR
num
- Integers: num-bigint’s
BigUintandBigInt, mapped ontoNaturalandInteger. - Rationals: num-rational’s
Ratio<T>andBigRational, mapped ontoRational. - Traits: the num-traits and num-integer trait crates, with num-iter’s ranges, mapped onto malachite-base’s generic vocabulary.
num-complex has no page: Malachite has no complex type for it to map onto.