1

I was comparing results of spline interpolation in Mathematica and C++/gsl-library

Results of interpolation are different if I use Method -> "Spline", InterpolationOrder -> 3 in Mathematica and cubic spline in C++.

I believe this is due to difference in methods used by Mathematica and C++.

While the method spline interpolation is generated in C++ is known I have no idea what Mathematica calls a cubic spline (probably BSpline , but I am not sure as C++ doesn't seem to have implementation of BSpline, so I can't compare)

I thought of implementing C++ spline method in Mathematica to make one to one comparison to C++. Other option would be to learn what algorithm does Mathematica use for spline interpolation, but I believe it is not open source, or is it?

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
user1541776
  • 451
  • 2
  • 10
  • 2
    No, it is most certainly not open-source. Ping support, however: they seem pretty responsive to such internals questions. – ciao Mar 26 '14 at 20:44
  • 3
    You can try plotting the function together with its first and second derivatives to figure out what's going on. It should show clearly how the function is pieces together. – Szabolcs Mar 26 '14 at 21:36
  • The method underlying the "Spline" option is more or less elaborated in the accepted answer to the duplicate question. – J. M.'s missing motivation Jul 05 '15 at 16:44

0 Answers0