about summary refs log tree commit diff
path: root/src/math/modf.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/modf.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/modf.c')
-rw-r--r--src/math/modf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/math/modf.c b/src/math/modf.c
index ff85b2a3..cca3b652 100644
--- a/src/math/modf.c
+++ b/src/math/modf.c
@@ -21,8 +21,6 @@
 
 #include "libm.h"
 
-static const double one = 1.0;
-
 double modf(double x, double *iptr)
 {
 	int32_t i0,i1,j0;
@@ -51,7 +49,7 @@ double modf(double x, double *iptr)
 			*iptr = x;
 			return 0.0 / x;
 		}
-		*iptr = x*one;
+		*iptr = x;
 		GET_HIGH_WORD(high, x);
 		INSERT_WORDS(x, high & 0x80000000, 0);  /* return +-0 */
 		return x;