Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
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
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.