summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-04-30 08:59:23 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-04-30 08:59:23 +0000
commit9fcf6217d04fe414cde52f67cb48144e1e6ca6bb (patch)
treedc9b60d84fd115cc72aa5926c870647a2aeba349 /src
parent259c1ac62f2e094c3d9c0895d16830fe0b5b9f41 (diff)
downloadmpfr-9fcf6217d04fe414cde52f67cb48144e1e6ca6bb.tar.gz
[src/sin.c] Added a TODO about range reduction.
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14507 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src')
-rw-r--r--src/sin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sin.c b/src/sin.c
index d3e9699cb..b64cae52a 100644
--- a/src/sin.c
+++ b/src/sin.c
@@ -112,6 +112,9 @@ mpfr_sin (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
{
/* first perform argument reduction modulo 2*Pi (if needed),
also helps to determine the sign of sin(x) */
+ /* TODO: Perform range reduction in a way so that the sine can
+ be computed directly from the cosine with sin(x)=cos(pi/2-x),
+ without the need of sqrt(1 - x^2). */
if (expx >= 2) /* If Pi < x < 4, we need to reduce too, to determine
the sign of sin(x). For 2 <= |x| < Pi, we could avoid
the reduction. */