diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-03-09 23:10:41 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-03-09 23:10:41 +0000 |
commit | 959d69ed7099e265e701dbf26fcbd5c513285bde (patch) | |
tree | 942d17a8321ddb69358ff1cc4c770964a296ce2c /src/atan.c | |
parent | 264570b7ab3d696fd72daffbb6a5c57ae3478c47 (diff) | |
download | mpfr-959d69ed7099e265e701dbf26fcbd5c513285bde.tar.gz |
Fixed spelling mistakes found by codespell 1.12.0.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12474 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/atan.c')
-rw-r--r-- | src/atan.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/atan.c b/src/atan.c index e98a4328f..310e4d464 100644 --- a/src/atan.c +++ b/src/atan.c @@ -177,7 +177,7 @@ mpfr_atan_aux (mpfr_ptr y, mpz_ptr p, unsigned long r, int m, mpz_t *tab) /* main loop */ n = 1UL << m; MPFR_ASSERTN (n != 0); /* no overflow */ - /* the ith term being X^i/(2i+1) with X=p/2^r, we can stop when + /* the i-th term being X^i/(2i+1) with X=p/2^r, we can stop when p^i/2^(r*i) < 2^(-precy), i.e. r*i > precy + log2(p^i) */ for (i = k = done = 0; (i < n) && (done == 0); i += 2, k ++) { @@ -209,7 +209,7 @@ mpfr_atan_aux (mpfr_ptr y, mpz_ptr p, unsigned long r, int m, mpz_t *tab) } } } - else /* special case p=1: the ith term being X^i/(2i+1) with X=1/2^r, + else /* special case p=1: the i-th term being X^i/(2i+1) with X=1/2^r, we can stop when r*i > precy i.e. i > precy/r */ { n = 1UL << m; @@ -284,7 +284,7 @@ mpfr_atan (mpfr_ptr atan, mpfr_srcptr x, mpfr_rnd_t rnd_mode) mpfr_exp_t exptol; mpfr_prec_t prec, realprec, est_lost, lost; unsigned long twopoweri, log2p, red; - int comparaison, inexact; + int comparison, inexact; int i, n0, oldn0; MPFR_GROUP_DECL (group); MPFR_SAVE_EXPO_DECL (expo); @@ -339,8 +339,8 @@ mpfr_atan (mpfr_ptr atan, mpfr_srcptr x, mpfr_rnd_t rnd_mode) MPFR_SAVE_EXPO_MARK (expo); /* Other simple case arctan(-+1)=-+pi/4 */ - comparaison = mpfr_cmp_ui (xp, 1); - if (MPFR_UNLIKELY (comparaison == 0)) + comparison = mpfr_cmp_ui (xp, 1); + if (MPFR_UNLIKELY (comparison == 0)) { int neg = MPFR_IS_NEG (x); inexact = mpfr_const_pi (atan, MPFR_IS_POS (x) ? rnd_mode @@ -401,7 +401,7 @@ mpfr_atan (mpfr_ptr atan, mpfr_srcptr x, mpfr_rnd_t rnd_mode) MPFR_SAVE_EXPO_MARK, but let's check that for maintainability. */ MPFR_ASSERTD (__gmpfr_emax <= 1 - __gmpfr_emin); - if (comparaison > 0) /* use atan(xp) = Pi/2 - atan(1/xp) */ + if (comparison > 0) /* use atan(xp) = Pi/2 - atan(1/xp) */ mpfr_ui_div (sk, 1, xp, MPFR_RNDN); else mpfr_set (sk, xp, MPFR_RNDN); @@ -418,7 +418,7 @@ mpfr_atan (mpfr_ptr atan, mpfr_srcptr x, mpfr_rnd_t rnd_mode) mpfr_add_ui (tmp, tmp, 1, MPFR_RNDN); mpfr_sqrt (tmp, tmp, MPFR_RNDN); mpfr_sub_ui (tmp, tmp, 1, MPFR_RNDN); - if (red == 0 && comparaison > 0) + if (red == 0 && comparison > 0) /* use xp = 1/sk */ mpfr_mul (sk, tmp, xp, MPFR_RNDN); else @@ -488,7 +488,7 @@ mpfr_atan (mpfr_ptr atan, mpfr_srcptr x, mpfr_rnd_t rnd_mode) /* argument reduction */ mpfr_mul_2exp (arctgt, arctgt, red, MPFR_RNDN); - if (comparaison > 0) + if (comparison > 0) { /* atan(x) = Pi/2-atan(1/x) for x > 0 */ mpfr_const_pi (tmp, MPFR_RNDN); mpfr_div_2ui (tmp, tmp, 1, MPFR_RNDN); |