/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that returns gamma_r(x,y).  a sample program that 
   returns Gamma(x) where Camma(x) is defined as the integral, as t 
   goes from zero to infinity, of exp(-t) times t to the power (x-1) */
#include <stdio.h>
#include <math.h>

int main() {
    double x = -12.5;
    int *y, z;

    z = 1;
    y = &z;
    printf("ln|Gamma (%2.1f)| is %2.1f\n",x,gamma_r(x, y));
}
