From 3b4f3977d3260cb81c41c1d155e1291ebb13a52b Mon Sep 17 00:00:00 2001 From: Raymond Toy <toy.raymond@gmail.com> Date: Wed, 30 Aug 2017 21:21:56 -0700 Subject: [PATCH] Fix compiler warning about else Add braces around the else clause that's indented as if it were part of the else clause. Inspection of the algorithm indicates that this is probably the intended code and in this case doesn't change what gets executed because the following statements would have been anyway. Also verified a few random values that `(asin x)` and `(asin (float x 1w0))` produce the same values. Only need to test 2^-27 <= x < 0.5. --- src/lisp/e_asin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lisp/e_asin.c b/src/lisp/e_asin.c index 34d2096ac..1cfa43ef7 100644 --- a/src/lisp/e_asin.c +++ b/src/lisp/e_asin.c @@ -94,12 +94,13 @@ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ } return x; - } else + } else { t = x*x; p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5))))); q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4))); w = p/q; return x+x*w; + } } /* 1> |x|>= 0.5 */ w = one-fabs(x); -- GitLab