21 releases

0.2.16 Jan 24, 2026
0.2.15 May 6, 2025
0.2.13 Apr 22, 2025
0.2.11 Oct 28, 2024
0.1.2 Jul 18, 2018

#2 in No standard library

Download history 2878563/week @ 2025-11-29 3219157/week @ 2025-12-06 3303975/week @ 2025-12-13 2023133/week @ 2025-12-20 1864914/week @ 2025-12-27 3356722/week @ 2026-01-03 3759031/week @ 2026-01-10 3914809/week @ 2026-01-17 4360840/week @ 2026-01-24 4538615/week @ 2026-01-31 4671460/week @ 2026-02-07 4404633/week @ 2026-02-14 4635161/week @ 2026-02-21 5618237/week @ 2026-02-28 5880325/week @ 2026-03-07 5433966/week @ 2026-03-14

22,368,709 downloads per month
Used in 21,340 crates (595 directly)

MIT license

650KB
14K SLoC

libm

A Rust implementations of the C math library.

Usage

libm provides fallback implementations for Rust's float math functions in core, and the core_float_math feature. If what is available suits your needs, there is no need to add libm as a dependency.

If more functionality is needed, this crate can also be used directly:

[dependencies]
libm = "0.2.11"

Contributing

Please check CONTRIBUTING.md

Minimum Rust version policy

This crate supports rustc 1.63 and newer.

License

Usage is under the MIT license, available at https://opensource.org/license/mit.

Contribution

Contributions are licensed under both the MIT license and the Apache License, Version 2.0, available at https://www.apache.org/licenses/LICENSE-2.0. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as mentioned, without any additional terms or conditions.

See LICENSE.txt for full details.

No runtime deps