@@ -171,7 +171,7 @@ impl f64 {
171171 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
172172 #[ inline]
173173 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 ) }
175175 }
176176
177177 /// Returns a number composed of the magnitude of `self` and the sign of
@@ -834,8 +834,8 @@ impl f64 {
834834 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
835835 #[ inline]
836836 pub fn asinh ( self ) -> f64 {
837- if self == NEG_INFINITY {
838- NEG_INFINITY
837+ if self == Self :: NEG_INFINITY {
838+ Self :: NEG_INFINITY
839839 } else {
840840 ( self + ( ( self * self ) + 1.0 ) . sqrt ( ) ) . ln ( ) . copysign ( self )
841841 }
@@ -857,7 +857,7 @@ impl f64 {
857857 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
858858 #[ inline]
859859 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 ( ) }
861861 }
862862
863863 /// Inverse hyperbolic tangent function.
@@ -926,16 +926,16 @@ impl f64 {
926926 if self > 0.0 {
927927 log_fn ( self )
928928 } else if self == 0.0 {
929- NEG_INFINITY // log(0) = -Inf
929+ Self :: NEG_INFINITY // log(0) = -Inf
930930 } else {
931- NAN // log(-n) = NaN
931+ Self :: NAN // log(-n) = NaN
932932 }
933933 } else if self . is_nan ( ) {
934934 self // log(NaN) = NaN
935935 } else if self > 0.0 {
936936 self // log(Inf) = Inf
937937 } else {
938- NAN // log(-Inf) = NaN
938+ Self :: NAN // log(-Inf) = NaN
939939 }
940940 }
941941 }
0 commit comments