Deleted Added
full compact
e_lgammaf_r.c (97413) e_lgammaf_r.c (152869)
1/* e_lgammaf_r.c -- float version of e_lgamma_r.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 *
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
12 * is preserved.
13 * ====================================================
14 */
15
16#ifndef lint
1/* e_lgammaf_r.c -- float version of e_lgamma_r.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 *
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
12 * is preserved.
13 * ====================================================
14 */
15
16#ifndef lint
17static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_lgammaf_r.c 97413 2002-05-28 18:15:04Z alfred $";
17static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_lgammaf_r.c 152869 2005-11-28 04:58:57Z bde $";
18#endif
19
20#include "math.h"
21#include "math_private.h"
22
23static const float
24two23= 8.3886080000e+06, /* 0x4b000000 */
25half= 5.0000000000e-01, /* 0x3f000000 */

--- 67 unchanged lines hidden (view full) ---

93 static float sin_pif(float x)
94{
95 float y,z;
96 int n,ix;
97
98 GET_FLOAT_WORD(ix,x);
99 ix &= 0x7fffffff;
100
18#endif
19
20#include "math.h"
21#include "math_private.h"
22
23static const float
24two23= 8.3886080000e+06, /* 0x4b000000 */
25half= 5.0000000000e-01, /* 0x3f000000 */

--- 67 unchanged lines hidden (view full) ---

93 static float sin_pif(float x)
94{
95 float y,z;
96 int n,ix;
97
98 GET_FLOAT_WORD(ix,x);
99 ix &= 0x7fffffff;
100
101 if(ix<0x3e800000) return __kernel_sinf(pi*x,zero,0);
101 if(ix<0x3e800000) return __kernel_sindf(pi*x);
102 y = -x; /* x is assume negative */
103
104 /*
105 * argument reduction, make sure inexact flag not raised if input
106 * is an integer
107 */
108 z = floorf(y);
109 if(z!=y) { /* inexact anyway */

--- 7 unchanged lines hidden (view full) ---

117 if(ix<0x4b000000) z = y+two23; /* exact */
118 GET_FLOAT_WORD(n,z);
119 n &= 1;
120 y = n;
121 n<<= 2;
122 }
123 }
124 switch (n) {
102 y = -x; /* x is assume negative */
103
104 /*
105 * argument reduction, make sure inexact flag not raised if input
106 * is an integer
107 */
108 z = floorf(y);
109 if(z!=y) { /* inexact anyway */

--- 7 unchanged lines hidden (view full) ---

117 if(ix<0x4b000000) z = y+two23; /* exact */
118 GET_FLOAT_WORD(n,z);
119 n &= 1;
120 y = n;
121 n<<= 2;
122 }
123 }
124 switch (n) {
125 case 0: y = __kernel_sinf(pi*y,zero,0); break;
125 case 0: y = __kernel_sindf(pi*y); break;
126 case 1:
126 case 1:
127 case 2: y = __kernel_cosf(pi*((float)0.5-y),zero); break;
127 case 2: y = __kernel_cosdf(pi*((float)0.5-y)); break;
128 case 3:
128 case 3:
129 case 4: y = __kernel_sinf(pi*(one-y),zero,0); break;
129 case 4: y = __kernel_sindf(pi*(one-y)); break;
130 case 5:
130 case 5:
131 case 6: y = -__kernel_cosf(pi*(y-(float)1.5),zero); break;
132 default: y = __kernel_sinf(pi*(y-(float)2.0),zero,0); break;
131 case 6: y = -__kernel_cosdf(pi*(y-(float)1.5)); break;
132 default: y = __kernel_sindf(pi*(y-(float)2.0)); break;
133 }
134 return -y;
135}
136
137
138float
139__ieee754_lgammaf_r(float x, int *signgamp)
140{

--- 91 unchanged lines hidden ---
133 }
134 return -y;
135}
136
137
138float
139__ieee754_lgammaf_r(float x, int *signgamp)
140{

--- 91 unchanged lines hidden ---