Skip to content

Commit 3cfea99

Browse files
committed
add some more gamma function tests
1 parent d7278f9 commit 3cfea99

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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)