Algorithm in C to calculate coefficients of polynomial using Lagrange interpolation
问题 I've been stuck on this for a while now. I'm writing an algorithm in C to pull out the coefficients of a polynomial using Lagrange's interpolation method. My code partially works, for instance if we do the first example here http://en.wikipedia.org/wiki/Lagrange_polynomial#Example_1 then the code can print out the first 2 coefficients (0 and 4.834848) Similarly with example 3 on that article, it will print the 2 coefficients 6 and -11. I need to be able to accurately get all the coefficients