summaryrefslogtreecommitdiff
path: root/src/sinu.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2020-12-14 17:59:22 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2020-12-14 17:59:22 +0000
commit7a34d3d20acea3d68c18ea07a3612df0e05dd0fb (patch)
tree8d397044d9d361685f0109bc63c409dc76ea077d /src/sinu.c
parentd181a315f2253d0fe0d399a8c17a704b3c147df9 (diff)
downloadmpfr-7a34d3d20acea3d68c18ea07a3612df0e05dd0fb.tar.gz
[src/sinu.c] Added a FIXME: the range reduction should be done in this
function (that's the whole point of sinu compared to sin, besides a smaller rounding error). git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14187 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/sinu.c')
-rw-r--r--src/sinu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sinu.c b/src/sinu.c
index 0b5c41309..46bf45ef9 100644
--- a/src/sinu.c
+++ b/src/sinu.c
@@ -23,6 +23,9 @@ https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
#define MPFR_NEED_LONGLONG_H
#include "mpfr-impl.h"
+/* FIXME[VL]: Implement the range reduction in this function.
+ That's the whole point of sinu compared to sin. */
+
/* put in y the corrected-rounded value of sin(2*pi*x/u) */
int
mpfr_sinu (mpfr_ptr y, mpfr_srcptr x, unsigned long u, mpfr_rnd_t rnd_mode)
@@ -112,7 +115,7 @@ mpfr_sinu (mpfr_ptr y, mpfr_srcptr x, unsigned long u, mpfr_rnd_t rnd_mode)
if (!mpfr_odd_p (t)) /* case pi/4: sinu = 1 */
mpfr_set_ui (y, 1, MPFR_RNDZ);
else
- mpfr_set_si (y, -1, MPFR_RNDZ);
+ mpfr_set_si (y, -1, MPFR_RNDZ);
}
goto end;
}