Hi folks, I have just checked with Martin v. Löwis about that issue. Martin is quite C-standard-literal. The question arouse how to call the (already present) Gamma function in GiNaC once and for all. The standard ISO/IEC 9899:1999, frequently dubbed as C99, states:
7.12.8.3 The lgamma functions Synopsis #include <math.h> double lgamma(double x); float lgammaf(float x); long double lgammal(long double x);
Description
The lgamma functions compute the natural logarithm of the absolute value of gamma of x: log-e | G(x) |. A range error occurs if x is too large or if x is a negative.
Returns
The lgamma functions return the value of the natural logarithm of the absolute value of gamma of x.
7.12.8.4 The tgamma functions
Synopsis #include <math.h> double tgamma(double x); float tgammaf(float x); long double tgammal(long double x);
Description
The tgamma functions compute the gamma function of x: G(x). A domain error occurs if x is a negative integer or zero. A range error may occur if the magnitude of x is too large or too small.
Returns
The tgamma functions return the gamma function value.
The next revision of ISO/IEC 14882:1998 (the C++ standard) will follow this definition from the C standard. Since it is kind of a policy not to work against the language C++ I vote for forgetting about esthetic qualms and adopting this behaviour and call it ex tgamma(ex) in GiNaC 0.x.y | x>5. A function ex lgamma(ex) may be introduced as well to make the distinction clear. Any serious objections? -richy. -- Richard Kreckel <Richard.Kreckel@Uni-Mainz.DE> <http://wwwthep.physik.uni-mainz.de/~kreckel/>
participants (1)
-
Richard B. Kreckel