1 /* @(#)w_lgamma.c 5.1 93/09/24 */ 2 /* 3 * ==================================================== 4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 5 * 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 7 * Permission to use, copy, modify, and distribute this 8 * software is freely granted, provided that this notice 9 * is preserved. 10 * ==================================================== 11 */ 12 13 /* LINTLIBRARY */ 14 15 /* double lgamma(double x) 16 * Return the logarithm of the Gamma function of x. 17 * 18 * Method: call lgamma_r 19 */ 20 21 #include <sys/cdefs.h> 22 #include <float.h> 23 #include <math.h> 24 25 #include "math_private.h" 26 27 extern int signgam; 28 29 double 30 lgamma(double x) 31 { 32 return lgamma_r(x,&signgam); 33 } 34 35 #if LDBL_MANT_DIG == 53 36 #ifdef lint 37 /* PROTOLIB1 */ 38 long double lgammal(long double); 39 #else /* lint */ 40 __weak_alias(lgammal, lgamma); 41 #endif /* lint */ 42 #endif /* LDBL_MANT_DIG == 53 */ 43