On Nov 12, 2007, at 9:17 AM, Charles Forsyth wrote:
i've put an updated copy on sources in contrib/forsyth/hocplus.tgz .
just diff against the original to see the small changes (including
mkfile).
ape doesn't provide gamma or cbrt, but if they're in c99 i suppose
it could.
double cbrt(double x) { return pow(x, 1.0 / 3.0); }
APE does provide the log of gamma: /sys/src/ape/lib/ap/math/gamma.c.
The function is not referenced in any header file, and is called gamma
(). I changed its name to logofgamma and defined gamma as gammafunc
(to avoid name collisions with C99 compilers):
double gammafunc(double x)
{
double y;
y = exp(logofgamma(x));
return y * signgam; /* a global variable declared in the
gamma.c */
}