Skip to content

Commit f05c188

Browse files
committed
Fix negative zero tests for gamma function
1 parent 37b3466 commit f05c188

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/std/src/f32/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ fn test_gamma() {
662662
assert_approx_eq!(0.5f32.gamma(), consts::PI.sqrt());
663663
assert_approx_eq!((-0.5f32).gamma(), -2.0 * consts::PI.sqrt());
664664
assert_eq!(0.0f32.gamma(), f32::INFINITY);
665-
assert_eq!(-0.0f32.gamma(), f32::NEG_INFINITY);
665+
assert_eq!((-0.0f32).gamma(), f32::NEG_INFINITY);
666666
assert!((-1.0f32).gamma().is_nan());
667667
assert!((-2.0f32).gamma().is_nan());
668668
assert!(f32::NAN.gamma().is_nan());

library/std/src/f64/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ fn test_gamma() {
645645
assert_approx_eq!(0.5f64.gamma(), consts::PI.sqrt());
646646
assert_approx_eq!((-0.5f64).gamma(), -2.0 * consts::PI.sqrt());
647647
assert_eq!(0.0f64.gamma(), f64::INFINITY);
648-
assert_eq!(-0.0f64.gamma(), f64::NEG_INFINITY);
648+
assert_eq!((-0.0f64).gamma(), f64::NEG_INFINITY);
649649
assert!((-1.0f64).gamma().is_nan());
650650
assert!((-2.0f64).gamma().is_nan());
651651
assert!(f64::NAN.gamma().is_nan());

0 commit comments

Comments
 (0)