|
| 1 | +using SpecialFunctions |
| 2 | + |
| 3 | +@testset "SpecialFunctions" for x in (1, -1, 0, 0.5, 10, -17.1, 1.5 + 0.7im) |
| 4 | + test_scalar(SpecialFunctions.erf, x) |
| 5 | + test_scalar(SpecialFunctions.erfc, x) |
| 6 | + test_scalar(SpecialFunctions.erfi, x) |
| 7 | + |
| 8 | + test_scalar(SpecialFunctions.airyai, x) |
| 9 | + test_scalar(SpecialFunctions.airyaiprime, x) |
| 10 | + test_scalar(SpecialFunctions.airybi, x) |
| 11 | + test_scalar(SpecialFunctions.airybiprime, x) |
| 12 | + |
| 13 | + test_scalar(SpecialFunctions.besselj0, x) |
| 14 | + test_scalar(SpecialFunctions.besselj1, x) |
| 15 | + |
| 16 | + test_scalar(SpecialFunctions.erfcx, x) |
| 17 | + test_scalar(SpecialFunctions.dawson, x) |
| 18 | + |
| 19 | + if x isa Real |
| 20 | + test_scalar(SpecialFunctions.invdigamma, x) |
| 21 | + end |
| 22 | + |
| 23 | + if x isa Real && 0 < x < 1 |
| 24 | + test_scalar(SpecialFunctions.erfinv, x) |
| 25 | + test_scalar(SpecialFunctions.erfcinv, x) |
| 26 | + end |
| 27 | + |
| 28 | + if x isa Real && x > 0 || x isa Complex |
| 29 | + test_scalar(SpecialFunctions.bessely0, x) |
| 30 | + test_scalar(SpecialFunctions.bessely1, x) |
| 31 | + test_scalar(SpecialFunctions.gamma, x) |
| 32 | + test_scalar(SpecialFunctions.digamma, x) |
| 33 | + test_scalar(SpecialFunctions.trigamma, x) |
| 34 | + test_scalar(SpecialFunctions.lgamma, x) |
| 35 | + end |
| 36 | +end |
0 commit comments