Skip to content

Commit 0f7c9b2

Browse files
committed
Move test to be in a groups with all other similar tests
1 parent 185f2b2 commit 0f7c9b2

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

tests/gamma_test.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ fn test_gamma_edge_cases() {
104104
99999999.42278434,
105105
max_relative = 1.5 * f64::EPSILON
106106
);
107+
// Computed with WolframAlpha: https://www.wolframalpha.com/input?i=Gamma%281e-15%29
108+
assert_relative_eq!(
109+
gamma(1e-15),
110+
999999999999999.4,
111+
max_relative = 2.0 * f64::EPSILON
112+
);
107113
// Computed with WolframAlpha: https://www.wolframalpha.com/input?i=Gamma%5B2.2250738585072014E-308%5D.
108114
assert_relative_eq!(gamma(f64::MIN_POSITIVE), 4.4942328371557897e307);
109115

@@ -114,14 +120,6 @@ fn test_gamma_edge_cases() {
114120
// Test near-integer negative values
115121
assert_relative_eq!(gamma(-1.5), 4.0 * sqrt_pi / 3.0);
116122

117-
// Test value very close to 0 but positive
118-
// Computed with WolframAlpha: https://www.wolframalpha.com/input?i=Gamma%281e-15%29
119-
assert_relative_eq!(
120-
gamma(1e-15),
121-
999999999999999.4,
122-
max_relative = 2.0 * f64::EPSILON
123-
);
124-
125123
// Test integer factorials
126124
// Γ(6) = 5! = 120
127125
assert_eq!(gamma(6.0), 120.0);

0 commit comments

Comments
 (0)