e_lgamma_r.c (97409) | e_lgamma_r.c (97413) |
---|---|
1/* @(#)er_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#ifndef lint | 1/* @(#)er_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#ifndef lint |
14static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_lgamma_r.c 97409 2002-05-28 17:51:46Z alfred $"; | 14static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_lgamma_r.c 97413 2002-05-28 18:15:04Z alfred $"; |
15#endif 16 17/* __ieee754_lgamma_r(x, signgamp) 18 * Reentrant version of the logarithm of the Gamma function 19 * with user provide pointer for the sign of Gamma(x). 20 * 21 * Method: 22 * 1. Argument Reduction for 0 < x <= 8 --- 171 unchanged lines hidden (view full) --- 194 case 5: 195 case 6: y = -__kernel_cos(pi*(y-1.5),zero); break; 196 default: y = __kernel_sin(pi*(y-2.0),zero,0); break; 197 } 198 return -y; 199} 200 201 | 15#endif 16 17/* __ieee754_lgamma_r(x, signgamp) 18 * Reentrant version of the logarithm of the Gamma function 19 * with user provide pointer for the sign of Gamma(x). 20 * 21 * Method: 22 * 1. Argument Reduction for 0 < x <= 8 --- 171 unchanged lines hidden (view full) --- 194 case 5: 195 case 6: y = -__kernel_cos(pi*(y-1.5),zero); break; 196 default: y = __kernel_sin(pi*(y-2.0),zero,0); break; 197 } 198 return -y; 199} 200 201 |
202 double __ieee754_lgamma_r(double x, int *signgamp) | 202double 203__ieee754_lgamma_r(double x, int *signgamp) |
203{ 204 double t,y,z,nadj,p,p1,p2,p3,q,r,w; 205 int i,hx,lx,ix; 206 207 EXTRACT_WORDS(hx,lx,x); 208 209 /* purge off +-inf, NaN, +-0, and negative arguments */ 210 *signgamp = 1; --- 84 unchanged lines hidden --- | 204{ 205 double t,y,z,nadj,p,p1,p2,p3,q,r,w; 206 int i,hx,lx,ix; 207 208 EXTRACT_WORDS(hx,lx,x); 209 210 /* purge off +-inf, NaN, +-0, and negative arguments */ 211 *signgamp = 1; --- 84 unchanged lines hidden --- |