| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
src/Makefile.am for the next release.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11681 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
the 32-bit ABI (32-bit long), fixing bug reported by Simon Byrne:
https://sympa.inria.fr/sympa/arc/mpfr/2017-07/msg00002.html
(merged changeset r11590 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11591 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
C++ (it didn't have the correct type), and improved the similar ones.
(merged changeset r8997 from the trunk; needed by r11579 when using a
C++ compiler)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11580 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
|
|
|
|
|
|
|
| |
lowercase so that it doesn't look like a constant to mpfrlint.
(merged changeset r11521 from the trunk, completing r11538)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11541 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In details:
* The computation of the number of characters to be written could
be incorrect by 1 when the thousands separator was not empty.
However, in the 3.1 branch (without additional patches), this
value is currently only used for overflow checking, so that this
bug could have only very little effect (contrary to the trunk).
* When the int and long types have the same size, the code assumed
"wrapping behavior in two's complement". But this is actually
undefined behavior in ISO C; in practice, a smart compiler may
have ignored "total < 0" tests, because total is computed with
sums of non-negative integers.
(merged changesets r11513,11515-11516 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11538 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in a boolean context (even though that this is not wrong in C). Fix
after a bug report from David Binderman. Explanations:
https://sympa.inria.fr/sympa/arc/mpfr/2016-09/msg00028.html
(merged changeset r10879 from the trunk)
NOTE. This change has been merged in the 3.1 branch because it is
needed to be able to build MPFR with -Wall -Werror as of GCC 7,
due to the new -Wint-in-bool-context option enabled by -Wall:
https://gcc.gnu.org/gcc-7/changes.html
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11536 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11329 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
|
|
|
|
|
|
| |
(merged changeset r10920 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10921 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
(merged changeset r10918 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10919 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Increased the use of macros to avoid some code duplication
(with risks of typos) and to prevent the problems related
to thread-safe DLL from appearing in the .c files.
* The prototypes of the functions to access the address of a
TLS variable are now defined. Otherwise one gets warnings:
https://sympa.inria.fr/sympa/arc/mpfr/2016-10/msg00004.html
(merged changeset r10916 from the trunk, with conflict resolved
by replacing mpfr_flags_t with unsigned int)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10917 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10896 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10891 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
src/Makefile.am for the next release.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10866 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10857 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
is in the trunk but not in this branch.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10856 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 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
under Unix because the tests could yield spurious errors with Cygwin32
or other similar implementations. Moreover, such tests were used for
debugging purpose or to detect potential problems in the environment,
thus were not really useful for the end user. They were initially
added in the win-thread-safe-dll branch (r9682, following a problem
found in r9680). One alternative for checking by the MPFR developers
would be to output the status of some internal macros in tversion.
(merged changeset r10260 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10264 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
(some parentheses were missing). Note: the code in the 3.1 branch
was not affected by these missing parentheses; however this could
break later patches or ports of new functions using MPFR internals.
(merged changeset r9295 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10234 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10204 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10199 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
with subnormal support.
(merged changeset r10175 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10176 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10149 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
this will allow to have decimal-float support without gmp-build
(and also faster set_d/get_d)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10144 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10142 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
| |
* Support for _Thread_local (C11).
* Support build as thread-safe DLL on Windows (mainly changes
from Stephan Tolksdorf).
(merged changesets r7954,8245,9684,9778 from the trunk, with
mpfr_flags_t replaced by unsigned int)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10130 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10117 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
src/Makefile.am for the next release.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10095 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
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10039 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
|
|
|
|
|
|
|
| |
(fix of comment formatting, which shouldn't have been with the
other r9883 changes).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10026 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
mpfr_mul_si, mpfr_div_si, mpfr_si_div) when the integer is LONG_MIN,
visible when using an UB sanitizer.
(merged changesets r9998-9999,10003,10005 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10023 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10009 280ebfd0-de03-0410-8827-d642c229c3f4
|