File tree 1 file changed +12
-14
lines changed
1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -920,22 +920,20 @@ impl f64 {
920
920
fn log_wrapper < F : Fn ( f64 ) -> f64 > ( self , log_fn : F ) -> f64 {
921
921
if !cfg ! ( any( target_os = "solaris" , target_os = "illumos" ) ) {
922
922
log_fn ( self )
923
- } else {
924
- if self . is_finite ( ) {
925
- if self > 0.0 {
926
- log_fn ( self )
927
- } else if self == 0.0 {
928
- Self :: NEG_INFINITY // log(0) = -Inf
929
- } else {
930
- Self :: NAN // log(-n) = NaN
931
- }
932
- } else if self . is_nan ( ) {
933
- self // log(NaN) = NaN
934
- } else if self > 0.0 {
935
- self // log(Inf) = Inf
923
+ } else if self . is_finite ( ) {
924
+ if self > 0.0 {
925
+ log_fn ( self )
926
+ } else if self == 0.0 {
927
+ Self :: NEG_INFINITY // log(0) = -Inf
936
928
} else {
937
- Self :: NAN // log(-Inf ) = NaN
929
+ Self :: NAN // log(-n ) = NaN
938
930
}
931
+ } else if self . is_nan ( ) {
932
+ self // log(NaN) = NaN
933
+ } else if self > 0.0 {
934
+ self // log(Inf) = Inf
935
+ } else {
936
+ Self :: NAN // log(-Inf) = NaN
939
937
}
940
938
}
941
939
}
You can’t perform that action at this time.
0 commit comments