@@ -73,8 +73,9 @@ mod cmath {
7373 }
7474}
7575
76- // FIXME(#11621): These constants should be deprecated once CTFE is implemented
77- // in favour of calling their respective functions in `Bounded` and `Float`.
76+ // FIXME(#5527): These constants should be deprecated once associated
77+ // constants are implemented in favour of referencing the respective
78+ // members of `Bounded` and `Float`.
7879
7980pub static RADIX : uint = 2 u;
8081
@@ -83,9 +84,11 @@ pub static DIGITS: uint = 15u;
8384
8485pub static EPSILON : f64 = 2.2204460492503131e-16_f64 ;
8586
86- /// Minimum normalized f64 value
87- pub static MIN_VALUE : f64 = 2.2250738585072014e-308_f64 ;
88- /// Maximum f64 value
87+ /// Smallest finite f64 value
88+ pub static MIN_VALUE : f64 = -1.7976931348623157e+308_f64 ;
89+ /// Smallest positive, normalized f64 value
90+ pub static MIN_POS_VALUE : f64 = 2.2250738585072014e-308_f64 ;
91+ /// Largest finite f64 value
8992pub static MAX_VALUE : f64 = 1.7976931348623157e+308_f64 ;
9093
9194pub static MIN_EXP : int = -1021 ;
@@ -104,8 +107,9 @@ pub static NEG_INFINITY: f64 = -1.0_f64/0.0_f64;
104107pub mod consts {
105108 // FIXME: replace with mathematical constants from cmath.
106109
107- // FIXME(#11621): These constants should be deprecated once CTFE is
108- // implemented in favour of calling their respective functions in `Float`.
110+ // FIXME(#5527): These constants should be deprecated once associated
111+ // constants are implemented in favour of referencing the respective members
112+ // of `Float`.
109113
110114 /// Archimedes' constant
111115 pub static PI : f64 = 3.14159265358979323846264338327950288_f64 ;
@@ -330,25 +334,28 @@ impl Float for f64 {
330334 }
331335
332336 #[ inline]
333- fn mantissa_digits ( _: Option < f64 > ) -> uint { 53 }
337+ fn mantissa_digits ( _: Option < f64 > ) -> uint { MANTISSA_DIGITS }
334338
335339 #[ inline]
336- fn digits ( _: Option < f64 > ) -> uint { 15 }
340+ fn digits ( _: Option < f64 > ) -> uint { DIGITS }
337341
338342 #[ inline]
339- fn epsilon ( ) -> f64 { 2.2204460492503131e-16 }
343+ fn epsilon ( ) -> f64 { EPSILON }
340344
341345 #[ inline]
342- fn min_exp ( _: Option < f64 > ) -> int { - 1021 }
346+ fn min_exp ( _: Option < f64 > ) -> int { MIN_EXP }
343347
344348 #[ inline]
345- fn max_exp ( _: Option < f64 > ) -> int { 1024 }
349+ fn max_exp ( _: Option < f64 > ) -> int { MAX_EXP }
346350
347351 #[ inline]
348- fn min_10_exp ( _: Option < f64 > ) -> int { - 307 }
352+ fn min_10_exp ( _: Option < f64 > ) -> int { MIN_10_EXP }
349353
350354 #[ inline]
351- fn max_10_exp ( _: Option < f64 > ) -> int { 308 }
355+ fn max_10_exp ( _: Option < f64 > ) -> int { MAX_10_EXP }
356+
357+ #[ inline]
358+ fn min_pos_value ( _: Option < f64 > ) -> f64 { MIN_POS_VALUE }
352359
353360 /// Constructs a floating point number by multiplying `x` by 2 raised to the
354361 /// power of `exp`
0 commit comments