Skip to content

Commit 73179d2

Browse files
committed
fix behavior at 0
1 parent 4fe2d3b commit 73179d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/besselj.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function besselj0(x::Float64)
7373
isinf(x) && return zero(x)
7474

7575
if x < 25.0
76-
x<pi/2 && return evalpoly(x*x, (0.9999999999999997, -0.24999999999998027, 0.015624999999831789, -0.00043402777723176535, 6.78168315716265e-6, -6.781608601544183e-8, 4.705878468811015e-10, -2.311849729995118e-12))
76+
x<pi/2 && return evalpoly(x*x, (1.0, -0.25, 0.01562499999999994, -0.00043402777777725544, 6.781684026082576e-6, -6.781683757550061e-8, 4.709479394601058e-10, -2.4016837144506874e-12, 9.104258208703104e-15))
7777
n = round(Int, fma(2/pi,x,-1/2))
7878
root = @inbounds PTS[n]
7979
r = x - root[1] - root[2]

0 commit comments

Comments
 (0)