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/__sin.c | |
parent | b03255af77776703c8d48819e824d09f6f54ba86 (diff) | |
download | musl-0cbb65479147ecdaa664e88cc2a5a925f3de502f.tar.gz musl-0cbb65479147ecdaa664e88cc2a5a925f3de502f.tar.bz2 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/__sin.c')
-rw-r--r-- | src/math/__sin.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/math/__sin.c b/src/math/__sin.c index 80f3273c..9aead04b 100644 --- a/src/math/__sin.c +++ b/src/math/__sin.c @@ -42,7 +42,6 @@ #include "libm.h" static const double -half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */ S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */ S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */ @@ -61,5 +60,5 @@ double __sin(double x, double y, int iy) if (iy == 0) return x + v*(S1 + z*r); else - return x - ((z*(half*y - v*r) - y) - v*S1); + return x - ((z*(0.5*y - v*r) - y) - v*S1); } |