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%
I didn't find documentation about the numerical accuracy of the
hermitehfunction, 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,
His 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 betweenHandQrounds up to 11%