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).
This commit is contained in:
nsz
2012-03-19 23:41:19 +01:00
parent b03255af77
commit 0cbb654791
73 changed files with 513 additions and 623 deletions
+1 -3
View File
@@ -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;