I wrote code that finds the root of the function whose name is provided among the arguments, I think I took it from Numerical Recipes. Sort of
rtsafe double-precision function (x_init, x1, x2, xacc, func, dfunc)
where func and dfunc are the names of two functions. Of course I use rtsafe with various func and dfunc functions. I would like to print the name of the func and dfunc functions being called when I'm inside rtsafe, because when there is an error in rtsafe, I would like to know which function I used. Sort of
write (,) "my func =", func
(?)
Does anyone know how to do this?
source share