* log(x) = a+b to 63 bits, with a rounded to 26 bits.
*/
struct Double
-#ifdef _ANSI_SOURCE
__log__D(double x)
-#else
-__log__D(x) double x;
-#endif
{
int m, j;
double F, f, g, q, u, v, u2;
static const double zero = 0., one = 1.0, tiny = 1e-300;
double
-tgamma(x)
- double x;
+tgamma(double x)
{
struct Double u;
* Accurate to max(ulp(1/128) absolute, 2^-66 relative) error.
*/
static struct Double
-large_gam(x)
- double x;
+large_gam(double x)
{
double z, p;
struct Double t, u, v;
* It also has correct monotonicity.
*/
static double
-small_gam(x)
- double x;
+small_gam(double x)
{
double y, ym1, t;
struct Double yy, r;
* Good on (0, 1+x0+LEFT]. Accurate to 1ulp.
*/
static double
-smaller_gam(x)
- double x;
+smaller_gam(double x)
{
double t, d;
struct Double r, xx;
* returns (z+c)^2 * P(z)/Q(z) + a0
*/
static struct Double
-ratfun_gam(z, c)
- double z, c;
+ratfun_gam(double z, double c)
{
double p, q;
struct Double r, t;
}
static double
-neg_gam(x)
- double x;
+neg_gam(double x)
{
int sgn = 1;
struct Double lg, lsine;
#define ASSERT(p) if (!(p)) botch("p")
#include <stdio.h>
static void
-botch(s)
- char *s;
+botch(char *s)
{
fprintf(stderr, "\r\nassertion botched: %s\r\n", s);
(void) fflush(stderr); /* just in case user buffered it */
#define TRACE() rtld_printf("TRACE %s:%d\n", __FILE__, __LINE__)
void *
-malloc(nbytes)
- size_t nbytes;
+malloc(size_t nbytes)
{
register union overhead *op;
register int bucket;
* Allocate more memory to the indicated bucket.
*/
static void
-morecore(bucket)
- int bucket;
+morecore(int bucket)
{
register union overhead *op;
register int sz; /* size of desired block */
}
void
-free(cp)
- void *cp;
+free(void *cp)
{
register int size;
register union overhead *op;
int realloc_srchlen = 4; /* 4 should be plenty, -1 =>'s whole list */
void *
-realloc(cp, nbytes)
- void *cp;
- size_t nbytes;
+realloc(void *cp, size_t nbytes)
{
register u_int onb;
register int i;
* Return bucket number, or -1 if not found.
*/
static int
-findbucket(freep, srchlen)
- union overhead *freep;
- int srchlen;
+findbucket(union overhead *freep, int srchlen)
{
register union overhead *p;
register int i, j;
* for each size category, the second showing the number of mallocs -
* frees for each size category.
*/
-mstats(s)
- char *s;
+void
+mstats(char *s)
{
register int i, j;
register union overhead *p;
static int
-morepages(n)
-int n;
+morepages(int n)
{
int fd = -1;
int offset;