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. */
*** 59,70 **** #pragma weak __atan2l = atan2l #include "libm.h" #include "longdouble.h" ! static const long double ! zero = 0.0L, tiny = 1.0e-40L, one = 1.0L, half = 0.5L, PI3o4 = 2.356194490192344928846982537459627163148L, PIo4 = 0.785398163397448309615660845819875721049L, --- 60,70 ---- #pragma weak __atan2l = atan2l #include "libm.h" #include "longdouble.h" ! static const long double zero = 0.0L, tiny = 1.0e-40L, one = 1.0L, half = 0.5L, PI3o4 = 2.356194490192344928846982537459627163148L, PIo4 = 0.785398163397448309615660845819875721049L,
*** 78,106 **** long double t, z; int k, m, signy, signx; if (x != x || y != y) return (x + y); /* return NaN if x or y is NAN */ signy = signbitl(y); signx = signbitl(x); if (x == one) return (atanl(y)); /* Ensure sign indicators are boolean */ m = (signy != 0) + (signx != 0) + (signx != 0); /* when y = 0 */ ! if (y == zero) switch (m) { case 0: return (y); /* atan(+0,+anything) */ case 1: return (y); /* atan(-0,+anything) */ case 2: return (PI + tiny); /* atan(+0,-anything) */ case 3: return (-PI - tiny); /* atan(-0,-anything) */ } /* when x = 0 */ if (x == zero) return (signy != 0 ? -PIo2 - tiny : PIo2 + tiny); --- 78,110 ---- long double t, z; int k, m, signy, signx; if (x != x || y != y) return (x + y); /* return NaN if x or y is NAN */ + signy = signbitl(y); signx = signbitl(x); + if (x == one) return (atanl(y)); + /* Ensure sign indicators are boolean */ m = (signy != 0) + (signx != 0) + (signx != 0); /* when y = 0 */ ! if (y == zero) { switch (m) { case 0: return (y); /* atan(+0,+anything) */ case 1: return (y); /* atan(-0,+anything) */ case 2: return (PI + tiny); /* atan(+0,-anything) */ case 3: return (-PI - tiny); /* atan(-0,-anything) */ } + } /* when x = 0 */ if (x == zero) return (signy != 0 ? -PIo2 - tiny : PIo2 + tiny);
*** 128,137 **** --- 132,142 ---- case 3: return (-PI - tiny); /* atan(-...,-INF) */ } } } + /* when y is INF */ if (!finitel(y)) return (signy != 0 ? -PIo2 - tiny : PIo2 + tiny); /* compute y/x */
*** 155,162 **** --- 160,168 ---- case 2: return (PI - (z - t)); /* atan(+,-) */ case 3: return ((z - t) - PI); /* atan(-,-) */ } + /* NOTREACHED */ return (0.0L); }