core::num::bigfloat
이 페이지의 내용
API 참조는 영어로만 있습니다. 표준 라이브러리 소스의 영어 문서 주석에서 만듭니다.
float. #[keyword("float")]
routes the type name here; an unsuffixed literal in a float slot is
Float::from_f64, or Float::from_literal when f64 can't hold it.
A float has f64's 53-bit significand and an i64 exponent. In
f64's normal range it is an f64 (e == 0) with IEEE 754
operations. A finite result outside that range is promoted to
m * 2^e, 1 <= |m| < 2, rounded to nearest-even instead of
becoming +/-inf / 0 / subnormal, so arithmetic never
overflows; only / 0 and inf / NaN operands give inf / NaN.
Structs
FloatSource
pub struct Floatm * 2^e. e == 0: m is the value (zero, normal, inf or NaN,
never subnormal). e != 0: 1 <= |m| < 2 and e is outside
f64's normal exponents -1022..=1023.
The value
x, exactly (subnormals, NaN and +/-inf included).The value
x, exactly.truefor NaN.trueforinfor-inf.trueunless infinite or NaN.truefor0.0or-0.0.truewhen the sign is negative (-0.0too).The magnitude.
The nearest
f64: +/-inf pastf64::MAX, ties to even into the subnormals, +/-0 below them.nonewhen a finite value is pastf32's range; a finite value inside it rounds.The nearest
floatton(ties to even).Truncated toward zero;
nonefor NaN / +/-inf.
Trait implementations 19
impl Add for Floatimpl Sub for Floatimpl Mul for Floatimpl Div for Floatimpl Rem for Floatimpl Modulo for Floatimpl Neg for Floatimpl PartialEq for Floatimpl PartialOrd for Floatimpl Clone for Floatimpl Copy for Floatimpl Default for Floatimpl Zero for Floatimpl One for Floatimpl Display for Floatimpl Debug for Floatimpl FromStr for Floatimpl From<f32> for Floatimpl From<f64> for Float