diff options
| author | nsz <nsz@port70.net> | 2012-03-19 23:41:19 +0100 | 
|---|---|---|
| committer | nsz <nsz@port70.net> | 2012-03-19 23:41:19 +0100 | 
| commit | 0cbb65479147ecdaa664e88cc2a5a925f3de502f (patch) | |
| tree | 7b6dc53fcec6497d55746d3cc47f167a20b7aa57 /src/math/__cosl.c | |
| parent | b03255af77776703c8d48819e824d09f6f54ba86 (diff) | |
| download | musl-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/__cosl.c')
| -rw-r--r-- | src/math/__cosl.c | 6 | 
1 files changed, 2 insertions, 4 deletions
diff --git a/src/math/__cosl.c b/src/math/__cosl.c index 80036ddb..9d325768 100644 --- a/src/math/__cosl.c +++ b/src/math/__cosl.c @@ -41,8 +41,6 @@   * almost for free from the complications needed to search for the best   * higher coefficients.   */ -static const double one = 1.0; -  static const long double  C1 =  0.0416666666666666666136L;        /*  0xaaaaaaaaaaaaaa9b.0p-68 */ @@ -61,7 +59,7 @@ long double __cosl(long double x, long double y)  	z  = x*x;  	r  = z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*(C6+z*C7))))));  	hz = 0.5*z; -	w  = one-hz; -	return w + (((one-w)-hz) + (z*r-x*y)); +	w  = 1.0-hz; +	return w + (((1.0-w)-hz) + (z*r-x*y));  }  #endif  | 
