blob: 46e7c25b19c7677f992cb5a010437edc0f79ba98 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08002/*
3 * ====================================================
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5 *
6 * Developed at SunSoft, 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
Elliott Hughes4088e3a2023-08-03 13:33:56 -070014/* lgamma(x)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015 * Return the logarithm of the Gamma function of x.
16 *
Elliott Hughes4088e3a2023-08-03 13:33:56 -070017 * Method: call lgamma_r
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080018 */
19
Elliott Hughes75531852014-09-18 11:23:58 -070020#include <float.h>
21
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080022#include "math.h"
23#include "math_private.h"
24
25extern int signgam;
26
27double
Elliott Hughes4088e3a2023-08-03 13:33:56 -070028lgamma(double x)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029{
Elliott Hughes4088e3a2023-08-03 13:33:56 -070030 return lgamma_r(x,&signgam);
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080031}
Elliott Hughes75531852014-09-18 11:23:58 -070032
33#if (LDBL_MANT_DIG == 53)
34__weak_reference(lgamma, lgammal);
35#endif