Skip to main content

libm/math/support/
mod.rs

1#[macro_use]
2pub mod macros;
3mod big;
4mod env;
5// Runtime feature detection requires atomics.
6#[cfg(target_has_atomic = "ptr")]
7pub(crate) mod feature_detect;
8mod float_traits;
9pub mod hex_float;
10mod int_traits;
11mod modular;
12
13#[allow(unused_imports)]
14pub use big::{i256, u256};
15// Clippy seems to have a false positive
16#[allow(unused_imports, clippy::single_component_path_imports)]
17pub(crate) use cfg_if;
18pub use env::{FpResult, Round, Status};
19#[allow(unused_imports)]
20pub use float_traits::{DFloat, Float, HFloat, IntTy};
21pub(crate) use float_traits::{f32_from_bits, f64_from_bits};
22#[cfg(any(test, feature = "unstable-public-internals"))]
23pub use hex_float::Hexf;
24#[cfg(f16_enabled)]
25#[allow(unused_imports)]
26pub use hex_float::hf16;
27#[cfg(f128_enabled)]
28#[allow(unused_imports)]
29pub use hex_float::hf128;
30#[allow(unused_imports)]
31pub use hex_float::{hf32, hf64};
32pub use int_traits::{CastFrom, CastInto, DInt, HInt, Int, MinInt, NarrowingDiv};
33pub use modular::linear_mul_reduction;
34
35/// Hint to the compiler that the current path is cold.
36pub fn cold_path() {
37    #[cfg(intrinsics_enabled)]
38    core::intrinsics::cold_path();
39}