Print this page
11210 libm should be cstyle(1ONBLD) clean
*** 20,38 ****
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma weak __sincosl = sincosl
! /* INDENT OFF */
! /* cosl(x)
* Table look-up algorithm by K.C. Ng, November, 1989.
*
* kernel function:
* __k_sincosl ... sin and cos function on [-pi/4,pi/4]
* __rem_pio2l ... argument reduction routine
--- 20,40 ----
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
+
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma weak __sincosl = sincosl
! /* BEGIN CSTYLED */
! /*
! * cosl(x)
* Table look-up algorithm by K.C. Ng, November, 1989.
*
* kernel function:
* __k_sincosl ... sin and cos function on [-pi/4,pi/4]
* __rem_pio2l ... argument reduction routine
*** 57,79 ****
* trig(NaN) is that NaN;
*
* Accuracy:
* computer TRIG(x) returns trig(x) nearly rounded.
*/
! /* INDENT ON */
#include "libm.h"
#include "longdouble.h"
#include <sys/isa_defs.h>
void
! sincosl(long double x, long double *s, long double *c) {
long double y[2], z = 0.0L;
int n, ix;
#if defined(__i386) || defined(__amd64)
! int *px = (int *) &x;
#endif
/* trig(Inf or NaN) is NaN */
if (!finitel(x)) {
*s = *c = x - x;
--- 59,83 ----
* trig(NaN) is that NaN;
*
* Accuracy:
* computer TRIG(x) returns trig(x) nearly rounded.
*/
! /* END CSTYLED */
#include "libm.h"
#include "longdouble.h"
#include <sys/isa_defs.h>
void
! sincosl(long double x, long double *s, long double *c)
! {
long double y[2], z = 0.0L;
int n, ix;
+
#if defined(__i386) || defined(__amd64)
! int *px = (int *)&x;
#endif
/* trig(Inf or NaN) is NaN */
if (!finitel(x)) {
*s = *c = x - x;
*** 82,102 ****
/* High word of x. */
#if defined(__i386) || defined(__amd64)
XTOI(px, ix);
#else
! ix = *(int *) &x;
#endif
/* |x| ~< pi/4 */
ix &= 0x7fffffff;
- if (ix <= 0x3ffe9220)
- *s = __k_sincosl(x, z, c);
/* argument reduction needed */
else {
n = __rem_pio2l(x, y);
switch (n & 3) {
case 0:
*s = __k_sincosl(y[0], y[1], c);
break;
case 1:
--- 86,108 ----
/* High word of x. */
#if defined(__i386) || defined(__amd64)
XTOI(px, ix);
#else
! ix = *(int *)&x;
#endif
/* |x| ~< pi/4 */
ix &= 0x7fffffff;
+ if (ix <= 0x3ffe9220) {
+ *s = __k_sincosl(x, z, c);
+ }
/* argument reduction needed */
else {
n = __rem_pio2l(x, y);
+
switch (n & 3) {
case 0:
*s = __k_sincosl(y[0], y[1], c);
break;
case 1: