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.
*/
@@ -46,16 +47,18 @@
* atanhl(+-1) is +-INF with signal.
*
*/
static const long double zero = 0.0L, half = 0.5L, one = 1.0L;
-
long double
-atanhl(long double x) {
+atanhl(long double x)
+{
long double t;
t = fabsl(x);
+
if (t == one)
return (x / zero);
+
t = t / (one - t);
return (copysignl(half, x) * log1pl(t + t));
}