@@ -171,7 +171,7 @@ impl f64 {
171
171
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
172
172
#[ inline]
173
173
pub fn signum ( self ) -> f64 {
174
- if self . is_nan ( ) { NAN } else { 1.0_f64 . copysign ( self ) }
174
+ if self . is_nan ( ) { Self :: NAN } else { 1.0_f64 . copysign ( self ) }
175
175
}
176
176
177
177
/// Returns a number composed of the magnitude of `self` and the sign of
@@ -834,8 +834,8 @@ impl f64 {
834
834
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
835
835
#[ inline]
836
836
pub fn asinh ( self ) -> f64 {
837
- if self == NEG_INFINITY {
838
- NEG_INFINITY
837
+ if self == Self :: NEG_INFINITY {
838
+ Self :: NEG_INFINITY
839
839
} else {
840
840
( self + ( ( self * self ) + 1.0 ) . sqrt ( ) ) . ln ( ) . copysign ( self )
841
841
}
@@ -857,7 +857,7 @@ impl f64 {
857
857
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
858
858
#[ inline]
859
859
pub fn acosh ( self ) -> f64 {
860
- if self < 1.0 { NAN } else { ( self + ( ( self * self ) - 1.0 ) . sqrt ( ) ) . ln ( ) }
860
+ if self < 1.0 { Self :: NAN } else { ( self + ( ( self * self ) - 1.0 ) . sqrt ( ) ) . ln ( ) }
861
861
}
862
862
863
863
/// Inverse hyperbolic tangent function.
@@ -926,16 +926,16 @@ impl f64 {
926
926
if self > 0.0 {
927
927
log_fn ( self )
928
928
} else if self == 0.0 {
929
- NEG_INFINITY // log(0) = -Inf
929
+ Self :: NEG_INFINITY // log(0) = -Inf
930
930
} else {
931
- NAN // log(-n) = NaN
931
+ Self :: NAN // log(-n) = NaN
932
932
}
933
933
} else if self . is_nan ( ) {
934
934
self // log(NaN) = NaN
935
935
} else if self > 0.0 {
936
936
self // log(Inf) = Inf
937
937
} else {
938
- NAN // log(-Inf) = NaN
938
+ Self :: NAN // log(-Inf) = NaN
939
939
}
940
940
}
941
941
}
0 commit comments