Does ROOT have a suitable analog for CERNLIB's divdif

I’m converting some old fortran code to C++ and I’m having difficulty finding a good ROOT alternative (or any suitable c++ alternative in another library) for cernlib’s divdif routine (described here: cmd.inp.nsk.su/old/cmd2/manuals/ … de111.html)

Any suggestions are welcome! And an example implementation might be appreciated as well. Thanks so much!

Hi,

You can use the Interpolation class in ROOT, available in the MathMore library.
The class is ROOT::Math::Interpolator,
see root.cern.ch/function-interpolation

and also the reference documentation at

root.cern.ch/doc/v606/classROOT … lator.html

Alternatively you can use the TGraph class and the TGraph::Eval method

Best Regards

Lorenzo