| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* tests/tests.c: use __gmp_rands instead of mpfr_rands
(which was introduced by r11666).
* tests/turandom.c: use RANDS instead of mpfr_rands
(which was introduced by r11649).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11672 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
since the hardcoded values would be different.
(merged changeset r11669 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11670 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
platform ABI or MPFR version.
(merged changeset r11663 from the trunk, and updated the hardcoded
values for this 3.1 branch)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11668 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
instead of mpfr_rands, due to the gmp_randseed_ui.
(merged changeset r11654 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11667 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
is internal to GMP: its use came from very old code (r2330 in 2003-06)
and it is no longer needed.
(marked changeset r11652 as merged from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11666 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
a specific behavior of the random generator, which changed in GMP 4.2.0
(the test would probably fail with such old GMP versions).
(applied a part of r8787 and merged changeset r11651 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11665 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expected:
* Set the underflow flag if the drawn exponent is less than emin.
This corresponds to "underflow before rounding" while the normal
rule in MPFR is "underflow after rounding". This is not fixable
in the 3.1 branch since the significand is not drawn in this
case, and drawing the significand to determine whether there is
an underflow would change the state of the PRNG at the end of
the function, breaking the ABI and the users' expectations.
* Set the inexact flag on underflow (this was not done before).
[tests/turandom.c] Added underflow and overflow tests.
[doc/mpfr.texi] Documented the above issue with the underflow flag for
mpfr_urandom.
(merged changesets r11220,11635,11637-11641,11643-11647 from the trunk;
instead of merging the conflicting r11636, did all the changes manually;
replaced mpfr_flags_t by unsigned int)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11649 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
<https://sympa.inria.fr/sympa/arc/mpfr/2017-01/msg00020.html>
[tests/turandom.c] Added non-regression test.
(merged changesets r11218-11219,11221 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11648 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
in order to avoid a link failure under MS Windows with DLL. See:
https://sympa.inria.fr/sympa/arc/mpfr/2017-07/msg00012.html
https://sympa.inria.fr/sympa/arc/mpfr/2017-07/msg00017.html
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11606 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
[tests/mpf_compat.h] Added non-regression tests.
(merged changesets r11565,11571 from the trunk, and did some changes
in the inclusions of header files due to the use of MPFR_ASSERTN)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11579 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
| |
in the trunk) by not using the returned string any longer. Indeed,
ISO C99 says that this string "may be overwritten by a subsequent call
to the setlocale function". The tests in the 3.1 branch are different,
so that this problem was not detected here on the tested platforms,
including MinGW.
(merged changeset r11533 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11540 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
| |
should have been done in r5230, where EOVERFLOW was moved).
(merged changeset r11532 from the trunk)
[tests/tprintf.c] Added errno test for check_long_string(), which is
called when MPFR_CHECK_LARGEMEM is defined, to trigger the above
bug. A merge from the trunk was not possible due to many changes
in the mpfr_*printf code and the tests.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11539 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
| |
under some conditions due to the following bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79257
This increase is not a problem for the tests, where optimal code
is useless.
(merged changesets r11469,11470 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11537 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
perl -pi -e 's/ (\d{4}-)?(2016)(?= Free Software)/
" ".($1||"$2-").($2+1)/e' **/*(^/)
under zsh (the m4 and tools/mbench directories were not modified).
Removed 2016 from the example in the doc/README.dev file.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11119 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
the ternary value could be incorrect.
[tests/tstrtofr.c] Added test case.
(merged changesets from the trunk: r11055, a part of r11056, and
r11059,11066-11068)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11069 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
than -1 (when such a value is given as an argument with ".*").
[tests/tsprintf.c] Added non-regression test.
(merged changesets r11037-11038 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11043 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
(found by David Binderman using cppcheck) at the same time.
This bug could only affect the error message if the test failed.
(merged changesets r10871-10872 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10873 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
subnormal (now, OK with gcc -mpc64 or under NetBSD 6-).
(merged changesets r10835-10839 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10855 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
(merged changeset r10822 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10854 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
(merged changesets r8688,10821 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10853 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
a loop in case an extended range is used.
(merged changesets r10818-10819 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10852 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
[tests/tset_ld.c] Added test case.
(merged changesets r10807-10809,10811-10812 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10815 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
there could still be false positives (i.e. mpfr_can_round could say that
rounding was possible while correct rounding was not guaranteed), and
also false negatives, some of which could yield infinite Ziv loops in
user code in practice.
Added tests triggering these bugs, in particular a comprehensive test
against a naive implementation.
(merged changesets
r10679-10686,10717-10718,10743,10746-10748,10752,10754,10756
from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10792 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
in order to reduce the test time (increased since r9849).
(merged changesets r9955,10667,10672,10790 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10791 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
from r10601 to r10716 for tmul.c only).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10742 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
spurious null statements.
(merged changeset r10724 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10728 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
spurious null statements.
(merged changeset r10721 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10722 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
| |
Note that as of GCC 6, "the default mode for C++ is now -std=gnu++14
instead of -std=gnu++98" <https://gcc.gnu.org/gcc-6/changes.html>.
So, this fixes the failures in the build of the MPFR tests with g++
from GCC 6 without particular options.
(merged changeset r10719 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10720 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
(merged changeset r10386 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10387 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In MPFR_RNDN (rounding to nearest), when |b| is the midpoint between
the maximum number and 2^emax (the maximum number + 1 ulp) and c is
small, the obtained result is an infinity (with overflow) instead of
± the maximum number (no overflow). The cause is that an overflow is
generated too early (in the rounding code).
[tests/tsub.c] Added test cases.
(merged changeset r10383 from the trunk, with conflict resolved in
src/sub1.c and mpfr_flags_t replaced by unsigned int)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10384 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
are set (in practice, only NaN was affected). Added testcases from the
trunk (merged r10298 and r10303).
Note: the trunk was fixed with a partial rewrite for some optimization
and to improve consistency, but here, the changes are kept minimal.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10304 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
(merge changesets r9695-9696,10170,10181-10182 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10184 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
if HAVE_DENORMS is defined.
(merged changeset r10173 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10174 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
(merge changesets r10160,10163 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10167 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
(merged changeset r10145 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10146 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10143 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
| |
* Output support status of modifiers in gmp_printf (a bit like r10123
and r10124 in the trunk, except that macros PRINTF_T and PRINTF_L
do not exist and their absence means here "yes").
* Output availability of intmax_t/uintmax_t based functions and
*printf functions (merged changeset r10127 from the trunk).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10133 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
| |
(*__gmp_allocate_func) / malloc and (*__gmp_free_func) / free.
Note: This follows the discussion at
https://sympa.inria.fr/sympa/arc/mpfr/2015-12/msg00055.html
and should solve these problems under MS Windows (mingw32).
(merged changesets r9891,10118 from the trunk, resolving conflicts
to keep only the needed changes)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10119 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
| |
setting the NaN flag when the double (resp. long double) was a NaN and
could return an incorrect result (assertion failure in debug mode) in
reduced exponent range.
[tests/{tcmp_d.c,tcmp_ld.c}] Added a test in reduced exponent range.
Full test of the flags for NaN.
(merged changesets r10087-10089 from the trunk, with replacement of
new features of the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10090 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when not all the numbers have the same precision. A side effect is
that this can make mpfr_sum much slower and/or take much more memory
in some of such cases with the same program; this is normal and
cannot easily be avoided with the current algorithm.
Note: The full rewrite currently in the trunk has not been merged
because this would not be a simple patch (and it is still incomplete
when a number is reused as the output).
[src/mpfr-impl.h] Updated the prototype of mpfr_sum_sort.
Note: Since this function is used only internally and by the tests,
this does not break the ABI. However the old and new tsum tests are
source & binary incompatible.
[tests/tsum.c] Updated the use of mpfr_sum_sort. Added a testcase.
(merged changesets r8697,8699,8701,8851 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10083 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
the same value but the result cannot be exactly represented in
the target precision: the ternary value was wrongly set to 0.
[tests/tagm.c] Added testcase.
(merged changesets r10060,10077 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10078 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
mpfr_remainder, mpfr_remquo and mpfr_fmod): MPFR can take much memory
or crash when using inputs with a huge difference in magnitude.
[tests/{tfmod.c,tremquo.c}] Testcases.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10075 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
unsigned long: flags may be set while they shouldn't, and the result
may be incorrect in a very reduced exponent range.
(merged changesets r10043-10045 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10071 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
crash or take much memory, and the function could return incorrect
values. This is done by changing the algorithm for k > 100. This patch
is rather safe as applications that only use small values of k (≤ 100)
won't see any change, and for applications that may use large values
of k, this change may be needed.
[tests/troot.c] Added tests.
(merged changesets r9921-9928,9930-9931,9965-9970,9973-9974,10036,10038
from the trunk, with mpfr_flags_t replaced by unsigned int; for r9965,
the merged was done only on the src directory)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10040 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
| |
flags could be modified, and an assertion failure could be triggered in
debug mode (additional assertion checking) for non-integer numbers just
above the positive limit.
[tests/tfits.c] Many new tests.
(merged changesets r9650,9653-9655,10030-10034 from the trunk, with
mpfr_flags_t replaced by unsigned int)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10035 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
| |
result could be true instead of false in case of a change of binade
(exponent decrease) on the approximation interval. At the same time,
make sure that the number is normalized, and ditto for mpfr_round_p;
otherwise the semantic is not clear. Thus mpfr_div, which could call
mpfr_round_p with an unnormalized number, had to be fixed.
(merged changesets r9881,9883-9890,9896-9904,9932,10027 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10029 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
so that tsi_op fails with a runtime error in si_op.c when using
an UB sanitizer (bug fixed in r9999 in the trunk).
(merged changeset r10001 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10002 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
Contributed by the AriC and Caramel projects
by
Contributed by the AriC and Caramba projects
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@9943 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
with detailed comment: the precision of the result has to be a multiple
of the number of bits per word and rounding has to be to nearest.
(merged changeset r9861 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@9862 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
the result has to be rounded up to a power of 2.
(merged changesets r9857-9859 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@9860 280ebfd0-de03-0410-8827-d642c229c3f4
|