Lagrangian Interpolation
03-08-2015, 06:02 AM (This post was last modified: 03-08-2015 07:59 PM by Thomas Klemm.)
Post: #5
 Thomas Klemm Senior Member Posts: 1,447 Joined: Dec 2013
RE: Lagrangian Interpolation
You could use the barycentric interpolation formula:
$L(x) = \frac{\sum_{j=0}^k \frac{w_j}{x-x_j}y_j}{\sum_{j=0}^k \frac{w_j}{x-x_j}}$

This avoids the nested loop at the cost of 3 additional registers for the weights $$w_j$$. These weights have to be computed only once for the given data-set.
With only 3 points you could even unroll the loop which would probably speed up the calculation.

Cheers
Thomas
 « Next Oldest | Next Newest »

 Messages In This Thread Lagrangian Interpolation - Namir - 12-18-2013, 06:04 AM RE: Lagrangian Interpolation - bshoring - 03-05-2015, 05:17 AM RE: Lagrangian Interpolation - PedroLeiva - 03-05-2015, 09:33 PM RE: Lagrangian Interpolation - bshoring - 03-07-2015, 11:49 PM RE: Lagrangian Interpolation - PedroLeiva - 03-09-2015, 03:37 AM RE: Lagrangian Interpolation - Thomas Klemm - 03-08-2015 06:02 AM RE: Lagrangian Interpolation - Thomas Klemm - 03-08-2015, 07:58 PM RE: Lagrangian Interpolation - bshoring - 03-09-2015, 03:30 AM RE: Lagrangian Interpolation - Thomas Klemm - 03-09-2015, 09:36 AM RE: Lagrangian Interpolation - bshoring - 03-09-2015, 09:50 PM RE: Lagrangian Interpolation - Thomas Klemm - 03-11-2015, 08:04 AM RE: Lagrangian Interpolation - bshoring - 03-13-2015, 05:33 AM RE: Lagrangian Interpolation - Newton Polynomial - bshoring - 04-04-2015, 07:40 PM RE: Lagrangian Interpolation - Thomas Klemm - 03-09-2019, 07:08 PM RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 03:55 PM RE: Lagrangian Interpolation - Thomas Klemm - 03-14-2019, 05:56 PM RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 07:22 PM RE: Lagrangian Interpolation - Thomas Klemm - 03-14-2019, 07:58 PM RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 08:12 PM

User(s) browsing this thread: 1 Guest(s)