blob: 9c4a30e6e135c3d21ba5201c057e8d8144c8746e [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001
2/* @(#)e_lgamma.c 1.3 95/01/18 */
3/*
4 * ====================================================
5 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6 *
7 * Developed at SunSoft, a Sun Microsystems, Inc. business.
8 * Permission to use, copy, modify, and distribute this
9 * software is freely granted, provided that this notice
10 * is preserved.
11 * ====================================================
12 *
13 */
14
Elliott Hughesa0ee0782013-01-30 19:06:37 -080015#include <sys/cdefs.h>
16__FBSDID("$FreeBSD$");
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017
Elliott Hughes4088e3a2023-08-03 13:33:56 -070018/* lgamma(x)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080019 * Return the logarithm of the Gamma function of x.
20 *
Elliott Hughes4088e3a2023-08-03 13:33:56 -070021 * Method: call lgamma_r
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080022 */
23
Elliott Hughes75531852014-09-18 11:23:58 -070024#include <float.h>
25
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080026#include "math.h"
27#include "math_private.h"
28
29extern int signgam;
30
31double
Elliott Hughes4088e3a2023-08-03 13:33:56 -070032lgamma(double x)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080033{
Elliott Hughes4088e3a2023-08-03 13:33:56 -070034 return lgamma_r(x,&signgam);
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080035}
Elliott Hughes75531852014-09-18 11:23:58 -070036
37#if (LDBL_MANT_DIG == 53)
38__weak_reference(lgamma, lgammal);
39#endif