Skip to content

numerical accuracy of the hermiteh function #280

Description

@barton-willis

I didn't find documentation about the numerical accuracy of the hermiteh function, so the following example isn't a bug, but it might surprise some users:

`
julia> using ClassicalOrthogonalPolynomials

julia> n,x = 50, -9.182406958129317
(50, -9.182406958129317)

julia> function bigrational(r::Rational)
return BigInt(numerator(r)) // BigInt(denominator(r))
end
bigrational (generic function with 1 method)

julia> Q = hermiteh(n,x)
-1.7132524505571502e43

julia> H = convert(Float64, hermiteh(n, bigrational(convert(Rational,x))))
-1.917927837463344e43

julia> (Q-H)/H
-0.10671693841041378

`

If all has gone well, H is the nearest binary64 to the value of the 50-th degree Hermite polynomial using the exact rational value of the binary64 number -9.182406958129317. The relative difference between H and Q rounds up to 11%

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions