@@ -20,121 +20,121 @@ use mem;
20
20
use num:: Float ;
21
21
use num:: FpCategory as Fp ;
22
22
23
+ /// The radix or base of the internal representation of `f32`.
23
24
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
24
- #[ allow( missing_docs) ]
25
25
pub const RADIX : u32 = 2 ;
26
26
27
+ /// Number of significant digits in base 2.
27
28
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
28
- #[ allow( missing_docs) ]
29
29
pub const MANTISSA_DIGITS : u32 = 24 ;
30
+ /// Approximate number of significant digits in base 10.
30
31
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
31
- #[ allow( missing_docs) ]
32
32
pub const DIGITS : u32 = 6 ;
33
33
34
+ /// Difference between `1.0` and the next largest representable number.
34
35
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
35
- #[ allow( missing_docs) ]
36
36
pub const EPSILON : f32 = 1.19209290e-07_f32 ;
37
37
38
- /// Smallest finite f32 value
38
+ /// Smallest finite ` f32` value.
39
39
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
40
40
pub const MIN : f32 = -3.40282347e+38_f32 ;
41
- /// Smallest positive, normalized f32 value
41
+ /// Smallest positive normal ` f32` value.
42
42
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
43
43
pub const MIN_POSITIVE : f32 = 1.17549435e-38_f32 ;
44
- /// Largest finite f32 value
44
+ /// Largest finite ` f32` value.
45
45
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
46
46
pub const MAX : f32 = 3.40282347e+38_f32 ;
47
47
48
+ /// One greater than the minimum possible normal power of 2 exponent.
48
49
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
49
- #[ allow( missing_docs) ]
50
50
pub const MIN_EXP : i32 = -125 ;
51
+ /// Maximum possible power of 2 exponent.
51
52
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
52
- #[ allow( missing_docs) ]
53
53
pub const MAX_EXP : i32 = 128 ;
54
54
55
+ /// Minimum possible normal power of 10 exponent.
55
56
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
56
- #[ allow( missing_docs) ]
57
57
pub const MIN_10_EXP : i32 = -37 ;
58
+ /// Maximum possible power of 10 exponent.
58
59
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
59
- #[ allow( missing_docs) ]
60
60
pub const MAX_10_EXP : i32 = 38 ;
61
61
62
+ /// Not a Number (NaN).
62
63
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
63
- #[ allow( missing_docs) ]
64
64
pub const NAN : f32 = 0.0_f32 /0.0_f32 ;
65
+ /// Infinity (∞).
65
66
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
66
- #[ allow( missing_docs) ]
67
67
pub const INFINITY : f32 = 1.0_f32 /0.0_f32 ;
68
+ /// Negative infinity (-∞).
68
69
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
69
- #[ allow( missing_docs) ]
70
70
pub const NEG_INFINITY : f32 = -1.0_f32 /0.0_f32 ;
71
71
72
72
/// Basic mathematical constants.
73
73
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
74
74
pub mod consts {
75
75
// FIXME: replace with mathematical constants from cmath.
76
76
77
- /// Archimedes' constant
77
+ /// Archimedes' constant (π)
78
78
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
79
79
pub const PI : f32 = 3.14159265358979323846264338327950288_f32 ;
80
80
81
- /// pi/2.0
81
+ /// π/2
82
82
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
83
83
pub const FRAC_PI_2 : f32 = 1.57079632679489661923132169163975144_f32 ;
84
84
85
- /// pi/3.0
85
+ /// π/3
86
86
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
87
87
pub const FRAC_PI_3 : f32 = 1.04719755119659774615421446109316763_f32 ;
88
88
89
- /// pi/4.0
89
+ /// π/4
90
90
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
91
91
pub const FRAC_PI_4 : f32 = 0.785398163397448309615660845819875721_f32 ;
92
92
93
- /// pi/6.0
93
+ /// π/6
94
94
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
95
95
pub const FRAC_PI_6 : f32 = 0.52359877559829887307710723054658381_f32 ;
96
96
97
- /// pi/8.0
97
+ /// π/8
98
98
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
99
99
pub const FRAC_PI_8 : f32 = 0.39269908169872415480783042290993786_f32 ;
100
100
101
- /// 1.0/pi
101
+ /// 1/π
102
102
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
103
103
pub const FRAC_1_PI : f32 = 0.318309886183790671537767526745028724_f32 ;
104
104
105
- /// 2.0/pi
105
+ /// 2/π
106
106
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
107
107
pub const FRAC_2_PI : f32 = 0.636619772367581343075535053490057448_f32 ;
108
108
109
- /// 2.0 /sqrt(pi )
109
+ /// 2/sqrt(π )
110
110
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
111
111
pub const FRAC_2_SQRT_PI : f32 = 1.12837916709551257389615890312154517_f32 ;
112
112
113
- /// sqrt(2.0 )
113
+ /// sqrt(2)
114
114
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
115
115
pub const SQRT_2 : f32 = 1.41421356237309504880168872420969808_f32 ;
116
116
117
- /// 1.0 /sqrt(2.0 )
117
+ /// 1/sqrt(2)
118
118
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
119
119
pub const FRAC_1_SQRT_2 : f32 = 0.707106781186547524400844362104849039_f32 ;
120
120
121
- /// Euler's number
121
+ /// Euler's number (e)
122
122
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
123
123
pub const E : f32 = 2.71828182845904523536028747135266250_f32 ;
124
124
125
- /// log2 (e)
125
+ /// log<sub>2</sub> (e)
126
126
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
127
127
pub const LOG2_E : f32 = 1.44269504088896340735992468100189214_f32 ;
128
128
129
- /// log10 (e)
129
+ /// log<sub>10</sub> (e)
130
130
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
131
131
pub const LOG10_E : f32 = 0.434294481903251827651128918916605082_f32 ;
132
132
133
- /// ln(2.0 )
133
+ /// ln(2)
134
134
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
135
135
pub const LN_2 : f32 = 0.693147180559945309417232121458176568_f32 ;
136
136
137
- /// ln(10.0 )
137
+ /// ln(10)
138
138
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
139
139
pub const LN_10 : f32 = 2.30258509299404568401799145468436421_f32 ;
140
140
}
0 commit comments