From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <7b5cf09fd7ee547030c620733fb4cee1@terzarima.net> References: <7b5cf09fd7ee547030c620733fb4cee1@terzarima.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Pietro Gagliardi Subject: Re: [9fans] Problems with pcc Date: Sun, 18 Nov 2007 21:18:04 -0500 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Topicbox-Message-UUID: 009587c0-ead3-11e9-9d60-3106f5b1d025 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 */ }