diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-02-04 18:17:11 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-02-04 18:17:11 +0000 |
commit | 82963310fc2af2ff75b527825b909ecf272c719c (patch) | |
tree | 2c6e51d102d74c0779af06300fa256e5ddb2ca54 /src/compound.c | |
parent | 5ea5547356f13ea8c0dec569488ebb0a4c093bad (diff) | |
download | mpfr-82963310fc2af2ff75b527825b909ecf272c719c.tar.gz |
[src/compound.c] Fixed bug found by clang:
compound.c:32:29: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand]
if (rnd_mode == MPFR_RNDN || MPFR_RNDF
^ ~~~~~~~~~
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14367 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/compound.c')
-rw-r--r-- | src/compound.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compound.c b/src/compound.c index 353a040bb..31fe457d1 100644 --- a/src/compound.c +++ b/src/compound.c @@ -29,7 +29,7 @@ static int mpfr_compound_near_one (mpfr_ptr y, int s, mpfr_rnd_t rnd_mode) { mpfr_set_ui (y, 1, rnd_mode); /* exact */ - if (rnd_mode == MPFR_RNDN || MPFR_RNDF + if (rnd_mode == MPFR_RNDN || rnd_mode == MPFR_RNDF || (s > 0 && (rnd_mode == MPFR_RNDZ || rnd_mode == MPFR_RNDD)) || (s < 0 && (rnd_mode == MPFR_RNDA || rnd_mode == MPFR_RNDU))) { |