Hi!
Yes, I just calculated the diff myself and came to the same conclusion. I will look at the coth stuff, thanks.
The purpose of the log_diff_exp_abs function is to be able to calculate what is called the "Bateman" function, i.e. in PK systems you often have the following form:
1/(a-b) * ( exp(-a*t) - exp(-b*t))
If a > b, then everything is straightforward. If a < b the result is still always positive, but using log_diff_exp does not work, as a - b is negative and hence only the total expression remains positive.
Doing this squaring and root thing solves the issue.
Sebastian
PS: I just had to find out, that the Bateman function seems to be, in general, differently defined if you refer to mathworld:
http://mathworld.wolfram.com/BatemanFunction.html