File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ module Bessels
2
2
3
3
export besselj0
4
4
export besselj1
5
+ export besselj
5
6
6
7
export bessely0
7
8
export bessely1
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ function bessely1(x::Float64)
51
51
return p * SQ2OPI (T) / sqrt (x)
52
52
end
53
53
end
54
+ #=
54
55
function bessely(n::Int, x)
55
56
if n < 0
56
57
n = -n
@@ -74,6 +75,7 @@ function bessely(n::Int, x)
74
75
75
76
anm2 = bessely0(x)
76
77
anm1 = bessely1(x)
78
+ an = zero(x)
77
79
78
80
k = 1
79
81
r = 2 * k
@@ -87,3 +89,4 @@ function bessely(n::Int, x)
87
89
88
90
return sign * an
89
91
end
92
+ =#
Original file line number Diff line number Diff line change 1
1
# general array for testing input to SpecialFunctions.jl
2
- x = 0.01 : 0.01 : 100.0
2
+ x = 1e-6 : 0.01 : 100.0
3
3
4
4
# ## Tests for besselj0
5
5
j0_SpecialFunctions = SpecialFunctions. besselj0 .(big .(x)) # array to be tested against computed in BigFloats
@@ -58,3 +58,9 @@ j1_32 = besselj1.(Float32.(x))
58
58
# test that Inf inputs go to zero
59
59
@test besselj1 (Inf32 ) == zero (Float32)
60
60
@test besselj1 (Inf64 ) == zero (Float64)
61
+
62
+ # # Tests for besselj
63
+ # note this is not complete just a simple test
64
+
65
+ @test besselj (3 , 1.0 ) ≈ SpecialFunctions. besselj (3 , 1.0 )
66
+ @test besselj (- 5 , 6.1 ) ≈ SpecialFunctions. besselj (- 5 , 6.1 )
You can’t perform that action at this time.
0 commit comments