diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-06-21 20:46:09 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-06-21 20:46:09 +0000 |
commit | 2109354342cad809efd89e34025f298c311f67be (patch) | |
tree | 85b4b5c01d9997146c9c7dfd185072b77338ca96 /src | |
parent | 88f56367c24f03bc4dc24f6284e0d872de2921f6 (diff) | |
download | mpfr-2109354342cad809efd89e34025f298c311f67be.tar.gz |
Punctuation (missing comma after "however").
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14542 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src')
-rw-r--r-- | src/cos.c | 4 | ||||
-rw-r--r-- | src/get_ld.c | 4 | ||||
-rw-r--r-- | src/inp_str.c | 2 | ||||
-rw-r--r-- | src/mpfr.h | 4 | ||||
-rw-r--r-- | src/pow_ui.c | 2 | ||||
-rw-r--r-- | src/round_prec.c | 2 | ||||
-rw-r--r-- | src/sub1sp.c | 14 | ||||
-rw-r--r-- | src/sum.c | 2 |
8 files changed, 17 insertions, 17 deletions
@@ -263,8 +263,8 @@ mpfr_cos (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) if (m > k && (m - k >= precy + (rnd_mode == MPFR_RNDN))) { /* If round to nearest or away, result is s = 1 or -1, - otherwise it is round(nexttoward (s, 0)). However in order to - have the inexact flag correctly set below, we set |s| to + otherwise it is round(nexttoward (s, 0)). However, in order + to have the inexact flag correctly set below, we set |s| to 1 - 2^(-m) in all cases. */ mpfr_nexttozero (s); break; diff --git a/src/get_ld.c b/src/get_ld.c index f04bf59ce..c2050a047 100644 --- a/src/get_ld.c +++ b/src/get_ld.c @@ -235,8 +235,8 @@ mpfr_get_ld (mpfr_srcptr x, mpfr_rnd_t rnd_mode) /* First round x to the target long double precision, so that all subsequent operations are exact (this avoids double rounding - problems). However if the format contains numbers that have more - precision, MPFR won't be able to generate such numbers. */ + problems). However, if the format contains numbers that have + more precision, MPFR won't be able to generate such numbers. */ mpfr_init2 (y, MPFR_LDBL_MANT_DIG); mpfr_init2 (z, MPFR_LDBL_MANT_DIG); /* Note about the precision of z: even though IEEE_DBL_MANT_DIG is diff --git a/src/inp_str.c b/src/inp_str.c index ab6048f30..676255480 100644 --- a/src/inp_str.c +++ b/src/inp_str.c @@ -103,7 +103,7 @@ mpfr_inp_str (mpfr_ptr rop, FILE *stream, int base, mpfr_rnd_t rnd_mode) MPFR_ASSERTD (nread >= 1); str_size += nread - 1; if (MPFR_UNLIKELY (str_size < nread - 1)) /* size_t overflow */ - return 0; /* however rop has been set successfully */ + return 0; /* however, rop has been set successfully */ else return str_size; } diff --git a/src/mpfr.h b/src/mpfr.h index 8b9c2c1a4..29f7716fb 100644 --- a/src/mpfr.h +++ b/src/mpfr.h @@ -260,8 +260,8 @@ typedef __mpfr_struct *mpfr_ptr; typedef const __mpfr_struct *mpfr_srcptr; /* For those who need a direct and fast access to the sign field. - However it is not in the API, thus use it at your own risk: it might - not be supported, or change name, in further versions! + However, it is not in the API, thus use it at your own risk: it + might not be supported, or change name, in further versions! Unfortunately, it must be defined here (instead of MPFR's internal header file mpfr-impl.h) because it is used by some macros below. */ diff --git a/src/pow_ui.c b/src/pow_ui.c index aa23dd764..6ea2d6ae5 100644 --- a/src/pow_ui.c +++ b/src/pow_ui.c @@ -146,7 +146,7 @@ POW_U (mpfr_ptr y, mpfr_srcptr x, UTYPE n, mpfr_rnd_t rnd) { mpz_t z; - /* Internal overflow or underflow. However the approximation error has + /* Internal overflow or underflow. However, the approximation error has * not been taken into account. So, let's solve this problem by using * mpfr_pow_z, which can handle it. This case could be improved in the * future, without having to use mpfr_pow_z. diff --git a/src/round_prec.c b/src/round_prec.c index 99ce2655e..2c533fb85 100644 --- a/src/round_prec.c +++ b/src/round_prec.c @@ -233,7 +233,7 @@ mpfr_can_round_raw (const mp_limb_t *bp, mp_size_t bn, int neg, mpfr_exp_t err, /* For err < prec (+1 for rnd1=RNDN), we can never round correctly, since the error is at least 2*ulp(b) >= ulp(round(b)). - However for err = prec (+1 for rnd1=RNDN), we can round correctly in some + However, for err = prec (+1 for rnd1=RNDN), we can round correctly in some rare cases where ulp(b) = 1/2*ulp(U) [see below for the definition of U], which implies rnd1 = RNDZ or RNDN, and rnd2 = RNDA or RNDN. */ diff --git a/src/sub1sp.c b/src/sub1sp.c index 96ef4ffd9..32368aa6f 100644 --- a/src/sub1sp.c +++ b/src/sub1sp.c @@ -244,7 +244,7 @@ mpfr_sub1sp1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode, /* Warning: if d = GMP_NUMB_BITS and c0 = 1000...000, then b0 - c0 = |0111...111|1000...000|, which after the shift becomes |111...111|000...000| thus if p = GMP_NUMB_BITS-1 - we have rb = 1 but sb = 0. However in this case the round + we have rb = 1 but sb = 0. However, in this case the round even rule will round up, which is what we get with sb = 1: the final result will be correct, while sb is incorrect. */ } @@ -255,7 +255,7 @@ mpfr_sub1sp1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode, /* now perform rounding */ /* Warning: MPFR considers underflow *after* rounding with an unbounded - exponent range. However since b and c have same precision p, they are + exponent range. However, since b and c have same precision p, they are multiples of 2^(emin-p), likewise for b-c. Thus if bx < emin, the subtraction (with an unbounded exponent range) is exact, so that bx is also the exponent after rounding with an unbounded exponent range. */ @@ -445,7 +445,7 @@ mpfr_sub1sp1n (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode) /* now perform rounding */ /* Warning: MPFR considers underflow *after* rounding with an unbounded - exponent range. However since b and c have same precision p, they are + exponent range. However, since b and c have same precision p, they are multiples of 2^(emin-p), likewise for b-c. Thus if bx < emin, the subtraction (with an unbounded exponent range) is exact, so that bx is also the exponent after rounding with an unbounded exponent range. */ @@ -711,7 +711,7 @@ mpfr_sub1sp2 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode, /* now perform rounding */ /* Warning: MPFR considers underflow *after* rounding with an unbounded - exponent range. However since b and c have same precision p, they are + exponent range. However, since b and c have same precision p, they are multiples of 2^(emin-p), likewise for b-c. Thus if bx < emin, the subtraction (with an unbounded exponent range) is exact, so that bx is also the exponent after rounding with an unbounded exponent range. */ @@ -992,7 +992,7 @@ mpfr_sub1sp2n (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode) /* now perform rounding */ /* Warning: MPFR considers underflow *after* rounding with an unbounded - exponent range. However since b and c have same precision p, they are + exponent range. However, since b and c have same precision p, they are multiples of 2^(emin-p), likewise for b-c. Thus if bx < emin, the subtraction (with an unbounded exponent range) is exact, so that bx is also the exponent after rounding with an unbounded exponent range. */ @@ -1318,7 +1318,7 @@ mpfr_sub1sp3 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode, /* now perform rounding */ /* Warning: MPFR considers underflow *after* rounding with an unbounded - exponent range. However since b and c have same precision p, they are + exponent range. However, since b and c have same precision p, they are multiples of 2^(emin-p), likewise for b-c. Thus if bx < emin, the subtraction (with an unbounded exponent range) is exact, so that bx is also the exponent after rounding with an unbounded exponent range. */ @@ -1648,7 +1648,7 @@ mpfr_sub1sp (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode) return 0; } /* c0 is non-zero, thus we have to subtract 1/2*ulp(a), - however we know (see analysis above) that this cannot + however, we know (see analysis above) that this cannot make the exponent decrease */ MPFR_ASSERTD( !(ap[0] & ~mask) ); /* Check last bits */ /* No normalize is needed */ @@ -51,7 +51,7 @@ TODO [VL, after a discussion with James Demmel]: Compared to volume 37, number 1-4, pages 101--112, 2004. sorting is not necessary here. It is not done because in the most common cases (where big cancellations are rare), it would take time and be -useless. However the lack of sorting increases the worst case complexity. +useless. However, the lack of sorting increases the worst case complexity. For instance, consider many inputs that cancel one another (two by two). One would need n/2 iterations, where each iteration reads the exponent of each input, therefore n*n/2 read operations. Using a worst-case sort |