Print this page
11210 libm should be cstyle(1ONBLD) clean
*** 20,29 ****
--- 20,30 ----
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
+
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
*** 63,85 ****
#include "libm.h"
#include "longdouble.h"
long double
! cosl(long double x) {
long double y[2], z = 0.0L;
int n, ix;
! ix = *(int *) &x; /* High word of x */
ix &= 0x7fffffff;
! if (ix <= 0x3ffe9220) /* |x| ~< pi/4 */
return (__k_cosl(x, z));
! else if (ix >= 0x7fff0000) /* trig(Inf or NaN) is NaN */
return (x - x);
! else { /* argument reduction needed */
n = __rem_pio2l(x, y);
switch (n & 3) {
case 0:
return (__k_cosl(y[0], y[1]));
case 1:
return (-__k_sinl(y[0], y[1]));
--- 64,89 ----
#include "libm.h"
#include "longdouble.h"
long double
! cosl(long double x)
! {
long double y[2], z = 0.0L;
int n, ix;
! ix = *(int *)&x; /* High word of x */
ix &= 0x7fffffff;
!
! if (ix <= 0x3ffe9220) { /* |x| ~< pi/4 */
return (__k_cosl(x, z));
! } else if (ix >= 0x7fff0000) { /* trig(Inf or NaN) is NaN */
return (x - x);
! } else { /* argument reduction needed */
n = __rem_pio2l(x, y);
+
switch (n & 3) {
case 0:
return (__k_cosl(y[0], y[1]));
case 1:
return (-__k_sinl(y[0], y[1]));
*** 87,94 ****
return (-__k_cosl(y[0], y[1]));
case 3:
return (__k_sinl(y[0], y[1]));
}
}
/* NOTREACHED */
! return 0.0L;
}
--- 91,99 ----
return (-__k_cosl(y[0], y[1]));
case 3:
return (__k_sinl(y[0], y[1]));
}
}
+
/* NOTREACHED */
! return (0.0L);
}