From 53545aaddbebe394deb235cce916cf0c9568f386 Mon Sep 17 00:00:00 2001 From: Michael Helton Date: Tue, 11 Apr 2023 12:44:59 -0400 Subject: [PATCH 1/3] fix besselj0f32 --- src/besselj.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/besselj.jl b/src/besselj.jl index 32eb9bb..3eef78e 100644 --- a/src/besselj.jl +++ b/src/besselj.jl @@ -85,8 +85,8 @@ function _besselj0(x::Float32) w = sqrt(q) p = w * evalpoly(q, MO_j0(T)) w = q * q - xn = q * evalpoly(w, PH_j0(T)) - PIO4(Float32) - p = p * cos(xn + x) + xn = q * evalpoly(w, PH_j0(T)) + p = p * sin_sum(xn, PIO4(Float32), x) return p end end From 1bce8d3d29e890f2366f9c947bab6c096ab65c78 Mon Sep 17 00:00:00 2001 From: Michael Helton Date: Fri, 21 Apr 2023 16:42:27 -0400 Subject: [PATCH 2/3] fix f32 bug in besselj0_1 --- src/besselj.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/besselj.jl b/src/besselj.jl index 3eef78e..9d45d79 100644 --- a/src/besselj.jl +++ b/src/besselj.jl @@ -151,8 +151,8 @@ function _besselj1(x::Float32) w = sqrt(q) p = w * evalpoly(q, MO132) w = q * q - xn = q * evalpoly(w, PH132) - THPIO4(T) - p = p * cos(xn + x) + xn = q * evalpoly(w, PH132) + p = p * sin_sum(xn, -PIO4(T), x) return p * s end end From 03bda4b86629424869b1619caba17950e0403cc3 Mon Sep 17 00:00:00 2001 From: Michael Helton Date: Fri, 21 Apr 2023 16:46:52 -0400 Subject: [PATCH 3/3] use T --- src/besselj.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/besselj.jl b/src/besselj.jl index 9d45d79..96a3efa 100644 --- a/src/besselj.jl +++ b/src/besselj.jl @@ -86,7 +86,7 @@ function _besselj0(x::Float32) p = w * evalpoly(q, MO_j0(T)) w = q * q xn = q * evalpoly(w, PH_j0(T)) - p = p * sin_sum(xn, PIO4(Float32), x) + p = p * sin_sum(xn, PIO4(T), x) return p end end