Skip to content

Commit 9c793e1

Browse files
committed
Auto merge of rust-lang#3140 - RalfJung:gamma, r=RalfJung
add some more gamma function tests
2 parents a15eb7e + e83c8c1 commit 9c793e1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/tools/miri/tests/pass/intrinsics-math.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,8 @@ pub fn main() {
125125

126126
assert_approx_eq!(5.0f32.gamma(), 24.0);
127127
assert_approx_eq!(5.0f64.gamma(), 24.0);
128-
// These fail even on the host, precision seems to be terrible.
129-
//assert_approx_eq!(-0.5f32.gamma(), -2.0 * f32::consts::PI.sqrt());
130-
//assert_approx_eq!(-0.5f64.gamma(), -2.0 * f64::consts::PI.sqrt());
128+
assert_approx_eq!((-0.5f32).gamma(), (-2.0) * f32::consts::PI.sqrt());
129+
assert_approx_eq!((-0.5f64).gamma(), (-2.0) * f64::consts::PI.sqrt());
131130

132131
assert_eq!(2.0f32.ln_gamma(), (0.0, 1));
133132
assert_eq!(2.0f64.ln_gamma(), (0.0, 1));

0 commit comments

Comments
 (0)