File tree Expand file tree Collapse file tree 4 files changed +8
-20
lines changed Expand file tree Collapse file tree 4 files changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,13 @@ use crate::support::Float;
1313
1414#[ inline]
1515pub fn fmaximum < F : Float > ( x : F , y : F ) -> F {
16- let res = if x. is_nan ( ) {
16+ if x. is_nan ( ) {
1717 x
1818 } else if y. is_nan ( ) {
1919 y
2020 } else if x > y || ( y. biteq ( F :: NEG_ZERO ) && x. is_sign_positive ( ) ) {
2121 x
2222 } else {
2323 y
24- } ;
25-
26- // Canonicalize
27- res * F :: ONE
24+ }
2825}
Original file line number Diff line number Diff line change @@ -15,16 +15,13 @@ use crate::support::Float;
1515
1616#[ inline]
1717pub fn fmaximum_num < F : Float > ( x : F , y : F ) -> F {
18- let res = if x > y || y. is_nan ( ) {
18+ if x > y || y. is_nan ( ) {
1919 x
2020 } else if y > x || x. is_nan ( ) {
2121 y
2222 } else if x. is_sign_positive ( ) {
2323 x
2424 } else {
2525 y
26- } ;
27-
28- // Canonicalize
29- res * F :: ONE
26+ }
3027}
Original file line number Diff line number Diff line change @@ -13,16 +13,13 @@ use crate::support::Float;
1313
1414#[ inline]
1515pub fn fminimum < F : Float > ( x : F , y : F ) -> F {
16- let res = if x. is_nan ( ) {
16+ if x. is_nan ( ) {
1717 x
1818 } else if y. is_nan ( ) {
1919 y
2020 } else if x < y || ( x. biteq ( F :: NEG_ZERO ) && y. is_sign_positive ( ) ) {
2121 x
2222 } else {
2323 y
24- } ;
25-
26- // Canonicalize
27- res * F :: ONE
24+ }
2825}
Original file line number Diff line number Diff line change @@ -15,16 +15,13 @@ use crate::support::Float;
1515
1616#[ inline]
1717pub fn fminimum_num < F : Float > ( x : F , y : F ) -> F {
18- let res = if x > y || x. is_nan ( ) {
18+ if x > y || x. is_nan ( ) {
1919 y
2020 } else if y > x || y. is_nan ( ) {
2121 x
2222 } else if x. is_sign_positive ( ) {
2323 y
2424 } else {
2525 x
26- } ;
27-
28- // Canonicalize
29- res * F :: ONE
26+ }
3027}
You can’t perform that action at this time.
0 commit comments