diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2020-12-14 17:59:22 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2020-12-14 17:59:22 +0000 |
commit | 7a34d3d20acea3d68c18ea07a3612df0e05dd0fb (patch) | |
tree | 8d397044d9d361685f0109bc63c409dc76ea077d /src | |
parent | d181a315f2253d0fe0d399a8c17a704b3c147df9 (diff) | |
download | mpfr-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')
-rw-r--r-- | src/sinu.c | 5 |
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; } |