New user function

Hello all

Someone can define a function just like:

new TF1(“func”,“sin(x)/x”,0,1)

and, in this case, sin(x) is a pre-defined function that can be used to make other formulas. This is the case for gaus, polN, etc.

In my situation, I need to define a new function, for instance myfunc(x) = srqt(ln(x)) and allow someone to use this just like any pre-defined function, for instance, to do:

new TF1(“func”,“myfunc([0]*x+[1])”,10,20);

In summary, I am looking for a way to create my own pre-defined function that can be used in TF1 just like any other already existing pre-defined functions. Is this possible?

best regards


See case 3 here: