Skip to content

Commit f04da2f

Browse files
committed
Remove trailing whitespace from specfun files
1 parent ca7eeb1 commit f04da2f

File tree

4 files changed

+50
-50
lines changed

4 files changed

+50
-50
lines changed

src/specfun/e_rem_pio2.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Developed at SunSoft, a Sun Microsystems, Inc. business.
88
* Permission to use, copy, modify, and distribute this
9-
* software is freely granted, provided that this notice
9+
* software is freely granted, provided that this notice
1010
* is preserved.
1111
* ====================================================
1212
*
@@ -16,8 +16,8 @@
1616
//__FBSDID("$FreeBSD: src/lib/msun/src/e_rem_pio2.c,v 1.22 2011/06/19 17:07:58 kargl Exp $");
1717

1818
/* __ieee754_rem_pio2(x,y)
19-
*
20-
* return the remainder of x rem pi/2 in y[0]+y[1]
19+
*
20+
* return the remainder of x rem pi/2 in y[0]+y[1]
2121
* use __kernel_rem_pio2()
2222
*/
2323

@@ -58,7 +58,7 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
5858
extern
5959
#endif
6060
//__inline int
61-
int
61+
int
6262
__ieee754_rem_pio2(double x, double *y)
6363
{
6464
double z,w,t,r,fn;
@@ -147,30 +147,30 @@ __ieee754_rem_pio2(double x, double *y)
147147
{
148148
uint32_t high;
149149
j = ix>>20;
150-
y[0] = r-w;
150+
y[0] = r-w;
151151
GET_HIGH_WORD(high,y[0]);
152152
i = j-((high>>20)&0x7ff);
153153
if(i>16) { /* 2nd iteration needed, good to 118 */
154154
t = r;
155-
w = fn*pio2_2;
155+
w = fn*pio2_2;
156156
r = t-w;
157-
w = fn*pio2_2t-((t-r)-w);
157+
w = fn*pio2_2t-((t-r)-w);
158158
y[0] = r-w;
159159
GET_HIGH_WORD(high,y[0]);
160160
i = j-((high>>20)&0x7ff);
161161
if(i>49) { /* 3rd iteration need, 151 bits acc */
162162
t = r; /* will cover all possible cases */
163-
w = fn*pio2_3;
163+
w = fn*pio2_3;
164164
r = t-w;
165-
w = fn*pio2_3t-((t-r)-w);
165+
w = fn*pio2_3t-((t-r)-w);
166166
y[0] = r-w;
167167
}
168168
}
169169
}
170170
y[1] = (r-y[0])-w;
171171
return n;
172172
}
173-
/*
173+
/*
174174
* all other (large) arguments
175175
*/
176176
if(ix>=0x7ff00000) { /* x is inf or NaN */

src/specfun/k_rem_pio2.c

+37-37
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Developed at SunSoft, a Sun Microsystems, Inc. business.
88
* Permission to use, copy, modify, and distribute this
9-
* software is freely granted, provided that this notice
9+
* software is freely granted, provided that this notice
1010
* is preserved.
1111
* ====================================================
1212
*/
@@ -16,12 +16,12 @@
1616
/*
1717
* __kernel_rem_pio2(x,y,e0,nx,prec)
1818
* double x[],y[]; int e0,nx,prec;
19-
*
20-
* __kernel_rem_pio2 return the last three digits of N with
19+
*
20+
* __kernel_rem_pio2 return the last three digits of N with
2121
* y = x - N*pi/2
2222
* so that |y| < pi/2.
2323
*
24-
* The method is to compute the integer (mod 8) and fraction parts of
24+
* The method is to compute the integer (mod 8) and fraction parts of
2525
* (2/pi)*x without doing the full multiplication. In general we
2626
* skip the part of the product that are known to be a huge integer (
2727
* more accurately, = 0 mod 8 ). Thus the number of operations are
@@ -30,10 +30,10 @@
3030
* (2/pi) is represented by an array of 24-bit integers in ipio2[].
3131
*
3232
* Input parameters:
33-
* x[] The input value (must be positive) is broken into nx
33+
* x[] The input value (must be positive) is broken into nx
3434
* pieces of 24-bit integers in double precision format.
35-
* x[i] will be the i-th 24 bit of x. The scaled exponent
36-
* of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
35+
* x[i] will be the i-th 24 bit of x. The scaled exponent
36+
* of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
3737
* match x's up to 24 bits.
3838
*
3939
* Example of breaking a double positive z into x[0]+x[1]+x[2]:
@@ -85,8 +85,8 @@
8585
* the fraction part may be lost to cancelation before we
8686
* recompute.)
8787
*
88-
* jz local integer variable indicating the number of
89-
* terms of ipio2[] used.
88+
* jz local integer variable indicating the number of
89+
* terms of ipio2[] used.
9090
*
9191
* jx nx - 1
9292
*
@@ -106,9 +106,9 @@
106106
* exponent for q[i] would be q0-24*i.
107107
*
108108
* PIo2[] double precision array, obtained by cutting pi/2
109-
* into 24 bits chunks.
109+
* into 24 bits chunks.
110110
*
111-
* f[] ipio2[] in floating point
111+
* f[] ipio2[] in floating point
112112
*
113113
* iq[] integer array by breaking up q[] in 24-bits chunk.
114114
*
@@ -122,9 +122,9 @@
122122

123123
/*
124124
* Constants:
125-
* The hexadecimal values are the intended ones for the following
126-
* constants. The decimal values may be used, provided that the
127-
* compiler will convert from decimal to binary accurately enough
125+
* The hexadecimal values are the intended ones for the following
126+
* constants. The decimal values may be used, provided that the
127+
* compiler will convert from decimal to binary accurately enough
128128
* to produce the hexadecimal values shown.
129129
*/
130130

@@ -142,8 +142,8 @@ static const int init_jk[] = {3,4,4,6}; /* initial value for jk */
142142
/*
143143
* Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
144144
*
145-
* integer array, contains the (24*i)-th to (24*i+23)-th
146-
* bit of 2/pi after binary point. The corresponding
145+
* integer array, contains the (24*i)-th to (24*i+23)-th
146+
* bit of 2/pi after binary point. The corresponding
147147
* floating value is
148148
*
149149
* ipio2[i] * 2^(-24(i+1)).
@@ -152,17 +152,17 @@ static const int init_jk[] = {3,4,4,6}; /* initial value for jk */
152152
* For quad precision (e0 <= 16360, jk = 6), this is 686.
153153
*/
154154
static const int32_t ipio2[] = {
155-
0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,
156-
0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,
157-
0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,
158-
0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,
159-
0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,
160-
0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,
161-
0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
162-
0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,
163-
0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,
164-
0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,
165-
0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
155+
0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,
156+
0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,
157+
0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,
158+
0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,
159+
0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,
160+
0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,
161+
0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
162+
0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,
163+
0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,
164+
0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,
165+
0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
166166

167167
#if LDBL_MAX_EXP > 1024
168168
#if LDBL_MAX_EXP > 16384
@@ -287,7 +287,7 @@ static const double PIo2[] = {
287287
2.16741683877804819444e-51, /* 0x3569F31D, 0x00000000 */
288288
};
289289

290-
static const double
290+
static const double
291291
zero = 0.0,
292292
one = 1.0,
293293
two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
@@ -336,7 +336,7 @@ __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec)
336336
i = (iq[jz-1]>>(24-q0)); n += i;
337337
iq[jz-1] -= i<<(24-q0);
338338
ih = iq[jz-1]>>(23-q0);
339-
}
339+
}
340340
else if(q0==0) ih = iq[jz-1]>>23;
341341
else if(z>=0.5) ih=2;
342342

@@ -387,7 +387,7 @@ __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec)
387387
while(iq[jz]==0) { jz--; q0-=24;}
388388
} else { /* break z into 24-bit if necessary */
389389
z = scalbn(z,-q0);
390-
if(z>=two24) {
390+
if(z>=two24) {
391391
fw = (double)((int32_t)(twon24*z));
392392
iq[jz] = (int32_t)(z-two24*fw);
393393
jz += 1; q0 += 24;
@@ -412,30 +412,30 @@ __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec)
412412
case 0:
413413
fw = 0.0;
414414
for (i=jz;i>=0;i--) fw += fq[i];
415-
y[0] = (ih==0)? fw: -fw;
415+
y[0] = (ih==0)? fw: -fw;
416416
break;
417417
case 1:
418418
case 2:
419419
fw = 0.0;
420-
for (i=jz;i>=0;i--) fw += fq[i];
420+
for (i=jz;i>=0;i--) fw += fq[i];
421421
STRICT_ASSIGN(double,fw,fw);
422-
y[0] = (ih==0)? fw: -fw;
422+
y[0] = (ih==0)? fw: -fw;
423423
fw = fq[0]-fw;
424424
for (i=1;i<=jz;i++) fw += fq[i];
425-
y[1] = (ih==0)? fw: -fw;
425+
y[1] = (ih==0)? fw: -fw;
426426
break;
427427
case 3: /* painful */
428428
for (i=jz;i>0;i--) {
429-
fw = fq[i-1]+fq[i];
429+
fw = fq[i-1]+fq[i];
430430
fq[i] += fq[i-1]-fw;
431431
fq[i-1] = fw;
432432
}
433433
for (i=jz;i>1;i--) {
434-
fw = fq[i-1]+fq[i];
434+
fw = fq[i-1]+fq[i];
435435
fq[i] += fq[i-1]-fw;
436436
fq[i-1] = fw;
437437
}
438-
for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
438+
for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
439439
if(ih==0) {
440440
y[0] = fq[0]; y[1] = fq[1]; y[2] = fw;
441441
} else {

src/specfun/math_private.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ do { \
227227
* Common routine to process the arguments to nan(), nanf(), and nanl().
228228
*/
229229
void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
230-
230+
231231
#ifdef __GNUCLIKE_ASM
232232

233233
/* Asm versions of some functions. */

src/specfun/types-compat.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
#ifdef __linux__
99
/* Not sure what to do about __pure2 on linux */
10-
#define __pure2
10+
#define __pure2
1111
#endif
1212

1313
#if defined(_WIN32) || defined(__sun)
1414
/* Not sure what to do about __pure2 on windows */
15-
#define __pure2
15+
#define __pure2
1616
typedef uint8_t u_int8_t;
1717
typedef uint16_t u_int16_t;
1818
typedef uint32_t u_int32_t;

0 commit comments

Comments
 (0)