Print this page
11210 libm should be cstyle(1ONBLD) clean

*** 20,37 **** */ /* * Copyright 2011 Nexenta Systems, Inc. All rights reserved. */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma weak __csinh = csinh ! /* INDENT OFF */ /* * dcomplex csinh(dcomplex z); * * z -z x -x * e - e e (cos(y)+i*sin(y)) - e (cos(-y)+i*sin(-y)) --- 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 __csinh = csinh ! /* * dcomplex csinh(dcomplex z); * * z -z x -x * e - e e (cos(y)+i*sin(y)) - e (cos(-y)+i*sin(-y))
*** 71,87 **** * csinh(inf,NaN) = (+-inf,NaN) * csinh(NaN,0) = (NaN,0) * csinh(NaN,y) = (NaN,NaN) for non-zero y * csinh(NaN,NaN) = (NaN,NaN) */ - /* INDENT ON */ #include "libm.h" /* cosh/exp/fabs/scalbn/sinh/sincos/__k_cexp */ #include "complex_wrapper.h" dcomplex ! csinh(dcomplex z) { double t, x, y, S, C; int hx, ix, lx, hy, iy, ly, n; dcomplex ans; x = D_RE(z); --- 72,88 ---- * csinh(inf,NaN) = (+-inf,NaN) * csinh(NaN,0) = (NaN,0) * csinh(NaN,y) = (NaN,NaN) for non-zero y * csinh(NaN,NaN) = (NaN,NaN) */ #include "libm.h" /* cosh/exp/fabs/scalbn/sinh/sincos/__k_cexp */ #include "complex_wrapper.h" dcomplex ! csinh(dcomplex z) ! { double t, x, y, S, C; int hx, ix, lx, hy, iy, ly, n; dcomplex ans; x = D_RE(z);
*** 94,103 **** --- 95,105 ---- iy = hy & 0x7fffffff; x = fabs(x); y = fabs(y); (void) sincos(y, &S, &C); + if (ix >= 0x403c0000) { /* |x| > 28 = prec/2 (14,28,34,60) */ if (ix >= 0x40862E42) { /* |x| > 709.78... ~ log(2**1024) */ if (ix >= 0x7ff00000) { /* |x| is inf or NaN */ if ((iy | ly) == 0) { D_RE(ans) = x;
*** 127,137 **** --- 129,142 ---- } else { D_RE(ans) = C * sinh(x); D_IM(ans) = S * cosh(x); } } + if (hx < 0) D_RE(ans) = -D_RE(ans); + if (hy < 0) D_IM(ans) = -D_IM(ans); + return (ans); }