Print this page
11210 libm should be cstyle(1ONBLD) clean
*** 16,28 ****
--- 16,30 ----
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
+
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
*** 36,46 ****
#endif
static const float zero = 0.0F, half = 0.5F;
fcomplex
! ccoshf(fcomplex z) {
float t, x, y, S, C;
double w;
int hx, ix, hy, iy, n;
fcomplex ans;
--- 38,49 ----
#endif
static const float zero = 0.0F, half = 0.5F;
fcomplex
! ccoshf(fcomplex z)
! {
float t, x, y, S, C;
double w;
int hx, ix, hy, iy, n;
fcomplex ans;
*** 52,61 ****
--- 55,65 ----
iy = hy & 0x7fffffff;
x = fabsf(x);
y = fabsf(y);
sincosf(y, &S, &C);
+
if (ix >= 0x41600000) { /* |x| > 14 = prec/2 (14,28,34,60) */
if (ix >= 0x42B171AA) { /* |x| > 88.722... ~ log(2**128) */
if (ix >= 0x7f800000) { /* |x| is inf or NaN */
if (iy == 0) {
F_RE(ans) = x;
*** 92,100 ****
--- 96,106 ----
} else {
F_RE(ans) = C * coshf(x);
F_IM(ans) = S * sinhf(x);
}
}
+
if ((hx ^ hy) < 0)
F_IM(ans) = -F_IM(ans);
+
return (ans);
}