fix f*::MAX_EXP and MIN_EXP docs
This commit is contained in:
parent
fae7785b60
commit
157caeed3e
4 changed files with 48 additions and 24 deletions
|
|
@ -194,16 +194,22 @@ impl f128 {
|
|||
#[unstable(feature = "f128", issue = "116909")]
|
||||
pub const MAX: f128 = 1.18973149535723176508575932662800702e+4932_f128;
|
||||
|
||||
/// One greater than the minimum possible normal power of 2 exponent.
|
||||
/// One greater than the minimum possible *normal* power of 2 exponent
|
||||
/// for a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).
|
||||
///
|
||||
/// If <i>x</i> = `MIN_EXP`, then normal numbers
|
||||
/// ≥ 0.5 × 2<sup><i>x</i></sup>.
|
||||
/// This corresponds to the exact minimum possible *normal* power of 2 exponent
|
||||
/// for a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).
|
||||
/// In other words, all normal numbers representable by this type are
|
||||
/// greater than or equal to 0.5 × 2<sup><i>MIN_EXP</i></sup>.
|
||||
#[unstable(feature = "f128", issue = "116909")]
|
||||
pub const MIN_EXP: i32 = -16_381;
|
||||
/// Maximum possible power of 2 exponent.
|
||||
/// One greater than the maximum possible power of 2 exponent
|
||||
/// for a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).
|
||||
///
|
||||
/// If <i>x</i> = `MAX_EXP`, then normal numbers
|
||||
/// < 1 × 2<sup><i>x</i></sup>.
|
||||
/// This corresponds to the exact maximum possible power of 2 exponent
|
||||
/// for a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).
|
||||
/// In other words, all numbers representable by this type are
|
||||
/// strictly less than 2<sup><i>MAX_EXP</i></sup>.
|
||||
#[unstable(feature = "f128", issue = "116909")]
|
||||
pub const MAX_EXP: i32 = 16_384;
|
||||
|
||||
|
|
|
|||
|
|
@ -189,16 +189,22 @@ impl f16 {
|
|||
#[unstable(feature = "f16", issue = "116909")]
|
||||
pub const MAX: f16 = 6.5504e+4_f16;
|
||||
|
||||
/// One greater than the minimum possible normal power of 2 exponent.
|
||||
/// One greater than the minimum possible *normal* power of 2 exponent
|
||||
/// for a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).
|
||||
///
|
||||
/// If <i>x</i> = `MIN_EXP`, then normal numbers
|
||||
/// ≥ 0.5 × 2<sup><i>x</i></sup>.
|
||||
/// This corresponds to the exact minimum possible *normal* power of 2 exponent
|
||||
/// for a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).
|
||||
/// In other words, all normal numbers representable by this type are
|
||||
/// greater than or equal to 0.5 × 2<sup><i>MIN_EXP</i></sup>.
|
||||
#[unstable(feature = "f16", issue = "116909")]
|
||||
pub const MIN_EXP: i32 = -13;
|
||||
/// Maximum possible power of 2 exponent.
|
||||
/// One greater than the maximum possible power of 2 exponent
|
||||
/// for a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).
|
||||
///
|
||||
/// If <i>x</i> = `MAX_EXP`, then normal numbers
|
||||
/// < 1 × 2<sup><i>x</i></sup>.
|
||||
/// This corresponds to the exact maximum possible power of 2 exponent
|
||||
/// for a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).
|
||||
/// In other words, all numbers representable by this type are
|
||||
/// strictly less than 2<sup><i>MAX_EXP</i></sup>.
|
||||
#[unstable(feature = "f16", issue = "116909")]
|
||||
pub const MAX_EXP: i32 = 16;
|
||||
|
||||
|
|
|
|||
|
|
@ -440,16 +440,22 @@ impl f32 {
|
|||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||
pub const MAX: f32 = 3.40282347e+38_f32;
|
||||
|
||||
/// One greater than the minimum possible normal power of 2 exponent.
|
||||
/// One greater than the minimum possible *normal* power of 2 exponent
|
||||
/// for a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).
|
||||
///
|
||||
/// If <i>x</i> = `MIN_EXP`, then normal numbers
|
||||
/// ≥ 0.5 × 2<sup><i>x</i></sup>.
|
||||
/// This corresponds to the exact minimum possible *normal* power of 2 exponent
|
||||
/// for a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).
|
||||
/// In other words, all normal numbers representable by this type are
|
||||
/// greater than or equal to 0.5 × 2<sup><i>MIN_EXP</i></sup>.
|
||||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||
pub const MIN_EXP: i32 = -125;
|
||||
/// Maximum possible power of 2 exponent.
|
||||
/// One greater than the maximum possible power of 2 exponent
|
||||
/// for a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).
|
||||
///
|
||||
/// If <i>x</i> = `MAX_EXP`, then normal numbers
|
||||
/// < 1 × 2<sup><i>x</i></sup>.
|
||||
/// This corresponds to the exact maximum possible power of 2 exponent
|
||||
/// for a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).
|
||||
/// In other words, all numbers representable by this type are
|
||||
/// strictly less than 2<sup><i>MAX_EXP</i></sup>.
|
||||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||
pub const MAX_EXP: i32 = 128;
|
||||
|
||||
|
|
|
|||
|
|
@ -439,16 +439,22 @@ impl f64 {
|
|||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||
pub const MAX: f64 = 1.7976931348623157e+308_f64;
|
||||
|
||||
/// One greater than the minimum possible normal power of 2 exponent.
|
||||
/// One greater than the minimum possible *normal* power of 2 exponent
|
||||
/// for a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).
|
||||
///
|
||||
/// If <i>x</i> = `MIN_EXP`, then normal numbers
|
||||
/// ≥ 0.5 × 2<sup><i>x</i></sup>.
|
||||
/// This corresponds to the exact minimum possible *normal* power of 2 exponent
|
||||
/// for a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).
|
||||
/// In other words, all normal numbers representable by this type are
|
||||
/// greater than or equal to 0.5 × 2<sup><i>MIN_EXP</i></sup>.
|
||||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||
pub const MIN_EXP: i32 = -1021;
|
||||
/// Maximum possible power of 2 exponent.
|
||||
/// One greater than the maximum possible power of 2 exponent
|
||||
/// for a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).
|
||||
///
|
||||
/// If <i>x</i> = `MAX_EXP`, then normal numbers
|
||||
/// < 1 × 2<sup><i>x</i></sup>.
|
||||
/// This corresponds to the exact maximum possible power of 2 exponent
|
||||
/// for a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).
|
||||
/// In other words, all numbers representable by this type are
|
||||
/// strictly less than 2<sup><i>MAX_EXP</i></sup>.
|
||||
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
|
||||
pub const MAX_EXP: i32 = 1024;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue