Print this page
11210 libm should be cstyle(1ONBLD) clean
@@ -20,10 +20,11 @@
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
+
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,30 +32,32 @@
#include "libm.h" /* fabsl */
#include "complex_wrapper.h"
#include "longdouble.h"
-/* INDENT OFF */
static const long double zero = 0.0L;
-/* INDENT ON */
+
ldcomplex
-cprojl(ldcomplex z) {
+cprojl(ldcomplex z)
+{
long double x, y;
int hy;
x = LD_RE(z);
y = LD_IM(z);
#if defined(__x86)
- hy = ((int *) &y)[2] << 16;
+ hy = ((int *)&y)[2] << 16;
#else
- hy = ((int *) &y)[0];
+ hy = ((int *)&y)[0];
#endif
+
if (isinfl(y)) {
LD_RE(z) = fabsl(y);
LD_IM(z) = hy >= 0 ? zero : -zero;
} else if (isinfl(x)) {
LD_RE(z) = fabsl(x);
LD_IM(z) = hy >= 0 ? zero : -zero;
}
+
return (z);
}