From 99ad6de9ad75b0e2734e0c3693a712ef0fc72b54 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Mon, 16 Mar 2020 10:22:20 +0000 Subject: [src/cos.c] Updated a comment. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13790 280ebfd0-de03-0410-8827-d642c229c3f4 --- src/cos.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cos.c b/src/cos.c index 8f58e8e85..7336bb860 100644 --- a/src/cos.c +++ b/src/cos.c @@ -64,7 +64,9 @@ mpfr_cos2_aux (mpfr_ptr f, mpfr_srcptr r) mpz_init (t); ex = mpfr_get_z_2exp (x, r); /* r = x*2^ex */ - /* remove trailing zeroes */ + /* Remove trailing zeroes. + Since x comes from a MPFR number, due to the constrainst on the exponent + and the precision, there can be no integer overflow below. */ l = mpz_scan1 (x, 0); ex += l; mpz_fdiv_q_2exp (x, x, l); -- cgit v1.2.1