Skip to main content Module math Copy item path Source use std::ops::Neg ; ๐ use rand::RngExt; ๐ use rustc_apfloat::ieee::DoubleS; ๐ use rustc_apfloat::ieee::HalfS; ๐ use rustc_apfloat::ieee::IeeeFloat; ๐ use rustc_apfloat::ieee::Semantics; ๐ use rustc_apfloat::ieee::SingleS; ๐ use rustc_apfloat::Float; ๐ use rustc_apfloat::FloatConvert; ๐ use rustc_middle::ty; ๐ use rustc_middle::ty::FloatTy; ๐ use rustc_middle::ty::ScalarInt; ๐ use crate ::*; ๐ impl_float_host_operations ๐ impl_ieee_pi ๐ HostUnaryFloatOp HostFloatOperation IeeeExt Extend functionality of rustc_apfloat softfloats for IEEE float types. ToHost Convert a softfloat type to its corresponding hostfloat type. ToSoft Convert a hostfloat type to its corresponding softfloat type. apply_random_float_error ๐ Disturbes a floating-point result by a relative error in the range (-2^scale, 2^scale). apply_random_float_error_to_imm ๐ Applies an error of [-N, +N] ULP to the given value.
Will fail if val is not a floating point number. apply_random_float_error_ulp ๐ Applies an error of [-N, +N] ULP to the given value. clamp_float_value ๐ Given a floating-point operation and a floating-point value, clamps the result to the output
range of the given operation according to the C standard, if any. fixed_float_value ๐ For the intrinsics: fixed_powi_value ๐ Returns Some(output) if powi (called pown in C) results in a fixed value specified in the
C standard (specifically, C23 annex F.10.4.6) when doing base^exp. Otherwise, returns None. host_unary_float_op sqrt ๐ sqrt_op strip_float_suffix ๐ Remove f16/f32/f64/f128 suffix, if any.