summaryrefslogtreecommitdiff
path: root/src/math/atanhl.c
diff options
context:
space:
mode:
authornsz <nsz@port70.net>2012-03-19 23:41:19 +0100
committernsz <nsz@port70.net>2012-03-19 23:41:19 +0100
commit0cbb65479147ecdaa664e88cc2a5a925f3de502f (patch)
tree7b6dc53fcec6497d55746d3cc47f167a20b7aa57 /src/math/atanhl.c
parentb03255af77776703c8d48819e824d09f6f54ba86 (diff)
downloadmusl-0cbb65479147ecdaa664e88cc2a5a925f3de502f.tar.gz
code cleanup of named constants
zero, one, two, half are replaced by const literals The policy was to use the f suffix for float consts (1.0f), but don't use suffix for long double consts (these consts can be exactly represented as double).
Diffstat (limited to 'src/math/atanhl.c')
-rw-r--r--src/math/atanhl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/math/atanhl.c b/src/math/atanhl.c
index af0f856d..931bae32 100644
--- a/src/math/atanhl.c
+++ b/src/math/atanhl.c
@@ -34,7 +34,7 @@ long double atanhl(long double x)
return atanh(x);
}
#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
-static const long double zero = 0.0, one = 1.0, huge = 1e4900L;
+static const long double huge = 1e4900L;
long double atanhl(long double x)
{
@@ -48,15 +48,15 @@ long double atanhl(long double x)
/* |x| > 1 */
return (x-x)/(x-x);
if (ix == 0x3fff)
- return x/zero;
- if (ix < 0x3fe3 && huge+x > zero) /* x < 2**-28 */
+ return x/0.0;
+ if (ix < 0x3fe3 && huge+x > 0.0) /* x < 2**-28 */
return x;
SET_LDOUBLE_EXP(x, ix);
if (ix < 0x3ffe) { /* x < 0.5 */
t = x + x;
- t = 0.5*log1pl(t + t*x/(one-x));
+ t = 0.5*log1pl(t + t*x/(1.0 - x));
} else
- t = 0.5*log1pl((x + x)/(one - x));
+ t = 0.5*log1pl((x + x)/(1.0 - x));
if (se <= 0x7fff)
return t;
return -t;