The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | |
| 2 | /* @(#)e_gamma.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 Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 15 | #include <sys/cdefs.h> |
| 16 | __FBSDID("$FreeBSD$"); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | |
Elliott Hughes | 4088e3a | 2023-08-03 13:33:56 -0700 | [diff] [blame] | 18 | /* gamma(x) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 19 | * Return the logarithm of the Gamma function of x. |
| 20 | * |
Elliott Hughes | 4088e3a | 2023-08-03 13:33:56 -0700 | [diff] [blame] | 21 | * Method: call gamma_r |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 22 | */ |
| 23 | |
| 24 | #include "math.h" |
| 25 | #include "math_private.h" |
| 26 | |
| 27 | extern int signgam; |
| 28 | |
| 29 | double |
Elliott Hughes | 4088e3a | 2023-08-03 13:33:56 -0700 | [diff] [blame] | 30 | gamma(double x) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 31 | { |
Elliott Hughes | 4088e3a | 2023-08-03 13:33:56 -0700 | [diff] [blame] | 32 | return gamma_r(x,&signgam); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 33 | } |