diff options
author | kargl <kargl@FreeBSD.org> | 2014-09-01 16:24:25 +0000 |
---|---|---|
committer | kargl <kargl@FreeBSD.org> | 2014-09-01 16:24:25 +0000 |
commit | 0f1b23d08009b1254ae82712b5c976187d6c5729 (patch) | |
tree | b622a57a321f04ba48f87a6a09f283925be5a7d8 | |
parent | 39e0443a1c727f0754b8cb825e8d31a25530a5bd (diff) | |
download | FreeBSD-src-0f1b23d08009b1254ae82712b5c976187d6c5729.zip FreeBSD-src-0f1b23d08009b1254ae82712b5c976187d6c5729.tar.gz |
Fix a tab that somehow became 8 spaces.
Remove parentheses in a return statement to be consistent with the
rest of the file.
Rename sin_pi() in the float version to sin_pif().
Remove large comment that precedes sin_pif(). The comment
duplicates a comment in e_lgamma_r.c where the algorithm
is documented.
Requested by: bde
-rw-r--r-- | lib/msun/src/e_lgamma_r.c | 4 | ||||
-rw-r--r-- | lib/msun/src/e_lgammaf_r.c | 11 |
2 files changed, 5 insertions, 10 deletions
diff --git a/lib/msun/src/e_lgamma_r.c b/lib/msun/src/e_lgamma_r.c index 980c72c..87b8ea2 100644 --- a/lib/msun/src/e_lgamma_r.c +++ b/lib/msun/src/e_lgamma_r.c @@ -171,9 +171,9 @@ sin_pi(double x) y = -x; vz = y+0x1p52; /* depend on 0 <= y < 0x1p52 */ - z = vz-0x1p52; /* rint(y) for the above range */ + z = vz-0x1p52; /* rint(y) for the above range */ if (z == y) - return (zero); + return zero; vz = y+0x1p50; GET_LOW_WORD(n,vz); /* bits for rounded y (units 0.25) */ diff --git a/lib/msun/src/e_lgammaf_r.c b/lib/msun/src/e_lgammaf_r.c index 1d975f3..d13484e 100644 --- a/lib/msun/src/e_lgammaf_r.c +++ b/lib/msun/src/e_lgammaf_r.c @@ -89,13 +89,8 @@ w6 = -1.6309292987e-03; /* 0xbad5c4e8 */ static const float zero= 0.0000000000e+00; -/* - * Compute sin(pi*x) without actually doing the pi*x multiplication. - * sin_pi(x) is only called for x < 0 and |x| < 2**(p-1) where p is - * the precision of x. - */ static float -sin_pi(float x) +sin_pif(float x) { volatile float vz; float y,z; @@ -106,7 +101,7 @@ sin_pi(float x) vz = y+0x1p23F; /* depend on 0 <= y < 0x1p23 */ z = vz-0x1p23F; /* rintf(y) for the above range */ if (z == y) - return (zero); + return zero; vz = y+0x1p21F; GET_FLOAT_WORD(n,vz); /* bits for rounded y (units 0.25) */ @@ -155,7 +150,7 @@ __ieee754_lgammaf_r(float x, int *signgamp) if(hx<0) { if(ix>=0x4b000000) /* |x|>=2**23, must be -integer */ return one/zero; - t = sin_pi(x); + t = sin_pif(x); if(t==zero) return one/zero; /* -integer */ nadj = __ieee754_logf(pi/fabsf(t*x)); if(t<zero) *signgamp = -1; |