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; fcomplex ! cexpf(fcomplex z) { fcomplex ans; float x, y, c, s; double t; int n, ix, iy, hx, hy; --- 38,49 ---- #endif static const float zero = 0.0F; fcomplex ! cexpf(fcomplex z) ! { fcomplex ans; float x, y, c, s; double t; int n, ix, iy, hx, hy;
*** 48,57 **** --- 51,61 ---- y = F_IM(z); hx = THE_WORD(x); hy = THE_WORD(y); ix = hx & 0x7fffffff; iy = hy & 0x7fffffff; + if (iy == 0) { /* y = 0 */ F_RE(ans) = expf(x); F_IM(ans) = y; } else if (ix == 0x7f800000) { /* x is +-inf */ if (hx < 0) {
*** 73,82 **** --- 77,87 ---- F_IM(ans) = x * s; } } } else { sincosf(y, &s, &c); + if (ix >= 0x42B171AA) { /* |x| > 88.722... ~ log(2**128) */ #if defined(__i386) && !defined(__amd64) int rp = __swapRP(fp_extended); #endif t = __k_cexp(x, &n);
*** 90,96 **** --- 95,102 ---- t = expf(x); F_RE(ans) = t * c; F_IM(ans) = t * s; } } + return (ans); }