7
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rustの定数一覧

Last updated at Posted at 2016-11-21

i8 & i16 & i32 & i64


// MAX
std::i64::MAX

// MIN
std::i64::MIN

u8 & u16 & u32 & u64


// MAX
std::u32::MAX

// MIN
std::u32::MIN

f32 & f64

// ネイピア数e
std::f64::consts::E

// 1/π
std::f64::consts::FRAC_1_PI

// 1/sqrt(2)
std::f64::consts::FRAC_1_SQRT_2

// 2/π
std::f64::consts::FRAC_2_PI

// 2/sqrt(π)
std::f64::consts::FRAC_2_SQRT_PI

// π/2
std::f64::consts::FRAC_PI_2

// π/3
std::f64::consts::FRAC_PI_3

// π/4
std::f64::consts::FRAC_PI_4

// π/6
std::f64::consts::FRAC_PI_6

// π/8
std::f64::consts::FRAC_PI_8

// ln(10)
std::f64::consts::LN_10

// ln(2)
std::f64::consts::LN_2

// log10(e)
std::f64::consts::LOG10_E

// log2(e)
std::f64::consts::LOG2_E

// π
std::f64::consts::PI

// sqrt(2)
std::f64::consts::SQRT_2

// Approximate number of significant digits in base 10.
std::f64::DIGITS

// Difference between 1.0 and the next largest representable number.
std::f64::EPSILON

// Infinity
std::f64::INFINITY

// Number of significant digits in base 2.
std::f64::MANTISSA_DIGITS

// Largest finite f64 value.
std::f64::MAX

// Maximum possible power of 10 exponent.
std::f64::MAX_10_EXP

// Maximum possible power of 2 exponent.
std::f64::MAX_EXP

// Smallest finite f64 value.
std::f64::MIN

// Minimum possible normal power of 10 exponent.
std::f64::MIN_10_EXP

// One greater than the minimum possible normal power of 2 exponent.
std::f64::MIN_EXP

// Smallest positive normal f64 value.
std::f64::MIN_POSITIVE

// Not a Number (NaN).
std::f64::NAN

// Negative infinity
std::f64::NEG_INFINITY

// The radix or base of the internal representation of f64.
std::f64::RADIX
7
4
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?