Skip to content

Commit dba2aad

Browse files
authored
Merge pull request #98 from yha/hypergeom-tests
Hypergeom 1F1 tests
2 parents 0d53507 + df369b2 commit dba2aad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/hypergeom.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ using SpecialFunctions
2020
@test log(1+complex(x)) x*hypergeom([1.0, 1.0], 2.0, -x)
2121
@test (1-x)^-a hypergeom([a, 1.0], 1.0, x)
2222
@test asin(x) x*hypergeom([0.5, 0.5], 1.5, x^2)
23+
@test (exp(x)-1)/x hypergeom(1.0, 2.0, x)
24+
@test (1+x)*exp(x) hypergeom(2.0, 1.0, x)
2325

2426
#gsl function is unstable for b=2
2527
#@test x*sf_hyperg_U(1.0, 2.0, x) ≈ 1.0
@@ -35,6 +37,9 @@ using SpecialFunctions
3537
res = hypergeom_e([a, b], 1+a-b, -1.0)
3638
@test isapprox(res.val, (gamma(1+a-b)*gamma(1+a/2)/(gamma(1+a)*gamma(1+a/2-b))), atol=res.err)
3739

40+
#Kummer's transformation
41+
@test hypergeom(a,b,x) exp(x)*hypergeom(b-a,b,-x)
42+
3843
#NaN handling
3944
for (h, condition) in ((hypergeom, isnan), (hypergeom_e, r->isnan(r.val)))
4045
@test all(condition,

0 commit comments

Comments
 (0)