Skip to content

Commit 9947757

Browse files
committed
add more large argument tests
1 parent e60b575 commit 9947757

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/math_constants.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,3 @@ const TWOOPI(::Type{Float32}) = 0.636619772367581343075535f0
2222
const THPIO4(::Type{Float32}) = 2.35619449019234492885f0
2323
const SQ2O2(::Type{Float32}) = 0.7071067811865476f0
2424
const SQPIO2(::Type{Float32}) = 1.25331413731550025f0
25-
const SQ2OPI(::Type{Float32}) = .79788456080286535588f0
26-
const PIO2(::Type{Float32}) = 1.5707963267948966f0
27-

test/besselj_test.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,14 @@ end
116116

117117
## test large arguments
118118
@test isapprox(besselj(10.0, 150.0), SpecialFunctions.besselj(10.0, 150.0), rtol=1e-12)
119+
@test isapprox(Bessels.besseljy_large_argument(15.0, 100.0)[1], SpecialFunctions.besselj(15.0, 100.0), rtol=1e-12)
120+
@test isapprox(Bessels.besseljy_large_argument(15.0, 45.0)[1], SpecialFunctions.besselj(15.0, 45.0), rtol=1e-12)
121+
@test isapprox(Bessels.besseljy_large_argument(15.0, 25.5)[1], SpecialFunctions.besselj(15.0, 25.5), rtol=1e-12)
119122

120123
# test BigFloat for single point
121124
@test isapprox(Bessels.besseljy_debye(big"2000", big"1500.0")[1], SpecialFunctions.besselj(big"2000", big"1500"), rtol=5e-20)
122125
@test isapprox(Bessels.besseljy_large_argument(big"20", big"1500.0")[1], SpecialFunctions.besselj(big"20", big"1500"), rtol=5e-20)
123126

124-
125127
# need to test accuracy of negative orders and negative arguments and all combinations within
126128
# SpecialFunctions.jl doesn't provide these so will hand check against hard values
127129
# values taken from https://keisan.casio.com/exec/system/1180573474 which match mathematica

0 commit comments

Comments
 (0)