Module math

Module math 

Source

Macrosยง

impl_ieee_pi ๐Ÿ”’

Traitsยง

IeeeExt
Extend functionality of rustc_apfloat softfloats for IEEE float types.

Functionsยง

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.
sqrt ๐Ÿ”’