DataInterpolations.jl
DataInterpolations.jl copied to clipboard
Use barycentric formula for Lagrange interpolation
It looks like you are using the textbook Lagrange interpolation formula. Trefethen has some articles on why this is numerically unstable and you should use the alternative barycentric formula instead. (This evaluates exactly the same interpolating polynomial in a different way.)
https://people.maths.ox.ac.uk/trefethen/barycentric.pdf
Yes thanks. We had discussed this a bit before but didn't get around to it since I don't think this interpolation is really used as much as the others. That said, with those notes right here it's a pretty good first issue so I'll mark it as such as probably use this as a GSoC training issue.
For those who are interested, there are some implementations (the second one is my version). Feel free to copy and paste: