DataInterpolations.jl icon indicating copy to clipboard operation
DataInterpolations.jl copied to clipboard

Use barycentric formula for Lagrange interpolation

Open stevengj opened this issue 5 years ago • 3 comments

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.)

stevengj avatar Sep 14 '20 01:09 stevengj

https://people.maths.ox.ac.uk/trefethen/barycentric.pdf

stevengj avatar Sep 14 '20 01:09 stevengj

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.

ChrisRackauckas avatar Sep 14 '20 05:09 ChrisRackauckas

For those who are interested, there are some implementations (the second one is my version). Feel free to copy and paste:

AuroraDysis avatar Feb 22 '25 21:02 AuroraDysis