File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 66/// <https://en.wikipedia.org/wiki/Double-precision_floating-point_format> and
77/// <https://en.wikipedia.org/wiki/Single-precision_floating-point_format>
88pub trait FloatParts : std:: fmt:: Debug {
9+ #[ cfg( test) ]
910 /// Max exponent value still being a finite (normal) number.
1011 fn exponent_normal_max ( ) -> u16 ;
1112
13+ #[ cfg( test) ]
1214 /// Max fraction value still being a finite (normal) number.
1315 fn fraction_normal_max ( ) -> u64 ;
1416
@@ -61,10 +63,12 @@ pub trait FloatParts: std::fmt::Debug {
6163}
6264
6365impl FloatParts for f32 {
66+ #[ cfg( test) ]
6467 fn exponent_normal_max ( ) -> u16 {
6568 0xfe
6669 }
6770
71+ #[ cfg( test) ]
6872 fn fraction_normal_max ( ) -> u64 {
6973 0x7fffff
7074 }
@@ -87,10 +91,12 @@ impl FloatParts for f32 {
8791}
8892
8993impl FloatParts for f64 {
94+ #[ cfg( test) ]
9095 fn exponent_normal_max ( ) -> u16 {
9196 0x7fe
9297 }
9398
99+ #[ cfg( test) ]
94100 fn fraction_normal_max ( ) -> u64 {
95101 0xfffffffffffff
96102 }
You can’t perform that action at this time.
0 commit comments