17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 */
25 /*
26 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30 /* __rem_pio2l(x,y)
31 *
32 * return the remainder of x rem pi/2 in y[0]+y[1]
33 * by calling __rem_pio2m
34 */
35
36 #include "libm.h"
37
38 extern const int _TBL_ipio2l_inf[];
39
40 static const long double
41 two24l = 16777216.0L,
42 pio4 = 0.7853981633974483096156608458198757210495L;
43
44 int
45 __rem_pio2l(long double x, long double *y)
46 {
47 long double z, w;
48 double t[3], v[5];
49 int e0, i, nx, n, sign;
50
51 sign = signbitl(x);
52 z = fabsl(x);
53 if (z <= pio4) {
54 y[0] = x;
55 y[1] = 0;
56 return (0);
|
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 */
25 /*
26 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30 /* __rem_pio2l(x,y)
31 *
32 * return the remainder of x rem pi/2 in y[0]+y[1]
33 * by calling __rem_pio2m
34 */
35
36 #include "libm.h"
37 #include "longdouble.h"
38
39 extern const int _TBL_ipio2l_inf[];
40
41 static const long double
42 two24l = 16777216.0L,
43 pio4 = 0.7853981633974483096156608458198757210495L;
44
45 int
46 __rem_pio2l(long double x, long double *y)
47 {
48 long double z, w;
49 double t[3], v[5];
50 int e0, i, nx, n, sign;
51
52 sign = signbitl(x);
53 z = fabsl(x);
54 if (z <= pio4) {
55 y[0] = x;
56 y[1] = 0;
57 return (0);
|