JuliaApproximation / SemiclassicalOrthogonalPolynomials.jl

A Julia repository for semiclassical orthogonal polynomials
MIT License
7 stars 3 forks source link

ForwardDiff vs BigFloat in SemiclassicalJacobiWeight #73

Open ioannisPApapadopoulos opened 1 year ago

ioannisPApapadopoulos commented 1 year ago

So I modified lines 49-52 in src/SemiclassicalJacobiPolynomials.jl from (t,a,b,c) = map(big, map(float, (P.t,P.a,P.b,P.c))) to (t,a,b,c) = P.t, P.a, P.b, P.c. This was because otherwise I was not able to use ForwardDiff to take derivatives of various things in the tests for twoband.

This seems to be an issue in general, I think we definitely need to use BigFloats here. Is there a smart way to get ForwarDiff working even after mapping to BigFloats? Or should I just harcode the tests to not use ForwardDiff?

dlfivefifty commented 1 year ago

If it doesn’t work that’s a bug in ForwardDiff.jl, so we just need to make a PR. (The bug would be that big(::Dual) doesn’t make a Dual{<:BigFloat}.)