diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2020-03-01 18:07:02 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2020-03-01 18:07:02 +0000 |
commit | cfbc8d955ce40b3ea2b42e0713be7d3a8d912653 (patch) | |
tree | 39f68fc8861e6309666d13ba5c68fd98776126cf | |
parent | 8823e9662cae4327256c4fb592a8580dbc5b1852 (diff) | |
download | mpfr-cfbc8d955ce40b3ea2b42e0713be7d3a8d912653.tar.gz |
[src/sin.c] increase initial precision even more
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13740 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | src/rem1.c | 2 | ||||
-rw-r--r-- | src/sin.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/rem1.c b/src/rem1.c index 0fe72b346..1870b4ed3 100644 --- a/src/rem1.c +++ b/src/rem1.c @@ -22,7 +22,7 @@ along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -# include "mpfr-impl.h" +#include "mpfr-impl.h" /* we return as many bits as we can, keeping just one bit for the sign */ # define WANTED_BITS (sizeof(long) * CHAR_BIT - 1) @@ -84,7 +84,7 @@ mpfr_sin (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) /* for x large, since argument reduction is expensive, we want to avoid any failure in Ziv's strategy, thus we take into account expx too */ - m = precy + MPFR_INT_CEIL_LOG2 (MAX(precy,expx)) + 7; + m = precy + MPFR_INT_CEIL_LOG2 (MAX(precy,expx)) + 8; /* since we compute sin(x) as sqrt(1-cos(x)^2), and for x small we have cos(x)^2 ~ 1 - x^2, when subtracting cos(x)^2 from 1 we will lose |