Skip to content

Commit c095ae2

Browse files
committed
add news update f16 test
1 parent 7ac0361 commit c095ae2

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ For bug fixes, performance enhancements, or fixes to unexported functions we wil
1919
### Fixed
2020
- fix cutoff in `bessely` to not return error for integer orders and small arguments (#33)
2121
- fix NaN return for small arguments (issue [#35]) in bessely (#40)
22+
- allow calling with integer argument and add float16 support (#40)
2223

2324
# Version 0.1.0
2425

test/besseli_test.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ end
8080
#Float 64
8181
m = 0:1:200; x = 0.1:0.5:150.0
8282
@test besseli(10, 1.0) isa Float64
83+
@test besseli(10, Float16(1.0)) isa Float16
84+
8385
@test besseli(2, 80.0) isa Float64
8486
@test besseli(112, 80.0) isa Float64
8587
t = [besseli(m, x) for m in m, x in x]

test/besselj_test.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ for v in nu, xx in x
110110
@test isapprox(Bessels.besseljy_positive_args(v, xx)[1], Float64(sf), rtol=5e-11)
111111
end
112112

113+
# test Float16
114+
@test besselj(10, Float16(1.0)) isa Float16
115+
113116
## test large arguments
114117
@test isapprox(besselj(10.0, 150.0), SpecialFunctions.besselj(10.0, 150.0), rtol=1e-12)
115118

test/besselk_test.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ for v in nu, xx in x
120120
@test isapprox(besselk(v, xx), Float64(sf), rtol=2e-13)
121121
end
122122

123+
# test Float16
124+
@test besselk(10, Float16(1.0)) isa Float16
125+
123126
# test Inf
124127
@test iszero(besselk(2, Inf))
125128

test/bessely_test.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ for v in nu, xx in x
8989
@test isapprox(Bessels.besseljy_positive_args(v, xx)[2], SpecialFunctions.bessely(v, xx), rtol=5e-12)
9090
end
9191

92+
# test Float16
93+
@test bessely(10, Float16(1.0)) isa Float16
94+
9295
# test limits for small arguments see https://github.com/JuliaMath/Bessels.jl/issues/35
9396
@test bessely(185.0, 1.01) == -Inf
9497
@test bessely(185.5, 1.01) == -Inf

0 commit comments

Comments
 (0)