File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -920,22 +920,20 @@ impl f64 {
920920 fn log_wrapper < F : Fn ( f64 ) -> f64 > ( self , log_fn : F ) -> f64 {
921921 if !cfg ! ( any( target_os = "solaris" , target_os = "illumos" ) ) {
922922 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
936928 } else {
937- Self :: NAN // log(-Inf ) = NaN
929+ Self :: NAN // log(-n ) = NaN
938930 }
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
939937 }
940938 }
941939}
You can’t perform that action at this time.
0 commit comments