libm
libm in pure Rust
0.2.16
429M downloads/mo
#269 most downloaded on crates.io
rust-lang/compiler-builtins
What this package is like to depend on
Last release 7 months ago
24 Jan 2026
Release timing varies
gaps range from 1 weeks to 2.2 years
Most releases are documented
notes for 15 of 21 stable releases
1 version withdrawn
withdrawn after publishing
8 years old
22 releases · first in 2018
1 release in the last 12 months
see the full history below
Release timeline
22 releases · Jul 2018 to Jan 2026Releases
latest 22-
0.2.1624 Jan 2026Release notes
Open source →Fixed
- Fix an incorrect result for
fminimumandfmaximumwith the input (-0, NaN) - Fix a typo in
libm::Libm::roundeven - Fix the
expm1foverflow threshold - Change
CmpResultto use a pointer-sized return type - Compare against
CARGO_CFG_TARGET_FAMILYin a multi-valued fashion - Implement
expand its variants for i586 with inline assembly - Implement
floorandceilin assembly oni586
Other
- Significantly optimize
fmodworst case performance (#1002)
Release notes
Open source →Fixed
- Fix an incorrect result for
fminimumandfmaximumwith the input (-0, NaN) - Fix a typo in
libm::Libm::roundeven - Fix the
expm1foverflow threshold - Change
CmpResultto use a pointer-sized return type - Compare against
CARGO_CFG_TARGET_FAMILYin a multi-valued fashion - Implement
expand its variants for i586 with inline assembly - Implement
floorandceilin assembly oni586
Other
- Significantly optimize
fmodworst case performance (#1002)
- Fix an incorrect result for
-
0.2.1506 May 2025 -
0.2.1404 May 2025 -
0.2.1322 Apr 2025Release notes
Open source →Fixed
- Switch back to workspace resolver v2 to unbreak builds without the 2024 edition
Release notes
Open source →Fixed
- Switch back to workspace resolver v2 to unbreak builds without the 2024 edition
-
0.2.1222 Apr 2025Release notes
Open source →- Mark generic functions
#[inline] - Combine the source files for
fmod - Ensure all public functions are marked
no_panic - Add assembly version of simple operations on aarch64
- Add
roundeven{,f,f16,f128} - Add
fminimum,fmaximum,fminimum_num, andfmaximum_num - Eliminate the use of
force_eval!inceil,floor, andtrunc - Port the CORE-MATH version of
cbrt - Add
fmaf128 - fma: Ensure zero has the correct sign
- Add
scalbnf16,scalbnf128,ldexpf16, andldexpf128 - Specify license as just MIT
- Add
fmodf128 - Add
fmodf16using the generic implementation - Add
fminf16,fmaxf16,fminf128, andfmaxf128 - Add
roundf16androundf128 - Add
rintf16andrintf128 - Add
floorf16andfloorf128 - Add
ceilf16andceilf128 - Add
sqrtf16andsqrtf128 - Simplify and optimize
fdim(#442) - Add
fdimf16andfdimf128 - Add
truncf16andtruncf128 - Add
fabsf16,fabsf128,copysignf16, andcopysignf128 - Move some numeric trait logic to default implementations
- Add some more basic docstrings (#352)
- Add support for loongarch64-unknown-linux-gnu
- Add an "arch" Cargo feature that is on by default
- Rename the
special_casemodule toprecisionand move default ULP - Move the existing "unstable" feature to "unstable-intrinsics"
There are a number of things that changed internally, see the git log for a full
list of changes.Release notes
Open source →- Mark generic functions
#[inline] - Combine the source files for
fmod - Ensure all public functions are marked
no_panic - Add assembly version of simple operations on aarch64
- Add
roundeven{,f,f16,f128} - Add
fminimum,fmaximum,fminimum_num, andfmaximum_num - Eliminate the use of
force_eval!inceil,floor, andtrunc - Port the CORE-MATH version of
cbrt - Add
fmaf128 - fma: Ensure zero has the correct sign
- Add
scalbnf16,scalbnf128,ldexpf16, andldexpf128 - Specify license as just MIT
- Add
fmodf128 - Add
fmodf16using the generic implementation - Add
fminf16,fmaxf16,fminf128, andfmaxf128 - Add
roundf16androundf128 - Add
rintf16andrintf128 - Add
floorf16andfloorf128 - Add
ceilf16andceilf128 - Add
sqrtf16andsqrtf128 - Simplify and optimize
fdim(#442) - Add
fdimf16andfdimf128 - Add
truncf16andtruncf128 - Add
fabsf16,fabsf128,copysignf16, andcopysignf128 - Move some numeric trait logic to default implementations
- Add some more basic docstrings (#352)
- Add support for loongarch64-unknown-linux-gnu
- Add an "arch" Cargo feature that is on by default
- Rename the
special_casemodule toprecisionand move default ULP - Move the existing "unstable" feature to "unstable-intrinsics"
There are a number of things that changed internally, see the git log for a full list of changes.
- Mark generic functions
-
0.2.1128 Oct 2024Release notes
Open source →Fixed
- fix type of constants in ported sincosf (#331)
Other
- Disable a unit test that is failing on i586
- Add a procedural macro for expanding all function signatures
- Introduce
musl-math-sysfor bindings to musl math symbols - Add basic docstrings to some functions (#337)
-
0.2.1028 Oct 2024 -
0.2.926 Oct 2024Release notes
Open source →Fixed
- Update exponent calculations in nextafter to match musl
Changed
- Update licensing to MIT AND (MIT OR Apache-2.0), as this is derivative from MIT-licensed musl.
- Set edition to 2021 for all crates
- Upgrade all dependencies
Other
- Don't deny warnings in lib.rs
- Rename the
musl-bitwise-testsfeature totest-musl-serialized - Rename the
musl-reference-testsfeature tomusl-bitwise-tests - Move
musl-reference-teststo a newlibm-testcrate - Add a
force-soft-floatsfeature to prevent using any intrinsics or arch-specific code - Deny warnings in CI
- Fix
clippy::deprecated_cfg_attron compiler_builtins - Corrected English typos
- Remove unneeded
extern coreintgamma - Allow internal_features lint when building with "unstable"
-
0.2.806 Oct 2023Nothing published for this version
-
0.2.715 May 2023Nothing published for this version
-
0.2.609 Nov 2022Nothing published for this version
-
0.2.510 Aug 2022Nothing published for this version
-
0.2.410 Aug 2022 withdrawnNothing published for this version
-
0.2.330 Jul 2022Nothing published for this version
-
0.2.206 Feb 2022Nothing published for this version
-
0.2.122 Nov 2019 -
0.2.020 Nov 2019Release notes
Open source →Added
- Benchmarks
- signum
- remainder
- remainderf
- nextafter
- nextafterf
Fixed
- Rounding to negative zero
- Overflows in rem_pio2 and remquo
- Overflows in fma
- sincosf
Removed
- F32Ext and F64Ext traits
-
0.1.412 Jun 2019 -
0.1.314 May 2019 -
0.1.218 Jul 2018Release notes
Open source →Added
- acosf
- asin
- asinf
- atan
- atan2
- atan2f
- atanf
- cos
- cosf
- cosh
- coshf
- exp2
- expm1
- expm1f
- expo2
- fmaf
- pow
- sin
- sinf
- sinh
- sinhf
- tan
- tanf
- tanh
- tanhf
-
0.1.114 Jul 2018Release notes
Open source →Added
- acos
- acosf
- asin
- asinf
- atanf
- cbrt
- cbrtf
- ceil
- ceilf
- cosf
- exp
- exp2
- exp2f
- expm1
- expm1f
- fdim
- fdimf
- floorf
- fma
- fmod
- log
- log2
- log10
- log10f
- log1p
- log1pf
- log2f
- roundf
- sinf
- tanf
-
0.1.014 Jul 2018