JuliaMath / openspecfun

A collection of special mathematical functions
Other
35 stars 20 forks source link

Possible hankelh1 bug #45

Closed ihnorton closed 2 years ago

ihnorton commented 8 years ago

From: https://groups.google.com/d/msg/julia-users/d7WwRqZtUGw/wwixIGiRBAAJ

This appears to be an AMOS issue, as SciPy and SciLab give the same answer (and both use AMOS from what I gather). Wolfram Alpha and mpmath give the correct answer.

> hankelh1(1,2e-32)
1.9490859162596872e15 - 3.1830988618379058e31im

whereas:

> besselj(1,2e-32) + im*bessely(1,2e-32)
1.0e-32 - 3.1830988618379067e31im

possibly related: https://github.com/scipy/scipy/issues/4517

ViralBShah commented 6 years ago

Should we also file this in SpecialFunctions.jl?

ViralBShah commented 2 years ago

Now, both give the same results in Julia and matches with Wolfram Alpha.

julia> hankelh1(1,2e-32)
1.0e-32 - 3.1830988618379067e31im

julia> besselj(1,2e-32) + im*bessely(1,2e-32)
1.0e-32 - 3.1830988618379067e31im

I think this can be marked as fixed.