| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
a new failure with -Werror=strict-aliasing on src/fma.c due to
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94337>.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/ubf2@13820 280ebfd0-de03-0410-8827-d642c229c3f4
|
|\
| |
| |
| | |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/ubf2@13819 280ebfd0-de03-0410-8827-d642c229c3f4
|
| |
| |
| |
| |
| |
| | |
replacing x[…] by p[…] (but this doesn't eliminate the problem itself).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13818 280ebfd0-de03-0410-8827-d642c229c3f4
|
|/
|
|
|
|
| |
breaking the aliasing rules.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/ubf2@13817 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
there isn't any other acceptable solution.
Note: when trying to build MPFR without --enable-assert, with GCC and
CFLAGS="-O2 -Werror=strict-aliasing", the compilation of tests/tsub.c
currently fails because of that.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13816 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13815 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
with UBF).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13814 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13813 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
with RNDF changed after a bug fix.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13812 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13811 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13810 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
added early underflow/overflow checking to avoid integer overflow or
errors due to special exponent values.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13809 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
in precision 3 with integers from -31 to 31 and exponents MPFR_EXP_MIN,
MPFR_EMIN_MIN-7 to MPFR_EMIN_MIN, MPFR_EMAX_MAX-7 to MPFR_EMAX_MAX,
MPFR_EXP_MAX-7 to MPFR_EXP_MAX, showing bugs in these functions when
MPFR_LONG_WITHIN_LIMB is defined.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13808 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
but running the tests with UBsan could allow one to trigger bugs
(such as the one fixed in r13806).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13807 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
the "MAX (aq, bq) + 2 <= diff_exp" branch. This is possible only with
UBF. Fixed this bug with an early underflow detection in the UBF case.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13806 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
this was triggering an integer overflow.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13805 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13804 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
(including subnormal → normal and normal → overflow due to that).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13803 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13802 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13801 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13800 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
* mpfr-impl.h: define MPFR_UBF_GET_EXP macro.
* add1.c, sub1.c: use this macro.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13799 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
avoid a possible integer overflow with UBF.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13798 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13797 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13796 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13795 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
non-negative.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13794 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Portability fix: when mpfr_exp_t <= long (which is the default),
an addition was done in unsigned integer arithmetic instead of
signed integer arithmetic, with a conversion back to a signed
type, i.e. with potentially implementation-defined behavior.
There could also be an integer overflow on huge-precision values
if mp_bitcnt_t > unsigned long.
* Updated a comment.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13793 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Portability fix: when mpfr_exp_t <= long (which is the default),
an addition with a negative result was done in unsigned integer
arithmetic instead of signed integer arithmetic, with a conversion
back to a signed type, i.e. with implementation-defined behavior.
There could also be an integer overflow on huge-precision values
if mp_bitcnt_t > unsigned long.
* Updated comments.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13792 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13791 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13790 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13789 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
no longer fail if a generated value does not correspond to a bad case.
But fail if the MPFR_CHECK_BADCASES environment variable is defined
and too few bad cases are generated (less than 90%).
[doc/README.dev] Document MPFR_CHECK_BADCASES.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13788 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and support the exact cases.
* tests.c:
- test5rm(): modified the prototype again and the behavior.
Now, either only one test is done and the ternary value is
not checked, or the test is done in the 5 rounding modes and
the ternary value is checked.
- data_check(): corresponding update; updated description.
- bad_cases(): test the exact cases too.
* tatanh.c: for the bad_cases() call, reduce emax to avoid errors in
the generation of bad cases due to the rounding of tanh(y) to 1,
which does not correspond to a bad case for atanh, but to an exact
case.
* tlog1p.c: for the bad_cases() call, reduce emax to avoid errors in
the generation of bad cases due to the rounding of expm1(y) to -1,
which does not correspond to a bad case for log1p, but to an exact
case.
* trec_sqrt.c: corrected the bad_cases() call to avoid negative
numbers.
Note: the following tests
GMP_CHECK_RANDOMIZE=5 ./tacos
GMP_CHECK_RANDOMIZE=6 ./tatan
GMP_CHECK_RANDOMIZE=4 ./tcos
currently fail, but because of a change in r13783 (see associated log
for the reason). To be fixed later.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13787 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
parameter "exact". Therefore the parameter "test_one" is now a boolean
(the value 2 is no longer supported, as redundant with "exact"), and
about data_check() with rnd = '*', the loop is now done in test5rm(),
i.e. test5rm() is called with test_one being false.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13786 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
as in troot.c for "rootn[2]", allowing inexact cases.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13785 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
as in troot.c for "rootn[3]", allowing inexact cases.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13784 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests.c, function bad_cases(): updated/added debug messages;
assume that the parameters are chosen in such a way that this
test always generates hard-to-round cases (including exact cases),
i.e. exit with an error if one does not get a bad case, otherwise
this can leave unexpected failures unnoticed (either due to a bug
in the MPFR library or due to poorly chosen parameters such as in
troot.c until now).
Note: ideally, this would require a proof, but it is better to get
(unlikely) spurious failures with a non-default GMP_CHECK_RANDOMIZE
value than missing important tests.
* troot.c, bad_cases() invocation:
- corrected the pos parameter: when n is even, it is useless to
generate a negative number as the function is not defined (the
inverse function generates a positive number, and the mismatch
now yields a failure due to the change in bad_cases); when n is
odd, generate as many negative numbers as positive ones.
- for n ≤ 5, reduce the psup parameter in order to also generate
inexact cases, instead of always exact cases.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13783 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
tested yet. As a consequence, the bad_cases test added in tcbrt.c r13776
is not really useful yet, as the cbrt bad cases are only exact cases.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13782 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test5rm: removed additional useless tests added in r6037 in the
case test_one true and rnd = MPFR_RNDZ or MPFR_RNDA, since the
description was a bit incorrect and this was used only by
- data/digamma, where this yielded only duplicate tests (mode *);
- data/li2, where mode z is used on a few tests and could be
replaced by mode Z (i.e. test_one false) if need be;
updated description and added details.
* data_check: corrected/updated description.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13781 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13780 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13779 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
"DPD" can be wrong, e.g. for the build with MinGW under Linux. One
does not get a failure just because of other issues in the code,
forcing the portable implementation of the decimal functions.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13778 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13776 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
input is larger than 3n, where n is the precision of the output, + 1
if the rounding mode is MPFR_RNDN: instead of truncating the output,
call mpz_root on the truncated input.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13775 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13774 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13773 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
end, which was incorrect and did not match the code (the comment was
introduced in r2057 and was already incorrect in the round-down case;
then the round-to-nearest case was improved in r2070, but the comment
was not updated).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13772 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13771 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
renamed variable r to t in order to avoid confusion with the code
(where r has a different meaning).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13769 280ebfd0-de03-0410-8827-d642c229c3f4
|