summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [src/mpfr-impl.h] Resolved the problem under Linux.win-thread-safe-dllvlefevre2015-09-101-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/win-thread-safe-dll@9683 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-impl.h] Detect some possible inconsistencies under Unix,vlefevre2015-09-101-0/+13
| | | | | | when some macro should imply a MS-Windows platform. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/win-thread-safe-dll@9682 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the latest changes from the trunk since this wasn't the causevlefevre2015-09-101-6/+5
| | | | | | of the problem. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/win-thread-safe-dll@9681 280ebfd0-de03-0410-8827-d642c229c3f4
* Applied changes from Stephan Tolksdorf:vlefevre2015-09-109-24/+120
| | | | | | | | | | | https://gforge.inria.fr/tracker/download.php/136/619/19537/4980/changes.zip The MPFR build fails on my Linux machine with CFLAGS=-Werror=missing-prototypes because MPFR_WIN_THREAD_SAFE_DLL gets defined (this CFLAGS just allowed me to detect the problem with MPFR_WIN_THREAD_SAFE_DLL, which could have otherwise remained unnoticed). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/win-thread-safe-dll@9680 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed the AMD K8 tuning (cf r8118)zimmerma2015-08-241-7/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9652 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/{fits_intmax.c,fits_s.h,fits_u.h}] Fixed mpfr_fits_* functions:vlefevre2015-08-243-0/+9
| | | | | | | the flags could be modified, which made the new mpfr_get_{si,ui} tests fail (tests/tset_si.c r9649). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9650 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mparam_h.in] Improved comment: __amd64__ is generic to allvlefevre2015-08-201-1/+7
| | | | | | | x86 processors with a 64-bit ABI (amd64, a.k.a. x86_64), thus suggest to move mparam.h files to more meaningful locations. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9648 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Added an assertion (I get a build failure with gcc-snapshotvlefevre2015-07-311-1/+4
| | | | | | | 20150722-1 due to -Werror=array-bounds, but the code looks OK). Simplified test on: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67077 git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9638 280ebfd0-de03-0410-8827-d642c229c3f4
* remove usage of mpn_rootrem in mpfr_sqrt since now mpn_sqrtrem is fasterzimmerma2015-07-312-17/+1
| | | | | | | (https://gmplib.org/list-archives/gmp-devel/2015-July/004074.html) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9637 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/next.c] Added a note concerning the exceptions.vlefevre2015-07-301-0/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9636 280ebfd0-de03-0410-8827-d642c229c3f4
* Added mpfr_rint_roundeven and mpfr_roundeven functions, withvlefevre2015-07-202-0/+37
| | | | | | documentation and tests. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9629 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Added a comment about the drawback of the mpfr_get_exp()vlefevre2015-07-161-2/+6
| | | | | | macro, defined in addition to the function. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9618 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/{div_2si.c,div_2ui.c,mul_2si.c}] Fixed some underflow cases invlefevre2015-07-153-3/+7
| | | | | | | rounding to nearest when the exact result is -2^(emin-2), i.e. the middle of 0 and the minimum negative number in absolute value. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9616 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/exceptions.c] Added logging for mpfr_underflow and mpfr_overflow.vlefevre2015-07-151-1/+12
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9615 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/frexp.c] Added a comment.vlefevre2015-07-151-0/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9613 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/frexp.c] Handle internal overflow.vlefevre2015-06-261-1/+29
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9600 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mul_2si.c] Fixed overflow case when n = 0.vlefevre2015-06-261-1/+1
| | | | | | | [tests/tmul_2exp.c] In the overflow test, check mpfr_mul_2ui and mpfr_mul_2si too (mpfr_mul_2ui was OK). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9597 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/div_2si.c] Fixed overflow case when n = 0.vlefevre2015-06-261-1/+1
| | | | | | [tests/tmul_2exp.c] In the overflow test, check mpfr_div_2si too. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9596 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/div_2ui.c] Fixed overflow case (can occur only when n = 0).vlefevre2015-06-261-1/+1
| | | | | | [tests/tmul_2exp.c] Completed the overflow test. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9595 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/frexp.c] Fixed a bug occurring when the current exponent rangevlefevre2015-06-261-1/+2
| | | | | | does not contain 0. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9592 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/check.c] Typo in a comment.vlefevre2015-06-251-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9591 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fma.c] Completely fixed the scaling in case of underflow.vlefevre2015-06-121-2/+9
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9569 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fma.c] Partially fixed the scaling in case of underflow,vlefevre2015-06-121-3/+2
| | | | | | | corresponding to the testcase from r9566. Double rounding is not handled yet (failure triggered by r9567). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9568 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fma.c] Added log messages.vlefevre2015-06-121-0/+11
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9565 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/sqrt.c] The bug fixed in r9540 actually came from r9014, whichvlefevre2015-06-101-0/+1
| | | | | | | | incorrectly replaced MPFR_EXP by MPFR_SET_EXP. So, restored the previous code (re-adding the assertion check), keeping my comment from r9540 to explain why we don't use MPFR_SET_EXP. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9545 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/lngamma.c] For mpfr_lgamma and mpfr_lngamma, the exponent rangevlefevre2015-06-101-2/+4
| | | | | | was not restored in some cases (some large results). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9543 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/{cos.c,sin.c}] Fixed bug related to the exponent range, introducedvlefevre2015-06-102-3/+8
| | | | | | | | | | | | | in r6461 with the use of mpfr_sincos_fast. Details: For mpfr_sin, the exponent range was not restored, and restoring it before calling mpfr_sincos_fast as this was done for mpfr_cos did not work; indeed the source of this function shows that it needs an extended exponent range. So, changed both mpfr_cos and mpfr_sin to call mpfr_sincos_fast in the extended exponent range and restore the exponent range at the end, like in usual code. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9542 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/sqrt.c] Fixed assertion failure in reduced exponent range.vlefevre2015-06-101-1/+2
| | | | | | | Note: This could happen only in very specific exponent ranges, in particular, which do not include the number 1. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9540 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/zeta_ui.c]vlefevre2015-06-081-9/+26
| | | | | | | | * Support reduced exponent range for the generic case. * Added logging. [tests/tzeta_ui.c] Added tests in reduced exponent range. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9523 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/add_ui.c] Fixed format string in MPFR_LOG_FUNC.vlefevre2015-06-081-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9521 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/zeta_ui.c] Fixed zeta(0) in reduced exponent range.vlefevre2015-06-071-4/+1
| | | | | | [tests/tzeta_ui.c] Added testcase. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9518 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/{ui_div.c,ui_sub.c}] Correction for reduced exponent range.vlefevre2015-06-052-11/+31
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9514 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/set_q.c] Added missing MPFR_SAVE_EXPO_FREE in case of preliminaryvlefevre2015-06-041-0/+2
| | | | | | overflow or underflow (extreme cases). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9508 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/set_q.c] Replaced a "return" by MPFR_RET: this is at least neededvlefevre2015-06-041-1/+1
| | | | | | in the extreme case cd != 0, and safer in general. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9507 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mul_ui.c] Fixed bug in mpfr_mul_ui/si: the inexact flag wasn't set.vlefevre2015-06-041-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9505 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/rint.c] Handle reduced exponent range.vlefevre2015-06-031-20/+17
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9489 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/rint.c] Added a comment about the mpfr_rint_* functions.vlefevre2015-06-031-0/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9485 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/rint.c] Simplified and fixed the mpfr_rint_* functions: in somevlefevre2015-06-031-16/+19
| | | | | | | | corner cases, an intermediate overflow would not be propagated. No testcases added for this particular problem since huge precision numbers would be involved. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9484 280ebfd0-de03-0410-8827-d642c229c3f4
* [src] Fixed allocation issue for multithreaded applications:vlefevre2015-05-283-14/+16
| | | | | | | | | | | | https://sympa.inria.fr/sympa/arc/mpfr/2015-05/msg00001.html * mpfr-gmp.{c,h}: made mpfr_allocate_func, mpfr_reallocate_func and mpfr_free_func thread-local; updated MPFR_GET_MEMFUNC to execute mp_get_memory_functions only when these pointers have not been set to the actual function pointers yet. * mpfr-impl.h: #include "mpfr-thread.h" earlier (before mpfr-gmp.h, where MPFR_THREAD_ATTR is now used). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9466 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-gmp.c] Replaced mpfr_allocate_func and mpfr_free_funcvlefevre2015-05-251-4/+4
| | | | | | | | by __gmp_allocate_func and __gmp_free_func in mpfr_tmp_allocate and mpfr_tmp_free respectively, fixing the crash in talloc. See: https://sympa.inria.fr/sympa/arc/mpfr/2015-05/msg00001.html git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9461 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-gmp.c] Code formatting.vlefevre2015-05-221-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9451 280ebfd0-de03-0410-8827-d642c229c3f4
* Define MPFR_ALLOCA_MAX macro: Maximum size for the use of alloca byvlefevre2015-05-221-1/+6
| | | | | | temporary allocations (default: 16384). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9449 280ebfd0-de03-0410-8827-d642c229c3f4
* Added a TODO about mpfr_sum.vlefevre2015-04-281-0/+15
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9381 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/sum.c] Fixed bug: mpn functions do not accept a zero size argument.new-sumvlefevre2015-04-091-2/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/new-sum@9369 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the latest changes from the trunk.vlefevre2015-04-092-11/+10
|\ | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/new-sum@9365 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Avoid an unnecessary mpn_lshift after an mpn_sub_1 whenvlefevre2015-02-271-7/+8
| | | | | | | | | | | | the initial value was a power of two. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9328 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/next.c] Avoid an unnecessary loop when the exponent decreases.vlefevre2015-02-271-4/+2
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9327 280ebfd0-de03-0410-8827-d642c229c3f4
* | [src/sum.c] Bug fix: use MPFR_EXP instead of MPFR_SET_EXP to set thevlefevre2015-04-081-1/+7
| | | | | | | | | | | | | | | | | | exponent since it can be outside the current exponent range before it is checked with mpfr_check_range. Also added a static assertion (always satisfied in practice) to make sure that exponent related computations cannot yield an integer overflow. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/new-sum@9362 280ebfd0-de03-0410-8827-d642c229c3f4
* | [src/sum.c] Bug triggered by the check4 test fixed.vlefevre2015-03-301-1/+5
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/new-sum@9356 280ebfd0-de03-0410-8827-d642c229c3f4
* | [src/sum.c] In the TMD detection:vlefevre2015-03-271-9/+18
| | | | | | | | | | | | | | | | * improved variable nbits to decrease the number of operations; * added some comments; * fixed the shift count bug triggered by the bug20150327 test. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/new-sum@9349 280ebfd0-de03-0410-8827-d642c229c3f4