Skip to content

Commit

Permalink
add some more gamma function tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Oct 25, 2023
1 parent d7278f9 commit 3cfea99
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/pass/intrinsics-math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ pub fn main() {

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

assert_eq!(2.0f32.ln_gamma(), (0.0, 1));
assert_eq!(2.0f64.ln_gamma(), (0.0, 1));
Expand Down

0 comments on commit 3cfea99

Please sign in to comment.