about summary refs log tree commit diff
path: root/src/math/sinhl.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/sinhl.c
parentb03255af77776703c8d48819e824d09f6f54ba86 (diff)
downloadmusl-0cbb65479147ecdaa664e88cc2a5a925f3de502f.tar.gz
musl-0cbb65479147ecdaa664e88cc2a5a925f3de502f.tar.xz
musl-0cbb65479147ecdaa664e88cc2a5a925f3de502f.zip
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/sinhl.c')
-rw-r--r--src/math/sinhl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/math/sinhl.c b/src/math/sinhl.c
index 2252dec9..8a54677e 100644
--- a/src/math/sinhl.c
+++ b/src/math/sinhl.c
@@ -35,7 +35,7 @@ long double sinhl(long double x)
 	return sinh(x);
 }
 #elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
-static const long double one = 1.0, huge = 1.0e4931L;
+static const long double huge = 1.0e4931L;
 
 long double sinhl(long double x)
 {
@@ -55,12 +55,12 @@ long double sinhl(long double x)
 	/* |x| in [0,25], return sign(x)*0.5*(E+E/(E+1))) */
 	if (ix < 0x4003 || (ix == 0x4003 && i0 <= 0xc8000000)) { /* |x| < 25 */
 		if (ix < 0x3fdf)  /* |x|<2**-32 */
-			if (huge + x > one)
+			if (huge + x > 1.0)
 				return x;/* sinh(tiny) = tiny with inexact */
 		t = expm1l(fabsl(x));
 		if (ix < 0x3fff)
-			return h*(2.0*t - t*t/(t + one));
-		return h*(t + t/(t + one));
+			return h*(2.0*t - t*t/(t + 1.0));
+		return h*(t + t/(t + 1.0));
 	}
 
 	/* |x| in [25, log(maxdouble)] return 0.5*exp(|x|) */