PackageTrack
Sign in Get early access

malachite

Arbitrary-precision arithmetic, with efficient algorithms partially derived from GMP, FLINT, and MPFR.

0.10.0 8.7M downloads/mo #3360 most downloaded on crates.io mhogrefe/malachite

What this package is like to depend on

Last release 28 days ago

27 Jul 2026

Release timing varies

gaps range from 2 weeks to 5 months

Some releases are documented

notes for 10 of 32 stable releases

4 versions withdrawn

withdrawn after publishing

4 years old

36 releases · first in 2022

7 releases in the last 12 months

see the full history below

Release timeline

36 releases · Oct 2022 to Jul 2026
2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 36
  1. 0.10.0 27 Jul 2026
    Release notes

    With this release, Floats are no longer considered experimental! I've added

    • A full complement of log, exp, and root functions
    • Efficient conversions from Float to string and vice versa; with variants that match MPFR's conversion functions exactly, and variants which match Malachite's existing ToSci and FromSciString implementations
    • A serde implementation for Float
    • Many more Float constants, computable to any level of precision
    • general performance improvements across Malachite
    • 35 new Malachite-specific lints, to preserve Malachite's coding standards as it continues to grow

    In the process of porting MPFR functions to Malachite, I discovered several bugs in MPFR. I've reported them and they're being fixed.

    What's next:

    • Filling in gaps (functions that other libraries support, but Malachite doesn't yet)
    • The remaining MPFR functions, most notably the trigonometric functions
    • Complex floats via MPC, to give Malachite complete parity with rug
    • And much more!
    Open source →
  2. 0.9.2 19 Jun 2026
    Release notes
    • Many log functions for Floats
    • More Float constants
    • Euclidean division for primitive ints, Naturals, and Integers
    • Various other improvements and additions
    Open source →
  3. 0.9.1 01 Feb 2026
    Release notes

    This release advances Float development.

    • AGM (the arithmetic-geometric mean) is now supported. It might seem odd to implement this obscure function before many elementary functions, but it turns out that the AGM is useful in computing logarithms, which will be the subject of the next release. Malachite also provides functionality for taking the AGM of two Rationals and returning a Float result.
    • Malachite is now able to compute pi to arbitrary precision. (If you want to benchmark this, beware that the current Float-to-decimal-string conversion is very slow; this will be fixed within the next few months.) Malachite also provides all the pi-related constants that std provides here.
    • Malachite can now also compute Gauss's constant and the lemniscate constant to arbitrary precision.
    • Rationals now have implementations for the Rem trait (and Mod and CeilingMod, just like Integers). We define x % y to be x - y * sign(x * y) * floor(|x/y|), though the implementaton is slightly faster than the naive one.
    Open source →
  4. 0.9.0 30 Dec 2025
    Release notes

    This release adds functionality for taking the square root of Floats, and for taking the reciprocal square root of Floats (that is, raising them to the power of -1/2). It also adds several new constants that may be computed to arbitrary precision. Also, thanks to Dasaav-dsv for adding the as_limbs_asc function to Naturals, allowing users to take a reference to a Natural's limbs.

    Breaking changes:

    • The Thue-Morse constant is now called the Prouhet-Thue-Morse constant
    • Natural logarithms are now called ln, not log

    2026 will be a big year for Floats!

    Open source →
  5. 0.8.0 05 Dec 2025
    Release notes
    • Float * Rational, Float / Rational, and Rational / Float now have correct overflow and underflow behavior; now all Float functions do, except for string conversion, which will be rewritten.
    • The natural logarithm of 2 is now available as Float::log_2_prec and Float::log_2_prec_round.
    • Floats now have a full complement of EqAbs implementations. Existing EqAbs and PartialOrdAbs implementations throughout Malachite have been cleaned up. Primitive unsigned integers no longer implement these traits, which is a breaking change. (If you were using these for some reason, just use normal comparison operators instead).
    • Thanks to Will Youmans for implementing IsPower and ExpressAsPower for Naturals. I ported these implementations to u128 as well.
    Open source →
  6. 0.7.1 17 Nov 2025
    Release notes
    • Division of Floats by Floats and reciprocation of Floats now handle overflow and underflow correctly (same as MPFR)
    • There's now a full collection of shl and shr functions on Floats that accept precision, rounding mode, or both
    • Factorial bug fixed
    • Multiplication of very large integers could cause a stack overflow; this is now fixed
    Open source →
  7. 0.7.0 28 Sep 2025
    Release notes

    I've rewritten integer multiplication a second time. The latest implementation is derived from Daniel Schultz's small-prime FFT multiplication implementation in FLINT. It's considerably faster than before, though still a bit slower than GMP's implementation. Malachite now depends on the wide crate for SIMD; once wide 0.8.0 is released, I should be able to improve Malachite's multiplication performance further still. I'm going to hold off making concrete performance claims until then.

    Unfortunately, I've discovered that, at least on my machine, Malachite is considerably slower when built using no_std (though still pretty fast!); the main culprit is the libm::fma function, which is considerably slower than the std-only equivalent mul_add. Since I want Malachite to have the best performance possible by default, I've decided to make no_std opt-in. Malachite will build with an std feature by default, and to build it with no_std you will need to disable default features.

    Thanks to Will Youmans for implementing some functions around perfect powers, and to all the other contributors to this release.

    Next I will focus my attention back on Floats, which have been neglected.

    Open source →
  8. 0.6.1 06 Jun 2025
    Release notes

    Fixed a rare panic during an extended GCD computation.

    Open source →
  9. 0.6.0 18 Apr 2025
    Release notes
    • Upgraded to a more recent version of itertools. This caused a name collision between the new get function on the Itertools traits and various get functions on some iterators in Malachite. To resolve this, the Malachite functions were renamed to get_digit or get_limb, depending on the iterator. This is a breaking change.
    • Thanks to coolreader18 for removing a transitive dependency on the syn crate in malachite-bigint.
    • Thanks to twizmwazin for updating the pyo3 version.
    • Various improvements caught by Clippy.
    Open source →
  10. 0.5.1 02 Mar 2025
    Release notes
    • upgraded to Rust 2024 edition
    • updated hashbrown dependency
    • added primitive root computation for a prime number of primitive int type
    Open source →
  11. 0.5.0 17 Feb 2025

    Nothing published for this version

  12. 0.4.22 03 Feb 2025

    Nothing published for this version

  13. 0.4.21 30 Jan 2025 withdrawn

    Nothing published for this version

  14. 0.4.20 30 Jan 2025 withdrawn

    Nothing published for this version

  15. 0.4.19 30 Jan 2025 withdrawn

    Nothing published for this version

  16. 0.4.18 25 Jan 2025

    Nothing published for this version

  17. 0.4.16 05 Sep 2024

    Nothing published for this version

  18. 0.4.15 18 Aug 2024

    Nothing published for this version

  19. 0.4.14 22 Jun 2024

    Nothing published for this version

  20. 0.4.13 13 Jun 2024

    Nothing published for this version

  21. 0.4.12 04 Jun 2024

    Nothing published for this version

  22. 0.4.11 02 Jun 2024

    Nothing published for this version

  23. 0.4.10 31 May 2024

    Nothing published for this version

  24. 0.4.9 22 May 2024

    Nothing published for this version

  25. 0.4.8 20 May 2024

    Nothing published for this version

  26. 0.4.7 12 Apr 2024

    Nothing published for this version

  27. 0.4.6 04 Apr 2024

    Nothing published for this version

  28. 0.4.5 12 Feb 2024

    Nothing published for this version

  29. 0.4.4 29 Oct 2023

    Nothing published for this version

  30. 0.4.3 28 Oct 2023 withdrawn

    Nothing published for this version

  31. 0.4.2 11 Oct 2023

    Nothing published for this version

  32. 0.4.1 21 Sep 2023

    Nothing published for this version

  33. 0.4.0 03 Sep 2023

    Nothing published for this version

  34. 0.3.2 20 Jan 2023

    Nothing published for this version

  35. 0.3.1 22 Dec 2022

    Nothing published for this version

  36. 0.3.0 18 Oct 2022

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive