summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [src/mparam_h.in] Updated comment about GCC.HEADmastervlefevre2021-09-271-1/+8
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14588 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/inp_str.c] Added a FIXME on a deprecated use of ungetc.vlefevre2021-09-141-0/+4
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14579 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/ieee_floats.h] URL update (http → https).vlefevre2021-07-151-1/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14549 280ebfd0-de03-0410-8827-d642c229c3f4
* Punctuation (missing comma after "however").vlefevre2021-06-218-17/+17
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14542 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/rem1.c] Improved comments.vlefevre2021-05-201-4/+4
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14528 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/vasprintf.c] Fixed buffer_cat: replaced incorrect assertion len > 0vlefevre2021-05-171-1/+7
| | | | | | | | | | | | | | | | by a test. Note that len == 0 is possible when outputting an integer 0 (either a native one or mpfr_prec_t) with precision field = 0. The consequence of this bug: * In debug mode (MPFR_ASSERTD assertion checking), one would get an assertion failure. * Otherwise, there should be no side effects since the code was valid for len == 0, possibly except with LTO (very unlikely, though). This incorrect assertion was added on 2009-03-13 in r6099. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14521 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/vasprintf.c] Updated comment about the output for the 'a'/'A'vlefevre2021-05-161-1/+2
| | | | | | conversion specifier. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14518 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/vasprintf.c] Added a comment about the output for the 'a'/'A'vlefevre2021-05-121-1/+24
| | | | | | conversion specifier, which is completely unintuitive. FIXME? git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14516 280ebfd0-de03-0410-8827-d642c229c3f4
* [doc/mpfr.texi,src/mpfr.h] Detail about the mpfr_pown implementation.vlefevre2021-05-031-1/+4
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14511 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/sin.c] Added a TODO about range reduction.vlefevre2021-04-301-0/+3
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14507 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/exceptions.c] Corrected latest comment.vlefevre2021-04-241-1/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14503 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/exceptions.c] Replaced comment about logging (the issue was due tovlefevre2021-04-231-8/+3
| | | | | | the mpfr_check_range macro). git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14502 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/exceptions.c] Completed comment about a logging issue.vlefevre2021-04-231-2/+2
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14501 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/exceptions.c] Added a comment about a logging issue.vlefevre2021-04-231-0/+8
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14500 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-impl.h] Logging: output the flags at "IN" and "OUT".vlefevre2021-04-231-2/+4
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14499 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/get_str.c] Fixed bug in mpfr_get_str_ndigits introduced in r14494.vlefevre2021-04-231-2/+3
| | | | | | | Note: the issue (an uninitialized variable) was detected by GCC 6.5.0; recent GCC versions miss the -Wmaybe-uninitialized warning. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14496 280ebfd0-de03-0410-8827-d642c229c3f4
* mpfr_get_str_ndigits: added an assertion / exploitable compiler hint.vlefevre2021-04-231-1/+4
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14495 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/get_str.c] Improved mpfr_get_str_ndigits code structure.vlefevre2021-04-231-49/+50
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14494 280ebfd0-de03-0410-8827-d642c229c3f4
* In various functions, use mpfr_equal_p() instead of mpfr_cmp() == 0.vlefevre2021-04-235-6/+6
| | | | | | | | | Note: In these cases, the test should be false if one of the arguments is NaN (it is not always clear whether NaN is impossible, but just in case, mpfr_equal_p is safer, in particular if the code around changes; and this is more readable too). git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14493 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/get_str.c] Use mpfr_equal_p() instead of mpfr_cmp() == 0.vlefevre2021-04-231-1/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14492 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed bug in mpfr_get_str_ndigits.vlefevre2021-04-231-2/+15
| | | | | | | | | | | | * src/get_str.c: use MPFR_SAVE_EXPO_MARK / MPFR_SAVE_EXPO_FREE to fix 2 issues in mpfr_get_str_ndigits: the inexact flag could be raised (bug reported by Pierre Chatelier[*]); undefined behavior in a very reduced exponent range. * tests/tget_str.c: check the above issues in the tests. [*] https://sympa.inria.fr/sympa/arc/mpfr/2021-04/msg00000.html git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14488 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-impl.h] Added cast to int for __LINE__ in formatted output.vlefevre2021-04-161-2/+3
| | | | | | | | | | The standard just says that __LINE__ in an integer constant. So its type might be larger than int, even though the value is representable in an int (like in MPFR). This concerns logging code, only available for GCC compatible compilers, so that there should not be any issue without the cast, but just in case... git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14487 280ebfd0-de03-0410-8827-d642c229c3f4
* Untabify and remove trailing spaces.vlefevre2021-03-162-14/+14
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14476 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/rec_sqrt.c] replace a call to mpn_mul_n with identical arguments byzimmerma2021-03-163-6/+16
| | | | | | | | a call to mpn_sqr + similar changes in other files (thanks Fredrik Johansson) git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14475 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Comment: no need to write "user" with uppercase letters.vlefevre2021-03-091-1/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14466 280ebfd0-de03-0410-8827-d642c229c3f4
* Clarification about the custom interface and macros.vlefevre2021-03-081-2/+3
| | | | | | | * doc/mpfr.texi: added some text in Section "Custom Interface". * src/mpfr.h: replaced the remaining FIXME by another comment. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14462 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Fixed mpfr_set macro (now only available with __GNUC__).vlefevre2021-03-061-2/+8
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14459 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Fixed mpfr_copysign and mpfr_signbit macros.vlefevre2021-03-061-7/+8
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14457 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/ubf.c] Forgot a cast from UBF pointer to mpfr_t pointer.vlefevre2021-03-061-1/+1
| | | | | | This became visible with the fix of the mpfr_get_prec macro in r14454. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14455 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Fixed mpfr_get_prec and mpfr_get_exp macros.vlefevre2021-03-061-2/+2
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14454 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Better implementation of macros changed in r14451.vlefevre2021-03-061-26/+9
| | | | | | __GNUC__ is no longer needed. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14452 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Fixed some macros implementing functions.vlefevre2021-03-061-5/+30
| | | | | | | | | | | | | Macros mpfr_nan_p, mpfr_inf_p, mpfr_zero_p and mpfr_regular_p were incorrect since they yielded a compilation error when the argument was of type void *, for instance. Their definition as macros is now available only with __GNUC__. The tisnan test r14448 should no longer fail. Also added a comment for mpfr_sgn, which is correct since documented as a macro. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14451 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] fixed typozimmerma2021-03-061-1/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14449 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Added a comment and a FIXME for functions implementedvlefevre2021-03-061-0/+6
| | | | | | as macros. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14447 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] fixed typozimmerma2021-03-061-1/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14444 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/invsqrt_limb.h] use "unsigned short" for table T[] instead of mp_limb_t.zimmerma2021-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | On araignee.loria.fr, this saves about 1 cycle, when GMP 6.2.1 and MPFR are configured with --disable-shared, using mbench. Before this change (medium of 5 runs, with turbo-boost disabled): $ numactl --physcpubind=0 ./mfv5 -i0 -p53 mpfr_sqrt mpfr_sqrt mpfr_sqrt mpfr_sqrt: 48 / 53.39 / 60 $ numactl --physcpubind=0 ./mfv5 -i0 -p113 mpfr_sqrt mpfr_sqrt mpfr_sqrt mpfr_sqrt: 75 / 81.44 / 89 After this change: $ numactl --physcpubind=0 ./mfv5 -i0 -p53 mpfr_sqrt mpfr_sqrt mpfr_sqrt mpfr_sqrt: 48 / 52.37 / 60 $ numactl --physcpubind=0 ./mfv5 -i0 -p113 mpfr_sqrt mpfr_sqrt mpfr_sqrt mpfr_sqrt: 75 / 80.27 / 88 git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14437 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/digamma.c] Use MPFR_NOTZERO instead of !MPFR_IS_ZERO.vlefevre2021-02-151-1/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14432 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/jyn_asympt.c] fixed bug when s=0 at the end of the for loopzimmerma2021-02-151-5/+5
| | | | | | | [tests/tj1.c] added corresponding non-regression test git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14431 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/digamma.c] fixed a bug in mpfr_digamma_reflection when the approximationszimmerma2021-02-151-13/+14
| | | | | | | | of Digamma(1-x) and Pi*cot(Pi*x) cancel exactly [tests/tdigamma.c] added corresponding non-regression test git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14430 280ebfd0-de03-0410-8827-d642c229c3f4
* renamed mpfr_compound to mpfr_compound_si, since in C2X, compoundn takeszimmerma2021-02-152-3/+3
| | | | | | | | an intmax_t and not a long, thus we can later implement mpfr_compoundn taking as input an intmax_t git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14429 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/pow_sj.c] removed spurious commentzimmerma2021-02-091-1/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14422 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/{pow_sj.c,pow_uj.c}] Added missing "#ifdef _MPFR_H_HAVE_INTMAX_T".vlefevre2021-02-092-0/+8
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14421 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/pow_{si,sj,ui,uj}.c] Fixed logging for mpfr_pow_{sj,uj}.vlefevre2021-02-094-10/+6
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14419 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/pow_uj.c] untabifyvlefevre2021-02-091-2/+2
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14418 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/pow_uj.c] Some corrections in the mpfr_mpz_set_uj helper function,vlefevre2021-02-091-9/+19
| | | | | | | still with limitations (which could be avoided by sharing code with mpfr_set_uj_2exp). git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14416 280ebfd0-de03-0410-8827-d642c229c3f4
* forgot to commit those fileszimmerma2021-02-092-0/+84
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14415 280ebfd0-de03-0410-8827-d642c229c3f4
* added mpfr_powrzimmerma2021-02-093-1/+62
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14414 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/{pow_si.c,pow_ui.c}] untabifyvlefevre2021-02-092-5/+5
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14413 280ebfd0-de03-0410-8827-d642c229c3f4
* added mpfr_pow_uj and mpfr_pow_sjzimmerma2021-02-096-26/+106
| | | | | | | now mpfr_pown is an alias for mpfr_pow_sj git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14412 280ebfd0-de03-0410-8827-d642c229c3f4
* [doc/mpfr.texi,src/mpfr.h] Added a FIXME for mpfr_pown, which shouldvlefevre2021-02-091-0/+2
| | | | | | | be an alias of mpfr_pow_sj (not implemented yet) to follow ISO C2x, where pown is defined with intmax_t n. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14410 280ebfd0-de03-0410-8827-d642c229c3f4