2023-01-06 Vincent Lefevre Updated version to 4.2.0. 2023-01-05 Vincent Lefevre [src/zeta.c] For s < 1/2, use mpfr_sinpi now that it is available. This replaces the use of mpfr_sin with a multiplication by π and resolves a potential (but very unlikely) underflow issue; a comment is updated, with an explanation about that. 2023-01-05 Vincent Lefevre Updated copyright notice for all the Makefile.am files. To be similar to the other files, added: * Contributed by the AriC and Caramba projects, INRIA. * This file is part of the GNU MPFR Library. (These Makefile.am files still have their special license.) 2023-01-05 Vincent Lefevre Copyright notice update: added 2023. Command used: perl -pi -e 's/ (\d{4}-)?(2022)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting doc/texinfo.tex (copied from GNU Texinfo) and the tools/mbench directory (not distributed with MPFR). Removed 2022 from the example in the doc/README.dev file. 2023-01-04 Vincent Lefevre [src/zeta.c] Updated a comment about mpfr_sinpi. [doc/mpfr.texi] Updated the month. 2022-12-17 Vincent Lefevre [tools/mpfrlint] Updated the __gmp_ test. * No longer exclude '^tests/tabort_defalloc': this is no longer needed since commit 41bed90365fd1296cd05f49c813ab0a0b151a62e in 2017. * Exclude a new comment. 2022-12-15 Vincent Lefevre [tests/tsprintf.c] Added a comment about a possible test failure. In short, if the error is like repl-vsnprintf.c:389: GNU MP assertion failed: len < total_width this is a GMP (or MPIR) issue in __gmp_replacement_vsnprintf. References: https://sympa.inria.fr/sympa/arc/mpfr/2022-10/msg00001.html https://sympa.inria.fr/sympa/arc/mpfr/2022-10/msg00027.html https://gmplib.org/list-archives/gmp-bugs/2022-October/005200.html 2022-12-15 Vincent Lefevre Documentation: update about requirements for building MPFR. * doc/mpfr.texi: mentioned C++ compilers and the potential issue with type punning via union. * INSTALL: completed (0) to be similar to what doc/mpfr.texi says. 2022-12-15 Vincent Lefevre [tools/update-version] Fixed replacements in "INSTALL". Due to commit 4885b57add174f390eff29abe14d12fb5ebd6a61, only the first of the 4 replacements in INSTALL was done. 2022-12-14 Vincent Lefevre [configure.ac] Added a comment about a possible AM_PROG_AR failure. The reason is that on some platforms, GMP chooses a non-default mode (a.k.a. ABI). MPFR has some workaround thanks to GMP_CC and GMP_CFLAGS provided by GMP, but this may not be sufficient, e.g. on power-aix. In such a case, the user needs to either force GMP to use the default mode or provide an AR variable for MPFR's configure; see INSTALL file. 2022-12-13 Vincent Lefevre ChangeLog update with tools/update-changelog [doc/README.dev] "To make a release": update. [NEWS] Update for the 4.2.0 release: binary compatibility. [doc/README.dev] "To make a release": update about -root tag. [README] Updated URL of the README.dev file (for the 4.2 branch). Updated version to 4.2.0-rc1. ChangeLog update with tools/update-changelog [src/Makefile.am] Updated -version-info to 8:0:2 for MPFR 4.2.0. [manual] Section "API Compatibility": lexicographic order. 2022-12-13 Vincent Lefevre [NEWS,doc/mpfr.texi] Clarification for mpfr_pown. Note: Though implemented as a macro, it is mainly documented as a function (not as a macro) because it cannot be distinguished from a function (for instance, one can take the function pointer). 2022-12-13 Vincent Lefevre [tests/tget_flt.c] Added a comment. 2022-12-13 Vincent Lefevre [doc/README.dev] Updated a pathname. This should have been done with the source reorganization on 2010-08-17 (see commit a6c9580d75b967e0d121d606edf03515ada45a7a). 2022-12-12 Vincent Lefevre Updated doc/texinfo.tex to 2022-12-10.11 The only change concerning MPFR is that in the PDF manual, the section titles in the table of contents are now clickable. 2022-12-12 Vincent Lefevre [tests/tstdint.c] Added missing conditional config.h inclusion. The consequence of the missing inclusion is that on build systems that need config.h (some MS Windows ones?), this test would be skipped. 2022-12-12 Vincent Lefevre [doc/README.dev] Clarification about the need of config.h inclusion. [tests/tstdint.c] Updated comment. 2022-12-12 Vincent Lefevre [tests/tstdint.c] Added a comment. In short, this test allows one to detect that mpfr.h can be included without any other inclusion before. For instance, it can detect any unprotected use of FILE in the mpfr.h header file. 2022-12-12 Vincent Lefevre [doc/mpfr.texi] Added comment about the update of the version string. 2022-12-12 Vincent Lefevre Revert "changed %.8e into %a to avoid potential decimal output bug" This reverts commit e18ebe062042c01ad44b238df212f229bd251cd6. We currently still support C90 (in particular, here this concerns the C library of the platform). 2022-12-12 Paul Zimmermann changed %.8e into %a to avoid potential decimal output bug (cf https://sympa.inria.fr/sympa/arc/mpfr/2022-12/msg00015.html) 2022-12-12 Vincent Lefevre [src/mpfr-cvers.h] Added a comment about (major,minor) tests. 2022-12-12 Vincent Lefevre [tests/mpfr-test.h] Improved the change done a few hours earlier. The code introduced by commit 558a246e612fa230623fb0dfa0570b1c626a103c was changing the conditions under which IGNORE_CPP_COMPAT is defined (to ignore -Wc++-compat with a GCC pragma). Let's simplify it by using our __MPFR_GNUC() macro. The only possible change of behavior is that this excludes Intel's compiler (which is probably better as testing the GCC version on Intel's compiler doesn't make sense). Note concerning the behavior of Intel icx 2021.3.0 under Linux: Before the above commit, it was not excluded; but after this above commit, it was excluded as it identifies itself as GCC 4.2.1 (like Clang). With this new change, it is still excluded. Anyway, it ignores -Wc++-compat and doesn't complain on the GCC pragmas, so the above choice currently doesn't matter. 2022-12-11 Vincent Lefevre Avoid a testsuite build failure with GCC older than 4.6. In tests/mpfr-test.h, we must not define IGNORE_CPP_COMPAT for GCC < 4.6 as it does not allow "#pragma GCC diagnostic" inside functions. Moreover, let's define it for all Clang versions, including MS Windows (where __GNUC__ is not defined). Changes based on information and a patch by Bruno Haible: https://sympa.inria.fr/sympa/arc/mpfr/2022-12/msg00007.html 2022-12-09 Vincent Lefevre [autogen.sh] Improved comment about the INSTALL file. [autogen.sh] Updated comment about the INSTALL file. 2022-12-07 Vincent Lefevre [Makefile.am] Corrected a note about version-ext.sh in EXTRA_DIST. In short, since commit a6e9d69047a358bfd1aaa1418d9999b8abe0bb62, version-ext.sh should no longer be needed in EXTRA_DIST because it will no longer be executed. But since this script is small, we distribute it just in case it would be used. 2022-12-06 Vincent Lefevre Fixed version-ext.sh usage, avoiding "make check" failure and incorrect version information. The use of version-ext.sh could be incorrect when the MPFR source tree was in a Git working tree: * "make check" could fail in some cases, see the bug report by Trevor Spiteri: https://sympa.inria.fr/sympa/arc/mpfr/2022-12/msg00000.html * Version information output by "make check" could be incorrect. Changes: * tests/Makefile.am: For output_info, we now also check whether $(top_srcdir)/.git is readable in order to avoid escaping the MPFR source tree. In particular, if one extracts an MPFR tarball within a Git working tree (e.g. after "make dist"), then running "make check" in this extracted source tree will work as expected, giving correct version information. * tests/Makefile.am, version-ext.sh: Updated comments. In particular, moved a comment from tests/Makefile.am to version-ext.sh; this should have been done in commit 0d3abf10458ca4fdd26daa77a02f7f1f4e361deb, i.e. when version-ext.sh was created. 2022-12-06 Vincent Lefevre [doc/mpfr.texi] Removed useless leading spaces in examples. All examples should have at least one line that does not have leading spaces. Texinfo already indents examples in all cases. 2022-12-06 Vincent Lefevre [doc/mpfr.texi] Removed useless single quotes in an example. Texinfo changes these quotes to U+2019 RIGHT SINGLE QUOTATION MARK with TeX output (PDF), and it is no part of ASCII, which might yield issues in case of reuse in actual code. The subsequent example does not use quotes, so let's do the same. 2022-12-06 Vincent Lefevre [doc/mpfr.texi] Updated the month. 2022-12-06 Vincent Lefevre [doc/mpfr.texi] Added a FIXME about the @need issue. Context: https://lists.gnu.org/archive/html/bug-texinfo/2022-11/msg00228.html 2022-11-30 Vincent Lefevre [doc/mpfr.texi] 2 replacements of ASCII "-" by @minus{}. Note: these should be the last remaining issues with the minus sign. 2022-11-30 Vincent Lefevre [doc/mpfr.texi] 3 replacements of ASCII "-" by @minus{}. 2022-11-28 Vincent Lefevre [src/mpfr-impl.h] Added a comment for the umul_hi(h, x, y) macro. Say that MPFR_NEED_LONGLONG_H needs to be defined to use it. This macro is defined unconditionally (this is not an issue) because MPFR_NEED_LONGLONG_H has been undefined earlier in mpfr-impl.h (why?), so we can no longer test MPFR_NEED_LONGLONG_H. 2022-11-28 Vincent Lefevre Get rid of the _mulx_u64 intrinsic. It was found that this intrinsic has issues with ICC, Cygwin, and more generally, the Microsoft toolchain; even MPFR's strong detection at configure time (an AC_RUN_IFELSE test) was not sufficient. Moreover, _mulx_u64 is useless as umul_ppmm from mpfr-longlong.h does the same thing from the spec point of view (and thus was used as the fallback). So, if there is a reliable way to use the mulx instruction whenever possible (including via compiler optimization and the use of __int128 when available, as done by GCC's _mulx_u64 implementation), this should be done in the umul_ppmm definition. Alternatively, we could redefine umul_ppmm for the use of __int128 when possible. Context and references: https://sympa.inria.fr/sympa/arc/mpfr/2022-11/msg00008.html https://sympa.inria.fr/sympa/arc/mpfr/2022-11/msg00027.html https://sympa.inria.fr/sympa/arc/mpfr/2022-11/msg00030.html https://sympa.inria.fr/sympa/arc/mpfr/2022-11/msg00031.html https://stackoverflow.com/a/54815033/3782797 * src: corrected the umul_hi(h, x, y) macro (the only code that was using _mulx_u64) and moved it from invert_limb.h and invsqrt_limb.h to mpfr-impl.h. * tests/tversion.c: removed the output info about _mulx_u64. * acinclude.m4: removed the check for _mulx_u64. 2022-11-25 Vincent Lefevre [NEWS] Added release name for 4.2.0: "fondue savoyarde". mpfr-longlong.h update from the current GMP development code. 2022-11-24 Paul Zimmermann [doc/mini-gmp] updated svn revision to git revision [tools/bench/README] likewise 2022-11-23 Vincent Lefevre [tools/build-patch] Update for patches generated by git. Such patches are of the form --- a/path/name +++ b/path/name so with need to use the -p1 patch option if the --- line starts with "--- a/". 2022-11-23 Vincent Lefevre [tools/build-patch] Updated a comment for Git. 2022-11-22 Vincent Lefevre Fix mpfr_custom_get_kind() macro bug. * src/mpfr.h: in the mpfr_custom_get_kind() macro, changed mpfr_ptr to mpfr_srcptr for _x to agree with the function prototype, in order to avoid a compilation failure of user code in some cases. This bug was introduced by commit 9f94e0311ed53d0c64d4fbca249d19cc4888027e, which introduced the temporary variable _x to avoid an incorrect number of evaluations of the x argument. * tests/tstckintc.c: improved the tests to detect this bug. This should fix mpfr bug #1. Bug initially reported by FX Coudert: https://github.com/CGAL/cgal/issues/7064 It affects Fedora Linux: https://bugzilla.redhat.com/show_bug.cgi?id=2144197 2022-11-17 Vincent Lefevre ChangeLog update with tools/update-changelog 2022-11-17 Vincent Lefevre [doc/mpfr.texi] Changed a @need command due to a bug in @need. A page break was introduced for "@need 800" while there was the space for 12 lines of text + 3 paragraph skips, as seen after the change. That's much more than the 8/10 in needed by "@need 800". So the page break was incorrect! 2022-11-17 Vincent Lefevre [doc/mpfr.texi] Added @need commands to prevent page breaks. 2022-11-17 Vincent Lefevre [doc/mpfr.texi] Hack to improve TeX output (PDF). Define a @fptt macro to fix the TeX output (PDF) issue mentioned in commit 1877cf9aef96c2280aab60f67e5e7302676d199a (if the style of HTML output is fixed to be more like TeX output, this code will need an update). 2022-11-17 Vincent Lefevre [doc/mpfr.texi] Added a note about a TeX output (PDF) issue. This affects "[]", which appears in the mpfr_sum and mpfr_dot function prototypes. 2022-11-16 Vincent Lefevre Consistency: s/non(zero|positive|negative)/non-$1/ Changed non(zero|positive|negative) to non-zero, etc. for consistency (target files: src & tests directory, doc/README.dev, doc/mpfr.texi). Did it this way because the former was in minority (21 vs 165) and the IEEE 754-2019 standard uses a hyphen. 2022-11-16 Vincent Lefevre [doc/mpfr.texi] Final typographic and style corrections. Actually a bit more than that, since this affected the textual part of the PDF file (used for searching and copy-paste): the underscore character needs to be in something like @code or @samp to be present in this textual part. 2022-11-16 Vincent Lefevre Updated version to 4.2.0-dev with the new tools/update-version. All the expected replacements have now *really* been done thanks to commit a4dec8938b85afbca2d448ae2dd4e0d3ab72b00c. 2022-11-16 Vincent Lefevre [tools/update-version] Fixed replacements in "doc/mpfr.texi". The change done in commits 4885b57add174f390eff29abe14d12fb5ebd6a61 and 7eda345244f503359d14cd5bae1ed42865d39ee8 was incorrect as there are 2 identical replacements to do in "doc/mpfr.texi", not just one. The previous code changed lines separately. But for the check of failing replacements, a global change on the full file is needed; thus the 2 identical replacements were expected to be done at the same time, so that the "g" modifier is needed on the regexp. 2022-11-15 Vincent Lefevre Updated doc/texinfo.tex to 2022-11-13.08 [TODO] Added URL for the Clang multiprecision arithmetic builtins. 2022-11-15 Paul Zimmermann [TODO] add reference to __builtin_addcll 2022-11-11 Vincent Lefevre [doc/README.dev] "To make a release": mention the README file. 2022-11-10 Vincent Lefevre Updated version to 4.2.0-dev with the new tools/update-version. All the expected replacements have now been done in doc/mpfr.texi, thanks to commit 7eda345244f503359d14cd5bae1ed42865d39ee8. 2022-11-10 Vincent Lefevre [tools/update-version] Updated a replacement. This was needed due to a change done on 2018-09-07 in doc/mpfr.texi (commit 84796030c7c732e8e66e5e650ec929c541dd207f / SVN r13153), as said in the previous commit. 2022-11-10 Vincent Lefevre [tools/update-version] Check for failing replacements. This script currently fails due to a change done on 2018-09-07 in doc/mpfr.texi (commit 84796030c7c732e8e66e5e650ec929c541dd207f / SVN r13153), and this issue remained unnoticed until now, in particular due to the absence of checking for failing replacements. The penultimate non-patchlevel release was done on 2017-12-25, i.e. before this change, and no patchlevel releases have been done yet for the latest release, so that no current releases are affected by this issue, but the 4.1.1 release candidate is affected. 2022-11-09 Vincent Lefevre Updated doc/texinfo.tex to 2022-11-07.17 (from GNU Texinfo 7.0). 2022-11-08 Vincent Lefevre [doc/mpfr.texi] Updated comment about an issue with math operators. [doc/mpfr.texi] Added a comment about an issue with math operators. [doc/mpfr.texi] Another typographic improvement. 2022-11-08 Vincent Lefevre [doc/mpfr.texi] Added a comment for \mathop with a single character. Workaround to avoid an alignment issue described at https://tex.stackexchange.com/questions/41261/mathop-shifts-the-baseline-declaremathoperator-doesnt when the math operator @EXP{} was just "E". 2022-11-08 Vincent Lefevre [doc/mpfr.texi] More typographic corrections and improvements. Also did some changes to improve the consistency. 2022-11-07 Vincent Lefevre [doc/mpfr.texi] Added a comment (ref to the GNU Texinfo spacing bug). 2022-11-07 Vincent Lefevre [doc/mpfr.texi] More typographic corrections for math expressions. * Note a spacing bug in texi2dvi from GNU Texinfo 6.8 with macros (found while testing). * Define macro @EXP (and \EXP in TeX). * Typographic corrections for math expressions. 2022-11-07 Vincent Lefevre [doc/mpfr.texi] Added a comment. [doc/mpfr.texi] Improved typography and English usage. [doc/mpfr.texi] More documentation for the @m{T,N} macro. 2022-11-04 Vincent Lefevre [src/set_zero.c] IEEE 754 terminology in a comment. 2022-11-04 Vincent Lefevre [doc/mpfr.texi] Improved consistency about infinity and zero. Note: one writes "+0", but "positive zero", not "plus zero", etc. See the IEEE 754 standard. 2022-11-03 Vincent Lefevre [doc/mpfr.texi] Minor corrections related to infinity. This completes commit 75041697429ba467c448195b4f0863d0eb92e20c done in 2021-02. 2022-11-03 Vincent Lefevre [doc/mpfr.texi] Style corrections. 2022-11-03 Vincent Lefevre [doc/mpfr.texi] Style improvement for TeX (PDF) output. For mpfr_acosu, mpfr_asinu, mpfr_atanu and mpfr_atan2u, make the style similar to the one for mpfr_cosu, mpfr_sinu and mpfr_tanu. 2022-11-03 Vincent Lefevre [doc/mpfr.texi] More use of @tm (typographic corrections). 2022-11-01 Vincent Lefevre [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Completed the description of the @mm macro. 2022-11-01 Vincent Lefevre [doc/mpfr.texi] Improved typography for the formatted output functions. For what is displayed (or output text), @samp{...} should be used, as already done in some cases (note: never enclose @samp{...} with quotes as this is already done in the Texinfo processing). 2022-11-01 Vincent Lefevre [doc/mpfr.texi] Improved the readability of an example. 2022-11-01 Vincent Lefevre [doc/mpfr.texi] More typographic corrections for TeX (PDF) output. * Define a @mm{T} macro to be used for math symbols outside of @m, @tm, @code or similar (but not for the "+" in "C++"). * Use this macro when applicable. * Add missing @tm for some simple math expressions. 2022-10-28 Vincent Lefevre [doc/mpfr.texi] Added tm macro and improved math typography. 2022-10-27 Vincent Lefevre [tools/nightly-test] Corrections and cleanup. In particular, reverted most changes done in SVN r9832 (commit 1ca64e34907c5a968ca7fcc3d22cdca2ede7f28b): * switch back to /bin/sh (bash is not needed by this script); * do not use --enable-decimal-float and --enable-float128 with a C++ compiler as they are not supported (configure fails). And for the "git clone" command: * take the BRANCH argument into account; * use --depth 1 to avoid an unnecessary full clone. Better g++ detection (e.g. g++-12 or /usr/bin/g++, not just g++). 2022-10-27 Paul Zimmermann [tools/nightly-test] change to git 2022-10-26 Vincent Lefevre [doc/mpfr.texi] Cosmetic consistency change in the .texi source. Let's use the same code for "start of header" and "end of header". 2022-10-25 Vincent Lefevre [doc/mpfr.texi] Updated @m{T,N} macro, with comments. The @m{T,N} macro is used for math formatting and textual equivalent (human-readable text). However, it was generating emphasis in HTML, which was unexpected. This commit removes the use of @math for the Info and HTML output (for Info, this does not change anything, and for HTML, this removes the incorrect emphasis). It also updates the documentation and adds a comment about the history of this macro and various issues related to it. 2022-10-24 Vincent Lefevre Updated doc/texinfo.tex to 2022-10-18.18 Update from the texinfo Git repository. * The generated mpfr.html and mpfr.info files remain the same. * For mpfr.pdf, there are some spacing improvements. 2022-10-11 Vincent Lefevre [doc/mpfr.texi] Updated the month. 2022-10-11 Vincent Lefevre [doc/mpfr.texi] Fix formatting for mpfr_can_round. Consistency changes and use of no-break space (@tie{}). Note: Once @math{...} has been clarified/fixed, apply the suggestions by Ivan Panchenko: https://sympa.inria.fr/sympa/arc/mpfr/2022-10/msg00020.html 2022-10-11 Vincent Lefevre [doc/mpfr.texi] Consistency correction for mpfr_get_str_ndigits. Use @math{m} (instead of just m) as already used a bit earlier. But the use of @math may need to be revised. See https://lists.gnu.org/archive/html/bug-texinfo/2022-10/msg00045.html 2022-10-11 Vincent Lefevre [doc/mpfr.texi] Improved spacing. 2 changes suggested by Ivan Panchenko at https://sympa.inria.fr/sympa/arc/mpfr/2022-10/msg00020.html but do not use @math{...} as with HTML output, it puts everything in italics with ..., which is incorrect for things like digits. However, this behavior of @math{...} is not what is documented in the GNU Texinfo 6.8 manual, which says: The '@math' command has no special effect on the Info output or (by default) the HTML output, merely outputting the contents verbatim. 2022-10-11 Vincent Lefevre [doc/mpfr.texi] Added a comment about the use of @math{...}. 2022-10-11 Vincent Lefevre [doc/mpfr.texi] Fixed italicization for mpfr_eint. An issue reported by Ivan Panchenko: https://sympa.inria.fr/sympa/arc/mpfr/2022-10/msg00020.html I also had to fix the occurrences of k in @ifnottex for HTML. 2022-10-11 Vincent Lefevre Fixed some minor mistakes. * Minor mistakes in doc/mpfr.texi reported by Ivan Panchenko: https://sympa.inria.fr/sympa/arc/mpfr/2022-10/msg00020.html (spacing and italicization not fixed yet). * Fixed similar mistakes in the other files. 2022-10-11 Vincent Lefevre mpfrlint: updated text checking (spelling...) 2022-10-05 Vincent Lefevre ChangeLog update with tools/update-changelog [tools/update-changelog] Use UTC to generate the ChangeLog file. 2022-10-05 Vincent Lefevre [tools/gitlog-to-changelog] Improve --strip-cherry-pick for this repository. Remove all the cherry-pick information from what can be found in the 4.1 branch. 2022-10-05 Vincent Lefevre [doc/README.dev] "To make a release": precision about the tag. [doc/README.dev] "To make a release": correction about the tag. [tests/tnrandom.c] Fixed compilation failure with mini-gmp. 2022-10-05 Vincent Lefevre [tools] Improvement for the ChangeLog generation. * tools/gitlog-to-changelog: modified regexp for --strip-cherry-pick to support some log message in the MPFR Git repository (currently, only commit 4c5973c2f0153a3a4708cab79ed142e72c4a50eb, but similar ones could occur in the future). * tools/update-changelog: use this --strip-cherry-pick option. 2022-10-05 Vincent Lefevre [doc/README.dev] "To make a release": update for the ChangeLog file. See commit 1dc281851408fc7d330576327545857c93392521 for the reason. 2022-10-05 Vincent Lefevre [doc/README.dev] "To make a release": update for abi-compliance-checker. Added an example of use of build-multi and abi-compliance-checker for the 4.1.1 release candidate. 2022-10-05 Vincent Lefevre Fix for "make dist" / "make distcheck" about ChangeLog regeneration. The "ChangeLog: FORCE" rule in Makefile.am was incompatible with GNU Automake's "make dist" / "make distcheck" because GNU Automake creates a "distdir-am: $(DISTFILES)" rule, which was regenerating the ChangeLog file in "make dist"; such a change is not allowed (it fails with "make distcheck") and not wanted anyway. Issue introduced by commit 52652c41978089be57aca658bacf19b758c73be4. * Added tools/update-changelog sh script to update the ChangeLog file. * Makefile.am: replaced the incorrect rule mentioned above by a rule update-changelog to run tools/update-changelog; added a comment. 2022-10-05 Vincent Lefevre [doc/README.dev] "To make a release": update for abi-compliance-checker. 2022-10-05 Vincent Lefevre [doc/README.dev] "To make a release": update about build-multi. Needed due to the switch from InriaForge to Inria GitLab. 2022-10-04 Vincent Lefevre [tests/tnrandom.c] Improved the support non-default seed. As suggested by mpfrlint, use a different randstate rather than re-seeding mpfr_rands (with a fixed seed). So the corresponding test no longer needs to be at the end. 2022-10-04 Vincent Lefevre [tests/tnrandom.c] Added a comment for tnrandom with an argument. This concerns a slowness of mpfr_clear() in the MPFR tests due to the O(n) search in tests_memory_find(), used to detect memory leaks. 2022-10-04 Vincent Lefevre [tests/tnrandom.c] Support non-default seed (GMP_CHECK_RANDOMIZE). This fixes a failure due to 4c5973c2f0153a3a4708cab79ed142e72c4a50eb when GMP_CHECK_RANDOMIZE is set. 2022-10-04 Vincent Lefevre [doc/README.dev] "To make a release": added note about GMP_CHECK_RANDOMIZE. 2022-10-03 Vincent Lefevre [doc/update-faq] Ensure that the code is run from the doc directory. [tools/coverage] Typo. [doc/README.dev] Updated "To make a release". Updated URLs. Updated URLs. Updated URLs. 2022-10-03 Vincent Lefevre [doc/README.dev] Corrected "To make a release". The addition of the -root tag applies only after a branch is created, i.e. for non-patchlevel releases (item 0). 2022-09-14 Vincent Lefevre Updated doc/texinfo.tex to 2022-09-14.01 Update from the texinfo Git repository. * The generated mpfr.html and mpfr.info files remain the same. * For mpfr.pdf, this version fixes all the issues I've reported. 2022-09-09 Vincent Lefevre [doc/README.dev] Updated "To make a release". [src/mpfr-impl.h] Added TODO for MPFR_MAYBE_UNUSED. 2022-09-07 Vincent Lefevre [doc/README.dev] New C2x draft (N3054). 2022-09-05 Vincent Lefevre [doc/README.dev] Updated "To make a release" (about texinfo.tex). [autogen.sh] Added a comment about files we handle in the repository. 2022-09-05 Vincent Lefevre [doc/.gitignore] Removed /texinfo.tex since it is in the repository. doc/texinfo.tex was added to the Subversion repository on 2017-11-27 and the svn:ignore property should have been updated at this time, but I forgot. 2022-09-03 Vincent Lefevre [tests/RRTest.c] Replaced "egrep" by "grep -E" in comment. In the GNU grep 3.8 release notes: The egrep and fgrep commands, which have been deprecated since release 2.5.3 (2007), now warn that they are obsolescent and should be replaced by grep -E and grep -F. 2022-08-27 Vincent Lefevre [doc/README.dev] Changed "trunk" (Subversion) to "master" (Git). [doc/README.dev] New C2x draft (N3047). 2022-08-26 Vincent Lefevre [tools/announce-text] Updated key ID for the future releases. 2022-08-19 Vincent Lefevre [codespell.ignore] Ignore RO and SIZ (codespell 2.2.0). Corrected spelling mistake found by codespell 2.2.0 2022-08-16 Vincent Lefevre Cleanup about decimal floating constants matching ".0d". In general, the trailing 0 is not needed, and even not wanted (this has the effect to decrease the quantum by 1 compared to the "natural value"), though the quantum is not yet specified in MPFR. In tests/tget_set_d64.c, kept this trailing 0 in mpfr_set_decimal64, but added similar tests without this trailing 0. 2022-08-08 Vincent Lefevre version-ext.sh: replaced a remaining "sed" by "$SED". Thanks to Trevor Spiteri for noticing that. 2022-08-08 Vincent Lefevre version-ext.sh: handle the case where no Git branches are found. This should solve the issue reported on 2022-08-08 by Trevor Spiteri: https://sympa.inria.fr/sympa/arc/mpfr/2022-08/msg00002.html 2022-07-08 Vincent Lefevre doc/mpfr.texi: Updated the month. 2022-07-08 Vincent Lefevre [manual] Added a note for mpfr_nexttoward (exceptions, sign of 0). Also applies to mpfr_nextabove and mpfr_nextbelow, whose description refers to mpfr_nexttoward. See additional details in the comment in the src/next.c source. 2022-07-08 Vincent Lefevre [src/next.c] Updated comment (exceptions and sign of 0). Concerned functions: mpfr_nexttoward, mpfr_nextabove, mpfr_nextbelow. Clarification was needed due to the differences between the IEEE 754-1985, IEEE 754-2008/2019 and ISO C99+ standards on similar functions (nextafter, nextUp, nextDown). 2022-07-06 Vincent Lefevre [configure.ac] Update about GNU gold ld and LD_RUN_PATH. * Comment update: added URL of the upstream bug report. * Mention the GNU gold linker in the warning. 2022-06-13 Vincent Lefevre [README] Replaced "Subversion" by "Git". [doc/README.dev] Completed the update for Git. [doc/README.dev] Moved and clarified a paragraph about the tests. 2022-06-11 Vincent Lefevre Fixed tsprintf %a tests when GMP and libc produce different outputs. With some 32-bit mingw-w64 implementations, the GMP and libc formatted output functions produce different outputs for %a (this is not completely specified by the C standard). In the MPFR tests introduced by commit 22db634294c27eabbc0c55b04267d3ab5bc9a648 on 2022-05-19, the comparison is done between the MPFR result, which is based on GMP, and the libc result; hence a failure. So, changed the 4 concerned tests of tests/tsprintf.c to compare the MPFR result with the GMP result (for the other tests on the C native types, it is still better to compare MPFR with libc). Bug report: https://sympa.inria.fr/sympa/arc/mpfr/2022-06/msg00004.html 2022-06-10 Vincent Lefevre [tools/announce-text] Completed the update for Git. [tools/announce-text] Check that one has an annotated tag at origin. [tools/announce-text] Update. [tools/announce-text] Minor git-related simplification. [tools/announce-text] Started the update for Git. [tools/announce-text] Removed code and text related to InriaForge (obsolete). 2022-06-08 Vincent Lefevre Updated www.open-std.org URLs: http → https. 2022-06-07 Vincent Lefevre [doc/README.dev] New C2x draft (N2912). 2022-06-02 Vincent Lefevre [doc/README.dev] Updated "To make a release". This completes the update for Git and Inria GitLab. But the tools/announce-text script has not been updated yet. 2022-06-02 Vincent Lefevre [tools/export-release] Completed the script. Fix the timestamps so that each file or directory has a timestamp corresponding to its last change. 2022-06-02 Vincent Lefevre Added tools/export-release sh script. Export some release identified by a Git tag in order to get a tarball. 2022-06-02 Vincent Lefevre [mbench] Updated Copyright lines. Added tools/mbench/.gitignore file. [mbench/Makefile] Added missing dependencies on timp.h 2022-06-02 Vincent Lefevre [mbench/timp.h] Bug fix for "make rt" on 32-bit machines. Reindent. For the code used when USE_CLOCK_MONOTONIC is defined ("make rt"): If both time_t (type of tv_sec) and long are 32-bit types, there was an overflow in the timp_rdtsc() macro, due to the multiplication of the tv_sec (coming from CLOCK_MONOTONIC, thus typically larger than 5) by the value 1000000000 (≈ 2^32 / 4.3) of type unsigned long, because this multiplication would be done on 32 bits. Changed the type of the constant to unsigned long long so that the operations are done with the target type unsigned long long (at least). 2022-06-02 Vincent Lefevre [mbench] Removed trailing whitespace. 2022-06-01 Vincent Lefevre [doc/README.dev] Updated "To make a release" (about ChangeLog). ChangeLog update with "make ChangeLog" [tools/ck-copyright-notice] Better indentation. [tools/ck-copyright-notice] Support the future ChangeLog format. 2022-06-01 Vincent Lefevre [tools/ck-copyright-notice] Better error handling. Note: One currently gets a failure with the future ChangeLog format, obtained with gitlog-to-changelog (via "make ChangeLog"). 2022-06-01 Vincent Lefevre Support ChangeLog regeneration from a Git working tree. * Added tools/gitlog-to-changelog file from Gnulib. * Makefile.am: added a rule for the Changelog file. Needed as the GNU MPFR repository has been converted to Git. The '%B%n' format string is used rather than the default '%s%n%b%n' because Git's commit message convention is not always followed (in particular before the conversion of the repository to Git). Note: In the future, if there is any change to do to a Git commit message (typo, etc.), the --amend option could be used. 2022-05-30 Vincent Lefevre Started to update doc/README.dev for Git. 2022-05-19 Vincent Lefevre [manual] Clarify the description of the formatted output functions. Emphasize the fact that the conv specifier F is not supported, except for the type specifier R (for mpfr_t arguments). 2022-05-19 Vincent Lefevre [src/vasprintf.c] Consistency with the non-support of %F by GMP. The F conversion specifier as defined by the C standard is not supported by the GMP formatted output functions because it is already used as the type specifier for mpf_t (which comes before the conversion specifier). Let's take this fact into account. Note: this conversion specifier is still allowed with MPFR numbers (e.g., "%RF") to avoid breaking the compatibility (it has never been an issue). 2022-05-19 Vincent Lefevre [tests/tsprintf.c] native_types: added tests to differentiate %G from %g. The tested value -1.25 had the same output -1.25 with %g and %G. Added 7.62939453125e-6 (= 2^(-17)), whose output by %g and %G has an exponent introduced by 'e' and 'E' respectively. 2022-05-19 Vincent Lefevre [tests/tsprintf.c] native_types: added tests for %a, %A, %la, %lA 2022-05-19 Vincent Lefevre [tests/tsprintf.c] Added/fixed native_types tests. * Added tests of %E and %G. * Removed the test of %lF, which is not supported by GMP (and yields a heap buffer overflow, detected by AddressSanitizer): even though there would be no ambiguity in this particular case, it is not supported because the standard F conversion specifier isn't due to the use of the F type specifier for mpf_t. 2022-05-19 Vincent Lefevre [tests/tsprintf.c] Correction for %la, %lA, %le, %lE, %lf, %lF, %lg, %lG Reverted commit 2b60707d22717e0f582be5de680d7fa7004e2512 and added tests for the missing %lE, %lF, %lG in native_types, protected by a #if (see commit ecd3279f3dfd281fc8e51aac7509b76b27497a6c) as they may need an ISO C99 compiler. Note: The test of %la and %lA was incorrect because the first digit is unspecified (and really depends on the C library). A test could be added in the future, perhaps also with a configure test, because the compiler may support ISO C99 but not the C library (there was an issue like that at least with old versions of Solaris). 2022-05-19 Vincent Lefevre [tests/tsprintf.c] native_types: test %le, %lf, %lg only with C99+ … since the l length modifier for the FP types (a, A, e, E, f, F, g, G conversion specifiers) has been added in ISO C99. 2022-05-19 Paul Zimmermann [tests/tsprintf.c] added tests for %la, %lA, %le, %lE, %lf, %lF, %lg, %lG 2022-05-19 Vincent Lefevre [src/vasprintf.c] Bug fix for the l length modifier with FP type. The l length modifier is now supported with the a, A, e, E, f, F, g, G conversion specifiers, as required by the ISO C standard on printf and other formatted output functions. As specified, it is just ignored. For that, to improve code maintainability, the CASE_LONG_ARG() macro was simplified: * The c and s conversion specifiers are always supported by this macro (this is a potential fix for implementations with incomplete wide-character handling, without any guarantee to work). * A MPFR_RET_NEVER_GO_HERE() for unsupported conversion specifiers has been added (if specinfo_is_valid() is consistent with this macro, one should effectively never reach this case). 2022-05-19 Vincent Lefevre [src/vasprintf.c] Made case ordering consistent (no change of behavior). The "case" ordering in specinfo_is_valid() and in CONSUME_VA_ARG() for integer specifiers and for floating-point specifiers was not the same. Improved code readability by using the same order across the code (also OK with CASE_LONG_ARG()). 2022-05-19 Vincent Lefevre [tests/tsprintf.c] native_types: test %le, %lf, %lg. These tests are currently failing. Bug reported by Paul Zimmermann for %la (but %a and %la are not currently tested, because of their possible lack of support in the C library). 2022-05-19 Vincent Lefevre [tests/tsprintf.c] native_types: same tests for i as for d. [tests/tnrandom.c] With mini-gmp, disable the tests that check the values. [acinclude.m4] Added a comment about the unreliable NAN != NAN check. 2022-05-19 Vincent Lefevre [tests/cmp_str.c] In mpfr_cmp_str, check that s is a valid number. In the tests, the string provided to mpfr_cmp_str is normally a valid number (the common use is to check that a result is equal to some hardcoded value given by a string). A string s that does not represent a valid number probably has a typo, and the consequence was that in such a case, any non-NaN result was regarded as correct. 2022-05-19 Vincent Lefevre [tests/tsubnormal.c] Removed invalid testcase bug20220518. The testcase bug20220518 added in commit 7640a832fbf0b7f9057889e076cf7f42fe4f8e58 was invalid as the mpfr_subnormalize input was not in the current exponent range (it had exponent -1074 while emin = -1073). As usual, inputs outside the current exponent range are not supported (the mpfr_subnormalize description in the manual is explicit: "The subnormal exponent range is from ‘emin’ to ‘emin+PREC(X)-1’."). Supporting values outside the current exponent range is not needed in practice (see examples in the manual). 2022-05-19 Vincent Lefevre [tests/tsubnormal.c] Code style in coverage(). [tests/tsubnormal.c] Added missing cleanup at the end of bug20220518. [tests/tsubnormal.c] Simplified bug20220518. [tests/tsubnormal.c] C90 compatibility. 2022-05-18 Paul Zimmermann [tests/tsubnormal.c] added test case that exhibits a bug in mpfr_subnormalize [src/subnormal.c] fixed typo 2022-05-18 Vincent Lefevre [tests/tnrandom.c] Check some mpfr_nrandom values to detect changes. The values should be the same on different machines and with different MPFR versions (or this would be an ABI change). 2022-05-17 Vincent Lefevre For version-ext.sh, use "$SED" instead of "sed". * tests/Makefile.am: pass $SED to version-ext.sh. * version-ext.sh: use $SED (default to "sed"). 2022-05-17 Vincent Lefevre Fixed version-ext.sh when in an origin/* remote branch. 2022-05-13 Vincent Lefevre Tests: the check of subnormal support is done when running the tests. The check of support for double and float subnormals was done at configure time, but it could not be done when cross-compiling. Since it is useful only for the tests, it is better to do it when running the tests. * tests/tests.c: added have_subnorm_dbl() and have_subnorm_flt() functions to check support for double and float subnormals; removed such a check from mpfr_test_init(). * tests/mpfr-test.h: declare these functions. * tests/tget_flt.c: use have_subnorm_flt() instead of HAVE_SUBNORM_FLT. * tests/tset_d.c, tests/tsprintf.c: removed the useless test of HAVE_SUBNORM_DBL (this was a minor optimization). * acinclude.m4: updated comment about the check of subnormal support; minor improvement in the check for float subnormals. Note: keep the check just for build information (it might be useful for debugging or in case of a related bug report). * tools/mpfrlint: check that the HAVE_SUBNORM_* macros are not used. 2022-05-13 Vincent Lefevre [acinclude.m4] Updated comment about the check of subnormal numbers. * Removed text about DBL_HAS_SUBNORM and FLT_HAS_SUBNORM (which was added in commit 3ee30bcf34bfb5d042e5a1aa9b7cf8a42b51cb91 on 2019-10-01) since these macros should be made obsolescent: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2981.htm And their use would be incorrect in C++ (different meaning): https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2988.pdf * A bit more details. * Added a FIXME for better cross-compiling support. 2022-05-10 Vincent Lefevre doc/mpfr.texi: Updated the month. [NEWS] Mention the fixes of the macros of the custom interface. 2022-05-10 Vincent Lefevre Improved 2 macros of the custom interface and updated manual. * src/mpfr.h: The mpfr_custom_init() and mpfr_custom_move() macros could not be used in contexts where an expression was expected. This limitation was not necessary and is now removed. * doc/mpfr.texi: In commit 743a63c480318f60ac2a953007bac08f37b7d71d, the manual was clarified about the macros of the custom interface, i.e. behaving like macros, which may evaluate arguments multiple times or none. This was incomplete and error prone, in addition to being undocumented in the current MPFR versions. Almost all issues have now been fixed (the only minor limitation is that the mpfr_custom_init_set() macro is not usable in contexts where an expression is expected, but this cannot yield unnoticed bugs). So, changed the manual to reflect these fixes and added an item in Section "API Compatibility" (also removed an obsolete comment about that from src/mpfr.h). 2022-05-08 Vincent Lefevre Improved a comment. 2022-05-06 Vincent Lefevre [doc/README.dev] Added text about tests of function-like macros. 2022-05-06 Vincent Lefevre In comments, changed "stack interface" to "custom interface". * src/mpfr.h: changed "stack interface" and "mpfr_stack interface" to "(the) custom interface". * src/stack_interface.c: changed "mpfr_stack" to "custom interface". The mpfr_stack_ prefix was changed to mpfr_custom_ in 2005 (see commit 0a010e55364d1cc3681273eee70c91dab0a61946) and the MPFR manual says "Custom Interface". 2022-05-06 Vincent Lefevre Other corrections about the custom interface. This time, the build of tstckintc was failing with "gcc -Wc++-compat" because __cplusplus is not defined. * tests/tstckintc.c: use the same solution as already done in tcopysign.c (commit 3dbf3387669030b264317202806fc3d938704618), i.e. ignore -Wc++-compat with "GCC diagnostic" pragmas when testing with void * arguments. Also simplified the code thanks to the VOIDP_CAST macro that was introduced at that time (cast to void * except in C++): commit 9076e47ceb41c60cab526870757f2098ced5c26d. Everything should now be OK. 2022-05-06 Vincent Lefevre Other corrections about the custom interface. In C++, implicit pointer conversions are forbidden. This made the build of tstckintc fail with g++ and -DMPFR_USE_NO_MACRO in CFLAGS. * src/mpfr.h: do not attempt to support implicit pointer conversions with a C++ compiler in the macros, since this is not supported by the functions, i.e. removed 2 useless casts; this is a bit like the code like before commit 9f94e0311ed53d0c64d4fbca249d19cc4888027e. * tests/tstckintc.c: test a "void *" argument instead of mpfr_ptr only in C, not C++ (which cannot work if -DMPFR_USE_NO_MACRO is used). Note: for newx and newx2, revert to the code that was before the commit mentioned above. 2022-05-06 Vincent Lefevre Testsuite: C++11 compatibility (GCC's -Wliteral-suffix). With "g++ -Werror", several .c files in the "tests" directory were yielding error: invalid suffix on literal; C++11 requires a space between literal and string macro [-Werror=literal-suffix] 2022-05-06 Vincent Lefevre Fixed build failure of user code using mpfr_custom_get_kind() / g++. * src/mpfr.h: added missing cast in the mpfr_custom_get_kind() macro (invalid C++ code, but this is in a GNU __extension__ block, thus unfortunately, it was not detected by "gcc -Werror=c++-compat"; see ). Bug introduced in commit 9f94e0311ed53d0c64d4fbca249d19cc4888027e. 2022-05-05 Vincent Lefevre Fixed issues with the macro versions of the custom interface. * src/mpfr.h: fixed issues with the mpfr_custom_* macros: - a "void *" argument instead of mpfr_ptr could make the compilation fail (with the function, the conversion is implicit, thus this should be accepted by the macro); - some arguments could be evaluated 0 times, which is wrong if their evaluation has side effects. * tests/tstckintc.c: added various tests to check these kinds of issues. 2022-05-05 Vincent Lefevre Avoid a -Wsign-conversion warning that could occur in user code. Issue reported by Andreas Enge concerning PariTwine. * src/mpfr.h: added a cast in the mpfr_custom_get_size() macro so that a size_t * size_t product is done instead of mpfr_prec_t * size_t (where mpfr_prec_t is signed and size_t is unsigned, triggering a warning when GCC's -Wsign-conversion is used). 2022-05-05 Vincent Lefevre Fixed mpfr_custom_get_size() macro and added non-regression test. * src/mpfr.h: added missing cast in mpfr_custom_get_size() macro. * tests/tstckintc.c: added testcases (would fail on LP64 platforms). 2022-04-22 Vincent Lefevre [mpfr-impl.h] Rounding mode macros: added assertion; updated comments. 2022-04-22 Vincent Lefevre Updated TODO to improve mpfr_pow_si/sj for negative n. I thought that there would be some drawbacks with the underflow by computing the power before the division, but this actually seems to be more or less equivalent (mpfr_pow_general is already used for MPFR_RNDN). Also, removed the suggestion with rescaling as this may not be possible for large values of n compared to the maximum exponent. 2022-04-17 Vincent Lefevre Corrected comment about the ".POSIX" line in all Makefile.am files. 2022-04-08 Vincent Lefevre [TODO] Added idea of implementation for to_chars. 2022-04-07 Vincent Lefevre [manual] For sqrt and rec_sqrt, mention the relation with rootn. Updated TODO about rootn (now that mpfr_rootn_si is implemented). 2022-04-06 Vincent Lefevre [src/pow_si.c] Added a static assertion and comments about code improvement. 2022-04-06 Vincent Lefevre [src/log_ui.c] Updated comments to better understand that the code is correct. Note: these are the same as in the 4.1 branch (commit 8f357dd48). So the ULONG2LONG macro was not necessary, but let's keep it for maintainability. This does not change for GCC and Clang. But tcc even generates shorter x86_64 code with this macro. 2022-04-06 Vincent Lefevre [tests/tpow.c] Improved/added bad_cases tests of mpfr_pow_ui/si (x^n). * For n odd, generate negative values y (thus x) with a probability 1/2 (instead of a very low probability), as there is no reason to favor positive values in this case. * Added bad_cases tests of mpfr_pow_si with n negative (with the help of mpfr_rootn_si). This was the TODO from commit 58fc9fb0e. 2022-04-06 Vincent Lefevre [tests] In some bad_cases messages, output the name of the function. This is useful for tests with several bad_cases invocations, such as tpow, troot and trootn_si. 2022-04-06 Vincent Lefevre [tests/{troot,trootn_si}.c] Added a comment about bad_cases. 2022-04-05 Vincent Lefevre Added /trootn_si to tests/.gitignore 2022-04-05 Vincent Lefevre src/root.c: for mpfr_rootn_si with k = -2, use mpfr_rec_sqrt. The mpfr_rec_sqrt code is faster than the generic mpfr_rootn_si code for k = -2. Also added a TODO: if MPFR_WANT_ASSERT >= 2, do both computations and compare the results. 2022-04-05 Vincent Lefevre tests/trootn_si.c: fixed typo in error messages. 2022-04-05 Vincent Lefevre src/pow_ui.c: bug fix with mini-gmp and limb < unsigned long. The initial precision was too small for large values of n. → tpow and trootn_si no longer fail. 2022-04-05 Vincent Lefevre tests/tpow.c: better generic tests for mpfr_pow_ui and mpfr_pow_si. Changed INT_RAND_FUNCTION, in particular to use randulong / randlong for mini-gmp, yielding an assertion failure when MINI_GMP_LIMB_TYPE is shorter than "long". 2022-04-05 Vincent Lefevre mpfrlint: ignore mini-gmp in some test. 2022-04-05 Vincent Lefevre mpfr_rootn_si(): bug fix for n = LONG_MIN; added generic tests. * src/root.c: bug fix in mpfr_rootn_si() for n = LONG_MIN (integer overflow on -n, triggered by the generic tests). * tests/trootn_si.c: added generic tests. Note: they currently yield an assertion failure in pow_ui.c with mini-gmp when MINI_GMP_LIMB_TYPE is shorter than "long". 2022-04-05 Vincent Lefevre [tests] Add randulong and randlong functions (useful with mini-gmp). To get a random unsigned long, randlimb() is currently used, but with mini-gmp, a limb may be shorter than an unsigned long, so that one does not get all the possible "unsigned long" values. So these new randulong() and randlong() functions should now be used instead. 2022-04-05 Vincent Lefevre Define a ULONG2LONG() macro to convert from unsigned long to long. The conversion is done with the two's complement rule (i.e. modular arithmetic) in a portable way. * doc/README.dev: mention this macro (the technique was already described). * src/log_ui.c: use this macro instead of non-portable code due to the case n = LONG_MAX + 1. * src/mpfr-impl.h: define this macro. 2022-04-05 Vincent Lefevre trootn_si.c: more mpfr_rootn_si tests on special values doc/mpfr.texi: Updated the month. New function mpfr_rootn_si 2022-04-04 Vincent Lefevre [src/root.c] Updated a comment for mpfr_rootn_ui. This comment was correct for mpfr_root, but I forgot to update it when changing this function to mpfr_rootn_ui (where this case differs) in commit 117c726a863e243634c8e5fbaae0265cac90a4a1. 2022-04-04 Vincent Lefevre [tests/troot.c] Added a comment. [tests/tpow.c] Added a TODO about tests with bad_cases. [tests/tpow.c] Corrected messages. [tests/tpow.c] For rootN, use mpfr_root and mpfr_rootn_ui randomly. 2022-04-04 Vincent Lefevre [tests] Define RAND_BOOL() macro (random boolean) and use it. In the tests directory: * mpfr-test.h: define RAND_BOOL() macro, with type int. * mpfr-test.h and various .c files: replace "randlimb () & 1" and "randlimb () % 2" by "RAND_BOOL ()". * tfprintf.c, tsprintf.c: use the same code as tprintf.c. 2022-04-04 Vincent Lefevre In the tests, fixed "randlimb () % 1", mistaken for "randlimb () & 1". This occurred only in tests/tfmma.c (5 occurrences), with the consequence of fewer cases of different kinds in the tests. Such a kind of mistake is now detected by mpfrlint (commit 2a90f0c91). 2022-04-04 Vincent Lefevre mpfrlint: detect "% 1" (modulo 1), which always gives 0. This is probably mistaken for "& 1" or "% 2", as currently in "tests/tfmma.c". 2022-03-30 Vincent Lefevre [TODO] Moved and updated item. Since this is about functions in IEEE 754-2019, it makes more sense to have this item after the new functions of IEEE 754-2008. 2022-03-30 Vincent Lefevre [TODO] Updated item (with non-public URL removed). 2022-03-29 Paul Zimmermann [TODO] added item 2022-03-29 Vincent Lefevre Fixed version-ext.sh, in particular when used after "./autogen.sh". After running autogen.sh, version-ext.sh incorrectly detected files as modified. Solution: refresh the git index before git diff-index. 2022-03-28 Vincent Lefevre [acinclude.m4] Fix/improve MPFR_CHECK_LIBM and MPFR_CHECK_LIBQUADMATH. With a GCC snapshot, -Werror=infinite-recursion was yielding an error in AC_CHECK_LIB for function "main". So, define MPFR_HAVE_LIB to be used instead of AC_CHECK_LIB when it is not needed to test any function. So, use it in MPFR_CHECK_LIBM and MPFR_CHECK_LIBQUADMATH. Also updated MPFR_CHECK_LIBM from the current libtool.m4 code, as done in the past. 2022-03-24 Vincent Lefevre [get_d128.c] Updated FIXME comment. 2022-03-24 Vincent Lefevre Added a TODO efficiency item about the size of the MPFR library. Reduce the size of the MPFR library generated by GCC by avoiding operations on _Decimal128 in get_d128.c when its encoding is BID. 2022-02-18 Vincent Lefevre [algorithms.tex] Cleanup: ^\infty → ^{\infty} Using a command after _ (subscript) or ^ (superscript) is discouraged as it might break with future TeX versions, as already seen. Discussion: https://tug.org/pipermail/tex-live/2022-February/047780.html 2022-02-18 Vincent Lefevre [algorithms.tex] Updated 2 URLs in comments (http → https). 2022-02-03 Vincent Lefevre Updated a comment: added a ref to WG14/N2921 about large bit-fields. 2022-01-18 Paul Zimmermann [src/nrandom.c] added reference 2022-01-18 Vincent Lefevre Updated the FIXME in acinclude.m4 for MPFR_CHECK_LIBM. 2022-01-18 Vincent Lefevre Added FIXME in acinclude.m4 for MPFR_CHECK_LIBM. With a GCC snapshot: error: infinite recursion detected [-Werror=infinite-recursion] 2022-01-14 Paul Zimmermann [TODO] removed an item (done in the web page for each release) 2022-01-14 Vincent Lefevre doc/mpfr.texi: Updated the month. 2022-01-12 Vincent Lefevre [tests] Added a comment about the output of pointer values. 2022-01-10 Vincent Lefevre [doc/README.dev] Updated "To make a release". Added a paragraph about config.guess and config.sub. 2022-01-06 Vincent Lefevre Added a TODO to improve mpfr_pow_si/sj. Computing POW_U before the division (instead of after) would reduce the error in the intermediate result. 2022-01-06 Vincent Lefevre Updated a comment about a clang bug. Updated a comment about a clang bug. 2022-01-06 Vincent Lefevre Copyright notice update: added 2022. Command used: perl -pi -e 's/ (\d{4}-)?(2021)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2021 from the example in the doc/README.dev file. 2021-12-26 Vincent Lefevre README.dev: added C2x draft URL (N2731). Corrected style (spurious space before comma). 2021-12-21 Paul Zimmermann gnu style 2021-11-25 Vincent Lefevre Move code for git info to its own shell script "version-ext.sh". * New version-ext.sh file: sh script to output MPFR version information for a Git working tree (old code from tests/Makefile.am). * tests/Makefile.am: replace some output_info code by the use of this script. * Makefile.am: add version-ext.sh to EXTRA_DIST as a consequence (a comment explains why). * README: list this new version-ext.sh file as a consequence. 2021-11-25 Vincent Lefevre Another fix in the code for git info output by "make check". tests/Makefile.am: in output_info, replaced "grep" by "$(GREP)". 2021-11-25 Vincent Lefevre Fixed git info output by "make check". tests/Makefile.am: when discarding excluded branches, the match should be done on the full branch name, not a subword; so, added the -x grep option (specified by POSIX). 2021-11-25 Vincent Lefevre Updated tests_run_within_valgrind() comment in "tests/tests.c". 2021-11-23 Vincent Lefevre README.dev: added note about the formally proven code and requirements. Update of INSTALL file about CompCert. 2021-11-22 Vincent Lefevre doc/mpfr.texi: Updated the month. 2021-11-22 Vincent Lefevre For git info output by "make check", check for modifications. tests/Makefile.am: updated output_info code to add " (modified)" when the working tree has been modified (compared to HEAD). 2021-11-22 Vincent Lefevre Added info to doc/README.dev about -root tags. 2021-11-22 Vincent Lefevre Removed a usless comment about git info output by "make check". tests/Makefile.am: removed the comment about the unimplemented solution with possible *-branch tags (I think that it would not work well with merges). 2021-11-22 Vincent Lefevre Improved code to output git info from "make check". tests/Makefile.am: updated output_info code and comment. We now use -root tags to find to correct branch, by excluding branches created after the current HEAD. 2021-11-22 Vincent Lefevre Fixed git info output by "make check". tests/Makefile.am: in output_info, added a "|| true" on a shell command that may fail (grep with no matches). 2021-11-22 Vincent Lefevre Added a FIXME for git info output by "make check". The recent additions to tests/Makefile.am work well for master (and detached HEAD state), but not for the 4.1 branch, where $gitb gets empty, even though testing from an interactive shell (/bin/sh = dash) does not show any issue. 2021-11-22 Vincent Lefevre Improved git info output by "make check". tests/Makefile.am: modified output_info to output: * the detected branch, which also works in detached HEAD state (for old commits that can be found in multiple branches, "master" is prefered over the other branches); * the total commit count; * the commit id (hash). 2021-11-22 Vincent Lefevre Add git info with "git describe" for "make check" (to be improved). tests/Makefile.am: in output_info, add git info, but this does not output the branch. For instance, on master, one gets something like "4.1-root-491-g2933fad3a", and something similar on the 4.1 branch. As the solution needs to work in detached HEAD state, we may want to add *-branch tags to identify the first commit of a branch, and use git describe --match '*-branch' instead of git describe --match '*-root' 2021-11-15 Vincent Lefevre Documentation: some improvements about the "decimal-point character". * doc/README.dev: update about the use in the MPFR manual (mpfr.texi). * doc/mpfr.texi: minor correction. 2021-11-05 Vincent Lefevre [doc/algorithms.tex] Add \pdfglyphtounicode{lscript}{2113} for \ell. Otherwise one gets a grave accent (thus "s − l" cannot be found). If the "ℓ" is still an issue, one could alternatively use \pdfglyphtounicode{lscript}{006C} to get an "l" (but "l" also matches "ℓ" in xpdf and atril). 2021-11-05 Vincent Lefevre [doc/algorithms.tex] Add some ToUnicode mappings. This fixes some regressions compared to old LaTeX versions (in 2009). 2021-10-24 Vincent Lefevre doc/mpfr.texi: Updated the month. 2021-10-24 Vincent Lefevre mpfrlint: fixed git usage. The change done in 52138701d9b920d608871b20d4bee30f59adede6 wasn't working when the latest commit wasn't on "doc/mpfr.texi". 2021-10-24 Vincent Lefevre mpfrlint: update for git. This is used to check that the doc/mpfr.texi UPDATED-MONTH value is up-to-date by comparing it with the date of the latest commit. 2021-10-24 Vincent Lefevre In mpfr.texi, added a "@." to avoid a warning from mpfrlint. Note: This is not needed at the end of a paragraph like here, but this is a general warning, just in case text is added or moved. 2021-10-24 Vincent Lefevre mpfr.texi cleanup: removed the obsolete @refill command. This command was needed in the past, but it now generates a warning "@refill is obsolete" (as of Texinfo 6.8 - 2021-07-03). It is no longer needed, as least since Texinfo 4.2: https://ftp.gnu.org/old-gnu/Manuals/texinfo-4.2/html_node/Refilling-Paragraphs.html 2021-10-19 Vincent Lefevre Added .mailmap file. 2021-10-17 Vincent Lefevre Added a TODO/FIXME to add Git information to "make check". Partial update of doc/README.dev due to the migration to Inria GitLab. Updated README due to the migration to Inria GitLab. 2021-09-27 Vincent Lefèvre [src/mparam_h.in] Updated comment about GCC. 2021-09-24 Vincent Lefèvre [INSTALL] Update about MinGW: the old mingw.org website no longer exists, and MinGW has actually been replaced by Mingw-w64, which is for both 32-bit and 64-bit Windows. [README] Updated URLs. 2021-09-20 Paul Zimmermann missing url added new preprint 2021-09-16 Vincent Lefèvre [doc/mpfr.texi] Updated the month. 2021-09-16 Vincent Lefèvre [doc/mpfr.texi] Corrected garbled mpfr_set* description. Thanks to Rob for noticing: https://sympa.inria.fr/sympa/arc/mpfr/2021-09/msg00003.html The cause is a sentence that was inserted at the wrong place in r8225 (2012-06-25). 2021-09-14 Vincent Lefèvre [src/inp_str.c] Added a FIXME on a deprecated use of ungetc. 2021-09-13 Vincent Lefèvre Autoconf / AX_PTHREAD related update and cleanup. * m4/ax_pthread.m4: update to AX_PTHREAD 31, fixing a change from AX_PTHREAD 29, which has eventually been regarded as a bug (workaround in r14481). * configure.ac: removed the now unneeded AC_CANONICAL_TARGET; updated the corresponding comment. 2021-09-09 Vincent Lefèvre [TODO] More about intrinsics (e.g. _addcarry_u64). [TODO] + use intrinsics when available (needs a configure test). 2021-09-07 Vincent Lefèvre [tests/tests.c] In a comment with a GMP_CHECK_RANDOMIZE value, mention the SVN revision and date, as this value may no longer be valid in the future (when tests are added or changed). [tests/tests.c] Fixed bad_cases when y is ±0 (rare case). 2021-08-23 Vincent Lefèvre [doc/README.dev] Updated/reduced note about MinGW and stdio. 2021-08-23 Vincent Lefèvre [INSTALL] Updated information about MinGW and the formatted output functions (printf, etc.). Thanks to Pali Rohár for the information about -std=c89. 2021-08-23 Vincent Lefèvre [tests/tget_set_d128.c] Removed a useless C99 comment, which makes the MPFR build fail with "i686-w64-mingw32-gcc -std=c89" (e.g. via ./configure --host=i686-w64-mingw32, and -std=c89 in CFLAGS). [tests/tsprintf.c] In locale_da_DK(), also try da_DK.utf8 (preferably): in Debian/unstable, da_DK no longer exists. 2021-08-20 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Corrected latest change (typography). [doc/mpfr.texi] Detail the mpfr_min and mpfr_max description. 2021-08-03 Vincent Lefèvre [tests/tget_flt.c] Avoid a warning about unused function equal_flt when HAVE_SUBNORM_FLT is not defined. [tests/tget_flt.c] Code style: replaced "… == 0" by "! …" on the Boolean _p functions. 2021-08-03 Vincent Lefèvre [tests/tget_flt.c] Removed bug_icx (duplicate test). What was tested was just mpfr_get_flt on a NaN mpfr_t. But this was already tested in main(). And one gets the same result and error with icx (without -fp-model=strict). Moreover, the old test was correctly protected by "#if !defined(MPFR_ERRDIVZERO)", needed because NaN is defined by 0.0 / 0.0. 2021-08-03 Vincent Lefèvre [tests/tget_flt.c] In bug_icx: replaced mpfr_set_flt, whose float argument was yielding an underflow (not portable), by mpfr_set_si_2exp (it is mpfr_get_flt that is tested, not mpfr_set_flt). [tests/tget_flt.c] Added FIXME for test added in r14552. [tests/tget_flt.c] Portability correction. 2021-08-03 Paul Zimmermann need -fp-model=strict for icx 2021-07-27 Vincent Lefèvre [TODO] Mention "[[noreturn]]". 2021-07-15 Vincent Lefèvre [src/ieee_floats.h] URL update (http → https). 2021-07-01 Vincent Lefèvre [tools/mpfrlint] Detect when the return value of fclose() or fflush() is compared with -1 instead of EOF. 2021-06-30 Vincent Lefèvre [tests/tprintf.c] Portability correction (EOF is not necessarily -1). 2021-06-21 Vincent Lefèvre Punctuation (missing comma after "however"). [doc/README.dev] No longer use /tmp in examples so that the reader is not encouraged to use it. Punctuation. 2021-06-08 Vincent Lefèvre [acinclude.m4] Fixed subnormal detection (issue found with icx). 2021-06-03 Vincent Lefèvre [tests/tget_d.c] Improved error messages. 2021-06-03 Vincent Lefèvre [tests/tget_d.c] Error message when check_inf_nan() fails for NaN. Note: With "icx -O2" (at least), 8 tests are now failing with Intel(R) oneAPI DPC++ Compiler 2021.2.0 (2021.2.0.20210317). But no failures when the compiler is invoked as "clang". 2021-06-02 Vincent Lefèvre [doc/mpfr.texi] Updated the month. 2021-06-02 Paul Zimmermann [doc/mpfr.texi] some figures about slowdown with C++ interface 2021-06-01 Paul Zimmermann [tests/data/j1] added more tests [tests/tests.c] fixed bug introduced in r13787, which invalidated data_check in some cases 2021-05-20 Vincent Lefèvre [doc/mpfr.texi] Completed mpfr_fmodquo and mpfr_remquo description. [src/rem1.c] Improved comments. 2021-05-17 Vincent Lefèvre [tests/tsprintf.c] Cosmetic revert of blank line removal in r14519. 2021-05-17 Vincent Lefèvre [src/vasprintf.c] Fixed buffer_cat: replaced incorrect assertion len > 0 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. 2021-05-17 Vincent Lefèvre [tests/tsprintf.c] Similarly to r14514, added tests of native integer 0 with precision field 0 (also yields a call to buffer_cat with len = 0). [tests/tsprintf.c] For various test functions, changed the return type from int to void (when the value is never used). 2021-05-16 Vincent Lefèvre [src/vasprintf.c] Updated comment about the output for the 'a'/'A' conversion specifier. [doc/mpfr.texi] Formatted output functions (mpfr_*printf): completed the specification concerning the precision (this was needed because the conversion specifier 'b' does not exist in C). 2021-05-12 Vincent Lefèvre [src/vasprintf.c] Added a comment about the output for the 'a'/'A' conversion specifier, which is completely unintuitive. FIXME? [doc/mpfr.texi] Punctuation. [tests/tsprintf.c] Added tests of specifier 'P' with precision field 0. 2021-05-11 Vincent Lefèvre [TODO] More about mpfr_fda / mpfr_fds. [TODO] + Fused divide-add and fused divide-subtract (mpfr_fda, mpfr_fds). 2021-05-03 Vincent Lefèvre [doc/mpfr.texi,src/mpfr.h] Detail about the mpfr_pown implementation. 2021-05-03 Paul Zimmermann [NEWS] added missing mpfr_pown (alias for mpfr_pow_sj) [manual] added mpfr_powm in NEWS (https://sympa.inria.fr/sympa/arc/mpfr/2021-05/msg00000.html) 2021-05-03 Vincent Lefèvre [doc/mpfr.texi] Updated the month (due to r14505). 2021-04-30 Vincent Lefèvre [src/sin.c] Added a TODO about range reduction. 2021-04-26 Vincent Lefèvre [tests/tstrtofr.c] Check more infinity strings. 2021-04-26 Vincent Lefèvre [doc] Update about "case insensitive" and issue with Turkish locales for "I" / "i". * mpfr.texi: added "with the rules of the C locale" in the mpfr_strtofr description. * README.dev: completed information about Turkish locales. 2021-04-24 Vincent Lefèvre [tests/tpowr.c] Added generic tests. [src/exceptions.c] Corrected latest comment. 2021-04-23 Vincent Lefèvre [src/exceptions.c] Replaced comment about logging (the issue was due to the mpfr_check_range macro). [src/exceptions.c] Completed comment about a logging issue. [src/exceptions.c] Added a comment about a logging issue. [src/mpfr-impl.h] Logging: output the flags at "IN" and "OUT". [tests/tsgn.c] Also test in a very reduced exponent range. [tests/tsgn.c] Also test the flags. 2021-04-23 Vincent Lefèvre [src/get_str.c] Fixed bug in mpfr_get_str_ndigits introduced in r14494. Note: the issue (an uninitialized variable) was detected by GCC 6.5.0; recent GCC versions miss the -Wmaybe-uninitialized warning. 2021-04-23 Vincent Lefèvre mpfr_get_str_ndigits: added an assertion / exploitable compiler hint. [src/get_str.c] Improved mpfr_get_str_ndigits code structure. 2021-04-23 Vincent Lefèvre In various functions, use mpfr_equal_p() instead of mpfr_cmp() == 0. 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). 2021-04-23 Vincent Lefèvre [src/get_str.c] Use mpfr_equal_p() instead of mpfr_cmp() == 0. [tests] Added tpowr to svn:ignore property. 2021-04-23 Vincent Lefèvre Fixed bug in mpfr_get_str_ndigits. * 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 2021-04-16 Vincent Lefèvre [src/mpfr-impl.h] Added cast to int for __LINE__ in formatted output. 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... 2021-04-02 Paul Zimmermann [tests/thypot.c] added one test 2021-03-19 Vincent Lefèvre Added m4/ax_pthread.m4 file, and related updates. Added m4/ax_pthread.m4 from https://github.com/autoconf-archive/autoconf-archive and updated: * acinclude.m4 (in particular, set CXX and CXXFLAGS) * doc/README.dev 2021-03-19 Vincent Lefèvre [configure.ac] Avoid an issue with ordering of macros we don't use explicitly, which appears with ax_pthread.m4 29, i.e. with https://github.com/autoconf-archive/autoconf-archive/commit/2567e0ce0f3a11b535c6b527386197fb49ff172b 2021-03-18 Vincent Lefèvre [acinclude.m4] Added a comment about AX_PTHREAD. 2021-03-18 Vincent Lefèvre Get rid of obsolescent AC_HEADER_TIME. Cleanup about sys/time.h usage. The AC_HEADER_TIME macro is obsolescent in autoconf 2.69 (2012), and autoconf 2.71 (2021) outputs a warning, which makes autogen.sh fail due to "--warnings=all,error", so let's avoid the warnings. This macro defines TIME_WITH_SYS_TIME, used only in tests/tests.c (but actually not needed). We actually have two cases: 1. HAVE_GETTIMEOFDAY is defined: we use gettimeofday(), which needs . 2. Otherwise: we use time(), which needs . Based on that, we can simplify the condition in tests/tests.c for the inclusion of time-related headers, and we no longer need to check the availability. If gettimeofday() is defined but is not available (which shouldn't occur), then the current gettimeofday() usage may be incorrect anyway. Changes: * acinclude.m4: - no longer use AC_HEADER_TIME; - no longer check the sys/time.h header. * tests/tests.c: simplify the inclusion of time-related headers. 2021-03-18 Vincent Lefèvre [tools/mpfrlint] Detect mpn_mul_n with identical 2nd and 3rd arguments, which can be replaced by the faster mpn_sqr. 2021-03-16 Vincent Lefèvre Replaced "intensional" by "intentional" in comments. Untabify and remove trailing spaces. 2021-03-16 Paul Zimmermann [src/rec_sqrt.c] replace a call to mpn_mul_n with identical arguments by a call to mpn_sqr + similar changes in other files (thanks Fredrik Johansson) [tests/trec_sqrt.c] added timing test 2021-03-09 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [src/mpfr.h] Comment: no need to write "user" with uppercase letters. 2021-03-08 Vincent Lefèvre [tests/{tset_si.c,tset_sj.c}] Fix when -DMPFR_USE_NO_MACRO is used. The mpfr_get_exp() function checks that the argument is a regular number, but the corresponding macro doesn't. The test code was calling mpfr_get_exp() on 0, thus failed with MPFR_USE_NO_MACRO defined. Here, the code was correct with the macro, because the value was not used for the particular case 0. This is fixed by testing 0 earlier (and doing a goto, but the code has fewer tests and should be simpler to understand). Moreover, mpfr_get_exp has been replaced by MPFR_GET_EXP, so that the argument is checked with --enable-assert. 2021-03-08 Vincent Lefèvre [tests/{texceptions.c,tset_exp.c}] Forgot to protect the tests with casts to "void *", invalid in C++ (completing r14460 and r14461). 2021-03-08 Vincent Lefèvre Clarification about the custom interface and macros. * doc/mpfr.texi: added some text in Section "Custom Interface". * src/mpfr.h: replaced the remaining FIXME by another comment. 2021-03-08 Vincent Lefèvre [tests] Ignore GCC's -Wc++-compat in the tests that are invalid in C++ (these tests are enabled only if __cplusplus is not defined). 2021-03-06 Vincent Lefèvre [tests] In C++, do not cast to "void *" in the tests of macros. These casts make the build of these tests fail with a C++ compiler. But this means that the use of macros will not introduce any issue concerning the type of the arguments, i.e. with a C++ compiler, the tests are still complete after this change. However, GCC's -Werror=c++-compat still cannot be used. To avoid this issue, diagnostic pragmas will be needed. 2021-03-06 Vincent Lefèvre [src/mpfr.h] Fixed mpfr_set macro (now only available with __GNUC__). 2021-03-06 Vincent Lefèvre [tests/tset.c] Added tests of the mpfr_set macro. Without MPFR_USE_NO_MACRO, the compilation currently fails because the second argument is not converted to mpfr_srcptr when MPFR_SIGN is applied. 2021-03-06 Vincent Lefèvre [src/mpfr.h] Fixed mpfr_copysign and mpfr_signbit macros. 2021-03-06 Vincent Lefèvre Added tests of mpfr_copysign, mpfr_setsign and mpfr_signbit macros. Without MPFR_USE_NO_MACRO, the compilation of these tests in tcopysign.c currently fails because some arguments are not converted to mpfr_srcptr. 2021-03-06 Vincent Lefèvre [src/ubf.c] Forgot a cast from UBF pointer to mpfr_t pointer. This became visible with the fix of the mpfr_get_prec macro in r14454. 2021-03-06 Vincent Lefèvre [src/mpfr.h] Fixed mpfr_get_prec and mpfr_get_exp macros. 2021-03-06 Vincent Lefèvre Added tests of mpfr_get_prec and mpfr_get_exp macros. Without MPFR_USE_NO_MACRO, the compilation of these tests in texceptions.c and tset_exp.c currently fails because the argument is not converted to mpfr_srcptr. 2021-03-06 Vincent Lefèvre [src/mpfr.h] Better implementation of macros changed in r14451. __GNUC__ is no longer needed. 2021-03-06 Vincent Lefèvre [src/mpfr.h] Fixed some macros implementing functions. 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. 2021-03-06 Vincent Lefèvre [tests/tisnan.c] Added commented code for testing compilation errors. 2021-03-06 Paul Zimmermann [src/mpfr.h] fixed typo 2021-03-06 Vincent Lefèvre [tests/tisnan.c] Check that when mpfr_nan_p, mpfr_inf_p, mpfr_number_p, mpfr_zero_p and mpfr_regular_p is implemented as a macro, it behaves like a function. [src/mpfr.h] Added a comment and a FIXME for functions implemented as macros. 2021-03-06 Vincent Lefèvre Reverted r14445: This is about functions implemented as macros, and in this case, a macro must behave like a function. In particular, each argument must be evaluated one time exactly. Macros that behave differently will need to be fixed. Tests should also be added like the one in tests/tset_si.c with the comment: /* Note: the ++'s below allow one to check that the corresponding arguments are evaluated only once by the macros. */ 2021-03-06 Paul Zimmermann [doc/mpfr.texi] document that functions defined as macros might evaluate their arguments several times (see https://sympa.inria.fr/sympa/arc/mpfr/2021-03/msg00007.html) [src/mpfr.h] fixed typo 2021-03-04 Vincent Lefèvre [TODO] Clarification. [TODO] Updated item on pkg-config due to a bug in pkg-config. [TODO] Added "add some option to use pkg-config...". 2021-02-16 Paul Zimmermann [src/invsqrt_limb.h] use "unsigned short" for table T[] instead of mp_limb_t. 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 2021-02-15 Vincent Lefèvre [tests/mpfr-test.h] Added mpfr_cmp_si_2exp0 macro (check NaN). [tests/tj1.c] Replaced mpfr_cmp_si_2exp by mpfr_cmp_si_2exp0. [tests/tdigamma.c] Use mpfr_cmp_ui0 to detect NaN. [src/digamma.c] Use MPFR_NOTZERO instead of !MPFR_IS_ZERO. 2021-02-15 Paul Zimmermann [src/jyn_asympt.c] fixed bug when s=0 at the end of the for loop [tests/tj1.c] added corresponding non-regression test [src/digamma.c] fixed a bug in mpfr_digamma_reflection when the approximations of Digamma(1-x) and Pi*cot(Pi*x) cancel exactly [tests/tdigamma.c] added corresponding non-regression test renamed mpfr_compound to mpfr_compound_si, since in C2X, compoundn takes an intmax_t and not a long, thus we can later implement mpfr_compoundn taking as input an intmax_t 2021-02-10 Vincent Lefèvre [tests/texpm1.c] Improved special tests. 2021-02-09 Paul Zimmermann [src/pow_sj.c] removed spurious comment 2021-02-09 Vincent Lefèvre [src/{pow_sj.c,pow_uj.c}] Added missing "#ifdef _MPFR_H_HAVE_INTMAX_T". [doc/mpfr.texi] General cleanup, in particular related to the IEEE 754 standard. Added IEEE Standard 754-2019 to the references. [src/pow_{si,sj,ui,uj}.c] Fixed logging for mpfr_pow_{sj,uj}. [src/pow_uj.c] untabify [tests/tpow.c] Replaced mpfr_cmp_ui by versions that can detect NaN. Note: this is particularly important to check that pow(NaN,0) returns 1, not NaN. [src/pow_uj.c] Some corrections in the mpfr_mpz_set_uj helper function, still with limitations (which could be avoided by sharing code with mpfr_set_uj_2exp). 2021-02-09 Paul Zimmermann forgot to commit those files added mpfr_powr 2021-02-09 Vincent Lefèvre [src/{pow_si.c,pow_ui.c}] untabify 2021-02-09 Paul Zimmermann added mpfr_pow_uj and mpfr_pow_sj now mpfr_pown is an alias for mpfr_pow_sj 2021-02-09 Vincent Lefèvre [doc/mpfr.texi,src/mpfr.h] Added a FIXME for mpfr_pown, which should be an alias of mpfr_pow_sj (not implemented yet) to follow ISO C2x, where pown is defined with intmax_t n. 2021-02-09 Paul Zimmermann added mpfr_pown (alias for mpfr_pow_si) 2021-02-08 Vincent Lefèvre [src/mpfr.h] Updated comments on the types for mpfr_prec_t/mpfr_exp_t. * For mpfr_prec_t, removed the comment saying that under Windows 64, "long long" could be used (this would imply that mpfr_prec_t and mpfr_exp_t will not fit in a long, and this is not supported yet, see below). * For mpfr_exp_t and _MPFR_EXP_FORMAT == 4, changed an unclear note and added other information; in particular, this value is currently not supported since the MPFR code assumes that mpfr_exp_t fits in a long. 2021-02-08 Vincent Lefèvre [tests] Added texp2m1 and texp10m1 to svn:ignore property. [src/jyn_asympt.c] Use mpfr_set4 instead of mpfr_set or mpfr_neg. [tests/tj0.c] Latest test: also check the flags. [src/digamma.c] Added a comment about the bug fixed in r14399. [tests/tdigamma.c] Latest test: also check the flags. [tests/tdigamma.c] Moved the r14399 test to its own test function. Note: for this one, there is no need to use the maximum exponent range. [src/digamma.c] Use MPFR_NOTZERO instead of !MPFR_IS_ZERO. 2021-02-08 Paul Zimmermann [src/jyn_asympt.c] fixed bug when sin(z)+cos(z) or sin(z)-cos(z) round to 0 [tests/tj0.c] added corresponding non-regression test [src/digamma.c] fixed bug in mpfr_digamma_positive when t-u is zero [tests/tdigamma.c] added corresponding non-regression test 2021-02-08 Vincent Lefèvre [src/digamma.c] Fix: increased GUARD from 20 to 30. [tests/tdigamma.c] Added 2 precisions for which GUARD=20 is not sufficient, yielding a "too much memory" error. 2021-02-07 Vincent Lefèvre [src/digamma.c] Punctuation in a comment. 2021-02-07 Paul Zimmermann [src/digamma.c] fixed bug20210206 2021-02-06 Vincent Lefèvre [src/digamma.c] Added a FIXME for mpfr_digamma_positive: q can be too large, e.g. equal to the maximum exponent! [src/digamma.c] In mpfr_digamma_positive, log the value of q. [src/digamma.c] In mpfr_digamma_positive, do not compute the precision q until we are certain that it will be used. [src/digamma.c] In mpfr_digamma_positive, added an assertion, as a precision is set from the exponent of x, and I suppose that it may be larger than MPFR_PREC_MAX when mpfr_exp_t > mpfr_prec_t. [tests/tdigamma.c] Added testcase for a bug found by test_generic. [tests/tgeneric.c] Added debug info. 2021-02-05 Vincent Lefèvre [src/exp2m1.c] Use block-level flags. 2021-02-05 Paul Zimmermann added new function mpfr_exp10m1 [tests/texp2m1.c] added a test for exact values 2021-02-05 Vincent Lefèvre [TODO] Added mpfr_mul_uj and mpfr_mul_sj. [src/log.c] Optimization: avoid a temporary variable for a*2^m; use an alias to a instead. In corner cases, this could yield a new internal TMD for the mpfr_div when the precision of a is very large, but this is avoided by changing the RNDN to RNDF. The error bound of 2 ulp on the mpfr_div should still be valid (it should now actually be 1 ulp). 2021-02-05 Paul Zimmermann added new function mpfr_exp2m1 for 2^x-1 2021-02-05 Vincent Lefèvre [tests/tversion.c] Fixed length modifier in error messages. [src/log10p1.c] In mpfr_log10p1_small: an "else" case is better than a "goto"; do not initialize inex to an arbitrary value. [src/compound.c] Exact cases: additional detail in the comment. [src/compound.c] Exact cases: this is simpler without a separate function (the t = 0 was artificial). Added full explanations. 2021-02-05 Paul Zimmermann [src/compound.c] removed FIXME corresponding to previous commit [src/compound.c] fixed infinite loop for exact results like compound(0.5,2) which are not powers of 2 2021-02-05 Vincent Lefèvre [src/compound.c] Fixed 2 issues with mpfr_compound_near_one: * this function must be called in the extended exponent range, to be sure that 1 is representable; * it wasn't setting the inexact flag, and this is now done via mpfr_check_range. [src/compound.c] Added missing MPFR_ZIV_FREE before the "return" in the Ziv loop. [tests/tcompound.c] Added generic tests with n = 2 and n = 3. They trigger a failure: bad inexact flag for mpfr_compound2. [src/compound.c] Added a FIXME: possible infinite loop when the result is exact. [src/compound.c] Optimize the easy case n = 1. [src/compound.c] Special cases: fixed compound(-Inf,0) and improved comments. [tests/tcompound.c] More tests of compound(x,n) for x < -1, showing a failure on compound(-Inf,0). [doc/README.dev] Note that the logging feature (--enable-logging) needs GCC to build MPFR, and it is not available with mini-gmp, since mpfr_fprintf cannot be defined with mini-gmp. 2021-02-04 Vincent Lefèvre [tests/tcompound.c] Fixed a test in the case mpfr_exp_t < long. [tests/tcompound.c] Corrected an error message. [src/compound.c] Fixed bug found by clang: compound.c:32:29: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand] if (rnd_mode == MPFR_RNDN || MPFR_RNDF ^ ~~~~~~~~~ [tests/tatan2u.c] Fixed a bug (as of C99, for *decimal* constants, one must use a suffix that contains "U" if the constant cannot be signed). [tests/tcompound.c] Corrected the conditions of a test for machines with 32-bit long. Added comments. [tests] Added tlog10p1 to svn:ignore property. [tests/tatan2u.c] Improved comment in bug20210203 about type sizes. [tests/tatan2u.c] Make sure that the bug20210203 test is run only when the value for u is representable. 2021-02-04 Paul Zimmermann [TODO] added section number [src/compound.c] fixed case n < 0 and underflow [tests/tcompound.c] added corresponding non-regression tests compound(NaN,0) is 1 2021-02-04 Vincent Lefèvre [src/compound.c] Correction for n = LONG_MIN. Added FIXMEs. 2021-02-04 Paul Zimmermann [tests/tcompound.c] fixed comment 2021-02-03 Paul Zimmermann [src/atan2u.c] fixed error analysis 2021-02-03 Vincent Lefèvre [src/compound.c] Portability. [tests/tatan2u.c] Make sure that 64-bit constants are supported before using one. [src/log10p1.c] Improved checking / debugging support. 2021-02-03 Paul Zimmermann [tests/tatan2u.c] added a test which currently fails [src/log2p1.c] added note about underflow added a new function mpfr_log10p1 to compute log10(1+x) [tests/tlog2p1.c] set the precision locally to one test [doc/mpfr.texi] document atan2u and atan2pi 2021-02-03 Vincent Lefèvre [doc/mpfr.texi] Typography. [doc/mpfr.texi] In Section "Added Functions", do not put the patchlevel in MPFR versions (changed "4.2.0" to "4.2"). [src/log2p1.c] Bug fix: memory accessed after it is cleared. [src/log2p1.c] More logging. 2021-02-03 Paul Zimmermann [doc/mpfr.texi] document mpfr_compound 2021-02-03 Vincent Lefèvre [src/set_prec.c] Log the precision. 2021-02-03 Paul Zimmermann [src/compound.c] completed the general case [tests/tcompound.c] added one hard-coded test 2021-02-03 Vincent Lefèvre [tests] Added tcompound and tlog2p1 to svn:ignore property. [tests/tlog2p1.c] Use mpfr_cmp_si0 to detect NaN. [tests/tcompound.c] Do not use mpfr_printf in the tests. 2021-02-03 Paul Zimmermann [src/log2p1.c] use ULSIZE as in atan2u.c [src/atan2u.c] better explain the choice of prec in mpfr_atan2u_aux3 2021-02-03 Vincent Lefèvre [src/compound.c] Fixed logging. 2021-02-03 Paul Zimmermann [src/atan2u.c] simplified code 2021-02-03 Vincent Lefèvre [src/atan2u.c] Support unsigned long != 64-bit type. Avoid a warning. 2021-02-03 Paul Zimmermann [tests/tlog2p1.c] added tests for exact cases added log2p1 and compound (mpfr_compound is not finished yet) [src/log1p.c] fixed comment [src/atan2u.c] deal with underflow and overflow in y/x 2021-02-03 Vincent Lefèvre [src/atan2u.c] Added a FIXME: the code is incorrect if y/x yields an overflow or an underflow. [src/atan2u.c] Fixed 2 bugs in mpfr_atan2u_aux2. Minor changes. [src/atan2u.c] Minor corrections in comments. 2021-02-02 Vincent Lefèvre [tests] Added tatan2u and tatanu to svn:ignore property. [tests/tatan2u.c] Do not use mpfr_printf in the tests. [src/atan2u.c] Use MPFR_RET_NEVER_GO_HERE. [tests] * tgeneric.c: cleanup about the type of the arguments; added support for functions with 3 arguments (x1,x2,u), such as mpfr_atan2u. * tatan2u.c: enabled the generic tests (test_generic). 2021-02-02 Paul Zimmermann [src/atan2u.c] fixed atan2u with respect to the four quadrants [tests/tatan2u.c] added corresponding non-regression tests added mpfr_atan2u (work in progress) [src/atanu.c] fixed bug for u=0 [tests/tatanu.c] added non-regression test case 2021-02-02 Vincent Lefèvre Changed "plus/minus infinity" to "positive/negative infinity". [tools/mpfrlint] In the "+/- infinity" test (just added), also check the doc/algorithms.tex file. [tools/mpfrlint] Added a test for the use of "plus/minus infinity" instead of "positive/negative infinity". [doc/mpfr.texi] Minor corrections related to infinity. The IEEE 754-2019 standard says "positive/negative infinity", not "plus/minus infinity". 2021-02-01 Vincent Lefèvre [doc/mpfr.texi] Typos. [{src,tests}/Makefile.am] Untabified values of variables to avoid wrapping in diffs on 80 columns. 2021-02-01 Paul Zimmermann [TODO] asinpi, acospi and atanpi are done (and their *u variants) [src/atanu.c] added comment [src/acosu.c] simplified the code when x is tiny added mpfr_atanu and mpfr_atanpi 2021-02-01 Vincent Lefèvre [doc/mpfr.texi] Correction about mpfr_get_* and NaN. 2021-02-01 Paul Zimmermann [src/asinu.c] improved a comment [src/asinu.c] fixed typo [src/asinu.c] resolved FIXME [tests/tasinu.c] added more underflow tests 2021-02-01 Vincent Lefèvre [src/set_ld.c] Replaced a useless goto. Code readability. 2021-02-01 Paul Zimmermann [src/set_ld.c] added comment about LONGDOUBLE_NAN_ACTION 2021-02-01 Vincent Lefèvre [doc/mpfr.texi] Typography. [doc/mpfr.texi] Updated the month. 2021-02-01 Paul Zimmermann [src/get_ld.c] forgot get_ld in previous commit make it clear that we don't propagate the sign bit in mpfr_get_d and mpfr_set_d and similar functions for binary32, decimal64 and binary128 added asinu and asinpi [src/asinu.c] return NaN for u=0 and |x| > 1 [tests/tasinu.c] added more tests [src/acosu.c] for u=0 and |x| > 1, return NaN [tests/tacosu.c] added corresponding test 2021-01-31 Vincent Lefèvre [tests] Use RND_LOOP. Changes with: perl -pi -e 's/^( *)for *\((\w+) *= *0 *; *\2 *< *MPFR_RND_MAX *; *\2 *\+\+\) *$/\1RND_LOOP (\2)/' *.c [tests] Added tacosu and tasinu to svn:ignore property. [tests/mpfr-test.h] Added mpfr_cmp_si0 macro (check NaN). [tests/tasinu.c] Replaced mpfr_cmp_ui / mpfr_cmp_si by the ...0 version. [tests/tasinu.c] Replaced mpfr_cmp by !mpfr_equal_p. [tests/tacosu.c] Replaced mpfr_cmp by !mpfr_equal_p. [tests/tacosu.c] Fixed failing test with --with-mini-gmp and -DMINI_GMP_LIMB_TYPE=int under Linux/x86_64. [tools/mpfrlint] Detect the use of mpfr_set_emin / mpfr_set_emax when set_emin / set_emax could be used (checking failures). [tests/tdiv.c] Use set_emax rather than mpfr_set_emax with a test. [tests/*.c] When not in a test, use set_emin and set_emax rather than mpfr_set_emin and mpfr_set_emax, in order to check failures. Done with: perl -pi -e 's/^ *\Kmpfr_(set_e(min|max) *\()/\1/' *.c [tests/tests.c] Improved error message in set_emin / set_emax to better support platforms where mpfr_exp_t > long int. [tests/tcot.c] Use set_emin and set_emax rather than mpfr_set_emin and mpfr_set_emax with a test (test done in set_emin / set_emax). [src/{acosu.c,asinu.c,cosu.c,sinu.c,tanu.c}] Typos in comments. [tests/tasinu.c] Use set_emin rather than mpfr_set_emin. 2021-01-31 Paul Zimmermann [src/acosu.c] fixed case x=-1/2 which was wrong [tests/tacosu.c] added test cases 2021-01-30 Paul Zimmermann [tests/tacosu.c] reduced number of generic tests [tests/tasinu.c] likewise [src/asinu.c] fixed case x=-1 and underflow case [tests/tasinu.c] added test for underflow 2021-01-29 Paul Zimmermann added asinu (work in progress, not yet usable) [doc/mpfr.texi] improve description of mpfr_acosu [src/acosu.c] fixed another typo [src/acosu.c] fixed typo 2021-01-29 Vincent Lefèvre [src/acosu.c] Simplified code. [tests/tgeneric.c] Added a cast for printf. [tests/tgeneric.c] Corrected indentation. [tests/tgeneric.c] Corrected indentation. 2021-01-29 Paul Zimmermann added cosu and cospi in the manual and NEWS new function mpfr_acosu (still to be added in NEWS and mpfr.texi) 2021-01-29 Vincent Lefèvre [src/{cosu.c,sinu.c,tanu.c}] Function logging: added missing u. [TODO] LIA-2 URL after redirection (i.e. https). 2021-01-29 Paul Zimmermann [TODO] added pointer to LIA-2 2021-01-26 Vincent Lefèvre [INSTALL,doc/update-faq,tools/announce-text] With wget, use the --no-config option as the user's .wgetrc file may significantly change the behavior and possibly yield errors. See discussion at . 2021-01-20 Paul Zimmermann [TODO] update about powr, rootn and rsqrt [TODO] update about reserved cr_xxx names from C standard 2021-01-14 Vincent Lefèvre [src/{cosu.c,sinu.c,tanu.c}] Range reduction: improved a test, renamed a variable (e to p, as this is more like a precision), and updated comments, making the code and comments similar for these 3 functions. Added function logging for mpfr_fmod_ui and mpfr_sqrt_ui. 2021-01-14 Vincent Lefèvre [tests/memory.c] Call "fflush (NULL)" before abort() in order to flush all the output streams, in particular the log file (when there is one), so that setting MPFR_LOG_FLUSH (which may be inefficient) is not needed to debug tests that end with a memory error. This fixes a regression with glibc 2.27+: the streams are no longer flushed by abort(), as permitted by POSIX; see the abort(3) man page. 2021-01-14 Vincent Lefèvre [src] Fixed typo in mpfr_printf format from MPFR_LOG_FUNC for several functions. [doc/mpfr.texi] Completed mpfr_fmod_ui description. [src/cosu.c] Fixed bug when the reduced argument is 0. [tests/tcosu.c] Added tests that give a reduced argument equal to 0. [src/cosu.c] Fixed memory leak with very small reduced arguments. 2021-01-14 Paul Zimmermann [tests/tcosu.c] increase nmax in test_generic call [tests/tsinu.c] likewise [tests/ttanu.c] likewise 2021-01-13 Vincent Lefèvre [tests/{tcosu.c,tsinu.c,ttanu.c}] For the generic tests, no need to reduce emax any longer, now that the fast range reduction has been implemented. [src/tanu.c] Implemented range reduction for mpfr_tanu. [src/{cosu.c,sinu.c}] Corrected the position of a comment. [src/cosu.c] Implemented range reduction for mpfr_cosu. 2021-01-13 Paul Zimmermann [src/sinu.c] removed FIXME (done) 2021-01-13 Vincent Lefèvre [NEWS,doc/mpfr.texi] For the new trigonometric functions mpfr_cosu, mpfr_sinu, mpfr_tanu, mpfr_cospi, mpfr_sinpi, mpfr_tanpi, removed the "experimental" mention. In mpfr.texi, also added missing functions to Section "Added Functions" (API Compatibility). [doc/mpfr.texi] Style consistency: more "[unsigned] long int" instead of just "[unsigned] long". [doc/mpfr.texi] Style: use always "[unsigned] long int" in prototypes rather than sometimes just "[unsigned] long". [NEWS,doc/mpfr.texi] New function mpfr_fmod_ui. 2021-01-13 Vincent Lefèvre Implemented range reduction for mpfr_sinu (and defined mpfr_fmod_ui). This is done by computing x mod u; and a new function mpfr_fmod_ui has been defined for this purpose. As mpfr_fmod_ui could be useful to the user, its declaration is put in src/mpfr.h, with the intent to document this new function later. In the src directory: * Added fmod_ui.c file (mpfr_fmod_ui function) based on sqrt_ui.c (hence the same copyright line). * Makefile.am: added fmod_ui.c to libmpfr_la_SOURCES. * mpfr.h: added mpfr_fmod_ui. * sinu.c: implemented range reduction for mpfr_sinu. 2021-01-13 Vincent Lefèvre [tests/tsinu.c] Added tests where x/u is a "big" integer, so that the reduced argument is 0 (exactly). [tests/tsinu.c] Added a test on a large input such that x mod u may need more precision than x. This will be important to test range reduction. [src/sqrt_ui.c] Coding style. [src/{cosu.c,sinu.c,tanu.c}] Changed MPFR_PREC to MPFR_GET_PREC. 2021-01-12 Vincent Lefèvre [tests/{tcosu.c,tsinu.c,ttanu.c}] C90 compatibility for the tests with large inputs (added in r14236). Also avoid the hardcoded size by using the numberof() macro. 2021-01-12 Paul Zimmermann [tests/tcosu.c] added hard-coded tests with large inputs [tests/tsinu.c] likewise [tests/ttanu.c] likewise 2021-01-05 Paul Zimmermann [src/set_ld.c] added pointer to "double double" format 2021-01-04 Vincent Lefèvre [doc] Updated FAQ.html with update-faq. 2021-01-03 Vincent Lefèvre [doc/mpfr.texi] Updated the month. Copyright notice update: added 2021 with perl -pi -e 's/ (\d{4}-)?(2020)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2020 from the example in the doc/README.dev file. [src/mpfr-impl.h] Removed a now useless test on __clang__, corresponding to a bug fixed in Clang 3.4 (see ). 2020-12-20 Vincent Lefèvre Optimize mpfr_abs, mpfr_copysign and mpfr_setsign in the case of reused argument, like what was already done for mpfr_neg: one can just set the sign and handle NaN instead of calling mpfr_set4. Completed tests/tcopysign.c to test with a reused argument. [src/cosu.c] Avoid a possible integer overflow (triggered by the tests with UBsan) from r14225. 2020-12-18 Paul Zimmermann fixed initial precision in sinu, cosu and tanu also in cosu, treat special case when 2*pi*x/u is small 2020-12-17 Vincent Lefèvre [tests/tgeneric.c] Removed the use of __func__ as it is not supported by ISO C90 (it was not really useful here, though). [tests/tcosu.c] Increased the maximum precision for test_generic and added a comment about this. [tests] Added tcosu, tsinu and ttanu to svn:ignore property. For the generic tests, output the number of normal cases and the total if the MPFR_TGENERIC_STAT environment variable is defined. Added description to the README.dev file. [tests/tcosu.c] Increased the number of generic tests. This should make the warning "Too few normal cases in generic tests" much less common. [tests] * Added data/tan2pi: hardest-to-round cases of tanu with u = 1 in double precision, interval [0,1/4]. * ttanu.c: test tan2pi values with u = 1. [tests/ttanu.c] C89 compatibility. 2020-12-16 Vincent Lefèvre [doc/mpfr.texi] Removed spurious blank line; .texi source reformat. [doc/mpfr.texi] Typography: "resp." must be followed by "@:". [doc/check-typography] Also check "resp.". [doc/mpfr.texi] Removed misplaced @tie{}. 2020-12-16 Paul Zimmermann [doc/mpfr.texi] fixed another typo [doc/mpfr.texi] fixed typos added sinpi, cospi, tanpi added new function mpfr_tanu [src/sinu.c] improved comment 2020-12-15 Paul Zimmermann [src/sinu.c] added reference [src/sinu.c] fixed compiler warning [src/cosu.c] deal with other exact cases [tests/tcosu.c] added tests for other exact cases [src/sinu.c] fixed bug in detection of pi/6 and friends 2020-12-15 Vincent Lefèvre [NEWS] mpfr_cosu and mpfr_sinu: improved item. 2020-12-15 Paul Zimmermann [tests/tsinu.c] added more tests [src/sinu.c] fixed case where 2xpi/u is +/-pi/6 mod pi [tests/tsinu.c] added corresponding test case 2020-12-15 Vincent Lefèvre [tests] * Added data/{cos2pi,sin2pi}: hardest-to-round cases of cosu and sinu with u = 1 in double precision, interval [0,1/2]. * tcosu.c, tsinu.c: test cos2pi and sin2pi values with u = 1. [tests/tests.c] test5rm(): mention test5rm in the error message. [src/{cosu.c,sinu.c}] Added function logging. 2020-12-15 Paul Zimmermann added new function mpfr_cosu [src/sinu.c] fixed typo in comment [tests/tsinu.c] fixed typos in comments 2020-12-15 Vincent Lefèvre [src/sin_cos.c] Code improvement: * replaced a MPFR_PREC(c) by m since the precision of c was set to m; * as a consequence, the initial precision of xr in the Ziv loop will always be m (whether expx >= 2 or not), so that one can use this precision for the mpfr_init2. 2020-12-15 Paul Zimmermann [src/sinu.c] forgot to count the rounding error in mpfr_sin (t, t, MPFR_RNDA) [src/sinu.c] fixed issue with case t=0 2020-12-15 Vincent Lefèvre [src/{sin.c,sin_cos.c}] * Do not initialize variables with the default precision, which could have been set to a large value by the user; this would be a waste of memory. * In sin.c, do not initialize xr in the case where this variable will not be used (in sin_cos.c, let's initialize it with the minimum precision as it is used with different purposes). [src/{ai.c,yn.c}] Do not initialize variables with the default precision, which could have been set to a large value by the user; this would be a waste of memory. [tools/mpfrlint] Added a test to detect when mpfr_init or mpfr_inits is used, i.e. when a variable is initialized with the default precision. This should not be done as the default precision could have been set to a large value by the user, so that this is a waste of memory. [src/sinu.c] Correction: variables must not be initialized with the default precision, which could have been set to a large value by the user, and this would be a waste of memory. 2020-12-14 Vincent Lefèvre [src/sinu.c] Fixed 2 bugs: * in case of underflow, the flags were not set; * mpfr_odd_p(t) could be called with t = 0, which is unsupported. 2020-12-14 Paul Zimmermann [src/sinu.c] fixed typo (thanks Jeffrey Sarnoff) 2020-12-14 Vincent Lefèvre [src/sinu.c] Added a FIXME: the range reduction should be done in this function (that's the whole point of sinu compared to sin, besides a smaller rounding error). [tests/tsinu.c] Added a FIXME concerning the size of the exponent. [doc/mpfr.texi] Typographic correction of math formulas. [doc/mpfr.texi] mpfr_sinu: corrections and improvements. [doc/mpfr.texi] Updated the month. 2020-12-14 Paul Zimmermann [NEWS] added mpfr_sinu [doc/mpfr.texi] improve documentation of mpfr_sinu, and say it is experimental added mpfr_sinu (work in progress) 2020-12-13 Vincent Lefèvre [src/zeta.c] Minor correction of a comment. 2020-12-02 Vincent Lefèvre [src/mpfr.h] Added a comment about Intel's compiler ICC and the unsupported returns_nonnull attribute. 2020-11-15 Vincent Lefèvre [TODO] Added an item to add "const" in prototypes in the manual. [doc/mpfr.texi] mpfr_subnormalize: define EXP(x) and PREC(x). [doc/mpfr.texi] More detailed beginning of "Nomenclature and Types", which now specifies the convention for the significand and the exponent. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Document the mpfr_srcptr type. 2020-10-28 Vincent Lefèvre [tests/talloc-cache.c] Check that malloc() doesn't return a null pointer (in order to avoid an error with GCC's -fanalyzer, dev version). 2020-10-23 Vincent Lefèvre [src/invert_limb.h] Added a comment about r14171. [src/invert_limb.h] Fixed potential issues introduced in 14170. * The code isn't valid with 16-bit int (allowed by ISO C). So, make sure with MPFR_STAT_STATIC_ASSERT that unsigned int is large enough for invert_limb_table2. Note: since the code is under "#if GMP_NUMB_BITS == 64", this is unlikely to affect any system in practice, as GMP_NUMB_BITS == 32 (or 16, if supported) should be better on such a system. * Make sure that the "<< 11" shifts do not overflow. 2020-10-23 Paul Zimmermann [src/invert_limb.h] patch from Alexei Sibidanov, which reduces memory usage, without degrading performance 2020-10-23 Vincent Lefèvre [doc/README.dev] Replaced WG14 N2405 reference by the new N2579. 2020-10-21 Vincent Lefèvre [src/mpfr-impl.h] Updated UBF comment about aliasing rules. [src/mpfr-impl.h] Updated UBF comment about aliasing rules. [src/mpfr-impl.h] Updated UBF comment about aliasing rules. 2020-10-19 Vincent Lefèvre [doc/mpfr.texi] Updated mpfr_rootn_ui description about "agree with the rootn function", now that IEEE 754-2019 is there (needed as rootn was underspecified in IEEE 754-2008, so that TS 18661-4 incorrectly specified the case rootn(-inf, n even); see WG14 N2309 from the C FP group for the correction). 2020-10-09 Paul Zimmermann fixed typo 2020-10-08 Vincent Lefèvre [doc/README.dev] Added a note about _Float128 vs long double. [src/mpfr-impl.h] Added a TODO for the numberof() macro: make it a constant expression and possibly change its type "long" to "ptrdiff_t". [doc/mpfr.texi] Minor changes in Section "Formatted Output Functions". [NEWS] Update. [doc/mpfr.texi] Section "API Compatibility", formatted output functions (mpfr_printf, etc.): completed r14155. [doc/mpfr.texi] Updated the month. [src/vasprintf.c] Improved comment for READ_INT. 2020-10-07 Vincent Lefèvre Fixed the formatted output functions (mpfr_printf, etc.) in the case the precision consists only of a period. * doc/mpfr.texi: correction and clarifications (be closer to ISO C); note the change in Section "API Compatibility". * src/vasprintf.c: fixed the bug. * tests/tsprintf.c: update. 2020-10-07 Vincent Lefèvre [src] Consistency: in prototypes, changed mpz_t to mpz_ptr (mpfr-impl.h, pool.c); mpfr_random_deviate_t to mpfr_random_deviate_ptr (random_deviate.c). Note: This completes the changes I had done in r14103 (2020-08-21) for mpfr_t. This time, the issue was detected by a GCC 11 snapshot, thanks to the -Warray-parameter option (included in -Wall), which was added on 2020-09-19 in GCC commit 6450f07388f9fe575a489c9309c36012b17b88b0. 2020-10-07 Vincent Lefèvre [src/vasprintf.c] Updated a comment. Added tests/gen-printf-dot-prec Perl script to generate a .c file showing printf and mpfr_printf output with: * a missing precision field; * a precision field with just a period ("."); * a precision field with an explicit precision 0 (".0"). 2020-09-27 Vincent Lefèvre [tests/tset_z_2exp.c] Fixed typo detected by GCC. [src/set_z_2exp.c] Fixed overflow/underflow detection in exponent ranges where emax < 0 or emin >= 0 (bug introduced in r14145). [tests/tset_z_2exp.c] Added some tests in a reduced exponent range (and improved existing tests). Note: Due to an incorrect change in set_z_2exp.c r14145, various tests are failing with mini-gmp (for which mpfr_set_z_2exp is used more often because a long does not fit into a limb) in unusual exponent ranges. So such tests were obviously missing in tset_z_2exp.c before this commit. 2020-09-25 Vincent Lefèvre [src/set_z_2exp.c] Fix: avoid possible integer overflows. [tests/tset_z_2exp.c] Test a result. [doc/README.dev] Added how to convert an unsigned integer to the corresponding signed integer with the two's complement rule (i.e. modular arithmetic) but in a portable way. [tests] Updated svn:ignore property due to the rename in r14125. 2020-09-24 Vincent Lefèvre [tests/tset_z_2exp.c] Added another test that fails with just "-m32 -fsanitize=undefined -fno-sanitize-recover". This corresponds to what is described in the FIXME in src/set_z_2exp.c (about the modified tnrandom.c test yielding an integer overflow). [tests/tset_z_2exp.c] Added a test that triggers an integer overflow in set_z_2exp.c with MPFR_CHECK_LARGEMEM=1 when MPFR is compiled with "-m32 -fsanitize=undefined -fno-sanitize-recover -D_MPFR_EXP_FORMAT=4" in CFLAGS: set_z_2exp.c:71:26: runtime error: signed integer overflow: 134217726 * 32 cannot be represented in type 'long int' 2020-09-23 Vincent Lefèvre [src/exp2.c] Added support for -D_MPFR_EXP_FORMAT=4 in the 32-bit ABI, i.e. 32-bit long, so that the MPFR compilation no longer fails due to a static assertion in this file. Note: many tests fail (not texp2), but at least this allows some testing of various functions. 2020-09-23 Vincent Lefèvre [INSTALL] Update concerning MinGW and the __USE_MINGW_ANSI_STDIO macro. The change done in r13668 seems to be a bit wrong (at least unclear). This was done after finding https://fr.osdn.net/projects/mingw/lists/archive/users/2019-January/000199.html saying that __USE_MINGW_ANSI_STDIO became deprecated, during a discussion on the vsnprintf() behavior: https://gmplib.org/list-archives/gmp-bugs/2020-January/004716.html However, it seems that printf() conformity issues have completely been resolved only recently, in version 8. http://mingw-w64.org/doku.php says: Version 8 has been released v8.0.0: 2020-09-18 Notable changes: [...] * __USE_MINGW_ANSI_STDIO now automatically enabled in C99 and C11 mode when not using UCRT by Pali Rohár [...] Compiling #include int main (void) { volatile double d = -1.25; printf ("%e\n", d); } gives with mingw-w64 version 7: -1.250000e+000 and with mingw-w64 version 8: -1.250000e+00 So, when testing MPFR with mingw-w64 version 8 but with GMP still built with mingw-w64 version 7 (and static libraries), one gets a failure in tsprintf: Error in mpfr_vsprintf (s, "%e", ...); expected: "-1.250000e+00" got: "-1.250000e+000" because the expected result has changed (it comes from sprintf used in the MPFR test, which is now ISO-compliant). 2020-09-18 Vincent Lefèvre [src/set_z_2exp.c] Added a FIXME: possible integer overflow, which can be reproduced with a 32-bit ABI by defining MPFR_PREC_MAX as ((mpfr_prec_t) ((((mpfr_uprec_t) -1) >> 1) - 63)) and in tnrandom.c, using "test_special (MPFR_PREC_MAX);". 2020-09-16 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [doc/mini-gmp] Say that the build with mini-gmp may require ISO C99+ features (as "long long" is currently needed by src/get_ld.c in the case GMP_NUMB_BITS == 8). For consistency, changed "C89" to "C90" in comments of *.{c,h} files. [doc/mpfr.texi] Changed C89 to C90, as when mentioning ISO, one must say C90 (C89 is the ANSI version). The GCC manual uses "C90" rather than "C89", so this is probably better anyway. [src/get_ld.c] Bug fix with GMP_NUMB_BITS == 8 (thus mini-gmp) and 32-bit long (e.g. with -m32 on x86_64). 2020-09-15 Vincent Lefèvre Renamed some .c files for consistency: src/get_z_exp.c → src/get_z_2exp.c src/set_z_exp.c → src/set_z_2exp.c tests/tset_z_exp.c → tests/tset_z_2exp.c and updated src/Makefile.am and tests/Makefile.am files. [src/random_deviate.c] The latest change r14123 was actually incorrect: the real issue was non-portable code (with an incorrect comment) to convert an unsigned integer to a signed, negative integer. Incorrect behavior could occur with some C implementations and/or when mpfr_exp_t does not have the same size as long. So, fixed this portability issue, and avoid an assertion failure in a very rare case. [src/random_deviate.c] Corrected an assertion. → Test failures. [tests/tests.c] Added a note about tests done in "src/init2.c". [src/init2.c] Check that __MPFR_EXP_MAX == MPFR_EXP_MAX too. [tests/tget_z.c] Updated comment to mention that mpfr_get_z_2exp is tested by this file. [src/mpfr-mini-gmp.c] Fixed bug in gmp_urandomb_ui when the parameter n is equal to the width of unsigned long. Note: This case occurs in function random_deviate_generate() from src/random_deviate.c with a 32-bit ABI (thus 32-bit unsigned long) since n = W, which is defined as 32. 2020-09-14 Vincent Lefèvre [src/mpfr-mini-gmp.c] Simplified gmp_randseed_ui (note: the code in r14114 and r14115 was not the intended one due to the wrong variable in srand). [src/mpfr-mini-gmp.c] Corrected latest change for gmp_randseed_ui. With mini-gmp, use the standard rand() and srand() functions instead of the POSIX (thus less portable) lrand48() and srand48(). 2020-09-10 Vincent Lefèvre ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC0 svn log -rHEAD:0 -v". Note: this includes URL updates. Updated URLs. [src/sub1sp.c] Updated a URL (http → https). [doc/README.dev] Updated URLs. [configure.ac] Updated a URL (http → https). [configure.ac] Updated a URL concerning the "Intel® C++ Compiler 9.0 for Linux Release Notes" (the URL was not archived). Updated a freebsd.org URL (bug tracker). 2020-08-21 Vincent Lefèvre [src,tests] Consistency: in prototypes, changed const mpfr_t to mpfr_srcptr mpfr_t to mpfr_ptr (except for mpfr_t *), as this is equivalent (the array is converted to a pointer) and the mpfr_srcptr/mpfr_ptr form is the usual one. 2020-08-20 Vincent Lefèvre [doc/README.dev] Added a note about "string + integer" expressions. [tests/tsprintf.c] Replaced another occurrence of the code triggering the warning "adding 'int' to a string does not append to the string [-Wstring-plus-int]" with Clang (at least with 3.5 and above). 2020-08-20 Paul Zimmermann fixed a compiler warning found by Clang 10.0.1 on armv8-a (Samsung S8 aarch64-unknown-linux-android): tsprintf.c:1613:27: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] strcat (buf, ",0" + (j % 3 != 0)); ~~~~~^~~~~~~~~~~~~~ 2020-08-20 Paul Zimmermann fixed a compiler warning found by Clang 10.0.1 on armv8-a (Samsung S8 aarch64-unknown-linux-android): ./tgeneric.c:208:40: warning: implicit conversion from 'mp_limb_t' (aka 'unsigned long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-int-float-conversion] (double) randlimb () / MPFR_LIMB_MAX; ~ ^~~~~~~~~~~~~ ../src/mpfr-impl.h:1277:28: note: expanded from macro 'MPFR_LIMB_MAX' #define MPFR_LIMB_MAX ((mp_limb_t) -1) ^~~~~~~~~~~~~~ 2020-08-09 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] In the paragraph about cases that are hard to round, also mention potentially exact cases. 2020-07-20 Vincent Lefèvre [doc/README.dev] Added a paragraph on the issue with GCC and conversions between binary and decimal types. [src/get_d128.c] Updated FIXME comment (after r14087). [src/get_d128.c] Removed unused variable due to r14087. [src/get_d128.c] For the special values, avoid double to _Decimal128 conversions, as for such conversions, GCC generates from 2 to 3 MB in the shared library when the decimal encoding is BID, and there will be no fix in GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96173 We now use computations on _Decimal128 constants directly, which could thus be done at compile time. We expect no problems similar to double, as the _Decimal128 implementation should follow the IEEE 754 rules. This commit should avoid a large part of the problem reported at: https://gforge.inria.fr/tracker/?func=detail&atid=619&aid=21849&group_id=136 2020-07-15 Vincent Lefèvre [tests/tset_ld.c] Improved an error message. 2020-07-13 Vincent Lefèvre [tests/tests.c] Simplified the d_trace and ld_trace functions: we do not need a union (with its potentional padding) as there are no aliasing issues with unsigned char. [tests/tset_ld.c] Fixed mpfr_out_str usage in error messages (see the change in r12520). [tests/tget_ld_2exp.c] Corrected a function call in an error message. [examples/version.c] "Compiler:" line: detect TCC (__TINYC__ macro). (merged r14078 from tests/tversion.c) [tests/tversion.c] "Compiler:" line: detect TCC (__TINYC__ macro). 2020-07-12 Vincent Lefèvre [src/get_d128.c] Updated the FIXME. [src/get_d128.c] Added a FIXME to work around GCC bug 96173. 2020-07-10 Vincent Lefèvre [src/jyn_asympt.c] Added an assertion. [doc/README.dev] In the MPFR_CHECK_EXPENSIVE description, say that --enable-assert=full should not be used (too expensive, not needed). [tests/tjn.c] Added a related comment for the expensive bug20200703 test (which may take more than 1 hour with --enable-assert=full). [tests/tjn.c] Corrected indentation. 2020-07-03 Paul Zimmermann [tests/tjn.c] added another test [src/jyn_asympt.c] fixed previous commit [src/jyn_asympt.c] partly solved the slowness of jn(733333,733333) 2020-07-03 Vincent Lefèvre [src/jyn_asympt.c] Replaced some MPFR_EXP by MPFR_GET_EXP. [src/jyn_asympt.c] Added a log message. [tests/tjn.c] Added testcase for bug reported by Alex Coplan: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96044 mpfr_jn is very slow or doesn't terminate on (733333,733333). 2020-07-01 Vincent Lefèvre [NEWS] For MPFR 4.1.0, added an item saying that TLS can safely be (re-)enabled on Sparc. 2020-06-29 Vincent Lefèvre [tests/mpfr-test.h] Avoid a GCC bug on Sparc, at least when using TLS. The MPFR library itself is not affected, only a particular test. Normal code using the MPFR library should not be affected either, as the bug occurs when accessing __gmpfr_flags directly (and the public mpfr.h header file does not provide any macro that accesses an internal variable directly). So a workaround for the tests is the best solution. 2020-06-18 Vincent Lefèvre [NEWS] Update for the next release. [src/mpfr-longlong.h] Mention applied patch (in r14035). 2020-06-17 Vincent Lefèvre [src/mpfr-longlong.h] Applied patch on https://gmplib.org/list-archives/gmp-bugs/2020-June/004807.html to fix add_ssaaaa and sub_ddmmss on arm / aarch64 (after a reverse-merge of r14032 and r13997), in order to resolve https://sympa.inria.fr/sympa/arc/mpfr/2020-06/msg00017.html https://sympa.inria.fr/sympa/arc/mpfr/2020-06/msg00059.html [tests/tcmp_ui.c] Added a comment about a failing test with tcc if one adds tcc support for macros using __builtin_constant_p in mpfr.h by testing __TINYC__. Bug report against tcc: https://savannah.nongnu.org/bugs/?58606 2020-06-16 Paul Zimmermann [src/mpfr-longlong.h] disable buggy sub_ddmmss for aarch64 2020-06-15 Vincent Lefèvre [doc/mpfr.texi] Corrected and detailed the description of mpfr_get_str_ndigits. [src/get_str.c] Since the mpfr_get_str_ndigits function is in the public API, use MPFR_ASSERTN instead of MPFR_ASSERTD on the condition on the argument b in order to get an assertion failure (by default) if this condition is not satisfied. 2020-06-15 Paul Zimmermann [doc/mpfr.texi] specify the range of b for mpfr_get_str_ndigits 2020-06-14 Vincent Lefèvre [tests/tdigamma.c] Increase the number of tests. 2020-06-14 Paul Zimmermann [src/digamma.c] fixed bug found while testing mpfr-4.1.0-rc1 2020-06-14 Vincent Lefèvre [src/digamma.c] Added a FIXME. [src/digamma.c] Replaced mpfr_get_exp by MPFR_GET_EXP. [src/digamma.c] * Replaced some MPFR_EXP by MPFR_GET_EXP to check that the MPFR number has an exponent (i.e. it is not a special value). → Assertion failure in tdigamma (on x86_64). Note: this might be the cause of an unexpected loop (infinite loop?) on a Debian 10.4 POWER9 machine: https://sympa.inria.fr/sympa/arc/mpfr/2020-06/msg00025.html * Added an integer overflow check on a precision. 2020-06-13 Vincent Lefèvre [tests/tset_ld.c] In a test specific to x86 extended precision, in case of incorrect result, detect whether Valgrind is used and one gets the result obtained with Valgrind due to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890215 https://bugs.kde.org/show_bug.cgi?id=421262 (long double behaves as double); in this case, output a message without an error since Valgrind is the only cause of the miscalculation. [tests/tset_ld.c] bug_20160907 (tests on subnormals): * Replaced an assertion by a test with detailed output. * Corrected a value in a test, which did not match the comment. [tests] Skip tabort_defalloc1 and tabort_defalloc2 under Valgrind, as Valgrind complains due to the large allocation size. * mpfr-test.h, tests.c: added tests_run_within_valgrind() function to guess whether the test runs within Valgrind. * tabort_defalloc1.c, tabort_defalloc2.c: skip the test (exit code 77) if this function returns true. [configure.ac] Improvements concerning the default CFLAGS with GCC. * Add -Wc++-compat option to CFLAGS with GCC ≥ 4.1 not in C++ mode. Changes based on Bruno Haible's patch suggested at https://sympa.inria.fr/sympa/arc/mpfr/2020-06/msg00008.html (with some autoconf related fixes). * Output the $CFLAGS value that is eventually used. [configure.ac] No longer add -Wc++-compat to CFLAGS when the compiler is GCC not in C++ mode (reverting the change done in r13406) since this option is not available before GCC 4.1: https://sympa.inria.fr/sympa/arc/mpfr/2020-06/msg00008.html [doc/mpfr.texi] ACM TOMS article: use the preferred DOI URL. [tests/tfpif.c] Updated comment about the bug detected on AIX. [tools/announce-text] For release candidates, automatically adapt the flow of the text. [NEWS] Updated mpfr.org URLs (http → https). [tools/announce-text] Better line lengths for release candidates. 2020-06-12 Vincent Lefèvre [README] Added URL of the official GNU MPFR website and a note about the future migration, since InriaForge will shut down in December 2020. [tests/tests.c] Removed a useless "#include " (added in r5252, useless since r5253). [tests/tfpif.c] Fixed a bug (in the test) detected on AIX[*], where an fclose failed due to a previous read failure. At the same time, check that a read failure no longer occurs. Note: the read failure made mpfr_fpif_import fail, but this is a test where it is expected to fail, i.e. we now check that it fails for a good reason. [*] gcc119.fsffrance.org on the GCC Compile farm. [tools/update-version] Improved a message. [src/mpfr-longlong.h] Corrected a comment from GMP's longlong.h, which makes codespell complain in particular. [tools/mpfrlint] Improved the __GMP_DECLSPEC test: * No longer exclude "src/mpfr.h". * Avoid false positives in "src/mpfr.h" and "src/mpfr-longlong.h". [doc/mpfr.texi] Updated the month. Updated version to 4.2.0-dev. ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC0 svn log -rHEAD:0 -v". 2020-06-11 Vincent Lefèvre Renamed mpfr_total_order to mpfr_total_order_p for consistency with the other predicates (by convention, the function name should end with _p). [NEWS] New function mpfr_total_order. Detailed mpfr_get_str_ndigits. [doc/README.dev] Updated "To make a release". [doc/README.dev] Updated "To make a release". [src/Makefile.am] Updated -version-info to 7:0:1 for MPFR 4.1.0. [NEWS] Additional details, in particular binary compatibility. [NEWS] Some improvements. 2020-06-11 Paul Zimmermann [doc/mini-gmp] one more test is skipped now [doc/mini-gmp] add test results with reduced limb size (int) 2020-06-11 Vincent Lefèvre [doc/README.dev] Updated "To make a release". 2020-06-10 Vincent Lefèvre [NEWS] Added release name for 4.1.0: "épinards à la crème". [doc/mini-gmp] English usage improvement. Fixed 2 issues with tests/tvalist.c: 1. When building with mini-gmp (--with-mini-gmp=DIR) without optimizations (-O0), the build of tvalist was failing because the formatted output functions are not supported (this issue wasn't noticed with optimizations due to dead code elimination). Fix: this test is disabled with mini-gmp (not needed anyway). 2. Dead code elimination with optimizations partly broke the goal of this test, i.e. checking that mpfr_vfprintf was available. This dead code was introduced in r7648 "Make sure that fct is used (avoid a warning)." (where fct = mpfr_vfprintf) but was actually not sufficient. Fix: call mpfr_vfprintf unconditionally, but on an empty string in order to avoid output to stdout. In addition to these changes in tests/tvalist.c, src/mpfr-impl.h could be simplified as a consequence. Removed '# undef HAVE_STDARG' before '# include "config.h"' when it was used, as it was not always undefined (e.g. in tests/tsprintf.c) and there are no reasons to undefine this macro specifically. Note: this code was introduced in r2665 (2004-02-06), perhaps for the MPFR build inside GMP, which has been dropped a long time ago. [tests/tvalist.c] Updated a comment. [tests/tvalist.c] Correction when config.h is used (code copied from src/inits.c). 2020-06-10 Paul Zimmermann [doc/mini-gmp] review 2020-06-10 Vincent Lefèvre [NEWS] Typo in option name. [src/mpfr-longlong.h] * Updated comment about this file and the changes against GMP 6.2.0. * Define __GMP_GNUC_PREREQ if it isn't defined (this is currently not needed since it is defined in gmp.h as used also there, but this is useful in case some future gmp.h version no longer defines it). [src/mpfr-longlong.h] Update: applied the diff of GMP's longlong.h between GMP 6.1.0 and GMP 6.2.0, after reverting changesets 13251, 11042, 11025, and 10727, as these changes are present in the diff. [configure.ac] With mini-gmp, also check the availability of srand48. [src/mpfr-mini-gmp.c] For gmp_randseed_ui, which uses srand48, use a portable version of the conversion from unsigned long to long. [doc/mini-gmp] Note also that the random functions are not thread-safe. [doc/mini-gmp] Major update. [NEWS] Removed a FIXME (no problems found). 2020-06-09 Vincent Lefèvre [tests/tversion.c] Code style: replaced (mp_limb_t) -1 by MPFR_LIMB_MAX. [src/mul_ui.c] Bug fix: in the code where MPFR_LONG_WITHIN_LIMB is not defined, update the flags (needed for the possible overflow). [tests/tmul_ui.c] Added an overflow check that fails in MPFR_RNDZ with mini-gmp and mp_limb_t < long (e.g. "-DMINI_GMP_LIMB_TYPE=short"). [tests/tgeneric.c] In the MPFR_SUSPICIOUS_OVERFLOW case, output yprec. [src/mpfr-impl.h] Changed the code that defines MPFR_LONG_WITHIN_LIMB in order to support mini-gmp with -DMINI_GMP_LIMB_TYPE=... [src/get_ld.c] Fixed build failure with GMP_NUMB_BITS == 8 due to the use of uint64_t in src/get_ld.c, while was not included: replaced it by "unsigned long long", which does not need a specific header (an exact 64-bit type is not needed, we just need at least a 64-bit width, which unsigned long long is guaranteed to have). Note: unsigned long long may not be available with a pre-C99 compiler, but this is not worse than uint64_t. This limitation is currently OK as GMP_NUMB_BITS == 8 support is just for testing. [acinclude.m4] Make MPFR_CHECK_MP_LIMB_T_VS_LONG and MPFR_CHECK_MP_LIMB_T_VS_INTMAX similar: * Use AC_LINK_IFELSE in MPFR_CHECK_MP_LIMB_T_VS_LONG too: this is safer than AC_COMPILE_IFELSE, as it will detect undefined function-like macros. * Define MPFR_USE_STATIC_ASSERT in MPFR_CHECK_MP_LIMB_T_VS_INTMAX too in order to make sure that a static assertion is used (not the MPFR_ASSERTN fallback). Note: These constitute redundant safeguards because if MPFR_ASSERTN is used, it will be regarded as a function since the macro is not defined in this context, and linking will fail as a consequence. But this redundancy will protect more against MPFR code evolution. [acinclude.m4] Fixed MPFR_CHECK_MP_LIMB_T_VS_LONG macro by forcing MPFR_USE_STATIC_ASSERT to 1 before including mpfr-sassert.h, i.e. by requiring static assertions: because AC_COMPILE_IFELSE is used (i.e. just compiling, no linking), the test could incorrectly succeed when MPFR_USE_STATIC_ASSERT was not defined, i.e. whatever the value of "(mp_limb_t) -1 >= (unsigned long) -1"; indeed, in this case, MPFR_ASSERTN() was used instead of a static assertion, and since the macro was not defined here, MPFR_ASSERTN was regarded as a function (without a prototype), which was fine for compiling (except when the compiler is configured to regard warnings such as missing prototype as errors). In short, one could get "yes" while long was larger than mp_limb_t. Note: In uncommon cases (non-standard compiler...), one can still get "no" while a long fits in mp_limb_t, but this isn't much an issue as the MPFR code should work in such a case. Moreover, src/mpfr-impl.h will also have the chance to set MPFR_LONG_WITHIN_LIMB in practice. Removed MPFR_DECL_STATIC_ASSERT macro as it was buggy, unused, rather useless, and it had drawbacks. Details: * In src/mpfr-sassert.h, the default definition of this macro in the MPFR_USE_STATIC_ASSERT case ended with a spurious ";". Since this macro was unused, this wasn't noticeable... except in the configure test for static assertions, which failed in some cases (e.g. with CFLAGS="-std=c99 -pedantic-errors -Wno-error=overlength-strings") for this reason, which had the effect to let MPFR_USE_STATIC_ASSERT undefined, while static assertions were actually working. * Still in src/mpfr-sassert.h, but when MPFR_USE_STATIC_ASSERT is not defined, the MPFR_DECL_STATIC_ASSERT(c) expanded to nothing, which would yield invalid code as MPFR_DECL_STATIC_ASSERT(some_assertion); would yield an extra ";" (about the same issue as above). Given the fact that the portable MPFR_USE_STATIC_ASSERT code does not work with this compiler, it is not clear whether this is fixable in a completely reliable way. * MPFR_DECL_STATIC_ASSERT can be replaced by MPFR_STAT_STATIC_ASSERT after moving it to the statement section of a function, with almost no drawbacks (just a bit readability in some cases?). * When MPFR_USE_STATIC_ASSERT is not defined, MPFR_STAT_STATIC_ASSERT will check the assertion at run time (for free, since the result is known at compile time), while MPFR_DECL_STATIC_ASSERT would not be able to do anything useful. Changes: * acinclude.m4: removed the test of MPFR_DECL_STATIC_ASSERT. * src/mpfr-sassert.h: removed MPFR_DECL_STATIC_ASSERT definitions. * tune/tuneup.c: removed MPFR_DECL_STATIC_ASSERT redefinition. 2020-06-08 Vincent Lefèvre [acinclude.m4] MPFR_CHECK_MP_LIMB_T_VS_LONG: updated comment to say that using MPFR_ASSERTN (as the code tries to do if static assertions are not supported, but currently fails) would be incorrect. [acinclude.m4] In MPFR_CHECK_MP_LIMB_T_VS_INTMAX, do the test only if intmax_t is defined (assuming that it is iff uintmax_t is defined). [tests/tversion.c] Also output the results of the detection of "long within limb" and "intmax_t within limb". 2020-06-04 Vincent Lefèvre [configure.ac] Removed an obsolete FIXME, which is probably wrong. [configure.ac] Updated a comment, replacing a resolved FIXME. [acinclude.m4] MPFR_CHECK_DBL2INT_BUG test: avoid potentially reserved exit status. [acinclude.m4] Fixed r13938: the new MPFR_C_REALFP_FORMAT macro also needs to take the printf length modifier in argument. [acinclude.m4] Improved the code to determine the format of double, resolving the FIXME. The issue was that it used an AC_RUN_IFELSE, so that the format could not be determined when cross-compiling. The code to determine the format of long double did not have such an issue: the object file was analyzed by an awk script. Since a long double can have the same format as a double, this code was already able to recognize a double, in particular. So the change consisted in slightly adapting this code to accept the tested type as an argument ("double" or "long double", the mpfr_cv_… variable name being obtained thanks to AS_VAR_PUSHDEF) and reusing it for the detection of the format of double. [acinclude.m4] MPFR_C_LONG_DOUBLE_FORMAT cleanup: * Removed an unused AH_VERBATIM. * Removed "not available" condition, no longer possible since r13936. [acinclude.m4] Fix concerning r13935: also removed code that tested the availability of long double. This code was useless since it was just outputting "not available" if long double was missing, and one would get an error later since MPFR requires long double. But since long double is in ISO C89, it is useless to add a test just to return an error for pre-C89 compilers. [acinclude.m4] Removed "AC_CHECK_TYPES([long double])", whose only purpose is to define a HAVE_LONG_DOUBLE macro. [configure.ac] Removed HAVE_LONG_DOUBLE from the cleanup: no longer needed with the change in acinclude.m4. 2020-06-03 Vincent Lefèvre [configure.ac] Minor change in a comment. Cleanup about the function detection by autoconf. * acinclude.m4: removed the detection of memmove, memset and strtol, which was not used (a macro "HAVE_..." was defined... to be removed in configure.ac!); for AC_CHECK_FUNCS, remove options starting with "-Werror" as they can yield a spurious failure due to the way this test is done (this occurred on memmove and memset with GCC due to builtins, and similar issues could still occur in practice with the remaining functions in the AC_CHECK_FUNCS list). * configure.ac: removed HAVE_STRTOL from the macro cleanup: no longer needed since strtol has been removed from the AC_CHECK_FUNCS list. [acinclude.m4] Minor improvement: in the MPFR_CHECK_GMP test, changed the exit status values 1..3 to 81..83 in order to avoid confusion, as low values can typically be returned in case of compile or link error. 2020-06-02 Vincent Lefèvre [tests/memory.c] Updated a comment. [src/mpfr-longlong.h] Added code to check that mpfr-longlong.h is not included directly; MPFR_NEED_LONGLONG_H must be defined instead. [acinclude.m4] To complete r13928, one also needs to define MPFR_NEED_INTMAX_H here when mpfr-intmax.h is used. [src/{mpfr-impl.h,mpfr-intmax.h}] Added code to check that mpfr-intmax.h is not included directly; MPFR_NEED_INTMAX_H must be defined instead. 2020-06-01 Vincent Lefèvre Bug fixes and cleanup related to "src/mpfr-intmax.h" by introducing a new macro MPFR_NEED_INTMAX_H, which should be defined instead of using: #include "mpfr-intmax.h" Details on the bugs fixed: * The code added in r13916 forgot a #include since this code does a test on ULLONG_MAX. With the cleanup, is already always included by mpfr-impl.h (early enough). * In src/get_str.c and tests/memory.c, a #include "config.h" was missing before #include "mpfr-intmax.h"; this issue would affect platforms where "config.h" is needed and where or does not exist or does not work. 2020-06-01 Vincent Lefèvre [tests/tgamma.c] For the non-regression test added in r13907, one also needs to temporarily increase the memory limit, thus require MPFR_CHECK_LARGEMEM too. 2020-05-26 Vincent Lefèvre [acinclude.m4] If decimal floats are explicitly disabled, do not do the check of the bit-field ordering for _Decimal128. [acinclude.m4] Fixed detection of bit-field ordering for _Decimal128: a compiler error with exit status 1 was mixed up with little endian. 2020-05-24 Vincent Lefèvre [src/mpfr-intmax.h] Added support for Silicon Graphics IRIX 6.5 (1998) with native /usr/bin/cc, which knows the long long type but defines ULONGLONG_MAX, etc. instead of ULLONG_MAX, etc. [tests/tget_ld_2exp.c] Reverted r13914 as we still need to support pre-C99 compilers (and this change was useless). If C99 syntax is needed, there should be a configure test, and the code should be conditional. 2020-05-23 Paul Zimmermann [tests/tget_ld_2exp.c] put expected value in hex in bug20180904() 2020-05-20 Vincent Lefèvre [doc/README.dev] "To make a release": mention MPFR_CHECK_EXPENSIVE. 2020-05-19 Paul Zimmermann [tests/tgamma.c] added comment about bug fix [src/bernoulli.c] improve initial precision in mpfr_bernoulli_internal() (avoid failures for n <= 10000) [src/bernoulli.c] fix bug with non-regression test added in r13907 [src/bernoulli.c] temporary fix for the bug in mpfr_gamma, something must be wrong in the error analysis of mpfr_bernoulli_internal() [doc/README.dev] added MPFR_CHECK_EXPENSIVE [tests/tgamma.c] use MPFR_CHECK_EXPENSIVE added non-regression test for bug reported by Frithjof Blomquist 2020-05-04 Vincent Lefèvre [tools/mpfrlint] Use of codespell: better workaround to python ugliness. 2020-04-27 Vincent Lefèvre [doc/mpfr.texi] Section "Rounding" / even-rounding rule: the odd radices β are actually not concerned since in such radices, β^k is always odd, so that the exponent does not matter. [doc/mpfr.texi] In Section "Rounding", for MPFR_RNDN, added a note about the even-rounding rule in particular cases: 1-digit precision and odd radices. Note: A short explanation was already in the mpfr_get_str description, which is where the issue could occur at the time the minimum precision of MPFR numbers was 2. Now that the minimum precision is 1, this rule in such special cases is more general. [doc/mpfr.texi] + "than": also in a comment. [doc/mpfr.texi] Corrected a typo. Changed "{less,greater} or equal to" to the more common "{less,greater} than or equal to". 2020-04-26 Vincent Lefèvre [doc/mpfr.texi] In the paragraph on mpfr_rnd_t, give a reference to Section "Rounding". [doc/mpfr.texi] s/can not/cannot/ [doc/mpfr.texi] Improved Section "Rounding" even more: * Added a note about the sign of the result (important for 0). * Described the directed rounding modes (BTW, this notion of "directed rounding modes" was used but never defined). [doc/mpfr.texi] Improved the description of the rounding modes: * Be more clear that MPFR_RNDN uses the even rounding rule. * In "two representable numbers", add "consecutive". * Be more general than radix 2 (due to conversions to a string). * Consistent typography. 2020-04-25 Vincent Lefèvre [doc/mpfr.texi] * mpfr_init2: mention mpfr_prec_round; added a note about memory allocation. * mpfr_prec_round: clarification ("new allocation" could be surprising since one needs less memory). 2020-04-25 Paul Zimmermann [doc/mpfr.texi] document that mpfr_prec_round does no new allocation in case the allocated memory is enough 2020-04-22 Vincent Lefèvre [src/atan.c] Removing the FIXME: I can't see anything wrong in the MPFR code. This could be a bug in GCC's analyzer (which is currently experimental). And GCC bug 94713 in the analyzer prevents debugging as it makes impossible to track uninitialized values: warnings do not occur the first time an uninitialized value occurs. [src/atan.c] Added an assertion. [src/atan.c] Reduce the number of mpz_get_ui calls with assertions. [src/atan.c] Added a FIXME. 2020-04-14 Vincent Lefèvre [doc/texinfo.tex] Update to 2020-02-11.09 with "autoreconf -i -f" under Debian/unstable. Note: The generated mpfr.html and mpfr.info files remain the same. In mpfr.pdf, there are minor changes concerning horizontal spacing in paragraphs with a URL. 2020-04-11 Vincent Lefèvre [tests/tget_set_d64.c] Fixed missing "#if _MPFR_IEEE_FLOATS" that became visible with r13878 now that the encoding of decimal floats can be detected at compile time. But by fixing the defined macros manually, this issue could be visible before r13878. 2020-04-10 Vincent Lefèvre Reworked decimal support and detection, resolving FIXMEs. * INSTALL, acinclude.m4, configure.ac: --enable-decimal-float can take new values. Change of macro DPD_FORMAT (DPD was assumed in case of cross-compilation, which could be wrong) to 3 new macros: DECIMAL_DPD_FORMAT, DECIMAL_BID_FORMAT, DECIMAL_GENERIC_CODE. * doc/README.dev: documented these 3 new macros. * src/mpfr-impl.h: the detection of the BID encoding can now be done at compile time when GCC defines __DECIMAL_BID_FORMAT__ (as on x86); support of the 3 new macros. * src/{get_d64.c,set_d64.c,set_d128.c}: update. * tests/{tget_set_d64.c,tget_set_d128.c,tversion.c}: update. 2020-04-08 Vincent Lefèvre Updated URLs of the GCC mailing-list archives. 2020-04-06 Vincent Lefèvre [src/mpfr-gmp.h] Updated FIXME about AC_FUNC_ALLOCA (in 2019-01, I already noticed a probable bug in the AC_FUNC_ALLOCA description, but forgot about it). [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Formatted output functions: added a comment with the URL of the bug report. [NEWS,doc/mpfr.texi] Documented the improvement in the formatted output functions (mpfr_printf, etc.) with an empty precision field, about trailing zeros. 2020-04-03 Vincent Lefèvre [tests/tsub.c] Corrected MPFR_ASSERTD to MPFR_ASSERTN. [tests/tsub.c] Reverted r13862 and fixed the test_ubf test: A random precision was too small, so that an input for the test was not computed exactly (I had modified the values of the inputs for better tests, but forgot to change the minimum precision). Also check that the inputs are computed exactly (which is what I often do, but here, I had forgotten), in order to make errors like the above one easier to understand in case the test will have to be modified later. Note: With the incorrect input, the mpfr_sub1 result and flags were actually correct, so that this was only a bug in the test. 2020-04-03 Paul Zimmermann [INSTALL] update CompCert instructions 2020-04-02 Paul Zimmermann [INSTALL] fixed CompCert instructions 2020-04-02 Vincent Lefèvre [tests/tset_ld.c] Reverted r13858: the check_overflow test was already in MPFR 4.0.1 and was succeeding on armv5tejl-unknown-linux-gnueabi, which had mpfr_cv_c_long_double_format='IEEE double, little endian'. The issue should be investigated. Note: MPFR_LDBL_MANT_DIG may be larger than the actual number of bits, but this should not cause a failure in the tests. [tests/tget_ld_2exp.c] Proper fix: the bug20180904 test was designed for the x87 extended precision, so enable it only in this case. 2020-04-02 Paul Zimmermann [tests/tsub.c] modify test_ubf() to always hit a current failing test 2020-04-02 Vincent Lefèvre [configure.ac] Fixed the change done in r13853 (about removed macros), making the code simpler and more maintainable at the same time. 2020-04-02 Paul Zimmermann [INSTALL] added configuration for CompCert test 2020-04-02 Vincent Lefèvre [src/set_ld.c] Removed obsolete workaround due to LDBL_MAX being buggy on old i386 systems (the tests were not using this workaround). 2020-04-02 Paul Zimmermann [tests/tget_ld_2exp.c] fixed for case where long double = double [tests/tset_ld.c] likewise 2020-04-02 Vincent Lefèvre [configure.ac] Moved MPFR_CONFIGS invocation: MPFR_CONFIGS uses LDFLAGS, thus must be invoked after LDFLAGS has been determined completely. 2020-04-02 Paul Zimmermann [INSTALL] now all tests pass with compcert [acinclude.m4] added missing LDFLAGS for long double test 2020-04-02 Vincent Lefèvre [doc/README.dev] Added HAVE_ALLOCA description. [configure.ac] Do not remove the HAVE_ALLOCA macro, which is now used by MPFR to determine the default MPFR_ALLOCA_MAX value. 2020-04-02 Paul Zimmermann [INSTALL] update CompCert instructions 2020-04-02 Vincent Lefèvre [tests/tversion.c] Output whether MPFR is built with the GMP build, and the MPFR_ALLOCA_MAX value if not. [src/mpfr-gmp.h] If HAVE_ALLOCA is not defined, i.e. if alloca() is not available (as detected by the configure script), then set the default MPFR_ALLOCA_MAX value to 0 so that alloca() is not used. 2020-04-02 Paul Zimmermann [INSTALL] added instructions for CompCert 2020-04-02 Vincent Lefèvre [doc/README.dev] Updated MPFR_ALLOCA_MAX description. [src/mpfr-gmp.h] When MPFR_ALLOCA_MAX = 0 (set at configure time), do not reference alloca() since we don't need it. 2020-03-31 Vincent Lefèvre [doc/mpfr.texi] About mpfr_printf with %Re and empty precision field, added a comment with URLs of the discussion and the bug report. 2020-03-30 Vincent Lefèvre [src/sub1.c] Typo in a comment. [configure.ac] Updated message output when the gmp.h vs libgmp test fails: another cause may be that LD_RUN_PATH is not honored (problem seen under OpenBSD 6.6 / gcc302.fsffrance.org). 2020-03-27 Vincent Lefèvre [tests/tset_sj.c] Forgot a "#ifndef NPRINTF_J" for printf("%jd",...). [src/set_uj.c] Fixed underflow detection. [src/set_uj.c] Added early overflow detection to avoid a possible integer overflow. Added a FIXME (incorrect underflow detection). [tests/tset_sj.c] Added tests of mpfr_set_sj_2exp and mpfr_set_uj_2exp 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 (like in tset_si.c, see r13808), but also exponents INTMAX_MIN and INTMAX_MAX. This shows bugs in set_uj.c, to be fixed... [src/set_sj.c] Coding style. [src] Moved the definition of the numberof() macro from mpfr-gmp.h to mpfr-impl.h in order to always use our own. Also make sure that the type is signed, so that the value can be used in arbitrary expressions without the risk of silently switching to unsigned arithmetic. 2020-03-26 Vincent Lefèvre [tests/texpm1.c] Updated the bad_cases() parameters to increase the proportion of generated bad cases. [tests/tset_si.c] Forgot a cast for MPFR_EXP_FSPEC argument. [doc/mpfr.texi] Updated the month. Consistency: "a UBF" → "an UBF" since UBF stands for "unbounded float". [src/mpfr-impl.h] Updated UBF comment about aliasing rules. [src/mpfr-impl.h] Updated UBF comment about aliasing rules. [src/mpfr-impl.h] Bug fix (MPFR_ZEXP(x) as used for an assignment could yield undefined behavior on platforms where mpfr_exp_t has trap representations); this is also a general improvement. [tests/tsub.c] Avoid the build failure with -Werror=strict-aliasing by replacing x[…] by p[…] (but this doesn't eliminate the problem itself). [src/mpfr-impl.h] UBF: updated comment: this breaks aliasing rules, but 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. 2020-03-25 Vincent Lefèvre [tests/tsub.c] Fixed tests on UBF. [src/sub1.c] Fixed underflow handling in case c small (can occur only with UBF). [tests/tfma.c] Minor correction. [tests/tfma.c] Changed a RND_LOOP to RND_LOOP_NO_RNDF as the behavior with RNDF changed after a bug fix. [tests/tsub.c] Completed tests for UBF (currently fail). [src/sub1.c] Bug fix for UBF and MPFR_RNDF. [src/set_{si,ui}_2exp.c] Bug fix in MPFR_LONG_WITHIN_LIMB defined case: added early underflow/overflow checking to avoid integer overflow or errors due to special exponent values. [tests/tset_si.c] Added tests of mpfr_set_si_2exp and mpfr_set_ui_2exp 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. 2020-03-24 Vincent Lefèvre [tests/tsub.c] More tests on UBF. The results are not checked yet, but running the tests with UBsan could allow one to trigger bugs (such as the one fixed in r13806). [src/sub1.c] If exp_b = MPFR_EXP_MIN, an integer overflow may occur in 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. [tests/tfmma.c] Added extreme_underflow test: before the r13798 bug fix, this was triggering an integer overflow. [tests/tsub.c] Corrected a function name. [tests/tsub.c] More tests on UBF, in particular with an exponent change (including subnormal → normal and normal → overflow due to that). [tests/tsub.c] Tests on UBF: underflow/overflow cases done. 2020-03-23 Vincent Lefèvre [tests/tsub.c] More tests on UBF. [src/mpfr-impl.h] UBF: reordered macro definitions. [src] * mpfr-impl.h: define MPFR_UBF_GET_EXP macro. * add1.c, sub1.c: use this macro. [src/sub1.c] Detect an underflow case (before the main detection) to avoid a possible integer overflow with UBF. [tests/tsub.c] Added comments. [tests/tsub.c] First tests on UBF. [src/agm.c] Avoid a potential integer overflow with huge precisions. 2020-03-16 Vincent Lefèvre [src/root.c] Removed useless cast in a comparison, as both operands are non-negative. [src/rem1.c] * 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. [src/pow.c] * 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. [src/cos.c] Updated a comment. [src/cos.c] Updated a comment. [src/const_log2.c] Corrected type for the return value of mpz_scan1. 2020-03-13 Vincent Lefèvre [tests/tests.c] Revert a change done in r13783 for function bad_cases(): 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. [tests] Update to test the ternary value in test5rm() when possible, 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. [tests/tests.c] Modified the prototype of test5rm() to support a 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. 2020-03-12 Vincent Lefèvre [tests/tsqrt.c] For bad_cases(), use the same pos and psup parameters as in troot.c for "rootn[2]", allowing inexact cases. [tests/tcbrt.c] For bad_cases(), use the same pos and psup parameters as in troot.c for "rootn[3]", allowing inexact cases. [tests] * 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. [tests/tests.c] Added a TODO for bad_cases, as the exact cases are not 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. [tests/tests.c] * 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. [tests/tests.c] Minor change in an initialization. [tests/tget_set_{d64,d128}.c] Added a FIXME and improved a message. [acinclude.m4] Added a FIXME: in case of cross-compiling, the guess "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. 2020-03-11 Vincent Lefèvre Added bad_cases tests for mpfr_cbrt. [src/cbrt.c] Improved the algorithm in the case the precision of the 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. [tests/tcbrt.c] Test the ternary value on other exact cases. [tests/tcbrt.c] Test the ternary value on special cases. [src/cbrt.c] Description of the algorithm: improvement; corrected the 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). [src/cbrt.c] Description of the algorithm: correction; added a TODO. 2020-03-10 Vincent Lefèvre [src/cbrt.c] Description of the algorithm: corrected indentation; renamed variable r to t in order to avoid confusion with the code (where r has a different meaning). [src/cbrt.c] Clarified a comment. [src/cbrt.c] Resolved the second FIXME and simplified the code (basically by removing duplicate code). [src/cbrt.c] Description of the algorithm: * Since there was no upper bound on s, let's remove the upper bound on m (this now matches the code). * Replaced the FIXME by one due to the lack of upper bound on s. [src/cbrt.c] Added another FIXME as the code does not match the algorithm described in a comment. [src/cbrt.c] Improved a condition to avoid operations that correspond to a no-op. [src/cbrt.c] Added an assertion. [src/cbrt.c] Code cleanup and simplification. Added logging messages and a FIXME about a comment (coming from r2057 with its associated code). [src/cbrt.c] Removed a useless cast on a comparison operand, since both operands are non-negative. [src/atan.c] Added assertions. [tools/mpfrlint] Workaround to Debian bug 953369 in libpython3.8-minimal for the codespell invocation. 2020-03-09 Vincent Lefèvre [src/eint.c] Bug fix: possible integer overflow with some C implementations (or some _MPFR_PREC_FORMAT / _MPFR_EXP_FORMAT values) due to the use of incorrect integer types. [src/eint.c] Added other logging messages. [src/eint.c] Added some logging messages. 2020-03-09 Paul Zimmermann [tests/tsin.c] added one test 2020-03-04 Vincent Lefèvre [src/sub1.c] cancel: also log its value; range checking/tracking. [src/cmp2.c] Added a comment giving the range of the value returned in "cancel" and explaining why there is no integer overflow in the computation of this value. [src/cmp2.c] Comment: some absolute values are not needed (again). [src/cmp2.c] Minor correction for |EXP(b) - EXP(c)| >= MPFR_EXP_MAX. [src/cmp2.c] Better explanation when |EXP(b) - EXP(c)| >= MPFR_EXP_MAX. 2020-03-03 Vincent Lefèvre [src/cmp2.c] Finished the review of mpfr_cmp2: simplified the code even more; corrected/updated comments (in the case high_dif = 0, one can have dif = 1 if c has entirely been taken into account, so that the comment "dif > 1 here" was incorrect; only dif >= 1 is needed anyway). [src/cmp2.c] Changed high_dif to type int since it is manipulated like a boolean. Updated comments. 2020-03-02 Vincent Lefèvre [src/cmp2.c] Simplified the mpfr_cmp2 code and updated comments. [src/cmp2.c] Updated comments. 2020-03-02 Paul Zimmermann [src/mpfr.h] added comment 2020-03-02 Vincent Lefèvre [src/mpfr.h] _MPFR_PREC_FORMAT and _MPFR_EXP_FORMAT: improved comment. [src/mpfr.h] _MPFR_PREC_FORMAT and _MPFR_EXP_FORMAT: added a detailed comment (the previous comment was not obsolete, but misleading). 2020-03-02 Paul Zimmermann [src/mpfr.h] removed obsolete comment (_MPFR_PREC_FORMAT=3 is the default under Linux x86_64) 2020-03-01 Paul Zimmermann [src/sin.c] increase initial precision even more 2020-03-01 Vincent Lefèvre [tests/tpow.c] Replaced mpfr_cmp by !mpfr_equal_p for NaN detection. [tests/tsin.c] Replaced obsolete function mpfr_mul_2exp by mpfr_mul_2ui. 2020-02-29 Paul Zimmermann [src/sin.c] increase initial precision when x is large 2020-02-29 Paul Zimmermann [src/rem1.c] workaround for efficiency bug in mpz_powm_ui, which was making argument reduction in mpfr_sin for huge x very slow. Before: $ ./mfv5 -p113 -e16384 -d-2 mpfr_sin mpfr_sin: 3289620 / 3576511.59 / 6841956 After this commit: mpfr_sin: 166868 / 182661.01 / 343224 2020-02-29 Paul Zimmermann [tests/tpow.c] added one test added value -2 for option -d to generate random number with exponent exactly e. Example: $ mfv5 -p113 -e16384 -d-2 -v mpfr_sin 2020-02-28 Paul Zimmermann [tests/tpow.c] added a test [tests/tsin.c] fixed and completed check_binary128() 2020-02-28 Vincent Lefèvre [src/cmp2.c] Started to review mpfr_cmp2. Minor changes. [src/cmp2.c] Detailed a comment concerning UBF. 2020-02-27 Vincent Lefèvre [tests/tsin.c] Cleanup of the latest test (note: mpfr_equal_p is better than mpfr_cmp as it makes the test fail on a NaN result). 2020-02-27 Paul Zimmermann [tests/tsin.c] added one test with precision 128 2020-02-27 Vincent Lefèvre [src/mpfr.h] Updated a comment (underscore version of attribute name). [tools/mpfrlint] Detect the use of the non-underscore version of the attribute names in mpfr.h (see README.dev). 2020-02-25 Vincent Lefèvre [src/mpfr.h] Use the underscore version of the attribute names. [doc/README.dev] Added information on this subject. [TODO] Added item on GNU Automake and -I options. 2020-02-14 Vincent Lefèvre [src/mpfr-impl.h] Removed an incorrect comment before MPFR_TMP_INIT1 (this macro does not allocate anything, and MPFR_TMP_INIT just after can allocate more than 1 limb). [TODO] About the use of MPFR_MANT(x). 2020-02-13 Vincent Lefèvre [TODO] Typo. 2020-02-12 Vincent Lefèvre [tests/tcmpabs.c] Added missing tests of mpfr_cmpabs with NaN. [tests/tcmpabs.c] For mpfr_cmpabs: like mpfr_cmpabs_ui, do each test in 4 different contexts, combinations of: * flags all unset or flags all set; * usual exponent range or reduced exponent range. Minor corrections in the old tests. [tests/tcmpabs.c] For mpfr_cmpabs_ui: do each test in 4 different contexts, combinations of: * flags all unset or flags all set; * usual exponent range or reduced exponent range. 2020-02-12 Paul Zimmermann [tests/tcmpabs.c] added tests for mpfr_cmpabs_ui 2020-02-12 Vincent Lefèvre [src/mpfr-impl.h] * MPFR_ALIAS: use the comma operator instead of "do ... while (0)" so that this macro can be used in an expression context. * MPFR_TMP_INIT_ABS, MPFR_TMP_INIT_NEG: use MPFR_ALIAS. [src/mpfr.h] Added prototype for mpfr_cmpabs_ui. [doc/mpfr.texi] Added mpfr_cmpabs_ui to Section "Added Functions" (API Compatibility). [tests/trint.c] Replaced obsolete mpfr_cmp_abs by mpfr_cmpabs. [doc/mpfr.texi] Typo from r13708. 2020-02-12 Paul Zimmermann [NEWS] mention new mpfr_cmpabs_ui added new function mpfr_cmpabs_ui renamed cmp_abs.c to cmpabs.c 2020-02-12 Vincent Lefèvre [TODO] Typo. [TODO] + Serialization / Deserialization (suggested by Frédéric Pétrot). I've also added an idea of implementation to reuse most of the code and change very little. [src/ubf.c] * Optimized mpfr_init_get_zexp() for _MPFR_EXP_FORMAT <= 3 (as in the default configuration). * Updated comments. [src/mpfr-impl.h] Added UBF-related comments. [src/mpfr-impl.h] Added UBF-related comments. [src/mpfr-impl.h] Added a comment for UBF and types. 2020-02-11 Vincent Lefèvre [src/mpfr-impl.h] Added a comment for INEXPOS. [src/mpfr-impl.h] INEXPOS and VSIGN code improvement. Removed duplicate macro definitions. [tests/tfmma.c] Use mpfr_set_str instead of mpfr_set_d. [src/sub1.c] Got rid of some goto's. Added log messages. 2020-02-10 Vincent Lefèvre [src/sub1.c] Bug fix: the underflow case (possible with UBF, e.g. via mpfr_fmma or mpfr_fmms) was not tested in the case c small. Note: this completes r11418 and r12752 for underflow detection. [src/sub1.c] Added log messages and checked the UBF cases yielding exp_b == MPFR_EXP_MAX and/or diff_exp == MPFR_EXP_MAX. 2020-02-08 Vincent Lefèvre [src/vasprintf.c] Added log messages for MPFR_PREC_ARG ('P' specifier). [tests/tsprintf.c] Fixed some tests: the 'P' specifier was missing. 2020-02-06 Vincent Lefèvre [src/fmma.c] Reverted the mpfr_check_range from r13688. The exponent range has not been extended by mpfr_fmma_aux, and the result comes from mpfr_add, mpfr_sub, or mpfr_set_1_2, which return results in the current range. If the result of mpfr_fmma_aux is not in the current range, this is due to a bug in one of these functions. Note: mpfr_add and mpfr_sub accept UBF inputs. 2020-02-06 Paul Zimmermann [src/fmma.c] fixed bug (result might be out of exponent range) [tests/tfmma.c] added non-regression test 2020-02-03 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] In the paragraph "MPFR internal data such as flags", no longer mention caches as caches may now also be global when MPFR has been compiled as thread safe (locking is used). Caches have been discussed earlier in the section anyway. 2020-01-23 Vincent Lefèvre [INSTALL] URL update. 2020-01-20 Vincent Lefèvre ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". [tests/Makefile.am] Updated a comment; in particular, replaced the two obsolete gmane.org URLs by lists.gnu.org/archive/html/bug-gnulib ones. [INSTALL] Removed reference to a gmane.org URL, which no longer exists. 2020-01-16 Vincent Lefèvre [src/beta.c,tests/ttanh.c] towards → toward (for consistency). 2020-01-10 Vincent Lefèvre [tests/{tfprintf.c,tprintf.c}] Updated an error message about MinGW, now output only if MinGW is used. [doc/README.dev] Concerning MinGW, added a sentence about the use of the __USE_MINGW_ANSI_STDIO macro, confirming the existing note. [TODO] Removed obsolete item on MinGW and -D__USE_MINGW_ANSI_STDIO. [INSTALL] Update concerning MinGW and the __USE_MINGW_ANSI_STDIO macro. [doc/mpfr.texi] Updated mpfr_get_str documentation, correcting r13666 (we still need the extra two bytes and to take -@Inf@ into account). 2020-01-10 Paul Zimmermann [mpfr.texi] fixed out-dated documentation for mpfr_get_str 2020-01-09 Vincent Lefèvre [doc/README.dev] In the latest update, forgot to remove the CC=... [doc/README.dev] Update about the test under Wine. [acinclude.m4,configure.ac] * Moved the code that tries to determine the format of double from configure.ac to acinclude.m4 in MPFR_CONFIGS (as required), just before the one for long double. * Added a FIXME comment: This code uses AC_RUN_IFELSE, which cannot run the test when cross-compiling; use a test like for long double instead. [acinclude.m4] English usage. [acinclude.m4] Updated messages about the format of "long double". [configure.ac] Ditto for "double". Added missing AC_MSG_RESULT. [tests/tversion.c] Updated/fixed an output line to match the other ones. [tests/tsprintf.c] Added tests for %Ra and %Rb on the value 0 with an empty precision field. [src/vasprintf.c] Fixed output precision bug with decimal output (i.e. e, f and g conversion specifiers) and an empty precision field on the value 0. [tests/tsprintf.c] Also added tests with %Rf, %Rg and %#Rg on 0. [tests/tsprintf.c] Added a test with %Re and an empty precision field on the value 0; it currently fails. 2020-01-08 Vincent Lefèvre [tools/ck-copyright-notice] Added a note about the mpfr.pc.in file. Copyright notice update: added 2020 with perl -pi -e 's/ (\d{4}-)?(2019)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2019 from the example in the doc/README.dev file. [TODO] + base conversion with the round-trip property using a minimal precision, such as the to_chars functions from the C++ standard. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Formatted output: improved the text concerning the empty precision field, i.e. focus on the chosen precision rather than the round-trip property (as the rounding mode is not necessarily to nearest). [doc/mpfr.texi] Formatted output with %Re (empty precision field): added a reference to mpfr_get_str_ndigits. [src/vasprintf.c] Simplified the conditions under which trailing zeros are kept (the spec_g variable is no longer needed as a consequence). [tests/tsprintf.c] Re-added tests changed by r13644 and r13645, but with a variable of smaller precision in order to get the same output as before. [tests/tsprintf.c] Updated other two tests (in da_DK locale). 2020-01-08 Paul Zimmermann fixed tests for new more precise semantics for mpfr_printf ("%Re", x), and documented it [src/vasprintf.c] tentative fix so that mpfr_printf ("%.Re", x) prints a number of decimal digits independent from x 2019-12-24 Vincent Lefèvre [INSTALL,doc/mpfr.texi] Typography. 2019-10-10 Vincent Lefèvre [doc/algorithms.tex] Ulp calculus: put the old Rule 8 just after Rule 2, as the old Rule 3 (now Rule 4) uses it directly (proof updated). [doc/algorithms.tex] Ulp calculus: simplified the proof of Rule 8. [doc/algorithms.tex] Ulp calculus Rule 3: missing absolute values in the proof. [doc/algorithms.tex] Actually assume that no underflows nor overflows occur for the whole section "Error calculus". [doc/algorithms.tex] Ulp calculus Rule 6: corrected it (we need to assume no underflows nor overflows) and its proof, and generalized it with absolute values (like in the previous rules). 2019-10-07 Vincent Lefèvre [doc/algorithms.tex] Ulp calculus Rule 3: more powerful result and much simpler proof. [doc/algorithms.tex] Section 2 (Error calculus): When n was a precision, replaced it by p as this is the usual notation (see Section 1) and n sometimes had a double meaning. 2019-10-04 Vincent Lefèvre [tests/tcmp_ui.c] Updated comment: this is a bug in Clang 9. [tests/tcmp_ui.c] Added a comment: failure of a test with the clang-9 1:9-1 Debian package. 2019-10-01 Vincent Lefèvre Clean-up concerning the tests of subnormals for double and float. * acinclude.m4: renamed variables mpfr_cv_have_denorms_flt to mpfr_cv_have_subnorm_flt mpfr_cv_have_denorms to mpfr_cv_have_subnorm_dbl and improved messages. * acinclude.m4, tests/tget_flt.c: renamed macro HAVE_DENORMS_FLT to HAVE_SUBNORM_FLT * acinclude.m4, tests/{tests.c,tset_d.c,tsprintf.c}: renamed macro HAVE_DENORMS to HAVE_SUBNORM_DBL * doc/README.dev: updated / completed the corresponding documentation. * tests/tget_d.c: renamed function check_denorms to check_subnorm. [acinclude.m4] Updated comment about the tests for subnormal numbers. [acinclude.m4] Added a comment about the tests for subnormal numbers. 2019-09-24 Vincent Lefèvre [doc/Makefile.am] Added missing texinfo.tex prerequisite. 2019-09-16 Vincent Lefèvre [tests] Added FIXME comment in tfprintf.c, tout_str.c and tprintf.c: The output is not tested (thus coverage data are meaningless). 2019-09-10 Vincent Lefèvre [src/{add1sp.c,sub1sp.c}] Get rid of useless goto's. 2019-09-06 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [src/hypot.c] Replaced a TODO by a FIXME. The mpfr_out_str function now accepts bases from -2 to -36, in order to follow mpfr_get_str and GMP's mpf_out_str functions. [doc/mpfr.texi] Changed an incorrect use of @xref, which must always occur at the beginning of a sentence (use "see @ref{...}" instead). [doc/mpfr.texi] At the end of "Arithmetic Functions", added a sentence referencing the power functions (since x^n is an arithmetic function). 2019-09-05 Vincent Lefèvre [doc/mpfr.texi] Removed the useless "Float ..." index entries. [doc/mpfr.texi] Moved the mpfr_pow class of functions from "Arithmetic Functions" to "Transcendental Functions". [doc/mpfr.texi] Added "Float transcendental functions" to the index for consistency ("transcendental functions" implies floating point, but the user should expect to find it with the other index terms starting with "Float"). [doc/mpfr.texi] Renamed "Basic Arithmetic Functions" to just "Arithmetic Functions". [doc/mpfr.texi] Transcendental functions: added a sentence to the important note (about cases theoretically very hard to round). [doc/mpfr.texi] Renamed Section "Special Functions" to "Transcendental Functions" (as after changes in r13605 and r13606, it now contains only the transcendental functions), and slightly rewrote its important note. [doc/mpfr.texi] Moved mpfr_free_cache, mpfr_free_cache2, mpfr_free_pool and mpfr_mp_memory_cleanup from "Special Functions" to a new section "Memory Handling Functions". [doc/mpfr.texi] * Moved mpfr_fac_ui, mpfr_fma, mpfr_fms, mpfr_fmma, mpfr_fmms, mpfr_hypot, mpfr_sum and mpfr_dot from "Special Functions" to "Basic Arithmetic Functions" (as these are functions based on +, -, *, / and roots). * Added a FIXME for mpfr_pow: does this function really belong to "Basic Arithmetic Functions"? [doc/mpfr.texi] Improved warning about huge precisions. [src/mul.c] For the --enable-assert=full test, also test the flags (like what has been done for mpfr_add1sp and mpfr_sub1sp). [src/sub1sp.c] For the --enable-assert=full test, improved output of ternary value and flags, like in r13582 for mpfr_add1sp. [src/add1sp.c] Cosmetic change (consistent ordering). 2019-09-04 Paul Zimmermann [tests/tsub1sp.c] added non-regression test for bug in mpfr_sub1sp2n [src/sub1sp.c] fixed that bug 2019-09-04 Vincent Lefèvre [acinclude.m4] Fixed MPFR_C_LONG_DOUBLE_FORMAT macro for MS-Windows. [NEWS] More details about mpfr_add and mpfr_sub. 2019-09-04 Paul Zimmermann [NEWS] mention that mpfr_sub was also improved for 128 bits [NEWS] coverage improved to 98.6% on x86_64 [tests/tadd1sp.c] improve coverage 2019-09-04 Vincent Lefèvre [acinclude.m4] Fixed MPFR_C_LONG_DOUBLE_FORMAT macro: the patch had a spurious ";" at the end of conftest.c, which made its compilation fail with -pedantic -Werror (using gcc or clang). 2019-09-04 Paul Zimmermann [src/sub1sp.c] rewrote mpfr_sub1sp2n (inspired from mpfr_sub1sp1n) 2019-09-04 Vincent Lefèvre [acinclude.m4] Updated MPFR_C_LONG_DOUBLE_FORMAT to support compilation with GCC's and clang's LTO (-flto). This new test is inspired by the one used by GMP for the double type. Thanks to Paul Mulders for a preliminary version of the patch for MPFR. 2019-09-03 Paul Zimmermann [src/sub1sp.c] added new function mpfr_sub1sp2n for p = 2*GMP_NUMB_BITS (still to be tested) 2019-09-03 Vincent Lefèvre [tests/tadd1sp.c] bug20190903: * Fixed the second test for GMP_NUMB_BITS != 64. * Updated comments. 2019-09-03 Paul Zimmermann [src/add1sp.c] improved comment 2019-09-03 Vincent Lefèvre [src/add1sp.c] mpfr_add1sp2n: improved a comment. [src/add1sp.c] Fixed the bug. [tests/tadd1sp.c] bug20190903: do the second test in MPFR_RNDU too. [tests/tadd1sp.c] bug20190903: in the second test, check the mpfr_t value, the ternary value and the flags, in order to get a failure even without "--enable-assert=full". [tests/tadd1sp.c] When testing mpfr_add, use a wrapper mpfr_add_cf that calls mpfr_clear_flags first, so that if --enable-assert=full is used, the flags can be better checked too (and automatically). Now tadd1sp outputs with --enable-assert=full, as wanted: add1 : ternary = -1, flags = inexact (8) add1sp: ternary = 0, flags = none (0) [src] * exceptions.c: define flags_fout if MPFR_WANT_ASSERT >= 2, i.e. with --enable-assert=full (for better flags output in add1sp.c, etc.). * mpfr-impl.h: declare flags_fout if MPFR_WANT_ASSERT >= 2. * add1sp.c: improve output of ternary value and flags. [tests/tadd1sp.c] Updated comments of bug20190903. [tests/tadd1sp.c] Added a test that triggers a bug in mpfr_add1sp2n (corresponding to the FIXME), yielding a failure with "--enable-assert=full". Note 1: The computed values are equal (with MPFR_RNDN), but one gets Inexact sp = 0 | Inexact = -1 Flags sp = 10 | Flags = 10 Note 2: The fact that the flags do not match the ternary value in the error message is due to a missing mpfr_clear_flags in the test. [src/add1sp.c] mpfr_add1sp2n: * Code refactoring, eliminating the unnecessary goto's. * In the d >= 2 * GMP_NUMB_BITS case, use a single test for rb and sb. * Improved code consistency. * Added a FIXME about suspicious code. → Find a failing test and fix the code, or explain the code if it is correct. 2019-09-03 Paul Zimmermann [src/add1sp.c] fix for bug20190903 2019-09-03 Vincent Lefèvre [src/add1sp.c] Corrected a comment. [tests/tadd1sp.c] More random tests in the special precisions GMP_NUMB_BITS and 2 * GMP_NUMB_BITS (but they don't trigger the bug due to r13574). [tests/tadd1sp.c] Added testcase for bug due to r13574 (found with the other test programs, using --enable-assert=full). 2019-09-03 Paul Zimmermann [src/add1sp.c] added mpfr_add1sp2n for 128-bit precision (with 64-bit limb) 2019-09-02 Paul Zimmermann [src/sub1sp1_extracted.c] replace hard-coded bounds by emin/emax added sub1sp1_extracted.c (not ready yet) 2019-08-30 Paul Zimmermann added github source for Jianyang Pan formal proof 2019-08-21 Vincent Lefèvre [tests/mpfr-test.h] At the end, with GCC, undef volatile if defined. Explanations: With GCC, a macro "volatile" can be defined to test some special code in mpfr-impl.h (code for compilers that define such a macro), but the volatile keyword is necessary in some tests to avoid some GCC bugs. Thus we need to undef this macro (if defined). We do that at the end, so that mpfr-impl.h (included earlier) is not affected by this undef. [tests/tget_set_d128.c] Updated a test with a non-canonical encoding: * More meaningful name ("noncanonical" instead of "coverage"). * Output details in case of failure. * Avoid GCC bug 91226: wrong propagation of non-canonical _Decimal64 and _Decimal128 constant (BID only). 2019-08-20 Vincent Lefèvre [doc/README.dev] Update concerning the "decimal-point character". [doc/mpfr.texi] Changed "decimal point" to "decimal-point character", which is the term used in the ISO C standard. This is better as this character is also used with non-decimal bases: "decimal-point" is just the name of this character (as initially defined for base 10) and does not imply a number written in decimal. [doc/mpfr.texi] Compatibility With MPF: added an item on the difference of the output format between mpf_out_str and mpfr_out_str. [doc/mpfr.texi] Rewrote and completed the mpfr_out_str description. 2019-08-20 Vincent Lefèvre [src/out_str.c] Fixed bug in mpfr_out_str: When the exponent of the converted value is 0, it was not output, contrary to what is described in the MPFR manual. Note that this does not change the value of the printed string, so that this has no effect on applications that just re-read the value (with MPFR or another code). This was regarded as a bug rather than an error in the documentation, thus the output now looks more similar to what printf with %e yields; the GMP function mpf_out_str also outputs the exponent 0. Short discussion: https://sympa.inria.fr/sympa/arc/mpfr/2019-08/msg00012.html Note: The tests still pass, as this function is currently not really tested. 2019-08-14 Vincent Lefèvre [INSTALL] Update/corrections about MinGW and __USE_MINGW_ANSI_STDIO. [tests/tversion.c] When building with MinGW, output a line about it: MinGW32 / MinGW64, and the __USE_MINGW_ANSI_STDIO definition. [src/set_d128.c] Moved a definition under the #if where it is used. 2019-08-14 Paul Zimmermann improve INSTALL (feedback from sisyphus ) 2019-08-12 Vincent Lefèvre [doc/mpfr.texi] Added a FIXME for mpfr_out_str about the exponent 0. [doc/mpfr.texi] About mpfr_get_str / mpfr_out_str: * In the mpfr_get_str description, changed argument "b" to "base" for consistency with similar functions (now, only mpfr_get_str_ndigits has b as this looks better in the formula). Also added a link to mpfr_get_str_ndigits. * In the mpfr_out_str description, replaced the ambiguous and even incorrect sentence "enough digits so that op can be read back exactly" (issues with trailing zeros and with the directed rounding modes) by text similar to the one in the mpfr_get_str description (keeping the reference to mpfr_get_str). [src/out_str.c] Coding style (e is not a boolean). 2019-08-09 Vincent Lefèvre [tests/tout_str.c] Use mpfr_print_rnd_mode in a message. [tests/tout_str.c] Code simplification: a test from r1888 on a random value was unnecessary (the log message of r1888 did not even correspond to the change). [tests/tout_str.c] GNU coding style. [tests/tout_str.c] Added missing newline characters in the output after calls to mpfr_out_str. [tests/tout_str.c] By default, output the results to a file instead of /dev/null (this was already done only if opening /dev/null failed), so that they can be checked later. Fixed 2 issues at the same time: * Do not close stdout (when an argument was provided). * Remove the file at the end. [tests/tfpif.c] GNU coding style. [tests/tfpif.c] Added a comment about the use of perror. [tests/tfpif.c] Also check fclose failure when the file has been opened for writing (typically an error in case the buffer cannot be written to the file). Call perror after all fopen/src_fopen/fclose failures to get the reason of the failure. [tests/tfpif.c] In case of failure of fopen or src_fopen, write the error message on stderr (as one should do for errors not directly related to the tests, such as memory allocation and I/O errors). Also improved the error messages and made them consistent. 2019-08-06 Vincent Lefèvre [doc/mpfr.texi] Updated the month. 2019-08-05 Vincent Lefèvre [doc/mpfr.texi] Improved consistency with @item. 2019-08-02 Vincent Lefèvre For Makefile.am and each one in SUBDIRS, added the .POSIX target to select the POSIX behavior (since we do not require GNU "make"). See: https://sympa.inria.fr/sympa/arc/mpfr/2019-08/msg00005.html [tools/get_patches.sh] Fixed change in r13543 (the contents of PATCHES should still be written as a list of words separated by a space). Fixed src/get_patches.c generation that was changed in r13542. * src/Makefile.am, tools/get_patches.sh: since get_patches.sh is no longer run from $(top_srcdir), the PATCHES absolute pathname now needs to be passed in argument. * src/Makefile.am: fixed the get_patches.c rule (the automatic variable $< was used with the meaning "first prerequisite" of GNU Make; an "exit 1" was missing, so that a failure did not abort "make" immediately). * tools/get_patches.sh: detect errors with "set -e". 2019-07-31 Vincent Lefèvre [src/Makefile.am] Define get_patches.c as a built source to avoid a non-portable make rule ("/" character in target), causing an error in FreeBSD with its "make" command. This change should be OK as the get_patches.sh script that generates get_patches.c is very simple and portable. As a consequence, put get_patches.c in CLEANFILES. See: https://sympa.inria.fr/sympa/arc/mpfr/2019-07/msg00003.html [Makefile.am] Fixed dist-hook for ck-mparam, which was run from a read-only directory with "make distcheck" while a temporary file is created in the current directory, yielding a failure (ck-mparam has been run in dist-hook since r12533 on 2018-04-03). [tools/ck-mparam] Updated comment to warn that the source tree that is checked is the one that contains this script, not the one corresponding to the current working directory (the rule for the other scripts in the tools directory is currently different). [tools/ck-mparam] This script can now be run from any directory (which must still be writable). This change has been done to be able to run it from the build directory, as if it is run via "make distcheck" and a dist-hook rule, then neither the top-level directory nor the tools directory is writable. 2019-07-23 Vincent Lefèvre [tests/tget_set_d64.c] Updated comment (only the x86 and x86_64 targets are affected). [tests/tget_set_d64.c] Improved a comment. 2019-07-22 Vincent Lefèvre [tests/tget_set_d64.c] Avoid GCC bug 91226: wrong propagation of non-canonical _Decimal64 constant. [src/set_d64.c] In decimal64_to_string, log the memory representation of the _Decimal64 argument. [src/set_d64.c] In decimal64_to_string, log the various fields of the _Decimal64 argument whose memory data is regarded as a double (as this is the current implementation of this function). [tests/tget_set_d64.c] More output details in the noncanonical test. [tests/tget_set_d64.c] Improved the noncanonical test, but this does not solve the failure with gcc-snapshot. [tests/tget_set_d64.c] More meaningful name of a test with a non-canonical encoding and more details (fails with Debian's gcc-snapshot 10.0.0 20190718, trunk revision 273586). 2019-07-12 Vincent Lefèvre [doc/README.dev] "To make a release": mention -Wsuggest-attribute=... options (but mpfr.h first needs some macros like __MPFR_SENTINEL_ATTR). Renamed MPFR_CONST_ATTR macro to MPFR_CONST_FUNCTION_ATTR in order to be similar to the MPFR_{PURE,HOT,COLD}_FUNCTION_ATTR macro names. 2019-07-10 Vincent Lefèvre [doc/README.dev] Update concerning the MPFR manual: * Updated information about the papersize issues (should be fixed, but manual checking is recommended). * Detailed English typography. * Removed mention of the old texinfo bug 33329 (Debian bug 583558). 2019-07-08 Vincent Lefèvre [codespell.*] Update for codespell 1.15.0. Fixed spelling mistakes found by codespell 1.15.0. 2019-07-06 Vincent Lefèvre [acinclude.m4] Added missing "const" qualifier to "char *" in a test; needed with GCC's "-Wwrite-strings -Werror". 2019-07-02 Vincent Lefèvre [src/mpfr-impl.h] MPFR_GROUP_* macros / mpfr_group_t structure: when MPFR_GROUP_STATIC_SIZE is 0 (for testing), use a flexible array member (ISO C99) instead of a zero-length array (GNU extension, forbidden in ISO C). [tests/*.c] Added missing "const" qualifier to "char *" when this involves string literals (detected by using GCC's -Wwrite-strings option, via the default -Wdiscarded-qualifiers warning). 2019-07-01 Vincent Lefèvre [acinclude.m4,configure.ac] MPFR_C_LONG_DOUBLE_FORMAT: also detect clang's LTO. Note: no longer use $FGREP (see r13513) as its status is unclear on non-POSIX systems (though very probably available when $EGREP is). [acinclude.m4,configure.ac] For MPFR_C_LONG_DOUBLE_FORMAT, when the format is unknown and it is detected that LTO has been used, output "recognition prevented by LTO". Note: at the same time, since AC_PROG_FGREP was needed, replaced $EGREP by $FGREP when applicable. [acinclude.m4] MPFR_C_LONG_DOUBLE_FORMAT: improved comment and added a warning saying that this does not work with GCC's LTO (gcc -flto ...). 2019-06-07 Paul Zimmermann [src/sub1sp.c] simplified code of sub1sp1 for bx = cx 2019-06-06 Vincent Lefèvre [src/sub1sp.c] About r13506-13509 and optimization: added a comment about Clang after some tests (without giving details, as in practice, this is more complex... but this is the general idea). 2019-06-06 Paul Zimmermann [src/sub1sp.c] fixed typo 2019-06-06 Vincent Lefèvre [src/sub1sp.c] Added reference to GCC PR30315 about a misoptimization on x86/x86_64 (see r13506 and r13507). [src/sub1sp.c] Completed r13506: added MPFR_ASSERTD to justify the new code and give more information to the compiler; added comments about this optimization issue. 2019-06-06 Paul Zimmermann [src/sub1sp.c] small speedup (following discussion with Félix Breton) 2019-06-01 Vincent Lefèvre [doc/README.dev] Added a note about MPFR_DISABLE_IEEE_FLOATS. [doc/README.dev] Updated MPFR_DISABLE_IEEE_FLOATS description. [src/mpfr-impl.h] Undefine HAVE_LDOUBLE_IS_DOUBLE & HAVE_LDOUBLE_IEEE_* macros if MPFR_DISABLE_IEEE_FLOATS is defined, as the goal is to test code not relying on IEEE floats. 2019-05-24 Vincent Lefèvre [src/mpfr-impl.h] Code simplification with the generic LONGDOUBLE_NAN_ACTION macro (the WANT_LONGDOUBLE_VOLATILE macro is not needed as used only once, thus removed). Improved the related comment. [src] Instead of including in volatile.c (r13493), do that unconditionally in mpfr-impl.h to make sure that macro definitions in this header file are always correct: some definitions depend on various macros from , such as FLT_RADIX and DBL_MANT_DIG. 2019-05-24 Paul Zimmermann applied patch from #21762 (https://gforge.inria.fr/tracker/?func=detail&atid=619&aid=21762&group_id=136) 2019-05-15 Vincent Lefèvre [doc/README.dev] Added another URL on undefined behavior. 2019-04-30 Vincent Lefèvre [doc/README.dev] Note that -static-libasan does not work with MPFR. [doc/README.dev] Update about the use of GCC's "-fsanitize=address". 2019-04-30 Paul Zimmermann [src/zeta.c] fixed out-of-bound read reported by Thomas Bailleux Note: This bug was introduced in r12066. 2019-04-29 Vincent Lefèvre [tools/ck-version-info] Minor corrections in a comment. [doc/README.dev] Update about the VERSION file: * Added a paragraph on the meaning of the "-dev" suffix. * Removed a confusing and useless "-dev" in an example. [tools/ck-news] Changed the condition of the test for FIXME or TODO: Previously it was disabled only for -dev versions. Now it is enabled only for releases and release candidates. This will allow snapshots, for which the NEWS file may still contain a FIXME or TODO. [tools/ck-version-info] Corrected check. Added explanations in comments. [tools/ck-version-info] Better error message if $vinfo is not defined. [src/Makefile.am] Added a comment. 2019-04-25 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Updated the list of rounding modes in the description of the mpfr_print_rnd_mode function. Choose the same order as in the "Rounding Modes" section in "MPFR Basics". [tools/mpfrlint] Lists of rounding modes: also check with the "Rounding Modes" section in "MPFR Basics". [src/print_rnd_mode.c] Added a comment to remember to update the manual. [tools/mpfrlint] Check that the lists of rounding modes in src/print_rnd_mode.c and doc/mpfr.texi are identical. [src/mpfr.h] Added a blank line (grouping of function declarations). Added support for GCC's returns_nonnull attribute (with GCC 4.9+). [TODO] Update about GCC's nonnull and returns_nonnull attributes. 2019-04-16 Vincent Lefèvre New macro MPFR_FALLTHROUGH to avoid -Wimplicit-fallthrough warnings with GCC 7+. This macro also makes the code more readable by bringing the attention on an unusual fallthrough in a switch case. * src/mpfr-impl.h: define this macro. * src/vasprintf.c: use this macro in a case of fallthrough. 2019-04-15 Vincent Lefèvre [src/vasprintf.c] Minor bug fix: when an integer is to be read for the field width or precision, regard strings like "17*" as invalid instead of regarding it as "*" (ignoring the integer that precedes, except in case of overflow). In C's printf, such an invalid string yields undefined behavior, but in MPFR, we normally print the invalid format specifier as a literal string in such a case. Bug detected with -Wimplicit-fallthrough from GCC 7+. [tests/tsprintf.c] Added non-regression test. 2019-04-02 Vincent Lefèvre [configure.ac] Updated --enable-logging description. [acinclude.m4] When logging support is requested, run a test to check that code with nested functions and the 'cleanup' attribute can be compiled, as these features are needed. [configure.ac] AC_ARG_ENABLE(float128,...): updated comment and description. [configure.ac] Updated comment for AC_ARG_ENABLE(decimal-float,...). * Removed information about very old GCC versions. * _Decimal128 is considered too, in addition to _Decimal64. * No longer just a GCC extension, but part of ISO/IEC TS 18661. * Added a FIXME for new options about _Decimal64 and _Decimal128. [configure.ac] Cleanup: moved some AC_ARG_ENABLE's where they should be. 2019-03-29 Vincent Lefèvre [src/vasprintf.c] * Corrected FIXME by modifying the assertion. The failure could occur only when mpfr_intmax_t has the same size as int (which is the case when long = int and either intmax_t and long long are not available or intmax_t = long = int), and only when INT_MIN is provided as a field width argument. * Related to that, updated a test to improve optimization. * Added comments. [src/vasprintf.c] Added a FIXME: tsprintf yields an assertion failure with sizeof(mpfr_intmax_t) = 4 (which was not tested until now). 2019-03-29 Vincent Lefèvre Cleanup / fixes related to intmax_t, mpfr_intmax_t, etc. The issues were: * The build of the tests (make check) could fail with CFLAGS implying "-std=c90 -Werror=format", i.e. if intmax_t was available but the use of the "j" printf length modifier made the compilation fail (its unconditional use was incorrect anyway). * MPFR_INTMAX_MAX had definitions in both mpfr-impl.h & mpfr-intmax.h, with inconsistent usage. Detailed changes: * acinclude.m4: removed the definition of MPFR_PRINTF_MAXLM, which could be incorrect (large numbers were not tested to select its value); in the MPFR_FUNC_GMP_PRINTF_SPEC macro, check sprintf() in addition to gmp_sprintf() as it is now also used in the tests; updated some comments and messages. * src/mpfr-impl.h: removed the MPFR_*INTMAX* definitions; they had been added due to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582698 with -ansi -pedantic-errors, but this issue was fixed in GCC 4.8 (released 6 years ago), so that they are no longer needed. * src/mpfr-intmax.h: completed the definitions; mpfr_intmax_t is now the largest integer type available and fully working (in particular with printf), thus it may be smaller than intmax_t. * doc/README.dev: updated the description of mpfr_intmax_t, etc. * tests/tversion.c: output sizeof(mpfr_intmax_t) too. * Various .c files in src and tests related to (u)intmax_t: use INTMAX_MAX instead of MPFR_INTMAX_MAX, etc. as Debian bug 582698 (mentioned above) no longer occurs and mpfr_intmax_t may be smaller than intmax_t; use the "j" printf length modifier instead of MPFR_PRINTF_MAXLM, and protect it with "#ifndef NPRINTF_J" (only the tests are concerned, so that this is not an issue). 2019-03-28 Vincent Lefèvre [src/urandomb.c] Removed the FIXME: this is a bug in GMP or in Clang's memory sanitizer. [src/urandomb.c] Added a FIXME (use-of-uninitialized-value with Clang's memory sanitizer). 2019-03-13 Vincent Lefèvre [src/printf.c] Removed unused definitions. 2019-03-01 Vincent Lefèvre [doc/README.dev] Update about coverage: * Mention not to enable optimizations. * Replaced "-fprofile-arcs -ftest-coverage" by "--coverage", as this is what is used by the tools/coverage script (note: this is a synonym when compiling, but also allows the right options to be used when linking, thus might be better in doubt). 2019-02-04 Vincent Lefèvre [tests] Use MPFR_DBL_* macros when necessary. [tools/mpfrlint] For consistency, use "[ch]" instead of "{c,h}". [tools/mpfrlint] Detect use of DBL_* macros instead of MPFR_DBL_* ones. [tools/mpfrlint] Improved message about division by zero. [doc/README.dev] Improved description of MPFR_ERRDIVZERO. [tools/mpfrlint] Added a comment about division by zero. [tools/mpfrlint] Check that native FP division by zero is not used. 2019-01-31 Vincent Lefèvre [src/Makefile.am] In check-exported-symbols, replaced grep by $(GREP) as usual and like in check-gmp-symbols. 2019-01-30 Vincent Lefèvre [configure.ac] Updated comment about default options in CFLAGS for GCC. Update about CC / CFLAGS settings from GMP (__GMP_CC / __GMP_CFLAGS). * configure.ac: remove -pedantic unconditionally; since r7044, it was removed only when logging was enabled, as at that time only logging was using C extensions. * NEWS: added a line about this change. * INSTALL: updated the note about CC / CFLAGS, removing the obsolete reference to GMP 4.3.0 at the same time. 2019-01-28 Vincent Lefèvre [tools/announce-text] Corrected subject for Release Candidate > 1. 2019-01-25 Vincent Lefèvre ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". [NEWS] Update about shared caches. [NEWS] Added: "Shared caches: cleanup." [src/mpfr-thread.h] Fixed the lock macros: * in case of failure, one must abort, otherwise this would generally be undefined behavior; * added missing "do {} while (0)" (currently not mandatory). [src/mpfr-impl.h] Updated a comment about MPFR_DECL_INIT_CACHE and the shared cache. [acinclude.m4] Avoid a warning with the pthread_rwlock_t test, as it is an error with -Werror. [acinclude.m4] Fixed another C++ compatibility issue detected by the -Werror=c++-compat GCC option (it led the "long double" format to be unknown). 2019-01-24 Vincent Lefèvre [tests/trint.c] Fixed C++ compatibility issue (arithmetic on enum) detected by the -Werror=c++-compat GCC option. 2019-01-23 Vincent Lefèvre [configure.ac] By default (i.e. if CFLAGS is not already set), if the compiler is GCC not in C++ mode, add the -Wc++-compat warning since we expect the code to compile with a C++ compiler. 2019-01-13 Vincent Lefèvre [tests/tcheck.c] Corrected meaningless error message. [doc/mpfr.texi] Minor correction for non-tex versions. Thanks to Trevor Spiteri for the bug report. 2019-01-09 Vincent Lefèvre Moved the compatibility test of the configure options even earlier, from acinclude.m4 to configure.ac, just after the code that defines them. Also added an associated AC_MSG_CHECKING message for better clarity. [acinclude.m4] Simplified a message. [tests/tversion.c] When the shared cache is enabled, also output the lock method (this information has been lost in r13032). [acinclude.m4] When checking support for POSIX threads (pthread), also check that pthread_rwlock_t is supported, as it is needed by MPFR and conditionally defined in glibc's bits/pthreadtypes.h (via ). Cleaned up configure code related to threading and the shared cache. * acinclude.m4: - detect incompatibilities between configure options at the beginning of MPFR_CONFIGS, forcing enable_thread_safe to "no" or "yes" when necessary, so that the subsequent code can rely on that; - check ISO C11 thread support and/or POSIX thread support only when necessary; - handle --enable-shared-cache early in MPFR_CONFIGS, because the use of POSIX threads (pthread) may need to change CC, CFLAGS, and LIBS (thus affecting other tests); - test $enable_shared_cache instead of $mpfr_want_shared_cache; - removed the now useless MPFR_CHECK_SHARED_CACHE function. * configure.ac: no longer set the mpfr_want_shared_cache variable, as enable_shared_cache (now used) already has the same usage. Note: currently, ./configure --enable-shared-cache CFLAGS="-std=c99" still succeeds and still makes the compilation fail. This seems to be due to a limitation of AX_PTHREAD, which just tests linking, not compilation. [acinclude.m4] In MPFR_CHECK_SHARED_CACHE (used when the shared cache was requested), also set CC="$PTHREAD_CC" as documented by ax_pthread (autoconf-archive). This is not guaranteed to work, but according to the ax_pthread.m4 source, in the cases where "$PTHREAD_CC" != "$CC", not setting it will probably not work either. [src/mpfr-impl.h] Added a comment about the cache-related types, which depend on the locking methods. 2019-01-08 Vincent Lefèvre [tests/tstrtofr.c] Updated comment about GCC bug 86554: now fixed in the GCC trunk. 2019-01-07 Vincent Lefèvre [tests/Makefile.am] Replaced "env -u DISPLAY" by "env DISPLAY=''" as the -u option is not supported by NetBSD. Updated files: * COPYING from https://www.gnu.org/licenses/gpl-3.0.txt * COPYING.LESSER from https://www.gnu.org/licenses/lgpl-3.0.txt These are URL updates and cosmetic changes. ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC0 svn log -rHEAD:0 -v". Note: For r5400, this changes an incorrect update done via r13372 back to the old log message, as the URL in this log message here describes a change in one of the files. [doc/README.dev] Updated some URL's (http → https). [doc/texinfo.tex] Update to 2018-02-12.17 with "autoreconf -i -f". Updated the www.gnu.org URL's (http → https) on all the files with: perl -pi -e 's,http://www.gnu.org/,https://www.gnu.org/,g' **/*(.) under zsh. [tests/tstrtofr.c] Updated comment about GCC bug 86554: the MPFR build is still affected with the latest gcc-snapshot version (20190102-1) when using --with-gmp-build=... together with --enable-assert. 2019-01-04 Vincent Lefèvre [tests/tstrtofr.c] Added a comment about GCC bug 86554: the MPFR build seems no longer affected by recent gcc-snapshot versions. 2019-01-01 Vincent Lefèvre [doc/mpfr.texi] Updated the month. Copyright notice update: added 2019 with perl -pi -e 's/ (\d{4}-)?(2018)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2018 from the example in the doc/README.dev file. 2018-12-31 Vincent Lefèvre [tests/tfmma.c] Added double_rounding test to trigger errors before the fix in mpfr_set_1_2 (set.c r13347). [src/set.c] In mpfr_set_1_2, evaluate MPFR_PREC(s) just once. [src/set.c] Clarified the mpfr_set_1_2 description. [src/set.c] For mpfr_set_1_2, corrected the comments and simplified the generic algorithm (there is no need to distinguish the rounding modes, except for the double-rounding test, and this simplification avoids the non-portable inex | inex2). 2018-12-20 Vincent Lefèvre [doc/mini-gmp] Removed "#define GMP_LIMB_BITS 8": it is not used by mini-gmp.h and yields a failure when building mini-gmp.c (which has its own definition of GMP_LIMB_BITS, equivalent but not identical). [configure.ac] Support mini-gmp with reduced limb size, in the case GMP_NUMB_BITS is not defined: guess GMP_NUMB_BITS from the size of mp_limb_t instead of the size of unsigned long. [doc/mini-gmp] Correction to avoid a "conflicting types for 'mp_limb_t'" error. 2018-12-14 Paul Zimmermann [doc/mini-gmp] added note about using mini-gmp (development version) with reduced limb size [src/set.c] fixed double-rounding bug in mpfr_set_1_2 [tests/tset.c] added corresponding tests [tests/tset.c] added a test of test_set_1_2(), which currently fails [tests/tcan_round.c] disabled tests that don't agree with mpfr_can_round documentation 2018-12-13 Vincent Lefèvre [tests/tsprintf.c] Updated a comment about ISO C vs POSIX for snprintf. [tests/tsprintf.c] Updated a comment about ISO C vs POSIX for snprintf. [TODO] Added item: new functions mpfr_cmp_uj and mpfr_cmp_sj. [TODO] Removed obsolete "check again coverage" from 2007. 2018-12-13 Paul Zimmermann [src/sqr.c] fixed same issue as in r13338 and r13339 [src/mul.c] fixed bug in mpfr_mul() when sizeof(mp_limb_t) < sizeof(mpfr_exp_t) (same issue as in r13338) 2018-12-12 Vincent Lefèvre [src/mul.c] For MPFR_WANT_ASSERT >= 2: minor changes in the code; corrected a comment (even with mp_limb_t >= mpfr_exp_t, there was an issue: the expression b1 - 1 + cc was computed in unsigned arithmetic, then converted to mpfr_exp_t, with an implementation-defined result when -1 was expected, i.e. with b1 = cc = 0). [src/mul.c] Corrected a typo in a comment. [src/mul.c] Fixed error message with MPFR_WANT_ASSERT >= 2. 2018-12-11 Vincent Lefèvre [src/mpfr-gmp.h] For count_leading_zeros (MPFR_LONG_WITHIN_LIMB not defined), no longer assume GMP_NUMB_BITS <= 32. [src/mpfr-gmp.h] Fixed count_leading_zeros (avoid undefined behavior on shift counts, which must be nonnegative and smaller than the width of the type of the shifted value). 2018-12-11 Paul Zimmermann [src/mul.c] fixed reference routine mpfr_mul3() when sizeof(limb) < sizeof(exp) [src/mpfr-gmp.h] fixed count_leading_zeros for mini-gmp with 32-bit limb 2018-12-10 Paul Zimmermann [doc/mini-gmp] added remark about random functions [tests/tdiv.c] fixed test_20151023 (was giving an error with micro-gmp-8 and GMP_CHECK_RANDOMIZE=1544431052619574) 2018-12-10 Vincent Lefèvre [tools/mpfrlint] Added a test for some avoidable use of gmp_printf. 2018-12-07 Vincent Lefèvre [tests] * mpfr-test.h, tests.c: added n_trace function to output a mpn. * tcan_round.c: use n_trace instead of gmp_printf ("%NX\n",...), which is not available with mini-gmp. 2018-12-06 Vincent Lefèvre [tests/tcan_round.c] Corrected all the error messages for mini-gmp. [tests/tcan_round.c] Corrected error message for mini-gmp. 2018-12-05 Vincent Lefèvre [tests/tpow_z.c] Another fix and minor improvements. [tests/tpow_z.c] Fixed a test (midpoint case) that was failing with micro-gmp-8 and GMP_CHECK_RANDOMIZE=1544033327230569. [tests/tpow_z.c] Fixed a test for MPFR_RNDF: do not check the ternary value (a failure was occurring with --with-mini-gmp=.../micro-gmp/8 and GMP_CHECK_RANDOMIZE=1544025040809270). [tests/tpow_z.c] Improved error message. [src/mpfr-mini-gmp.c] Added missing "void" in function prototype. [configure.ac] When building against mini-gmp, check the availability of lrand48, in particular because it is not part of the ISO C standard. 2018-12-05 Paul Zimmermann [src/mpfr-mini-gmp.c] put back unconditional assert from r13316 (removed by error) [src/mpfr-mini-gmp.c] improved random_limb (the low bits of lrand48 are bad) and fixed gmp_urandomm_ui 2018-12-05 Vincent Lefèvre [src/mpfr-mini-gmp.c] gmp_urandomm_ui: added a MPFR_ASSERTN unconditionally, as n == 0 is always forbidden. 2018-12-05 Paul Zimmermann [src/mpfr-mini-gmp.c] the static assert introduced in r13313 makes the compilation fail for 8-bit limbs, while the code was valid for n <= 256 in that case 2018-12-04 Vincent Lefèvre [src/mpfr-mini-gmp.c] Fixed types. [src/mpfr-mini-gmp.c] Added a static assertion to make sure that the MPFR_ASSERTD added in r13312 is valid. 2018-12-04 Paul Zimmermann [src/mpfr-mini-gmp.c] gmp_urandomm_ui did not generate uniform values 2018-12-03 Vincent Lefèvre [src/set_d.c] Improved comment. 2018-11-29 Vincent Lefèvre [tests/Makefile.am] About r13308, added references to the bugs. [tests/Makefile.am] Unset DISPLAY as it is not needed and it can yield error messages when running the tests with LOG_COMPILER=wine (for builds with MinGW). [tests/tversion.c] Updated a comment about an output issue with MinGW, with the test run under Wine (which is really the cause of the issue). 2018-11-28 Vincent Lefèvre [tests/tstrtofr.c] In case of failure of some particular test, output the probable cause of this failure (GCC bug 86554) with a workaround. 2018-11-27 Vincent Lefèvre [tests/tversion.c] Updated a comment about a printf issue with MinGW. [src/strtofr.c] Added a FIXME about the error analysis (info that was part of the FIXME resolved in r13303 and inadvertently dropped). [src/strtofr.c] Resolved a FIXME; tstrtofr no longer fails due to bug20181127 with 8-bit limbs (micro-gmp/8). [tests/tstrtofr.c] Added bug20181127 (test found with random_tests), which fails with 8-bit limbs (micro-gmp/8). [src/mpfr-impl.h] Added a comment with a warning concerning the meaning of MPFR_EXP_FSPEC. [tests/tstrtofr.c] Fixed a MPFR_EXP_FSPEC related bug in a test for _MPFR_EXP_FORMAT <= 2, e.g. with -D_MPFR_PREC_FORMAT=2. [tests/tdiv.c] Fixed bad format string for an error message, detected with -D_MPFR_PREC_FORMAT=2 (using -Werror...). 2018-11-26 Vincent Lefèvre [tests] Moved bug20180908() from tget_str.c to tset_str.c since it tests mpfr_set_str() only. This test was introduced in r13164. 2018-11-23 Vincent Lefèvre [TODO] + More UBF functions. [doc/mpfr.texi] Updated the month. [src/strtofr.c] Changed some unsigned long to unsigned int. [src/strtofr.c] Some cleanup in parsed_string_to_mpfr. Avoid a potential integer overflow in very high precision if mp_size_t < mpfr_prec_t. 2018-11-22 Vincent Lefèvre [src/strtofr.c] Updated FIXME, due to new tests added to tests/tstrtofr.c in r13278-13279,13286-13288. [src/nbits_ulong.c] Added missing initialization from r13269 when MPFR_LONG_WITHIN_LIMB is not defined. [tests/tstrtofr.c] Resolved the FIXME and fixed the issue related to the old mpfr_get_str description (see r13283). Note: with the later fix r13289, a test still fails with 8-bit limbs (incorrect exponent, possibly corresponding to the FIXME just before "exp = GMP_NUMB_BITS - count;" in src/strtofr.c). [tests/tstrtofr.c] Added comments, including a FIXME. [tests/tstrtofr.c] Resolved the FIXME for the random tests, and increased the number of tests to trigger a failure. MPFR manual: corrected/completed the mpfr_get_str description in order to follow the historical behavior and GMP's mpf_get_str function. (Discussion in the Trier meeting.) [src/get_str.c] Code style. [doc/README.dev] Update about issues with mixing signed/unsigned types. [doc/README.dev] Added a note about the disallowed conversions between function pointers and other kinds of pointers (including to void *). 2018-11-20 Vincent Lefèvre [tests/tstrtofr.c] Added a FIXME, which explains the current failure. But there is currently an inconsistency in mpfr_get_str, whose digits are not specified: https://sympa.inria.fr/sympa/arc/mpfr/2018-11/msg00021.html [tests/tstrtofr.c] Added random tests, which currently fail. 2018-11-19 Vincent Lefèvre [src/round_prec.c] mpfr_can_round_raw: improved the code structure about rnd1 and rnd2, making clear that they are not changed several times; avoid the use of cc with 2 different meanings in the same code path. 2018-11-17 Paul Zimmermann [src/round_prec.c] fixed bug in mpfr_can_round when rnd2=RNDF, rnd1 is a directed rounding, and the input is exact 2018-11-16 Vincent Lefèvre [src/strtofr.c] parsed_string_to_mpfr: updated a FIXME comment. In short, the current tstrtofr.c tests seem to always be hard-to-round cases. The consequence is that some parts of the code are run, but not completely tested, because for these cases, some intermediate results, potentially incorrect, are thrown out due to the next Ziv iteration! [src/strtofr.c] parsed_string_to_mpfr: minor changes. [src/strtofr.c] parsed_string_to_mpfr: added log messages. [src/strtofr.c] Minor change to use MPFR_ASSERTD. [src/{int_ceil_log2.c,mpfr-impl.h}] Consistent postcondition for MPFR_INT_CEIL_LOG2 and __gmpfr_int_ceil_log2 (result >= 0). [src/nbits_ulong.c] Code refactoring. Added {pre,post}condition. [src/strtofr.c] parsed_string_to_mpfr: removed an incorrect cast. [src/strtofr.c] parsed_string_to_mpfr: updated a FIXME comment (again, another issue). [src/strtofr.c] parsed_string_to_mpfr: updated a FIXME comment (there is another issue to solve first). Removed trailing whitespace. [src/strtofr.c] parsed_string_to_mpfr: updated a comment (useless code in this function or incomplete tests). Avoid GCC's -Wcast-align warnings with 8-bit limbs (a correct alignment is ensured by the code itself, and GCC cannot check just from a cast). [src/strtofr.c] parsed_string_to_mpfr: updated comments. 2018-11-15 Vincent Lefèvre [src/strtofr.c] parsed_string_to_mpfr: more code review, with minor changes and corrections + a FIXME. [src/strtofr.c] Typo. [src/strtofr.c] Fixed an allocation bug for GMP_NUMB_BITS = 8. [src/strtofr.c] Updated a comment: the issue with mpn_set_str found in 2013-12 (see r8722) was actually an error in the GMP manual. [src/strtofr.c] parsed_string_to_mpfr: improved an assertion; comments. 2018-11-15 Paul Zimmermann [tests/tcan_round.c] fixed some TODOs, which exposes a bug 2018-11-15 Vincent Lefèvre [src/strtofr.c] Near the beginning of parsed_string_to_mpfr: corrected comments; added an assertion; minor change of a test. 2018-11-10 Paul Zimmermann [src/mulders.c] fixed issue with --enable-gmp-internals [tune/tuneup.c] likewise (see https://sympa.inria.fr/sympa/arc/mpfr/2018-11/msg00015.html) 2018-10-18 Paul Zimmermann [src/mpfr-longlong.h] applied patch from https://sympa.inria.fr/sympa/arc/mpfr/2018-10/msg00010.html 2018-10-07 Vincent Lefèvre [codespell.ignore] Also ignore "ue" (codespell 1.14). 2018-10-01 Vincent Lefèvre [configure.ac,src/Makefile.am] About the --with-mini-gmp support, since there are some advantages with the new code, one will probably not go back. Thus removed the references to the Automake 1.15 bug and to the old code. Also removed the mini_gmp_path=. workaround needed with the old code (even with Automake 1.16), which had been added in r13217. Also slightly improved the setup for mini-gmp. [doc/with-mini-gmp.patch] Updated comment. [configure.ac,src/Makefile.am] Avoid a "make" failure due to a bug in Automake 1.15 automatic dependency tracking: instead of using mini-gmp directly in an external directory with a $(mini_gmp_path) variable in src/Makefile.am, make the configure script add symbolic links to the mini-gmp sources in the build directory, and use these symbolic links for the MPFR build (as if they were plain files). Tested under various conditions: static and shared; separate source and build directories; changing the mini-gmp version without "make clean". 2018-09-28 Vincent Lefèvre Added doc/with-mini-gmp.patch file (for the developers): Modifications to configure.ac and src/Makefile.am that had been done for --with-mini-gmp support. This is kept for the reference, as changes may be needed as a workaround to a bug fixed in GNU Automake 1.16, and other future changes might break things (to remember what was working at this time). 2018-09-20 Vincent Lefèvre [doc/mini-gmp] Update. 2018-09-19 Vincent Lefèvre [Makefile.am] Distribute the doc/mini-gmp file. [configure.ac] For --with-mini-gmp, say: "(experimental, please read doc/mini-gmp file)" [src/Makefile.am] Added nodist_ for mini-gmp.{c,h} so that these files (not part of MPFR) are not put in the tarballs by "make dist". Removed --enable-mini-gmp configure option. * NEWS: say that it is replaced by --with-mini-gmp. * configure.ac: --enable-mini-gmp removed. * doc/mini-gmp: update. [src/mpfr-mini-gmp.c] Missing #else (from r13156). [configure.ac] When using --with-mini-gmp, define GMP_NUMB_BITS if this macro is not already defined in mini-gmp.h (this is done a bit like with --enable-mini-gmp, but the handling in this option is buggy as GMP_NUMB_BITS is defined with AC_DEFINE_UNQUOTED unconditionally, though is most cases the contents of the macros are the same). [configure.ac] Do not split "Setup GMP detection". When building MPFR against mini-gmp, do not run any "Setup GMP detection" test (in particular, no longer check gmp.h, as it is useless). [src/mpfr-mini-gmp.h] Removed incorrect GMP_NUMB_BITS macro definition, and this macro needs to be usable in preprocessor tests, and sizeof and types are not available at this level. GMP_NUMB_BITS must be defined by mini-gmp.h, by the configure script, or by the user. [tools/mpfrlint] Update due to r13221. 2018-09-18 Vincent Lefèvre [tests/Makefile.am] Run tversion at the beginning of the tests, then show its output and svnversion's output too. [src/mpfr-mini-gmp.h] Added a FIXME (failure with a mini-gmp that does not define GMP_NUMB_BITS, such as the official one). [tests/random2.c] Avoid undefined behavior on shift count. [src/mpfr-impl.h] Fixed MPFR_LIMB_MASK() macro. [configure.ac] Avoid a configure failure with automatic dependency tracking when --with-mini-gmp is not used (bug in Automake?). [NEWS] + Mini-gmp support via the --with-mini-gmp configure option. 2018-09-17 Vincent Lefèvre Merged the with-mini-gmp branch into the trunk: new --with-mini-gmp configure option to build MPFR against mini-gmp (instead of GMP). [doc/mini-gmp] Update. Merged the latest changes from the trunk. [src/mul_ui.c] Better code organization (with the MPFR_RET at the right place). Corrected indentation after #else. 2018-09-17 Paul Zimmermann [src/mpfr-mini-gmp.c] added #if 0 ... #endif for mpz_dump (unused) [src/mul_ui.c] fixed compiler warning for limb < long 2018-09-17 Vincent Lefèvre [src/Makefile.am] Update for mini-gmp (install mini-gmp.h). Merged the latest changes from the trunk (bug fix for 8-bit limb). [tests/random2.c] Fix for 8-bit limb. Merged the latest changes from the trunk. [tests/tests.c] Define only one buffer in test_version(). [tests/random2.c] Improved code by using MPFR_LIMB_* macros. [src/mpfr-impl.h] Improved MPFR_LIMB_* macros for mp_limb_t < int (e.g. 16-bit or 8-bit limb), as in such a case, integer promotion transforms mp_limb_t to int. 2018-09-17 Paul Zimmermann [tests/tests.c] fixed compiler warning 2018-09-14 Vincent Lefèvre Merged the latest changes from the trunk (bug fixes). [src/get_si.c] Code refactoring/simplification like what has been done for get_ui.c in r13185, fixing also an integer overflow when MPFR_LONG_WITHIN_LIMB is not defined. [tests/random2.c] Fix for 16-bit limb. [src/add1.c] Fix for 16-bit limb. [src/mpfr-gmp.h] Fixed bug in add_ssaaaa / sub_ddmmss from r13081. Completed --with-mini-gmp support (not fully tested). Merged the latest changes from the trunk. [src/Makefile.am] Moved a comment in a better place. [configure.ac] Define MINI_GMP Automake conditional (AM_CONDITIONAL). 2018-09-14 Vincent Lefèvre Started to implement --with-mini-gmp (building mini-gmp and linking not correctly handled yet, thus "make check" failure is expected). [Added during the Subversion to Git conversion] This commit includes a merge of r13191 from the trunk. 2018-09-14 Vincent Lefèvre [configure.ac] Typo. [configure.ac] Updated comments about configure options for mini-gmp. 2018-09-13 Paul Zimmermann [tests/tsin.c] reduce REDUCE_EMAX with mini-gmp 2018-09-13 Vincent Lefèvre [src/get_ui.c] Added assertions. [src/get_ui.c] Code refactoring/simplification. [src/sin_cos.c] Added assertions protecting against buffer overflow. 2018-09-13 Paul Zimmermann [src/sin_cos.c] fix for small limb size 2018-09-12 Vincent Lefèvre [src/mpfr-mini-gmp.h] Fix: Since gmp_version is not defined in mini-gmp, we must not declare it (otherwise one would get a link failure instead of a compilation failure if gmp_version is used by mistake). [tests/tests.c] Improved change in r13179 for mini-gmp. [configure.ac] Do not check for CC and CFLAGS in gmp.h if mini-gmp is used, i.e. if --enable-mini-gmp (current option) or --with-mini-gmp (future option) is given. 2018-09-12 Paul Zimmermann [tests/tests.c] libgmp is not defined with mini-gmp (issue found with -O0) 2018-09-12 Vincent Lefèvre [src/mpfr-mini-gmp.h] Removed #include lines as mpfr-mini-gmp.h is included only in mpfr-impl.h, which already does these #include's. [src/mpfr-impl.h] Check that MPFR_HAVE_GMP_IMPL and MPFR_USE_MINI_GMP are not both defined. [src/mpfr-mini-gmp.c] Removed #include "mpfr-mini-gmp.h" as this include is already done in mpfr-impl.h (in both cases, when MPFR_USE_MINI_GMP is defined). [src/rec_sqrt.c] Replaced "if (GMP_NUMB_BITS >= 16)" by a preprocessor test "#if GMP_NUMB_BITS >= 16" like earlier. Use static assertions. [src/rec_sqrt.c] Fixed types for 8-bit limb. Removed useless casts. [src/rec_sqrt.c] Fixed a type from r13172 (int was obviously too short and was yielding a segmentation fault). 2018-09-11 Paul Zimmermann [src/rec_sqrt.c] fixed for 8-bit limb [tests/tcan_round.c] fixed test for small value of GMP_NUMB_BITS [src/strtofr.c] fixed r13168: in case exact=0, mpn_rshift was not done [tests/tsqrt.c] modified test_sqrt1n() so that it passes with 8-bit limbs 2018-09-11 Vincent Lefèvre [src/strtofr.c] Replaced "exact &=" by "exact = exact &&" as usual. 2018-09-11 Paul Zimmermann [src/strtofr.c] fix for 8-bit limb [src/strtofr.c] added comment 2018-09-10 Vincent Lefèvre [doc/mpfr.texi] Updated the month. 2018-09-10 Paul Zimmermann [src/strtofr.c] fix from r13163 was incorrect [tests/tget_str.c] added a testcase, and fixed an error message 2018-09-08 Paul Zimmermann [src/strtofr.c] resolved a FIXME [tests/tdiv_ui.c] fixed corner_cases() test [src/int_ceil_log2.c] fixed __gmpfr_int_ceil_log2 for limb < long 2018-09-07 Paul Zimmermann [tests/random2.c] fixed mpfr_random2 for GMP_NUMB_BITS <> 64 [src/mpfr-mini-gmp.c] fixed another compiler warning [src/get_ui.c] fixed compiler warning some fixes for 8-bit limb support adapt to 8-bit limbs (work in progress) [tests/tl2b.c] extend to 8-bit limb [src/mpfr-gmp.h] fix for 8-bit limb 2018-09-07 Vincent Lefèvre [doc/mpfr.texi] Added @tie{} (normal non-breakable space) at various places to avoid unwanted line breaking. [doc/mpfr.texi] mpfr_rootn_ui, mpfr_root: changed k to n in order to match IEEE 754-2008. Also improved the description of mpfr_rootn_ui, mentioning the P754/D2.41 draft of the next IEEE 754 standard because IEEE 754-2008 is incomplete. 2018-09-06 Vincent Lefèvre [tests/tdiv.c] !mpfr_equal_p is better than mpfr_cmp. 2018-09-06 Paul Zimmermann [src/rint.c] fixed bug with 16-bit limb (found by trint with GMP_CHECK_RANDOMIZE=1536206745598891) [tests/tdiv.c] fixed test_20151023() 2018-09-06 Vincent Lefèvre Removed trailing whitespace. [src/get_ld.c] Removed incorrect and useless assertions (manl has exactly 32 bits, thus a shift count of 32 bits is invalid, but also useless). 2018-09-05 Paul Zimmermann [src/get_ld.c] fixed (hopefully definitively) for 16-bit limb 2018-09-05 Vincent Lefèvre [src/set_d64.c] 2 fixes concerning rp[]: * If GMP_NUMB_BITS >= 64, there is a shift of 32 bits, thus one uses mp_limb_t (> 32 bits) instead of unsigned int. * Otherwise use unsigned long as an unsigned int might be on 16 bits. [src/mpfr-impl.h] Indentation. [src] Moved mpfr_nbits_ulong to its own file "nbits_ulong.c". [src/pow_si.c] MPFR_NEED_LONGLONG_H is still needed. [tests/tget_set_d64.c] Removed xxx suffix added in r13139 (by mistake?). 2018-09-05 Paul Zimmermann [src/exp_2.c] export (internally) nbits_ulong (renamed to mpfr_nbits_ulong) [src/mpfr-impl.h] added prototype for mpfr_nbits_ulong [src/pow_si.c] fixed for 16-bit limb [src/get_d64.c] fixed for 16-bit limb [src/set_d64.c] likewise [tests/tget_set_d64.c] improved error message 2018-09-05 Vincent Lefèvre [src/get_ld.c] In the case GMP_NUMB_BITS == 16, cast to unsigned long instead of unsigned int since shift counts can be up to 16 and an int might be on 16 bits only. 2018-09-05 Paul Zimmermann [src/get_ld.c] when denorm=16, a 32-bit shift on an unsigned int is undefined [src/exp_2.c] fix for 16-bit limb [tests/texp.c] improve error message [src/mpfr-mini-gmp.c] fixed gmp_urandomb_ui for 16-bit limb, added mpz_dump [tests/terandom_chisq.c] more details in case of error [src/random_deviate.c] fixed typo 2018-09-04 Vincent Lefèvre [tests/tset_z_exp.c] Avoid a GCC bug. [tests/tset_z_exp.c] Attempt to fix randexp, but GCC complains. [src/mpn_exp.c] Avoid useless "while" in nbits_mpfr_exp_t. 2018-09-04 Paul Zimmermann [tests/tset_ld.c] give more digits in case of error [tests/tget_ld_2exp.c] added one test (currently fails for 16-bit limb) [src/set_ld.c] partial fix for 16-bit limb (typo + nice bug!) [tests/tset_z_exp.c] fixed infinite loop in test code for limb < mpfr_exp_t [src/mpn_exp.c] adapt to bitsize(mpfr_exp_t) > GMP_NUMB_BITS 2018-09-04 Vincent Lefèvre [src/div.c] Code simplification. [src/round_prec.c] MPFR_LIMB is actually useless now... [src/round_prec.c] Code style and potential correction for 16-bit limb. [src/sqrt_ui.c] Moved MPFR_SAVE_EXPO_FREE after mpfr_sqrt because the uu argument may be out of range and there is no guarantee that mpfr_sqrt can handle that. Improved consistency; code refactoring. 2018-09-04 Paul Zimmermann [src/round_prec.c] fixed for 16-bit limb [tests/tcan_round.c] improve error message [src/sqrt_ui.c] fixed for 16-bit limb 2018-09-04 Vincent Lefèvre [src/get_si.c] Make sure that a left shift is done on an unsigned type (as a left shift on a 0 of signed type was not specified by C90). 2018-09-04 Paul Zimmermann [src/div.c] fix for 16-bit limbs, and added comments [src/rint.c] fix for 16-bit limb [tests/tdiv.c] more detailed error message [src/get_si.c] forgot cast when long > limb [src/get_ui.c] forgot cast when long > limb 2018-09-03 Paul Zimmermann [src/odd_p.c] fix for 16-bit limb [tests/tbeta.c] exit at the first error [src/get_si.c] adapt to 16-bit limbs [src/get_ui.c] likewise [src/cmp_si.c] adapt for reduced exponent range for 16-bit limbs [src/cmp_ui.c] likewise 2018-09-03 Vincent Lefèvre [tests/mpfr-test.h] If MPFR_TESTS_ABORT is defined, replace exit(1) by abort(), thus with a core dump. [doc/README.dev] Document MPFR_TESTS_ABORT. 2018-09-03 Paul Zimmermann [tests/tgeneric.c] revert 13107 (abort might lose some data in open files) [src/mul_ui.c] fixed for 16-bit limb and reduced exponent range [tests/tgeneric.c] replace exit(1) by abort() to allow debugging with gdb [src/isinteger.c] fix for 16-bit limb [src/cmp_si.c] fixed error for 16-bit limb [src/cmp_ui.c] adapted to 16-bit limb 2018-09-01 Paul Zimmermann [src/cmp_si.c] adapt for 16-bit limb 2018-08-31 Paul Zimmermann [src/mul_ui.c] adapt for 16-bit limb 2018-08-31 Vincent Lefèvre [src/mpfr-mini-gmp.c] Fixed potential undefined behavior (when mp_limb_t is defined as an unsigned short) with MPFR_LIMB_LSHIFT. [src/mpfr-impl.h] Define MPFR_LIMB_LSHIFT(x,c) macro to do a left shift, making sure that the shifted argument is unsigned (needed due to the integer promotion rules when mp_limb_t is defined as an unsigned short). [src/add1.c] Fixed potential undefined behavior with MPFR_LIMB_LSHIFT. [src/mpfr-impl.h] Corrected a comment and added a warning. 2018-08-31 Paul Zimmermann [src/mpfr-impl.h] fix MPFR_INT_CEIL_LOG2 for 16-bit limb [src/set_si_2exp.c] support 16-bit limbs 2018-08-31 Vincent Lefèvre [src/set_ui_2exp.c] Code formatting. Removed a FIXME (done in r13078). 2018-08-31 Paul Zimmermann [src/mpfr-gmp.h] missing cast removed TEST_FLAGS stuff 2018-08-31 Vincent Lefèvre [doc/README.dev] More correction about the MPFR_TESTS_TIMEOUT macro. [doc/README.dev] Clarification about MPFR_TESTS_TIMEOUT. [doc/README.dev] Reverted r13090: this was already mentioned at the right place (do not mix up macros and environment variables). 2018-08-31 Paul Zimmermann [src/mpfr-gmp.h] added missing udiv_qrnnd for 16-bit limb [src/mul.c] fixed for 16-bit limb [src/ui_div.c] likewise [README.dev] mention that MPFR_TESTS_TIMEOUT only works with --enable-tests-timeout 2018-08-31 Vincent Lefèvre [src/mpfr-impl.h] Fix for MS Windows. [src/mpfr-impl.h] Make sure that MPFR_LONG_WITHIN_LIMB is defined if __GMP_SHORT_LIMB is not defined, as required by the current code. [src/mpfr-gmp.h] Untabified. 2018-08-31 Paul Zimmermann [src/mpfr-impl.h] fixed wrong #ifdef [src/mpfr-mini-gmp.c] fix for 16-bit limb [src/add1.c] fix for 16-bit limb [tests/tadd.c] more output in case of error [src/add1.c] fixed compiler warning [src/mpfr-gmp.h] removed leftover debug statement [src/mpfr-impl.h] added MPFR_LIMB macro [src/sub1sp.c] fix for 16-bit limb 2018-08-30 Paul Zimmermann [src/mpfr-gmp.h] more changes for 16-bit limb [src/mpfr-impl.h] mpfr-longlong.h should not be used for limb < long [mpfr-gmp.h] added comment [mpfr-mini-gmp.c] fix for 16-bit limb [src/set_ui_2exp.c] fix for 16-bit limb 2018-08-29 Paul Zimmermann [src/round_p.c] gmp_fprintf is not defined in mini-gmp [tests/tadd.c] fix for 16-bit limb [src/add1.c] revert previous commit since it does not remove the warning: add1.c: In function ‘mpfr_add1’: add1.c:407:30: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] if (difs && (cprev << (GMP_NUMB_BITS - difs))) ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ [src/add1.c] fixed compiler warning (with gcc 8.2.0) 2018-08-29 Vincent Lefèvre [tests/tdiv_ui.c] Added a comment about a spurious failure with MPFR_RNDF if RND_LOOP_NO_RNDF were not used. 2018-08-28 Vincent Lefèvre [tests/tsinh.c] Fixed test introduced in r13047. [src/{add_ui.c,sub_ui.c,ui_sub.c}] Fixed the bug introduced in r13066 for the cases where MPFR_LONG_WITHIN_LIMB is defined (make sure that a significand allocated in the stack is not freed before the associated mpfr_t object). [src/div_ui.c] Extend the exponent range in the case where MPFR_LONG_WITHIN_LIMB is not defined, resolving the FIXME. Note: a test was already there in tdiv_ui via the generic tests. [tests/tdiv_ui.c] Disabled rnd=MPFR_RNDF in a loop as this now fails. [tests/tdiv_ui.c] Corrected an error message. [src/div.c] Avoid an infinite recursion when MPFR_LONG_WITHIN_LIMB is not defined (mpfr_div calls mpfr_div_ui, which calls mpfr_div). [src/div_ui.c] Made the preprocessor test on MPFR_LONG_WITHIN_LIMB consistent with the ones in the other .c files. [src/{add_ui.c,sub_ui.c,ui_sub.c}] Fixed the cases where MPFR_LONG_WITHIN_LIMB is not defined (regression in the latest changes). Also avoid unused variables. Removed trailing whitespace. [src/ui_sub.c] Extend the exponent range early enough. [src/add_ui.c] Extend the exponent range early enough. [src/sub_ui.c] Extend the exponent range early enough. 2018-08-28 Paul Zimmermann [src/get_ld.c] adapt to GMP_NUMB_BITS=16 2018-08-28 Vincent Lefèvre [src/div_ui.c] Added a FIXME. 2018-08-28 Paul Zimmermann [src/set_ld.c] adapt to GMP_NUMB_BITS=16 [src/set_d.c] adapt to GMP_NUMB_BITS=16 (not yet tested) [src/exp_2.c] removed a static assertion (duplicate with MPFR_LONG_WITHIN_LIMB) [src/init2.c] split a static assertion in two [src/mpfr-gmp.h] allow GMP_NUMB_BITS=16 (experimental, do not use!) [src/set_d.c] make it easier to extend to GMP_NUMB_BITS<32 [configure.ac] read GMP_NUMB_BITS from mini-gmp.h when available (otherwise assume mp_limb_t == unsigned long) [src/ui_sub.c] make code work for limb < long [src/sub_ui.c] make code work for limb < long [src/div_ui.c] make code work for limb < long [src/add_ui.c] make code work for limb < long [mini-gmp] update [tests/tsinh.c] improve coverage [tests/tsubnormal.c] improve coverage 2018-08-27 Vincent Lefèvre [src/sub1sp.c] Added a FIXME about cp vs tp. 2018-08-27 Paul Zimmermann [tests/tmul.c] improve coverage 2018-08-27 Vincent Lefèvre [src/sub1sp.c] Avoid bad usage of tp in the generic code: * In the case d == 1, two branches were inconsistent: tp not defined at the same level, with one shadowing the other one. * In the case 2 <= d < p, tp was reused with a different meanings; renamed the second one to cp, as this is MPFR_MANT(c). [src/sub1sp.c] Re-added/updated FIXME about the long backward goto's. [src/{add1sp.c,mul.c}] Updated the condition to use the formally extracted code and added a corresponding comment. 2018-08-27 Paul Zimmermann [src/const_log2.c] further improve coverage 2018-08-27 Vincent Lefèvre [src/cache.c] Improved variable names (→ dprec for the precision of dest and cprec for the precision of the cache) and added/updated comments. [src/cache.c] Reverted r13036 as what matters is the target precision, which can be very small. 2018-08-27 Paul Zimmermann [src/add1sp1_extracted.c] replaced extracted code by new for MPFR_PREC_BITS=64 [src/mul_1_extracted.c] likewise [src/add1sp.c] changed condition to use the formally extracted code [src/mul.c] likewise (but code is still not yet activated here) 2018-08-27 Vincent Lefèvre [src/cache.c] Comment: In practice, the "overflow handler" of MPFR_RNDRAW_GEN should never be called. 2018-08-27 Paul Zimmermann [src/const_log2.c] avoid hard-coded values [tests/tconst_log2.c] improve coverage 2018-08-27 Vincent Lefèvre [src/cache.c] Replaced a test + mpfr_overflow by a MPFR_ASSERTD since the cached value (in extended exponent range) cannot overflow. 2018-08-27 Paul Zimmermann [src/const_euler.c] better choice of (initial) working precision [tests/tconst_euler.c] added coverage test 2018-08-27 Vincent Lefèvre [tests/tversion.c] Update concerning the shared cache, to be consistent with the other mpfr_buildopt_*_p features: * check that mpfr_buildopt_sharedcache_p() and MPFR_WANT_SHARED_CACHE match; * for the output of the value, test mpfr_buildopt_sharedcache_p() instead of the macro. 2018-08-27 Paul Zimmermann [tests/tconst_catalan.c] improve coverage [tests/tbuildopt.c] added check of mpfr_buildopt_sharedcache_p() 2018-08-27 Vincent Lefèvre Removed trailing whitespace. 2018-08-27 Paul Zimmermann [src/sub1sp.c] fixed even rule for p=1 2018-08-27 Vincent Lefèvre [src/mpfr-impl.h] Mention WG14/N2270 (proposed maybe_unused attribute), which could be useful to avoid MPFR_DBGRES. 2018-08-24 Paul Zimmermann [src/sub1sp.c] finished simplifying the mpfr_sub1sp code [src/sub1sp.c] simplified the computation of sbb [src/sub1sp.c] full rewrite of mpfr_sub1sp (work in progress) 2018-08-23 Vincent Lefèvre [tests/tversion.c] Output "Enable formally proven code" info. [doc/README.dev] Describe MPFR_WANT_PROVEN_CODE. Renamed WANT_PROVEN_CODE to MPFR_WANT_PROVEN_CODE for consistency with the other WANT macros (and to avoid potential clashes with foreign .h files). [tools/mpfrlint] For some tests, ignore extracted files (proven code). 2018-08-23 Paul Zimmermann the mpfr_mul_1 extracted code is not proven yet 2018-08-23 Vincent Lefèvre For --enable-formally-proven-code, instead of requiring a check of the type sizes in configure, just enable the proven code only if the types have the sizes expected by this code. * configure.ac: removed the FIXME. * src/add1sp.c, src/mul.c: updated the #if test that enables the proven code (add1sp1_extracted.c and mul_1_extracted.c). [configure.ac] Updated FIXME for --enable-formally-proven-code (many failures with -m32 due to assumptions on type sizes). [configure.ac] Added a FIXME for --enable-formally-proven-code. [configure.ac] Updated message for --enable-formally-proven-code. 2018-08-23 Paul Zimmermann added configure option --enable-formally-proven-code and corresponding code 2018-08-22 Vincent Lefèvre [doc/algorithms.tex] Ulp calculus: swap Rule 4 and Rule 5. [doc/algorithms.tex] Ulp calculus Rule 4: make the proof much simpler. [doc/algorithms.tex] Error calculus: implicitly assume x ≠ 0 in ulp. [src/sub1sp.c] Updated a FIXME. [src/sub1sp.c] Removed a comment that brings nothing and is not really correct (this is not a "flag"). 2018-08-22 Paul Zimmermann [tests/mpfr-test.h] added macro TEST_FLAGS (debug use only) 2018-08-22 Vincent Lefèvre [tests/tversion.c] Portability corrections related to the use of the preprocessor / code robustness. 2018-08-21 Paul Zimmermann [src/sub1sp.c] revert mpfr_sub1sp to the version of revision 12241 [src/sub1sp.c] fixed bug20180813 [tests/tsub1sp.c] improved comment about bug20180813() 2018-08-21 Vincent Lefèvre [doc/mpfr.texi] Updated the month. 2018-08-21 Paul Zimmermann [tests/tsub1sp.c] added a test for a bug in mpfr_sub1sp (to be fixed) 2018-08-20 Vincent Lefèvre [doc/mpfr.texi] Replaced "Section ``Rounding''" by "@ref{Rounding}". 2018-08-20 Paul Zimmermann [doc/mpfr.texi] renamed Section "Rounding Modes" to "Rounding" 2018-08-18 Vincent Lefèvre Avoid a pointer-to-int-cast warning with GCC (e.g. under 32-bit Linux) by casting pointers to uintptr_t before the cast to mpfr_uintmax_t. * acinclude.m4: use AC_TYPE_UINTPTR_T to define uintptr_t if not available. * tests/memory.c: added casts to uintptr_t. 2018-08-16 Vincent Lefèvre Code robustness in macro definitions. [src/sqr.c] Changed a variable name to avoid confusion with the function parameter of the same name, which has a different type. [src/mpfr-impl.h] Added a cast to mp_bitcnt_t in order to fix potential integer overflow in MPFR_MPZ_SIZEINBASE2. [src/round_raw_generic.c] Type consistency. Added MPFR_INC_PREC definition (similar to MPFR_ADD_PREC) and replaced some MPFR_ADD_PREC occurrences by MPFR_INC_PREC. In src/bernoulli.c, replaced += by MPFR_INC_PREC to detect overflow. 2018-08-11 Vincent Lefèvre Replaced "TZ=UTC" by "TZ=UTC0" for portability. 2018-08-06 Vincent Lefèvre [src/round_raw_generic.c] Avoid a useless variable. This should also avoid warnings with Windows ICC, reported at: https://sympa.inria.fr/sympa/arc/mpfr/2018-08/msg00002.html [tests/tcan_round.c] Added missing casts for printf (error messages). Bug detected under MS Windows, where size_t > unsigned long. See: https://sympa.inria.fr/sympa/arc/mpfr/2018-08/msg00002.html [tests/tdiv_ui.c] Improved the conditions for test_20170105(). In particular, the new preprocessor test can avoid spurious warnings on large shifts (false positives) with MS Windows. See: https://sympa.inria.fr/sympa/arc/mpfr/2018-08/msg00002.html [doc/README.dev] More details about intmax_t, mpfr_intmax_t, etc. [tests/memory.c] To print a size_t or a pointer in error messages, cast to mpfr_uintmax_t (largest integer type available) instead of unsigned long, which may be too short (e.g. under MS Windows). See: https://sympa.inria.fr/sympa/arc/mpfr/2018-08/msg00002.html [src/mpfr-intmax.h] Define MPFR_INTMAX_FSPEC macro: length modifier for printf corresponding to mpfr_intmax_t and mpfr_uintmax_t. [doc/README.dev] Updated/added links about coding standards and C. 2018-08-05 Vincent Lefèvre [tools/mpfrlint] Updated a comment: more details about __GMP_DECLSPEC, in particular those found in GMP's longlong.h file. 2018-08-05 Vincent Lefèvre [src/mpfr-longlong.h] Replaced __GMP_DECLSPEC by __MPFR_DECLSPEC. Otherwise, with Windows DLL, __GMP_DECLSPEC is replaced by __declspec(dllimport), which is wrong when building MPFR and yields warning LNK4217 such as: eint.obj : warning LNK4217: locally defined symbol mpfr_clz_tab imported in function mpfr_eint due to extern const unsigned char __GMP_DECLSPEC __clz_tab[129]; (note that mpfr_clz_tab is defined with "#define __clz_tab mpfr_clz_tab" only without the GMP build). See: https://sympa.inria.fr/sympa/arc/mpfr/2018-08/msg00000.html https://sympa.inria.fr/sympa/arc/mpfr/2018-08/msg00001.html 2018-08-05 Vincent Lefèvre [tools/mpfrlint] Check that __GMP_DECLSPEC is not used by MPFR. 2018-07-31 Vincent Lefèvre [tests/tversion.c] Try to detect missing output from the first printf that occurred once with i586-mingw32msvc-gcc -D__USE_MINGW_ANSI_STDIO and run under Wine. (merged changesets r12968-12969 from the 4.0 branch) 2018-07-27 Vincent Lefèvre [acinclude.m4,configure.ac] Check the support of the group flag for native integers, which is a Single UNIX Specification extension. [tests/tsprintf.c] Test the group flag with the P length modifier only when supported, since the implementation relies on this support. [src/vasprintf.c] Fixed bug with the P length modifier (mpfr_prec_t): a '0' flag was always added when calling gmp_asprintf. This bug wasn't detected under Linux because the case for which it was occurring (left space padding without a precision and without a '0' flag) was not tested. With Wine, tsprintf was failing because of a bug in the stdio library: the '0' flag added by mistake should have been ignored in some test with a precision, but it wasn't. [tests/tsprintf.c] Added a test that made a failure occur under Linux. [tests/tsprintf.c] Added 2 other tests with the P length modifier. [src/vasprintf.c] Fixed bug with the P length modifier (mpfr_prec_t). [tests/tsprintf.c] Corrected/added tests with the P length modifier. 2018-07-26 Vincent Lefèvre [src/vasprintf.c] Fixed various overflow and close-to-overflow issues. Those with the P length modifier (mpfr_prec_t) will be fixed later. [tests/tsprintf.c] Another failure with the P length modifier. [tests/tsprintf.c] Added tests with the P length modifier (mpfr_prec_t), yielding mode failures. [src/vasprintf.c] Fixed "store to null pointer" and free of bad pointer in case of error. [tests/tsprintf.c] Added a test that yields a "store to null pointer", detected by UBsan. 2018-07-25 Vincent Lefèvre [src/vasprintf.c] Bug fix: in case of some errors (via "goto error;"), va_end wasn't called, yielding undefined behavior. 2018-07-23 Vincent Lefèvre [tests] Added tget_set_d128 to svn:ignore property. [src/erf.c] More security about tauk. [src/erf.c] Removed a meaningless cast. 2018-07-22 Paul Zimmermann [src/erf.c] replaced double's by mpfr_t to fix bug reported by Naoki Shibata 2018-07-22 Vincent Lefèvre [tests/terf.c] Added a testcase for bug reported by Naoki Shibata: https://sympa.inria.fr/sympa/arc/mpfr/2018-07/msg00028.html (uceil_log2.c:40: MPFR assertion failed: exp < 1023). Increased the number of generic tests in order to reproduce the bug there too with the default seed. 2018-07-21 Vincent Lefèvre [src/subnormal.c] C89 compatibility. 2018-07-21 Paul Zimmermann [src/subnormal.c] experimental support for RNDNA 2018-07-20 Vincent Lefèvre Added examples/threads.c (and updated Makefile.am): multithreading test to detect scaling issues with MPFR. 2018-07-19 Vincent Lefèvre [src/vasprintf.c] Updated a FIXME. [src/vasprintf.c] More FIXME's. [src/vasprintf.c] Reindentation. [src/vasprintf.c] Added a FIXME for MPFR_PREC_ARG handling. 2018-07-18 Vincent Lefèvre Shared caches: fix and minor changes. * Fixed detection and use of C11 thread support: the C11 header is , not . * Renamed WANT_SHARED_CACHE to MPFR_WANT_SHARED_CACHE for consistency with the other MPFR_WANT_* macros. * Added MPFR_THREAD_LOCK_METHOD macro, giving the thread locking method as a string (when shared caches are enabled). * doc/README.dev: documented 4 macros for shared caches. * tests/tversion.c: output MPFR_WANT_SHARED_CACHE and MPFR_THREAD_LOCK_METHOD information. [tests/tconst_pi.c] Removed an incorrect assertion, as the #else would be applicable when WANT_SHARED_CACHE is defined but not HAVE_PTHREAD (which may occur when MPFR_HAVE_C11_LOCK is defined). [src/vasprintf.c] Fixed type in partition_number to be consistent with the end of the function. 2018-07-16 Vincent Lefèvre [src/vasprintf.c] Added 2 FIXME and removed an incorrect MPFR_ASSERTN (which came from r5236). [tests/tsprintf.c] Added other tests to check_length_overflow, which would trigger other bugs in src/vasprintf.c (e.g. when removing the other failing tests). [tests/tsprintf.c] Added check_length_overflow to check the behavior of mpfr_snprintf on a large number of output characters (> INT_MAX) with size = 0. This test is actually done only if INT_MAX == 2147483647 and currently fails in such a case. [src/vasprintf.c] Updated comment about overflow on the number of output characters, taking into account the latest ISO C and POSIX standards. [tests/tsprintf.c] Updated a comment. 2018-07-13 Vincent Lefèvre [src/vasprintf.c] Simplified mpfr_get_str_wrapper. [src/vasprintf.c] Added a log message. [src/mpfr-impl.h] Added a FIXME: _Decimal128 code and _MPFR_IEEE_FLOATS (which is about binary IEEE-754 floating point) should be unrelated. [src/get_d64.c] * Added FIXME's for get_decimal64_nan and get_decimal64_inf internal functions: possible issue with _MPFR_IEEE_FLOATS code, which also seems more complex than the generic code. * Simplified get_decimal64_zero internal function to generate a decimal zero directly instead of using the fact that a binary64 zero is also the encoding of a decimal zero (and assuming that double = binary64 with perfect endianness matching). [acinclude.m4] Updated message about the _Float128 support, since this is not just about the compiler. [acinclude.m4] Fixed the _Float128 / __float128 detection for NetBSD: Optimization made the "undefined reference" error disappear, so that __float128 was misdetected as being supported. 2018-07-12 Vincent Lefèvre [acinclude.m4] For the _Float128 / __float128 detection, changed AC_COMPILE_IFELSE to AC_LINK_IFELSE since an error may occur only at link time, such as under NetBSD: https://mail-index.netbsd.org/pkgsrc-users/2018/02/02/msg026220.html https://mail-index.netbsd.org/pkgsrc-users/2018/02/05/msg026238.html [src/Makefile.am] Corrected check-exported-symbols to avoid a failure when the default .SHELLFLAGS value is '-ec' (POSIX) instead of '-c' (GNU Make, which is not in POSIX-conforming mode by default). Bug found on FreeBSD 11.1 (Compile Farm @ HouseGordon.com). 2018-07-11 Vincent Lefèvre [src/vasprintf.c] In buffer_sandwich, simplified the handling of the trailing zero (avoid memset and a useless assignment). 2018-07-09 Vincent Lefèvre [doc/mpfr.texi] More changes to Section "Nomenclature and Types"; in particular, defined regular numbers and exponents. [doc/mpfr.texi] In Section "Nomenclature and Types", removed all the @noindent, whose purpose is unclear (if one needs something special, an itemized list would be better, or possibly @deffn). [doc/mpfr.texi] Rewrote the paragraph defining "floating-point number" in Section "Nomenclature and Types", avoiding ambiguities. 2018-07-06 Vincent Lefèvre [tests/tprintf.c] Grrr... again a copy-paste error. Now OK. [tests/{tprintf.c,tsprintf.c}] Corrected the tests added in r12898, but tprintf still fails. [tests/tsprintf.c] Corrected the latest tests. [tests/tsprintf.c] Added tests (failure on "%09.3Rg" for 1000). [tests/tsprintf.c] Corrected comments. [tests/{tprintf.c,tsprintf.c}] Added tests (both programs fail). [doc/mpfr.texi] Updated the month. [src/vasprintf.c] Corrected comments and coding style. [src/vasprintf.c] Resolve the FIXME. * Renamed ip_trailing_zeros to ip_trailing_digits, since when spec.size == 0, these can be any digits. * Simplified the buffer_sandwich function since it can be called only when spec.size != 0, in which case tz (= ip_trailing_digits) is either 0 or 1 (a trailing zero must be added only when rounding to the next power of ten in the %f case). * Corrected/removed/added comments. [tests/{tprintf.c,tsprintf.c}] Added tests with powers of ten in all rounding modes and powers of ten + 0.5 in rounding to nearest. 2018-07-05 Paul Zimmermann [doc/mpfr.texi] typo in Fredrik's name [AUTHORS] typo in Fredrik's name 2018-07-04 Vincent Lefèvre [tests/tprintf.c] Added a TODO (for the FIXME in src/vasprintf.c). [src/vasprintf.c] Updated the FIXME comment. [src/vasprintf.c] Added a FIXME comment about an incorrect comment. [src/vasprintf.c] Added log messages in buffer_sandwich. [tests/tsprintf.c] Added more tests of the form 10^i - 1/2 (like in tprintf.c). [tests/tprintf.c] Added more tests of the form 10^i - 1/2. [tests/tsprintf.c] Added test_locale() test based on the tprintf.c one. [tests/tprintf.c] Minor correction. [tests/tprintf.c] More test_locale() cleanup. [src/vasprintf.c] English usage in a comment. [src/vasprintf.c] Renamed mpfr_get_str_aux to mpfr_get_str_wrapper in order to avoid a confusion with the mpfr_get_str_aux function from get_str.c (moreover, this is really a wrapper, which is the reverse of an aux function). [tests/tsprintf.c] locale_da_DK() cleanup. 2018-07-04 Paul Zimmermann [src/vasprintf.c] partly revert commit 12873 2018-07-04 Vincent Lefèvre [tests/tprintf.c] test_locale() cleanup. * Conditional #include with the other header inclusions. * Completed a #if (to be like in tsprintf.c). * Moved a global variable as local to test_locale(). 2018-07-04 Paul Zimmermann [src/vasprintf.c] replaced overflow tests by assertions [tests/tprintf.c] improve test coverage 2018-07-04 Vincent Lefèvre Added MPFR_CHECK_LOCALES environment variable for the tests (to be used by developers): when set, terminate with an error if locales cannot be tested. 2018-07-04 Vincent Lefèvre [src/vasprintf.c] Fixed several bugs in buffer_sandwich, which could yield memory corruption with non-default memory allocators and other undefined behavior; check the return value when this function is called. Details: * check integer overflow on the size computations; * computation of q and r without tests; * fixed the case where r > len (e.g. len = 1 and tz = 1); * in the loop, increase the str pointer only when needed, otherwise str could be beyond of the end of the string of the digits, which is undefined behavior. The first consequence of the r > len issue was an incorrect generated string. Moreover, since the generated string was shorter than expected, mpfr_free_str would provide an incorrect buffer size to the "free" function of the current GMP memory allocator. By default, this size is ignored, but it may matter if the memory allocators have been changed with the mp_set_memory_functions GMP function, in which case a possible consequence could be memory corruption. 2018-07-03 Paul Zimmermann [src/vasprintf.c] added an assertion [tests/tprintf.c] added two tests (one currently fails) 2018-06-26 Vincent Lefèvre [src/vasprintf.c] C90 compatibility. 2018-06-26 Paul Zimmermann [tests/tsprintf.c] fixed another test [tests/tsprintf.c] fixed test [src/vasprintf.c] improve coverage [tests/tsprintf.c] improve coverage [tests/tsprintf.c] improve coverage 2018-06-25 Paul Zimmermann [tests/tgamma_inc.c] improve coverage [tests/tgamma_inc.c] added coverage test [src/gamma.c] added comment [src/gamma_inc.c] fixed bug for gamma_inc(-Inf, 0) [tests/tgamma_inc.c] added coverage tests 2018-06-23 Vincent Lefèvre [configure.ac] Do not do specific CFLAGS settings for MS-Windows ICC. See . [src/mpfr-impl.h] Spelling in a comment. [src/mpfr-impl.h] Fixed change in r12847. [tests/tget_set_d64.c] Improved a test. [tests/tget_set_d128.c] Replaced d != d by DOUBLE_ISNAN (d). [doc/mpfr.texi] Updated the month. [tests/tget_set_{d64,d128}.c] When MPFR_ERRDIVZERO is defined, disable tests that can trigger a FP exception DIVBYZERO or INVALID (issue detected with -DMPFR_TESTS_FPE_DIV -DMPFR_ERRDIVZERO). 2018-06-22 Vincent Lefèvre [src/mpfr-impl.h] Improved a comment about union ieee_decimal128. Do not assume that the bit-field ordering for _Decimal128 is necessarily little endian or big endian (this is more than the usual endianness issue). If this cannot be detected, instead of failing or assuming a possibly wrong default, switch to the portable code. 2018-06-22 Paul Zimmermann added mpfr_get_decimal128 and mpfr_set_decimal128 to the manual [tests/tget_set_d128.c] test some random 16-byte inputs [tests/tget_set_d64.c] test random inputs [acinclude.m4] added configure test to determine the encoding of _Decimal128 (little or big endian) [doc/README.dev] added standard suffixes [tests/tget_set_d64.c] fixed a test [tests/tget_set_d64.c] removed TODO (done), added comment [tests/tget_set_d128.c] removed TODO (done) [src/set_d64.c] added comment (like for set_d128.c) [src/get_d64.c] improve comment [src/get_d128.c] likewise [src/set_d64.c] also deal with non-canonical BID encoding [tests/tget_set_d64.c] added test with non-canonical BID encoding 2018-06-22 Vincent Lefèvre [src/get_d128.c] Bug fix (buffer overflow detected by AddressSanitizer). [src] Moved the FIXME comment from set_d128.c to get_d128.c since the bug occurs in mpfr_get_decimal128 according to the AddressSanitizer. [src/set_d128.c] Updated FIXME comment. [src/sqrt.c] Replaced a umul_ppmm by umul_hi, and removed an unused variable as a consequence. [src/set_d64.c] Code improvement (like r12809 and r12828 in set_d128.c). [src/set_ld.c] Removed unused variable for HAVE_LDOUBLE_MAYBE_DOUBLE_DOUBLE (PowerPC). [src/invsqrt_limb.h] Avoid a "variable ‘_l’ set but not used" warning on some platforms, such as powerpc64le-unknown-linux-gnu. [src/invert_limb.h] Avoid a "variable ‘_l’ set but not used" warning on some platforms, such as powerpc64le-unknown-linux-gnu. [src/set_d128.c] Avoid "unused variable" warnings on platforms with DPD. [src/mpfr-impl.h] About union ieee_double_decimal64: removed an incorrect comment and added a TODO. Changed union ieee_double_decimal128 to union ieee_decimal128 since this has nothing to do with double (unlike union ieee_double_decimal64). Also refactored code for this union definition. [src/mpfr-impl.h] Updated TODO for DPD. [src/mpfr-impl.h] Added TODO for DPD (better structure definition). [tests/tget_set_d128.c] Execute BID code only with BID. [tests/tget_set_d128.c] Simplification and better portability. 2018-06-22 Paul Zimmermann [tests/tget_set_d128.c] added coverage tests for non-canonical BID encodings [src/set_d128.c] improve last commit [src/set_d128.c] improved a comment 2018-06-22 Vincent Lefèvre [src/set_d128.c] Re-added "while (...)" erroneously removed in r12817. 2018-06-22 Paul Zimmermann [src/set_d64.c] added comment [src/set_d128.c] likewise [src/set_d128.c] avoid variable conflict for DPD [src/set_d128.c] implement for DFD encoding [src/set_d64.c] added comment and space 2018-06-22 Vincent Lefèvre [src/set_d128.c] Added a FIXME (stack-buffer-overflow). [src/set_d128.c] Corrected r12811. [src/set_d128.c] _MPFR_IEEE_FLOATS code for BID: correctly support the decoded significand >= 10^34 cases (non-canonical encodings), which must be zero. [tests/{tget_set_d64.c,tget_set_d128.c}] TODO: Also test non-canonical encodings. [src/set_d128.c] * Enable the _MPFR_IEEE_FLOATS code only for GMP_NUMB_BITS == 32 or 64 (as the other values are not supported by this code). * Bug fix for GMP_NUMB_BITS == 32 (→ tget_set_d128 no longer fails). * Added an assertion corresponding to a comment. [src/set_d128.c] Fit on 80 columns. 2018-06-21 Vincent Lefèvre [src/mpfr-impl.h] Updated a title comment (→ Decimal support). [src/mpfr-impl.h] Corrected a comment. 2018-06-21 Paul Zimmermann [src/set_d128.c] added comments [src/set_d128.c] remove debug stuff [src/mpfr-impl.h] assume little-endian double implies little-endian decimal128 2018-06-21 Vincent Lefèvre [src/mpfr-impl.h] FIXME for _Decimal128. 2018-06-21 Paul Zimmermann [src/set_d128.c] (partly) implement the _MPFR_IEEE_FLOATS case (BID only so far) [tests/tget_set_d128.c] added more tests [src/set_d64.c] added comments [src/get_d128.c] removed useless comment 2018-06-20 Paul Zimmermann [src/get_d128.c] avoid using doubles [tests/tget_set_d128.c] improve test coverage [tests/tget_set_d128.c] improve test coverage [tests/tget_set_d128.c] improve coverage added mpfr_get_decimal128 (still experimental) [get_d64.c] added comments and simplified code 2018-06-20 Vincent Lefèvre [tests/{tget_set_d64.c,tget_set_d128.c}] Tests on powers of 10: test negative numbers too. 2018-06-19 Vincent Lefèvre [doc/README.dev] Added a note about FP constants and native FP. [tools/mpfrlint] Check that preprocessing directives have no spaces before. [src/set_d128.c] Modified a comment. [src/set_d128.c] Avoid double, which is unreliable with GCC in non-standard mode (see GCC bug 323 and the discussion in GCC bug 85957). But the failure in tget_set_d128 probably came from the fact that (_Decimal128) 0.1 is not 1/10 exactly (the double 0.1 has about a 17-digit precision only, while _Decimal128 has more); this test now passes. [src/set_d128.c] Simplified code and added assertions. [src/set_d64.c] Added a log message (like in set_d128.c). [src/{set_d64.c,set_d128.c}] Bug fix: use mpfr_strtofr instead of mpfr_set_str to get the ternary value. [tests/{tget_set_d64.c,tget_set_d128.c}] Added tests on powers of 10. * tget_set_d64 fails on negative due to a bad ternary value. * tget_set_d128 fails on negative due to bad value, etc. [tests/tget_set_d128.c] Test the flags too. [tests/tget_set_d128.c] Test more values. [tests/tget_set_d128.c] Converting an integer into _Decimal128 is better than converting a double into _Decimal128. [tests/tget_set_d128.c] Simplified the test, avoiding a bug in ICC 15 at the same time (1.0D was regarded as 0). [tests/tget_set_d128.c] Fixed indentation. [tests/tversion.c] Decimal formats: output the encoding type (DPD/BID). [src/set_d128.c] Changed _GMP_IEEE_FLOATS to _MPFR_IEEE_FLOATS as per r10958 (in set_d128.c, currently in a comment due to r12772). [src/set_d128.c] Added a log message. [tests/tget_set_d128.c] Added an informative error message. [src/set_d128.c] Disable the _GMP_IEEE_FLOATS code, which is not complete yet and makes the compilation fail. 2018-06-13 Vincent Lefèvre [src/set_d128.c] Corrected year in copyright notice. [src/set_d128.c] Minor improvements. 2018-06-13 Paul Zimmermann [tests/tget_set_d64.c] added -v option to get verbose output [tests/tget_set_d128.c] likewise 2018-06-13 Vincent Lefèvre [TODO] Missing "r". 2018-06-13 Paul Zimmermann [TODO] update for mpfr_set_decimal128 added mpfr_set_decimal128 (work in progress, not yet fully tested) 2018-06-08 Paul Zimmermann [tools/coverage] added branch coverage 2018-06-07 Vincent Lefèvre [src/strtofr.c] Moved some computations on the exponents earlier since they may yield an early overflow or underflow, and computing the division by b^e would be useless in such a case. [src/strtofr.c] Added a MPFR_ASSERTD and a FIXME on things that don't make much sense in the error analysis (still trying to understand…). 2018-06-07 Paul Zimmermann [src/const_pi.c] missing reference about Brent-Salamin [doc/algorithms.bib] added reference 2018-06-05 Paul Zimmermann [tests/tfmma.c] improve coverage of the UBF case in mpfr_sub (now coverage of sub.c is 100%) 2018-06-05 Vincent Lefèvre [src/sum.c] Updated TODO from r12755. 2018-06-05 Paul Zimmermann [src/fmma.c] now mpfr_fmms calls mpfr_sub for a better coverage 2018-06-04 Vincent Lefèvre [src/sum.c] Updated TODO from r12755. [src/sum.c] Added a comment with a TODO about potentially dead code on some platforms. codespell: simplified exceptions. * Added codespell.exclude file. * codespell.ignore: removed some words (particular cases). * tools/mpfrlint: use the codespell.exclude exclude file, and for the doc directory, replaced -S by an explicit list of files. [codespell.ignore] Also ignore "objext" and "tim" (codespell 1.13). 2018-06-04 Paul Zimmermann [src/sub1.c] fixed a bug and solved a FIXME (underflow for UBFs) Note: this mostly reverts r12319, r12321, and the remaining FIXME from r12327. [tests/tfmma.c] added non-regression tests 2018-06-02 Vincent Lefèvre [src/mpfr-impl.h] Concerning r12738, the safer code can be avoided with GCC in ISO C mode (__STRICT_ANSI__). 2018-06-02 Paul Zimmermann [src/invert_limb.h] fixed two typos reported by Marco Bodrato 2018-06-02 Vincent Lefèvre [tests/tversion.c] For GCC, output __STRICT_ANSI__ when defined. 2018-06-01 Paul Zimmermann [src/sqrt.c] fixed/improved comments 2018-05-31 Paul Zimmermann [src/invsqrt_limb.h] fixed typos in comments 2018-05-31 Vincent Lefèvre [doc/README.dev] Updated a URL. [src/mpfr-impl.h] Fixed potential compilation failure with _Decimal64, detected with r12738. [doc/mpfr.texi] Updated the month. Updated mpfr.org URL's to use https (except in ChangeLog and NEWS). [src/mpfr-impl.h] With GCC, select safer code for DOUBLE_ISNAN(x). 2018-05-30 Vincent Lefèvre [tools/announce-text] http → https (for mpfr.org). [doc] Updated FAQ.html with update-faq. [doc] Workaround due to the lack of https support in libxml2 and the fact that mpfr.org now uses https with HSTS. * faq.xsl: for the visual.css, use a local URL. * update-faq: download visual.css from mpfr.org first. [doc/update-faq] http → https [src/mpfr-impl.h] Added a FIXME about DOUBLE_ISNAN and GCC. 2018-05-28 Vincent Lefèvre [src/strtofr.c] Continued to review the new error analysis and code. Changes: * made the code more SSA-like (avoid a "y += ysize; y -= ysize;"); * clarified comments; * use MPFR_LIMB_MSB; * added a FIXME on the error analysis. [doc/README.dev] Added info about shell portability, and in particular about quotes (covering changes in r5659, r6128, r12711 and r12721). [tools/{ck-clz_tab,ck-copyright-notice,ck-mparam,update-version}] Fixed non-portable quote nesting in backticks. [examples] Added "mpfr_free_cache ();" at the end of all programs, as this is something that should be done systematically (at least to detect memory leaks with valgrind). 2018-05-25 Vincent Lefèvre [src/strtofr.c] Started to review the new error analysis and code (r12705,12706). Minor improvements. [src/{mpfr-impl.h,mpn_exp.c}] Changed the return type of mpfr_mpn_exp from long to int for consistency with the mpfr_mpn_exp code and with strtofr.c (which expects an int). [src/mpn_exp.c] Code cleanup and protection against integer overflow. 2018-05-24 Vincent Lefèvre [src/hypot.c] Do bitwise operations in unsigned arithmetic. [src/hypot.c] Added 2 TODO. 2018-05-23 Vincent Lefèvre [tools/{ck-clz_tab,ck-copyright-notice}] Changed the POSIX $(…) to `…` for Bourne shell compatibility (as under Solaris 10). Note: these scripts are called via dist-hook for "make dist". 2018-05-22 Vincent Lefèvre [src/mpfr-impl.h] Added a comment for UBF. [src/mpfr-impl.h] Added a comment about UBF and alignment requirements. 2018-05-17 Vincent Lefèvre [tests/tstrtofr.c] Removed TODO added in r12681, now obsolete. 2018-05-16 Vincent Lefèvre Removed trailing whitespace. 2018-05-16 Paul Zimmermann [src/strtofr.c] revisit error analysis in the division case (end) 2018-05-15 Paul Zimmermann [src/strtofr.c] revisit error analysis in the division case (work in progress, not yet finished) 2018-05-09 Vincent Lefèvre [tests/tsub.c] Updated the comment added in r12701. [tests/tsub.c] Added a comment about the bug fixed in r10697: bug20180217 is a non-regression test for this bug. 2018-05-02 Vincent Lefèvre [tests/tstckintc.c] Avoid false warnings with -Wcast-align=strict from GCC 8.1 by adding casts "(long *) (void *)", still allowing checks of other alignment requirements (which are not handled by the tstckintc.c code). [TODO] + Use GCC's nonnull and returns_nonnull attributes. [acinclude.m4] Added a note on _Decimal64 detection. 2018-04-30 Vincent Lefèvre [doc/README.dev] Added info about spelling. Corrected "runtime" to "run time" (noun) or "run-time" (adjective) when it means the time at which the program is run. See: https://gcc.gnu.org/codingconventions.html#Spelling https://en.wikipedia.org/wiki/Run_time 2018-04-27 Vincent Lefèvre [src/strtofr.c] Potentially unnecessary code: comes from r8384. [src/strtofr.c] Updated TODO about potentially unnecessary code. [src/strtofr.c] Updated TODO about potentially unnecessary code, showing that this code probably increases the error bound (errors accumulate instead of compensating without this code). [src/strtofr.c] Added a TODO about potentially unnecessary code. [src/strtofr.c] Corrected/updated comments and added a log message. [src/strtofr.c] Corrected a comment (exp_base and exp_bin description). [src/strtofr.c] Added a FIXME: possible bug in very special cases with large exponents, 32-bit mpfr_exp_t and very long strings. [src/strtofr.c] Added/clarified comments. [tests/tstrtofr.c] Added a TODO related to the bug fixed in r12573. 2018-04-26 Vincent Lefèvre [tests/tgmpop.c] Coding style. [tests/tgmpop.c] For mpfr_cmp_q, improved the test where x is NaN by checking all the flags (not just erange) and added a test where y is a NaN rational. Note: this could be used to detect 2 bugs, fixed in r12343 and r12499, respectively. [tests/tcan_round.c] Removed a r2 != MPFR_RNDF test and added 3 TODO's to support r2 == MPFR_RNDF in some other tests. 2018-04-24 Vincent Lefèvre [src/mpfr-gmp.h] Clarified a comment (the "if" is part of the code, not the English word). 2018-04-24 Paul Zimmermann [src/mpfr-gmp.h] added comment about MPN_FILL 2018-04-20 Vincent Lefèvre [src/out_str.c] Check for integer overflow (here, a minor issue). [src/out_str.c] Support mpfr_exp_t larger than long (with mpfr_eexp_t). 2018-04-19 Vincent Lefèvre [tests] Added tdot to svn:ignore property. [tests/tdot.c] Various improvements. [doc/mpfr.texi] Note that mpfr_dot does not yet handle intermediate underflows either. [src/dot.c] Changed an MPFR_ASSERTD to MPFR_ASSERTN since the assertion is not satisfied on some user inputs. Minor improvements. [NEWS] Added mpfr_dot. [doc/mpfr.texi] In the added functions, note that mpfr_dot is incomplete and experimental. [tests/tsum.c] Code style. [doc/mpfr.texi] Updated the month. [tests/tdot.c] Code style. 2018-04-19 Paul Zimmermann added mpfr_dot 2018-04-19 Vincent Lefèvre [tests/tget_flt.c] Correction about the use of mpfr_signbit, in case the implementation would change. [src/sqr.c] Minor code improvement. [src/sqr.c] Code formatting. [src/sqr.c] Clarified a comment and slightly improved code. [src/sqr.c] Typo in a comment. [tests/tfma.c] Added test_underflow5. [tests/tfma.c] Minor correction for test_underflow4. [tests/tfma.c] Added a comment. 2018-04-18 Vincent Lefèvre [tests/tfma.c] Added test_underflow4. This allows to show that the bound MAX (MPFR_PREC (z), MPFR_PREC (s) + 1) in fma.c is optimal: * If one subtract 1 from the 1st term MPFR_PREC (z), a failure occurs in test_underflow4. * If one subtract 1 from the 2nd term MPFR_PREC (s) + 1, a failure occurs in test_underflow2. [configure.ac] For the ICC check, also test __INTEL_COMPILER. [configure.ac] Corrected comment for the ICC check (GCC is no longer disabled since r5720). 2018-04-18 Paul Zimmermann [src/mpfr.h] enable some code that now works with ICC (tested with ICC 14) [TODO] removed item 2018-04-18 Vincent Lefèvre [tests/tversion.c] Updated a comment about __ICC. 2018-04-18 Paul Zimmermann [TODO] removed item that we won't implement [TODO] removed done item (UBF) 2018-04-17 Paul Zimmermann [TODO] RNDF is done [TODO] removed an obsolete item [TODO] log_ui is done 2018-04-17 Vincent Lefèvre [tools/mpfrlint] Detect the use of mpfr_div_2exp and mpfr_mul_2exp. [tests/{reuse.c,taway.c}] Added mpfr_div_2ui and mpfr_mul_2ui. Note: si functions are not tested yet. Replaced mpfr_mul_2exp & mpfr_div_2exp by mpfr_mul_2ui & mpfr_div_2ui, respectively (for the tests, except in reuse.c and in taway.c). Note: As documented, mpfr_mul_2exp & mpfr_div_2exp are only kept for compatibility with MPF; mpfr_mul_2ui & mpfr_div_2ui are preferred. 2018-04-16 Vincent Lefèvre [TODO] + function to reduce the precision of a variable, with a ternary value in input, i.e. taking care of double rounding. [tests/tfma.c] More tests for test_underflow2. [tests/tfma.c] Corrected r12603 for test_underflow2. [tests/tfma.c] More tests for test_underflow2. [src/fma.c] Updated easy case of underflow. [tests/tfma.c] Updated a comment for test_underflow2. [tests/tfma.c] In test_underflow2, also test different signs. [tests] Updated svn:ignore property. [doc/README.dev] "To make a release": check also with -DMPFR_GROUP_STATIC_SIZE=0 to detect memory leaks. [src/fma.c] Forgot a MPFR_GROUP_CLEAR. [src/fma.c] Simplified the underflow case by using UBF in the difficult cases, resolving the remaining FIXME's. 2018-04-13 Vincent Lefèvre [tests/tfma.c] More tests for test_overflow3 by adding loops on j and k. [tests/tfma.c] Extended test_overflow3 to reversed signs. [tests/tfma.c] Do all the overflow/underflow tests in exponent ranges [-1024,1024], [MPFR_EMIN_MIN,MPFR_EMAX_MAX], and the default one. [src/mpfr-sassert.h] Added a comment. 2018-04-12 Vincent Lefèvre [tests/tfma.c] Forgot a cast for C++ compatibility. [src/mpfr-impl.h] Reverted r12588: there should be no alignment issues with UBF, since an UBF (__mpfr_ubf_struct) is sometimes regarded as a MPFR number (__mpfr_struct) but not the opposite (or this is just back to __mpfr_ubf_struct). [src/fma.c] Simplified the difficult part of the overflow case by using UBF (this also fixes corner cases in huge precision). [src/mpfr-impl.h] Added a note about alignment constraints for UBF. [src/fma.c] Fixed sign related bug in overflow case. [tests/tfma.c] Added test_overflow5 test for this bug. [tests/tfma.c] In test_overflow4, also test different signs. [src/fma.c] Correction for the FIXME from r12403 concerning r12396. The test added in tests/tfma.c r12584 no longer fails. [tests/tfma.c] Added a test that fails. It corresponds to the FIXME in src/fma.c about the test on MPFR_GET_EXP (u) - MPFR_GET_EXP (z). [src/fma.c] Removed a redundant test since the second condition of the && expression implies the first one. Note: This test came from the time when the precision type was unsigned, in order to make sure that the result of the subtraction was positive. 2018-04-11 Vincent Lefèvre [tests/tversion.c] Output "Generic ABI code" info (MPFR_GENERIC_ABI). [src/strtofr.c] English usage in a comment. 2018-04-11 Paul Zimmermann [src/strtofr.c] fixed bug in corner cases 2018-04-10 Vincent Lefèvre [src/strtofr.c] Reverted r12569: this is wrong with a 32-bit ABI. [src/strtofr.c] Added a FIXME. 2018-04-10 Paul Zimmermann [src/strtofr.c] added more comments [src/strtofr.c] replaced dead code by an assert [tests/tstrtofr.c] fixed bug20170308 and added coverage test 2018-04-09 Paul Zimmermann [src/strtofr.c] removed dead code (and added explanation) [src/strtofr.c] completed a comment 2018-04-06 Paul Zimmermann [src/strtofr.c] added comment [tests/tstrtofr.c] improve coverage 2018-04-06 Vincent Lefèvre [src/round_prec.c] Replaced an incorrect comment by an assertion. [src/round_raw_generic.c] Check validity of flag. 2018-04-06 Paul Zimmermann [NEWS] now 98.2% of test coverage 2018-04-06 Vincent Lefèvre [tests/Makefile.am] Tests in lexicographic order. 2018-04-06 Paul Zimmermann [src/round_prec.c] added comments [src/round_raw_generic.c] removed dead code [tests/tcan_round.c] improve coverage renamed tround_prec.c to tprec_round.c [src/round_prec.c] removed some dead code (if rnd1 = rnd2 and the case rnd2 = RNDN was already treated, we cannot have rnd1 = RNDN) 2018-04-06 Vincent Lefèvre [tests/tpow.c] Fixed a test: * For this test, unsigned long and mpfr_exp_t must both have at least 64 bits. * Use a hardcoded emax, otherwise the test could fail for mpfr_exp_t larger than 64 bits (one would not have an overflow as expected). [src/pow.c] Fixed the code in case the size of the mpfr_exp_t type would be larger than 256 bits. This is also semantically better. Moved the MAX, MIN and ABS macros from tests/mpfr-test.h to src/mpfr-impl.h (they can be useful...). [tests/tpow.c] More tests for (-2)^(2^i + 1), not just with i = 256. 2018-04-06 Paul Zimmermann [tests/tpow.c] modified a test for better coverage 2018-04-06 Vincent Lefèvre [tests/tpow.c] Corrected a comment (again). [tests/tpow.c] Corrected a comment. 2018-04-06 Paul Zimmermann [src/pow.c] simplified case x=2^b and y < 0 2018-04-05 Vincent Lefèvre [src/pow.c] Updated comments. [src/pow.c] Reverted r12541 (which yielded a failure in tpow_all), re-indented, and added a comment concerning the failing case. 2018-04-05 Paul Zimmermann [src/round_prec.c] fixed a bug (to be reviewed) [tests/tcan_round.c] added coverage tests [tests/ttan.c] improve coverage (and also of round_near_x) [src/pow.c] fixed typo 2018-04-04 Vincent Lefèvre [NEWS] Coverage is specific to x86_64 due to the various #if. [src/pow.c] Corrected indentation. 2018-04-04 Paul Zimmermann [NEWS] coverage is now 98.1% [src/pow.c] added a comment [src/pow.c] removed some dead code (with comment explaining why) [tests/tpow.c] added a test [src/pow.c] simplify code for prec=1 [tests/tpow.c] added tests for prec=1 2018-04-03 Paul Zimmermann [src/mparam_h.in] added macros for Microsoft compiler 2018-04-03 Vincent Lefèvre [tools/check_mparam.c] Added a copyright notice. [Makefile.am] Added tools/check_mparam.c and tools/ck-mparam to EXTRA_DIST since tools/ck-mparam is now run in dist-hook. [tests/Makefile.am] Do not output a useless "PASS ..." line at the end. [tests/Makefile.am] Update of the "check" rule: * Output svnversion info when applicable. * Do not echo "cat tversion.log 2> /dev/null || true". [Makefile.am] Added missing comments for dist-hook. [Makefile.am] Run ck-mparam in dist-hook (for "make dist"). [tools/ck-mparam] Commented out the old gcc-specific test since the new one is strictly more powerful. No longer depend on gcc. [tools/ck-mparam] Also check the mparam.h files with check_mparam.c. [tools/check_mparam.c] C89 compatibility. Return an error code (useful for scripts). [tools/check_mparam.c] A pathname of the mparam.h file can now be provided with -DMPARAM='"..."' when compiling. 2018-04-03 Vincent Lefèvre Moved misc/check_mparam.c into trunk/tools: it will be useful for "make dist" in order to make sure that all mparam.h files are OK before a release. [[Split portion of a mixed commit.]] [Added during the Subversion to Git conversion] The "misc" directory referenced here was in the same Subversion repository, but outside the trunk/branches/tags structure. Thus it has not been kept in the same Git repository. 2018-04-03 Vincent Lefèvre [src/mulders.c] Re-enable the change done in r12382. This is allowed after the fix in generic/mparam.h r12525 (this file was hand written and did not satisfy the current constraints). 2018-04-03 Paul Zimmermann [generic/mparam.h] ensure divhigh_ktab[n] is 0 or < n-1, as now required since commit r12382 2018-04-02 Vincent Lefèvre [src/mulders.c] Code style / indentation. Added a comment. [src/mulders.c] Reverting r12382 because divhigh_ktab[n] == n can happen. Note: this probably lacks documentation; moreover, testing that these tables satisfy the requirements would be useful. 2018-03-31 Vincent Lefèvre [src/inp_str.c] Handle size_t overflow, empty string (after skipping spaces), and I/O errors (as opposed to end-of-file). 2018-03-30 Paul Zimmermann [src/inp_str.c] disallow stream=NULL (cf r12520) [src/out_str.c] the behavior on a null stream is unspecified (cf r12519) 2018-03-30 Vincent Lefèvre Reverted r12516: the behavior on a null stream is unspecified. 2018-03-30 Paul Zimmermann [tests/tpow.c] restrict a test to 64-bit exponent 2018-03-29 Paul Zimmermann [src/pow.c] added comment [tests/tpow.c] improve coverage [tests/tout_str.c] improve coverage (I don't know how to avoid printing to stdout, but since "make check" no longer shows the test outputs, this should be fine). However I don't know how to do the same for mpfr_inp_str... [tests/tconst_pi.c] forgotten line in commit 12512 [tests/tgrandom.c] improve coverage [src/grandom.c] improve coverage, and solved a FIXME [tests/tconst_pi.c] improve coverage of mpfr_free_cache2 2018-03-29 Vincent Lefèvre [src/fpif.c] Reverted another incorrect change done in r12509. [src/fpif.c] Reverted an incorrect change done in r12509. 2018-03-29 Paul Zimmermann [src/fpif.c] simplify code and improve coverage to 100% [src/fpif.c] removed dead code and simplify code [tests/tfpif.c] improve coverage [tests/tfpif.c] improve coverage 2018-03-29 Vincent Lefèvre [tests/tfpif.c] Really fixed the badData test, completing r12504. [tests/tfpif.c] Fixed a test: for the huge-precision badData case, make sure that the data are valid so that we really check that the precision does not fit (and not a read error). [tests/tfpif.c] Correction just in case MPFR_PREC_BITS > 64. Removed trailing whitespace. 2018-03-28 Vincent Lefèvre [src/fpif.c] * Replaced an incorrect comment from r12500 by a correct assertion. * Fixed a theoretical bug coming from this incorrect comment. * Added a MPFR_ASSERTN assertion to double-check correctness. * Added a comment explaining a ... >= 0x80 test. 2018-03-28 Paul Zimmermann [src/fpif.c] removed dead code [tests/tfpif.c] improve coverage [src/gmp_op.c] fixed bug in mpfr_cmp_q for den(q)=0 [tests/tgmpop.c] improve coverage 2018-03-24 Vincent Lefèvre [doc/mpfr.texi] Typographic correction (texinfo rule). [tools/mpfrlint] For codespell, skip mpfr.t2p (directory created in doc by "make pdf"). [src/total_order.c] Simplified the code (shorter code). [tests/ttotal_order.c] Rewrote the tests to test every combination of classes of values. [tests] Renamed total_order.c to ttotal_order.c. 2018-03-23 Vincent Lefèvre [src/total_order.c] Suggest to test the sign bit first. [doc/mpfr.texi] Added mpfr_total_order in "Added Functions". [doc/mpfr.texi] Improved mpfr_total_order description. 2018-03-23 Paul Zimmermann [TODO] totalOrder is done added mpfr_total_order 2018-03-23 Vincent Lefèvre [tests] Removed some useless #include's, in particular all the unconditional #include occurrences. Note: There is an incompatibility between glibc 2.27 and the math.h provided by ICC 15 (at least), and this solves a compilation failure in the build of the tests. Moreover, is not required by freestanding implementations, so that it may be better to avoid it if possible. 2018-03-21 Paul Zimmermann added 2 suggestions from Patrick Pelissier 2018-03-20 Vincent Lefèvre [tools/mpfrlint] For codespell, skip all the algorithms.* files. 2018-03-15 Vincent Lefèvre [tools/mpfrlint] Added a comment for the mul/sqr test. [tools/mpfrlint] In the mul/sqr test (r12482), exclude mul.c and sqr.c. 2018-03-15 Paul Zimmermann changed mpfr_mul (a, b, b, ...) into mpfr_sqr (a, b, ...) whenever possible 2018-03-14 Vincent Lefèvre [tools/mpfrlint] Detect mpfr_mul with identical 2nd and 3rd arguments, which can be replaced by mpfr_sqr (suggestion by PZ). 2018-03-14 Paul Zimmermann [src/const_pi.c] added a reference, and replace mpfr_mul by mpfr_sqr 2018-03-10 Vincent Lefèvre [tests/tget_str.c] Fixed failure from r12473 when mpfr_prec_t is an int (missing casts for sprintf / printf). 2018-03-09 Vincent Lefèvre [tests/tget_str.c] C++ compatibility. [tests/tget_str.c] Use tests_allocate / tests_free. Fixed spelling mistakes found by codespell 1.12.0. 2018-03-09 Paul Zimmermann [tests/tget_str.c] added tests for corner cases of mpfr_set_str o mpfr_get_str 2018-03-08 Vincent Lefèvre [src/Makefile.am] In EXTRA_DIST, put the mparam.h in alphabetic order. [src/Makefile.am] Updated EXTRA_DIST for amd due to r12387. Fixed spelling mistakes found by codespell 1.11.0. [codespell.ignore] Also ignore "cas". Added codespell.ignore file with simple words to ignore with codespell ("iff" as used in math; "nd" as the n comes from \n in printf, but nd could also be a variable name; "te" as used as a variable name). Updated tools/mpfrlint to use this file with codespell. 2018-03-05 Vincent Lefèvre [doc/mpfr.texi] Updated the month. 2018-03-05 Paul Zimmermann [tests/tget_str.c] added tests for mpfr_get_str_ndigits [src/get_str.c] fixed bugs in mpfr_get_str_ndigits for b=2^k (value was 1 too large) and very large p (value was 1 too small) 2018-03-05 Vincent Lefèvre [doc/mpfr.texi] Typographic corrections for mpfr_subnormalize. [NEWS] Added mpfr_get_str_ndigits. [doc/mpfr.texi] Added mpfr_get_str_ndigits in "Added Functions". [doc/mpfr.texi] Minor corrections concerning mpfr_get_str. [src/mpfr.h] Added a note about a mpfr_prec_t limitation. [src/get_str.c] Simplified mpfr_get_str_ndigits (changes from r12455): * MPFR_PREC_BITS is used to exactly do what is wanted. * Removed dead code as currently, mpfr_prec_t <= unsigned long. Note: if in the future we support mpfr_prec_t > unsigned long (e.g. to have a 64-bit precision on MS Windows), the generic code could be retrieved back from r12455. 2018-03-05 Paul Zimmermann [src/get_str.c,src/mpfr.h] mpfr_get_str_digits -> mpfr_get_str_ndigits [doc/mpfr.texi] updated documentation of mpfr_get_str [src/get_str.c] fixed FIXME 2018-03-05 Vincent Lefèvre [src/get_str.c] Portability corrections in mpfr_get_str_digits. 2018-03-05 Paul Zimmermann [src/get_str.c] new function mpfr_get_str_digits [doc/mpfr.texi] added documentation for mpfr_get_str_digits 2018-03-03 Vincent Lefèvre [tests/tfma.c] Fixed bug from r12407 with 32-bit long and 64-bit limbs (e.g. as under 64-bit MS Windows). 2018-02-26 Vincent Lefèvre [acinclude.m4] Correction for test of the fallback to __float128: in the test program, define the variable outside main() in order to avoid an error when the -Werror=unused-variable GCC option is used. [src/get_sj.c] Avoid an unused variable. [doc/README.dev] Updated description of MPFR_WANT_FLOAT128. [doc/README.dev] Recommend AC_LINK_IFELSE rather than AC_COMPILE_IFELSE (see r12448 as an example of an issue with AC_COMPILE_IFELSE). [acinclude.m4] Fixed a test, which could define MPFR_INTMAX_WITHIN_LIMB even when not true (MPFR_STAT_STATIC_ASSERT() was just regarded as a function call since the macro was not defined, thus did not yield an error). [tests/tversion.c] Output the sizes of long and intmax_t. [acinclude.m4] Fixed incorrect test from r12426. Removed trailing spaces. Updated support for binary128: * __float128 was changed to _Float128 (ISO/IEC TS 18661) in r12391; also changed the suffix of the constants from "q" to "f128". * Use __float128 with the "q" suffix as a fallback in order to avoid regressions with GCC 6- and with C++ mode (g++). As documented in the GCC manual, this is entirely compatible on most platforms where both are supported: _Float128 and __float128 are the same type, and it could be checked that the following prototypes are equivalent (as expected): _Float128 f (__float128) __float128 f (_Float128) The only potential issues would be on hppa and IA-64 HP-UX, where __float128 is an alias for "long double" instead of _Float128, in case the ABI would be different (I have no information about this) and both would be mixed up with software using the MPFR conversion functions for binary128 via __float128 or "long double". The worst thing that could happen is a link error. If the link is accepted, everything should be fine as the representation doesn't change. [src/set_float128.c] Removed a useless #include and corrected a comment. 2018-02-25 Vincent Lefèvre [src/get_z_exp.c] Portability. [tests/tdiv_ui.c] Avoid a compilation error with gcc -std=c90 -pedantic -Werror in 32-bit ABI. [tests/tget_str.c] Fixed a return type. 2018-02-24 Paul Zimmermann [src/get_z_exp.c] new try for r12437. If that still does not work, we should define macros BITS_PER_EXP_T, BITS_PER_PREC_T, ... 2018-02-23 Vincent Lefèvre [src/get_z_exp.c] Reverted r12437: the size of mpfr_exp_t is not always related to the size of mp_limb_t. 2018-02-23 Paul Zimmermann [src/get_z_exp.c] removed dead code on 64-bit computer [src/get_str.c] improved case m < g [tests/tget_str.c] improve coverage 2018-02-23 Vincent Lefèvre [acinclude.m4] Correction: for AC_COMPILE_IFELSE, there are only 2 cases: TRUE and FALSE. 2018-02-23 Paul Zimmermann [tests/tget_str.c] fixed not enough allocation issue 2018-02-23 Vincent Lefèvre [acinclude.m4] Correction: for AC_COMPILE_IFELSE, there are only 2 cases: TRUE and FALSE. 2018-02-23 Paul Zimmermann [doc/mpfr.texi] m=1 is now valid in get_str [src/get_str.c] allow m=1 for b=2^k [tests/tget_str.c] added test for m=1 and b=2 [src/get_str.c] added a comment [tests/tget_str.c] improved coverage (finding this example was quite hard!) 2018-02-23 Vincent Lefèvre [src/get_sj.c] Removed two assertions, including an incorrect one. Added an assertion. [acinclude.m4] Correction: if we cannot test, the portable code must be selected. 2018-02-23 Paul Zimmermann [configure.ac,acinclude.m4] added new macro MPFR_INTMAX_WITHIN_LIMB [src/get_sj.c] optimized the code when MPFR_INTMAX_WITHIN_LIMB=1 2018-02-23 Vincent Lefèvre [src/mpfr-impl.h] Removed MPFR_LIMBS_PER_LONG_DOUBLE as it was not properly specified in the general case and was actually used only in src/set_ld.c with HAVE_LDOUBLE_IEEE_EXT_LITTLE. [src/set_ld.c] Simplified code. Moreover, the hypothetical case GMP_NUMB_BITS == 16 will trigger a compilation error instead of yielding incorrect code. [tests/tbuildopt.c] * Added missing const. * Use the variable s to avoid a warning and also to detect potential undefined behavior with debugging tools if s is not a string. 2018-02-23 Paul Zimmermann [src/get_sj.c] fixed typo [src/get_sj.c] added comments and simplified the code 2018-02-23 Vincent Lefèvre [src/mpfr-impl.h] Typo in a comment. 2018-02-23 Paul Zimmermann [tests/tget_q.c] improved coverage 2018-02-23 Vincent Lefèvre [src/get_d64.c] Parsing in the portable version of string_to_Decimal64: similar changes as in r12416 for the _MPFR_IEEE_FLOATS version. 2018-02-23 Paul Zimmermann [src/get_ld.c] removed dead code (as in r12413 for mpfr_get_d) [src/get_flt.c] optimized code when MPFR_LIMBS_PER_FLT=1 [tests/tget_flt.c] improved coverage [src/get_d64.c] simplified code, and removed dead code [src/mpfr-impl.h] added comment [tests/tget_set_d64.c] improve coverage 2018-02-23 Vincent Lefèvre [src/set_q.c] Simplified code. 2018-02-23 Paul Zimmermann [src/get_d.c] removed dead code [src/get_d.c] optimized for common case MPFR_LIMBS_PER_DOUBLE=1 [tests/tset_z_exp.c] improved coverage [src/set_q.c] removed dead code on 64-bit processor [src/set_ld.c] improve code when HAVE_LDOUBLE_IEEE_EXT_LITTLE is defined 2018-02-22 Vincent Lefèvre [src/set_ld.c] Reverted r12408: MPFR_LIMBS_PER_LONG_DOUBLE cannot be used with the preprocessor due to the use of "sizeof". 2018-02-22 Paul Zimmermann [src/set_ld.c] improve code for MPFR_LIMBS_PER_LONG_DOUBLE=1 [tests/tfma.c] improved coverage of mpfr_set_1_2 [tests/tbuildopt.c] improve coverage 2018-02-22 Vincent Lefèvre [tests/tfma.c] Corrected a comment. [tests/tfma.c] Joined test_overflow3 and test_overflow4 by using a loop. Improved the corresponding test and error message. Also run this test with the default exponent range. [src/fma.c] Added FIXME for r12396, which still seems incorrect. [src/mpfr-impl.h] Typo in a comment. [NEWS] Update about the change of __float128 to _Float128: clarification that it is from ISO/IEC TS 18661 ("standard" was too vague); added FIXME on a possible fallback to __float128 and ABI considerations. [configure.ac] For --enable-float128, this is still autodetect, e.g.: checking if compiler knows _Float128 with C99 constants... no Added a FIXME: a fallback to __float128 is necessary to avoid regressions. 2018-02-22 Paul Zimmermann [src/sqr.c] added comments [tests/tsqr.c] improve coverage of sqr.c to 100% [src/sqr.c] fixed a bug in mpfr_sqr_1n in a rare case near underflow, only use mpfr_sqr_1, mpfr_sqr_1n, mpfr_sqr_2, mpfr_sqr_3 when all numbers have same precision (like for mpfr_mul), and added comments [tests/tsqr.c] added tests, including non-regression for above bug [src/fma.c] added comments and a FIXME [src/fma.c] fixed last failure [tests/tfma.c] removed debug stuff [tests/tfma.c] added new failing test [src/fma.c] fix failure from last test [src/fma.c] added comments [tests/tfma.c] added a test (currently failing) [mips/mparam.h] updated changed __float128 (gcc specific) into the standard type _Float128 [arm/mparam.h] updated [x86/mparam.h] updated [src/mparam_h.in] amd/k8/mparam.h -> amd/mparam.h [amd/mparam.h] updated [sparc64/mparam.h] updated [x86_64/core2/mparam.h] updated [powerpc64/mparam.h] updated [x86_64/mparam.h] updated [src/mulders.c] removed dead code 2018-02-21 Paul Zimmermann [tune/tuneup.c] ensure k < n in mpfr_divhigh_n[] [src/mparam_h.in] added __tune_znver1__ for AMD64 (e.g., gcc67.fsffrance.org) [src/mips/mparam.h] updated on gcc22 [NEWS] added item removed tuning for x86/core2, updated tuning for generic x86 [src/sparc64/mparam.h] updated tuning parameters for sparc64 2018-02-21 Vincent Lefèvre [src/mparam_h.in] Use the generic parameters for x86_64 with Clang. 2018-02-21 Paul Zimmermann added tuning for ARM 2018-02-21 Vincent Lefèvre Reverted r12368: sparc64 tuning should be updated on gcc202. 2018-02-21 Paul Zimmermann [src/mparam_h.in] generic case for all remaining i386's [src/mparam_h.in] put back __tune_k8__ [src/mparam_h.in] check __amd64__ before generic __x86_64__ removed tuning for hppa (gcc61 is offline) removed tuning parameters for sparc64 (gcc64, gcc200 and gcc201 are offline) [tune/tuneup.c] for mpfr_div_threshold, start from 3 limbs again removed tuning for powerpc32 (no such machine available any more) [src/powerpc64/mparam.h] updated tuning parameters for powerpc64 [src/amd/k8/mparam.h] fixed MPFR_DIV_THRESHOLD updated tuning parameters for amd/k8 and x86/core2 2018-02-21 Vincent Lefèvre Reverted r12359 and added a comment: tuning for x86 is used when building GMP/MPFR with a 32-bit ABI (ABI=32 / -m32). 2018-02-21 Paul Zimmermann [tuneup.c] start from 4 limbs for mpfr_div_threshold removed tuning for ia64 (gcc60.fsffrance.org is now offline) removed tuning for x86 (no more access to such machine) [tune/tuneup.c] make tune_simple_func more robust for small precisions [src/x86_64/mparam.h] fixed MPFR_DIV_THRESHOLD [x86_64/core2/mparam.h] updated on gcc14 2018-02-21 Vincent Lefèvre [acinclude.m4] In the "long double" format recognition, added size information for IEEE extended (not used by MPFR, but this may be useful information for the user). 2018-02-21 Paul Zimmermann removed tuning parameters for amd/athlon (we have no access to such machine any more) removed tuning for pentium4 removed tuning for corei5 (was not used) [src/x86_64/mparam.h] added tuning for generic x86_64 [tune/tuneup.c] mpfr_divhigh now wants n >= 2 removed thresholds for arm since gcc57 is no longer available, thus we cannot tune on an ARM machine 2018-02-21 Vincent Lefèvre [src/mulders.c] Removed unused variable dinv. 2018-02-20 Paul Zimmermann [src/div.c] added comment [src/mpfr-gmp.h] moved definition of MUL_FFT_THRESHOLD [src/mulders.c] removed unused code, and force n>=2 in mpfr_divhigh_n_basecase [tests/tmul.c] improve coverage [tune/tuneup.c] forbid k = n-1 in divhigh_ktab[] [tests/tdiv.c] improve coverage, now 100% for div.c [src/ai.c] revert part of r12312 [tests/tai.c] added coverage test provided by Sylvain Chevillard [src/sub1.c] revert r12317 since it did not consider UBFs. For the record, tfmma was failing with GMP_CHECK_RANDOMIZE=1519138438006416. [src/div.c] get rid of mpfr_div_with_mpz_tdiv_q 2018-02-20 Vincent Lefèvre [src/gmp_op.c] Fixed a bug in mpfr_cmp_q on NaN rational: the NaN flag was set by mpfr_set_q, but the flags were not restored just after. [src/gmp_op.c] Reverted incorrect change in r12337 for mpfr_cmp_q. Explanation in comment. If the code was not tested, it should be by using mpq_set_num and mpq_set_den to construct such rationals. 2018-02-20 Paul Zimmermann [tests/tdiv.c] improve coverage [tests/tdiv.c] improve coverage of mpfr_div_2 2018-02-20 Vincent Lefèvre [src/{add,sub}1sp.c] Updated/added comments for MPFR_WANT_ASSERT >= 2. 2018-02-20 Paul Zimmermann [src/div.c] removed dead code [src/gmp_op.c] removed dead code [tests/tgmpop.c] improve coverage of gmp_op.c to 100% 2018-02-20 Vincent Lefèvre [acinclude.m4] Added missing ";;" before "esac" for code robustness. [acinclude.m4] Added a FIXME. Added a ";;" for safety. 2018-02-20 Paul Zimmermann [acinclude.m4] added comment, and define MPFR_LONG_WITHIN_LIMB when cannot test 2018-02-20 Vincent Lefèvre [src/random_deviate.c] Improved highest_bit_idx in the case where MPFR_LONG_WITHIN_LIMB is not defined (tested with GCC). 2018-02-20 Paul Zimmermann [src/mul.c] resolved FIXME and removed dead code [tests/tmul.c] improve coverage [src/random_deviate.c] highest_bit_idx() assumes x > 0 [src/random_deviate.c] fixed comment [src/random_deviate.c] redo change r12315 using MPFR_LONG_WITHIN_LIMB [src/sub1.c] added 2 FIXME 2018-02-19 Vincent Lefèvre [tests/tai.c] Renamed test_near_zero to test_near_m2e, since this is "exercise mpfr_ai near m*2^e", as documented. Corrected comments. [tests/tai.c] For test_near_zero(), check that the NaN flag was not set (useful since such tests don't really check that the result is not NaN). 2018-02-19 Paul Zimmermann [tests/tmul.c] improve coverage [tests/tmul.c] improve coverage 2018-02-19 Vincent Lefèvre [src/random_deviate.c] Reverted incorrect change r12315: MPFR_LIMB_MAX cannot be used with the preprocessor due to the cast. The test should be done in "pure" C and the middle-end of the compiler should optimize. [src/sub1.c] Removed an unused label. [tests/tzeta.c] Check that the NaN flag was not set in some tests that do not involve NaN (useful since such tests don't really check that the result is not NaN). 2018-02-19 Paul Zimmermann [src/sub1.c] removed dead code, now coverage should be 100% 2018-02-19 Vincent Lefèvre [src/ai.c] Avoid more integer overflows. 2018-02-19 Paul Zimmermann [src/sub1.c] removed dead code [tests/tsub.c] added coverage test 2018-02-19 Vincent Lefèvre [src/ai.c] Detect some potential integer overflows. 2018-02-19 Paul Zimmermann [src/random_deviate.c] don't compile alternate code if not needed 2018-02-19 Vincent Lefèvre [src/ai.c] Coding style. Corrected comments. 2018-02-19 Paul Zimmermann [tests/tzeta.c] improve coverage (and also uceil_exp2.c) [src/ai.c] removed dead code, and improved coverage [tests/tai.c] exercise mpfr_ai near (negative) zeroes [src/ai.c] fixed recomputation of wprec (to be confirmed) [src/ai.c] removed dead code 2018-02-19 Vincent Lefèvre [src/sub1sp.c] Fixed indentation. Removed trailing whitespace. [src/sqrt.c] Coding style. [src/expm1.c] Avoid a potential integer overflow in a type conversion for 32-bit mpfr_exp_t and 64-bit long (e.g. with -D_MPFR_PREC_FORMAT=2 on a 64-bit Linux machine). [src/div_2ui.c] Reverted incorrect change in r12272 and added comments and assertions. [tests/tmul_2exp.c] Improved a test to trigger the bug in r12272 also when mpfr_exp_t > 32 bits (e.g. on 64-bit Linux machines). [tests/tmul_2exp.c] Improved output if mpfr_exp_t > long (for positive). [tests/tmul_2exp.c] Improved output if mpfr_exp_t > long (for negative). [tests] Fixed type errors with -D_MPFR_PREC_FORMAT=2 in CFLAGS and the --enable-assert=full configure option (signaled by GCC's -Wformat). [src/mul.c] Fixed type error with -D_MPFR_PREC_FORMAT=2 in CFLAGS and the --enable-assert=full configure option (signaled by GCC's -Wformat). [doc/README.dev] Removed the mention of MPFR_EXT_EMIN and MPFR_EXT_EMAX, replacing them by MPFR_EMIN_MIN and MPFR_EMAX_MAX, as done in r12298. Note: These old macros had been introduced in r7863 so that one could choose different values for the extended exponent range for debugging purpose, but they were not used in practice and were adding complexity (and potential inconsistency) for no really good reason. 2018-02-18 Paul Zimmermann [src/agm.c] added comment about line of code impossible to cover [src/agm.c,src/div.c,src/mpfr-impl.h] replaced MPFR_EXT_EMIN by MPFR_EMIN_MIN, and MPFR_EXT_EMAX by MPFR_EMAX_MAX [src/sqrt.c] removed dead code [tests/tsqrt.c] improve coverage of mpfr_sqrt, now at 100% [tests/tsqrt.c] improve coverage [tests/tsqrt.c] improve coverage 2018-02-17 Paul Zimmermann [src/sqrt.c] removed dead code [tests/tsqrt.c] improve coverage [tests/tsqrt.c] improved coverage [src/sqrt.c] added comments 2018-02-17 Vincent Lefèvre [src/expm1.c] Added a FIXME comment. 2018-02-17 Paul Zimmermann [tests/tsqrt.c] improve coverage [src/sqrt.c] removed dead code 2018-02-17 Vincent Lefèvre [tests/tsub.c] Improved a comment. [tests/tsub.c] Check reuse of arguments for all mpfr_sub tests, when possible. 2018-02-17 Paul Zimmermann [src/sub1sp.c] fixed bug in mpfr_sub1sp1n (corner case when a=c) [tests/tsub1sp.c] added non-regression test [src/sub1sp.c] fixed case 2e 2018-02-17 Vincent Lefèvre [tests/tsub.c] Updated bug20180217 to trigger the bug: one needs to reuse the smallest input variable as the output variable. [tests/tsub.c] Added a test. [src/expm1.c] Updated a comment. [src/expm1.c] Fixed an integer overflow from r12276. [src/expm1.c] Added a log message. 2018-02-16 Paul Zimmermann [tests/tfmma.c] added coverage test [tests/tfmma.c] improve coverage of add.c (ubf case) 2018-02-16 Vincent Lefèvre [src/expm1.c] It seems that code removed in r12273 wasn't necessarily dead code with mpfr_exp_t > long (-D_MPFR_EXP_FORMAT=4 needed) because for MPFR_SMALL_INPUT_AFTER_SAVE_EXPO, err would be limited to -LONG_MAX and precisions larger than LONG_MAX could be problems. The -LONG_MAX bound from r4127 was arbitrary and only used to simplify the code due to the fact that mpfr_cmp_si compares to a "long" argument. But now we have the internal mpfr_get_exp_t function, allowing us to avoid this arbitrary bound (fixing the code and making it more efficient for these extreme cases) and simplify the code even more. 2018-02-16 Paul Zimmermann [mbench] added new option to usage [mbench] added option -d to fix the exponent difference between operands (useful for mpfr_add and mpfr_sub, for example use -d0 for operands with same exponent, -d1 for operands differing by 1, ...) [src/expm1.c] improve coverage (by removing dead code) 2018-02-16 Vincent Lefèvre [src/div_2ui.c] No need for mpfr_uexp_t, due to the constraints on the valid exponents. [doc/README.dev] Update about mpfr_exp_t. [src/mul_2ui.c] Simplified mpfr_mul_2ui (like mpfr_div_2ui). [src/div_2ui.c] Simplified justification. [src/div_2ui.c] Simplified code as suggested by PZ; added justification. 2018-02-16 Paul Zimmermann GNU style: https://www.gnu.org/prep/standards/standards.html#Formatting [src/div_2ui.c] added comment [tests/tmul_2exp.c] added coverage test 2018-02-16 Vincent Lefèvre [src/div_2ui.c] Replaced FIXME by an explanation. 2018-02-16 Paul Zimmermann [src/div_2ui.c] added FIXME [src/cmp_ld.c] simplified code (and avoid useless test when long double is not double-double) [tests/tsub1sp.c] improve coverage [tests/tadd1sp.c] improve coverage of add1sp [src/sub1sp.c] fixed bug20180216 [tests/tadd1sp.c] added coverage test 2018-02-16 Vincent Lefèvre [tests/tsub.c] More tests in bug20180216. [tests/tsub.c] Added bug20180216 test currently failing (corresponding to the failure mentioned in r12253, r12254 and r12255, but reproducible with a simple "./configure"). [src/exp_2.c] Note that the internal behavior depends on whether MPFR_LONG_WITHIN_LIMB is defined or not (see also r12253). This should not matter, possibly except in case of bug, like currently. [acinclude.m4] Updated FIXME for MPFR_CHECK_MP_LIMB_T_VS_LONG. [acinclude.m4] Added a FIXME for MPFR_CHECK_MP_LIMB_T_VS_LONG. [src/sub1sp.c] Squeezed useless double-space. 2018-02-15 Paul Zimmermann [src/sub1sp.c] fixed bug20180215() 2018-02-15 Vincent Lefèvre [tests/tsub.c] Updated comment for bug20180215. [src/sub1sp.c] Use "else" for symmetry with above code. [tests/tsub.c] Added a comment for bug20180215 (bug in the case 2 <= d < p in generic code mpfr_sub1sp() introduced in r12242). [tests/tsub.c] Added bug20180215 test currently failing, found from a failure using -DMPFR_GENERIC_ABI in CFLAGS and the --enable-assert=full configure option; but the test had to be extended so that it also fails with a simple "configure", i.e. without -DMPFR_GENERIC_ABI in CFLAGS and without the --enable-assert=full configure option. Removed trailing whitespace. 2018-02-14 Paul Zimmermann [src/sub1sp.c] review of case 2 <= d < p in generic code mpfr_sub1sp() [src/div_ui.c] GNU style [src/sub1sp.c] reviewed the code for d>=p in mpfr_sub1sp() 2018-02-14 Vincent Lefèvre [tools/mpfrlint] Much improved the check of the use of GMP internals. 2018-02-14 Paul Zimmermann [src/sub1sp.c] fixed a FIXME [src/mpfr-gmp.h] define prototype of __gmpn_rsblsh1_n [src/sub1sp.c] changed names of variables to something more readable [configure.ac] detect mpn_rsblsh1_n instead of mpn_rsblsh_n [src/sub1sp.c] use mpn_rsblsh1_n instead of mpn_rsblsh_n with k=1 2018-02-14 Vincent Lefèvre [src/sub1sp.c] Added 2 FIXME's. [src/sub1sp.c] In mpfr_sub1sp, initialize k only once. This slightly simplifies the code and avoids a -Wmaybe-uninitialized warning from GCC. The only failure on a 64-bit Linux machine is tsub1sp, due to an assertion failure in mpfr_sub1sp, as before this change. [src/sub1sp.c] Avoid the swapping of the exponents when they are equal. 2018-02-13 Paul Zimmermann [src/sub1sp.c] review of case d=1 in generic code [src/add1sp.c] no need of MPFR_TMP_MARK any more [src/sub1sp.c] end of review of case d=0 in generic code [src/sub1sp.c] work in progress 2018-02-13 Vincent Lefèvre [src/add1sp.c] Moved a MPFR_ASSERTD to the right place. 2018-02-13 Paul Zimmermann [src/sub1sp.c] re-enable __gmpn_rsblsh_n (with WANT_GMP_INTERNALS) [src/sub1sp.c] small improvement [tools/cfarm.sh] updated for 4.0.1-rc2 [src/add1sp.c] mp_ptr -> mp_limb_t* [src/add1sp.c] get rid of MPN_COPY/MPN_ZERO in generic code 2018-02-13 Vincent Lefèvre [src/add1sp.c] Improved comments and other minor changes. [src/add1sp.c] In the generic code of mpfr_add1sp, fixed the computation of the round and sticky bits from r12220. At the same time, improved the handling of MPFR_RNDF in this part of the code: * The "while" loop to compute the sticky bit is no longer done in this case (the sticky bit does not matter). * The "goto" is avoided. [tests/tadd.c] Added 2 tests that fail starting with r12220. 2018-02-12 Paul Zimmermann [src/add1sp.c] cleanup generic code mpfr_add1sp() 2018-02-09 Vincent Lefèvre [src/fma.c] Added a FIXME comment about overflow/underflow issues in corner cases (already caught with MPFR_ASSERTN), fixable with UBF like in mpfr_fmma. [src/hypot.c] Updated a comment: The problem that would come from an underflow in y^2, in particular because x was scaled in order to avoid an overflow in x^2, has been avoided by using a FMA (though still buggy for these cases, as mentioned just above). 2018-02-08 Vincent Lefèvre [tests] Added/updated comments about the config.h inclusion. [tests/{tset_float128.c,tset_ld.c}] Removed obsolete WITH_FPU_CONTROL related code (this should have been done in r12185). 2018-02-07 Vincent Lefèvre [INSTALL] Updated GMP URL. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Corrected minimal GMP version. [tools/mpfrlint] Updated test to detect minimal GMP version mismatch. [INSTALL] Corrected minimal GMP version (thanks to David Edelsohn). [tools/mpfrlint] Added a test to detect minimal GMP version mismatch. [tools/announce-text] For releases, check the VERSION file of the tag. [doc/README.dev] "To make a release": moved a sentence. 2018-02-02 Vincent Lefèvre [tests/tdiv_ui.c] Forcibly disable value coverage checking if mp_limb_t > unsigned long (e.g. on mips64 with the n32 ABI). [tests/tdiv_ui.c] Corrected comments. [tests/t*random*.c] * Replaced calloc + free by tests_allocate + tests_free as usual. * trandom.c, turandom.c: do bitwise operations in unsigned arithmetic. [tests/t*random*.c] * Replaced some fprintf with stderr by printf (but not those concerning memory allocation errors). * Do bitwise operations in unsigned arithmetic. * Formatting. [tests] Formatting. [tests/tests.c] Make stderr unbuffered again. Note for the history: both stdout and stderr were made unbuffered in r2361, then all stderr were changed to stdout (and the corresponding setbuf on stderr removed) in r2449 for consistency, but stderr was used later for specific cases (e.g. memory allocation errors or when stdout is already used for something else), and it is also used for assertion failures. Thus the setbuf on stderr is still needed. [tests] Fixed the cases where tests_start_mpfr was called too late, i.e. after potential output (to stdout). * tremquo.c: moved the call to tests_start_mpfr to the beginning. * tset_float128.c, tset_ld.c: removed the optional, obsolete code setting the FPU control word; MPFR_FPU_PREC can be used instead (see tests.c). Reverse-merged r12181 since tests_start_mpfr disables stdout buffering, so that the fflush() are unnecessary. [tests/tabort_*.c] Flush stdout after a printf(), as an abort() is expected. This is needed on platforms where abort() does not flush the stdio streams, such as with the GNU C Library (glibc) 2.27. 2018-02-01 Vincent Lefèvre [NEWS] Mention "make check-exported-symbols" (experimental). [tests/tdiv_ui.c] Portability update, in case MPFR_PREC_MIN > 1. 2018-01-31 Vincent Lefèvre [tests/tdiv_ui.c] In corner_cases, test larger values for xn, as suggested by Paul, allowing one to cover case 2 for both sb=0 and sb=1. Value coverage is now complete. [tests/tdiv_ui.c] Updated midpoint_exact to also test the divisor ULONG_MAX, allowing one to cover cases 3 and 4. [tests/tdiv_ui.c] Added tests with simple midpoint and exact cases. This covers case 9, sb=0. Added a case for the value coverage for tdiv_ui. → Now, on a 64-bit Linux machine: mpfr_div_ui not tested on case 2, sb=0 mpfr_div_ui not tested on case 2, sb=1 mpfr_div_ui not tested on case 3, sb=0 mpfr_div_ui not tested on case 4, sb=0 mpfr_div_ui not tested on case 9, sb=0 Added value coverage for tdiv_ui (combinations of rb and sb in the different cases of the mpfr_div_ui code). → Currently on a 64-bit Linux machine: mpfr_div_ui not tested on case 2, sb=0 mpfr_div_ui not tested on case 3, sb=0 mpfr_div_ui not tested on case 8, sb=0 [src/div_ui.c] Case tmp[yn] != 0: simplified code since u ≥ 2. [src/div_ui.c] Case tmp[yn] == 0: * corrected/improved comments; * simplified condition rb && sb to rb (since if rb ≠ 0, then r ≠ 0, so that the current sb ≠ 0); * replaced "& (~MPFR_LIMB_HIGHBIT)" by "<< 1" (should be simpler). 2018-01-30 Paul Zimmermann [src/div_ui.c] fixed corner case (hopefully) 2018-01-30 Vincent Lefèvre [tools/mpfrlint] Improved a regexp (avoiding false positives). [tests/tdiv_ui.c] corner_cases() requires limbs to fit in unsigned long. [tests/tdiv_ui.c] Back to a decimal constant (the UL suffix was incorrect, but just a U is OK). 2018-01-30 Paul Zimmermann [tests/tdiv_ui.c] added test for corner case (currently fails) 2018-01-30 Vincent Lefèvre [tests/tdiv_ui.c] Fixed a value (from a zsh bug). [src/div_ui.c] Comment: now, "i.e." is correct. [tests/tdiv_ui.c] Added ABI-independent bug20180126 tests. 2018-01-30 Paul Zimmermann [src/div_ui.c] fixed a comment 2018-01-30 Vincent Lefèvre [src/div_ui.c] Typo in a comment. [src/div_ui.c] Updated a comment. [src/div_ui.c] Clarified the notation (this was ambiguous, with two possible interpretations). Added comments about mpn_divrem_1. [src/div_ui.c] Added a FIXME. 2018-01-30 Paul Zimmermann [src/div_ui.c] fixed a comment, and added a FIXME 2018-01-29 Vincent Lefèvre [src/div_ui.c] Clarified a comment. [src/div_ui.c] Started to review the code; minor changes. [src/div_ui.c] Minor update of comments. [src/div_ui.c] Fixed the exact case, which used nexttoinf uninitialized. [tests/tdiv_ui.c] bug20180126: enable the test only when a limb fits in an unsigned long; clarified a comment. 2018-01-28 Paul Zimmermann [src/div_ui.c] fixed bug20180126 (from tdiv.c), with a complete rewrite of mpfr_div_ui using the round and sticky bits [tests/tdiv_ui.c] added more tests 2018-01-27 Vincent Lefèvre [tests/tdiv.c] mpfr_div bug bug20180126: also test negative values. [tests/tdiv.c] Updated comment about mpfr_div bug bug20180126. [tests/tdiv.c] mpfr_div bug bug20180126 was introduced by r9086. 2018-01-26 Vincent Lefèvre [tests/tdiv.c] Completed r12128 test with new comments and an assert. [tests/tdiv.c] Added test case for a mpfr_div bug of MPFR 4. 2018-01-25 Vincent Lefèvre [doc/README.dev] Added information about symbol checking. 2018-01-23 Vincent Lefèvre [tests/tests.c] Mention a libtool 2.4.6 bug concerning Solaris, yielding potential failures if a compatible MPFR version is already installed: this MPFR library is tested instead of the one that has just been built. 2018-01-22 Vincent Lefèvre [NEWS] + Improved __GMP_CC and __GMP_CFLAGS retrieval. [configure.ac] In the CC and CFLAGS setup from gmp.h, added to the cpp list: "clang -E"; "cl -E" and "icl -E" for Windows ICC and MSVC (suggested by Alexander). 2018-01-20 Vincent Lefèvre [doc/README.dev] "To make a release": mention "make check-gmp-symbols" and "make check-exported-symbols". [Makefile.am] Updated comments. [src/Makefile.am] For check-gmp-symbols and check-exported-symbols, if the library is not $(top_builddir)/src/.libs/libmpfr.so, these rules do nothing instead of potentially failing. Added check-exported-symbols make rule to check that MPFR does not define symbols with a GMP reserved prefix. 2018-01-18 Vincent Lefèvre [src/mp_clz_tab.c] Fixed a condition (see bug mentioned at r12107). [src/mpfr-gmp.h] Reverse-merged r11969, which yields a build failure under MinGW when GMP is built with "--disable-shared --enable-static --enable-assert --disable-assembly" and MPFR is built using the GMP build. Indeed, this commit was incorrect, as if the GMP build is used, then this is GMP's longlong.h that is used and GMP's __clz_tab version that should be used. The real cause of the "multiple definition of `__gmpn_clz_tab'" error reported at https://sympa.inria.fr/sympa/arc/mpfr/2017-12/msg00061.html is that MPFR defines its own __gmpn_clz_tab while this is not needed (and must not be done) when the GMP build is used. 2018-01-16 Vincent Lefèvre [TODO] - Decide whether multiple calls to mpfr_clear should be allowed. [TODO] + Decide whether multiple calls to mpfr_clear should be allowed. 2018-01-13 Vincent Lefèvre ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". [NEWS] Update. Prepare for new version 4.1.0. [doc] Updated FAQ.html with update-faq. 2018-01-10 Vincent Lefèvre [tests/tlgamma.c] bug20180110: test the ternary value and the flags. [src/lngamma.c] Fixed mpfr_lgamma bug for tiny negative x, in case emax < exponent of the result (the issue was an overflow in the "fast" algorithm, which made it loop with more and more working precision). [src/lngamma.c] Removed a useless cast. [tests/tlgamma.c] Added a test case for a bug found from the tgeneric change done in r12088. [tests/tgeneric.c] Do several overflow/underflow tests instead of 1, and this for each precision. This allows one to detect the mpfr_ai bug found and fixed on 2018-01-07 (with 32-bit *and* 64-bit ABI): https://sympa.inria.fr/sympa/arc/mpfr/2018-01/msg00001.html Moreover, this makes tlgamma loop with a 32-bit ABI (x86). To be fixed. [tests/tgeneric.c] Added comments for tests in a reduced exponent range. [tests/tsprintf.c] About r12084, simplified the code, without needing strncpy. [tests/tsprintf.c] Fixed strncpy usage, in particular to ensure a null-terminated string (bug detected by gcc-snapshot 20180107-1 under Debian with -Werror=stringop-truncation). 2018-01-09 Vincent Lefèvre [doc/mpfr.texi] Fixed the @GMPabs macro in tex mode: due to the use of the OT1 encoding, the pipe character "|" was giving a wide dash. [doc/mpfr.texi] For mpfr_custom_get_exp, restored the spec for NaN, infinity and zero, with more details. [doc/mpfr.texi] Improved description of mpfr_custom_init_set. Note: For the versions of the manual generated with TeX (PDF/DVI/PS), "|kind|" appears as "—kind—", and the description of mpfr_ai has the same issue (since its introduction in MPFR 3.0.0). The cause is unclear, and this will be fixed later. 2018-01-09 Paul Zimmermann [doc/mpfr.texi] for mpfr_custom_get_exp, explain the significand is considered in [1/2,1) as for mpfr_get_exp 2018-01-09 Vincent Lefèvre [doc] * texinfo.tex: update to the latest version 2018-01-09.11, which supports @var with script font size without any drawback. * mpfr.texi: replaced the now useless @svar by @var. 2018-01-07 Vincent Lefèvre [tests/tai.c] In bug20180107, also check the flags. [src/ai.c] Really fixed the bug. [src/check.c] Typo. 2018-01-07 Paul Zimmermann [src/ai.c] missing call to mpfr_check_range [tests/tai.c] added test that fails on x86_64 [tests/tai.c] added test for bug in mpfr_ai (see thread https://sympa.inria.fr/sympa/arc/mpfr/2018-01/msg00001.html) 2018-01-03 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [tools/ck-mparam] In the copyright notice, just keep the year 2011 since this file is not part of the tarball (just used by mpfrlint). Copyright notice update: added 2018 with perl -pi -e 's/ (\d{4}-)?(2017)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the ck-mparam and timings-mpfr.c files and the mbench directory under "tools" (not distributed with MPFR). Removed 2017 from the example in the doc/README.dev file. 2018-01-03 Paul Zimmermann [src/zeta.c] added comments and FIXME Note (2019-04-30): a bug has also been introduced (fixed in r13485). 2017-12-25 Vincent Lefèvre [NEWS] Minor corrections for GNU MPFR 4.0.0. 2017-12-23 Vincent Lefèvre [tests/tests.c] Added a note about gettimeofday() and a cast. [tests/tests.c] Fixed a potential integer overflow from r12053 with GMP_CHECK_RANDOMIZE=1, in particular under a 32-bit Linux. 2017-12-23 Paul Zimmermann [tests/tests.c] decrease probability of collision with random seed [src/exp_2.c] fixed bug from previous commit [src/subnormal.c] added assert [tests/texp.c] added test for new bug 2017-12-22 Vincent Lefèvre Removed trailing whitespace. [src/subnormal.c] Replaced FIXME. [tests/tj1.c] Avoid a potential integer overflow. 2017-12-22 Paul Zimmermann [src/subnormal.c] added FIXME [src/sin.c] simplified code with RNDA [src/hypot.c] mimic mpfr_round_near_x [tests/tj1.c] exercise corner case [tests/tj1.c] added test for j1(z) with small z [src/hypot.c] fixed issue with overflow flag not correctly set 2017-12-21 Vincent Lefèvre [src/next.c] Reverted r12035 as per documentation, which follows IEEE 754 (with the usual special treatment for the single NaN). 2017-12-21 Paul Zimmermann [src/next.c] fixed nextinf (missing overflow flag) [tests/thypot.c] removed debug call to mpfr_dump in previous commit [tests/thypot.c] another fix... [tests/thypot.c] fixed bug20171221() [tests/thypot.c] new failing test [src/lngamma.c] fixed bug when u=0 in case z0 < 1 [tests/tlngamma.c] fixed test case which was wrong 2017-12-20 Paul Zimmermann [tests/tlngamma.c] added test for new failure [src/lngamma.c] fixed bug found in previous commit [tests/tlngamma.c] added failing test with mpfr-4.0.0-rc2 2017-12-20 Vincent Lefèvre Updated version to 4.1.0-dev again. Updated version to 4.0.0-rc2 for an attempt to replace the 4.0 branch. [src/fma.c] Minor improvements. Added an assert. [src/tanh.c] GNU coding style. [src/mul.c] Reindentation. [src/exp2.c] Replaced two MPFR_ASSERTN by MPFR_STAT_STATIC_ASSERT. 2017-12-19 Vincent Lefèvre [src/exp2.c] Fixed the double rounding problem in an underflow case, triggered by the test added in r12017. [tests/texp2.c] Added test of underflow in MPFR_RNDN with exact value close to 2^(emin-2). Currently fails due to double rounding. [tests/tdiv.c] Added new non-regression test: the was the real cause of the ttanh failure in r11993 without the tanh.c fix in this same commit. But this mpfr_div was fixed in r12002. [doc/mpfr.texi] Added a comment about a bug/limitation in makeinfo 5.2. [doc/mpfr.texi] Improved svar macro for nottex, in case it is used in the future. [doc/mpfr.texi] Define svar even for nottex, though it is not used (attempt to avoid a failure with makeinfo 5.2). 2017-12-19 Paul Zimmermann [src/fma.c] fixed bug in mpfr_fma [tests/tfma.c] added non-regression test 2017-12-19 Vincent Lefèvre [src/exp2.c] Update concerning the underflow/overflow cases. Still incomplete. [doc/mpfr.texi] Updated a comment. [doc] * texinfo.tex: update to the latest version 2017-12-18.20, which reverts the change done in 2017-12-01.13 attempting to support @var with script font size (e.g. in exponent); but this change didn't work correctly. * mpfr.texi: introduced a @svar macro to handle this case. It currently disables the use of @var, the other workaround being worse. 2017-12-18 Vincent Lefèvre Removed trailing whitespace. [doc/algorithms.tex,src/tanh.c] Fixed the bound, in particular from the recent improvements in the error analysis. 2017-12-18 Paul Zimmermann [src/mul.c] we should compare the smaller size and not the larger one to MPFR_MUL_THRESHOLD or MPFR_SQR_THRESHOLD for Mulders' short product [src/mul.c] with Mulders', convert RNDF to RNDZ [tests/tmul_d.c] added a non-regression test 2017-12-18 Vincent Lefèvre [doc/algorithms.tex] mpfr_tanh: corrected bounds (thanks to Paul). [doc/algorithms.tex] mpfr_tanh: detailed some inequalities. 2017-12-18 Paul Zimmermann [src/div.c] fixed bug in mpfr_div2_approx() [tests/tdiv.c] added non-regression test [tests/ttan.c] added test triggering bug in mpfr_div2_approx() 2017-12-18 Vincent Lefèvre [doc/algorithms.tex] mpfr_tanh: resolved both FIXME's. [doc/algorithms.tex] mpfr_tanh: corrected a part of the error analysis (2^k+4 ≤ |theta_4|^(−1/2) was not necessarily true, since theta_4 can be very small). As a consequence, the lemma can be simplified/improved (first FIXME). Added a second FIXME on a condition that is not checked. [doc/algorithms.tex] mpfr_tanh: missing absolute value; added a \cdot. Removed trailing whitespace. [doc/algorithms.tex] Added another \cdot for readability. 2017-12-18 Paul Zimmermann [src/exp2.c] added FIXME 2017-12-18 Vincent Lefèvre [doc/algorithms.tex] Minor corrections for hyperbolic tangent function: * "e" had two different meanings (BTW, the constant e should actually be written \mathrm{e} everywhere in the document). * Use \left...\right instead of |...| when it contains an expression starting with \log (the latter was confusing pdflatex, which added a spurious space before \log). * Added some \cdot for better readability. 2017-12-18 Paul Zimmermann [src/exp2.c] fixed bug near underflow [tests/texp2.c] added non-regression test [tests/ttanh.c] added test for bug in mpfr_tanh [doc/algorithms.tex] fixed error analysis for mpfr_tanh [src/tanh.c] fixed error analysis Note after r12016: Even though mpfr_tanh was incorrect, the failure of the test added in ttanh.c was actually *only* due to a bug in the mpfr_div code specific to the trunk (fixed in r12002), i.e. this was not a non-regression test for the mpfr_tanh bug itself (in particular, this test does not introduce a failure in the 3.1 branch, which still has the same incorrect mpfr_tanh code but a correct mpfr_div). 2017-12-18 Vincent Lefèvre Updated version to 4.1.0-dev again. 2017-12-17 Vincent Lefèvre Updated version to 4.0.0-rc2 for an attempt to replace the 4.0 branch. ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". 2017-12-17 Paul Zimmermann [src/add1sp.c] fix bug in mpfr_add1sp3() in case d=GMP_NUMB_BITS 2017-12-17 Paul Zimmermann [tests/tadd1sp.c] added test for new bug (still to be fixed): Seed GMP_CHECK_RANDOMIZE=1514385177 (include this in bug reports) add1 & add1sp return different values for MPFR_RNDN Prec_a = 137, Prec_b = 137, Prec_c = 137 B = 0.11111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000E-66 C = 0.11111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000110000E-2 add1 : 0.10000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000001000E-1 add1sp: 0.11111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000010000E-2 Inexact sp = 0 | Inexact = 0 Flags sp = 8 | Flags = 8 add1sp.c:89: MPFR assertion failed: 0 2017-12-15 Vincent Lefèvre [src/root.c] Minor comment correction. [src/root.c] Completed fix from r11978, as x=-1 was affected too. Also added comments explaining that mpfr_root_aux assumes |x| ≠ 1 and why. Hence the need of a filter on |x| = 1. [tests/troot.c] Added test for x = -1. [tests/troot.c] Replaced mpfr_root by TF (like in the other tests). 2017-12-14 Paul Zimmermann [src/root.c] fixed bug when x=1 [tests/troot.c] added non-regression test 2017-12-14 Vincent Lefèvre [tests/tsub1sp.c] Corrected a type. And mpfr_equal_p being a predicate function, it's better to use Boolean operators on it. 2017-12-14 Paul Zimmermann [tests/tsub1sp.c] added a generic test for bug20171213() 2017-12-14 Vincent Lefèvre [src/{mul.c,sqr.c}] Minor changes, making code similar to sub1sp.c. Checked with grep -A 1 'sb *>>' src/*.c that the bug fixed in r11974 does not occur in other parts of the code. BTW, there is much duplicate code, as shown by the grep output, and using macros could have avoided that, making bugs easier to reproduce (since a same bug would be duplicate several times). 2017-12-13 Paul Zimmermann [src/sub1sp.c] fixed bug in mpfr_sub1sp2() [tests/tsub1sp.c] added non-regression test 2017-12-13 Vincent Lefèvre [src/mpf2mpfr.h] Added a comment. 2017-12-13 Paul Zimmermann [src/mpf2mpfr.h] missing mpf_inits/mpf_clears [src/mpfr-gmp.h] redefine __clz_tab also with gmp-build 2017-12-12 Vincent Lefèvre [configure.ac] Improved error message. [tests/talloc.c] Added a comment about why talloc requires ISO C99. [src/mpfr-cvers.h] Removed a useless test for __MPFR_STDC, as one just needs to check whether we have a C99, C11, etc. implementation (if not done via a configure test). Particular incompatibilities with the C90 standard should always be checked via a configure test. [tests] Added *.exe to svn:ignore property (files from MinGW builds). 2017-12-12 Paul Zimmermann [tools/timings-mpfr.c] always use clock() [now very accurate under Linux] 2017-12-12 Vincent Lefèvre [tools/timings-mpfr.c] Updated years in copyright notice. [tools/timings-mpfr.c] Fixed prototypes. [tools/timings-mpfr.c] Added a defined(_MSC_VER). But clock() is standard, so why not always using it? [doc/README.dev] Correction. [doc/README.dev] Made formatting consistent (same as configure --help). Completed r11955: There were also DEBUG macros under the "tests" directory. Since such macros can still be useful in case a test failure, replaced them by MPFR_DEBUG to avoid issues with CI builds that define the DEBUG macro. But an environment variable would be a better solution (see MPFR_DEBUG_BADCASES as an example). [TODO] Removed item on the DEBUG macro (done in r11955). 2017-12-11 Paul Zimmermann DEBUG_TGENERIC -> MPFR_DEBUG_TGENERIC XDEBUG -> MPFR_DISABLE_IEEE_FLOATS get rid of DEBUG macro (but keep corresponding commands in comment to help understanding of the code and debugging) 2017-12-11 Vincent Lefèvre [tests/tget_q.c] Removed trailing whitespace. 2017-12-10 Paul Zimmermann [tests/tget_q.c] replaced MPFR_ASSERTN(0) by exit(1) 2017-12-10 Vincent Lefèvre [src/get_q.c] Optimization of r11951 suggested by Trevor Spiteri: https://sympa.inria.fr/sympa/arc/mpfr/2017-12/msg00040.html 2017-12-09 Paul Zimmermann [src/get_q.c] make result of mpfr_get_q in canonical form [tests/tget_q.c] added non-regression test [src/lngamma.c] replace call to __gmpfr_ceil_log2 by __gmpfr_int_ceil_log2 2017-12-09 Vincent Lefèvre [TODO] Rename the DEBUG macro to MPFR_DEBUG? 2017-12-08 Vincent Lefèvre [src/Makefile.am] Also distribute generic/coverage/mparam.h (at least useful for testing the distributed tarballs). [doc] Updated FAQ.html with update-faq. [doc] Updated FAQ.html with update-faq. [doc/README.dev] "To make a release": * Note that this needs to be done in a branch. * Swapped (1) and (2), in particular because the coverage might be different in -dev versions and it is better to give results closer to the release. Updated version to 4.1.0-dev. ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". Moved tests/timings-mpfr.c into directory "tools" as it is not part of the test suite. 2017-12-07 Vincent Lefèvre [src/fpif.c] Removed FIXME about the sign bit of NaN: done in r11910 and r11920 (documentation + tests). [src] Replaced some "return 0" by "MPFR_RET (0)" (the generated code is the same as shown by gcc, thanks to an obvious optimization; this is semantically better, which could help provers, and would allow code instrumentation in the future, if need be). 2017-12-06 Paul Zimmermann got rid of mpz_dump (undocumented in GMP) [src/mpfr-mini-gmp.c] updated with GMP 6.1.2 2017-12-06 Vincent Lefèvre [doc/mpfr.texi] Corrected a Texinfo typography issue. [src/pool.c] Updated description. Corrected copyright years as the pool code itself was introduced in 2014. [tests/timings-mpfr.c] Removed trailing whitespace, untabified, changed GMP_RNDN to MPFR_RNDN. Cleanup and fixes for the mpz_t pool. * Split src/free_cache.c to itself and a new source file src/pool.c containing pool related code. * src/mpfr-impl.h, src/pool.c: cleanup and fixes. In particular: - renamed MPFR_MY_MPZ_INIT to MPFR_POOL_NENTRIES; - no longer use GMP's symbols __gmpz_init, etc. directly; - improved the condition for mpfr_mpz_init2; - fixed the condition in mpfr_mpz_clear (we want to consider the allocated size, not the size of the current number). * src/Makefile.am: added pool.c. * src/mpfr.h: added mpfr_free_pool prototype. * doc/mpfr.texi: updated pool description in "Memory Handling"; new function mpfr_free_pool. * doc/README.dev: update due to the rename of MPFR_MY_MPZ_INIT. * NEWS: better announcement of the mpz_t pool. [doc/mpfr.texi] Small correction concerning the caches. [doc/mpfr.texi] More details for mpfr_fpif_export and mpfr_fpif_import. 2017-12-06 Paul Zimmermann [timings-mpfr.c] test file for measuring timings (added -p option) 2017-12-06 Vincent Lefèvre Updated the remaining www.loria.fr URL's. [doc/algorithms.bib] Updated URL's. [doc/mpfr.texi] References: typography; updated a URL. 2017-12-06 Paul Zimmermann [mpfr.texi] updated reference to "Modern Computer Arithmetic" [free_cache.c] limit the size of objects in the mpz_t pool 2017-12-06 Vincent Lefèvre [src/free_cache.c] Added a comment for the mpz_t pool, and a suggestion for mpfr_mpz_clear so that the pool will not take too much memory while keeping a possible benefit for very small precision. 2017-12-05 Vincent Lefèvre [src/mpfr.h] Made box around code examples for clarity and grep. [doc/mpfr.texi] For mpfr_fpif_export: the sign of a NaN is stored. [tests/tfpif.c] Test the sign of NaN (in particular). [doc/mpfr.texi] Updated references. [doc/mpfr.texi] Update about 0 of type without signed zeros, as in mpfr_div_ui. [doc/mpfr.texi] Document the behavior of mpfr_ui_pow and mpfr_ui_pow_ui on the integer 0 (0 does not have a sign here). 2017-12-05 Paul Zimmermann [doc/mini-gmp] added information about result of "make check" 2017-12-05 Vincent Lefèvre [src/mpfr-gmp.h] Removed old code for pre-GMP-5 versions. [src/urandomb.c] Removed an obsolete "#if __MPFR_GMP(5,0,0)" as we now require GMP 5.0+ and mp_bitcnt_t is also defined by mini-gmp. [src/mpfr-gmp.h] Removed the code that defined mpn_copyi and mpn_copyd macros for GMP < 5, since MPFR now requires GMP 5.0+ and these functions are also defined by mini-gmp (these macros were used by mini-gmp only because mini-gmp does not define GMP_VERSION). [src/mpfr-gmp.h] Missing parentheses around parameters in mpn_copyi and mpn_copyd macro definitions. 2017-12-05 Paul Zimmermann fixed bug in replacement function for copyi and copyd (found with mini-gmp) add --disable-shared for mini-gmp (not tested yet with dynamic linking) 2017-12-05 Vincent Lefèvre [src/mpfr.h] Explain how to avoid the "... is deprecated" warning when testing a deprecated function. [doc/README.dev] Removed a -Wno-error=deprecated-declarations as the specific warnings are now avoided (r11896). Disable the "deprecated" attribute of deprecated functions *only* for the tests of these functions, to avoid the corresponding warnings. Removed trailing whietespace. 2017-12-05 Paul Zimmermann fixed compiler warnings with mini-gmp 2017-12-04 Vincent Lefèvre Simplified the use of MPFR_USE_FILE since ( for C++) is unconditionally included. 2017-12-04 Paul Zimmermann make compilation work again (make + make check) with mini-gmp 2017-12-04 Vincent Lefèvre Improved portability of the check-gmp-symbols make rule. [src/fpif.c] Clarification. [tests] * tfpif.c: in doit(), also test the negative versions of the numbers. * tfpif_r1.dat: update. [src] Update about the internal use of mpfr_get_str. * get_str.c: updated a comment. * vasprintf.c: added assertions. [doc/mpfr.texi] Updated the month. [src/get_str.c] Corrected a comment. [doc/mpfr.texi] Update about the memory allocation (added references to Section "Memory Handling"). (merged changeset r11632 from the 3.1 branch) [doc/mpfr.texi] Update for mpfr_get_str: * Added a texi comment explaining why m+1 (so that if the mpfr_get_str implementation is improved, we know whether this is still the case). * Improved the documentation for the case str = null pointer. 2017-12-03 Vincent Lefèvre [doc/mpfr.texi] Updated comments about the latest change (r11881). [doc/mpfr.texi] Typography fixes for TeX (DVI/PS/PDF) in math mode. * Corrected the use of \lceil and \rceil. * Added missing @var, including 2 in exponent, as allowed by texinfo.tex 2017-12-01.13. * Removed old comments about Texinfo. [doc/texinfo.tex] Update to the latest version 2017-12-01.13 from . 2017-12-01 Vincent Lefèvre [acinclude.m4] In r11876, forgot to define MPFR_WANT_DECIMAL_FLOATS in the cross-compiling case. Solved an output issue on AIX due to the use of setbuf() after output in tversion. Indeed, this is disallowed by ISO C. * doc/README.dev: added a note about tests_start_mpfr and this issue. * tests/tests.c: moved test_version() after setbuf(). * tests/tversion.c: moved tests_start_mpfr() earlier, before any printf(). [acinclude.m4] Attempt to fix detection of decimal floats: if _Decimal64 is known but does not work, no longer fail when --enable-decimal-float has not been used; just disable decimal floats. [acinclude.m4] Attempt to fix detection of decimal floats (BID was incorrectly assumed in case of link failure, if ld returned 1, which was observed on powerpc-ibm-aix7.2.0.0 [gcc119.fsffrance.org]). [src/fpif.c] Updated comments about the format. 2017-11-30 Vincent Lefèvre [doc/README.dev] Typo. Two fixes for the check-gmp-symbols make rule: * Use $(COMPILE) instead of $(CC) to get the usual compilation flags (in particular, the -I flags may be important to find gmp.h and to get the correct one). * Run the test only if libmpfr.so exists. [doc/README.dev] Internal GMP symbols: mention "make check-gmp-symbols". [NEWS] Mention "make check-gmp-symbols" (experimental). [INSTALL] Added an optional step "make check-gmp-symbols" to check that MPFR does not use GMP internal symbols. Added comment about the check-gmp-symbols make rule (added in r11865). Added check-gmp-symbols make rule to check that MPFR does not use GMP internal symbols. [doc/README.dev] Detailed the note about the list of GMP symbols. [doc/README.dev] Document how to get the list of GMP symbols used by MPFR and how to detect GMP internal symbols used by MPFR. [INSTALL] Added a paragraph about the potential incorrect use of GMP internals. 2017-11-29 Vincent Lefèvre [src/fpif.c] Fixed the sign bug for mpfr_fpif_import. [tests/tfpif.c] In doit(), before the call to mpfr_fpif_import(), set the sign of the target to the opposite of the expected sign. Thus, if mpfr_fpif_import forgets to set the sign, this will be detected. And a failure actually occurs now! [tests/tfpif.c] For mpfr_fpif_import, check the precision too. [doc/mpfr.texi,src/fpif.c] For mpfr_fpif_import, in case of failure, the argument x is either unchanged or set to NaN, to make sure that x has valid contents (otherwise this could yield erratic behavior). [src/fpif.c] For mpfr_fpif_import, replaced an assertion by a failure (since the full format is not described in the manual and MPFR cannot currently generate such a case, this is OK). [tests/tfpif_r1.dat] Fixed an obvious error (incorrect sign of 0). [tests/tfpif.c] Output more information in case of error. 2017-11-28 Vincent Lefèvre [src/fpif.c] Fixed some bugs (though unlikely to occur in practice). Added comments. Minor code improvement. Got rid of the useless SIZE_MAX macro. * src/vasprintf.c: replaced SIZE_MAX by (size_t) -1, already used in some other files. * acinclude.m4: no longer use gl_SIZE_MAX (from m4/size_max.m4). * Removed m4/size_max.m4 as it is no longer needed (note that the definition of SIZE_MAX by this file was unnecessarily complex and potentially incorrect on some platforms). [src/fpif.c] Added static assertions in mpfr_fpif_import(). [src/fpif.c] Improved a test (mpfr_regular_p → !MPFR_IS_SINGULAR). [src/mpfr-impl.h] Added a note about the use of the MPFR_IS_PURE_*(x) and MPFR_IS_SINGULAR*(x) macros. 2017-11-27 Vincent Lefèvre [src/fpif.c] Added format description from past mail messages, to be checked in case of change (+ FIXME for NaN). Minor code improvement. [tests/tfpif.c] Added TODO's (but the failure should be fixed first). [src/fpif.c] Clarified sign variable. [tests/tfpif.c] Use SAME_VAL instead of mpfr_cmp. This triggers a bug that was not detected yet. [tests/tfpif.c] Split the main test function into: * doit(): keep only the tests that depend on the precisions. * check_bad(): tests for bad file/data; precisions are not involved. [tests/tfpif.c] Improved a test (NaN checking). Added comments. [tests/tfpif.c] Removed a TODO done in r10326 and r10338. Updated autogen.sh so that doc/texinfo.tex isn't replaced. Added doc/texinfo.tex file from Texinfo 6.5 since the version installed by Automake (via "autoreconf -i" as called by autogen.sh) is obsolete: more than 4 years older than the current version! [doc/mpfr.texi] Updated a comment about a bug in Texinfo. 2017-11-23 Vincent Lefèvre [tests/tset_exp.c] Check mpfr_get_exp too (with two additional tests for mpfr_set_exp). [tests/texceptions.c] Minor improvements. [doc/mpfr.texi] For mpfr_get_exp, document that x can be outside of the current range of acceptable values (this was ambiguous). 2017-11-21 Vincent Lefèvre [doc/mpfr.texi] Corrected Texinfo typography issues. 2017-11-21 Paul Zimmermann added another example where we can have an overflow added pointer to mpfr_subnormalize 2017-11-21 Vincent Lefèvre [doc/mpfr.texi] Major update of "MPFR and the IEEE 754 Standard". [doc/mpfr.texi] Added "MPFR and the IEEE 754 Standard" to the main menu as required. Title capitalization. [doc/mpfr.texi] Correction of a @node. 2017-11-21 Paul Zimmermann added section "MPFR and the IEEE 754 standard" 2017-11-20 Vincent Lefèvre [doc/mpfr.texi] mpfr_can_round: corrected the example; removed a reference to "ternary value" as there is already one in the previous sentence; clarification. [doc/mpfr.texi] Faithful rounding (MPFR_RNDF): * Document that this feature is experimental and partially supported. * Update Section "API Compatibility". Note: the NEWS file was up-to-date. 2017-11-15 Vincent Lefèvre [tests/talloc-cache.c] * Replaced test + abort() by the more informative MPFR_ASSERTN(). * Also check that the allocator is the current GMP one (this would fail with MPFR 3.1.6, where the allocation functions are memorized the first time they are seen). mpfr_mp_memory_cleanup() now returns an error code (currently always 0) to avoid a future prototype change in case errors would be possible. 2017-11-10 Vincent Lefèvre Cleanup: In src/mpfr-gmp.h, exchanged mpfr_allocate_func and *__gmp_allocate_func mpfr_reallocate_func and *__gmp_reallocate_func mpfr_free_func and *__gmp_free_func and in the code, replaced *__gmp_{allocate,reallocate,free}_func by mpfr_{allocate,reallocate,free}_func; updated TODO file. [doc/mpfr.texi] The sign bit of a NaN is now specified for mpfr_abs, mpfr_neg and mpfr_set, in order to mimic the IEEE-754 abs, negate and copy operations. [tests/tabs.c] More tests on mpfr_abs, including the ternary value and the NaN flag and sign bit for ±NaN. [tests/tabs.c] Coding style. [tests/tset.c] For mpfr_neg on NaN, also check that the variable is set to NaN and that the ternary value is 0. [tests/tset.c] More NaN tests for mpfr_set. [tests/tset.c] More tests of the NaN flag and the sign bit for mpfr_neg on NaN. [tests/tset.c] The global variable "error" is better as static. [tests/tset.c] For mpfr_neg on NaN, check that the sign bit is flipped in both ways. [tests] Added talloc-cache to svn:ignore property. 2017-11-09 Vincent Lefèvre [tests/tset.c] In the mpfr_neg test on the sign of NaN: C90 compatibility; improved robustness since as specified, mpfr_signbit can return any value (not just 0 or 1). [src/neg.c] Refactored code (BTW, this was not a bug as the sign of NaN is currently unspecified for mpfr_neg). 2017-11-09 Paul Zimmermann fixed bug reported by Trevor Spiteri (https://sympa.inria.fr/sympa/arc/mpfr/2017-11/msg00003.html) 2017-11-08 Vincent Lefèvre Change the way memory is allocated (as discussed partly in private). * src/mpfr-gmp.c, src/mpfr-gmp.h, src/mpfr-impl.h: update. * src/free_cache.c, src/mpfr.h: added mpfr_mp_memory_cleanup function. * NEWS: describe API change. * TODO: added 2 related items (future clean-up and feature). * doc/mpfr.texi: update. * tests/talloc-cache.c: take API change into account. 2017-11-07 Vincent Lefèvre [doc/mpfr.texi] Updated Section "Compatibility With MPF". [doc/mpfr.texi] Removed a paragraph from r2962 concerning mpf2mpfr.h and mpf_init / mpf_init2: since r2985, the mpf_init / mpf_init2 macros initialize to 0 like MPF, so that users shouldn't see differences from MPF. 2017-11-07 Paul Zimmermann added reference 2017-11-07 Vincent Lefèvre [src/mpfr.h] Formatting. [src/mpfr.h] mpfr_free_cache_t: added comments to show that these are flags. [doc/mpfr.texi] Updated mpfr_free_cache / mpfr_free_cache2 description. [src/free_cache.c] Minor portability improvement for mpfr_free_cache2 to accept way = 0 (no effect on two's complement machines). 2017-11-06 Vincent Lefèvre [tests] * tests.c: for test programs that use GMP's mp_set_memory_functions, tests_rand_start and tests_rand_end also need to be disabled; to do that, require that tests_memory_disabled be set to 2 in this case (the value 1 is already used for the use with mini-gmp, where only tests_memory_start and tests_memory_end need to be disabled). * talloc-cache.c: call tests_start_mpfr and tests_end_mpfr as usual, with tests_memory_disabled set to 2. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Minor change. [doc/mpfr.texi] + explicit information on pools (in addition to caches). [NEWS,doc/mpfr.texi] mpfr_free_cache2 is a new function in MPFR 4.0, as a consequence of shared caches for multithreaded applications. [src/free_cache.c] GNU coding style. [tests] * Makefile.am: added talloc-cache to check_PROGRAMS. * talloc-cache.c: improved the test allocators so that an incorrect use is detected by this code instead of relying on the C library checking bad use of malloc/realloc/free (which was UB). NOTE: The test currently fails in the trunk due to the mpz_t pool. But anyway, the memory allocation method will change soon. [tests/talloc-cache.c] Corrected indentation. 2017-10-30 Vincent Lefèvre [doc/mpfr.texi] Improved the mpfr_nexttoward description w.r.t. flags. 2017-10-27 Paul Zimmermann added note about mpfr_beta 2017-10-26 Vincent Lefèvre [NEWS,doc/mpfr.texi] mpfr_beta is incomplete, experimental. See . 2017-10-26 Paul Zimmermann added functions from C++17 2017-10-23 Paul Zimmermann fixed typo 2017-10-11 Vincent Lefèvre [src/get_float128.c] Fixed failure in mpfr_get_float128 when called with a very reduced exponent range. [tests/tset_float128.c] Also test mpfr_get_float128 in reduced exponent range (triggering a failure before the fix). 2017-10-10 Vincent Lefèvre [doc/README.dev] "To make a release": + Check the generic code. 2017-10-09 Vincent Lefèvre [src/get_ld.c] Fixed the generic code when called with a very reduced exponent range. The tset_ld failure could be triggered on x86 by running "./configure ... mpfr_cv_c_long_double_format=unknown". [tests/tset_ld.c] Also test mpfr_get_ld in reduced exponent range (no failures on x86). [src/get_z.c] Fixed failure in mpfr_get_z when called with a very reduced exponent range. [tests/tget_z.c] Added tests in the various rounding modes (triggering a failure before the above fix). Also call check_one() on an integer congruent to 1 mod 4 (useful to check even rounding). Fixed 2 issues in the error message (for inex and the flags). [tests/tget_z.c] Also test mpfr_get_z in reduced exponent range (no failures though its code seems incorrect). 2017-10-06 Vincent Lefèvre [src/{get_si.c,get_sj.c}] Minor improvement, removing an obsolete note in get_sj.c at the same time. [src/{get_sj.c,get_uj.c}] Fixed failure in mpfr_get_sj and mpfr_get_uj when called with a very reduced exponent range. [tests/tget_sj.c] Added corresponding test cases. [tests/tset_si.c] Minor correction in error message. 2017-10-05 Vincent Lefèvre [TODO] Function multiversioning (FMV): more details. [TODO] Mention function multiversioning (FMV). 2017-10-04 Vincent Lefèvre [src/{get_si.c,get_ui.c}] Fixed failure in mpfr_get_si and mpfr_get_ui when called with a very reduced exponent range. [tests/tset_si.c] get_tests: added comments and tests in a reduced exponent range, which currently trigger an assertion failure. 2017-10-02 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [NEWS] Mention mpfr_dump. [doc/mpfr.texi] Describe the current output format of mpfr_dump. [doc/mpfr.texi] Replaced @code by @samp for things that are not actually code, but parts of character strings. 2017-09-29 Vincent Lefèvre [src/dump.c] mpfr_dump now outputs specific info for invalid data. [tests/toutimpl.c] Added mpfr_dump tests. [src/dump.c] * Output the sign even for NaN, since this can be useful information (the sign of a NaN has an effect with some functions, following IEEE 754-2008). * This changes allows one to get rid of the mpfr_fprint_binary static function at the same time. [src/{dump.c,print_raw.c}] Updated the description. 2017-09-29 Vincent Lefèvre [src] Clean up of debugging output functions: * Replaced the internal function mpfr_fprint_binary by a new internal function mpfr_fdump, similar to mpfr_dump, but with a FILE * argument. * Got rid of mpfr_print_binary entirely (it became internal in r2466 for MPFR 2.0.2, released in 2003). Details: * print_raw.c: - moved the mpfr_fprint_binary code to dump.c; - removed mpfr_print_binary. * dump.c: - mpfr_fprint_binary (from print_raw.c) is now defined as static; - added function mpfr_fdump, using mpfr_fprint_binary; - mpfr_dump: use mpfr_fdump instead of the old mpfr_print_binary. * mpfr-impl.h: - replaced mpfr_fprint_binary declaration by mpfr_fdump; - removed mpfr_print_binary declaration. * add1sp.c, mul.c, sub1sp.c: replaced mpfr_fprint_binary by mpfr_fdump and removed the '\n', now output by mpfr_fdump. 2017-09-28 Vincent Lefèvre [tests] Added trootn_ui to svn:ignore property. 2017-09-20 Vincent Lefèvre [tests/toutimpl.c] * Check mpfr_print_mant_binary() too. * GNU coding style. [src/print_raw.c] Changes in mpfr_print_mant_binary(): * Output a ']' when a '[' was output earlier. * Correction: putchar() takes an int (or unsigned char), not a char. * GNU coding style. 2017-09-18 Paul Zimmermann changed .align 64 into .p2align 6 (cf https://trac.sagemath.org/ticket/19233) 2017-09-15 Vincent Lefèvre [tests] Solve issues with the incorrect use of mpfr_sgn, and make sure that this cannot happen again without being detected: on zero, +1 or -1 was sometimes expected to check the sign of zero, but mpfr_sgn actually returned 0, so that the check always succeeded whatever the sign of the null result. * mpfr-test.h: define a new mpfr_sgn macro that fails when used on NaN or zero (whose sign is not +1 or -1), except when MPFR_TESTS_TSGN is defined. * tacos.c, tasin.c, tasinh.c, tatanh.c, tcbrt.c, tdim.c, terf.c, texp.c, texp10.c, texp2.c, texpm1.c, tset.c, tset_str.c: replaced the incorrect use of mpfr_sgn; some other related improvements. Note: in tset.c, a "mpfr_sgn (x) < 0" test had to be replaced by "MPFR_IS_POS (x)" since we really want to test whether the sign is positive (not negative). * tdiv.c, tmul.c, tui_div.c: simplified some tests, in particular to avoid a failure with the new mpfr_sgn macro for the tests; here, the use of mpfr_sgn was correct, but one could do simpler. * tgmpop.c: replaced "mpfr_sgn (z)" by "(mpfr_sgn) (z)" to avoid the new mpfr_sgn macro (here, we really want the mathematical sign). * tsgn.c: define MPFR_TESTS_TSGN as the goal of this program is to test mpfr_sgn itself (both the function and the macro in mpfr.h). [doc/README.dev] "To make a release": Enhanced step 5 (tarballs). 2017-09-14 Paul Zimmermann patch to avoid using the system mpfr.h 2017-09-14 Vincent Lefèvre [tests/tfms.c] Similar changes to what was done in tfma.c: * replaced "mpfr_cmp" by "! mpfr_equal_p"; * code formatting (mainly reindentation); * use of SAME_SIGN for better clarity. [tests/tfma.c] Similar change to what was done in tfms.c (may be useful in the future). [tests] Got rid of the use of mpfr_print_binary, in general with mpfr_dump. Replaced some "mpfr_out_str (stdout, 2, ...)" by mpfr_dump for consistency or as improvements. Some other corrections in the related error messages. 2017-09-14 Paul Zimmermann added info about autoconf-archive 2017-09-14 Vincent Lefèvre Old, deprecated macros mpfr_add_one_ulp and mpfr_sub_one_ulp removed. 2017-09-13 Vincent Lefèvre [tools/mpfrlint] Do the tests_start_mpfr / tests_end_mpfr check only if the .c file has a main() function; this avoids an error on trootn_ui.c, which just does a #include. [tests/troot.c] * Use mpfr_set_zero instead of mpfr_set_ui / mpfr_neg (like what was done for the infinity, using mpfr_set_inf). * For exact cases (NaN, ±Inf, ±0), check that the ternary value is 0. [tests/troot.c] For the root(±0,k) tests, before calling the function, we set the target y to NaN with the wrong sign, so that if the code of the function forgets to do something, this will be detected. [tests/troot.c] Also check root(+0,42) and root(-0,17) for completeness. [tests/troot.c] Really check the sign of the result 0 (the old test was always false, thus useless!). [doc/mpfr.texi] Updated the month. New mpfr_rootn_ui function; mpfr_root deprecated. * src/root.c: mpfr_rootn_ui is now the main code, and mpfr_root calls mpfr_rootn_ui. * src/mpfr.h: added mpfr_rootn_ui prototype; marked mpfr_root as deprecated. * Added tests/trootn_ui.c (includes troot.c). * tests/troot.c: made it usable (via #include) by the new trootn_ui.c test. * tests/Makefile.am: added trootn_ui; at the same time, corrected the order of the test programs (lexicographic, with exceptions). * NEWS, TODO, doc/mpfr.texi: update. [tests] Avoid duplicate code by defining the MAKE_STR() macro in mpfr-test.h only instead of tgeneric.c and tversion.c. 2017-09-08 Vincent Lefèvre [doc/README.dev] "To make a release": Updated the warning, as the issue concerns the .ps file only (the .dvi file has no papersize info). [doc/README.dev] "To make a release": Added a warning to check the papersize of the generated dvi and ps files, which may be incorrect (bug in texinfo(?) reported as Debian bug 874632). Switched other gmplib.org URL's to https. [doc/mpfr.texi] Updated URL: http://gmplib.org → https://gmplib.org/ [doc/mpfr.texi] Updated URL: ftp://ftp.gnu.org/gnu/mpfr/ → https://ftp.gnu.org/gnu/mpfr/ [tools/announce-text] Switched to https for ftp.gnu.org. 2017-09-07 Vincent Lefèvre [doc/README.dev] "To make a release": update about the uploads. 2017-09-06 Vincent Lefèvre [NEWS] Completed item on thread-safe DLL (shared library) support. [src/mpfr-impl.h] Completed the fix in r11713. [src/mpfr-impl.h] Fixed thread-safe DLL support with ICC and MSVC on MS Windows without the GMP build directory (r11712 contained inconsistent function names, yielding "unresolved external symbol" errors in tabort_defalloc1.obj), second try. [src] Attempt to fix thread-safe DLL support with ICC and MSVC on MS Windows without the GMP build directory. See: https://sympa.inria.fr/sympa/arc/mpfr/2017-09/msg00009.html https://sympa.inria.fr/sympa/arc/mpfr/2017-09/msg00014.html i.e. for the mpfr_allocate_func, mpfr_reallocate_func & mpfr_free_func external TLS variables, one does the same thing as what had been done for the other ones (__gmpfr_flags, __gmpfr_emin, __gmpfr_emax, etc.). [tests] Added tget_q to svn:ignore property. 2017-09-05 Vincent Lefèvre [tests/tsprintf.c] With MPFR_CHECK_LIBC_PRINTF, disable the test of the "'" flag with a non-glibc C library (SUS extension in printf). In particular, it is not supported by AIX 7.2. [src/mpfr-impl.h] In case decimal_point and/or thousands_sep are non-single-byte characters (as found on FreeBSD 11 in fr_FR.UTF-8), revert to the default value. Added a FIXME to support multibyte decimal_point and thousands_sep. [tests/tsprintf.c] Formatting. [doc/README.dev] Added a paragraph about temporary result files created by test programs. [tests/Makefile.am] Added tfpif_rw.dat to CLEANFILES. [tests] Renamed mpfrtest.txt, mpfrtest.dat and mpfrtest2.dat to tfpif_rw.dat, tfpif_r1.dat and tfpif_r2.dat respectively. [tests] * toutimpl.c: Changed the filename of the result file like what has been done in other test programs, to make sure that it will not be reused by mistake. Removed comments about tmpname (which does not exist). * Makefile.am: Added this filename to CLEANFILES (even though the file is removed by the test program, an error could occur before its actual removal). [tests] * tfprintf.c, tout_str.c, tprintf.c: Do not use the same filename for result files created in these test programs, as this breaks parallel tests (note that such files are used only if /dev/null does not work, so that Unix-like systems were not affected). This should fix the bug reported in https://sympa.inria.fr/sympa/arc/mpfr/2017-09/msg00000.html as said in https://sympa.inria.fr/sympa/arc/mpfr/2017-09/msg00005.html * Makefile.am: added a CLEANFILES line with these files. 2017-09-01 Vincent Lefèvre [tests/turandom.c] Added test_underflow(). (merged changesets r11691-11694 from the 3.1 branch) 2017-08-29 Paul Zimmermann update updated for mpfr-3.1.6-rc1 2017-08-28 Vincent Lefèvre [tools/mpfrlint] Run tools/ck-version-info. [tools/mpfrlint] Updated a message due to the change in r11673. [doc/README.dev] "To make a release": The DLL version may need to be updated too. [configure.ac] Added a comment about the DLL version. [configure.ac] Updated DLL version to 6 (cur - age). [tools/{ck-copyright-notice,ck-inits-clears}] Ignore Emacs lock files (symbolic links) to avoid a failure when a file is being edited. [tools] Clean up. * Renamed check_inits_clears to ck-inits-clears (the other "check" scripts have a name starting with "ck-"). * mpfrlint: updated the invocation of this test, simplifying it to make it similar to the other ones (it was based on old code). 2017-08-27 Vincent Lefèvre [tests/turandom.c] Disabled the reprod_abi test with GMP < 4.2.0 since the hardcoded values would be different. 2017-08-25 Vincent Lefèvre [src/mpfr-impl.h] Replaced (MPFR_LIKELY(expr)) || (ASSERT_FAIL(expr),0) by (MPFR_LIKELY(expr)) || (ASSERT_FAIL(expr),MPFR_ASSUME(expr),0) as a workaround to the fact that mpfr_assert_fail is not marked as "no return" (bug 21415). Thus, after this code, expr must be true. [tests/turandom.c] Check that the behavior does not depend on the platform ABI or MPFR version. [tests/turandom.c] Corrected error messages after r11661. [tests/turandom.c] Renamed "reprod" to "reprod_rnd_exp" (reproducibility test with several rounding modes and exponent ranges), because a second reproducibility test will be added. [tests/turandom.c] * In underflow_tests, test the flags in all cases (not just when the returned result is 0), possibly by first computing the result in a large exponent range. * Since the flags are now well tested in underflow_tests, no longer test them in the second test of test_urandom for k = 0, which was the incorrect test that was failing (see r11659). [tests/turandom.c] Do some test several times in order to trigger a "mpfr_urandom() returns incorrect flags for emin = 1" failure when GMP_CHECK_RANDOMIZE is not set (default). Note: It is this test that is actually wrong (it corresponds to the old behavior, currently found in the 3.1 branch, and was not updated after the mpfr_urandom code was fixed). [tests/turandom.c] Code formatting. Added an assertion. 2017-08-24 Vincent Lefèvre [tests/turandom.c] Check that the behavior of mpfr_urandom() does not depend on the rounding mode. [doc/mpfr.texi] Completed the description of mpfr_urandom. [src/urandom.c] Completed comment. 2017-08-23 Vincent Lefèvre [tests/turandom.c] In bug20170123, use a local gmp_randstate_t variable instead of mpfr_rands, due to the gmp_randseed_ui (see r11653). [tools/mpfrlint] Detect the use of gmp_randseed* functions on mpfr_rands (this is bad practice: this would affect later tests, defeating the purpose of GMP_CHECK_RANDOMIZE; another gmp_randstate_t variable should be used instead of mpfr_rands). [tests/{mpfr-test.h,tests.c}] Got rid of __gmp_randstate_struct, which is internal to GMP: its use came from very old code (r2330 in 2003-06) and it is no longer needed. [tests/turandom.c] Disabled a test with GMP < 4.2.0 since it depends on a specific behavior of the random generator, which changed in GMP 4.2.0 (the test would probably fail with such old GMP versions). [src/urandom.c] Partly rewrote mpfr_urandom() so that the next random state no longer depends on the current exponent range and the rounding mode, and that the exceptions due to the rounding of the random number are now correctly generated. [doc/mpfr.texi] Updated the mpfr_urandom() documentation and updated Section "API Compatibility / Changed Functions" to mention the change in MPFR 4.0. [NEWS] Mentioned the change for MPFR 4.0. 2017-08-22 Vincent Lefèvre [src/urandom.c] Minor change about underflow, following the usage. [tests/turandom.c] Added inex test for the underflow & overflow tests. [tests/turandom.c] Added overflow tests. [tests/turandom.c] Indentation. [tests/turandom.c] Added underflow tests. [tests/turandom.c] With mini-gmp, omit another test that assumes a deterministic random generator. [src/urandom.c] Bug fix: the inexact flag was not set on underflow. [tests/turandom.c] Added tests of the flags. This currently yields a failure (inexact flag not set on underflow). [tests/turandom.c] Added a test of the underflow flag. 2017-08-21 Vincent Lefèvre [src/urandom.c] 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". Thus this needs to be fixed. Note: This simple change has been done so that it can be merged with the 3.1 branch. But this will not be 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. [src/urandom.c] Updated comments about overflow and its flag. [src/urandom.c] Simplified the code, but, except for precision 1, without changing the state of the PRNG. Note: The code could be simplified even further, but the goal of the current change is to allow it to be merged with the 3.1 branch (where precision 1 is not supported) without too many conflicts. [src/urandom.c] Moved some code without consequences. Updated comments. [src/urandom.c] Useless parentheses; reformatting. 2017-08-17 Vincent Lefèvre [src/set_float128.c] No longer depend on the native FP type "double" (via mpfr_set_d), avoiding the usual precision issues with the x87 traditional FPU in particular. Use the internal representation with limbs, instead. The code is simpler and should also be faster. Note: together with r11627, this avoids the tset_float128 failure with the "-m32 -mpc32" GCC options. [src/get_float128.c] Removed variable z (no longer useful). [src/get_float128.c] No longer depend on the native FP type "double" (via mpfr_get_d), avoiding the usual precision issues with the x87 traditional FPU in particular. Use the internal representation with limbs, instead. The code is simpler and should also be faster. 2017-08-14 Vincent Lefèvre [src/get_float128.c] Fixed the remaining cases of mpfr_get_float128 (when the value is below the smallest subnormal in absolute value). [src/get_float128.c] Partly fixed mpfr_get_float128 when it underflows. [tests/tset_float128.c] Added tests for small values, in particular involving underflows (and subnormals). 2017-08-13 Vincent Lefèvre [src/get_float128.c] Reverted r11623 (a note mainly for the 3.1 branch, which actually doesn't support __float128). 2017-08-12 Vincent Lefèvre [src/get_float128.c] Updated the FIXME. 2017-08-08 Vincent Lefèvre [src/get_float128.c] Added a FIXME after a bug report by Rob: https://sympa.inria.fr/sympa/arc/mpfr/2017-08/msg00003.html 2017-08-03 Vincent Lefèvre [doc/mpfr.texi] Section "Getting the Best Efficiency Out of MPFR" moved from "Installing MPFR" to "MPFR Basics". Added corresponding node. 2017-08-03 Paul Zimmermann new section "How to get the best out of MPFR" 2017-08-03 Vincent Lefèvre [doc/mpfr.texi] Added a FIXME about memory allocation. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Removed obsolete comments. [doc/mpfr.texi] Updated paragraph on the MPFR formatted output functions and overflow on the return type int. 2017-08-02 Vincent Lefèvre [NEWS] Mention the use of the old dtags under Linux (see r11588). [src] Moved mpfr_vasprintf from vasprintf.c to printf.c and updated file descriptions for consistency (vasprintf.c should probably be renamed later to something like printf_aux.c). [src/printf.c] Updated a comment (taking r11269 into account). [src/vasprintf.c] Added an assertion. [src/vasprintf.c] Completed mpfr_vasnprintf_aux description. 2017-08-01 Vincent Lefèvre [tests/{tstdint.c,tvalist.c}] Include "mpfr-test.h" instead of "mpfr-impl.h" (this is done only when compiling with mini-gmp). [tools/mpfrlint] Detect "mpfr-impl.h" inclusion by the test programs: "mpfr-test.h" should be included instead; otherwise __MPFR_WITHIN_MPFR will be defined, yielding failures under MS Windows with DLL. 2017-07-28 Paul Zimmermann fixed typo 2017-07-28 Vincent Lefèvre [doc/mpfr.texi] Added important details for the example from r11595. 2017-07-27 Vincent Lefèvre [doc/mpfr.texi] Minor changes. [doc/mpfr.texi] Updated the month. 2017-07-27 Paul Zimmermann fixed FIXME related to r11595 2017-07-27 Vincent Lefèvre [doc/mpfr.texi] Added FIXME on example from r11595. 2017-07-26 Paul Zimmermann [mpfr.texi] added example showing how to emulate fixed-point arithmetic 2017-07-17 Vincent Lefèvre [src/sin_cos.c] Avoid integer overflows with precision 1100000 and the 32-bit ABI (32-bit long), fixing bug reported by Simon Byrne: https://sympa.inria.fr/sympa/arc/mpfr/2017-07/msg00002.html [tests] Re-indented some RND_LOOP / RND_LOOP_NO_RNDF blocks. [configure.ac] Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH is defined, avoiding the following issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859732 https://lists.gnu.org/archive/html/libtool/2017-05/msg00000.html (merged changeset r11587 from the 3.1 branch) 2017-07-10 Vincent Lefèvre [tests/tversion.c] Forgot casts for printf in r11585. [tests/tversion.c] Added ABI information & tests. 2017-06-20 Vincent Lefèvre [src/subnormal.c] Correction in comment (English). 2017-06-19 Vincent Lefèvre [tests/tversion.c] * Better organization; moved MPFR patches info below MPFR version. * Output __GMP_CC and __GMP_CFLAGS values. * Output GMP ABI info (to be completed with MPFR ABI info). 2017-06-03 Vincent Lefèvre [configure.ac] Improved some AC_DEFINE comments. [doc/README.dev] Added quotes for clarity. [tests/mpf_compat.h] Always use stdout for failure messages. [src/get_str.c] Improved comments (avoid the confusion between a negative base argument and a negative base). 2017-06-02 Vincent Lefèvre [doc/mpfr.texi] Punctuation. 2017-06-02 Paul Zimmermann added mpfr_get_q in Added Functions src/get_str.c: fixed for negative base tests/tget_str.c: added tests for negative base tests/mpf_compat.h: non-regression tests for bugs fixed in revision 11565 src/get_str.c: allow -36 <= b <= -2 too (work in progress) with the same meaning as in mpf_get_str fixed a bug in mpfr_mul for RNDF when Mulders' algorithm is used (and resolved a FIXME) 2017-06-02 Vincent Lefèvre [doc/mpfr.texi] Corrected mpfr_get_q documentation. [src/get_q.c] Added assertions to detect integer overflows, in case mpfr_exp_t is larger than mp_bitcnt_t. 2017-06-02 Paul Zimmermann src/mpf2mpfr.h: replaced __MPFR_GMP (requires internal mpfr-gmp.h) src/mpf2mpfr.h: fixed fits_s* functions and get_si use macro __MPFR_GMP added new function mpfr_get_q src/mpf2mpfr.h: added mpf_cmp_z (appeared in GMP 6.1.0) 2017-06-01 Vincent Lefèvre [Makefile.am] Put doc/README.dev in EXTRA_DIST to provide this file in tarballs too (it is not installed by "make install", though), since it contains information that may be useful for users of tarballs and various distributed files mention it. [README] Update about the "doc" directory and "doc/README.dev". [doc/README.dev] More information about the DEBUG macro. [doc/mpfr.texi] Updated the month. Update about MPFR_RNDF (faithful rounding): * NEWS: mention that it is partially supported (should be updated once MPFR_RNDF is completely supported). * TODO: moved an item to the right place (MPFR_RNDF is not removed from the TODO because it is not completely supported yet). * doc/mpfr.texi: added a FIXME about the partial support. 2017-05-31 Vincent Lefèvre [src/{atanh.c,log1p.c}] * Replaced mpfr_get_exp by MPFR_GET_EXP (so that the exponent is checked with --enable-assert). * For a test, doing the division first should be better. 2017-05-31 Paul Zimmermann improved log1p and atanh for small inputs added expm1 to mbench added log1p to mbench 2017-05-29 Vincent Lefèvre [doc/mpfr.texi] Updated the month. Removed trailing spaces. [tests] Code simplification and improvement by using SAME_VAL(). [tests/tbeta.c] Replaced not_same() by the simpler ! SAME_VAL(). [src/sum.c] Code reindentation due to a new test for MPFR_RNDF support, and other minor changes in formatting and comments. [doc/sum.txt] Typo in the MPFR_RNDF text. Merged the "faithful" branch into the trunk: faithful rounding (MPFR_RNDF). [tests/tgeneric.c] For MPFR_RNDF, replaced EQUAL() by SAME_VAL(), which also tests the sign (to distinguish +0 and -0). [tests/tui_sub.c] Avoid a failure in 32-bit ABI by replacing RND_LOOP by RND_LOOP_NO_RNDF. Merged the latest changes from the trunk. 2017-05-29 Paul Zimmermann added new reference 2017-05-24 Vincent Lefèvre [tests/tsprintf.c] Fixed setlocale usage (problem detected with MinGW) 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". [src] Moved "#include " from printf.c to vasprintf.c (this should have been done in r5230, where EOVERFLOW was moved). This fixes the "Got r = -1, errno = 0" errors in tprintf with MPFR_CHECK_LARGEMEM=1. [src/vasprintf.c] Added overflow detection at the end (due to the switch to mpfr_intmax_t for the string length in the string_buffer structure, it was no longer detected; however, this bug was not normally visible in the tests because here, a negative value was returned thanks to wrapping in a type conversion and the negative value was changed to the expected -1 value in printf.c). [src/vasprintf.c] Added log messages. [src/vasprintf.c] In case of overflow, do not stop before everything has been processed, allowing the %...n arguments to be filled, as decided. [tests/tprintf.c] check_long_string() error handling: initialize n2 to an invalid value and do all tests before exiting. [src/vasprintf.c] Fixed some parts of overflow tracking. [tests/tprintf.c] More detailed error message. [tests/tprintf.c] Added tests with %ln. [tests/tprintf.c] Improved check_vprintf_failure(). [src/vasprintf.c] Fixed the handling of the 'n' format specifier for size = 0, still allowing its support in case of overflow on the return value (i.e. when the number of characters that would have been output is > INT_MAX). Note: full support in case of overflow is still limited by GMP and the C library. [tests/tprintf.c] Increased the memory needed in check_long_string(). 2017-05-23 Vincent Lefèvre [src/mpfr-intmax.h] Define mpfr_uintmax_t and MPFR_INTMAX_MAX too. However, this will not necessarily be used by src/vasprintf.c, as this can be regarded as an EOVERFLOW error for which the behavior on the %...n values is not specified, i.e. we may not need to support size values larger than INT_MAX. 2017-05-22 Vincent Lefèvre [src/vasprintf.c] In a macro definition, changed a parameter to lowercase so that it doesn't look like a constant to mpfrlint. [src/vasprintf.c] Added a FIXME for the percent_n() / mixed() bug due to the 'n' format specifier with size = 0. The way to fix this issue depends on the specifications in case of overflow on the return value, and for POSIX, they are unclear. Waiting for comments... [src/mpfr-intmax.h] Define mpfr_intmax_t as being the largest signed integer type available for the MPFR build. It will be useful for the formatted output functions (src/vasprintf.c) to handle the 'n' format specifier, assuming that the value may be larger than INT_MAX, which is possible assuming that the C standard has a defect in the corresponding specification: https://sourceware.org/bugzilla/show_bug.cgi?id=21360 [tests/tsprintf.c] Added explanation for the bugs triggered by percent_n() and mixed(). [tests/tsprintf.c] Added percent_n() test to reproduce the bug found in mixed(), test without random data. [src/vasprintf.c] In partition_number(), complete check for overflow on total. [src/vasprintf.c] Partially fixed check for integer overflow when the long and int types have the same size. [src/vasprintf.c] With assertions enabled, check that the number of characters to be written computed in partition_number() corresponds to what is really written. [src/vasprintf.c] Fixed the bug triggered by the da_DK locale test: the computation of the number of characters to be written was incorrect in partition_number() when the thousands separator was not empty. This bug was visible with size = 0 and could be visible near overflow on the number of characters. Note: the buggy code was introduced in r5288 (2008-02-15), which fixed other issues with the thousands separator. [tests/tsprintf.c] Do more tests in the da_DK locale (these are the only tests for which the thousands separator is not empty). [tests/tsprintf.c] Do more tests involving check_sprintf() in a loop (to test mpfr_snprintf with size = 0 more often), and call mixed() later in order to get failures without the use of %n first. 2017-05-19 Paul Zimmermann get rid of computations with 'double' in mpfr_zeta 2017-05-19 Vincent Lefèvre [tests/tsprintf.c] Added a TODO about %n test. [doc/README.dev] Added MPFR_TESTS_FPE_TRAP documentation. [tests/tests.c] Corrected comment about MPFR_TESTS_FPE_TRAP. Renamed MPFR_TESTS_DIVBYZERO to MPFR_TESTS_FPE_DIV (less confusing). In doc/README.dev, updated the corresponding description. [tests] Renamed MPFR_RAISE_EXCEPTIONS to MPFR_TESTS_FPE_TRAP. [tests] Got rid of MPFR_TESTS_EXCEPTIONS (added in r11489 and above), which is redundant with MPFR_TESTS_DIVBYZERO and MPFR_ERRDIVZERO. The code related to these exceptions is now like r11488 (see the output of "svn diff -r11488"), but keeping the following changes: * Missing !defined(MPFR_ERRDIVZERO) tests added in r11498,11499. * In tests.c: - code related to traps (macro MPFR_RAISE_EXCEPTIONS, which will be renamed); - more detailed output about which FP exceptions occurred; - removal of "#ifdef MPFR_ERRDIVZERO" (as in r11493), as this is better with Automake 1.13+ (required by MPFR since r9375). Note: EXCEPTIONS_FLAG renamed to FPE_FLAGS, since EXCEPTIONS_FLAG is reserved by ISO C when is included. [tests/tsprintf.c] Do the locale_da_DK() test several times to yield a failure by default once the bug triggered by mixed() is fixed. [tests/tsprintf.c] Updated comment about r11501: the failure occurs with %n when the size argument of mpfr_vsnprintf is 0. [tests/tsprintf.c] Do more tests with %n. One now gets a failure by default (which occurs when one gets randsize <= 0). [tests/tsprintf.c] Fixed portability issues: The va_end(3) man page of Linux Programmer's Manual says: "On some systems, va_end contains a closing '}' matching a '{' in va_start, so that both macros must occur in the same function, and in a way that allows this." [tests/tget_set_d64.c] Disable tests with a division by 0 (which now occurs only with -DXDEBUG) if MPFR_ERRDIVZERO is defined. [tests/tset_ld.c] Disable an overflow test with a division by 0 (now occurs only with -DXDEBUG) if MPFR_ERRDIVZERO is defined. [doc/README.dev] Details for "-DMPFR_TESTS_DIVBYZERO -DMPFR_ERRDIVZERO". [tests/tsprintf.c] In mixed(), initialize n2 to an invalid value in order to ease failure analysis. 2017-05-19 Paul Zimmermann removed leftover debug statement in last commit fix for clang bug (https://bugs.llvm.org//show_bug.cgi?id=17686) 2017-05-19 Vincent Lefèvre [tests/tests.c] Change for MPFR_TESTS_DIVBYZERO: in case of FE_DIVBYZERO or FE_INVALID, fail unconditionally, not just when MPFR_ERRDIVZERO is defined, otherwise one cannot see the output about the floating-point exceptions with "make check" (the test of MPFR_ERRDIVZERO here should have been removed after switching to Automake 1.13, which discards the output when the test program succeeds). Note: defining MPFR_TESTS_DIVBYZERO without MPFR_ERRDIVZERO is just for debugging. 2017-05-19 Paul Zimmermann more work on MPFR_TESTS_EXCEPTIONS 2017-05-19 Vincent Lefèvre [tests/tests.c] Re-added code testing FE_DIVBYZERO and FE_INVALID with -DMPFR_TESTS_DIVBYZERO -DMPFR_ERRDIVZERO, because MPFR_TESTS_EXCEPTIONS is not ready yet. [tests/tversion.c] Output IEEE floats status. 2017-05-19 Paul Zimmermann check for fp exceptions (experimental) 2017-05-17 Vincent Lefèvre [src/cmp2.c] Added/updated comments. [tests/tcmp2.c] Added tests with equal numbers, possibly of different sizes. [src/cmp2.c] Corrected comments. [tools/mpfrlint] In the detection of reserved macro names, skip ERR from src/mpfr-gmp.h (this is a special case). [tests/tget_set_d64.c] Made PRINT_ERR_MISC more robust. [tests/*.c] Renamed the remaining macros whose names are reserved by ISO C when is included. 2017-05-16 Vincent Lefèvre [tests/texceptions.c] Made code formatting consistent. [tests/*.c] Renamed "ERROR" macro (macro name reserved by ISO C when is included) to "PRINT_ERROR", and made the macro more robust. Define the EXP() macro in src/mpfr-gmp.h only when needed (macro name reserved by ISO C when is included). [src/gamma.c] Got rid of the EXPM1_STR macro (macro name reserved by ISO C when is included), made no longer interesting by using mpfr_set_str_binary only once and another temporary variable. At the same time, replaced the usual allocation by a GROUP allocation (more efficient). 2017-05-15 Vincent Lefèvre [tests/tcheck.c] Code reformatting (GNU coding style). [tests/tcheck.c] Renamed "ERROR" macro (macro name reserved by ISO C when is included) to "PRINT_ERROR". Do not define macro names starting with "SIG" (+ uppercase letter) as they are reserved when is included (ISO C, 7.31.7), which happens to be the case in tests/tests.c, which also includes tests/mpfr-test.h and src/mpfr-impl.h indirectly. * src/mpfr-impl.h, tests/mpfr-test.h: renamed macros: SIGN → VSIGN SIGN_RAND → RAND_SIGN * {src,tests}/*.{c,h}: updated the names in the use of these macros. [tools/mpfrlint] Added a comment about the definition of reserved identifiers (in particular, macro names). [tools/mpfrlint] Detect the definition of reserved macro names. [src/bernoulli.c] Changed isprime to is_prime in order to avoid obscure problems if is added to mpfr-impl.h in the future (or if this function is made external). See ISO C "Future library directions", Clause 7.31.2 "Character handling ". 2017-05-12 Vincent Lefèvre [src/mpfr-impl.h] Improved comments about assertions and MPFR_ASSUME(). 2017-05-09 Vincent Lefèvre [INSTALL] Mention the problem when almost all the tests fails with a message "Incorrect MPFR version! ...". Increase the buffer sizes even more, and added a comment. This may be better in case of quick future changes (possibly for debugging), without checking carefully. For the tests, optimal code is useless. 2017-05-09 Paul Zimmermann fixed bugs found by gcc 7.1.0 (-Werror=format-overflow=) [VL] The MPFR code was correct. This is actually a bug in GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79257 2017-05-09 Vincent Lefèvre [doc] Updated FAQ.html with update-faq. 2017-05-05 Vincent Lefèvre [tools/mbench/timp.h] Updated TIMP_MEASURE() to handle the case where the return value is 0: this probably means that timp_overhead was too large and incorrect. In this case, TIMP_OVERHEAD() is called again to recompute timp_overhead and the timing is redone. Note: if we do not call TIMP_OVERHEAD() again, then TIMP_MEASURE() loops indefinitely, meaning that timp_overhead was really too large. [tools/mbench/timp.h] Comment at the wrong place. Fixed. [tools/mbench/timp.h] Added a comment about r11458. 2017-05-04 Vincent Lefèvre [tools/mbench/timp.h] Fixed overflows on unsigned arithmetic. [tools/mbench/mfv5.h] Increased values from 2^60-1 to 2^64-1 (it is possible to get more than 2^60-1 cycles in practice!). Merged the latest changes from the trunk, including some old changesets related to mpfr_zeta that were skipped, resolving conflicts. Added RNDF support to new code introduced by this merge: * mpfr_mul_1n in src/mul.c (from r11281); * mpfr_sqr_1n in src/sqr.c (from r11283); * mpfr_div_1n in src/div.c (from r11284); * mpfr_sqrt1n in src/sqrt.c (from r11293). Merged r11198-11280 from the trunk; no conflicts but additional changes: * About r11271 (src/add1sp.c), which introduces new special code (function mpfr_add1sp1n), handle MPFR_RNDF in the same way as done in similar existing special code (mpfr_add1sp1 and mpfr_add1sp2). * In mpfr_add1sp3, do the same thing (this should have been done in r11172, where this function was introduced via a merge). * About r11279 (src/sub1sp.c, tests/tsub1sp.c), which introduces new special code (function mpfr_sub1sp1n), do the same thing. In tests/tsub1sp.c, s/RND_LOOP/RND_LOOP_NO_RNDF/ as usual to avoid a failure. * Note: concerning mpfr_sub1sp3, RNDF support was added at the same time of the merge in r11179. * Some style changes related to RNDF, in particular for consistency. Merged r11197 from the trunk, resolving the conflict. Merged r11179-11196 from the trunk (no conflicts). 2017-05-02 Vincent Lefèvre [src/gamma.c] Clarified proof for tiny arguments again. [src/gamma.c] Clarified proof for tiny arguments. [src/gamma.c] In the proof for tiny arguments: * Simplification suggested by Paul. * Attempt to clarify the end. 2017-05-02 Paul Zimmermann added comment added reference for mbench (rdtsc vs rdtscp) 2017-04-28 Vincent Lefèvre [src/gamma.c] Tiny arguments: corrected a typo and added a TODO (one might get a better condition). [src/gamma.c] Corrections in a proof for tiny arguments. Added a TODO. 2017-04-27 Vincent Lefèvre [doc/README.dev] Update about the MPFR_GENERIC_ABI macro. [src/sqr.c] Corrected a comment. [src/sqrt.c] Blank line like in add1sp.c, sub1sp.c, etc. [src/sqr.c] Blank lines and comment like in add1sp.c, sub1sp.c, etc. [src/mul.c] Like in add1sp.c and sub1sp.c, do not define the specific functions for low precision if MPFR_GENERIC_ABI is defined (they are not called in such a case). [src/sub1sp.c] Added blank lines for readability (like in add1sp.c). s/interruption/interrupt/ [mbench] Updated copyright years. Added a comment. 2017-04-27 Paul Zimmermann better detection of rdtscp 2017-04-18 Vincent Lefèvre [src/mpfr-impl.h] Updated a comment, with reference to GCC bug 80454. 2017-04-09 Vincent Lefèvre [tests/tprintf.c] Avoid integer overflow from r11411 with 32-bit long. 2017-04-07 Vincent Lefèvre [tools/mpfrlint] Updated test to check that the snprintf function (C99) is not used. [doc/mpfr.texi] Corrected an English error. [src/vasprintf.c] Fixed bug triggered by the test added in r11428: the size field of struct printf_spec must have type size_t, not int, because the size argument of mpfr_snprintf has type size_t. [tests/tsprintf.c] Added a test that fails on 64-bit machines (4-byte int, 8-byte size_t), due to the use of mpfr_snprintf with required size = (size_t) UINT_MAX + 1. [src/vasprintf.c] Minor changes. [src/vasprintf.c] Comment re-indentation. [src/ubf.c] Renamed mpfr_get_zexp to mpfr_init_get_zexp for clarity. 2017-04-06 Vincent Lefèvre [src/mpfr-impl.h] Fixed silly typo in MPFR_UBF_CLEAR_EXP() yielding either an obscure memory leak or a crash in some mpfr_fmma calls. We would really need formal proofs on the code... Or avoid macros. 2017-04-06 Paul Zimmermann [tests/tfmma.c] added one test [tests/tfmma.c] fixed test 2017-04-06 Vincent Lefèvre [src/add1.c] Updated comment about underflow. [src/add1.c] Handling of UBF and overflow/underflow. * Added a MPFR_ASSERTD related to the overflow code. * Bug fix: handle underflow, possible if UBF input(s). 2017-04-06 Paul Zimmermann [tests/tfmma.c] added another test (currently fails) 2017-04-06 Vincent Lefèvre [src/sub1.c] Bug fix: underflow was not detected in the case cancel = 0 with UBF numbers. At the same time, refactored the related code a bit. [tests] Added tbeta to svn:ignore property. [doc/mpfr.texi] Formatting of the mpfr_can_round example for 80-column terminals + GNU coding style. [tests/tfmma.c] Updated comment about bug20170405 (fixed in r11414). [src/sub1.c] Also corrected the comment about overflow detection. [src/sub1.c] Really fixed overflow detection (r11412 is broken). [src/sub1.c] Fixed/improved UBF cases. * Added an assertion (usual MPFR limitation with huge precisions, affecting 32-bit ABI only in practice). * Fixed overflow detection. [tests/tprintf.c] In check_long_string(), which is called when MPFR_CHECK_LARGEMEM is defined, increase tests_memory_limit if need be in order to avoid an obvious failure due to insufficient memory. [tests/memory.c] Write all error messages to stderr in order to make sure that they remain visible when the standard output is redirected (e.g. in tprintf). Rewrote the messages in a consistent way. [tests/tfmma.c] Fixed return type of test added in r11407. [tests/tinits.c] When MPFR_CHECK_LARGEMEM is defined, increase tests_memory_limit if need be in order to avoid an obvious failure due to insufficient memory. 2017-04-06 Paul Zimmermann added test that triggers an error (see https://sympa.inria.fr/sympa/arc/mpfr/2017-04/msg00016.html) 2017-04-05 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] More details about errno. 2017-04-04 Vincent Lefèvre [doc/README.dev] Added a paragraph about the use of errno. [doc/mpfr.texi] Details about EOVERFLOW. 2017-04-04 Paul Zimmermann [tests/tstrtofr.c] added test in bug20161217() 2017-04-03 Vincent Lefèvre [TODO] Update about functions returning a native floating-point value and underflow/overflow. [src/atanh.c] Removed comment giving the "optimal" working precision (I do not see any proof in algorithms.tex, and it seems incorrect). [TODO,src/log1p.c] log1p(x) on small x should also be improved instead of computing log(1+x). [TODO,src/atanh.c] Suggest a faster formula for atanh(x) on small x. [src/atanh.c] Cosmetic changes (comments and whitespace). [TODO] Update about ERANGE. 2017-03-27 Vincent Lefèvre [tests/tbeta.c] Fixed a macro (use of mpfr_printf, missing cast). 2017-03-09 Vincent Lefèvre [NEWS] Mention how to find the full list of bug fixes. [tests/tstrtofr.c] Updated comments about bug20161217 and bug20170308. [tests/tstrtofr.c] Added comments about bug20161217 and bug20170308. [tests/tstrtofr.c] Updated comment: bug20170308 checks the same bug as bug20161217. [doc/mpfr.texi] Updated the month. 2017-03-08 Paul Zimmermann added non-regression test 2017-03-07 Paul Zimmermann [doc/mpfr.texi] results should not depend on machine rounding mode/precision 2017-03-06 Vincent Lefèvre [doc/sum.txt] Minor corrections. 2017-03-05 Vincent Lefèvre [src/sum.c] Added a comment about shiftq. 2017-02-28 Vincent Lefèvre [tests/tbeta.c] C89 compatibility and some code reformatting. [src/beta.c] Slightly improved comments. [src/beta.c] Fixed a bug in reduced exponent range (not detected by the current tests). [src/beta.c] Added a comment for Beta(0,negative integer). [src/beta.c] Eventually fixed the case z or w is 0 (note: r11374 did also other unwanted changes, reverted here). [src/beta.c] Reverted my changes (this was incorrect). [src/beta.c] Fixed special cases. [src/beta.c] Added comments and some corrections (incomplete) for the case "z or w is 0". 2017-02-28 Paul Zimmermann [src/beta.c] fixed case z or w is 0 [tests/tbeta.c] patch from Cade Brown - signed zeros are checked in is_same - the case above (summing non-integer negative z, w which sum to a negative integer) 2017-02-27 Paul Zimmermann [doc/mpfr.texi] added mpfr_beta in "Added Functions" 2017-02-27 Vincent Lefèvre [src/jn.c] Use MPFR_ADD_PREC. [src/beta.c] Updated comments; added a FIXME. 2017-02-27 Paul Zimmermann [src/jn.c] in case the first Ziv loop failed, take into account the number of lost bits 2017-02-27 Vincent Lefèvre [src/beta.c] Use MPFR_ARE_SINGULAR. 2017-02-27 Paul Zimmermann [src/beta.c] fix in case z and w are not integers and z+w is a nonpositive integer [src/odd_p.c] new source file [src/Makefile.am] new file odd_p.c [src/beta.c] fixed bug [src/mpfr-impl.h] renamed mpfr_is_odd into mpfr_odd_p [src/pow.c] moved mpfr_is_odd (renamed mpfr_odd_p) into separate file 2017-02-27 Vincent Lefèvre [src/beta.c] Added a FIXME (test failure with assertions). [src/beta.c] Removed an unusual space. [tests/tbuildopt.c] Added calls to tests_start_mpfr and tests_end_mpfr. [tools/mpfrlint] Added a test to check that the usual test programs call tests_start_mpfr and tests_end_mpfr. 2017-02-27 Paul Zimmermann [src/beta.c] several fixes [src/pow.c] renamed is_odd to mpfr_is_odd, and export it [src/mpfr-impl.h] export mpfr_is_odd as internal function [tests/tbeta.c] added generic tests 2017-02-27 Vincent Lefèvre [tests/tbeta.c] Added missing void in prototype. Removed trailing spaces. [tests/tbeta.c] Fixed the usage of MPFR types. [tests/tbeta.c] Minor correction. Added a FIXME and a TODO. 2017-02-27 Paul Zimmermann [tests/tbeta.c] GNU style and C89 portability [TODO] removed beta entry new function mpfr_beta [tests/tbeta.c] test file for mpfr_beta, contributed by Cade Brown from ChemicalDevelopment (this commit is the file as it was contributed, except the mpfr-test.h include) 2017-02-27 Vincent Lefèvre [src/beta.c] Portability corrections. 2017-02-26 Paul Zimmermann [src/beta.c] fix for exact case beta(1,2^k) for k negative integer [src/beta.c] special values are now implemented (should be reviewed) 2017-02-25 Vincent Lefèvre [TODO] mpfr_root: replace "obsolete" by "deprecated" (the right word). [TODO] Update about rootn. [TODO] Added some propositions about rootn. 2017-02-25 Paul Zimmermann [src/root.c] added comment added reference 2017-02-23 Vincent Lefèvre [src/beta.c] Call mpfr_check_range as usual. [src/beta.c] Extended the exponent range for the generic case. [src/beta.c] Added a comment. [src/beta.c] Various code improvement / fixes. [src/beta.c] Added a FIXME. 2017-02-23 Paul Zimmermann [src/beta.c] added beta function (work in progress, not yet fully implemented, and not tested) 2017-02-21 Paul Zimmermann [src/fmma.c] speedup of mpfr_fmma and mpfr_fmms [src/fma.c] speedup of mpfr_fma when all operands have the same precision (less than one full limb) 2017-02-21 Vincent Lefèvre [NEWS] Note that the position of "const" in the mpfr_sum prototype has been fixed (in case writers of interfaces for MPFR use that). "a IEEE 754r decimal64 float" → "an IEEE 754-2008 decimal64 float". 2017-02-20 Paul Zimmermann [src/fma.c] speedup mpfr_fma for 1 limb 754R -> 754-2008 2017-02-20 Vincent Lefèvre Removed trailing spaces. [src/vasprintf.c] Solved the FIXME for %g on easy cases. 2017-02-17 Vincent Lefèvre [src/zeta.c] mpfr_reflection_overflow: reverted r11322 as the rounding direction was correct; it was a comment that was incorrect, now fixed. [src/zeta.c] mpfr_reflection_overflow: fixed a rounding direction. [src/zeta.c] Improvements of mpfr_reflection_overflow: * Moved identical parts of the code at the beginning of if/else blocks as a single part before the "if". * When the rounding mode doesn't matter (exact result), use MPFR_RNDN. * Updated comments (making them more consistent at the same time). 2017-02-16 Paul Zimmermann [src/zeta.c] added more comments for the overflow case 2017-02-14 Vincent Lefèvre [src/sum.c] Added a note about why one uses "const mpfr_ptr *x" in the prototypes instead of "const mpfr_srcptr *x" (old info from r5381). [doc/sum.txt] Fixed the const position (see r11316) and added this note. [src/{mpfr-impl.h,mpfr.h}] Code reformatting and other cosmetic changes. [doc/mpfr.texi] For mpfr_sum, changed "mpfr_ptr const" to the equivalent "const mpfr_ptr" (usual style, less confusing). For mpfr_sum and its auxiliary functions, moved the const type qualifier to the right place (mpfr_ptr *const → const mpfr_ptr *). This bug had been introduced in r3642 (2005-06-10). 2017-02-13 Vincent Lefèvre [src/zeta.c] mpfr_reflection_overflow: added comments and FIXME's; fixed obvious typos in a comment and the code. [src/zeta.c] mpfr_reflection_overflow: typo in a comment. [src/zeta.c] Untabified. [src/zeta.c] mpfr_reflection_overflow: added an assertion and a comment. [src/vasprintf.c] Added a comment in a FIXME. [src/vasprintf.c] Added MPFR_ASSERTD's. [src/vasprintf.c] Avoid some potential integer overflows. 2017-02-13 Paul Zimmermann [src/zeta.c] improved overflow detection 2017-02-13 Vincent Lefèvre [src/vasprintf.c] Added FIXME's: possible integer overflows. 2017-02-12 Paul Zimmermann fix for mpfr_zeta overflow on 32-bit computers 2017-02-11 Paul Zimmermann [src/sqr.c] revert detection of leading bit in sqr_1 and sqr_2 (not clear it is faster) 2017-02-10 Vincent Lefèvre [tests/tsprintf.c] Added a mpfr_snprintf test with a null pointer, "%#.*RDg" and a large precision (it currently takes too much memory, like the similar ones). [src/vasprintf.c] Added a FIXME for %g on easy cases (too much memory). [tests/tsprintf.c] Added corresponding tests. 2017-02-09 Vincent Lefèvre [src/vasprintf.c] Fix for mpfr_snprintf with size=0: do not allocate a buffer for the output if not needed. This really fixes bug #21056. The case size_t < unsigned int could not be solved completely due to limitations from the C standard and GMP. [src/sqrt.c] Avoid a warning due to an unused variable with MPFR_GENERIC_ABI defined or GMP_NUMB_BITS != 64. [src/sqrt.c] Added MPFR_ASSERTD's from comments. 2017-02-09 Paul Zimmermann [tests/tzeta.c] interm_overflow -> intermediate_overflow 2017-02-09 Vincent Lefèvre [src/zeta.c] Updated a FIXME. 2017-02-09 Paul Zimmermann improved detection of fmma and fmms [src/zeta.c] fixed long-standing failure in tzeta 2017-02-08 Paul Zimmermann [src/sqrt.c] fixed a bug, and simplified code (sb=0 implies rb=0) 2017-02-08 Vincent Lefèvre [src/vasprintf.c] Updated FIXME. 2017-02-08 Paul Zimmermann [src/sqrt.c] new code for prec=GMP_NUMB_BITS 2017-02-08 Vincent Lefèvre [src/vasprintf.c] Moved the size_t vs int FIXME, with details added. [src/vasprintf.c] Added a MPFR_ASSERTN for security. [src/vasprintf.c] Added a FIXME for the case size_t < unsigned int. [src/vasprintf.c] Solved the r11288 FIXME, introducing new ones with a more visible failure. Not fixed yet because there seems to be another issue (already present at the beginning in r4993), which should be considered first. [src/vasprintf.c] Added a FIXME (related to the cause of the failure). [src/vasprintf.c] Added some precondition assertions, as the buffer_cat implementation requires that the current buffer position contains \0. Note[VL]: tsprintf is still failing with assertions on my machine in the 32-bit Linux/x86 ABI, but now on the new precondition instead of postcondition. The behavior with size = 0 actually depends on the state of uninitialized memory (even in the 64-bit ABI), so that the failures may be random; the problem is detected by valgrind. [src/div.c] Declare variables used by GMP_NUMB_BITS == 64 only in the related code. 2017-02-08 Paul Zimmermann [src/mul.c] simplified logic for special code [src/div.c] fixed bug in mpfr_div_1n when extra=0 [src/div.c] special code for prec=GMP_NUMB_BITS [src/sqr.c] new code for p = GMP_NUMB_BITS, and small improvement in mpfr_sqr_1 [src/mul.c] cosmetic changes 2017-02-08 Vincent Lefèvre [tests/tsub1sp.c] Fix: C++ compatibility. 2017-02-08 Paul Zimmermann [src/mul.c] added special code for prec=GMP_NUMB_BITS [src/add1sp.c] use special code only when MPFR_GENERIC_ABI is not defined [src/sub1sp.c] idem as above 2017-02-08 Vincent Lefèvre [src/mpfr-impl.h] Declare the mpfr_vasnprintf_aux prototype (which uses va_list) only if has been included, otherwise the build was failing with GCC in C90 mode under Linux (and could fail with other C implementations where this header isn't automatically included as a consequence of the inclusion of some other header). 2017-02-08 Paul Zimmermann [src/sub1sp.c] new function for p=GMP_NUMB_BITS, fixed bug in mpfr_sub1sp3 [tests/tsub1sp.c] added new tests 2017-02-08 Vincent Lefèvre [src/vasprintf.c] Fixed bug introduced in r11273. [tools/mpfrlint] Updated the "simple mp_limb_t constants" test. Made some assertions a bit more readable. [tests/tsub1sp.c] Fixed mpfr_inits2/mpfr_clears sentinel → (mpfr_ptr) 0 [tests/tsprintf.c] C90 compatibility. 2017-02-08 Paul Zimmermann [src/vasprintf.c] avoid memory allocation for snprintf with size=0 [src/sub1sp.c] fixed a bug in mpfr_sub1sp1 and mpfr_sub1sp2 (corner case) [tests/tsub1sp.c] added non-regression test 2017-02-07 Paul Zimmermann [src/add1sp.c] added special code for p=GMP_NUMB_BITS [src/vasprintf.c] improved also %a and %e [src/vasprintf.c] fixed bug #21056 2017-02-07 Vincent Lefèvre [TODO] More about the mpz_t pool. [src/free_cache.c] Better file description (keeping it short). [src/free_cache.c] Updated comments (mpz_t cache → mpz_t pool). [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Clarified mpfr_asprintf & mpfr_vasprintf specification in case of error. [src/vasprintf.c] Code cleanup. 2017-02-06 Paul Zimmermann partial solution of bug #21056: a test of mpfr_sprintf still fails [tests/tmul.c] added test for underflow corner case [src/div.c] simplified underflow in div_1 and div_2 (one case is not possible) [tests/tsqr.c] added another corner case for underflow and mpfr_sqr_2 [tests/tsqr.c] added a corner underflow case 2017-02-06 Vincent Lefèvre [src/mpfr-impl.h] Added missing function prototype after r11256. 2017-02-06 Paul Zimmermann [mpfr-impl.h] now mpz_init2 uses the mpz spool too 2017-02-03 Vincent Lefèvre [TODO] Added: check the small-precision tables in the tests? Removed trailing whitespace. [acinclude.m4] Fixed code for the _mulx_u64 test. 2017-02-02 Vincent Lefèvre [tests/tversion.c] Output whether _mulx_u64 is available. [acinclude.m4] Fixed _mulx_u64 detection to avoid failures in tests with ICC 15: we need an AC_RUN_IFELSE, not just an AC_LINK_IFELSE. 2017-01-31 Vincent Lefèvre [src/invsqrt_limb.h] Improved constants: make their meaning explicit; portability with 32-bit long (and 64-bit limb). 2017-01-31 Paul Zimmermann [src/invsqrt_limb.h] new macro __gmpfr_sqrt_limb_approx [src/sqrt.c] new sqrt1 code using __gmpfr_sqrt_limb_approx 2017-01-30 Paul Zimmermann [src/sqrt.c] improved slow branch of mpfr_sqrt2 [src/div.c] improved slow branch of mpfr_div_2 [src/div.c] fixed TODO: replaced two if-statements by while-loop 2017-01-30 Vincent Lefèvre [src/div.c] Added TODO's. [src/div.c] Added a MPFR_ASSERTD. 2017-01-28 Paul Zimmermann [src/atan.c] added comment [src/invsqrt_limb.h] fixed __gmpfr_sqrt_limb macro [src/atan.c] small optimization 2017-01-27 Paul Zimmermann [src/atan.c] speedup for small precision 2017-01-27 Vincent Lefèvre [src/mul.c] Disable mpfr_mul_{1,2,3} if MPFR_GENERIC_ABI is defined. [src/mul.c] Removed useless parentheses that can inhibit warnings. 2017-01-26 Vincent Lefèvre [src/mul.c] Updated TODO. [src/mul.c] Added a TODO about an optimization. 2017-01-26 Paul Zimmermann [src/sqrt.c] fixed error bound for mpfr_sqrt2_approx 2017-01-25 Vincent Lefèvre [TODO] Added optimization of test + shift for some processors. [src/sub1sp.c] Added MPFR_FULLSUB code for mpfr_sub1sp2. 2017-01-25 Paul Zimmermann [src/sqrt.c] changed error bound back from 16 to 15 2017-01-25 Vincent Lefèvre [doc/add-with-carry.c] Added reference to my bug report about Clang's carry detection missed optimization in chained add-with-carry. 2017-01-25 Paul Zimmermann [src/sqrt.c] updated error bound for __gmpfr_invsqrt_limb_approx 2017-01-25 Vincent Lefèvre [src/sub1sp.c] Added refs to missed/broken optimization with Clang/LLVM. [src/sub1sp.c] Use the FULLSUB only. Added a comment about the change in r11227. 2017-01-25 Paul Zimmermann [src/sub1sp.c] changed MPFR_FULLSUB variant into faster code 2017-01-24 Vincent Lefèvre [doc/mpfr.texi] Texinfo typography correction. [doc/mpfr.texi] Improvements concerning the exponent range. * mpfr_get_exp: added a FIXME in a comment (documented behavior?). * mpfr_set_emin / mpfr_set_emax: more specification and details. * mpfr_subnormalize: clarification; added a warning about emin. * Example of mpfr_subnormalize: added a note. In particular, this follows a confusion: https://sympa.inria.fr/sympa/arc/mpfr/2017-01/msg00024.html 2017-01-24 Paul Zimmermann [src/invsqrt_limb.h] changed slightly definition of d10 and d37 (does not change final error analysis) 2017-01-23 Vincent Lefèvre [src/sub1sp.c] Updated comments about subtraction with borrow; the first one from r11213 was incorrect (bad interpretation of the generated code for GCC, potentially on a different alternate source code for Clang). 2017-01-23 Paul Zimmermann [src/sub1sp.c] simplified mpfr_sub1sp1() [tests/turandom.c] added non-regression test 2017-01-23 Vincent Lefèvre [src/urandom.c] Added a FIXME as mpfr_urandom does not always set flags. [src/urandom.c] Simplified code (no changes in the behavior). 2017-01-23 Paul Zimmermann [src/urandom.c] fixed bug reported by Trevor Spiteri (https://sympa.inria.fr/sympa/arc/mpfr/2017-01/msg00020.html) 2017-01-21 Paul Zimmermann changed mpn_sqr_n into mpn_sqr 2017-01-20 Paul Zimmermann new version of mpfr_sqrt2_approx (no longer needs sqrt_tab.h) 2017-01-20 Vincent Lefèvre [src/sub1sp.c] Updated TODO, mentioning an optimization bug in LLVM. [src/sub1sp.c] Updated TODO about full subtraction with borrow. [src/sub1sp.c] Added alternate code (enabled with -DMPFR_FULLSUB, until fully tested) to replace a test + correction by a 2-limb subtraction, recognized by GCC and Clang. 2017-01-20 Paul Zimmermann renamed __gmpfr_invsqrt_limb into __gmpfr_invsqrt_limb_approx to better reflect it only gives an approximation 2017-01-20 Vincent Lefèvre [src/invert_limb.h] Just like for invsqrt_limb.h (r11210), in 1UL << 60, replaced 1UL by MPFR_LIMB_ONE to make the code valid with 32-bit long. [src/invsqrt_limb.h] Bug fix: replaced 1UL by MPFR_LIMB_ONE since the computations are done on limbs, which are expected to have 64 bits in this context (the old code would fail on MS Windows / MinGW, where limbs are 64-bit unsigned long long and unsigned long is a 32-bit type). [src/invsqrt_limb.h] Portability correction: avoid lines longer than the POSIX line-length limit of 2047 characters; actually fit on 80 columns. 2017-01-20 Paul Zimmermann faster version of mpfr_sqrt1(), with smaller table [src/invert_limb.h] improved __gmpfr_invert_limb* for 64-bit limb 2017-01-17 Paul Zimmermann [src/div.c] use ADD_LIMB macro, and fixed comment 2017-01-17 Vincent Lefèvre [acinclude.m4] MPFR_PARSE_DIRECTORY macro definition: workaround if the realpath command is not found. Suggestion by Trevor Spiteri: https://sympa.inria.fr/sympa/arc/mpfr/2017-01/msg00013.html Note: I had to modify the patch to use quadrigraphs, otherwise the generated configure file was invalid. 2017-01-17 Paul Zimmermann [tdiv.c] added code to exercise mpfr_div2_approx 2017-01-16 Paul Zimmermann [src/div.c] new variant of mpfr_div2_approx() 2017-01-13 Vincent Lefèvre [src/invert_limb.h] Fit on 80 columns (one line was over the POSIX line-length limit of 2047 characters). [src/invert_limb.h] Correction in __gmpfr_invert_limb for 32-bit ABI: _d was used before being defined. 2017-01-13 Paul Zimmermann [invert_limb.h] added invert_limb code for 32-bit 2017-01-13 Vincent Lefèvre [src/add1sp.c] Improved a line based on analysis (+ timings I've done on x86_64 with GCC and Clang give better results, though they cannot be conclusive since the gain is too small compared to other possible causes of variations). [tools/mbench/Makefile] Added -static to CFLAGS in order to avoid a link error when MPFR has been built with Clang (linking is done with .a libraries, i.e. static libraries). [src/add1sp.c] Replaced "return 0;" by "MPFR_RET(0);" to emphasize on the fact that we return a ternary value (code instrumentation may also be easier later). Note: this is equivalent since the macro expands to 0 != 0 ? ... : 0, which gives 0 via trivial optimization. [src/add1sp.c] Improvements in mpfr_add1sp1; added a TODO. Note for rb -> bp[0]: the generated code is the same, but the source is more readable (-> rb has only one meaning). [src/div.c] C90 compatibility (avoid initializer elements not computable at load time). 2017-01-12 Paul Zimmermann [src/div.c] added some alternate code for mpfr_div2_approx (disabled for now) fixed bug in urandomb.c reported by Dominic Chen (https://sympa.inria.fr/sympa/arc/mpfr/2017-01/msg00011.html) and replaced MPN_COPY_INCR/MPN_COPY_DECR by mpn_copyi/mpn_copyd [src/div.c] small improvement in div_1 and div_2: force all precisions to be equal, then we cannot have rb <> 0 and sb = 0 [src/div.c] improved case p=127 (or two-limb case with hard to round case) 2017-01-12 Vincent Lefèvre [src/add1sp.c] Added a TODO: slightly better code? 2017-01-12 Paul Zimmermann [src/div.c] improve mpfr_div_1 for precision 63 2017-01-12 Vincent Lefèvre [src/rndna.c] Updated comments. 2017-01-12 Paul Zimmermann [src/sqrt.c] improved mpfr_sqrt2_approx() 2017-01-12 Vincent Lefèvre [doc/mpfr.texi] Typographic correction (including generated spaces). 2017-01-10 Vincent Lefèvre Improvement of additions with carry. * Added doc/add-with-carry.c showing how to do an addition with carry in C (to make the compiler understand the code). * src/mpfr-impl.h: added ADD_LIMB macro (addition with carry). * src/sqr.c: use this ADD_LIMB macro to improve the generated code. 2017-01-10 Paul Zimmermann [src/sqr.c] 2 calls to umul_ppmm are enough in mpfr_sqr_2 in most cases [src/div.c] added FIXME [src/sub1sp.c] added comments [src/sqrt.c] made code coherent with comment 2017-01-10 Vincent Lefèvre [src/sqrt.c] Improved comment from r11180. 2017-01-10 Paul Zimmermann [src/sqrt.c] improved error bound for mpfr_sqrt2_approx, with known direction of error 2017-01-10 Vincent Lefèvre Merged the latest changes from the trunk and added RNDF support in mpfr_sub1sp3. [src/sub1sp.c] Fixed other two bugs in special code for 3 limbs. TODO: non-regression tests should be added for both. [src/sub1sp.c] Fixed some bugs in special code for 3 limbs. [src/sub1sp.c] Simplified a test. 2017-01-09 Paul Zimmermann [src/sqr.c] deal with RNDF in sqr_1, sqr_2 and sqr_3 [src/mul.c] deal with RNDF in mpfr_mul_3 [src/sub1sp.c] added special code for 3 limbs 2017-01-09 Vincent Lefèvre Merged the latest changes from the trunk. [src/add1sp.c] Fixed too large shift count in r11170 (code for 3 limbs). 2017-01-09 Paul Zimmermann [src/add1sp.c] added special code for 3 limbs [src/sqr.c] added special code for 3 limbs 2017-01-09 Vincent Lefèvre Merged the latest changes from the trunk (changing a RND_RAND to RND_RAND_NO_RNDF in order to avoid a failure in a test). [tests/tsub1sp.c] Fixed a return type. [doc/README.dev] Updated note added in r11165. [doc/README.dev] Added a note about cross-compilation and test under Wine, with references to bugs in autoconf and dash. 2017-01-09 Paul Zimmermann [tests/tmul.c] fixed typo 2017-01-09 Vincent Lefèvre [src/round_raw_generic.c] Added MPFR_RNDF special support (seen as MPFR_RNDZ since this is faster, with *inexp = 0). 2017-01-09 Paul Zimmermann [src/sub1sp.c] fixed bug in mpfr_sub1sp2 when exponent diff. is GMP_NUMB_BITS [tests/tsub1sp.c] added testcase 2017-01-09 Vincent Lefèvre [src/mul.c] Bug fix in mpfr_mul_3; tmul no longer fails (64-bit ABI). [tests/tmul.c] Added test of mpfr_mul on 1 to 3 limbs. Currently fails. 2017-01-08 Vincent Lefèvre [src/mul.c] Define aq = MPFR_GET_PREC (a), and use this. 2017-01-08 Paul Zimmermann [src/mul.c] added mpfr_mul_3 [src/sqrt.c] renamed internal functions [src/sub1sp.c] cosmetic change 2017-01-07 Paul Zimmermann [src/exp.c] avoid using a full limb as precision [src/sqrt.c] removed obsolete comment [src/get_str.c] avoid precision = GMP_NUMB_BITS [src/div_ui.c] added comment 2017-01-06 Vincent Lefèvre [tools/mbench/README] Say how to disable a non-working library. Merged the latest change from the trunk. 2017-01-06 Paul Zimmermann [src/div.c] fixed previous commit: mpfr_div_1 and mpfr_div_2 also work for GMP_NUMB_BITS <> 64, only some fast code inside is not defined 2017-01-06 Vincent Lefèvre Merged the latest changes from the trunk. 2017-01-05 Vincent Lefèvre [src/div.c] Use mpfr_limb_ptr instead of mp_ptr. [src/div.c] Fix for GMP_NUMB_BITS != 64. 2017-01-05 Paul Zimmermann [src/div.c] faster division for 2 limbs 2017-01-05 Vincent Lefèvre [src/div_ui.c] Coding style. [src/div_ui.c] Simplification. [src/div_ui.c] Replaced a MPFR_ASSERTN by MPFR_STAT_STATIC_ASSERT. [tests/tdiv_ui.c] Correction for 64-bit limb with 32-bit unsigned long. [tests/tdiv_ui.c] Fix when GMP_NUMB_BITS != 64. 2017-01-05 Paul Zimmermann last fix was incomplete [src/div_ui.c] fixed a bug in mpfr_div_ui (also affects mpfr_div since it calls mpfr_div_ui when the divisor has a few bits) fixed underflow bug by replacing !MPFR_IS_LIKE_RNDZ by new macro MPFR_IS_LIKE_RNDA: for RNDN, !MPFR_IS_LIKE_RNDZ was true, while new macro MPFR_IS_LIKE_RNDA is false 2017-01-04 Vincent Lefèvre [tests/tdiv.c] Added a test that triggers an assertion failure in a reduced exponent range (found from the generic tests with GMP_CHECK_RANDOMIZE=1483628702). [tests/tgeneric.c] Added debug messages for overflow & underflow tests. [tests/tdiv_ui.c] Added a comment on new test (doesn't fail). 2017-01-04 Paul Zimmermann [tdiv_ui.c] added new test 2017-01-03 Vincent Lefèvre [src/invert_limb.h] Removed an unused variable. 2017-01-03 Paul Zimmermann use a macro instead of a function for __gmpfr_invert_limb and __gmpfr_invert_limb_approx saves 2-3 cycles 2017-01-01 Vincent Lefèvre Merged the latest changes from the trunk. [doc/mpfr.texi] Updated the month. Copyright notice update: added 2017 with perl -pi -e 's/ (\d{4}-)?(2016)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the tools/mbench directory (not distributed with MPFR). Removed 2016 from the example in the doc/README.dev file. 2016-12-31 Vincent Lefèvre [src/sqr.c] Bug fixes (portability): replaced left shift of a value that can be negative by a multiplication by 2. [src/sqrt.c] C90 compatibility. [src/div.c] C90 compatibility. [src/invert_limb.c] Removed unused variable. 2016-12-30 Paul Zimmermann [src/mul.c] small speedup in mpfr_mul_2 by not computing the product b0*c0 [src/mul.c] fixed typo in comment [src/sqr.c] likewise [src/mul.c] fixed regression for 1/2 limbs introduced in revision 11098: critical routines should not be exported, otherwise we lose a few cycles (maybe they are inlined by the compiler) [src/div.c] further improvement in mpfr_div_1() [src/div.c] use an approximate quotient in mpfr_div_1() [src/div.c] simplify mpfr_div_1() [src/invert_limb.c] new file for __gmpfr_invert_limb internal function (only provided so far for 64-bit limb) [src/div.c] mpfr_div_1 and mpfr_div_2 don't require --enable-gmp-internals any more [sqrt_tab.h] better file description 2016-12-29 Vincent Lefèvre Improvement concerning the _mulx_u64 intrinsic. 2016-12-29 Paul Zimmermann [src/div.c] replace GMP's invert_limb (internal) by own code 2016-12-29 Vincent Lefèvre Merged the latest changes from the trunk. [src/sqrt.c] Replaced constant MPFR_ASSERTD by MPFR_STAT_STATIC_ASSERT. 2016-12-28 Paul Zimmermann [src/sqr.c] use special code for 1 and 2 limbs [mbench] added mpfr_sqr [src/sqrt.c] faster sqrt code for 2 limbs and 64-bit limb (removed special code for 32-bit limb) [src/sqrt_tab.h] new table for mpn_sqrtrem4_approx [tlog.c] missing printf() 2016-12-27 Vincent Lefèvre [NEWS] Mention that mpfr_get_str now also sets the inexact flag when the conversion is inexact (completing r11073). [mpfr.texi] Be stronger in mpfr_round_nearest_away documentation (as the ternary value is used each time the last bit on p+1 bits is not 0, i.e. in about half cases). 2016-12-27 Paul Zimmermann [mpfr.texi] added stuff in mpfr_round_nearest_away documentation 2016-12-27 Vincent Lefèvre [src/log.c] Added another FIXME concerning the error analysis. [src/log.c] Added an assertion and a FIXME: error in the MPFR code or in the proof (error analysis). [src/log.c] Slight simplification / improvement. [doc/algorithms.tex] In Section "The logarithm function" (from r9046), removed everything concerning the AGM since this is not what is done in the MPFR code, where mpfr_agm is simply called (and this function already has its own description later). Note: The error analysis of mpfr_log can only be found in log.c, but seems incorrect (though the bounds may be valid); it was introduced in r416. 2016-12-26 Vincent Lefèvre Merged the latest changes from the trunk (this concerns only src/log.c). [src/log.c] Group constant terms together (GCC takes advantage of this, at least on x86_64). [src/log.c] Check for integer overflow (no visible changes in standard configuration) + explanations. [src/log.c] Get the exponent of the input only once. 2016-12-20 Vincent Lefèvre [doc/sum.txt] Update for faithful rounding (MPFR_RNDF). [src/sum.c] Fixed the bug mentioned in r11077. [tests/tsum.c] The new test for MPFR_RNDF in r11079 can actually trigger a failure; increased the number of tests to get a failure by default. [tests/tsum.c] Improved a test to support MPFR_RNDF. It doesn't fail, but would if 0 in "corr = 0" were changed to -1 or 1 (tested). Removed trailing spaces. [src/sum.c] Improvement for MPFR_RNDF, but still based on the change done in r10512, which was incorrect; added a FIXME (a non-regression test needs to be added first). Merged the latest changes from the trunk (this concerns only src/sum.c and will be useful for the upcoming improvement). [src/sum.c] Delay some assignments so that they are done just before the variables are used (this should have been done in r10467). Merged the latest changes from the trunk. [doc/mpfr.texi] For mpfr_get_str, explicitly say that the inexact flag is set iff the result is inexact (since this may not be obvious and this wasn't the case until now). In the compatibility section, mention this change. [doc/mpfr.texi] For mpfr_get_str, removed the note saying that the inexact flag is not set when the conversion is inexact: this is fixed in r11071. [src/get_str.c] Corrected a comment and a test for inexactness (→ the new tget_str.c test no longer fails). 2016-12-19 Vincent Lefèvre [tests/tstrtofr.c] Added a comment. [src/strtofr.c] Better indentation. [tests/tstrtofr.c] Replaced mpfr_cmp() == 0 by mpfr_equal_p(). [doc/mpfr.texi] Updated the month. [src/get_str.c] Removed an obsolete comment, which came from r2757 (and even before, under another form); this comment no longer made any sense as the sign of dir is no longer tested. [src/get_str.c] Indentation fixed. [src/get_str.c] Setting the inexact flag as done in r11060 was incorrect since the flags are restored. Moreover, this was done even when the Ziv loop was going to fail (it's not clear whether this was expected). Moved the test out of the Ziv loop, and update the copy of the flags instead of the flags that will be overwritten. Note: this still fails, but now for another reason. [tests/tget_str.c] Check the inexact flag for mpfr_get_str. The test currently fails. 2016-12-19 Paul Zimmermann [get_str.c] inexact flag should now be correct in mpfr_get_str [strtofr.c] updated comment 2016-12-18 Vincent Lefèvre [doc/mpfr.texi] Added a short note about the default precision for Re. 2016-12-18 Paul Zimmermann [mpfr.texi] added emin in comment about mpfr_round_nearest_away fixed bug in mpfr_strtofr (and likely similar bug in mpfr_get_str) 2016-12-17 Paul Zimmermann [tstrtofr.c] added test for bug in mpfr_strtofr() 2016-12-17 Vincent Lefèvre [src/sqrt.c] Added "do ... while (0)" in macro definition. 2016-12-16 Vincent Lefèvre Removed trailing whitespace. [src/round_raw_generic.c] Completed the support for MPFR_RNDNA (set *inexp if use_inexp is true), from a patch by John P. Hartmann. 2016-12-16 Paul Zimmermann new mpn_sqrtrem4_approx function (unused so far) 2016-12-15 Vincent Lefèvre [tests/tsqrt.c] The latest changes made tsqrt fail in an inexact test on MPFR_RNDF. Fixed by changing RND_RAND to RND_RAND_NO_RNDF. Merged the latest changes from the trunk. [src/sin.c] Handled a FIXME. [src/sqrt_tab.h] Added copyright notice. 2016-12-15 Paul Zimmermann [sqrt.c] simplify code for GMP_NUMB_BITS = 64 2016-12-14 Paul Zimmermann better fix than r11025 [sqrt_tab.h] new header file with table for mpn_sqrtrem2_approx() [sqrt.c] new version of mpn_sqrtrem2_approx() [sqrt.c] added mathematical error in mpn_sqrtrem2_approx() added non-regression test for bug fix in r11037 2016-12-14 Vincent Lefèvre [src/vasprintf.c] Fixed a bug as spec.prec can be a negative number other than -1 (if such a value is given as an argument with ".*"). This is the probable cause of the assertion failure on: https://gforge.inria.fr/tracker/?func=detail&atid=619&aid=21056&group_id=136 2016-12-13 Paul Zimmermann [sqrt.c] faster version of mpn_sqrtrem2 for 64-bit limb [sqrt.c] approximate version of mpn_sqrtrem2, saves a few cycles in mpfr_sqrt1 [add/sub] added MPFR_UNLIKELY when adding one ulp changes the binade 2016-12-12 Vincent Lefèvre [src/sin.c] Added missing word in r11032 comment. [src/sin.c] Common/related subexpressions. Added a FIXME. 2016-12-12 Paul Zimmermann [cos.c,exp_2.c,log.c] improved initial precision for Ziv's strategy [sin.c] improved strategy for initial precision [sqrt.c] updated code and comments [sqrt.c] slightly improve mpn_rsqrtrem1() (and detailed error analysis) [sqrt.c] removed mpn_sqrtrem1 (no longer needed since r11023) [sqrt.c] fixed comments to be coherent with the code fixed https://gforge.inria.fr/tracker/?func=detail&atid=619&aid=21053&group_id=136 2016-12-09 Vincent Lefèvre [src/sqrt.c] Corrected a comment (1 has exponent 1 and we support precision 1). 2016-12-09 Paul Zimmermann [sqrt.c] no more special case for prec <= GMP_NUMB_BITS/2, and added comments 2016-12-09 Vincent Lefèvre [src/sqrt.c] Bug fix (replaced = by ==). Note: this kind of bug could be detected by avoiding extra parentheses. [src] Simplified ~MPFR_LIMB_ZERO to MPFR_LIMB_MAX. 2016-12-09 Paul Zimmermann [div.c] simplified mpfr_div_1 and mpfr_div_2 [div.c] added comments and simplified code [div.c] simplified code likewise for mpfr_mul_2() fixed bug in mpfr_mul_1() introduced in r11004 and added test case [div.c] simplified underflow test in mpfr_div_1() 2016-12-09 Vincent Lefèvre [src/div_ui.c] underflow is unlikely! [src/sqrt.c] overflow and underflow are unlikely! 2016-12-09 Paul Zimmermann [div.c] overflow and underflow are unlikely! [div.c] slightly better code (less dependencies) for mpfr_div_1 when u0 >= v0 [div.c] simplified mpfr_div_1() code [div.c] in mpfr_div_1, do not deal with the case where the precision is <= GMP_NUMB_BITS/2, to not slow down the general case 2016-12-09 Vincent Lefèvre [src/mul.c] Slight improvement (but shouldn't affect the generated code with an optimizing compiler). 2016-12-09 Paul Zimmermann [mul.c] likewise for mpfr_mul_2() [mul.c] simplified mpfr_mul_1() fixed similar bug in mpfr_mul_2() + non-regression test [mul.c] simplified the code and fixed a bug [tmul.c] added non-regression test for fixed bug [sub1sp.c] added comment + assert 2016-12-09 Vincent Lefèvre [src] Fixed bug introduced in r10964 with --with-gmp-build: move the numberof_const() definition from mpfr-gmp.h to mpfr-impl.h. 2016-12-09 Paul Zimmermann [add1sp.c] added comment [add1sp.c] simplified mpfr_add1sp2() [sub1sp.c] in mpfr_sub1sp2(), compute a0 before a1 whenever possible 2016-12-09 Vincent Lefèvre [tools/mbench/mfv5.cc] Fixed type. 2016-12-08 Paul Zimmermann [mbench] fixed typo 2016-12-08 Vincent Lefèvre Replaced two ~0 with mp_limb_t target by MPFR_LIMB_MAX. [tools/mpfrlint] Added a test detecting code like ~0 (either an error or poorly written code). 2016-12-08 Paul Zimmermann improved add1sp.c and sub1sp.c like in r10991 [mbench] set default max_exp to 1 (independent of number of bits per limb) [sub1sp.c] improved further [mbench] use mpfr_printf to print test numbers fixed bug in mfv5 (numbers used were 10 times too large) 2016-12-07 Paul Zimmermann added rounding code for RNDF in special routines for 1 and 2 limbs [sub1sp.c] corrected a comment, added another one 2016-12-07 Vincent Lefèvre [src/add1sp.c] Typo in a comment. [src/pow.c] Punctuation to make clear that there are 2 sentences. 2016-12-07 Paul Zimmermann likewise r10983 [add1sp.c] improved a conditional (if compiler is not smart enough) [exp_2.c] small improvements 2016-12-07 Vincent Lefèvre [src/mpfr-impl.h] MPFR_INT_CEIL_LOG2(x) macro: added a FIXME and an assertion concerning whether x <= ULONG_MAX or not. [src/pow.c] Added an assertion. 2016-12-07 Paul Zimmermann [algorithms.tex] fixed typo [pow.c] tuned starting precision (and removed obsolete comment) use MPFR_INT_CEIL_LOG2 modified the semantics of mpfr_can_round for rnd2=RNDF 2016-12-06 Paul Zimmermann [mfv5] added option -e, for example use -e1 to avoid over/underflow in mpfr_pow [pow.c] reduced overhead of special cases (gives speedup of a factor of two for 53 bits of precision) 2016-12-06 Vincent Lefèvre Merged the latest changes from the trunk except those related to mpfr_zeta (it is buggy and not fixed yet in the trunk, but the bug will not be triggered here, allowing the tests to pass). 2016-12-06 Paul Zimmermann added mpfr_pow 2016-12-06 Vincent Lefèvre [tools/mpfrlint] Correction for zsh change after v5.2 (POSIX compat: "set -e; f() { false && true; }; f; echo OK" no longer prints OK). 2016-11-29 Vincent Lefèvre Check that the numberof() macro is used on an array. * src/mpfr-gmp.h: define numberof_const() macro, equivalent to the old numberof() macro: no check, but constant expression; improved the numberof() macro to check that it is used on an array (since an array can silently be converted to a pointer in C). Note that potential failures are currently reported at run time. * src/mulders.c: replaced numberof by numberof_const in #define's (also removed a useless cast at the same time). 2016-11-17 Vincent Lefèvre [src/set_ld.c,tests/tset_ld.c] Updated comments, in particular concerning LDBL_MAX. 2016-11-15 Vincent Lefèvre [tests/tset_ld.c] Added an overflow test that triggers a bug for double-double (IBM long double format). See: https://sympa.inria.fr/sympa/arc/mpfr/2016-11/msg00006.html [src/get_ld.c] Fixed bugs for double-double (IBM long double format): * one from r8650, which could yield a spurious assertion failure in debug mode in case of underflow (with result 0); * one from r8972, which used the variable sign uninitialized and could yield a result with an incorrect sign. [tests/tset_ld.c] Added a missing exit(1). [tests] _GMP_IEEE_FLOATS was got rid of in r10150, but still used in the tests, meaning that some tests were no longer done. So, get rid of _GMP_IEEE_FLOATS also in the tests. Testing !defined(MPFR_ERRDIVZERO) or defined(HAVE_SIGNEDZ) should be sufficient, depending on the context (they were already used alone at some other places, so that new failures are unlikely); anyway, _GMP_IEEE_FLOATS was not the right macro to test. Only tget_set_d64.c has a specific change to use _MPFR_IEEE_FLOATS. [src/get_ld.c] For double-double (IBM long double format): test other special values, as this may be useful. [src/get_ld.c] For double-double (IBM long double format), the code was incorrect on large finite values, which are infinite as a double: (+inf) + (-inf) was computed, which is NaN (thanks to Rob for the report). Fixed this bug, with code clean up (not tested). 2016-11-10 Vincent Lefèvre [INSTALL] Added a note about MinGW and libtool error "libobj name ... may not contain shell special characters.", with a solution. 2016-11-09 Vincent Lefèvre [doc/sum.txt] Final corrections. [doc/sum.txt] Another correction due to the rewrite for reuse support. [doc/sum.txt] Correction. 2016-11-08 Vincent Lefèvre [src/sum.c] Added a short explanation for halfway cases. [doc/sum.txt] Improved an example (from my ARITH-23 slides). [doc/sum.txt] English usage. 2016-11-07 Vincent Lefèvre [doc/sum.txt] Explained the handling of halfway cases for sq = 1 (since the explanations for sq ≥ 2 are not valid for sq = 1). [doc/sum.txt] Minor update. [doc/sum.txt] Last corrections. Concerning the setting of the sign of the result, this changed with the support for precision 1 (see r10068). [doc/sum.txt] Correction (English). [doc/sum.txt] Correction about neg / sgn. [doc/sum.txt] Added details about the handling of halfway cases, as the rule is not obvious due to two's complement representation. 2016-11-06 Vincent Lefèvre [src/sum.c] Cosmetic change for consistency between lbit and rbit. [doc/sum.txt] Minor update. 2016-11-04 Vincent Lefèvre [doc/sum.txt] A bit more explanations. [doc/sum.txt] Corrected the usage of the HYPHEN-MINUS character (-): * If it is a minus sign, use U+2212 MINUS SIGN (as already done). * Do not use "-" after the "non" and "pre" prefixes. [doc/sum.txt] Minor improvement. 2016-10-27 Vincent Lefèvre [tools/mpfrlint] Replaced "TZ=UTC" by "TZ=GMT0" for portability. [doc/sum.txt] Added a note. [doc/sum.txt] Update for the current code (support of reused arguments); some other improvements. [doc/sum.txt] Corrected 2 typos. [src/sum.c] Changed a MPN_COPY_DECR to MPN_COPY, which may be more efficient: as of r10464 (support for reused arguments), the memory used by the accumulator for the TMD resolution is no longer a part of the main accumulator, so that we now know that the memory blocks do not overlap. 2016-10-26 Vincent Lefèvre [src/sum.c] Corrected a comment from r10503. [src/sum.c] Moved/rewrote a comment (should have been done in r10467). 2016-10-25 Vincent Lefèvre [doc/sum.txt] Started the update for the code supporting reuse. [src/mpfr-impl.h] Fixed r10916 (thanks to Eli Zaretskii for the report). 2016-10-24 Vincent Lefèvre [src/mpfr-impl.h] Improved a macro from r10916 (just in case...). [src] Support build as thread-safe DLL on Windows: clean-up. * 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 2016-10-20 Vincent Lefèvre [doc/sum.txt] Minor correction and improvement (English). [doc/sum.txt] "a" → "an" before "additional iteration". 2016-10-18 Vincent Lefèvre [src/mpfr-gmp.h] Updated a comment about bit-fields. 2016-10-17 Vincent Lefèvre [doc/mpfr.texi] Updated the FIXME concerning the mpfr_can_round specification with MPFR_RNDF (faithful rounding): after discussion with PZ, reverted r10909,10910; added a note explaining the choice done for this specification. 2016-10-14 Vincent Lefèvre [doc/mpfr.texi] Another correction of the FIXME concerning the mpfr_can_round specification with MPFR_RNDF (faithful rounding). [doc/mpfr.texi] Corrected FIXME concerning the mpfr_can_round specification with MPFR_RNDF (faithful rounding). 2016-09-27 Vincent Lefèvre [src] * mpfr-impl.h: document the memory allocated for a significand; added a cast to avoid a direct conversion from mp_limb_t * to mp_size_t *. * init2.c, round_prec.c, set_prec.c: code clean-up by correcting the type expected for the second argument of MPFR_SET_MANT_PTR (this macro has a cast, so that this should not change anything, but the old type mpfr_limb_ptr was meaningless and confusing). 2016-09-23 Vincent Lefèvre [examples/version.c] For MPFR >= 4, output float128 support info. [examples/version.c] A bit more output. [examples/version.c] * Really support C++ compilers (tested with g++ 6.2.0). * Output information about the C implementation. * Detect MPIR (→ output information on MPIR instead of GMP). [examples/version.c] * Code simplification: support for MPFR versions less than 3.0 had already been dropped with the use of MPFR_RNDN. * For MPFR patches, output "[none]" when there are no patches. * Output mpfr_ptr size. 2016-09-21 Vincent Lefèvre [src/sin_cos.c] Avoid the reuse of variables for two completely different things (with different orders of magnitude)! Changed types. [src/exp3.c] Avoid the reuse of variables for two completely different things (with different orders of magnitude)! Added a cast to avoid a potential integer overflow (like in r10881). [src/atan.c] Avoid the reuse of variables for two completely different things (with different orders of magnitude)! Changed types. [src/{atan.c,sin_cos.c}] Added casts to avoid potential integer overflows. Possible issue reported by David Binderman: https://sympa.inria.fr/sympa/arc/mpfr/2016-09/msg00029.html Note: From tests I've done on mpfr_atan, there would be issues with 16-bit int, but for 32-bit int, one could need several hundreds of billions of bits for the target precision. [doc/README.dev] "To make a release": updated paragraph about warnings. [src/mpfr-impl.h] In the MPFR_RET macro, avoid the use of an integer 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 2016-09-16 Vincent Lefèvre [doc/algorithms.tex] Riemann Zeta function, case s < 1/2: added a paragraph on the sin(...) term of the reflection formula. [doc/algorithms.tex] More work on the Riemann Zeta function. 2016-09-15 Vincent Lefèvre [doc/algorithms.tex] Riemann Zeta function, case s < 1/2: added a paragraph briefly describing how the precisions of the variables will be chosen (this is much more efficient than the current code when the target precision is much lower than the input precision). Some improvements / corrections in the description / proof of the algorithm for the Riemann Zeta function. * doc/algorithms.tex, section on the Riemann Zeta function: the case s < 1/2 (reflection formula) is now in a new section, which needs to be completed (with the detailed algorithm and error analysis); case "s close to 0" added and now properly proved. * src/zeta.c: update of the comment for s close to 0 (the brief explanations were wrong for precision 1, and this was apparently not checked when we allowed this precision!), adding a reference to algorithms.tex for details. 2016-09-14 Vincent Lefèvre [tools/mpfrlint] In "[[…]]" conditional expressions, replaced "=" by the preferred (and equivalent) form "==". Discussion: https://www.zsh.org/mla/workers/2016/msg01711.html [tests/tdiv.c] Improved code readability (related to r10871). 2016-09-14 Paul Zimmermann [tests/tdiv.c] improved code (found by David Binderman using cppcheck) 2016-09-14 Vincent Lefèvre [tools/announce-text] Use the 64-bit key ID instead of the 32-bit one since there are known collisions for 32-bit key ID's: https://evil32.com/ 2016-09-13 Vincent Lefèvre [src/zeta.c] Added a FIXME: bug in the error computation due to the use of the native double C type, which can yield an overflow. [tests/tzeta.c] Added a corresponding test case, which gives an assertion failure. [src/{uceil_log2.c,ufloor_log2.c}] Added "MPFR_ASSERTN (exp < 1023);" to get an assertion failure on infinities (which do not have an exponent). [src/uceil_log2.c] Code style. [src/ufloor_log2.c] Code style. [src/zeta.c] Make explicit that we need to use lngamma. [src/zeta.c] Updated comments on overflows / underflows. [src/zeta.c] About internal underflows / cancellation: * Added comments to FIXME's. * Detect a potential integer overflow with MPFR_ASSERTN. 2016-09-12 Vincent Lefèvre [tests/tset_ld.c] Moved a comment. [tests/tset_ld.c] Fixed print_binary (and no longer any failure with gcc -mpc64 on x86). [tests/tset_ld.c] Corrected note in print_binary. [tests/tset_ld.c] Reverted r10847 (it was incomplete and I was testing the wrong code). [tests/tset_ld.c] Fixed print_binary. [tests/tset_ld.c] Added a FIXME in print_binary, which can yield an incorrect output and return a wrong precision (causing the failure). [tests/tset_ld.c] Added a test that triggers a failure with gcc -mpc64 on x86 (64-bit ABI). [tests/tset_ld.c] Added some tests in case the rounding precision is smaller than MPFR_LDBL_MANT_DIG (e.g. with gcc -mpc64 on x86). [tests/tset_ld.c] In print_binary, added an assertion that may fail with flush-to-zero on underflow (avoiding an infinite loop). [tests/tset_ld.c] Simplified a condition in print_binary (BTW, the old condition was based on the fact that the rounding depended only on the exact result, which may not be the case when rounding is not completely specified, e.g. with double-double arithmetic like on PowerPC). [tests/tset_ld.c] Replaced a condition by a simpler, equivalent one. 2016-09-10 Paul Zimmermann [tests/tset_ld.c] added note 2016-09-09 Paul Zimmermann [tests/tset_ld.c] get rid of C99-only stuff 2016-09-09 Vincent Lefèvre [tests/tset_ld.c] Removed a variable that is no longer used. [tests/tset_ld.c] FIXME: nextafterl and ilogbl are C99 only. 2016-09-09 Paul Zimmermann [tests/tset_ld.c] fixed computation of smallest subnormal using nextafterl [tests/tset_ld.c] added warning [tests/tset_ld.c] fixed print_binary() for when the rounding precision is less than the precision of long double 2016-09-09 Vincent Lefèvre [src/get_ld.c] Replaced FIXME by an explanation of the current behavior. [tests/tset_ld.c] Added a FIXME as a consequence. [doc/README.dev] Update about NetBSD. 2016-09-08 Vincent Lefèvre [src/sqrt.c] Corrected a spelling mistake. [src/get_ld.c] Updated FIXME (mention subnormals). [src/get_ld.c] Updated FIXME (this is NetBSD 5.1). [src/get_ld.c] Added a FIXME, in particular for NetBSD. [tests/tset_ld.c] Avoid a freeze in print_binary under NetBSD due to excess precision in LDBL_MAX (we do not run the test in this case). 2016-09-08 Paul Zimmermann [src/sqrt.c] fixed bug in mpfr_sqrt2 [tests/tsqrt.c] added non-regression test 2016-09-08 Vincent Lefèvre [tests/tset_ld.c] The print_binary function is freezing on a NetBSD machine; let's start with some improvements (assertions...). [tests/tabs.c] Removed mpfr_test_init (not needed here). [tests/tset_ld.c] Moved mpfr_test_init at the right place (like tget_d.c, tset_d.c, etc.). 2016-09-08 Paul Zimmermann [src/sqrt.c] divsp1 -> div_1 2016-09-08 Vincent Lefèvre [tests/tset_ld.c] Fixed a loop in case an extended range is used (there are issues on a NetBSD machine, and this could be a cause). [tests/tset_ld.c] Corrected a type (due to a printf with %ld). 2016-09-08 Paul Zimmermann [src/div.c] divsp1 -> div_1, divsp2 -> div_2 (not necessarily same precision) [src/mul.c] mulsp1 -> mul_1, mulsp2 -> mul_2 (the precision of operands is not necessarily the same) 2016-09-08 Vincent Lefèvre [src/{get_d,get_ld}.c] Use MPFR_ALIAS. 2016-09-07 Vincent Lefèvre [src/get_ld.c] Improved the fix done in r10808: The mpfr_set_emin value is not changed, but let's make the LDBL_MIN_EXP and LDBL_MAX_EXP values appear as expected. Note: The code for x86 extended precision first appeared in r3226 with the usual emin and emax values, as found in the IEEE 754-1985 standard (bounds) or on . But MPFR uses a different convention, with a significand between 1/2 and 1 instead of between 1 and 2, so that these values were off by 1. The emax one was fixed in r6101, but the error on emin remained undetected. [tests/tset_ld.c] The bug_20160907 test is valid only with HAVE_LDOUBLE_IEEE_EXT_LITTLE. [src/zeta.c] Updated FIXME: also suggest a scaling. 2016-09-07 Paul Zimmermann [tests/tset_ld.c] check more numbers in bug_20160907() [src/get_ld.c] fixed bug reported by Walter Mascarenhas [tests/tset_ld.c] added test that triggers bug in mpfr_get_ld (https://sympa.inria.fr/sympa/arc/mpfr/2016-09/msg00005.html) 2016-09-07 Vincent Lefèvre [src/zeta.c] Updated FIXME with a suggestion. [src/zeta.c] Added a FIXME: An overflow in gamma(s1) does not imply that Zeta(s) will overflow. [tests/tzeta.c] Added a test that triggers this bug with a 32-bit ABI. [doc/README.dev] Concerning GCC's AddressSanitizer (-fsanitize=address), mention that LD_PRELOAD needs to be unset (or -static-libasan needs to be used, but does not work yet). 2016-09-06 Paul Zimmermann [doc/algorithms.tex] l -> \ell [doc/algorithms.tex] du -> {\mathrm d}u [src/log_ui.c] added FIXME 2016-09-06 Vincent Lefèvre [src/sqrt.c] Avoid a warning due to an unused variable with GMP_NUMB_BITS == 32. [acinclude.m4] Fixed m4_pattern_forbid argument to avoid an error with recent ax_pthread.m4 (such as in Debian's autoconf-archive 20160320-1, which has just appeared in unstable). [src/zeta.c] Updated FIXME. 2016-09-06 Paul Zimmermann [src/zeta.c] added FIXME [src/sqrt.c] added alternate code for mpn_sqrtrem4 (disabled for now) 2016-09-05 Paul Zimmermann move macros from div.c to mpfr-gmp.h 2016-09-05 Vincent Lefèvre About the tzeta timing issue (since r9848): * TODO: updated item on tzeta. * tests/tzeta.c: updated FIXME for test_generic. [TODO] Updated item on tzeta: * removed the old problem: the fact that the traces for the trunk and for r9954 are different is normal (fixes in mpfr_can_round affecting tgeneric.c), and the timings depend on GMP_CHECK_RANDOMIZE and seem equivalent in average with "test_generic (..., 5);" in both cases; * added the fact that tzeta has been much slower since r9848, at least with the x86 32-bit ABI. 2016-09-02 Vincent Lefèvre [src/round_prec.c] Added some details in a comment for rnd2 = RNDF. [doc/mpfr.texi] Added a FIXME on the mpfr_can_round description in order to match what I intended to say in my comment in round_prec.c (perhaps not detailed enough). 2016-09-02 Paul Zimmermann [src/round_prec.c] updated specification of mpfr_can_round with rnd2 = RNDF [tests/tpow.c] one test makes no sense for RNDF 2016-09-02 Vincent Lefèvre [doc/mpfr.texi] Completed mpfr_can_round description with RNDF. 2016-09-02 Paul Zimmermann [src/get_str.c] map RNDF to RNDN in mpfr_get_str [tests/tconst_euler.c] fixed with new specification of mpfr_can_round for RNDF [doc/mpfr.texi] put back stuff removed by accident in last commit [doc/mpfr.texi] defined the bahaviour of mpfr_can_round for rnd2 = RNDF (suggestion from Vincent) 2016-09-02 Vincent Lefèvre [src/round_prec.c] Forbid rnd2 = MPFR_RNDF as it does not make much sense without additional specification (and explained why). [tests/{tcan_round.c,tgeneric.c}] Added MPFR_RNDF support with the above restriction. Note: 6 tests are failing as a consequence. [src/round_prec.c] FIXME: rnd2 == MPFR_RNDF is not supported yet. 2016-09-02 Vincent Lefèvre Merged the remaining changesets (concerning src/{add1sp.c,sub1sp.c}) from the trunk, and fixed the code: The old mpfr_add1sp2 function was renamed to mpfr_add1sp_ref in the trunk and a new mpfr_add1sp2 function (with a different purpose) was defined; so, in if (rnd_mode == MPFR_RNDF) return mpfr_add1sp2 (a, b, c, rnd_mode); mpfr_add1sp2 had to be changed to mpfr_sub1sp_ref. Ditto for mpfr_sub1sp2 and mpfr_sub1sp_ref. 2016-09-02 Vincent Lefèvre Merged r10698 from the trunk (it was skipped by mistake in r10776). Merged the following changesets from the trunk: r10664-10686,10689-10690,10692,10695-10696,10699-10775 i.e. all the latest changes except for src/{add1sp.c,sub1sp.c} to avoid build failures (to be solved later). Currently only tcan_round fails, due to MPFR_RNDF. Removed trailing whitespace. 2016-09-01 Paul Zimmermann [src/sqrt.c] new code for 2 limbs on 64-bit machines, giving speedup of almost a factor of two: bavette.loria.fr (Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz) numactl --physcpubind=0 ./mfv5 -p113 mpfr_sqrt 3.1.4: mpfr_sqrt: 234 / 243.72 / 258 4.0-dev: mpfr_sqrt: 122 / 127.63 / 136 2016-08-31 Paul Zimmermann [src/div.c] fixed error triggered by previous commit [src/div.c] added missing assertion [tests/tdiv.c] added test case that make new assertion fail (with --enable-assert --enable-gmp-internals on a 64-bit machine) [src/div.c] fixed bug found by Vincent 2016-08-31 Vincent Lefèvre [tests/tdiv.c] Added a test triggering an assertion failure with "--enable-assert --enable-gmp-internals". 2016-08-30 Vincent Lefèvre [tools/mpfrlint] Update. [src/div.c] Untabified. Clarified a comment. 2016-08-30 Paul Zimmermann [src/sqrt.c] document mpn_sqrtrem2() [src/div.c] don't use mpfr_divsp1 and mpfr_divsp2 when MPFR_GENERIC_ABI is defined [src/div.c] faster code for 2 limbs [tests/tdiv.c] added special test for 2 limbs 2016-08-30 Vincent Lefèvre [tests] Define global variable tests_memory_disabled, which needs to be set when the memory.c allocators (to track memory leaks) must not be used; i.e., setting it disables the calls to tests_memory_start() and tests_memory_end(). In tests.c, it is initialized to 0 (unset), except when mini-gmp is used (same behavior as before this commit). Programs that test GMP's mp_set_memory_functions() need to set this variable before calling tests_start_mpfr(). 2016-08-29 Vincent Lefèvre Added tests/talloc-cache.c (not run by "make check") testing multiple calls to mp_set_memory_functions. It yields a crash in the MPFR trunk, which is unexpected with the current code. However, in the 3.1 branch, r9467 fixed the crash as expected. 2016-08-29 Paul Zimmermann [src/sqrt.c] added Sage code used to generate the bipartite tables 2016-08-29 Vincent Lefèvre [tests/talloc.c] Added a warning about new tests. 2016-08-29 Paul Zimmermann [src/atan.c] fixed TODOs, and simplified code 2016-08-29 Vincent Lefèvre [doc/mpfr.texi] Added a FIXME comment about memory allocation. [doc/mpfr.texi] Updated the month. [TODO] Done in r10756: unify is_power_of_two() and mpfr_powerof2_raw(). 2016-08-29 Paul Zimmermann unified is_power_of_two() and mpfr_powerof2_raw() [doc/mpfr.texi] improved documentation of mpfr_free_cache() 2016-08-28 Vincent Lefèvre [tests/tcan_round.c] Improved a test now that mpfr_can_round is exact. [src/mpfr-gmp.h] Added a warning about r10749. 2016-08-27 Vincent Lefèvre [src/round_prec.c] Various corrections/improvements: * Unified the return, making sure that temporary memory is no longer used after MPFR_TMP_FREE(marker), which was not the case in some places. * C90 compatibility. * Minor improvements (use of MPFR_PREC2LIMBS, code on 78 columns...). [TODO] Added: unify is_power_of_two() and mpfr_powerof2_raw()? [src/atan2.c] Replaced the use of the MPFR_IS_POWER_OF_2(x) macro by a more efficient solution based on mpfr_powerof2_raw(). [src/mpfr-impl.h] Removed the now obsolete MPFR_IS_POWER_OF_2 macro. 2016-08-26 Paul Zimmermann [src/mpfr-gmp.h] added comment about GMP memory allocation functions 2016-08-25 Paul Zimmermann [src/round_p.c] since mpfr_can_round is now always correct, we cannot compare it blindly to mpfr_round_p any more 2016-08-24 Paul Zimmermann [src/round_prec.c] fixed mpfr_can_round() so that all tests of tcan_round pass 2016-08-23 Paul Zimmermann [tests/tcan_round.c] more information in case of error in check_can_round() 2016-08-22 Vincent Lefèvre [tools/mbench/mfv5.cc] Fixed code (C++11 compatibility). [tests/tcan_round.c] Added a comprehensive test of mpfr_can_round, based on a naive implementation. Note: if the exit() is removed, many cases are failing, for both kinds of answers (there might also remain an error in my test...). 2016-08-19 Vincent Lefèvre [TODO] More thoughts about mpz_t caching (mpz_t pool). [TODO] Issues with mpz_t caching. [TODO] Update about mpz_t caching (mpz_t pool). [src/atan.c] Added TODO's to use mpz_init2 instead mpz_init: I could check that without "mpz_t cache" (pool), this makes the code faster. [doc/README.dev] Added a note about memory reallocations; recommend mpz_init2 with the estimated maximum size instead of mpz_init. [tests/tests.c] Updated the error message on incorrect MPFR version. [INSTALL] Added note on Solaris and the LD_OPTIONS environment variable. 2016-08-11 Vincent Lefèvre [tools/coverage] Added a warning: on a machine shared with other users, by running this script, the account can easily be compromised due to a libtool bug. 2016-08-06 Vincent Lefèvre [src/mpfr.h] Moved MPFR_DEPRECATED before __MPFR_DECLSPEC for compatibility with MSVC (and documented this requirement). Thanks to Brian Gladman for the information. 2016-08-04 Vincent Lefèvre [doc/README.dev] Added a note about the C++11 compatibility issue with a string literal immediately followed by a macro name. Fixed remaining macros with missing "do" … "while (0)", detected with mpfrlint. There were no consequences except spurious null statements. [tools/mpfrlint] Added a comment. [tools/mpfrlint] Added a test detecting (unsafe) macros of the form: #define FOO { ... } The following form is preferred in most of the cases to avoid spurious null statements: #define FOO do { ... } while (0) [tests/tsi_op.c] Fixed a macro. There were no consequences except spurious null statements. [tests/tset_{si,sj}.c] Style improvements. Added a comment. [tests/tset_{si,sj}.c] Fixed macros. There were no consequences except spurious null statements. [tests] C++ compatibility: avoid errors with "g++ -std=c++11" or later. Note that as of GCC 6, "the default mode for C++ is now -std=gnu++14 instead of -std=gnu++98" . So, this fixes the failures in the build of the MPFR tests with g++ from GCC 6 without particular options. 2016-08-03 Vincent Lefèvre [src/round_prec.c] mpfr_can_round_raw: added another FIXME. [src/round_prec.c] mpfr_can_round_raw: added an assertion, corrected a condition in a comment, and added comments, showing a new bug. 2016-08-02 Vincent Lefèvre [tests/tmul.c] Various corrections and improvements in test_underflow. [src/mpfr.h] Mark mpfr_grandom as deprecated (this had already been done in mpfr.texi r8548). [src/mpfr.h] Suggest MPFR_EXPERIMENTAL for experimental functions. 2016-08-01 Vincent Lefèvre [tests/tversion.c] Correction in the info about the C implementation. [tests/tversion.c] Corrections in the info about the C implementation. [src/sqrt.c] Corrected a bound in the proof of mpfr_sqrt1 (one-limb precisions), related to the right shift of a negative value. Added a warning and a TODO about such an operation. [src/sqrt.c] Enable mpfr_sqrt1 code for one-limb precisions (which depends on implementation-defined features of the C standard) only when __GNUC__ is defined, as it is known to be correct with GCC and compatible compilers, but nothing is known yet for other compilers. Removed the corresponding FIXME and added a note. In the future, a configure test could be used as an alternative solution. [tests/tversion.c] Output more information about the C implementation. 2016-07-31 Vincent Lefèvre [src/sqrt.c] Fixed some portability issues. [src/sqrt.c] Fix if mp_limb_t > unsigned long (this fixed failures with mingw-w64). [src/lngamma.c] Fix in case mp_limb_t is more than twice as large as unsigned long (that would make it at least 128 bits). [src/cos.c] Made code similar to the rest of the code. [src/div_ui.c] Improved a comment (to make it closer to what correct C code should be), avoiding a false positive with mpfrlint. [tools/mpfrlint] Detect possibly wrong code with some C/GMP implementations, related to shifts and integer types. [src/sqrt.c] Completed the FIXME (another portability issue). [src/sqrt.c] Added a FIXME. The current code for prec < GMP_NUMB_BITS is not portable. [src/sqrt.c] Fixed code for implementations with 16-bit int's. [tests/tsqrt.c] Fixed output bug in a test. 2016-07-29 Paul Zimmermann [src/mul.c] speedup for 2 limbs: numactl --physcpubind=0 ./mfv5 -p113 mpfr_mul 3.1.5-dev: mpfr_mul: 45 / 61.60 / 84 4.0-dev: mpfr_mul: 30 / 32.15 / 36 [NEWS] mention that speedup 2016-07-29 Paul Zimmermann [src/sub1sp.c] fixed bug in mpfr_sub1sp2 [src/mul.c] removed useless code [src/mul.c] code simplification [src/sub1sp.c] another code simplification [src/sub1sp.c] code simplification [NEWS] mention speedup in mpfr_add and mpfr_sub for 2 limbs 2016-07-29 Paul Zimmermann [src/sub1sp.c] faster code for 2 limbs. Results with mbench (numactl --physcpubind=0 ./mfv5 -p113 mpfr_sub): 3.1.5-dev: mpfr_sub: 36 / 65.33 / 81 4.0-dev: mpfr_sub: 24 / 33.00 / 36 2016-07-28 Paul Zimmermann [tests/tmul.c] fixed wrong test 2016-07-28 Vincent Lefèvre [tests/reuse.c] Perform each reuse test on 1 to 5 limbs, with a random number of trailing bits. This allows one to test code specific to 1 or 2 limbs. 2016-07-28 Paul Zimmermann [src/add1sp.c] fixed issues found with --enable-assert=full 2016-07-27 Paul Zimmermann [src/add1sp.c] new code to deal with p in [GMP_NUMB_BITS+1,2*GMP_NUMB_BITS-1] 2016-07-27 Vincent Lefèvre [src/round_prec.c] Various minor improvements: * Added a MPFR_ASSERTN since mpfr_can_round is a function in the API. * Changed error variables to be more consistent with the context. * Removed unnecessary code (casts...) about the error: it came from round.c r1574, where types were different at that time. * Made err2 (the old err) local to a small block to make sure that it will not be used by mistake instead of err in future changes. * Made equivalent expressions appear under the same form: (rnd1 == rnd2 || rnd2 == MPFR_RNDN) && err - 2 >= prec [src/round_prec.c] Changed precision variables to be like SSA. [src/round_prec.c] Simplified code, making it more similar to code that has just been fixed. [src/round_prec.c] Removed useless parentheses. [src/round_prec.c] Added an assertion for "default:". [tests/tcan_round.c] In test_simple, output p (which is variable), not prec (which is always 4). 2016-07-27 Paul Zimmermann [src/round_prec.c] fixed bug in mpfr_can_round for 2^e when rnd1=rnd2 and err > prec + 1 (was returning 0 instead of 1) 2016-07-27 Vincent Lefèvre [tests/tcan_round.c] Added a simple test that fails as a consequence of r9883 (this could be observed on tzeta before r10678 in tgeneric.c). [tests/tgeneric.c] Improvement: When the result is exact, it can always be rounded (while mpfr_can_round can fail). [TODO] Updated item about tzeta. 2016-07-26 Paul Zimmermann [INSTALL] update (feedback from Bill Hart) 2016-07-26 Vincent Lefèvre [src/sqrt.c] Replaced mp_ptr by mpfr_limb_ptr (as usual). 2016-07-26 Paul Zimmermann [mbench/mfv5-mpfr.cc] patch to allow using it with older versions of MPFR (say branch 3.1) [src/sqrt.c] fixed mpn_sqrtrem2 for 32-bit limb 2016-07-26 Vincent Lefèvre [tests/tzeta.c] Added a FIXME so that r10667 can be reverted. [TODO] Updated item about tzeta. [TODO] Added item about the fix of mpfr_can_round in r9883 and tzeta. New MPFR_GENERIC_ABI macro to test the generic code, not tied to a particular ABI (e.g. GMP_NUMB_BITS value), so that such code has a chance to be tested on current machines. * doc/README.dev: added brief documentation. * src/sqrt.c: enable mpfr_sqrt1 (optimization for one-limb precisions, currently when GMP_NUMB_BITS is 32 or 64) only when MPFR_GENERIC_ABI is not defined. [src/sqrt.c] * Changed mp_ptr to mpfr_limb_ptr. * Untabified and removed trailing spaces. 2016-07-26 Paul Zimmermann [tests/tzeta.c] reduced test time [src/sqrt.c] adapted mpn_sqrtrem1 for GMP_NUMB_BITS=32 2016-07-25 Vincent Lefèvre [INSTALL] Corrected hint for mingw (use --build instead of --host). 2016-07-25 Paul Zimmermann [INSTALL] added hint for mingw 2016-07-25 Vincent Lefèvre Merged the latest changes from the trunk. 2016-07-25 Paul Zimmermann [src/sqrt.c] fixed temporary patch for 32-bit computers 2016-07-25 Vincent Lefèvre [src/sqrt.c] Typo in comment. [src/sqrt.c] Updated FIXME's. This is still incorrect with 32-bit limbs. 2016-07-25 Paul Zimmermann [src/sqrt.c] temporary fix for 32-bit limbs 2016-07-22 Vincent Lefèvre Merged r10657 from the trunk, resolving the conflict (same code as in the trunk, except RND_RAND changed to RND_RAND_NO_RNDF). [tests/tadd.c] Improved coding style and messages (do not mix up "inexact flag" and "ternary value"!). [tests] Define the RND_RAND_NO_RNDF and RND_LOOP_NO_RNDF macros, similar to RND_RAND and RND_LOOP respectively but excluding MPFR_RNDF, to be used for tests that don't make sense in the faithful rounding mode. Replaced code to use these macros, fixing the remaining failures. Merged r10599 through r10628 from the trunk, resolving the conflict in tests/tmul.c (i.e. keep code from both the branch and the trunk, corresponding to two independent tests). Some of the later changes in the trunk (src/sqrt.c) are broken with a 32-bit ABI, so let's not merge them for now. Merged r10598 from the trunk, resolving the conflict (this consists in changing MPFR_PREC to MPFR_GET_PREC). Merged r10573 through r10597 from the trunk (no conflicts). Merged r10572 from the trunk, resolving the conflict. Merged r10571 from the trunk, resolving the conflict. Merged r10566 through r10570 from the trunk, resolving the conflict. Merged r10556 through r10564 from the trunk (no conflicts). Merged r10555 from the trunk, resolving the conflict. Merged r10529 through r10554 from the trunk (no conflicts). Merged r10528 from the trunk, resolving the conflict. Merged r10520 through r10527 from the trunk (no conflicts). [src/add1sp.c] The reverse-merge done in r10633 was incorrect. Fixed. [src/add1sp.c] Also reverse-merged r10522 (together with related whitespace change from r10514), which had nothing to do with the faithful rounding. Improvements for 1 limb will be obtained when merging the trunk into the faithful branch. [src/sqrt.c] Added another FIXME comment for 32-bit machines. [src/sqrt.c] Added other FIXME comments for 32-bit machines. 2016-07-20 Vincent Lefèvre [src/sqrt.c] Added FIXME comments for 32-bit machines. [src/sqrt.c] C90 compatibility. [src/sqrt.c] Fixed minor (mainly style) issues found by mpfrlint. [tools/mpfrlint] * Added --msg option to err-if-output function to optionally output a message explaining what to do in case of error. * Added this option to 3 err-if-output calls (errors with src/sqrt.c r10636). 2016-07-20 Paul Zimmermann [src/sqrt.c] new speedup for 1/2 and 1 limb 2016-07-20 Vincent Lefèvre [doc/mpfr.texi] Improved a sentence. 2016-07-20 Paul Zimmermann [faithful] reverse-merge r10524 (had nothing to do with the faithful branch) [faithful] reverse-merge parts of r10514 independent of the faithful branch 2016-07-19 Paul Zimmermann [NEWS] mention speedup in mpfr_sqrt [src/sqrt.c] faster code for small precision (on tomate.loria.fr, 45 cycles for prec=24 instead of 161 before, and 108 cycles for prec=53 instead of 165 with 3.1.4) 2016-07-19 Vincent Lefèvre [tools/mbench] Replaced r10505 by r10565 merged from the trunk. [doc/mpfr.texi] Improvements in the MPFR_RNDF (faithful rounding) spec. Added some notes concerning the reproducibility. 2016-07-18 Paul Zimmermann [src/div.c] removed duplicate prototype (cf revision 10625) [src/div.c] yet another speedup [src/div.c] small improvement 2016-07-18 Vincent Lefèvre [src/mpfr-gmp.h] Declare __gmpn_invert_limb if used (in order to avoid an error with g++ for the tests). 2016-07-17 Paul Zimmermann [src/div.c] removed wrong assertions (and added comments to explain why) 2016-07-15 Vincent Lefèvre [src/div.c] Added a FIXME (assertion failure). [src/div.c] Untabified. [tools/mpfrlint] Update concerning GMP internals. 2016-07-15 Paul Zimmermann [src/sub1sp.c] implement use of __gmpn_rsblsh_n (disabled for now) [src/div.c] only use __gmpn_invert_limb with --enable-gmp-internals 2016-07-14 Vincent Lefèvre [src/mpfr-impl.h] Require to be included in order to be able to use the "long double macros and typedef" part. Moved the IEEE_FLOAT128_MANT_DIG macro definition out of this part. [tests/tcmp_ld.c] Added missing #include . [src/div.c] Added a FIXME as __gmpn_invert_limb is a GMP internal. 2016-07-14 Paul Zimmermann [src/div.c] speedup for precision < GMP_NUMB_BITS/2 (by almost a factor 2) [src/mul.c] added comment [src/div.c] new faster code for 1 limb [src/cmp_ld.c] include float.h so that MPFR_LDBL_MANT_DIG is correctly defined [src/get_ld.c,src/set_ld.c] added comment 2016-07-13 Paul Zimmermann [src/div.c] removed obsolete comment since we no longer use __udiv_qrnnd_ld [src/div.c] changed __udiv_qrnnd_ld into __udiv_qrnnd_preinv (no dependency any more on long double) 2016-07-09 Vincent Lefèvre [src/div.c] Do not use __udiv_qrnnd_ld for MPFR_LDBL_MANT_DIG > 64. Added a comment about __udiv_qrnnd_ld. [src/mpfr-longlong.h] Typo. [src/mpfr-longlong.h] C89 compatibility. 2016-07-08 Paul Zimmermann [src/div.c] speedup using __udiv_qrnnd_ld [src/mpfr-longlong.h] contributed __udiv_qrnnd_ld variant [src/div.c] new special code for 1 limb [src/mul.c] fixed corner case near underflow [src/mul.c] fixed detection of rounding away [src/mul.c] fixed underflow *after* rounding [tests/tmul.c] fixed a test [tests/tmul.c] added underflow test for directed rounding too [tests/tmul.c] added test for underflow after rounding (reveals bug in mul.c) 2016-07-08 Vincent Lefèvre [src/sub1sp.c] Clarified comment (it's better not to mention underflow before rounding because it is not considered at all in MPFR). 2016-07-08 Paul Zimmermann [src/sub1sp.c] added comment about underflow before/after rounding [src/mul.c] changed MPFR_PREC into MPFR_GET_PREC 2016-07-07 Paul Zimmermann [src/mul.c] removed a call to MPFR_LIKELY which is unlikely... 2016-07-07 Vincent Lefèvre [NEWS] i.e. → e.g. [src/mul.c] Replaced mp_ptr by mpfr_limb_ptr (as usual). [tests/tadd1sp.c] Added tests with EXP(b) < EXP(c), as there are no such restrictions on the exponents for mpfr_add1sp. [src/add1sp.c] Fixed mpfr_add1sp when b and c have different signs and EXP(b) < EXP(c). 2016-07-07 Paul Zimmermann [NEWS] speedup in mpfr_mul for one limb (minus 1 bit) 2016-07-07 Paul Zimmermann [src/mul.c] speed-up of mpfr_mul for 1 limb (1 limb - 1 bit for the result). Results of mbench for 53 bits on Intel i5-4590: before: mpfr_mul: 33 / 37.12 / 42 after: mpfr_mul: 18 / 20.63 / 24 2016-07-07 Vincent Lefèvre [src/add1.c] Corrected a comment as in practice, b and c do not necessarily have the same sign (when called by mpfr_sub). 2016-07-07 Paul Zimmermann [src/sub1sp.c] added assertions 2016-07-06 Vincent Lefèvre [tests/tadd.c] C++ compatibility. [tests/tadd1sp.c] Do not use != 0 on predicate function. 2016-07-06 Paul Zimmermann [src/sub1sp.c] removed special code for n = 1, now that we have a special function mpfr_sub1sp1 [tests/tadd.c] revert mpfr_add to test_add [src/add1sp.c] fixed two bugs in mpfr_add1sp1 [tests/tadd1sp.c] added one hard-coded test [tests/tadd.c] last commit was wrong improved check_overflow() 2016-07-06 Vincent Lefèvre [src/urandom.c] Fixed uninitialized emin for nbits == 1 (thanks GCC's -Werror=maybe-uninitialized). 2016-07-06 Paul Zimmermann [src/urandom.c] should now be ok for nbits = 1 2016-07-06 Vincent Lefèvre [TODO] Change most mpfr_urandomb to mpfr_urandom in the tests? [tests/turandom.c] Improved an error message. [tests/turandom.c] Corrected English usage in error message. [tests/turandom.c] Small precision check: replaced 2 by MPFR_PREC_MIN. 2016-07-06 Paul Zimmermann [src/urandom.c] fixed urandom for a precision of 1 bit 2016-07-06 Vincent Lefèvre [doc/README.dev] About random tests: avoid mpfr_urandomb!!! [tests/tadd1sp.c] Use mpfr_urandom instead of mpfr_urandomb. This triggers an assertion failure in urandomb.c. [tests/tadd1sp.c] Reordered variables. Removed a redundant test. [tests/tadd1sp.c] In check_random, check the flags too. [tests/tadd1sp.c] Test negative numbers too. Removed trailing spaces. 2016-07-06 Paul Zimmermann added comment [src/add1sp.c] removed special cases for n=1 in mpfr_add1sp, now that we have a special routine mpfr_add1sp1 [mbench/mfv5.cc] added RNDA and fixed typo 2016-07-06 Vincent Lefèvre The rounding mode can now be passed in argument with the -r option (patch by Patrick Pélissier). Removed MPFR_HOT_FUNCTION_ATTR for mpfr_add1sp1 and mpfr_sub1sp1. 2016-07-05 Vincent Lefèvre [tests/tadd.c] Added FIXME comment: there are many tests, but the ternary value and the flags are not tested! Functions mpfr_add1sp1 and mpfr_sub1sp1 are called only from the files where they are defined, thus can be static. [src/add1sp.c] Removed unused variable. 2016-07-05 Paul Zimmermann [src/add1sp.c] new special code for 1 limb. In 3.1.4 we add with mfv5: mpfr_add: 30 / 49.30 / 90 now we have: mpfr_add: 24 / 28.18 / 30 2016-07-05 Paul Zimmermann [src/sub1sp.c] added comment 2016-07-05 Vincent Lefèvre [src/sub1sp.c] Another improvement (suggested by Paul). [src/sub1sp.c] Improved readability. With Debian's gcc-snapshot, this is equivalent, and with tcc, the generated code is shorter. [src/sub1sp.c] No longer depend on the representation of 0. [src/sub1sp.c] Various improvements in the coding style: readability, consistency, GNU coding style. 2016-07-05 Paul Zimmermann [README.dev] added documentation about mpfr-gfx [mbench/mpfr-gfx.c] change of syntax of gnuplot [src/sub1sp.c] removed dead code, and improved coverage to 100% 2016-07-05 Vincent Lefèvre [src/sub1sp.c] Removed incorrect MPFR_SET_EXP (the value was incorrect and the real MPFR_SET_EXP is done later, after underflow checking). [tests/tsub1sp.c] Added missing printf arguments. 2016-07-05 Paul Zimmermann [src/sub1sp.c] fixed some FIXMEs 2016-07-04 Vincent Lefèvre [src/sub1sp.c] Added a FIXME. [src/sub1sp.c] Avoid a -Wmaybe-uninitialized warning from GCC by declaring a variable as initialized (the code is correct, GCC isn't just smart enough). Removed trailing spaces. Added tools/ck-clz_tab sh script to check the __clz_tab sizes (to detect issues like the one fixed in r10542). Run this script in dist-hook (Makefile.am) and in mpfrlint. 2016-07-04 Paul Zimmermann resolved a FIXME fixed bug reported by 2016-07-04 Vincent Lefèvre [src/exceptions.c] Added a comment for mpfr_underflow: historical reason for the choice of the behavior with MPFR_RNDN. 2016-07-04 Paul Zimmermann code simplification (suggested by Vincent) speedup of mpfr_sub for same precision < GMP_NUMB_BITS 2016-07-01 Vincent Lefèvre [src/add1sp.c] Corrected indentation. [src/sub1sp.c] Added comments. [src/add1sp.c] Added comments. 2016-06-30 Paul Zimmermann optimize mpfr_add (and mpfr_sub, not yet finished) for 1 limb 2016-06-29 Vincent Lefèvre Renamed macro MPFR_EXP_LESS_P to MPFR_UBF_EXP_LESS_P. [src/add1sp.c] Fixed bug introduced in r10530 when MPFR_WANT_ASSERT >= 2 (--enable-assert=full). [src/add1.c] Re-added the MPFR_ASSERTD. The culprit seems to be r10530. [src/add1.c] Reverted r10529, which now fails. That's strange. 2016-06-29 Paul Zimmermann mpfr_add1sp does not assume any more EXP(b) >= EXP(c) 2016-06-29 Vincent Lefèvre [src/add1.c] Added a MPFR_ASSERTD. 2016-06-29 Paul Zimmermann still faster code for 1 limb merged r10522 from faithful branch + other special-code for 1 limb: the worst case for mpfr_add in 53 limbs decreases from 70 to 60 cycles removed leftover debug statement added comment that EXP(b) >= EXP(c) mpfr_add1sp no longer assumes EXP(b) >= EXP(c): gives small speedup 2016-06-27 Vincent Lefèvre [doc/sum.txt] Changed "hole" to "gap". 2016-06-27 Paul Zimmermann added special code for 1 limb 2016-06-25 Vincent Lefèvre C++ compatibility. Merged the latest changes from the trunk. [autogen.sh] Treat autoreconf warnings as errors. 2016-06-24 Vincent Lefèvre [src/vasprintf.c] Some improvements. In particular, avoid two successive calls to mpfr_cmpabs on the same arguments (the compiler doesn't know that it could optimize, as the function is not pure). [src/vasprintf.c] Fixed an assertion failure. 2016-06-24 Paul Zimmermann fixed reuse with --enable-assert small speedup of mpfr_add for RNDF 2016-06-24 Vincent Lefèvre [tests/tsum.c] Correction: r10484 didn't take the latest version from the trunk in the conflict resolution. [src/sum.c] A more efficient way to support faithful rounding, avoiding the TMD completely and an assertion failure at the same time. Avoid failures in mpfr_mul for MPFR_RNDF with MPFR_WANT_ASSERT >= 2 (--enable-assert=full) by disabling the comparison with the old implementation, which doesn't make sense for faithful rounding. 2016-06-24 Vincent Lefèvre Avoid failures in mpfr_add1sp / mpfr_sub1sp for MPFR_RNDF with MPFR_WANT_ASSERT >= 2 (--enable-assert=full) by disabling the comparison with mpfr_add1 / mpfr_sub1, which doesn't make sense for faithful rounding. [Added during the Subversion to Git conversion] This commit includes a merge of r10509 from the trunk. 2016-06-24 Vincent Lefèvre Cosmetic change (whitespace). Merged the latest changes from the trunk. Removed trailing spaces. [src/add1sp.c] For MPFR_WANT_ASSERT >= 2 (--enable-assert=full), test the flags too and replaced "mpfr_cmp" by "! mpfr_equal_p". [src/sub1sp.c] Make it similar to add1sp.c for MPFR_WANT_ASSERT >= 2. 2016-06-24 Paul Zimmermann use macro for the rounding mode used in the tests 2016-06-24 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [src/sum.c] Made the code a bit more natural: change of pos to neg (an indirect consequence of the support of reused arguments). Some other minor related changes. 2016-06-24 Paul Zimmermann added more tests for RNDF 2016-06-24 Vincent Lefèvre The support of reused arguments in mpfr_sum is now complete, without any visible regressions in the timings (which are unfortunately too inaccurate to see anything). * doc/mpfr.texi: removed sentences about the previous limitation. * src/sum.c: removed the corresponding FIXME/TODO comment. [tests/tsum.c] Test the support of reused arguments. 2016-06-24 Paul Zimmermann disable mpfr_all_div() for RNDF replaced mpfr_cmp by !mpfr_equal_p added exhaustive tests for add,sub,mul,div,sqrt fixed corner case with RNDF 2016-06-23 Vincent Lefèvre [src/mpfr-impl.h] Added a comment for MPFR_RNDRAW_GEN about the use of the exponent field of the destination. [src/add1sp.c] For MPFR_RNDF, set inexact = 0 (like what is done in sub1.c) instead of 1, though this doesn't really matter. [src/sub1.c] Fix: the conflict resolution done in r10484 was incorrect. [src/add1sp.c] Avoid the use of uninitialized values with MPFR_RNDF. 2016-06-23 Paul Zimmermann fix for RNDF 2016-06-23 Paul Zimmermann merged changed from trunk with svn merge '^/trunk' (resolved conflict for sub1.c; copied tests/tsum.c from trunk and re-incorporated changes from faithful branch) 2016-06-23 Paul Zimmermann src/li2.c: better like this src/li2.c: revision 10379 was ok fixed mpfr_all_div() for RNDF 2016-06-22 Paul Zimmermann more work on branch faithful 2016-06-17 Vincent Lefèvre [src/mpfr.h] Coding style: added spaces. [TODO] Suggest the use the keyword "static" in array indices of parameter declarations with C99 compilers (6.7.5.3p7) when the pointer is expected not to be null. 2016-06-15 Vincent Lefèvre [doc/README.dev] Update (GCC trunk → GCC 5). 2016-06-13 Vincent Lefèvre [src/sum.c] Copy the significand to the destination after resolving the TMD in order to support reused arguments. [src/sum.c] Improved a comment. 2016-06-10 Vincent Lefèvre [src/sum.c] Corrected a MPFR_LOG_MSG modified in the latest change. [src/sum.c] For the future support of reused arguments: TMD resolution is now done in a specific TMD accumulator, allocated at the same time as the main accumulator. This TMD accumulator currently just takes at most 2 limbs in practice, so that's not a problem. [doc/sum.txt] Added TODO for things that will change. 2016-06-09 Vincent Lefèvre [src/mpfr-impl.h] Define mpfr_ueexp_t (needed for r10462). [tests/tversion.c] Do not use "%zu" with printf (added in r10460). [doc/README.dev] Document environment variables that affect the tests. Other changes concerning the memory limit for the tests. * Export the tests_memory_limit variable so that it can be accessed in test programs (e.g. read by tversion as mentioned below, or modified by a test program when executed with particular arguments). * In tversion, print a warning when the memory limit has been modified (with the MPFR_TESTS_MEMORY_LIMIT environment variable). [tests/memory.c] The MPFR_TESTS_MEMORY_LIMIT environment variable can now contain an integer specifying the memory limit for the tests, or 0 for unlimited, the default still being 2^22 = 4 MB. 2016-06-08 Vincent Lefèvre [tests/tsum.c] Improved check3: * Also do the tests with output precision MPFR_PREC_MIN; this completes the value coverage for tsum. * Also compare the flags. Value coverage for tsum: After r9984 to differentiate sq > MPFR_PREC_MIN and sq == MPFR_PREC_MIN, 42 tests were not done for sq == MPFR_PREC_MIN on a 64-bit machine. In the check4 test, changed a 2 to MPFR_PREC_MIN. This reduces to 12 tests that are not done. 2016-06-07 Vincent Lefèvre Merged the "ubf" branch into the trunk: * limited implementation of "unbounded floats" (numbers with a mpz_t exponent), which could be completed in the future, in particular to handle intermediate overflows/underflows in polynomial evaluation; * rewrote mpfr_fmma and mpfr_fmms to use them, and added tests; * restored the MPFR 3.1- exponent range for compatibility; * restored some tests that were based on this exponent range. The choice for the UBF implementation was to use a compatible structure: the same as the mpfr_t one, with an additional field at the end, used only when the exponent field _mpfr_exp has some special value. Thus some functions such as addition and subtraction just needed minor changes to support UBF, and no code was duplicated. This means that on MPFR numbers (the usual case), one has a few more tests than before, but with known branch probabilities. In practice, this should not be visible, at least in most applications. This was more or less confirmed by timings (even with many additions/subtractions in low precision, this was difficult to say, as timings were influenced by various parameters that we cannot control). Merged the latest change from the trunk (r10452). [tools/mbench/Makefile] Added multiarch support for GMP. [src/mpfr-impl.h] Updated a comment (removing a FIXME). Merged the latest change from the trunk (r10449). [tests/tprintf.c] Removed tests of native %'g and %'f (from r8292) as the ' flag is an extension from Single UNIX Specification and in particular, they fail with MinGW under Wine. Merged the latest changes from the trunk. [tests/tlgamma.c] Typo in comment. [src/uceil_log2.c] Added a comment. Cosmetic changes. [tests/tlgamma.c] Corrected updated comment from r10444. 2016-06-06 Vincent Lefèvre [tests/tlgamma.c] Updated comment of the test added in r10442. [src/uceil_log2.c] Correction in __gmpfr_ceil_log2, avoiding an incorrect result with tcc: x.s.exp is declared as an unsigned bit-field, so that tcc considers that x.s.exp - 1023 is unsigned. However, since all the values of x.s.exp are representable in an int, according to the integer promotion rules, x.s.exp should be converted to an int, so that the subtraction is signed. So, this appears to be a bug in tcc. [tests/tlgamma.c] Added a test causing a "too much memory" error with tcc 0.9.27~git20151227.933c223-1 (there's already one in special(), but this one is a simpler, standalone test). Merged the latest change from the trunk (r10440). [acinclude.m4] When checking if __float128 is available, we now also check whether C99 constants (in particular the __float128 ones, such as 0x1.fp+16383q) are supported since this is now required with the __float128 support. Merged the latest changes from the trunk. [src/add1.c] Improved a comment about faithful rounding. [src/add1.c] The code for faithful rounding (MPFR_RNDF) was not avoiding some useless loops needing to know on which side of a breakpoint the result is. Quick fix. Merged the latest changes from the trunk. [src/add1.c] Simplified code: removed fb = 1 since it was already 1 in the "if (fb > 0)" branch. [src/set_float128.c] Fix: removed the divisions by zero, replacing them by comparisons with the maximum finite binary128 number. Changes to be similar to the handling of infinities in "src/set_ld.c". [TODO] Faithful rounding: small correction. [TODO] Added "faithful rounding", with information about its definition and implementation. 2016-06-03 Vincent Lefèvre [src/{fits_intmax.c,fits_s.h}] In comments, fit → fits. [src/set_float128.c] Added FIXME comment: The mpfr_set_float128 code generates a divide-by-zero exception. Suggest a solution. Note: this is detected with "-DMPFR_TESTS_DIVBYZERO -DMPFR_ERRDIVZERO". [tests/tset_float128.c] Take into account failures in division by 0 and absence of signed zeros. Also fixed the code checking the sign of 0 (mpfr_sgn cannot be used for that since it returns 0 for ±0). 2016-06-03 Paul Zimmermann RNDF: fixed the fits functions 2016-06-03 Vincent Lefèvre Merged the latest change from the trunk (r10426 fix). [src/set_d.c] Added some assertions and fixed a 32-bit shift count when GMP_NUMB_BITS == 32. Merged the latest changes from the trunk (C++ compatibility). [tests/tset_float128.c] C++ compatibility. [tests/tlog.c] Added a cast to mpfr_rnd_t for C++ compatibility. [tests/tfmma.c] Forgot a cast to mpfr_rnd_t for C++ compatibility. [src/add1.c] Completed UBF support. Note: due to the restriction on the exponent values, diff_exp does not need to be the unsigned integer type mpfr_uexp_t (mpfr_exp_t is sufficient). [tests/tfmma.c] Correction. [tests/tfmma.c] Test (1/2)x + (1/2)x = x near underflow. [tests/tfmma.c] Replaced precision 64 by GMP_NUMB_BITS (to make sure that the add1sp and sub1sp conditions are satisfied with the current src code, these tests may rely on the fact that there are no trailing bits, i.e. that the precision is a multiple of GMP_NUMB_BITS). 2016-06-03 Paul Zimmermann added reference for Lambert W function 2016-06-03 Vincent Lefèvre [src/{add,sub}.c] Consider UBF numbers as special cases so that mpfr_sub1sp and mpfr_add1sp, which do not support UBF, are never called on UBF numbers. This should also (very slightly) speed up the normal cases. [src/mpfr-impl.h] UBF support: added MPFR_IS_SINGULAR_OR_UBF and MPFR_ARE_SINGULAR_OR_UBF macros. 2016-06-03 Paul Zimmermann declare prec in unsigned long RNDF: specified the fits functions RNDF: fixed tfactorial 2016-06-02 Vincent Lefèvre C++ compatibility (corrected). 2016-06-02 Paul Zimmermann RNDF: fixed texp2 avoid mpfr_printf in tests C++ compatibility suggestion from Vincent RNDF: fixed texp10 and tgeneric RNDF: fixed mpfr_sum and tsum RNDF: fixed texp 2016-06-02 Vincent Lefèvre [tests/tfmma.c] Added test cases where the precision of the result is twice the precision of each input, which can currently involve add1sp.c and sub1sp.c code. 2016-06-02 Paul Zimmermann RNDF: partially fixed texp RNDF: fixed tcot RNDF: fixed tcos RNDF: fixed tconst_pi RNDF: fixed li2 and tconst_log2 2016-06-02 Vincent Lefèvre Merged the latest changes from the trunk. [src/exceptions.c] Fixed the MPFR_LOG_FUNC in mpfr_underflow and mpfr_overflow (x is not an input in these functions). [src/sub1.c] In r10347, logging was introduced instead of #ifdef DEBUG and printf. Removed 2 MPFR_LOG_VAR, as the variable is not normalized yet. Re-added #ifdef DEBUG for the MPFR_LOG_MSG's since this may be too low level and not much useful except in case of bugs. 2016-06-02 Paul Zimmermann RNDF: fixed issue with Bessel functions for large arguments 2016-05-30 Paul Zimmermann added description of flags for RNDF 2016-05-30 Vincent Lefèvre [src/sub1.c] Forgot a \n in a log message. 2016-05-30 Paul Zimmermann fixed typos 2016-05-30 Vincent Lefèvre [src/sub1.c] Completed UBF support. Merged the latest changes (in particular the fix in sub1.c) from the trunk. [tests/tsub.c] Added comments for check_max_almosteven (latest test case, added in r10383). 2016-05-30 Paul Zimmermann more work on the faithful branch 2016-05-29 Vincent Lefèvre [src/sub1.c] Fixed bug in mpfr_sub1 (real subtraction a = b - c, with |b| > |c|): In MPFR_RNDN (round-to-nearest mode), when * |b| is the midpoint between the maximum finite number in the precision of a and 2^emax (the maximum finite number + 1 ulp), which is possible only if PREC(b) > PREC(a), * c is small enough (i.e. no overlap with a and b), mpfr_sub1 returns an infinity (with overflow flag set) instead of ± the maximum number (no overflow). The cause is that an overflow is generated too early, in an intermediate rounding. [tests/tsub.c] Added test cases. [tests/tfmma.c] Forgot a \n in printf. [tests/tfmma.c] Added overflow tests that trigger an assertion failure in sub1.c (because UBF support is not complete yet). 2016-05-28 Paul Zimmermann start implementing RNDF (work in progress) 2016-05-25 Vincent Lefèvre [src/log_ui.c] Changes for ISO C90 compatibility. [src/mpfr-gmp.h] For _MPFR_IEEE_FLOATS, changed bit-field type from unsigned long, which is implementation-defined, to unsigned int. [src/log_ui.c] Added an assertion. [src/mpfr-impl.h] Fixed bug introduced in r10327, giving: error: ISO C does not allow extra ';' outside of a function [-Wpedantic] 2016-05-25 Paul Zimmermann improved mpfr_log_ui added comment 2016-05-25 Vincent Lefèvre [TODO] mpfr_ai efficiency: also mention mpfr.texi (the issue with large arguments has always been documented). [TODO] mpfr_ai efficiency: mention tests/tai.c (the REDUCE_EMAX was added in r6734). 2016-05-25 Paul Zimmermann added item about efficiency of mpfr_ai for large arguments 2016-05-25 Vincent Lefèvre [doc/README.dev] Also clarified the use of "configure". [doc/README.dev] Clarified the use of "autogen.sh". 2016-05-25 Paul Zimmermann use autogen.sh added libtoolize (needed for AX_PTHREAD) 2016-05-24 Vincent Lefèvre [tests/tlog_ui.c] Improved a test function. [acinclude.m4] Fixed the use of m4_pattern_forbid: the argument must be quoted, otherwise the macro is expanded when defined. 2016-05-24 Paul Zimmermann small improvements to log_ui (still slower than log for large precision) 2016-05-24 Vincent Lefèvre [acinclude.m4] Detect whether the AX_PTHREAD macro is left unexpanded. 2016-05-24 Paul Zimmermann use rounding to nearest by default in "tconst_log2 prec" minor changes to allow ./tlog xxx prec added generic tests for mpfr_log_ui + compare with mpfr_log 2016-05-24 Vincent Lefèvre [src/sub1.c] Started to add UBF support (still incomplete). Merged the latest changes from the trunk and removed the remaining _MPFR_PROTO of UBF functions. Removed _MPFR_PROTO with the following Perl script on the .h files. while (<>) { if ($c) { die if /_MPFR_PROTO/; s/^( {$c}) */$1/; s/\) *\)/)/ and undef $c } elsif (s/^(.*)(_MPFR_PROTO *\()\(/$1(/) { s/\) *\)/)/ or $c = 1 + length $1 } print } [configure.ac] Re-added AM_PROG_AR in case Microsoft lib.exe is used (without this, "automake --warnings=all" gives a warning). [acinclude.m4] Replaced the obsolete ACX_PTHREAD by AX_PTHREAD (done with "autoupdate acinclude.m4"). [configure.ac] Moved LT_INIT near the top for --enable-lto, and removed AM_PROG_AR (no longer needed as done by LT_INIT) and AC_PROG_RANLIB (obsoleted by LT_INIT). Avoid some warnings with "gcc -Wundef". [configure.ac] Removed a FIXME fixed in r4482. [src/mpfr-longlong.h] Update from GMP 6.1.0. [src/mpfr-cvers.h] Fixed typo in a macro (thanks to Patrick Pélissier). [src/sub1.c] Various minor improvements: * Some changes related to the exponents and diff_exp. * Coding style + use of IS_POW2. * Use logging instead of #ifdef DEBUG and printf. 2016-05-24 Paul Zimmermann removed too aggressive MPFR_LIKELY/MPFR_UNLIKELY (see README.dev) 2016-05-24 Vincent Lefèvre Added optional LTO support (from a patch by Patrick Pélissier). Corrected mpfr_free_cache behavior when WANT_SHARED_CACHE is defined to make it consistent with the behavior when WANT_SHARED_CACHE is not defined (patch by Patrick Pélissier). [src/vasprintf.c] Output the sign of UBF like with infinities. [tests/tfpif.c] Correction on r10338: use src_fopen instead of fopen and check fp (just like with FILE_NAME_R). [tests/tfmma.c] Completed near_overflow_tests (there's still a crash, this time really in fmma.c). [tests/tfmma.c] Added near_overflow_tests, which crashes. 2016-05-24 Paul Zimmermann added new (read-only) test file for mpfr_fpif_import added tests for mpfr_fpif_import with precision > MPFR_PREC_MAX 2016-05-24 Vincent Lefèvre Merged the latest changes from the trunk. Updated NEWS about shared caches. MPFR 3.2(.x) → 4.0(.x) [NEWS] New function mpfr_buildopt_sharedcache_p in MPFR 3.2. [doc/mpfr.texi] New function mpfr_buildopt_sharedcache_p. Minor changes. 2016-05-23 Vincent Lefèvre [src/mpfr-impl.h] About the MPFR_DECL_INIT_CACHE macro: * Added a FIXME comment about a possible warning due to a missing field initializer; suggest 2 possible solutions. * Improved code readability. [src/free_cache.c] Avoid duplicated source code for maintainability. [doc/mpfr.texi] Corrections about caches. [src/mpfr-thread.h] For #error, use a string literal as a single preprocessing-token. [src/mpfr-thread.h] Coding style. Minor comment & coding style corrections on r10327. Added shared cache support (from a patch by Patrick Pélissier). 2016-05-23 Paul Zimmermann added tests for mpfr_fpif in precision 1 2016-05-23 Vincent Lefèvre More UBF support: * mpfr-impl.h, ubf.c: added mpfr_ubf_zexp2exp function. * add1.c: support the case where b (the first input) is an UBF. [tests/tfmma.c] Added max_tests. [src/ubf.c] Memory leak in some case. Added UBF support for mpfr_cmp2. ABS(SIZ(x)) → ABSIZ(x) [src/ubf.c] Support reduced exponent range in mpfr_get_zexp. 2016-05-23 Paul Zimmermann redefine mpfr_init_set_xxx with mpz_t pool, otherwise the pool is not used for those calls 2016-05-23 Vincent Lefèvre Started to implement unbounded floats (UBF) and added support in some existing functions. Also reverse-merge r9960 (due to the previous ones). Also reverse-merge r9958, r9961 and r9962 (due to the previous ones). First, reverse-merge r9975 and r9957 (whose only purpose was for fmma, but changed the exponent range and still had various issues). 2016-05-23 Paul Zimmermann added comment about MPFR_MY_MPZ_INIT 2016-05-23 Vincent Lefèvre [src/vasprintf.c] Replaced a comment by a MPFR_ASSERTD. [src/vasprintf.c] Code simplification. [src/vasprintf.c] Replaced a comment by a MPFR_ASSERTD. [src/print_raw.c] Changes for mpfr_print_binary / mpfr_dump: * Support out-of-range exponents as this function is mainly for debugging purpose (TODO: add some warning for such exponents). See: https://sympa.inria.fr/sympa/arc/mpfr/2016-01/msg00061.html * Support _MPFR_EXP_FORMAT == 4 (format used for testing). 2016-05-22 Vincent Lefèvre [tests/tfmma.c] Corrections and improvements in random_test. [tests/tfmma.c] Replaced mpfr_cmp by the stronger mpfr_equal_p. [tests] * tadd_ui.c: clean-up (a boolean test doesn't need "!= 0"). * tsub_ui.c: check that the NaN flag is set on NaN. [src/mpfr-impl.h] Added IS_SIGNED macro to check whether an integer type (after integer promotion) is signed; and use it for MPFR_EXP_IN_RANGE. 2016-05-20 Vincent Lefèvre [src/ui_sub.c] Improved code style and assertions, making mpfr_ui_sub more like mpfr_add_ui and mpfr_sub_ui. Added comments. Partly rewrote mpfr_add_ui and mpfr_sub_ui (more similar to the mpfr_ui_sub code), solving the failures. [tests/tgeneric.c] Check NaN argument, mainly in order to check the NaN flag when the result is NaN (almost all cases). This makes both tadd_ui (ignoring the new test done in r10298) and tsub_ui fail. 2016-05-19 Paul Zimmermann added test case for bug reported by Rob (sisyphus1@optusnet.com.au) 2016-05-19 Vincent Lefèvre [src/fmma.c] Added FIXME comments. 2016-05-18 Vincent Lefèvre Added MPFR_EXP_IN_RANGE macro, and replaced some tests to use it. [src/fma.c] Minor code simplification. 2016-05-17 Vincent Lefèvre Improved code related to mpfr_set_exp_t: * Define MPFR_EXP_LIMB_SIZE macro (size of mpfr_exp_t in limbs) and use it. * src/pow.c: replaced a mpfr_init2 by MPFR_TMP_INIT1. 2016-05-17 Paul Zimmermann added comment about printing decimal floats 2016-05-13 Vincent Lefèvre [src/mpfr-impl.h] Minor improvements. 2016-05-12 Vincent Lefèvre [configure.ac] Added a comment about GMP CC/CFLAGS detection. [configure.ac] Better GMP CC/CFLAGS detection (based on a patch by Patrick Pélissier). 2016-05-11 Paul Zimmermann add -P option to cpp when detecting CC/CFLAGS in gmp.h (workaround for gcc-5) 2016-05-04 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [doc/Makefile.am] Reverted the change done in r10283 as the mpfr.info file was always rebuilt. [Makefile.am] Execute check-typography from dist-hook instead. [Makefile.am] Add doc/check-typography to the tarball as it is needed to rebuild the mpfr.info file if the mpfr.texi file is modified. [doc/check-typography] Added copyright notice and explanations. [doc/check-typography] Removed useless parentheses. Detect typography ambiguities in doc/mpfr.texi ASAP: to avoid errors due to implicit rules, it is better to explicitly make clear whether a punctuation mark ends or does not end a sentence. * Added doc/check-typography sh script to detect such typography ambiguities. * doc/Makefile.am: automatically execute this script before mpfr.info is rebuilt; fail with explanations in case there are ambiguities. * doc/mpfr.texi: avoid typography ambiguities. * tools/mpfrlint: replaced the old typography check by a call to the check-typography script (which does more checks). [doc/mpfr.texi] Typographic correction on the latest addition. [doc/mpfr.texi] The MPFR_ and mpfr_ prefixes are reserved for MPFR. 2016-04-25 Vincent Lefèvre [src/mpfr-impl.h] Clean-up. 2016-04-21 Vincent Lefèvre [configure.ac] Improved the GMP CC/CFLAGS detection: the test for $cpp was not checking whether gmp.h could actually be included, so that the code was outputting "yes" even when gmp.h was not installed. [NEWS] Added: Limited pkg-config support. Added pkg-config support (patch from Kip Warner + some changes). 2016-04-20 Paul Zimmermann typo 2016-04-20 Vincent Lefèvre [acinclude.m4] Improved warning message for the "long double" test. [configure.ac] "double format" test: changed the AC_MSG_ERROR (when not recognized) to AC_MSG_WARN (like with long double). [configure.ac] No longer include in the "double format" test (it is unnecessary and doesn't exist everywhere). [acinclude.m4] Typo. 2016-04-13 Vincent Lefèvre [tests/tversion.c] Updated a comment about Cygwin and Unix. 2016-04-09 Vincent Lefèvre [tools/mpfrlint] Fixed bug triggered when the command for err-if-output has empty arguments (this does not occur yet). 2016-04-08 Vincent Lefèvre [tests/tversion.c] Output the status of the __GMP_LIBGMP_DLL and MPFR_WIN_THREAD_SAFE_DLL macros (since unreliable consistency checks have been removed in r10260). [src/mpfr-impl.h] Removed the detection of possible inconsistencies 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. [tools/mpfrlint] Use err-if-output also for external checkers. [tools/mpfrlint] Better choice of a variable name. 2016-04-08 Paul Zimmermann revert changeset 10255 2016-04-08 Vincent Lefèvre [tools/mpfrlint] * Switched to zsh. * Much more meaningful error messages. * Fix: in the mpfr.texi punctuation test, ignore the comments. 2016-04-08 Paul Zimmermann patch for Cygwin (cf https://trac.sagemath.org/ticket/20380) 2016-04-08 Vincent Lefèvre [doc/mpfr.texi] Updated the month. 2016-04-07 Vincent Lefèvre [doc/mpfr.texi] Document mpfr_dump (which has always been there). [src/dump.c] Added a comment (with TODO). Replaced various instances of mpfr_print_binary + newline (sometimes missing) by mpfr_dump. [tests] Fixed typo in error messages. 2016-04-01 Vincent Lefèvre [TODO] Mention ISO/IEC JTC 1/SC 22/WG 21 N3060 (C++ special functions). 2016-03-29 Vincent Lefèvre [INSTALL] Removed incorrect note about NetBSD/alpha: The configure script distributed with the MPFR 3.1.4 tarball does not contain anything related to the -mieee GCC option; this just seems to be a particular pkgsrc issue for NetBSD: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/mk/platform/NetBSD.mk?rev=1.48&content-type=text/x-cvsweb-markup https://www.google.fr/search?q=pkgsrc+%22mieee%22 where -mieee is added. The -mieee-with-inexact option added in the MPFR 3.1 branch might yield the same error with the buggy GCC versions, but this is now obsolete in the trunk (the code was removed in r10152). 2016-03-25 Paul Zimmermann added note about NetBSD/alpha 2016-03-16 Vincent Lefèvre [doc/sum.txt] Added a summary of the timings, copied from: ^/misc/sum-timings/results/ReadMe@10244 2016-03-15 Vincent Lefèvre [tests/tsum.c] Updated comment of bug20160315 after fix in 3.1 branch. [tests/tsum.c] Added bug20160315 (this bug appears when porting sum.c for MPFR 3.1.4 but does not appear in the trunk). 2016-03-14 Vincent Lefèvre [doc/sum.txt] Some clarification in the TMD case. [doc/sum.txt] Added a proof that the choice for the size ts of the temporary area is sufficient. [doc/sum.txt] Replaced e by ε for the error (e is already used). [doc/sum.txt] Update about t' in the error analysis. [doc/sum.txt] More about the notion of exponent in two's complement. 2016-03-13 Vincent Lefèvre [doc/sum.txt] Update about sum_raw (with a correction of a typo). 2016-03-10 Vincent Lefèvre [doc/sum.txt] Rewrote paragraph about limitations. [src/sum.c] Corrected comment: 32/64-bit machine → 32/64-bit ABI. [src/sum.c] Use UPDATE_MINEXP when necessary; added comments. [src/sum.c] Added a comment about corner cases involving huge precisions, which should never occur in practice. [src/sum.c] * Added some MPFR_ASSERTD that correspond to properties used in the proof corrected in doc/sum.txt r10221. * Added a test for corner cases that will/can probably never occur in practice. [doc/sum.txt] Improved explanations and corrected a proof. [doc/sum.txt] Added a figure. [doc/sum.txt] Clarifications. 2016-03-09 Vincent Lefèvre [doc/sum.txt] GMP → the current version of GMP (6.1.0). [doc/sum.txt] Another clarification. [doc/sum.txt] Clarification about a reiteration in sum_raw with explanation closer to the code. [src/sum.c] Clarification of comments about "sum.txt". [src/sum.c] Added comments and an MPFR_ASSERTD for sum_raw(). [doc/sum.txt] Clarification. [doc/sum.txt] Update (mainly related to two's complement). [INSTALL] More information about MinGW and __USE_MINGW_ANSI_STDIO. 2016-03-08 Vincent Lefèvre [doc/sum.txt] Corrected 2 typos found by PZ. [doc/sum.txt] Added commas. [doc/sum.txt] Added info about an exact zero result and IEEE 754 / 1788. [doc/sum.txt] A bit more about the choice of two's complement for the accumulator. [doc/sum.txt] Explanation concerning the choice of two's complement for the accumulator. 2016-03-04 Vincent Lefèvre [doc/README.dev] Update about MinGW and __USE_MINGW_ANSI_STDIO. [INSTALL] Some improvement about MinGW and __USE_MINGW_ANSI_STDIO. [TODO] With MinGW, build with -D__USE_MINGW_ANSI_STDIO by default? 2016-03-03 Vincent Lefèvre [configure.ac] Improved --help messages for decimal-float and float128 (a bit like what was done for thread-safe). 2016-03-03 Paul Zimmermann updated NEWS for decimal floats and __float128 set --enable-float128 to "autodetect" by default (like --enable-decimal-float) 2016-03-02 Vincent Lefèvre [TODO] For testing the lack of subnormal support. [acinclude.m4] Also fixed the test for subnormal double-precision numbers, in case an extended precision / exponent range is used (however the test is not guaranteed with non-conforming compilers). [acinclude.m4] Fixed test for subnormal single-precision numbers. 2016-03-02 Paul Zimmermann added a separate configure test for subnormals in the "float" format 2016-03-02 Vincent Lefèvre [acinclude.m4,configure.ac] Various fixes in error messages. [TODO] Update ICC detection. 2016-03-02 Paul Zimmermann autodetect support for decimal floats (as suggested in revision 10179) 2016-03-02 Vincent Lefèvre [src/ieee_floats.h] Comment update. [tests/tversion.c] Another improvement, just in case Clang no longer defines __GNUC__ in the future. [tests/tversion.c] Improved output of compiler information. [src/ieee_floats.h] No longer use a NaN memory representation because it was fixed thus could be either a qNaN or a sNaN, depending on the machine. Moreover the choice is to generate a qNaN, in particular due to lack of sNaN support by compilers. Do not build with decimal float by default as it is not standard (a better behavior could be to auto-detect). Updated comments about DBL_NAN, dbl_nan.d and qNaN / sNaN encoding. [src/get_flt.c] Updated FIXME comment: idea of a solution... [src/get_flt.c] FIXME: The code assumes the IEEE-754 binary32 format with subnormal support. [tests/tget_flt.c] Do tests that may involve subnormals only if HAVE_DENORMS is defined. 2016-03-01 Vincent Lefèvre [src/set_*.c] Use the DOUBLE_ISNAN macro for _Decimal64, __float128 and long double like what is done for double; on platforms where d != d is not wrongly optimized to false, this should not change anything. Also added some MPFR_UNLIKELY for special cases of _Decimal64 and __float128, as this is already done for double and long double. [tools/mpfrlint] Detect some uses of "x != x" and "x == x". 2016-03-01 Paul Zimmermann recognize icc (which might define __GNUC__) 2016-03-01 Vincent Lefèvre [src/mpfr-impl.h] Added a comment about non-IEEE-754 environment. 2016-03-01 Paul Zimmermann HAVE_DOUBLE_IEEE_LITTLE_SWAPPED is not supported 2016-03-01 Vincent Lefèvre [configure.ac] Quote the argument of all AC_MSG_RESULT and AC_MSG_ERROR when it is longer than a word, as already done in most cases (this is safer in case we modify the text and add a comma). [tests/tset_float128.c] Better cast. 2016-03-01 Paul Zimmermann use DOUBLE_ISNAN() instead of f == f updated updated paragraph on AIX/PowerPC added more details in case of error harmonize configure message against GMP updated with mpfr-3.1.4-rc2 fixed detection of "double" format, and removed HAVE_DOUBLE_IEEE_LITTLE_SWAPPED, since we have no machine to test it removed leftover debug statement 2016-03-01 Vincent Lefèvre Removed "The IEEE code for double needs GMP internal files." from doc/README.dev as this is no longer the case since r10150. 2016-03-01 Paul Zimmermann speedup in mpfr_set_d and mpfr_get_d improved detection of decimal floats removed (obsolete?) #define XDEBUG in mpfr-gmp.h 2016-03-01 Vincent Lefèvre [acinclude.m4] Removed old code for Alpha (as suggested by Paul). It was no longer tested. [configure.ac] Added a FIXME comment about a possible misuse of AC_RUN_IFELSE programs that can return several values. 2016-02-29 Paul Zimmermann get rid of dependency from GMP for _GMP_IEEE_FLOATS and ieee_double_extract enable decimal float by default 2016-02-29 Vincent Lefèvre [tools/mpfrlint] Also detect the use of ASSERT_ALWAYS (forbidden). Replaced the remaining ASSERT_ALWAYS by MPFR_ASSERTN. [NEWS] Removed a useless note (as the ABI has already changed). [NEWS] Update about MinGW: "Added support for thread-safe DLL" as this was more than a fix of the test suite with r9684,9778. [NEWS] Added "MinGW: Avoid failures in the test suite for shared builds with TLS." (fix in r9891). [INSTALL] Removed an obsolete sentence about MinGW and shared builds with TLS (the failures in the test suite were avoided in r9891). [tests/Makefile.am] Comment update. 2016-02-25 Vincent Lefèvre About "config.h" inclusion: code consistency; removed obsolete comment. [tests/tversion.c] Output availability of intmax_t/uintmax_t based functions and *printf functions. [src/printf.c] Added a blank line for more readability. [doc/README.dev] Added a note about the "config.h" inclusion. [tests/tversion.c] Let's group the features together. [tests/tversion.c] Output support status of modifiers in gmp_printf. Added mpfr_buildopt_float128_p function. [doc/mpfr.texi] Removed old comments. 2016-02-24 Vincent Lefèvre [tests/tset_str.c] Correction (with no noticeable effect). [tools/mpfrlint] For codespell, skip the openout.* files, which are created by "make pdf". [src/sum.c] Minor FIXME comment update. [doc/sum.txt] Updated introduction. [tools/announce-text] Check the files on the mpfr.org web server. [tools/announce-text] Added a comment. [tools/announce-text] Update for release candidates. [doc/mpfr.texi] Fixed a warning with "make info". Added tools/ck-news Perl script to check the NEWS file. In Makefile.am: * run this script in dist-hook for "make dist"; * added this script to EXTRA_DIST as it is used in dist-hook. [tools/announce-text] Take into account $vers setting. [tools/announce-text] Replaced MD5 by SHA256. 2016-02-23 Vincent Lefèvre [tools/update-version] Correction for new perl versions. 2016-02-23 Paul Zimmermann unified description of mpfr_eint 2016-02-23 Vincent Lefèvre [src/{cmp_d.c,cmp_ld.c}] Bug fixes: mpfr_cmp_d (resp. mpfr_cmp_ld) was 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. [tests/{tcmp_d.c,tcmp_ld.c}] Full test of the flags for NaN → failure. [tests/{tcmp_d.c,tcmp_ld.c}] GNU coding style. [tests/tcmp_d.c] GNU coding style. [doc/sum.txt] Update about the suggestion to split the inputs for Demmel's algorithm. 2016-02-22 Vincent Lefèvre [doc/README.dev] Added a reference to the build-multi script. Removed the tools/build-multi script (already in ^/misc). Added tools/build-multi zsh script to build and install multiple MPFR versions, and add XML library descriptors for ABI Compliance Checker. [tests/tagm.c] Also do the test with a = b in precision 2 (since the same bug occurs in the 3.1 branch, which doesn't support precision 1). 2016-02-22 Paul Zimmermann fixed error analysis for gamma_inc continued fraction 2016-02-19 Vincent Lefèvre [tests/tfmod.c] Test that triggers the bug fixed in r10054: run it also in the extended exponent range in order to make the test fail when ported to the 3.1 branch. [tests/tfmod.c] Renamed a variable since it is not always NaN. [tests/tfmod.c] Added a test that triggers the bug fixed in r10054 without relying on test_generic failure. 2016-02-19 Paul Zimmermann added references in comment 2016-02-18 Paul Zimmermann added error analysis for gamma_inc with continued fraction (to be reviewed) 2016-02-18 Vincent Lefèvre [doc/sum.txt,src/sum.c] mpfr_sum: added support for precision 1. 2016-02-18 Paul Zimmermann more precision about gamma_inc added reference to series for incomplete gamma function 2016-02-17 Paul Zimmermann added tests for negative integer a 2016-02-17 Vincent Lefèvre [tests/tfmod.c] Do not use a variable named nan to avoid confusion with the nan function of C99 (and possible obscure failures in the future, if we include ). 2016-02-17 Paul Zimmermann added reference to gamma_inc(-n,x) for current code added test to exercise bug fixed in revision 10056 fixed one test fixed bug in mpfr_agm in case a=b but result cannot be exactly represented in the target precision: ternary value was wrongly set to 0 2016-02-17 Vincent Lefèvre Removed trailing spaces. 2016-02-17 Paul Zimmermann reduce the time of tgamma_inc fixed the number of special tests for 2-argument functions fixed stupid error in revision 10054 2016-02-17 Vincent Lefèvre [src/mpfr-impl.h] Removed mpfr_sum_sort declaration, as this internal function had been removed in r9370. 2016-02-17 Paul Zimmermann avoid computing with huge integers in mpfr_fmod when x/y is very small 2016-02-17 Vincent Lefèvre [doc/sum.txt] Update about the old mpfr_sum implementation. 2016-02-17 Paul Zimmermann Clarify the status of mpfr_gamma_inc for the MPFR 3.2 release. 2016-02-17 Vincent Lefèvre [tests/tgeneric.c] Fixed a typo in latest commit, and added min/max and max/min special tests for functions with 2 arguments. This triggers a failure in tfmod on 64-bit machines at least. [src/gamma_inc.c] Improved assertions. 2016-02-17 Paul Zimmermann now mpfr_gamma_inc(a,x) also works for 'a' a negative integer (however a and x should not be too large, we should implement Legendre's continued fraction for the general case) fixed issue in mpfr_eint 2016-02-17 Vincent Lefèvre [src/gamma.c] Added another assertion. [src/gamma.c] Added assertions and a comment. [src/gamma.c] Removed useless saved_flags as flags are already saved by MPFR_SAVE_EXPO_MARK. Removed the comment about about emin/emax as emin <= 2 <= emax may not be sufficient (or may be suboptimal). After all, MPFR_SAVE_EXPO_* is the usual thing to do... 2016-02-17 Paul Zimmermann previous commit was incomplete fixed bug in mpfr_gamma: flags might be corrupted in case the argument was an integer fitting in an unsigned long 2016-02-15 Vincent Lefèvre [doc/README.dev] Update about patches. [tests/troot.c] Compare root(x,2^h) with pow(x,2^(-h)). Added bad_cases tests for mpfr_pow_ui and mpfr_pow_si. Added bad_cases tests for mpfr_root. [src/{fits_intmax.c,fits_s.h,fits_u.h}] Fixed mpfr_fits_* functions in a reduced exponent range and debug mode for non-integer numbers just above the positive limit. [tests/tfits.c] Check a non-integer number just below a power of two. [tests/tfits.c] Also run the tests in reduced exponent range. [tests/tfits.c] Added tests of non-integer values near the type limits. This triggers a flags failure for src/fits_* r9649, corresponding to the bug fixed in r9650 (there were no tests for this bug yet). [tests/tfits.c] Increased code reuse so that tests could be improved more easily (not everything is tested yet). 2016-02-12 Vincent Lefèvre [tests/tconst_log2.c] Correction for C++ compilers. [tests/tcan_round.c] Correction for C++ compilers. Code formatting. [src/div.c] Coding style. [src/div.c] Added a TODO for value coverage tests. [doc/mpfr.texi] Added a comment about mpfr_gamma_inc. [tests/tgamma_inc.c] Added a TODO. [src/gamma_inc.c] Detect internal overflow in order to avoid taking all the memory of the machine, but it is currently not supported: assertion failure. This was occurring with a = 2^32 and x = 2^(-32) on 32-bit machines (see change in r10019). 2016-02-12 Paul Zimmermann reduced a test with large arguments 2016-02-11 Vincent Lefèvre [src/gamma_inc.c] Improved type consistency to avoid integer overflow. [src/gamma_inc.c] Added some assertions to detect integer overflow. [tests/tgamma_inc.c] C++/C99 comment → C89 comment. [src/gmp_op.c] Fixed an assertion that made tgmpop fail on 32-bit machines (it became wrong with r9964 and --enable-assert). 2016-02-10 Vincent Lefèvre [doc/sum.txt] Added a FIXME for precision 1 (recently added). 2016-02-10 Paul Zimmermann added formula for gamma_inc(-n,x) 2016-02-09 Paul Zimmermann removed item about speeding up const_euler: done since now for x=1.1, prec=16610, mpfr_const_euler takes only about 40% of the total time. For x=1.1 and prec=100000 it takes only about 14% of the total time. fixed the call to mpfr_eint() in gamma_inc, added some tests for gamma_inc now mpfr_eint() returns -E1(-x) for x < 0 2016-02-09 Vincent Lefèvre [src/eint.c] Fixed eint(-inf). [tests/teint.c] Added a corresponding test. [src/si_op.c] Unified coding style and added logging. [src] Moved si ops from mul_ui.c, div_ui.c and ui_div.c to si_op.c. [src/ui_div.c] Fixed bug in mpfr_si_div when the integer is LONG_MIN, visible when using an UB sanitizer (see r9999). Note: this integer value is not tested yet in the test suite due to the lack of generic tests for mpfr_si_div. [tests/{tgeneric.c,tsi_op.c}] Added TODO. [src/{div,mul}_ui.c] Fixed bug in mpfr_div_si and mpfr_mul_si when the integer is LONG_MIN, visible when using an UB sanitizer (see r9999). [tests/tgeneric_ui.c] Added tests of the extreme integer values, so that tsi_op fails with a runtime error in si_op.c r9998 when using an UB sanitizer (bug fixed in r9999). [src/eint.c] Code simplification. [src/si_op.c] Fixed bug in mpfr_add_si, mpfr_sub_si and mpfr_si_sub when the integer is LONG_MIN, visible when using an UB sanitizer. [src/si_op.c] Code formatting. [tests/teint.c] Added a test that triggers a runtime error at si_op.c:42:31 on an x86-64 Linux machine, using: CFLAGS="-fsanitize=undefined -fno-sanitize-recover" [doc/mpfr.texi] Typographic correction. [tools/mpfrlint] Avoid false positives in mp_exp_t check. [src/eint.c] Updated a FIXME (mpfr_set_exp_t was added in r4333 and completed in r5455), with typo from r6789 corrected. [doc/mpfr.texi] Updated Section "API Compatibility / Changed Functions": mpfr_eint changed in MPFR 3.2. 2016-02-08 Paul Zimmermann update NEWS/TODO with respect to E1 oops, eint(x) was wrong for negative x with |x| >= 0.5 now mpfr_eint(x) returns E1(x) for negative x 2016-02-08 Vincent Lefèvre [doc/mpfr.texi] Correction (spelling). [tests/tsum.c] Clarified a bit more. [tests/tsum.c] Added explanations concerning the check1 test. Value coverage for tsum: reduce output length. Value coverage for tsum: differentiate sq > MPFR_PREC_MIN and not. 2016-02-07 Vincent Lefèvre [tests/tsum.c] Source on 80 columns. 2016-02-07 Paul Zimmermann extended the check1() test, gives failure on 64-bit processor fixed note 2016-02-06 Paul Zimmermann more work on gamma_inc note about memory usage 2016-02-05 Vincent Lefèvre [src/gamma_inc.c] Corrected protection against integer overflow (MPFR_PREC_IN_RANGE is just for debug mode). [src/gamma_inc.c] Added protection against integer overflow (i.e. abort instead of getting incorrect results). 2016-02-05 Paul Zimmermann more work on gamma_inc (only remains the case a=0 and x>0 to implement) 2016-02-05 Vincent Lefèvre Removed trailing spaces. [tests/troot.c] In exact_powers, check negative values too. [src/root.c] Code simplification. TODO update for fmma. 2016-02-05 Paul Zimmermann reduced emax added a test for exact powers for mpfr_root and fixed mpfr_root for negative x (and odd k) 2016-02-05 Vincent Lefèvre [src/root.c] Corrected(?) the check for exact root by adding an exactness test for the inverse operation z^k (if unnecessary, it needs to be properly proved and documented). [src/root.c] Corrected a comment. [src/root.c] Some minor changes. Updated comments. 2016-02-05 Paul Zimmermann check for an exact root in mpfr_root_aux fixed bug in mpfr_root and inefficiency problem with large k 2016-02-05 Vincent Lefèvre [src/mpfr-impl.h] For MPFR_IS_PURE_FP(x), when x is a pure FP number, check that EXP(x) is in the current exponent range (debug mode). [src/exceptions.c] Some changes concerning mpfr_check_range: * Added a note about the case EXP(x) < MPFR_EMIN_MIN. * Do not use the MPFR_IS_PURE_FP() macro as this macro assumes that if the number is not a singular number, then it is really a pure FP number (some assertion checking may be done in debug mode), but this is not necessarily the case here. * Removed an incorrect comment and re-added the MPFR_UNLIKELY for the cases where EXP(x) is outside the exponent range. Indeed, mpfr_check_range is called at the end of most functions, and in most cases, there are no underflows / overflows. [tests/texp.c] Added FIXME, as the overflow test, which was specific to the 32-bit ABI, is no longer run. [tests/tacosh.c] Added a FIXME (huge values no longer tested at all). [src/fmma.c] Removed unused code. 2016-02-05 Paul Zimmermann added code to compare mpfr_root with exp(log(x)/k) reduce MPFR_EMAX_DEFAULT by 2, and modify some tests cases assuming MPFR_EMAX_DEFAULT=2^30-1 fixed fmma failure 2016-02-05 Vincent Lefèvre [src/exp.c] Simplified exponent range setting in special case. 2016-02-05 Paul Zimmermann changed test_generic() calls to start from MPFR_PREC_MIN instead of 2; this revealed a special-case code in mpfr_exp which didn't work for prec=1 2016-02-05 Vincent Lefèvre [tests/trint.c] Do the significand parity test only for precision > 1. 2016-02-04 Paul Zimmermann updated NEWS and mpfr.texi for MPFR_PREC_MIN=1 MPFR_PREC_MIN is now 1, in accordance with the next revision of IEEE-754 fixed tests to start at MPFR_PREC_MIN instead of hard-coded value of 2 fixed test which was assuming MPFR_PREC_MIN=2 fixed to correctly check prec=1 prepare for MPFR_PREC_MIN=1 fixed tcheck for MPFR_PREC_MIN=1 prepare mpfr_pow to work for precision 1 2016-02-04 Vincent Lefèvre [doc/mpfr.texi] Mention the Caramba project-team. Replaced Contributed by the AriC and Caramel projects by Contributed by the AriC and Caramba projects 2016-02-04 Paul Zimmermann added comment about gamma_inc 2016-02-04 Vincent Lefèvre [src/gamma_inc.c] Added assertions. 2016-02-04 Paul Zimmermann more work on gamma_inc fixed some special values for gamma_inc 2016-02-03 Vincent Lefèvre [doc/mpfr.texi] FIXME: Clarify the status of mpfr_gamma_inc for the MPFR 3.2 release. 2016-02-03 Paul Zimmermann completed "Added Functions" section 2016-02-03 Vincent Lefèvre [doc/mpfr.texi] Typographic correction. [src/div.c] Fixed bug introduced in r9902 and visible in the tests on 32-bit machines. [src/root.c] Added TODO for code rewrite (discussion between VL and PZ). [tests/troot.c] Also check that root(0,0) is NaN to make sure that such special cases are considered in the right order in the implementation. [doc/mpfr.texi] Completed mpfr_root description: the 0th root gives NaN. [src/root.c,tests/troot.c] Removed obsolete code that was commented out; some cleanup. [src/root.c] Comment correction (again). [src/root.c] Comment correction to avoid a variable name with several meanings. [src/root.c] Simplified code and corrected comment. [src/root.c] Corrected a comment and added an assertion (see r9923). [src/root.c] Added a FIXME comment. [tests/troot.c] Typo in a comment. [tests/troot.c] Added tests showing a bug in mpfr_root on large integer arguments (found thanks to a bug in GNOME Calculator: ). Style: use RND_LOOP; mpfr_can_round returns a Boolean-like value. 2016-02-02 Vincent Lefèvre [src/{erandom.c,nrandom.c}] Updated a reference. 2016-02-02 Paul Zimmermann mpfr_can_round -> MPFR_CAN_ROUND 2016-02-02 Vincent Lefèvre [doc/mpfr.texi] Updated FIXME for mpfr_can_round. [doc/mpfr.texi] Added a FIXME for mpfr_can_round. Still incorrect... [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Corrected note about mpfr_can_round. 2016-02-02 Paul Zimmermann refactor the exhaustive search code in mpfr_const_log2 mpfr_round_p -> MPFR_CAN_ROUND mpfr_can_round -> MPFR_CAN_ROUND mpfr_can_round -> MPFR_CAN_ROUND use MPFR_CAN_ROUND instead of mpfr_can_round/mpfr_round_p rounding test was wrong for rounding to nearest replace mpfr_can_round by mpfr_round_p 2016-02-02 Vincent Lefèvre [src/round_prec.c] Added a TODO to improve the mpfr_can_round_raw efficiency by only doing a bit inspection (no mpn operations). 2016-02-01 Vincent Lefèvre [tests/tcan_round.c] Added test of mpfr_round_p with powers of two (similar to the one done in src/round_p.c for MPFR_WANT_ASSERT >= 2). [tests/tcan_round.c] Updated description: mpfr_round_p is also tested in check_round_p (and will be in test_pow2). 2016-02-01 Paul Zimmermann now mpfr_round_p() always requires normalized input 2016-02-01 Vincent Lefèvre [src/div.c] Added an assert based on comments in the code. [src/round_p.c] Some corrections in comment. 2016-02-01 Paul Zimmermann added a comment 2016-01-31 Vincent Lefèvre [src/round_p.c] Fixed mpfr_round_p for MPFR_WANT_ASSERT >= 2, as mpfr_round_p accepts non-normalized inputs (as decided in r9897), but not mpfr_can_round_raw (as decided in r9883). 2016-01-31 Paul Zimmermann the inputs of mpfr_round_p might not always be normalized 2016-01-29 Paul Zimmermann fixed FIXME 2016-01-29 Vincent Lefèvre [configure.ac] Improved consistency in messages. [doc/README.dev] Updated instructions on how to cross-compile MPFR for MinGW (i586-mingw32msvc) and test it under Wine. 2016-01-29 Vincent Lefèvre Cleanup of memory allocation in the tests: * only tests_allocate, tests_reallocate and tests_free should be used (now exported instead of mpfr_default_allocate, etc.); * this is now mentioned in doc/README.dev; * added checks to tools/mpfrlint (heuristics as usual). 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), though this cleanup is more general than an attempt to fix a Windows issue. 2016-01-29 Paul Zimmermann fixed case when prec > bn * GMP_NUMB_BITS and directed rounding typo 2016-01-28 Vincent Lefèvre [tests/tcan_round.c] Updated comment and corrected condition on prec. [tests/tcan_round.c] Updated comments. [src/round_p.c] Added an assertion (similar to what was added to mpfr_can_round_raw). This triggers failures, which could also be detected with MPFR_WANT_ASSERT >= 2, due to the fact that mpfr_div can internally generate a number that is not normalized before a rounding test. [src/round_prec.c] Updated comments. 2016-01-28 Paul Zimmermann more work on mpfr_can_round fixed bug in mpfr_can_round for input = 2^k 2016-01-27 Vincent Lefèvre [doc/mpfr.texi] Replaced "Rounding Related Functions" by "Rounding-Related Functions" (thanks to Keith Briggs for the remark). [tests/tcan_round.c] Added tests for powers of two. This triggers errors. I may have done mistakes, but at least x = 2^32, j = 32, r1=MPFR_RNDN, r2=MPFR_RNDN seems buggy. 2016-01-27 Paul Zimmermann simplified another detail 2016-01-27 Vincent Lefèvre [doc/mpfr.texi] Corrected mpfr_can_round description again as the possible difference is on 0+ = 2^(emin-1), not about overflow. Let's just say "assuming an unbounded exponent range". [doc/mpfr.texi] Corrected mpfr_can_round description (about overflow). 2016-01-27 Paul Zimmermann yet another improvement improved documentation 2016-01-27 Vincent Lefèvre [doc/mpfr.texi] Clarified change in r9873. 2016-01-27 Paul Zimmermann improve documentation of mpfr_can_round also print the rounded value added pointer to examples/can_round.c 2016-01-27 Vincent Lefèvre [examples/can_round.c] Removed the useless #include and replaced the internal mpfr_dump by mpfr_printf. 2016-01-27 Paul Zimmermann improved documentation of mpfr_can_round added example on how to use mpfr_can_round 2016-01-21 Paul Zimmermann mention mpfr_set/get_decimal128 for the future (low priority for now) 2016-01-21 Vincent Lefèvre [src/round_p.c] Code formatting. 2016-01-21 Paul Zimmermann added remark about Ei vs E1 2016-01-21 Vincent Lefèvre [tests/tsqrt.c] Improved bug20160120. [tests/tsqrt.c] In bug20160120, check the validity of the result with mpfr_check first, because the mpfr_sqrt was generating invalid data. 2016-01-20 Paul Zimmermann fixed bug in mpfr_sqrt reported by Fredrik Johansson added test case for bug reported by Fredrik Johansson added FIXME 2016-01-20 Vincent Lefèvre [tests/tzeta.c] Added casts for printf. [tests/tzeta.c] Some corrections. Made the input value of the latest test clear (avoiding a long string at the same time). 2016-01-20 Paul Zimmermann fixed bug for zeta(s) with s near an even negative integer 2016-01-20 Vincent Lefèvre [doc/README.dev] Instructions on how to cross-compile MPFR for MinGW (i586-mingw32msvc) and test it under Wine. [doc/README.dev] Typo. [tests/tgeneric.c] Improved the generic tests in order to trigger the mpfr_jn bug found by Fredrik Johansson (r9841) and potential similar bugs: For half cases, the precision of the inputs was modified to be smaller than the base precision (for the result). Here, this rule is changed so that if the base precision is small (< 16), then the precision of the inputs is chosen to be significantly *larger* than the base precision in general. Note: With this improvement, both tj0 and tj1 fail in r9840. 2016-01-20 Paul Zimmermann added references added section about gamma_inc fixed bug found by Fredrik Johansson added reference for eint 2016-01-20 Vincent Lefèvre [tests/tj0.c] Avoid mpfr_set_d. 2016-01-19 Paul Zimmermann added bug found by Fredrik Johansson in mpfr_j0 added mpfr_gamma_inc 2016-01-19 Vincent Lefèvre [src/gamma_inc.c] Use MPFR_ARE_SINGULAR. 2016-01-19 Paul Zimmermann deal with the case where one of a or x is not regular 2016-01-19 Vincent Lefèvre [tools/nightly-test] Corrected tests. 2016-01-19 Paul Zimmermann added reference 2016-01-18 Paul Zimmermann added the incomplete beta function incomplete Gamma is now available switch to bash and add --enable-decimal-float minor modification of documentation for mini-gmp added target "make bench" 2016-01-17 Paul Zimmermann allow tgamma x prec to print gamma(x) to prec bits 2016-01-17 Vincent Lefèvre [tests] Added tgamma_inc to svn:ignore property. TODO update. [src/fmma.c] Removed trailing spaces. [tests/tgamma_inc.c] Portability correction. [src/mpfr.h] Improved a comment. [src/gamma_inc.c] Various corrections. 2016-01-16 Paul Zimmermann first version of incomplete Gamma function (work in progress) 2016-01-16 Vincent Lefèvre TODO for correctly rounded polynomials (like fmma). 2016-01-16 Paul Zimmermann try to fix bugs in fmma (work in progress) 2016-01-15 Vincent Lefèvre [src/log_ui.c] Added a FIXME comment: mpfr_log_ui is much slower than mpfr_log on some values of n, e.g. around ULONG_MAX/3. [tests/tlog_ui.c] Added tests for n around ULONG_MAX/3. [src/log_ui.c] Fixed the computation of p. [src/log_ui.c] Removed a mpz_sub_ui(...,1) to match the comment. This -1 came from the previous code, but this doesn't change the value of k because a multiple of 3 cannot be a power of 2. Also renamed a variable. [src/log_ui.c] Compute the value of k without rounding (if n was larger than 2^53 or even 2^24 due to dynamic x87 precision, the result could be wrong) and overflow (3 * n doesn't always fit in a limb). [src/log_ui.c] Added assertions. [tests/tlog_ui.c] Added tests for n around LONG_MAX. [src/log_ui.c] Replaced a comment by an assertion. [src/log_ui.c] Added a FIXME (integer overflow for large n). [tests/tlog_ui.c] * In the loop, do not test n = 0 and n = 1, because mpfr_can_round always fails for these values, so that the test is pointless. * Check that mpfr_can_round no longer fails (this is possible as we are not doing random tests, i.e. the tested values are known); the additional precision for y had to be increased. * Also test large values of n (ULONG_MAX down to ULONG_MAX-19). When GCC's run-time sanitizer -fsanitize=undefined -fno-sanitize-recover is used, it signals an error for large values of n. * The reference values y are obtained with mpfr_log instead of mpfr_log_ui: indeed we need a different implementation from the tested function, otherwise only the rounding is tested! Without GCC's run-time sanitizer, this shows that mpfr_log_ui is buggy for large values of n. [tests] Added tfmma and tlog_ui to svn:ignore property. [src/fmma.c] Use MPFR_SET_EXP to get an assertion failure in case of out-of-range exponent instead of uncontrolled behavior. [tests/tfmma.c] Added tests that trigger an error. [src/fma.c] Added a comment for the new code. 2016-01-14 Vincent Lefèvre [tests/Makefile.am] Tests in lexicographic order. 2016-01-14 Paul Zimmermann in tests, removed #if MPFR_VERSION >= MPFR_VERSION_NUM(2,x,y) forgot in last commit added new function mpfr_log_ui 2016-01-13 Paul Zimmermann adapted to 3- and 4-argument functions (using patch from Patrick Pelissier) 2016-01-12 Vincent Lefèvre [tests/tfmma.c] C++ compatibility. [tests/tfmma.c] Fixed type in printf. [src/fmma.c] Replaced mp_ptr by mpfr_limb_ptr (as usual). Really replaced mpfr_printf by printf. 2016-01-12 Paul Zimmermann give copyright to FSF replaced mpfr_printf calls changed copyright (I'm the sole author of this part of the code) forgot two files 2016-01-12 Vincent Lefèvre [src/fma.c] C89 compatibility correction. [src/fma.c] Replaced mp_ptr by mpfr_limb_ptr (as usual). 2016-01-10 Paul Zimmermann speedup in mpfr_fma and mpfr_fms new functions mpfr_fmma and mpfr_fmms modified mbench/fma to compute b*c+c instead of b*b+c (b*c+d would be better) 2016-01-08 Vincent Lefèvre [doc/README.dev] Added info about the parallel test harness. Updated documentation related to valgrind or other wrapper for the tests due to the fact that Automake 1.13+ generates a parallel test harness. * doc/README.dev: replaced VALGRIND by LOG_COMPILER. * tests/Makefile.am: added a comment mentioning LOG_COMPILER. 2016-01-05 Paul Zimmermann mpfrbench: use clock() when getrusage() is not available 2016-01-02 Vincent Lefèvre [INSTALL] Added a note about tuning MPFR: For the current GMP version (6.1.0), a Unix-like OS is required. 2016-01-01 Vincent Lefèvre [doc/mpfr.texi] Updated the month. Copyright notice update: added 2016 with perl -pi -e 's/ (\d{4}-)?(2015)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh (the m4 and tools/mbench directories were not modified). Removed 2015 from the example in the doc/README.dev file. 2015-12-28 Vincent Lefèvre [src/mpfr-impl.h] Fixed MPFR_WIN_THREAD_SAFE_DLL definition (patch by Patrick Pélissier). 2015-12-27 Vincent Lefèvre [tests/mpf_compat.h] Fix: File "inp_str.dat" could not be opened with builds outside the source directory (objdir different from srcdir). This did not generate an error, but prevented a test from being done. Now that mpfr-test.h is included via the mpf_compat.c or mpfr_compat.c file (there does not seem to be a valid reason not to include it), we can use src_fopen to open the file in all cases. [tests] In tversion.c, output the locale too (if supported). [tests/tinp_str.c] Added a blank line. [tests] * inp_str.dat: added a locale-independent line at the beginning of the file (useful for mpf_compat). * mpf_compat.h, tinp_str.c: update because of this change. [tests/tests.c] Improved src_fopen description (do not use the term "src directory" because there is a directory named "src", but this is not what is referred here). 2015-12-26 Vincent Lefèvre [tests/mpf_compat.h] Fix: changed "inp_str.data" to "inp_str.dat" due to the file rename in r8120 (otherwise nothing is tested). [tests/mpf_compat.h] For mpf_set_str and mpf_init_set_str, avoid strings with ".", since for GMP the decimal separator is locale dependent (the tests can be run in non-C locales on purpose in order to detect issues in various locales), so that for the mpf_compat test, the conversion fails and the mpf value x is set to 0 (which can yield other problems, such as with mpf_div (y, x, x), which raises an exception). Note: this problem appeared in r9157, where tests_start_mpfr() was added to mpf_compat.h (the locale setting is done in this function). 2015-12-18 Paul Zimmermann patch from Patrick Pelissier (for MinGW) 2015-12-15 Vincent Lefèvre [tests/tsum.c] Corrections for C++. 2015-12-14 Vincent Lefèvre Removed trailing spaces. 2015-12-14 Paul Zimmermann review by Rob (sisyphus1@optusnet.com.au) removed obsolete parts (?) for MinGW new text for Windows/Visual Studio/Visual C++ part contributed by Brian Gladman 2015-12-14 Vincent Lefèvre [INSTALL] Switch to UTF-8. 2015-12-14 Paul Zimmermann changes proposed by Alexander (sav_ix@ukr.net) 2015-12-14 Vincent Lefèvre [tests/tsum.c] Correction. 2015-12-14 Paul Zimmermann clock() should work everywhere 2015-12-14 Vincent Lefèvre [tests/tsum.c] The timing test from r9753 in POSIX-only. [doc/mpfr.texi] Updated the month. 2015-12-14 Paul Zimmermann update INSTALL file -D__USE_MINGW_ANSI_STDIO is needed for GMP only 2015-12-11 Vincent Lefèvre [src/sum.c] Updated comment about overlapping between input and output. 2015-12-11 Paul Zimmermann document that (currently) mpfr_sum doesn't allow overlap timing test to compare mpfr_sum and naive algorithm (without correct rounding) update wrt -D__USE_MINGW_ANSI_STDIO note about MinGW and TLS support improving error message 2015-12-10 Paul Zimmermann added comment and message for errors under MinGW 2015-12-03 Vincent Lefèvre [src/mpfr-impl.h] Updated a comment about clang and division by 0. 2015-11-11 Vincent Lefèvre [doc/sum.txt] Update. [doc/sum.txt] Update. [doc/sum.txt] Minor correction. 2015-11-10 Vincent Lefèvre [doc/sum.txt] Minor correction. [doc/sum.txt] Minor correction. [doc/sum.txt] Update. [doc/sum.txt] Clarification: avoid the word "iteration" for the loop over the inputs, when possible. [doc/sum.txt] Update. [doc/sum.txt] Update. [doc/sum.txt] Update. 2015-11-09 Vincent Lefèvre [src/sum.c] Added a FIXME comment about the reuse of an input for the output. 2015-11-06 Vincent Lefèvre GMP 5.0.0 or newer is required (instead of 4.2.0). [doc/sum.txt] Major and final update (complete rewrite). [src/mpfr-gmp.h] Added a TODO. [src/sum.c] Bug fixed (MPN_COPY_INCR instead of MPN_COPY_DECR). 2015-11-05 Vincent Lefèvre [src/sum.c] Minor comment correction. [src/sum.c] Added another assertion (checked). [src/sum.c] Added assertions (checked). 2015-11-04 Vincent Lefèvre [tests/tsum.c] Added a comment. [TODO] In tsum, add testcases for mpfr_sum triggering the bug fixed in r9722. [src/sum.c] Bug fix: an error bound was too large to compute the sign of the secondary term (when the TMD occurs). 2015-11-03 Vincent Lefèvre [tests/{tstdint.c,tvalist.c}] Updated and improved comment about the test of partial + full inclusion. [configure.ac] C code starting with # (preprocessor directives) must not be indented. 2015-11-03 Paul Zimmermann simplify the configuration with mini-gmp 2015-10-30 Vincent Lefèvre [src/sum.c] Updated comment for sum_raw(). 2015-10-30 Paul Zimmermann better definition of GMP_NUMB_BITS 2015-10-29 Paul Zimmermann update description of file 2015-10-29 Vincent Lefèvre [tests/tdiv.c] Improved comment about the mpfr_divhigh_n_basecase bug. 2015-10-29 Paul Zimmermann more tests do work with mini-gmp (from GMP 6.1.0-rc1) 2015-10-29 Vincent Lefèvre [tools/mpfrlint] For the tests on the source files, ignore everything related to mini-gmp, not just the src/mini-gmp.[ch] files. [doc/README.dev] "To make a release": mention -DMPFR_TUNE_COVERAGE. [tests/tdiv.c] Updated comment about the mpfr_divhigh_n_basecase bug. 2015-10-29 Paul Zimmermann fixed replacement for mpn_neg (return value was wrong) adapt for mini-gmp (from GMP 6.1.0-rc1) replace obsolete mpz_div_2exp function by mpz_xdiv_q_2exp 2015-10-28 Paul Zimmermann adapt mini-gmp stuff to GMP 6.1.0-rc1 replace obsolete mpz_div by mpz_tdiv_q 2015-10-27 Paul Zimmermann fix bug reported by Ricky Farr (https://sympa.inria.fr/sympa/arc/mpfr/2015-10/msg00023.html) 2015-10-22 Vincent Lefèvre [autogen.sh] Restore the INSTALL file also if the process receives a usual signal (SIGHUP, SIGINT, SIGQUIT or SIGTERM). [tests/tversion.c] Added a comment about compiler info. [tests/tversion.c] Instead of __GNUC__, __GNUC_MINOR__ and __GNUC_PATCHLEVEL__, output __VERSION__, which gives more information (for GCC development versions and ICC). 2015-10-21 Vincent Lefèvre [src/sum.c] Updated comment for sum_raw(). 2015-09-15 Vincent Lefèvre [doc/mpfr.texi] Added a comment about mpfr_get_{si,ui,sj,uj} and flags. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Changed "returned value" to "return value" when this is the value returned by the C function (synonymous, but sometimes less ambiguous). [doc/mpfr.texi] For r9689, "returned value" → "return value". [doc/mpfr.texi] Completed the specification of mpfr_get_{si,ui,sj,uj} and mpfr_get_z (inexact flag, and returned value for mpfr_get_z). [tests/tget_z.c] Fixed and improved the check_one() test. * The input value was modified at each iteration, giving z = 0 very quickly, so that not much was tested in practice; in particular, the third argument of mpz_fdiv_q_2exp in mpfr_get_z was never properly tested (since it has no effect for z = 0). * Added various tests of the flags. [tests/tget_z.c] Optimized the check_one() test. 2015-09-10 Vincent Lefèvre Merged the win-thread-safe-dll branch: support build as thread-safe DLL on Windows: changes from Stephan Tolksdorf https://gforge.inria.fr/tracker/download.php/136/619/19537/4980/changes.zip + a correction and some consistency checks. See MPFR bug 19537 on: https://gforge.inria.fr/tracker/index.php?func=detail&aid=19537&group_id=136&atid=619 [src/mpfr-impl.h] Resolved the problem under Linux. [src/mpfr-impl.h] Detect some possible inconsistencies under Unix, when some macro should imply a MS-Windows platform. Merged the latest changes from the trunk since this wasn't the cause of the problem. Applied changes from Stephan Tolksdorf: 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). Include config.h when need be. 2015-09-07 Vincent Lefèvre [TODO] Updated mpz_t caching item, suggesting mpz_init2 instead. [TODO] Added: check whether mpz_t caching is necessary (this was committed in r8911). In short, timings should be done with -static (this wasn't clear), they may depend on the malloc implementation, and after a look at the source, the difference in the timings with mpz_t caching is surprising and should be explained. 2015-09-04 Vincent Lefèvre [tools/ck-copyright-notice] Check src/mparam_h.in instead of the generated (and not distributed) src/mparam.h file; this is also useful to avoid an error after running "make tune". 2015-09-04 Paul Zimmermann distribute the mpfrbench README add a README for mpfrbench 2015-09-04 Vincent Lefèvre More details in a comment about assertions via tuneup. 2015-09-04 Paul Zimmermann fixed failed assertion during "make tune" 2015-08-25 Vincent Lefèvre [tests/tget_z.c] Flags testing. [doc/README.dev] Updated a URL. [tests/tstdint.c] Support MPFR_PRINTF_MAXLM. [tests/tget_sj.c] Support MPFR_PRINTF_MAXLM. [tests/tget_sj.c] Typo. [acinclude.m4] Instead of checking whether the 'j' printf length modifier is working, try to find one that works. [acinclude.m4] Check whether the 'j' printf length modifier is working. [tests/tget_sj.c] Improved check_erange (more flags testing). [tests/tget_sj.c] Improved check_sj and check_uj even more. [tests/tget_sj.c] Improved check_sj and check_uj (flags testing). 2015-08-24 Vincent Lefèvre [tests/tfits.c] New tests at the limits of the types. [tests/tfits.c] For the mpfr_fits_{uintmax,intmax}_p functions, check that the flags are not modified and added tests of -Inf and -0. [tests/tfits.c] For the mpfr_fits_{u,s}{long,int,short}_p functions, check that the flags are not modified and added tests of -Inf and -0. 2015-08-24 Paul Zimmermann fixed the AMD K8 tuning (cf r8118) 2015-08-24 Vincent Lefèvre [tests/tset_si.c] Improved NaN mpfr_get_si / mpfr_get_ui test. [src/{fits_intmax.c,fits_s.h,fits_u.h}] Fixed mpfr_fits_* functions: the flags could be modified, which made the new mpfr_get_{si,ui} tests fail (tests/tset_si.c r9649). [tests/tset_si.c] Added mpfr_get_{si,ui} tests, including flags. 2015-08-20 Vincent Lefèvre [src/mparam_h.in] Improved comment: __amd64__ is generic to all x86 processors with a 64-bit ABI (amd64, a.k.a. x86_64), thus suggest to move mparam.h files to more meaningful locations. [configure.ac] Added test for usability of gmp.h at link time (merged changeset r9644 from the 3.1 branch, with minor changes due to the fact that a known problem between GMP 4.1 and GCC 5 can no longer occur, now that we require GMP 4.2.0 or newer). 2015-08-19 Vincent Lefèvre [doc/README.dev] "To make a release": mention abi-compliance-checker. 2015-07-31 Vincent Lefèvre [src/fpif.c] Added an assertion (I get a build failure with gcc-snapshot 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 2015-07-31 Paul Zimmermann remove usage of mpn_rootrem in mpfr_sqrt since now mpn_sqrtrem is faster (https://gmplib.org/list-archives/gmp-devel/2015-July/004074.html) 2015-07-30 Vincent Lefèvre [src/next.c] Added a note concerning the exceptions. 2015-07-20 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [tests/tversion.c] Output MPFR_VERSION_STRING too. [tests/tversion.c] Check and output additional mpfr_buildopt_* info. Added mpfr_rint_roundeven and mpfr_roundeven functions, with documentation and tests. 2015-07-16 Vincent Lefèvre [tests/tfrexp.c] * Replaced each mpfr_get_exp occurrence by the internal MPFR_GET_EXP macro in order to make sure that an assertion failure is triggered in case of singular number (see also the comment added in r9618). * Fixed the remaining problem due to an overflow and infinite value. [src/mpfr.h] Added a comment about the drawback of the mpfr_get_exp() macro, defined in addition to the function. 2015-07-15 Vincent Lefèvre [tests/tfrexp.c] Simplification: merged the tests on the ternary values, the returned MPFR values and the flags. [src/{div_2si.c,div_2ui.c,mul_2si.c}] Fixed some underflow cases in 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 (the correction in r5517 was incorrect/incomplete). [src/exceptions.c] Added logging for mpfr_underflow and mpfr_overflow. [tests/tmul_2exp.c] Extended the underflow() test to negative numbers, triggering a new bug. [src/frexp.c] Added a comment. 2015-07-02 Vincent Lefèvre [tools/build-patch] Rebuild the mpfr.info file if mpfr.texi has been modified, in order to take it into account in the patch. This is needed since the mpfr.info file is distributed in the tarball. [tools/mpfrlint] Check a Texinfo rule (Section "Ending a Sentence") with common words that end with a capital letter. (merged changeset r9603 from the 3.1 branch) 2015-06-28 Vincent Lefèvre [TODO] Updated URL of TS 18661-4. 2015-06-26 Vincent Lefèvre [src/frexp.c] Handle internal overflow. [tests/tfrexp.c] Forgot a "exit (1);". [tests/tmul_2exp.c] Overflow test: more output info; improved code. [src/mul_2si.c] Fixed overflow case when n = 0. [tests/tmul_2exp.c] In the overflow test, check mpfr_mul_2ui and mpfr_mul_2si too (mpfr_mul_2ui was OK). [src/div_2si.c] Fixed overflow case when n = 0. [tests/tmul_2exp.c] In the overflow test, check mpfr_div_2si too. [src/div_2ui.c] Fixed overflow case (can occur only when n = 0). [tests/tmul_2exp.c] Completed the overflow test. [tests/tfrexp.c] Added tests (currently fail due to the mpfr_div_2ui unhandled-overflow bug). [tests/tmul_2exp.c] Added tests where mpfr_div_2ui overflows, which is currently not handled. [src/frexp.c] Fixed a bug occurring when the current exponent range does not contain 0. 2015-06-25 Vincent Lefèvre [src/check.c] Typo in a comment. 2015-06-19 Vincent Lefèvre [tools/announce-text] Update due to recent InriaForge upgrade. 2015-06-16 Vincent Lefèvre [doc/mpfr.texi] Added a paragraph about the multiple use of MPFR. [TODO] Added: use symbol versioning. 2015-06-12 Vincent Lefèvre [doc/faq.xsl] Remove the indent="no" to get the same behavior as before when using libxslt 1.1.27+. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718535#10 [tests/tfma.c] Improved the new underflow tests (test_underflow3) to test FMA(-x,y,-z). [src/fma.c] Completely fixed the scaling in case of underflow. [src/fma.c] Partially fixed the scaling in case of underflow, corresponding to the testcase from r9566. Double rounding is not handled yet (failure triggered by r9567). [tests/tfma.c] Improved the new underflow tests (test_underflow3) to yield some cases with double rounding when scaling: If the only fix in src/fma.c is to change the rounding mode of the last mpfr_div_2ui (computing s / 2^scale) to rnd_mode, a new failure appears for n = 2, k = 4, s = -1, MPFR_RNDN. [tests/tfma.c] Corrected the new underflow tests to really generate underflows, showing a bug in mpfr_fma. [src/fma.c] Added log messages. [tests/tfma.c] The code removed in r9560 was actually necessary, but do this in a better way. 2015-06-11 Vincent Lefèvre [tests/tfma.c] Added other underflow tests. [tests/tfma.c] Some improvements. [tests/tfma.c] GNU coding style. [tests/tfma.c] Removed code that isn't necessary. [doc/README.dev] "To make a release": mention -DMPFR_COV_CHECK and -DMPFR_ALLOCA_MAX=0 tests. 2015-06-10 Vincent Lefèvre [tests/trandom.c] Cleaner test, avoiding the explicit use of mpfr_rands. [tests/trandom.c] Improved latest change, as some other test already assume a fixed PRNG with GMP >= 4.2.0 (now the value of the last random number of the test is checked). [tests/trandom.c] * Get a non-zero fixed-point number whose first 32 bits are 0 with the default GMP PRNG. This corresponds to the case cnt == 0 && k != 0 in src/urandomb.c (fixed in r8762) with the 32-bit ABI. * Output a warning (with a fatal error when the MPFR_COV_CHECK macro is defined) if one doesn't get such a number, probably because the GMP PRNG has changed. [src/sqrt.c] The bug fixed in r9540 actually came from r9014, which 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. [tests/tgeneric.c] Fixed overflow/underflow tests introduced in r9539: the tests were done in all rounding modes, but the code was incorrect if the exponent of the result depended on the rounding mode. So, the tests are now done only in the rounding mode previously selected. This should be sufficient to detect bugs. [src/lngamma.c] For mpfr_lgamma and mpfr_lngamma, the exponent range was not restored in some cases (some large results). Bug introduced in r8917 (trunk only). [src/{cos.c,sin.c}] Fixed bug related to the exponent range, introduced 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. [tests/tgeneric.c] Check whether the exponent range has been modified by the tested function (which should never happen). This check triggers failures in tlgamma, tlngamma and tsin. [src/sqrt.c] Fixed assertion failure in reduced exponent range. Note: This could happen only in very specific exponent ranges, in particular, which do not include the number 1. [tests/tgeneric.c] Added overflow/underflow tests (→ 4 failed tests). 2015-06-08 Vincent Lefèvre [src/zeta_ui.c] * Support reduced exponent range for the generic case. * Added logging. [tests/tzeta_ui.c] Added tests in reduced exponent range. [src/add_ui.c] Fixed format string in MPFR_LOG_FUNC. 2015-06-07 Vincent Lefèvre [tests/tzeta_ui.c] Code simplification. [tests/tzeta_ui.c] Test zeta(0) in reduced exponent range and all rounding modes. [src/zeta_ui.c] Fixed zeta(0) in reduced exponent range. [tests/tzeta_ui.c] Added testcase. 2015-06-05 Vincent Lefèvre [src/{ui_div.c,ui_sub.c}] Correction for reduced exponent range. [tests/tui_sub.c] Check overflow. [tests/tui_div.c] Check overflow. [tests/tgeneric.c] Removed useless parentheses. [tests/tgeneric.c] Special cases with unsigned long argument. [tests/tpow_all.c] Better flags output in error message. 2015-06-04 Vincent Lefèvre [src/set_q.c] Added missing MPFR_SAVE_EXPO_FREE in case of preliminary overflow or underflow (extreme cases). [src/set_q.c] Replaced a "return" by MPFR_RET: this is at least needed in the extreme case cd != 0, and safer in general. [tests/tset_q.c] Check the flags. [src/mul_ui.c] Fixed bug in mpfr_mul_ui/si: the inexact flag wasn't set. [tests/t{add,div,mul,sub}_ui.c] Replaced tgeneric_ui.c by tgeneric.c, showing a bug in mpfr_mul_ui (missing inexact flag). [tests/{tui_div.c,tui_sub.c}] Added generic tests, yielding assertion failures (due to a reduced exponent range) when assertions are checked. [tests/tgeneric.c] Major clean-up, with some minor corrections. Added support for unsigned long argument, which can be the first or the second one (another intent is to replace tgeneric_ui.c, which does fewer tests concerning the flags). [tests/tdiv_d.c] Corrected the tested function for the generic tests. [tests/td_div.c] Corrected the tested function for the generic tests. [tests/tui_sub.c] Minor improvements. [tests/tgeneric_ui.c] Added missing \n. Minor improvements. [tests/tui_div.c] Minor improvements. 2015-06-03 Vincent Lefèvre [tests/trint.c] Corrected the description (copy-paste error in r9473). [src/rint.c] Handle reduced exponent range. [tests/trint.c] Extend basic_tests from [56,72] to [1,72] since i < 4 (|x| < 1) are special cases in the implementation. [tests/trint.c] Also run BASIC_TEST in reduced exponent range (emin = emax = EXP(x)). [tests/trint.c] Also run BASIC_TEST2 in reduced exponent range (emin = emax = EXP(x)). [src/rint.c] Added a comment about the mpfr_rint_* functions. [src/rint.c] Simplified and fixed the mpfr_rint_* functions: in some corner cases, an intermediate overflow would not be propagated. No testcases added for this particular problem since huge precision numbers would be involved. 2015-06-02 Vincent Lefèvre [doc/mpfr.texi] Added description of the flags for the mpfr_rint, mpfr_ceil, mpfr_floor, mpfr_round, mpfr_trunc functions. 2015-06-01 Vincent Lefèvre [tests/trint.c] In the basic tests, test the flags. 2015-05-31 Vincent Lefèvre [tests/trint.c] Corrections for r9476 and r9477. [configure.ac] For the gcc compiler, better choice of the -W flags when the selected language is C++ (e.g. when CC=g++). 2015-05-29 Vincent Lefèvre [tests/trint.c] Added basic tests of the mpfr_{trunc,floor,ceil,round} functions. [tests/trint.c] Added basic tests of the mpfr_rint_* functions. [doc/mpfr.texi] Added blank lines to improve readability. [tests/trint.c] Updated the description (test_generic_round is now tested, which wasn't done at all before). [tests/trint.c] Added generic tests for the mpfr_rint_* functions. Since all numbers in ]0,1/2[ round to the same value, in order to avoid redundant tests, increased the TEST_RANDOM_EMIN value to -20 and set TEST_RANDOM_ALWAYS_SCALE to 1. Note: only these new tests generate an error if the change of the exponent range is no longer done in these mpfr_rint_* functions. 2015-05-29 Vincent Lefèvre [tests] Added always_scale argument (boolean) to tests_default_random() so that when it is true, scaling is always performed on random numbers generated by mpfr_urandomb(), instead of preferring numbers of the order of magnitude of 1 for half outputs. This will be useful for mpfr_rint_* tests. For tgeneric.c, the value of this argument is controlled by a new macro TEST_RANDOM_ALWAYS_SCALE (0 by default, which corresponds to the current behavior). For the other tests that call tests_default_random(), the argument is set to 0, so that the behavior remains the same. 2015-05-29 Vincent Lefèvre [doc/mpfr.texi] Added a remark concerning the mpfr_rint_* functions. 2015-05-28 Vincent Lefèvre [src] Fixed allocation issue for multithreaded applications: 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). 2015-05-25 Vincent Lefèvre [src/mpfr-gmp.c] Replaced mpfr_allocate_func and mpfr_free_func 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 [tests/talloc.c] Avoid a failure with --with-gmp-build due to the fact that the MPFR_ALLOCA_MAX macro is not defined in this case. 2015-05-23 Vincent Lefèvre Added libtool-tcc-rpath.patch from https://lists.gnu.org/archive/html/libtool-patches/2015-05/msg00000.html so that tcc can be used with libtool 2.4.3 to 2.4.6. In doc/README.dev, documented how to use this patch (before a release). [tests] Added talloc.c and updated check_PROGRAMS in Makefile.am. This test detects an allocation bug added in r8813, which occurs if mpfr_tmp_allocate() is invoked before __gmp_allocate_func when the GMP build is not used (thus this bug is not visible in most code since mpfr_init2 is generally called first, directly or not, and it uses __gmp_allocate_func). Details: https://sympa.inria.fr/sympa/arc/mpfr/2015-05/msg00001.html [tests/{tstdint.c,tvalist.c}] Added missing #include "mpfr-test.h" (detected with gcc -Werror=implicit-function-declaration), needed since r9447. 2015-05-22 Vincent Lefèvre [src/mpfr-gmp.c] Code formatting. [tests/tstckintc.c] Fixed undefined behavior (invalid pointer). Define MPFR_ALLOCA_MAX macro: Maximum size for the use of alloca by temporary allocations (default: 16384). [tests/{tstdint.c,tvalist.c}] Use tests_start_mpfr / tests_end_mpfr, in particular to detect a wrong MPFR version (due to a libtool bug). 2015-05-21 Vincent Lefèvre [autogen.sh] Exit with the exit status of autoreconf. Thus a failure will be noticed more easily. [NEWS] Update. [acinclude.m4] Added a comment about memmove and memset being considered to be missing when gcc -Werror is used, because of a "conflicting types for built-in function" error. [acinclude.m4] Various corrections in the tests: * MPFR_CHECK_MP_LIMB_T_VS_LONG was always failing due to a typo. * MPFR_FUNC_GMP_PRINTF_SPEC: missing #include for strcmp. * Replaced rint by nearbyint in messages (as nearbyint is tested). * Avoid warnings to avoid failures when -Werror is used. 2015-05-20 Vincent Lefèvre [tests/{tcmp_d.c,tcmp_ld.c,tget_d.c}] Avoid warnings concerning unused variables when MPFR_ERRDIVZERO is defined (useful with -Werror). [tests/tests.c] Avoid a warning concerning an unused variable when HAVE_DENORMS is not defined (useful with -Werror). 2015-05-19 Vincent Lefèvre [doc/mpfr.texi] Improved mpfr_swap description again. [doc/mpfr.texi] Correction and improvements in the formatting. [doc/mpfr.texi] Added a warning for mpfr_set_prec and mpfr_prec_round about allocation issue, as these functions change the precision of x. [doc/mpfr.texi] Typo in the latest change. [doc/mpfr.texi] Rewrote the mpfr_swap description. This should solve the documentation issue reported on: https://gforge.inria.fr/tracker/index.php?func=detail&aid=18954&group_id=136&atid=619 2015-05-18 Vincent Lefèvre [doc/sum.txt] Update (preliminary steps). 2015-05-13 Vincent Lefèvre [doc/sum.txt] Started the rewrite of the doc. 2015-05-06 Vincent Lefèvre [NEWS] Update concerning mpfr_sum. [doc/mpfr.texi] Update concerning mpfr_sum. [doc/sum.txt] The specification of the sign of a zero result only applies to an exact zero, of course (for an inexact zero result, the usual rule of the rounding mode is applied). [tests/t[ne]random_chisq.c] Fixed memory leak (detected by GCC's AddressSanitizer). [doc/README.dev] "To make a release": Test with GCC's AddressSanitizer (-fsanitize=address). [tests/tabort_defalloc*.c] Disable the tests if __SANITIZE_ADDRESS__ is defined, i.e. when GCC's AddressSanitizer is used, because it reports the error before GMP can do the abort. 2015-05-05 Vincent Lefèvre [tests/tests.c] Make tests_default_random() more intuitive, avoiding automatic changes of the current exponent range in some cases: instead of adding some random exponent in [emin,emax] to the exponent of the random number x in ]0,1[, force this random exponent to be the one of x, so that its exponent is guaranteed to be in [emin,emax]. This avoids a failure in tsum due to the fact that the exponent range was changed automatically (and not restored). [tests/tsum.c] In cancel(), increase the number of tests from 8 to 1000. This is much more, but the test is fast compare to other ones so that the running time increases by a few percents only. And this triggers a new bug: the exponent range is not restored (on a 64-bit machine). [tests/tsum.c] Changes in cancel(): * The fail-test was x[n] > bound instead of |x[n]| > bound, so that some failures could be missed. * More output in case of failure. * Handle underflow in the bound computation. This fixes an incorrect failure due to a bound rounded toward zero instead of toward +inf with GMP_CHECK_RANDOMIZE=1431478020 (found by the nightly tests). [tools/nightly-test] Run "make check" with VERBOSE=1 in order to have tests/test-suite.log output in case of failure, now that Automake 1.13+ is used. 2015-04-28 Vincent Lefèvre Added a TODO about mpfr_sum. 2015-04-24 Vincent Lefèvre [configure.ac] Updated a comment about Automake 1.13. [Makefile.am] Updated comment about ACLOCAL_AMFLAGS. [TODO] Suggest to move some macro definitions from acinclude.m4 to the m4 directory as suggested by the Automake manual. 2015-04-23 Vincent Lefèvre [doc/README.dev] Grouped everything about the test suite near the end of this file. Added information about how the test suite works since the full Automake 1.13 support (r8821). To take into account that Automake 1.13 or later will be used: * doc/mpfr.texi, INSTALL: updates related to "make check". * configure.ac: require Automake 1.13 since the documentation now assumes that 1.13 or later is used (and because previous Automake versions are no longer tested). 2015-04-10 Vincent Lefèvre [NEWS] Mention the complete rewrite of function mpfr_sum. [tests/tsum.c] Added a comment about the latest fixed bug. Merged the new-sum branch: * New feature for developers in order to improve the testsuite: value coverage checking (MPFR_COV_CHECK macro), allowing one to check whether some combinations of values are tested. See example of use in src/sum.c and tests/tsum.c files. * src/sum.c: full rewrite of mpfr_sum. Note: the documentation of the algorithm in doc/sum.txt is currently a bit obsolete. * tests/tsum.c: many new tests, some of them specifically written for the new algorithm and implementation. 2015-04-09 Vincent Lefèvre [src/sum.c] Fixed bug: mpn functions do not accept a zero size argument. [tests/tsum.c] Replaced a mpfr_inits by a mpfr_inits2. [tests/tsum.c] Added a simple test that triggers a glibc free() error or segmentation fault when MPFR is configured with GMP 6.0.0 built with "--disable-alloca ABI=32". GCC's address sanitizer shows a heap-buffer-overflow. This is mainly for debugging as this problem also occurs in other tests (it is quite generic). [tests/tsum.c] Removed a temporary comment. Merged the latest changes from the trunk. [tests/tsum.c] Added check_underflow test. 2015-04-08 Vincent Lefèvre [tests/tsum.c] Comments. [src/sum.c] Bug fix: use MPFR_EXP instead of MPFR_SET_EXP to set the 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. [tests/tsum.c] Added check_overflow test, which triggers a bug. 2015-03-31 Vincent Lefèvre [tests/tsum.c] Completed the cancel test (generic random tests with cancellations): check the bound on the result. [tests/tsum.c] Improved the check4 test: * removed some not very useful tests to reduce the running time; * added tests checking "MPFR_RNDN, tmd=2, rbit=0, sst=1, negative", which was the only remaining one output by check_coverage (when MPFR_COV_CHECK is defined). [tests/tsum.c] Reduced the check4 test because it was much too long compared to the other tests. The bug fixed in r9356 is still triggered and "MPFR_RNDN, tmd=2, rbit=0, sst=0, negative" is still checked. 2015-03-30 Vincent Lefèvre [tests/tsum.c] Updated comment of the check4 test. [src/sum.c] Bug triggered by the check4 test fixed. [tests/tsum.c] Another correction in the check4 test. [tests/tsum.c] In the check4 test, two terms didn't correspond to the formula given in the comment; corrected these terms (the same bug is triggered). [tests/tsum.c] Forgot the h in the error message of the check4 test. [tests/tsum.c] Extend the check4 test even further. [tests/tsum.c] Extend the check4 test even further. [tests/tsum.c] Added check4 test, which triggers a bug. 2015-03-27 Vincent Lefèvre [src/sum.c] In the TMD detection: * improved variable nbits to decrease the number of operations; * added some comments; * fixed the shift count bug triggered by the bug20150327 test. [tests/tsum.c] Added bug20150327 testcase. [tests/tsum.c] Corrected test of the ternary values inex1 and inex2. 2015-03-20 Vincent Lefèvre [tools/ck-copyright-notice] Bug fix and improvements. [tools/ck-copyright-notice] More checks. 2015-03-19 Vincent Lefèvre [src/sum.c] Do not consider the corrected sst for MPFR_COV_SET. [tests/tsum.c] More tests. [src/sum.c] Added comments. [src/sum.c] In the final rounding, forgot to handle the possible exponent change in the negative case with corr == 2. 2015-03-17 Vincent Lefèvre [tests/tsum.c] Improved the check3 tests, which were added in the latest commit. They now trigger an assertion failure in sum.c. [tests/tsum.c] New tests. [tests/tsum.c] Value coverage checking: tmd can be 2 only for MPFR_RNDN. 2015-03-16 Vincent Lefèvre [src/sum.c] Better logging. [src/sum.c] Bug fix: the sum_raw code was unnecessarily assuming too much; thus, removed too parameters, which can be very easily recomputed only when they make sense. 2015-03-12 Vincent Lefèvre [doc/sum.txt] Added a new table concerning the correction term. [src/sum.c] Updated rounding. 2015-03-10 Vincent Lefèvre [src/sum.c] Added comments on the correction. Minor changes in the code. 2015-03-06 Vincent Lefèvre [doc/README.dev] Added information on how to do type punning (something we already did, but with no justification yet). 2015-02-27 Vincent Lefèvre [doc/sum.txt] Updated TODO. [doc/sum.txt] Added TODO (since the description is a bit obsolete). [src/sum.c] In the latest commit, the temporary area was split for the computations that determine the sign of the error term in case the TMD occurs, as these computations occur earlier in the code. This was actually not necessary since the content of the accumulator has already been copied to the final destination (only sign handling and rounding have not been done yet, but they entirely take place in the destination). As a consequence, let's revert the code related to this split. The actual changes concerning the merge of pre-rounding and final rounding can be seen with "svn diff -r 9328:9330". [src/sum.c] * Removed any reference to the obsolete step numbering. * Merged pre-rounding and final rounding, simplifying the code. The correction value still needs to be fixed. [src/sub1sp.c] Avoid an unnecessary mpn_lshift after an mpn_sub_1 when the initial value was a power of two. [src/next.c] Avoid an unnecessary loop when the exponent decreases. 2015-02-26 Vincent Lefèvre [tests/tsum.c] Improved test portability. [tests/tsum.c] New tests. [src/sum.c] Completed the implementation (but there's still a bug). [tests/tsum.c] New tests. 2015-02-25 Vincent Lefèvre [src/sum.c] Improved the setting of sst (Step 8), using the fact that the accumulator is 0 iff cancel = 0. [src/sum.c] Bug fix: when determining the sticky bit, the search was starting at the rounding bit instead of the bit following it. [tests/tsum.c] New tests. [src/sum.c] More logging. [tests/tsum.c] In the generic test, also test with negative numbers. Updated value coverage checking for mpfr_sum. [doc/README.dev] Document the new MPFR_COV_CHECK macro. Value coverage checking when MPFR_COV_CHECK is defined, initially for mpfr_sum. [src/sum.c] Bug fix in the ternary value. [tests/tsum.c] Added check of the ternary value. [src/sum.c] Removed incorrect assertions. [tests/tsum.c] Re-enabled cancel() test. 2015-02-24 Vincent Lefèvre [src/sum.c] Update. [src/sum.c] Update. [src/sum.c] Use the new SAFE_DIFF macro. Merged the latest changes from the trunk (r9306). [src/mpfr-impl.h] Added SAFE_DIFF macro (safe difference). [src/sum.c] Fixed a test. [src/sum.c] Better logging. [src/sum.c] Minor correction of last change of a comment. [src/sum.c] More logging and comments. [src/sum.c] Fixed bug introduced in r9294 (minexp wasn't updated). [src/sum.c] Log the value of tq. [src/sum.c] Bug fix. [src/sum.c] Virtually eliminate halfway cases by making them equivalent to a non-halfway case. 2015-02-21 Vincent Lefèvre [src/sum.c] Update. Merged the latest changes from the trunk (r9295). [src/mpfr-impl.h] Fixed and improved some sign-related macros (some parentheses were missing). [src/sum.c] Update: sum_raw, with a new prototype, now reiterates until the error bound is acceptable; thus the "while" loops have been removed from sum_aux. 2015-02-20 Vincent Lefèvre [tests/tsum.c] Increased the number of tests to get 2 current failures with a "break" in the last loop of sum.c (m = 438, m = 3780), without the exit() in the generic test. Improved error message. [tests/tsum.c] Completely rewrote the generic test (now allows one to detect that the implementation is incomplete when adding a "break" in the last loop of sum.c). 2015-02-19 Vincent Lefèvre [tests/tsum.c] Run bug20131027 in each rounding mode. [src/sum.c] Fixed sum_raw. 2015-02-18 Vincent Lefèvre [src/sum.c] More logging. Merged the latest changes from the trunk. Logging: the log stream is flushed after each log output when the MPFR_LOG_FLUSH environment variable is set. Factorized the logging macros by moving tests inside LOG_PRINT. [src/sum.c] Correction. Set the exponent. [src/sum.c] Added a log message. [src/sum.c] Bug fix: I had inverted positive and negative. 2015-02-13 Vincent Lefèvre [tests/tsum.c] Removed the obsolete mpfr_sum_sort related test (which could obviously no longer compile), so that I can start debugging before finishing the implementation. Merged the latest changes from the trunk. [doc/mpfr.texi] Updated the month. Copyright notice update: added 2015 with perl -pi -e 's/ (\d{4}-)?(2014)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the tools/mbench directory (not distributed with MPFR). Removed 2014 from the example in the doc/README.dev file. 2015-02-12 Vincent Lefèvre [src/sum.c] Copyright notice update. [src/sum.c] Split mpfr_sum into mpfr_sum (handling special cases) and sum_aux (generic case only). Revised some comments. [src/sum.c] When updating minexp, detect a potential integer overflow first (macro UPDATE_MINEXP). Updated comments. [src/sum.c] Logging of sum_raw: log *cancelp at the end. [src/sum.c] Update (Step 8). [src/sum.c] Corrected/improved logging. 2015-01-23 Vincent Lefèvre Added algorithms.fls (generated by latexmk) to svn:ignore property. 2015-01-21 Vincent Lefèvre [tests/tfpif.c] Updated a mpfr_set_zero line for consistency and better readability. [tools/mpfrlint] Added mpfr_set_(inf|zero) tests on the sign. [tests/tset.c] More mpfr_set_inf tests. [tests/tset.c] More mpfr_set_zero tests. [tools/mbench/timp.h] Spelling mistake in a comment. 2014-12-17 Vincent Lefèvre [src/sum.c] Added a TODO. [src/sum.c] Added missing closing parenthesis from r9257. Step 8 update. [doc/sum.txt] Step 8: renamed "sgn" to "sst". [doc/sum.txt] Merged old Step 9 with Step 8; minor changes. [src/sum.c] Avoid a loop in some cases. [src/sum.c] Remember the rounding bit for Step 9; correction for halfway cases in round to nearest. [doc/mpfr.texi] Updated the month. 2014-12-16 Vincent Lefèvre [NEWS] Added an item about improved caching. [NEWS,doc/mpfr.texi] In particular, mention the minimum of 10% increase of the precision (done in r8967). [NEWS] Note that the behavior of the mpfr_set_exp function changed. [src/Makefile.am] As this changed the ABI (the old, unwise behavior was documented), reset -version-info age. This is not that bad since there are other changes in the behavior, though regarded as bugs or previously undocumented behavior. Moved src/sum.txt into the doc directory, and updated the reference in src/sum.c. 2014-12-12 Vincent Lefèvre [src/sum.txt] Update (Step 9). [src/sum.txt] Correction. 2014-12-11 Vincent Lefèvre [src/sum.*] Update. 2014-12-04 Vincent Lefèvre [doc/README.dev] Mention the tools/build-patch script. 2014-12-03 Paul Zimmermann pointed to Feature Request 2014-11-28 Vincent Lefèvre [src/sum.c] Determine the number of cancelled bits in sum_raw instead of the main loop, since it will also be useful in Step 8. [src/sum.*] Update (Step 8). 2014-11-24 Paul Zimmermann fixed issue reported by Dan Grayson: https://gforge.inria.fr/tracker/?func=detail&atid=619&aid=18314&group_id=136 2014-11-13 Vincent Lefèvre [tools/mpfrlint] Minor change concerning mp_limb_t. 2014-11-12 Vincent Lefèvre Style improvements. [src/exp_2.c] Improved t = 0 test. [src/exp_2.c] Fixed a bug added in r9233 (a case t = 0 was no longer taken into account). [src/exp_2.c] GNU coding style. 2014-11-11 Paul Zimmermann improve mpfr_exp2 (patch from Patrick Pelissier) 2014-11-09 Paul Zimmermann improve mpfr_atan for small precision (patch from Patrick Pelissier) added check for libquadmath (not used) 2014-11-03 Vincent Lefèvre [src/cache.c] Improved mpfr_clear_cache in case mpfr_free_cache is called often (like with GC-based systems). Patch by Patrick Pélissier. [src] Applied patch by Patrick Pélissier to allocate some constant-size MPFR numbers on the stack instead of using mpfr_init2, and replace some MPFR_ASSERTN by MPFR_ASSERTD. 2014-10-31 Vincent Lefèvre [src/get_str.c] Improved comments. 2014-10-30 Vincent Lefèvre [src/get_str.c] Free the temporary memory allocated in the Ziv loop ASAP and at a single place (the code should be clearer like that). [src/get_str.c] Code refactoring. [tests/tget_str.c] Code formatting. [tests/tget_str.c] Fixed a test that made mpfr_get_str crash with logging (even when the base is invalid, the MPFR number must be initialized). [src/check.c] Added a note saying that mpfr_check() must not be called on statically allocated numbers (only used inside MPFR). [src/get_str.c] Removed the "MPFR_ASSERTD (mpfr_check (p));" (added in previous commit) because of that. [src/get_str.c] Added some logging (MPFR_LOG_*), which triggers a crash in tget_str with MPFR_LOG_ALL=1. An analysis with gdb shows that this is due to an invalid MPFR number in mpfr_ceil_mul(). Added a MPFR_ASSERTD (mpfr_check (p)); there, which fails in tget_str (this was the cause of the crash), even without logging. 2014-10-29 Vincent Lefèvre mpfr_get_str now sets the NaN flag on NaN input. See: https://sympa.inria.fr/sympa/arc/mpfr/2014-10/msg00013.html and https://gforge.inria.fr/tracker/index.php?func=detail&aid=18228&group_id=136&atid=619 Also completed the mpfr_get_str description in mpfr.texi concerning the special numbers and the exception flags. 2014-10-28 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Removed a spurious "an". [src/get_str.c] Improved style consistency. [doc/mpfr.texi] In the mpfr_get_str description, note that the type mpfr_exp_t is large enough to hold the exponent in all cases. [doc/mpfr.texi] Improved mpfr_get_str description concerning the returned pointer (it was ambiguous in the case of an invalid base). 2014-10-09 Vincent Lefèvre [tests/tests.c] Updated the error message last changed. [tests/tests.c] Updated the error message last changed + comment. 2014-10-08 Vincent Lefèvre [tests/Makefile.am] Added a reference to the bug I've just reported against GNU Automake (completing the other references). [tests/tests.c] Updated the error message last changed. 2014-10-07 Vincent Lefèvre [tests/tests.c] Changed an error message. 2014-10-06 Vincent Lefèvre [src/sum.txt] Update. [src/sum.c] Improved a comment. [src/sum.c] Got rid of maxexp2 in the mpfr_sum function, since after the sum in the main iteration, the old maxexp value is no longer needed: it's simpler to reuse maxexp for maxexp2 since maxexp2 will be the new maxexp value at the next iteration. [src/sum.txt] Update, in particular concerning the variables used in the implementation. 2014-09-09 Vincent Lefèvre [tests] Corrections for builds with "config.h". 2014-08-26 Vincent Lefèvre [src/sum.c] Reset copyright years to 2014 since the whole file is being rewritten from scratch (i.e. everything is new material). [src/sum.txt] Update. 2014-08-25 Vincent Lefèvre [src/sum.*] Update (Step 7, including a part of Step 8 in Step 7). [src/sum.c] Correction (Step 7). [src/sum.c] Corrected r9197 (two "else" branches were mixed up), and update (Step 8). [src/sum.c] Correction when determining the early value of inex. [src/sum.c] Update (Step 8). [src/sum.txt] Update about the value of d. [src/sum.c] Added comments for Step 7 about carry and inex. 2014-08-22 Vincent Lefèvre Merged the latest changes from the trunk (here, tools/mpfrlint). [tools/mpfrlint] Avoid false positives in the check of MPFR_LOG_MSG. [src/sum.*] Update (Step 7). 2014-08-21 Vincent Lefèvre [src/sum.txt] Updated Note 2 again. [src/sum.txt] Updated Note 2. [src/sum.*] Various corrections, and update. Merged the latest changes from the trunk. [src] Cleaner use of MPFR_SET_SIGN. 2014-08-19 Vincent Lefèvre [src/sum.c] Updated comments. [src/sum.c] Update (Step 7). [src/sum.c] Improved description of sum_raw. [src/sum.c] Added description of sum_raw. 2014-08-18 Vincent Lefèvre [src/sum.c] Suppressed a level of block (which became rather useless now that Step 3 has been moved to a separate function). [src/sum.c] Moved Step 3 to a separate auxiliary function sum_raw. [src/sum.c] Renamed variables: p -> x, pe -> xe, pq -> xq (because the p suffix is used here for pointers to mp_limb_t). [src/sum.c] Updated comments. 2014-08-17 Vincent Lefèvre [TODO] Added item on tests (mpfr.h macros vs mpfr-impl.h). [src/mpfr.h] Fixed the mpfr_signbit() macro, which depended on mpfr-impl.h (the problem wasn't detected in the tests since mpfr-impl.h is included in them). Thanks to Rob for the bug report. 2014-08-14 Vincent Lefèvre [src/sum.*] Update (Step 7). 2014-08-13 Vincent Lefèvre [src/sum.txt] Update. [src/sum.txt] Update (another tricky case). 2014-08-12 Vincent Lefèvre [src/sum.txt] Update. [src/sum.txt] Update. 2014-08-11 Vincent Lefèvre [src/sum.*] Completed Step 6. 2014-08-08 Vincent Lefèvre [src/sum.txt] Update. [src] Moved the comment about the mpfr_sum algorithm from sum.c to a new file sum.txt (this will later go into algorithms.tex). 2014-08-06 Vincent Lefèvre [src/sum.c] Updated the algorithm. [src/sum.c] Updated the algorithm. 2014-08-05 Vincent Lefèvre [src/sum.c] Added some log messages. Merged the latest changes from the trunk (but reverted tests/tsum.c). [tools/mpfrlint] Improved check of MPFR_LOG_MSG. [tools/mpfrlint] Replaced {src,tests}/*.{c,h} by $srctests. [src/ai.c] Corrected log messages. [doc/mpfr.texi] Updated the month. Update concerning the P type specifier for formatted output, since mpfr_prec_t was changed to a signed type in MPFR 3.0.0. * doc/mpfr.texi: d and i can be used (o, u, x, and X are still OK in practice since a mpfr_prec_t value is usually nonnegative); changed a "unsigned int" to "int". * src/vasprintf.c: updated a comment. 2014-07-23 Vincent Lefèvre [tests/mpf_compat.h] Fixed a bug (mpf_set_prec_raw usage with GMP/MPF). [tests] * mpfr-test.h: no longer include right here since the included mpfr-impl.h does that and even better for C++. * mpf_compat.c, mpfr_compat.c: include mpfr-test.h as it does useful things (in particular, include config.h via mpfr-impl.h if there is one, and define __MPFR_TEST_H__ for mpfr-impl.h). * mpf_compat.h: no longer include some headers already included via mpfr-test.h (see above change); added tests_start_mpfr and tests_end_mpfr (showing memory inconsistency with mpf_compat). 2014-07-20 Vincent Lefèvre [src/get_str.c] Coding style: better code for a boolean. 2014-07-17 Vincent Lefèvre [src/sum.c] Update. 2014-07-10 Vincent Lefèvre [doc/README.dev] "To make a release": check also without mpz_t caching. [tools/ck-copyright-notice] Ignore src/mini-gmp.[ch] files. [tools/mpfrlint] * Ignore src/mini-gmp.[ch] files for some tests. * Check that __gmp[nz]_ functions are not used (with 2 exceptions), since this breaks the support of mini-gmp and may also break future/modified GMP versions. Note: only code added in r8911 (mpz_t caching) currently fails to follow this rule. Do not test include guards before a #include: the test must be done only in the included file itself. Note that some files such as mpfr.h may have multiple parts that could be enabled depending on the context, so that testing a guard before a #include may yield incorrect behavior. 2014-07-09 Vincent Lefèvre [doc/README.dev] Updated the list of macros used for building and checking MPFR. [acinclude.m4] Corrected a message. 2014-07-08 Vincent Lefèvre Renamed the MPFR_TEST_DIVBYZERO macro to MPFR_TESTS_DIVBYZERO for consistency with MPFR_TESTS_TIMEOUT. 2014-07-07 Vincent Lefèvre [tests] Minor improvements. [tests/reuse.c,tests/taway.c] Added mpfr_ai and mpfr_digamma. [tests/tmul_d.c] Minor improvement. [src/mul.c] Fixed a test when MPFR_WANT_ASSERT >= 2 (NaN with non-NaN was not detected as an error). [src] MPFR_WANT_ASSERT clean-up. Note: the mul.c test for MPFR_WANT_ASSERT >= 3 is now enabled for MPFR_WANT_ASSERT = 2 (since setting MPFR_WANT_ASSERT to 3 was not possible with configure options), and fixed. Added debug of branch prediction / --enable-debug-prediction configure option (patch from Patrick Pélissier, with some changes). 2014-07-02 Vincent Lefèvre [src/round_raw_generic.c] Updated comment about MPFR_RNDNA. [doc/mini-gmp] Added a note about MPFR_USE_MINI_GMP. [doc/README.dev] Added an item on the use of GMP functions. [doc/README.dev] "To make a release": test with mini-gmp. Removed the need of MPFR_USE_MINI_GMP tests for mpfr_[ne]random functions (source and tests) as mpfr_random_deviate_value no longer needs mpq_t (since r9066). Also removed a static assertion in src/random_deviate.c for the same reason. Note: the change done in r9133 is now really useful! [src/mpfr.h] Added other missing "#ifndef MPFR_USE_MINI_GMP". [tests/t[ne]random.c] Code clean-up: added !defined(MPFR_USE_MINI_GMP) to protect mpfr_printf. This is actually not needed due to the initial "#ifndef MPFR_USE_MINI_GMP" but this is for a different reason. [tests/t[ne]random.c] Reverted the changes done in r9126,9127,9130 and added a proper comment. [src/mpfr.h] Added a missing "#ifndef MPFR_USE_MINI_GMP" (not really useful, but cleaner). [tests/t[ne]random.c] Fixed the change done in r9126 and r9127. Renamed WANT_MINI_GMP to MPFR_USE_MINI_GMP as it is used in mpfr.h (all MPFR macros that appear there should start with MPFR_ to avoid conflicts with other software). [tools/mpfrlint] Detect the possible use of forbidden macros in mpfr.h. [tests/terandom.c] Put the WANT_MINI_GMP test at the right place, like what has been done for "tests/tnrandom.c". [tests/tnrandom.c] Put the WANT_MINI_GMP test at the right place (at the same time of the HAVE_STDARG test), but this should be improved in the future, e.g. with a HAVE_MPFR_PRINTF macro. 2014-07-02 Paul Zimmermann added comment 2014-07-02 Vincent Lefèvre [src/mul.c] Minor correction of a comment. 2014-07-01 Vincent Lefèvre [tests/trandom_deviate.c] Correction (fprintf format). 2014-07-01 Paul Zimmermann patch from Charles Karney: > Here is the patch which repeats the chi-squared tests in the case of > suspiciously high values. The probability of a false positive is now > 1/10^9. I also got rid of the mpfr_printf's. 2014-06-30 Vincent Lefèvre [tools/build-patch] * Removed unnecessary quotes for better readability (this is zsh). * When (second argument) is used, use the correct name for the generated patch; at the same time, fixed a checkobj call. * Added comment about typical usage. [tools/build-patch] Correction if MPFR_CURRENT_DIR is set: to make sure that it is always up-to-date, we want to allow it to be a symlink (e.g. .../mpfr-current), so that we want to call realpath on it. Added tools/build-patch zsh script to transform a raw patch into a patch to be put on the MPFR www server. [src/mpfr.h] For the mpfr_{mul,div}_si macros: s/positive/non-negative/ [configure.ac] Correction of two "configure --help" messages (from Patrick Pélissier and other changes). [src/mpfr.h] Coding style. New macros for mpfr_{mul,div}_ui to optimize the call when the integer is a constant number that is a power of 2. New macros for mpfr_{mul,div}_si to optimize the call when the integer is a constant number that is positive. (Modified patch from Patrick Pélissier) 2014-06-26 Vincent Lefèvre [src/vasprintf.c] Improved comments. [src/vasprintf.c] Fixed assertion failures for tiny numbers (the code was correct, but the assertions didn't check against the right bound). [src/div.c] Bug fix: avoid integer overflow in the code added in r9086 (now tdiv no longer fails). [src/div.c] Bug fix: avoid an integer overflow when dividing the largest finite MPFR number by the smallest positive one. (merged changeset r9105 from the 3.1 branch) [tests/tdiv.c] Forgot "exit (1);". [tests/tdiv.c] Added mpfr_div tests on extreme values. This detects 2 problems (at least on a 64-bit machine): a result is not a valid MPFR number (mpfr_check fails) and the flags are incorrect. 2014-06-25 Vincent Lefèvre [tests/tsprintf.c] Fixed test added in r9099 (the problem was unrelated to the bug in vasprintf.c). [tests/tsprintf.c] Added a test with the minimum exponent (currently triggers an assertion failure in vasprintf.c). 2014-06-25 Paul Zimmermann define MPFR_SKIP_EXTREME to avoid currently failing tsum test 2014-06-25 Vincent Lefèvre [tests/tsum.c] Do not run the check_extreme test (which currently fails) when the MPFR_SKIP_EXTREME environment variable is defined. 2014-06-25 Paul Zimmermann reconfigure for mpfrbench speedup in mpfr_div for n/n division, using mpz_tdiv_q 2014-06-25 Vincent Lefèvre [tools/mpfrlint] Check when simple mp_limb_t constants could be used (MPFR_LIMB_ZERO, MPFR_LIMB_ONE, and MPFR_LIMB_MAX). Merged the latest changes from the trunk. Use MPFR_IS_NEG and MPFR_IS_POS instead of comparing the sign with 0. Done with perl -pi -e ' s/MPFR_SIGN *\(([^)]+)\) *<=? *0/MPFR_IS_NEG ($1)/g; s/MPFR_SIGN *\(([^)]+)\) *>=? *0/MPFR_IS_POS ($1)/g; ' {src,tests}/*.{c,h} and some manual changes. More code clean-up (for both consistency and readability): * Use the simple mp_limb_t constants when possible. * New internal macro MPFR_IS_NORMALIZED. Note: this was done with perl -pi -e ' s/~ *\(mp_limb_t\) *0/MPFR_LIMB_MAX/g; s/\(mp_limb_t\) *-1/MPFR_LIMB_MAX/g; s/\(mp_limb_t\) *0/MPFR_LIMB_ZERO/g; s/\(mp_limb_t\) *1L?/MPFR_LIMB_ONE/g' {src,tests}/*.{c,h} svn revert src/mpfr-impl.h and some manual changes. Code clean-up: * Simplified the definition of simple mp_limb_t constants: it is better to avoid GMP internals when there is a standard way. * Replaced the use of MP_LIMB_T_MAX by the new macro MPFR_LIMB_MAX. * So, removed the now useless MP_LIMB_T_MAX and GMP_LIMB_HIGHBIT definitions from "mpfr-gmp.h". [src/mpfr-mini-gmp.h] GMP_NUMB_MASK is no longer needed. [tests/random2.c] Removed a useless use of GMP_NUMB_MASK. [src/div.c] In the case where the divisor has one limb (latest commit), check that the value of this limb fits in an unsigned long, otherwise mpfr_div_ui cannot be used. Indeed, according to the GMP manual §2.2, a limb may be a long long (actually unsigned): For example in some 32-bit ABIs, GMP may support a limb as either a 32-bit `long' or a 64-bit `long long'. Note: if a limb is an unsigned long, this new test will be no-op, since always true. 2014-06-25 Paul Zimmermann speedup of mpfr_div when divisor has one limb 2014-06-25 Vincent Lefèvre [src/random_deviate.h] Fixed prototypes: * Added __MPFR_DECLSPEC to avoid failure with Windows DLL; see https://sympa.inria.fr/sympa/arc/mpfr/2014-06/msg00003.html * Added _MPFR_PROTO for consistency (though it will probably be removed in the near future). * Removed variable names (coding style). 2014-06-24 Vincent Lefèvre [tests] Added terandom_chisq and tnrandom_chisq to svn:ignore property. [tests] Applied patch by Charles Karney (chi-squared tests for mpfr_[ne]random), together with the contents of his mail about this patch. 2014-06-23 Vincent Lefèvre [doc/mpfr.texi] Updated the month. 2014-06-22 Vincent Lefèvre Updated URL's. [doc/README.dev] Updated URL's (use of https instead of http). 2014-06-20 Vincent Lefèvre [src/sum.c] At Step 2, ignore the input bits of exponent >= maxexp. [src/sum.c] Fixed maxexp2 update, and added truncflag for future truncation on the most significant part >= maxexp at Step 2 (TODO). 2014-06-19 Vincent Lefèvre [src/sum.c] Another major update concerning the algo and Step 2. [src/sum.c] Added a TODO about carry propagation (so, it seems that using two windows may not really be that interesting to guarantee a low complexity). 2014-06-17 Vincent Lefèvre [src/sum.c] Implemented Step 2. [tests/trandom_deviate.c] New version, with fixes of ternary value (inexact) handling by Charles Karney. [tests] Added trandom_deviate to svn:ignore property. [tests/trandom_deviate.c] GNU style and C90 compatibility. [doc/README.dev] Updated note about ternary values (macros). [doc/README.dev] Added a note about ternary values. 2014-06-17 Paul Zimmermann patches from Charles Karney 2014-06-17 Vincent Lefèvre [tests/trandom_deviate.c] Removed useless "#ifdef HAVE_STDARG": printf is a standard C function and is always defined. [tests/trandom_deviate.c] GNU style. Pre-C99 compatibility (statements after declarations). [tests/trandom_deviate.c] Untabified. 2014-06-16 Vincent Lefèvre [src/sum.c] Updated the algorithm and started to rewrite again, in a cleaner way and with more comments. 2014-06-16 Paul Zimmermann added trandom_deviate.c to improve coverage (contributed by Charles Karney) updated information about coverage test 2014-06-05 Vincent Lefèvre [src/mul.c] English usage in a comment. 2014-06-03 Vincent Lefèvre [tests/tset_ld.c] Updated a comment. 2014-05-22 Vincent Lefèvre Changed "INRIAGForge" to "InriaForge" (due to the rename). 2014-05-14 Vincent Lefèvre [doc/README.dev] Correction about clang sanitizer: mention the -fno-sanitize=float-cast-overflow,float-divide-by-zero option. [doc/README.dev] About clang sanitizer, mention the -fno-sanitize=float-divide-by-zero option. 2014-05-06 Paul Zimmermann added description of algorithm used for mpfr_log (from Sylvie Boldo) 2014-04-25 Vincent Lefèvre [doc/README.dev] Updated an old note about GCC 4.9. [doc/README.dev] Completed the note about GCC's sanitizer. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44786 (sanitizer) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60275 (no recover) [doc/README.dev] Completed the note about GCC's sanitizer. [doc/README.dev] Mention that GCC 4.9 supports "-fsanitize=undefined". 2014-04-22 Vincent Lefèvre [tests/tpow.c] Removed comment that can now be confusing: try_mpfr.html was actually not using the mpfr_pow function, but exp(y*log(x)). [tests/tpow.c] Added a test corresponding to buggy output on http://ex-cs.sist.ac.jp/~tkouya/try_mpfr.html but everything is OK in r9038. 2014-04-15 Vincent Lefèvre [doc/README.dev] Update about patches and autotools files. [doc/README.dev] Update about patches and autotools files. [tests/tsum.c] Changed initialization in check_extreme(), which wasn't supported by ISO C90. [free_cache.c] Avoid mixed declarations and code for ISO C90 support. Re-added configure test on GMP_NUMB_BITS and sizeof(mp_limb_t), and updated it: * BYTES_PER_MP_LIMB is no longer tested (see r9029). * The test is now always run, not just when --with-gmp-build is used. * Results are output in config.log in case of failure. * The error message has been updated. 2014-04-15 Paul Zimmermann BYTES_PER_MP_LIMB -> MPFR_BYTES_PER_MP_LIMB for GMP 6 compatibility when --with-gmp-build is used. See mailing-list discussion: https://sympa.inria.fr/sympa/arc/mpfr/2014-04/msg00000.html 2014-04-11 Vincent Lefèvre [src/sum.c] Updated comment to be even more clear, with more details. 2014-04-07 Vincent Lefèvre [src/sum.c] Updated comment. [src/sum.c] Updated comment. [src/sum.c] Improved (corrected) algo in comment. Code not updated. 2014-03-28 Vincent Lefèvre [src/sum.c] Update. [src/sum.c] Added a comment. [src/sum.c] Update. 2014-03-26 Vincent Lefèvre [src/sum.c] More thoughts about the algorithm and its implementation. 2014-03-26 Paul Zimmermann other argument reduction for log_ui 2014-03-25 Paul Zimmermann mpn_sqrtrem (rp, sp, sp, rrsize) is faster than mpn_sqrtrem (rp, NULL, sp, rrsize): avoids one allocation and one copy 2014-03-25 Vincent Lefèvre [src/sum.c] Update. Merged the latest changes from the trunk. Added MPFR_PREC_COND, MPFR_PREC_IN_RANGE and MPFR_GET_PREC internal macros (to mpfr-impl.h). Use these macros at some places in the code (replacing some MPFR_PREC instances, as suggested by a patch from Patrick Pélissier). [src/mpfr-impl.h] Added an MPFR_ASSERTD in MPFR_MPZ_SIZEINBASE2 (from a patch by Patrick Pélissier). [src/sqrt.c] Replaced a MPFR_EXP by MPFR_SET_EXP (from a patch by Patrick Pélissier). [src/div.c] Added MPFR_ASSERTD assertions and improved a test (patch from Patrick Pélissier). 2014-03-17 Paul Zimmermann fixed FIXME 2014-03-17 Vincent Lefèvre [doc/algorithms.*] A formula about radix conversion was incorrect (and didn't match the correct code) when the output radix b is a power of two. Added reference to Matula's "In-and-Out Conversions" (correctness and optimality of the formula) and left a FIXME. For more information, see the August/September discussion in the MPFR list, particular subthreads starting at: https://sympa.inria.fr/sympa/arc/mpfr/2012-08/msg00028.html https://sympa.inria.fr/sympa/arc/mpfr/2012-09/msg00000.html https://sympa.inria.fr/sympa/arc/mpfr/2012-09/msg00011.html 2014-03-15 Paul Zimmermann added item 2014-03-14 Paul Zimmermann added item (mpfr_log_ui) 2014-03-14 Vincent Lefèvre [src/sum.c] Corrected the detection of Inf. Improved algo in comment. [tests/tsum.c] Improved check_more_special test. [tests/tsum.c] Added check_more_special test. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Correction in the mpfr_set_str description. Rewrote special cases of mpfr_sum. 2014-03-10 Vincent Lefèvre Added a TODO item concerning gmp_op.c functions with mpz_srcptr and the use of mpz_fits_slong_p and a mpfr_*_si function (see r8992). 2014-03-02 Vincent Lefèvre [src/mpfr-impl.h] Fixed the mpfr_get_default_rounding_mode() macro for C++ (it didn't have the correct type), and improved the similar ones. [src/lngamma.c] Fixed allocation. [src/lngamma.c] Temporarily disabled fast argument reconstruction because it doesn't compile with g++. 2014-03-01 Vincent Lefèvre Removed trailing spaces. 2014-02-28 Paul Zimmermann [lngamma.c] implemented fast way of computing x*(x+1)*...*(x+k-1) (it remains to speed up the computation of the Bernoulli numbers) speedup of the mpfr_xxx_z functions when z fits in a long explicit possible speedup in mpfr_[ln]gamma 2014-02-24 Vincent Lefèvre [doc/algorithms.tex] Avoid inconsistent spaces. 2014-02-21 Vincent Lefèvre [tools/mbench/README] Conversion into UTF-8. [tools/mbench] Replaced GMP_RNDx by MPFR_RNDx. 2014-02-21 Paul Zimmermann definitively fix the name mpfr_min_prec 2014-02-17 Vincent Lefèvre [src/bernoulli.c] Minor bug fixed and other improvements. 2014-02-17 Paul Zimmermann update for mpfr_gamma and Bernoulli numbers 2014-02-17 Vincent Lefèvre [src/bernoulli.c] Fixed pointer types (build failure with -Werror). [src/mpfr-impl.h] Removed obsolete mpfr_bernoulli_internal prototype, which makes the compilation of bernoulli.c fail. [src/bernoulli.c] Improved isprime() by using MPFR_ASSERTD. 2014-02-17 Paul Zimmermann use a faster algorithm (based on Von Staudt–Clausen theorem) to compute Bernoulli numbers -> speedup in mpfr_*gamma and mpfr_li2 2014-02-16 Paul Zimmermann more changes suggested by Wolf Lammen (and also test 2^(-1074)) 2014-02-16 Vincent Lefèvre [tests/memory.c] Limit heap memory to 4 MB. This should be sufficient. Currently, only tsum should fail, but mpfr_sum will be rewritten soon. 2014-02-15 Vincent Lefèvre [src/set_d.c] Fixed type to avoid non-representable unsigned → signed conversion. [src/set_d.c] Correction when MPFR_WANT_ASSERT is defined. Untabified and removed trailing spaces. 2014-02-15 Paul Zimmermann partial patch from Wolf Lammen: - move the normalization code, necessary in an extremely rare corner case only, out of the way of the normal case, for speed up Rename MPFR gmp_randstate_ptr into mpfr_gmp_randstate_ptr (patch from Patrick Pélissier) 2014-02-14 Paul Zimmermann print message for "possibly double-double, little endian" long double format different fixes for set_ld, get_ld and cmd_ld with double-double 2014-02-14 Vincent Lefèvre [tests/tset_ld.c] Fixed an assertion to support systems where 2^1023 + 2^(-1074) is exactly representable, while not detected as double-double. 2014-02-14 Paul Zimmermann recognize long-double format for ppc64le (https://sympa.inria.fr/sympa/arc/mpfr/2014-02/msg00014.html) 2014-02-14 Vincent Lefèvre [TODO] Added item on special case of mpfr_add and mpfr_sub. 2014-02-14 Paul Zimmermann added test for get_ld 2014-02-14 Vincent Lefèvre [src/cache.c] * Improved r8966: Setting the cache size to 10% more than the requested precision may be a bad idea in large precisions. It's better to guarantee a minimum of 10% increase; if the user wants to, he can still control the maximum precision by pre-computing the constant at this precision. Also make sure that if pold == 0, the mpfr_init2 size is the same as the mpfr_set_prec one (in order to avoid immediate reallocation). * Replaced a comment by a couple of MPFR_ASSERTD's. 2014-02-13 Paul Zimmermann when recomputing a constant, use a precision 10% larger than the wanted precision to avoid many recomputations 2014-02-13 Vincent Lefèvre [src/round_raw_generic.c] Added a FIXME comment for MPFR_RNDNA. [src/bernoulli.c] GNU style. [src/mpfr-impl.h] Corrected prototypes. 2014-02-13 Paul Zimmermann implement cache for Bernoulli numbers (patch from Patrick Pélissier) tuned parameters for [ln]gamma now that we cache Bernoulli numbers added bench target so that we can simply do "make bench" 2014-02-12 Paul Zimmermann added test for double-double added comment about mpfr_gamma forgot to restore the exponents in last commit added reference for efficiency issue with mpfr_gamma improve mpfr_gamma at around 1000 bits 2014-02-12 Vincent Lefèvre [doc/mpfr.texi] Updated the month. Merged the set_exp branch into the trunk. Changes: * src/mpfr-impl.h: updated the MPFR_SET_EXP(x, exp) definition for the MPFR_EXP_CHECK case. There are 2 consequences: 1. The exp expression is evaluated several times (this should be OK with the MPFR code and optimizations). 2. The real value of exp is tested for the assertion, instead of the value converted to mpfr_exp_t. Thus new bugs could be found (e.g. when an unsigned type is used instead of signed). * src/set_exp.c: set the exponent only if x is a non-zero ordinary number, i.e. already has a valid significand and a valid exponent (thus it is no longer a low-level function, and it can no longer generate an invalid value from a valid one). * doc/mpfr.texi: updated mpfr_set_exp description and added an item in the "API Compatibility / Changed Functions" section. * Clean-up. Original discussion: https://sympa.inria.fr/sympa/arc/mpfr/2011-01/msg00092.html [src/rint.c] Added FIXME comment. [src/next.c] Improved handling of special values. [src/hypot.c] Reverted changeset r8950 (MPFR_SET_EXP is OK). [src/hypot.c] Replaced a MPFR_SET_EXP by MPFR_EXP. [src/fpif.c] Bug fixes and code clean-up. At the same time, took the future mpfr_set_exp change into account (see set_exp branch). [src/set.c] Cosmetic change. [src/fpif.c] English usage. [src/cache.c] Replaced a MPFR_SET_EXP by MPFR_EXP (in practice, the code was working, but just because MPFR_DECL_INIT_CACHE inits the cache with a real exponent, though the significand pointer is null). 2014-02-11 Vincent Lefèvre [src/mul.c] Cosmetic change. [src/atan.c] Fixed types of some variables, in particular unsigned → signed conversion of non-representable value (detected due to the new MPFR_SET_EXP assertion check in the set_exp branch). [src/atan.c] Fixed types of some variables, in particular unsigned → signed conversion of non-representable value. Now, all the tests pass on Linux/x86_64. [src/exp3.c] Fixed types of some variables, in particular unsigned → signed conversion of non-representable value (detected due to the new MPFR_SET_EXP assertion check in the set_exp branch). [src/exp3.c] Fixed types of some variables, in particular unsigned → signed conversion of non-representable value. Now, 161 tests pass and 8 tests fail on Linux/x86_64. [src/{set_ui_2exp.c,set_uj.c}] Fixed types of some variables, in particular unsigned → signed conversion of non-representable value under some conditions. [src/{set_ui_2exp.c,set_uj.c}] Fixed types of some variables, in particular unsigned → signed conversion of non-representable value under some conditions. This doesn't change the number of failed tests. [src/{sqrt_ui.c,sub_ui.c,ui_div.c,ui_sub.c}] Changed cnt type from unsigned long to int (signed) due to the MPFR_SET_EXP requirement. Otherwise the code was correct. Now, 160 tests pass and 9 tests fail on Linux/x86_64. [src/mpfr-impl.h] Added a comment about MPFR_SET_EXP: exp is required to have a signed type. [src/{set_d.c,set_f.c}] Type clean-up to improve maintainability. [src/random_deviate.c] Type clean-up to improve maintainability. [src/set_si_2exp.c] Fixed unsigned → signed conversion of non-representable value when mpfr_exp_t has the same size as int. [src/set_si_2exp.c] Fixed unsigned → signed conversion of non-representable value when mpfr_exp_t has the same size as int (unrelated to MPFR_SET_EXP change). [src/add_ui.c] Cosmetic changes. [src/add_ui.c] Fixed unsigned → signed conversion of non-representable value (detected due to the new MPFR_SET_EXP assertion check in the set_exp branch). [src/add_ui.c] Fixed unsigned → signed conversion of non-representable value (detected due to the new MPFR_SET_EXP assertion check). Now, 92 tests pass and 77 tests fail on Linux/x86_64. [src/random_deviate.c] Added an assertion. [tests/random2.c] Fixed unsigned → signed conversion of non-representable value (detected due to the new MPFR_SET_EXP assertion check in the set_exp branch). [tests/random2.c] Fixed unsigned → signed conversion of non-representable value (detected due to the new MPFR_SET_EXP assertion check). Now, 87 tests pass and 82 tests fail on Linux/x86_64. Updated src/urandomb.c due to the change of mpfr_set_exp behavior. Now, 77 tests pass and 92 tests fail on Linux/x86_64. [tests/trandom.c] Improved test to get an assertion failure instead of a segmentation fault. Start of mpfr_set_exp behavior clean-up. * src/mpfr-impl.h: updated the MPFR_SET_EXP(x, exp) definition for the MPFR_EXP_CHECK case. There are 2 consequences: 1. The exp expression is evaluated several times (this should be OK with the MPFR code and optimizations). 2. The real value of exp is tested for the assertion, instead of the value converted to mpfr_exp_t. Thus new bugs can be found (e.g. when an unsigned type is used instead of signed). * src/set_exp.c: set the exponent only if x is a non-zero ordinary number, i.e. already has a valid significand and a valid exponent (thus it is no longer a low-level function, and it can no longer generate an invalid value from a valid one). * doc/mpfr.texi: updated mpfr_set_exp description and added an item in the "API Compatibility / Changed Functions" section. Currently 73 tests pass and 96 fail on Linux/x86_64, either due to bugs or due to code not yet updated for this change. Set svn:ignore property on the tools/bench directory. 2014-02-06 Vincent Lefèvre [src/set_ld.c] Added a note about the test for infinity. 2014-02-05 Paul Zimmermann make -> make mpfrbench 2014-02-05 Vincent Lefèvre Removed MPFR_CHECK_MAX as it is now useless: all "max" tests succeed. [src/lngamma.c] Fixed bug introduced in the latest change r8917 (inexact was not initialized in the case compared < 0). 2014-02-04 Paul Zimmermann added code for large inputs in lngamma/lgamma 2014-02-04 Vincent Lefèvre [TODO] Suggest timing-based thresholds for asymptotic expansions. 2014-02-04 Paul Zimmermann use asymptotic expansion for large positive argument 2014-01-30 Paul Zimmermann tiny change to distinguish different versions of the manual 2014-01-29 Vincent Lefèvre [src] Add constants: * __gmpfr_mone = -1 * mpfr_const_log2_RNDD = log(2) rounded down in precision 64 bits * mpfr_const_log2_RNDU = log(2) rounded up in precision 64 bits (modified patch from Patrick Pélissier). 2014-01-29 Paul Zimmermann added reference 2014-01-29 Vincent Lefèvre [src] mpz_t caching (modified patch by Patrick Pélissier). [src/const_pi.c] Rewrote a condition to avoid a potential integer overflow (?) and match a comment. [src/const_pi.c] Use of GROUP allocation and minor optimization (modified patch by Patrick Pélissier). 2014-01-28 Vincent Lefèvre [TODO] Added a note about "rounding to odd" / "sticky rounding". 2014-01-27 Vincent Lefèvre [tools/mpfrlint] Run-time assertions concerning relations between the MPFR exponent type and the long type are allowed (see r8896). 2014-01-26 Vincent Lefèvre [tests/mpf_compat.h] In MPFR mode, skip the tests when mpfr_exp_t is not a long. [tests/tset_ld.c] Fixed printf argument. [tests/tgamma.c] Fixed printf argument (bug detected with _MPFR_EXP_FORMAT=2 and -Werror=format=). [tools/bench/mpfrbench.c] No longer use the numberof macro, and #include "mpfr.h" instead of "mpfr-impl.h", so that mpfrbench.c can now be linked against an installed MPFR library. 2014-01-24 Vincent Lefèvre Added MPFR_CHECK_GMP configure check. Useful if the user provides --with-gmp with a directory containing a GMP version that doesn't have the correct ABI: the previous tests won't trigger the error if the same GMP version with the right ABI is installed on the system, as this library is automatically selected by the linker, while the header (which depends on the ABI) of the --with-gmp include directory is used. Before this test, one was getting an error in MPFR_CHECK_DBL2INT_BUG, though the error is not related to a double-to-integer conversion bug. [src/mpfr-impl.h] Corrections for the case _MPFR_EXP_FORMAT == 4: * No longer use MPFR_EXP_MIN and MPFR_EXP_MAX unconditionally in a #if directive, since if MPFR_HAVE_INTMAX_MAX is not defined, the compilation fails. The test was not really useful anyway: if one really wants mpfr_eexp_t to be long int if mpfr_exp_t has the same range as long int, then _MPFR_EXP_FORMAT == 3 is sufficient (and this is the default). * Removed a test that should be always true due to the previous inclusion of mpfr.h (intmax_t has already been used there in the case _MPFR_EXP_FORMAT == 4). [doc/README.dev] Rephrased paragraph added in r8897. [doc/README.dev] Added a note for Automake 1.13+ and failed tests. [src] Replaced some MPFR_ASSERTN's by MPFR_STAT_STATIC_ASSERT (from the detection by mpfrlint). Note: the MPFR_ASSERTN's concerning relations between the MPFR exponent type and the long type have not been replaced because these tests may fail with the non-standard _MPFR_EXP_FORMAT = 4 on some platforms (e.g. 32-bit ones), and we still want to be able to build MPFR in this case in order to test it; this needs to be fixed. [tools/mpfrlint] Constant checking in assertions. [src/mpfr-mini-gmp.c] Use lower case for function parameters. 2014-01-24 Paul Zimmermann re-enable assertions (patch from Patrick Pélissier) removed an MPFR_LIKELY that is not so likely... 2014-01-24 Vincent Lefèvre Optimization: likely / unlikely, etc. (patch by Patrick Pélissier). Coding style. [tune/tuneup.c] Fix compilation error due to static assertion being wrong (patch by Patrick Pélissier). [src/const_log2.c] Optimization by using GROUP allocation (patch by Patrick Pélissier). [src/exp_2.c] Optimization: Increase the initial estimate of the number of iterations (patch by Patrick Pélissier). [src/erfc.c] Use of static assertion instead of run time assertion (patch by Patrick Pélissier). [src/sum.c] Removed trailing spaces. [src/sin_cos.c] Optimization: use of MPFR_MPZ_SIZEINBASE2, GROUP allocation, and MPFR_ALIAS (modified patch by Patrick Pélissier). [tools/mbench/mfv5-libc.cc] Fix warning when compiling with recent GCC due to unused but set variable (patch by Patrick Pélissier). 2014-01-23 Paul Zimmermann revert to EXTRA_PROGRAMS (bin_PROGRAMS is installed in /usr/local/bin, which is not what we want, we could use noinst_PROGRAMS, which would be compiled automatically, but for coherence with GNU MPC we use EXTRA_PROGRAMS which is not compiled automatically) divide the global score to get a number around 1000 added reference gnu style 2014-01-23 Vincent Lefèvre Added libtool-tcc-wl.patch patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=663945#46 to add tcc support to libtool 2.4.2 and below. In doc/README.dev, documented how to use this patch (before a release). [tests/tadd.c] Added check_extreme test (huge + tiny). [tests/tsum.c] Added check_extreme test (same test as in tadd.c, but with mpfr_sum instead of mpfr_add), and temporarily disabled the cancel test. Use of the numberof macro. [tools/bench/mpfrbench.c] Whitespace clean-up. [src/const_euler.c] Removed trailing spaces. [tools/bench/Makefile.am] Fix for separate build directory (problem detected with "make distcheck"). [src/sum.c] Updated comment. [src/sum.c] Updated comment. [src/sum.c] Added a possible algorithm in comment. [src/sum.c] Added FIXME comment. 2014-01-22 Paul Zimmermann missing space Mickaël is the only author of MPFRbench updated authors and contributors new code for Euler's constant (contributed by Fredrik Johansson) added subdir tools/bench added MPFRbench added MPFRbench make mpfrbench compiled just with "make" changes for MPFRbench new directory for MPFRbench (contributed by Mickaël Gastineau and Bill Hart) 2014-01-22 Vincent Lefèvre [tests/tsum.c] Added a comment about the cancellation test. [tests/tsum.c] In the cancellation test, do a random permutation. 2014-01-22 Paul Zimmermann mention sponsors 2014-01-22 Vincent Lefèvre [tests/tsum.c] In the cancellation test: reduced the number of tests; output debug information when building with -DDEBUG. [tests/tsum.c] Added simple cancellation test. [tests/tests.c] Fixed tests_default_random in case mpfr_exp_t > long. [doc/mpfr.texi] Improved mpfr_sum description. [src/sum.c] Do not use bitwise operations on values that can be negative. Added comments about what the functions do. 2014-01-22 Paul Zimmermann fixed regression noticed by Patrick Pelissier with --enable-gmp-internals 2014-01-22 Vincent Lefèvre [tests/tests.c] Fixed bug in test_version() introduced in r8821. [src/lngamma.c] Fixed divide-by-zero flag for negative integers. [tests/tlngamma.c] Test the flags for some special values. Clean-up. 2014-01-22 Paul Zimmermann removed two items done 2014-01-21 Vincent Lefèvre [src/{exp.c,exp_2.c}] mpfr_exp optimization (modified patch by Patrick Pélissier). [src/round_prec.c] Added a note about the reallocation. LIKELY some code. [src/lngamma.c] Fixed mpfr_lngamma behavior on nonpositive integers and -Inf. [doc/mpfr.texi] Updated the documentation on the general rules for special values and on mpfr_lngamma. [tests/tlngamma.c] Update. See (behavior of mpfr_lngamma on zero and general rule for such limits). [acinclude.m4,configure.ac] Check that a directory passed to a --with-gmp* configure option exists and doesn't contain any space, and canonicalize the name if the realpath utility is available (patch by Patrick Pélissier). [src/mul.c] Optimization (modified patch by Patrick Pélissier). [src] Added support for MPFR_PURE_FUNCTION_ATTR, MPFR_HOT_FUNCTION_ATTR, and MPFR_COLD_FUNCTION_ATTR, and fixed some LIKELY/UNLIKELY conditions (modified patch by Patrick Pélissier). [src/*.c] Replaced mpfr_set_divby0 by the faster MPFR_SET_DIVBY0, and so on (except for src/exceptions.c). [tools/mpfrlint] Update for flags related functions: check that the macros are used in src (except for exceptions.c and mpfr.h) instead of the functions. [src/mpfr-impl.h] Removed some useless parentheses in comments, for mpfrlint. 2014-01-21 Paul Zimmermann added more detail in case of error 2014-01-21 Vincent Lefèvre [src/mpfr-impl.h] Added MPFR_SET_* macros to set flags efficiently. Small mpfr_erf improvement (modified patch by Patrick Pélissier). [src/mpfr-gmp.h] TMP_FREE optimization as tmp_marker is often null (based on a patch by Patrick Pélissier). [configure.ac] --enable-mini-gmp message: fixed layout; experimental. [NEWS] Mini-gmp support is experimental. [NEWS] Mention the new --enable-mini-gmp configure option. [NEWS] Mini-gmp support. [NEWS] MPFR now depends on GMP 4.2+. Dropped K&R C compatibility. [NEWS] Better Automake 1.13 support. Merged the vl-am113 branch: test suite improvement with Automake 1.13. * Moved GMP version check from tversion.c to the test_version() function of tests.c, so that this check is done in every test. This function now returns an int, as there are now 3 cases: 1. An error in MPFR version check is a fatal error: test_version() exits with an error (exit status = 1). 2. An error in GMP version check is a non-fatal error: if there are no errors in MPFR version check, test_version() returns with value 1. 3. Otherwise test_version() returns with value 0 (everything is fine). * tversion.c still runs test_version(), but fails if this function returns with an error, i.e. any error is fatal for this test. Note: for the other tests, one just has a message in the output in case of GMP version mismatch. * mpfr-test.h: updated test_version() prototype. * Makefile.am: removed the second tversion invocation, and output the contents of tversion.log if this file exists (typically with Automake 1.13+, for which one no longer gets tversion output by default). [tests/Makefile.am] Removed obsolete comment. 2014-01-20 Vincent Lefèvre Dropped obsolete __gmp_const (replaced by const). [TODO] Removed mini-gmp support: done. Small mpfr_exp improvement (modified patch by Patrick Pélissier). [tools/mbench] Patch by Patrick Pélissier: import base support, corei7 support, build fix (with MPFR 3.1+). 2014-01-20 Paul Zimmermann come back to revision 8723 which was faster (measured with tools/mbench/mfv5 on 53 and 1024 bits). The reason is that the "new" version had overhead for mpfr_round_p (about 40 cycles on Core 2) and mpfr_set (about 98 cycles for 53 bits, and 132 cycles for 1024 bits) 2014-01-20 Vincent Lefèvre Added __builtin_unreachable / MPFR_ASSUME support (modified patch from Patrick Pélissier). MPFR now depends on GMP 4.2+ instead of 4.1+. GMP 4.2 compatibility fixed. Code clean-up. (Modified patch from Patrick Pélissier) [src/fms.c] Coding style. [src/fma.c] Changed mp_prec_t to mpfr_prec_t. 2014-01-20 Paul Zimmermann added mpfr_fma 2014-01-20 Vincent Lefèvre [tests/tests.c] Output a \n between two error messages when need be. 2014-01-20 Paul Zimmermann speed up mpfr_fma [common work with Jeroen Demeyer] 2014-01-20 Vincent Lefèvre [tests] * Moved GMP version check from tversion.c to the test_version() function of tests.c, so that this check is done in every test. This function now returns an int, as there are now 3 cases: 1. An error in MPFR version check is a fatal error: test_version() exits with an error (exit status = 1). 2. An error in GMP version check is a non-fatal error: if there are no errors in MPFR version check, test_version() returns with value 1. 3. Otherwise test_version() returns with value 0 (everything is fine). * tversion.c still runs test_version(), but fails if this function returns with an error, i.e. any error is fatal for this test. Note: for the other tests, one just has a message in the output in case of GMP version mismatch. * mpfr-test.h: updated test_version() prototype. * Makefile.am: removed the second tversion invocation. [tests/Makefile.am] Output the contents of tversion.log if this file exists (typically with Automake 1.13+, for which one no longer gets tversion output by default). 2014-01-20 Paul Zimmermann simplified the fms code (joint work with Jeroen Demeyer) fixed bug in mpfr_exp_3, and memory leak in texp 2014-01-20 Vincent Lefèvre [src/li2.c] Use MPFR_RET_NEVER_GO_HERE () instead of MPFR_ASSERTN (0) to avoid an error with: ./configure --enable-logging CFLAGS="-Werror=return-type"; make [src/mpfr-impl.h] Updated comment of the MPFR_RET_NEVER_GO_HERE macro. 2014-01-20 Paul Zimmermann added new test that currently fails (found with mini-gmp) 2014-01-18 Vincent Lefèvre Spelling consistency: non-negative → nonnegative non-positive → nonpositive [doc/README.dev] More on exponent handling. [tests/tset_str.c] Fixed and improved a mpfr_set_str_binary random test. Some code clean-up. [tests/tset_str.c] Removed useless and confusing cast. [src/set_d.c] Improved a comment about signed zeros. 2014-01-18 Paul Zimmermann fixed memory leak instructions to compile MPFR with mini-gmp disable those tests for mini-gmp fixed test which might produce subnormal numbers disable two tests that depend on the random generator followup from previous commit: 1^Inf is special too fixed issue for n^x with x=Inf when the random number n is 0 fixed issue when x=0 and y=Inf (or converse) fixed issue when x=0 and y=Inf (or converse) fixed bug in test file 2014-01-18 Vincent Lefèvre [src/set_d.c] Fixes and other minor changes suggested by Wolf Lammen: https://sympa.inria.fr/sympa/arc/mpfr/2014-01/msg00007.html [src/set_d.c] In extract_double, replaced long by int for exp (it may be faster, and shouldn't be slower as it is more restrictive than long). [src/set_d.c] Removed obsolete comment from r245. [src/set_d.c] Renamed __gmpfr_extract_double to extract_double (this is just a static function). [src/set_d.c] Fixed __gmpfr_extract_double precondition on d. Bug found by Wolf Lammen: https://sympa.inria.fr/sympa/arc/mpfr/2014-01/msg00007.html 2014-01-18 Paul Zimmermann more progress with mini-gmp: ======================= 9 of 157 tests failed (13 tests were not run) ======================= 2014-01-18 Vincent Lefèvre [tests/{ty0,ty1}.c] Reduce emax for the generic tests. 2014-01-17 Vincent Lefèvre [src/lngamma.c] FIXME: proposed method for overflow detection. [src/lngamma.c] Minor improvements. 2014-01-17 Paul Zimmermann missing \n missing \n missing \n in error messages missing \n in error messages 2014-01-17 Vincent Lefèvre [src/lngamma.c] Added a MPFR_LOG_FUNC. [src/digamma.c] FIXME: for x large, use the asymptotic expansion. [src/digamma.c] Added 2 MPFR_LOG_FUNC's. [tests/tgeneric.c] Fixed bug found by PZ: code introduced in r4538 to test the maximum (in absolute value) positive and negative arguments was buggy, as only the negative one was tested. → This makes some tests fail on the maximum positive argument. 2014-01-17 Paul Zimmermann some progress with mini-gmp: ======================= 34 of 157 tests failed (13 tests were not run) ======================= mpn_copyd (rp, sp, n) should be used when rp >= sp fixed bug which could appear with probability 1/2^32 or 1/2^64 2014-01-17 Vincent Lefèvre [src/mpfr-mini-gmp.c] Removed trailing spaces. [tools/mpfrlint] Update due to the mini-gmp support (r8753). [tests] Various fixes for r8753. [src/mpfr.h] Indentation. [src/mpfr-impl.h] Indentation. Avoid an empty translation unit (see ISO C99, 6.9). Some errors could be triggered with "gcc -std=c99 -pedantic-errors". 2014-01-17 Paul Zimmermann more progress for the mini-gmp interface 2014-01-16 Paul Zimmermann added two new files for mini-gmp interface first step towards making MPFR compile with --enable-mini-gmp, so far make succeeds and all tests compile, but many tests fail, will investigate later 2014-01-16 Vincent Lefèvre [src/get_z_exp.c] Added an assert for security in case the precision is large, but the error should be handled properly (to be discussed). Note: there are still corrupt memory problems when the precision is large enough but below the mpz limit (a bug in GMP?). Note [VL, 2014-01-17]: these problems are due to an integer overflow in mpz/clear.c of GMP 5.1.3; I've reported the bug here: https://gmplib.org/list-archives/gmp-bugs/2014-January/003321.html [src/get_z_exp.c] Avoid a potential overflow. [src/extract.c] Type clean-up with 2 bug fixes (these bugs should have no effect on most platforms without too aggressive optimizations). 2014-01-16 Paul Zimmermann replaced function _mpz_realloc by preferred one mpz_realloc2 2014-01-16 Vincent Lefèvre [TODO] Added mini-gmp support. 2014-01-15 Vincent Lefèvre [NEWS] Mention speed improvement with --enable-assert[=full] and GCC (due to the fix in r8746). 2014-01-14 Vincent Lefèvre [src/mpfr-impl.h] Fixed the MPFR_ASSERTN macro as suggested by Wolf Lammen: https://sympa.inria.fr/sympa/arc/mpfr/2014-01/msg00002.html Note: the semantics doesn't change, it should just be more efficient. 2014-01-12 Vincent Lefèvre [tests/tset_ld.c] Output MPFR_LDBL_MANT_DIG in some failure case. 2014-01-11 Vincent Lefèvre [tests/tset_d.c] More information in a failed test. 2014-01-10 Vincent Lefèvre [tests/Makefile.am] In LOADLIBES, replaced $(INCLUDES) by $(AM_CPPFLAGS) (this should have been done at the same time as r8364). 2014-01-09 Vincent Lefèvre [doc/README.dev] "To make a release" update. In particular at step 5, replaced "make dist" by "make distcheck" so that some problems can be detected at step 5 instead of step 6, ensuring that the tarballs are complete. [src/Makefile.am] Forgot to add mpfr-cvers.h in r8739. When static assertions are not supported by the C implementation natively (new C11 feature), their MPFR implementation got broken by changeset r8625, as the __MPFR_GNUC macro in mpfr-sassert.h was not defined in the configure test (since mpfr-impl.h wasn't included) and generated an error, disabling the static assertions support. This is fixed by the following changes, avoiding code duplication and thus risk of inconsistencies in future modification: * copied some of the version detection macros from mpfr-impl.h to a standalone file mpfr-cvers.h, and updated the macros; * in mpfr-impl.h, replaced these macros by a #include "mpfr-cvers.h" and updated a comment; * in mpfr-sassert.h, added a #include "mpfr-cvers.h". [acinclude.m4] In the Static Assertions test, avoid a warning with GCC and added comments. 2014-01-07 Vincent Lefèvre ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". [tools/mpfrlint] Use codespell if available. [TODO] Fixed a misspelling, using codespell. Fixed misspellings, using codespell. 2014-01-06 Vincent Lefèvre [TODO] Added item: new functions of IEEE 754-2008 / C binding draft. 2014-01-05 Vincent Lefèvre [doc/README.dev] "To make a release": added a paragraph about warnings. [tests/trint.c] Avoid a warning. [acinclude.m4] Avoid a warning due to variable set but not used in a test, making the test fail with gcc -Werror=unused-but-set-variable. [acinclude.m4] Replaced "main()" by "main (void)". 2014-01-04 Vincent Lefèvre [doc/mpfr.texi] Updated the month. 2014-01-03 Vincent Lefèvre Fixed warnings from GCC's -Wold-style-declaration option: MPFR_THREAD_ATTR must be at beginning of declaration. Copyright notice update: added 2014 with perl -pi -e 's/ (\d{4}-)?(2013)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh (the tools/mbench directory was not modified). Removed 2013 from the example in the doc/README.dev file. 2013-12-17 Paul Zimmermann work around for bug in mpn_set_str (https://gmplib.org/list-archives/gmp-bugs/2013-December/003267.html) 2013-12-12 Vincent Lefèvre Added tools/repl-variadic Perl script to replace the variadic functions mpfr_clears, mpfr_inits and mpfr_inits2, in case they are not supported by the compiler. 2013-11-28 Vincent Lefèvre [tests/tstckintc.c] Improved tests when mpfr_custom_init_set is used as a macro (i.e. without parentheses) to trigger the bug fixed in r8715. [src/mpfr.h] Fixed bug in the mpfr_custom_init_set macro (typo in variable name, which can yield incorrect behavior if the second argument is not a simple expression). Thanks to Andreas Enge for the bug report: https://sympa.inria.fr/sympa/arc/mpfr/2013-11/msg00029.html 2013-11-21 Vincent Lefèvre [src/lngamma.c] No longer declare B as initialized with GCC (see r5534), as the "may be used uninitialized" warning no longer occurs with latest GCC: trunk revision 203899 (Debian 20131021-1), for the future GCC 4.9. The warning still occurs with GCC 4.8.2 (Debian 4.8.2-1): $ gcc-4.8 -O2 -Wall -c gamma.c In file included from gamma.c:27:0: gamma.c: In function ‘mpfr_gamma’: lngamma.c:468:17: warning: ‘B’ may be used uninitialized in this function [-Wmaybe-uninitialized] B = mpfr_bernoulli_internal (B, m); /* B[2m]*(2m+1)!, exact */ ^ lngamma.c:165:10: note: ‘B’ was declared here mpz_t *B; ^ Note: with GCC 4.8.2, at least -O is needed to reproduce the warning, and -Wmaybe-uninitialized without -Wuninitialized (or -Wall) doesn't trigger the warning. 2013-11-15 Paul Zimmermann added -Wlogical-op 2013-11-15 Vincent Lefèvre [tests/tsprintf.c] Added a few tests. [doc/README.dev] This may seem obvious, but this is not the first time this happens: + "When adding the expected result, do NOT use the one obtained from the MPFR function! Otherwise, if this function is buggy, the test will be wrong and the function will remain buggy." [tests/tsprintf.c] Fixed incorrect test from r5652 (the corresponding bug in src/vasprintf.c has been fixed in r8705). 2013-11-14 Paul Zimmermann fixed bug reported by David Binderman (https://sympa.inria.fr/sympa/arc/mpfr/2013-11/msg00009.html) 2013-11-06 Vincent Lefèvre [tests/thypot.c] More NaN tests. 2013-11-06 Philippe Théveny [tests/thypot.c] Fix use of a non explicitly initialized variable. 2013-11-04 Paul Zimmermann [sum.c] the call to mpfr_can_round was obviously wrong 2013-11-04 Vincent Lefèvre [tests/tsum.c] Updated TODO comment (→ check underflows). 2013-11-04 Paul Zimmermann [sum.c] mpfr_sum should consider the maximal precision of its inputs/output 2013-10-28 Vincent Lefèvre [tests/tsum.c] Added a TODO comment: add generic random test with cancellations, and tests with intermediate overflows. [tests/tsum.c] Added test for bug reported by Joseph S. Myers: https://sympa.inria.fr/sympa/arc/mpfr/2013-10/msg00015.html 2013-09-27 Vincent Lefèvre [doc/mpfr.texi] Added an example for mpfr_fits_*, corresponding to the bug fixed in r8503. [src/mpfr-impl.h] Document that DOUBLE_ISNAN(x) is valid on long double. [tests/tset_ld.c] In Isnan_ld, do not convert the long double argument to double, as this can give an overflow and unexpected behavior without default IEEE 754 behavior. With this change, this tset_ld test no longer fails with "clang -O2 -fsanitize=undefined -fno-sanitize-recover". [tests/tset_ld.c] Avoid a division by zero if MPFR_ERRDIVZERO. [tests/tset_ld.c] Move tests_start_mpfr call earlier. [tests/tget_flt.c] Corrections when MPFR_ERRDIVZERO is defined. [src/mpfr-impl.h] With clang, disable division by zero using constants due to a bug in its sanitizer and because IEEE 754 division by zero is currently not properly supported. With this change, the tget_d test no longer fails with: clang -O2 -fsanitize=undefined -fno-sanitize-recover 2013-09-26 Vincent Lefèvre [tests/tget_flt.c] Protect a division by 0. 2013-09-17 Vincent Lefèvre [src/Makefile.am] Updated -version-info to 6:0:2 for MPFR 3.2.0. 2013-09-16 Vincent Lefèvre [NEWS] For MPFR 3.2: The --enable-decimal-float configure option no longer requires --with-gmp-build (see r8402). 2013-09-15 Vincent Lefèvre [configure.ac] Detect broken _Decimal64 support on powerpc64 with the mode32 ABI. [tests/tget_set_d64.c] More meaningful messages in check_inf_nan. [tests/tget_set_d64.c] More meaningful messages in check_inf_nan after failures on powerpc64 with the mode32 ABI. 2013-09-04 Vincent Lefèvre [TODO] Added: implement optional cache sharing between threads. 2013-09-02 Vincent Lefèvre [doc/mpfr.texi] Changed node name "Integer Related Functions" to "Integer and Remainder Related Functions", as the corresponding section title was changed in r4867. Added associated @cindex. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Specified special values (in particular the sign of 0) for Section 5.10 "Integer and Remainder Related Functions". [src/round_raw_generic.c] Support MPFR_RNDNA for this class of functions at the request of John P. Hartmann (to support one of IBM's High Level Assembler rounding mode for hexadecimal floating-point constants). [src/round_raw_generic.c] Code simplification / comment corrections. 2013-08-26 Vincent Lefèvre [doc/README.dev] About clang sanitizer, mention -fno-sanitize-recover for more visibility in automated tests. 2013-08-23 Vincent Lefèvre [src/ai.c] Moved the handling of the special cases NaN and ±Inf to the main function mpfr_ai. [src/agm.c] Corrected a comment. [tests/tagm.c] Added tests concerning special values, in particular (zero,negative) and symmetric tests. [doc/mpfr.texi] Corrected mpfr_agm description. 2013-08-21 Vincent Lefèvre [TODO] Revisit the conversion functions between a MPFR number and a native floating-point value. 2013-08-19 Vincent Lefèvre [doc] Added mpfr.t2d and mpfr.t2p to svn:ignore property. Note: These directories are now generated when using "make mpfr.dvi" and "make mpfr.pdf". This comes from a change in Automake 1.13 (see its 2012-06-20 changelog) for the texi2dvi and texi2pdf invocations. 2013-08-10 Vincent Lefèvre [doc/README.dev] Before release, test with gcc -mpc64 under Linux/x86. 2013-08-08 Paul Zimmermann [tversion.c] added GCC version [tset_ld.c] try to fix a bug on i686-freebsd (see http://hydra.nixos.org/build/5665961/log/raw) [tset_ld.c] added debug information 2013-08-07 Vincent Lefèvre [tests/tset_ld.c] Reverted changeset r8657 as %a is C99-only. Moreover the memory representation already gives the necessary information (and the decimal output was correct on the machine where the test fails). 2013-08-07 Paul Zimmermann [tset_ld.c] maybe this will fix the issue for i686-freebsd? Cf http://hydra.nixos.org/build/5662697. [tset_ld.c] in case of error, print d in hexadecimal 2013-08-07 Vincent Lefèvre [tests/tset_ld.c] In the "mpfr_set_ld should be exact" error, output the memory representation of d. 2013-08-07 Paul Zimmermann [tset_ld.c] print value of MPFR_LDBL_MANT_DIG in case of error 2013-08-07 Vincent Lefèvre [doc/mpfr.texi] Space consistency. 2013-08-06 Vincent Lefèvre [tests/tset_ld.c] Corrected a comment. [tests/tset_ld.c] Set some long double variables as volatile in order to avoid optimizations that yield failures with xlc on power7 (not tested). [src/get_ld.c] Oops... The non-working code was due to a missing cast. So, simplified the code. [acinclude.m4] Define HAVE_LDOUBLE_MAYBE_DOUBLE_DOUBLE if the "long double" format seems to be double-double (e.g. on PowerPC). [src/get_ld.c] Added double-double support. 2013-08-05 Vincent Lefèvre [src/get_ld.c] GNU style. [tests/tset_ld.c] Improved output in case of error. [tests/tset_ld.c] Improved check_set_get() test function; in particular, it no longer takes a mpfr_t argument: the precision of the MPFR number is now determined dynamically from the long double d. Thus some numbers having a precision > MPFR_LDBL_MANT_DIG in double-double arithmetic are now tested (e.g. on PowerPC). [doc/mpfr.texi] "correctly-rounded" → "correctly rounded" (see rule on https://en.wikipedia.org/wiki/Wikipedia:HYPHEN#Hyphens and the IEEE 754 and ISO C standards don't use a hyphen either). [doc/mpfr.texi] Added missing @code{}'s in mpfr_fpif_import description. [doc/mpfr.texi] Replaced periods ending a sentence by "@." in the following cases: when the preceding character is a capital letter or a closing parenthesis following a capital letter (e.g. "NaN.", "MPFR.", "MPFR).", etc). This is needed to get correct spacing in the generated .info and PDF files with the next sentence of the paragraph (when there is one). [tests/tset_ld.c] Removed the "check largest 2^k that is representable as a long double" test based on macros LDBL_MAX and LDBL_EPSILON, which are not correct in some C implementations. There is already another "check the largest power of two" test, based on a loop, which is OK. 2013-08-04 Paul Zimmermann [tset_ld.c] improve tests to avoid spurious errors for double-double representation where MPFR_LDBL_MANT_DIG=106 and numbers with 107 bits or more 2013-08-02 Vincent Lefèvre [doc/mpfr.texi] Document that log1p(-1) = -Inf. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Moved mpfr_log1p & mpfr_expm1 after mpfr_log & mpfr_exp respectively. [tests/tset_ld.c] Comment on LDBL_MAX. 2013-08-02 Paul Zimmermann [tset_ld.c] missing conversion from int to mpfr_rnd_t [tset_ld.c] improve error message 2013-08-02 Vincent Lefèvre [src/set_ld.c] Corrected a comment. 2013-08-01 Vincent Lefèvre [doc/mpfr.texi] Completed specification of mpfr_lngamma and mpfr_lgamma on 1 and 2 (result is +0). [doc/mpfr.texi] Improved description of mpfr_rec_sqrt and mpfr_hypot. [tests] Added terandom and tnrandom to svn:ignore property. [src] Improved some comments with "0", about its sign. [doc/mpfr.texi] Completed specification on special numbers (±0, ±Inf). 2013-08-01 Paul Zimmermann [tset_ld.c] increase precision to take into account double-double encoding [tset_ld.c] replaced error by warning when _GMP_IEEE_FLOATS is not defined 2013-07-22 Vincent Lefèvre [src/mpfr-sassert.h] Get rid of annoying warnings typedef 'MPFR_ASSERT_xxx' locally defined but not used with GCC 4.8+ (better than the non-portable solution r8618). Thanks to Jonathan Wakely: https://gcc.gnu.org/legacy-ml/gcc-help/2013-07/msg00142.html 2013-07-22 Paul Zimmermann [configure.ac] revert commit 8618 since it breaks hydra jobs i686-cygwin, i686-freebsd, i686-solaris and x86_64-freebsd (cf http://hydra.nixos.org/eval/955753) 2013-07-22 Vincent Lefèvre Applied patch 3 by Ondřej Bílka with some manual corrections, fixing typos: https://sympa.inria.fr/sympa/arc/mpfr/2013-07/msg00016.html Applied patch 2 by Ondřej Bílka, fixing capitalization: https://sympa.inria.fr/sympa/arc/mpfr/2013-07/msg00015.html Applied patch 1 by Ondřej Bílka, fixing common typos: https://sympa.inria.fr/sympa/arc/mpfr/2013-07/msg00014.html [configure.ac] Added -Wno-unused-local-typedefs flag to avoid spurious "typedef 'MPFR_ASSERT_xxx' locally defined but not used" warnings due to the implementation of static assertions. 2013-07-16 Vincent Lefèvre Slightly restructured doc/README.dev and mentioned C-Reduce. 2013-07-12 Vincent Lefèvre [configure.ac] If the gmp.h vs libgmp test fails, also output the value of some variables (in case config.log is available, information can also be retrieved from "Cache variables" and "Output variables" near the end). 2013-07-12 Paul Zimmermann revert temporary commit 8613 2013-07-11 Vincent Lefèvre [acinclude.m4] Improved MPFR_CHECK_DBL2INT_BUG in case of failure and added comments about that. 2013-07-11 Paul Zimmermann [configure.ac] temporary commit to investigate problem with i686-solaris on hydra 2013-07-11 Vincent Lefèvre [configure.ac] In the CC and CFLAGS setup from gmp.h, modified the list of commands to select the C preprocessor since /lib/cpp isn't the best choice under Solaris. [configure.ac] Moved AM_PROG_AR (introduced in r8546) after the CC and CFLAGS setup from gmp.h, because AM_PROG_AR makes Autoconf select a compiler (before it may be chosen from __GMP_CC). [configure.ac] The test of CC and CFLAGS was done too late! Moved this test earlier (checked on Debian/unstable with autoconf 2.69). 2013-07-10 Vincent Lefèvre [configure.ac] Improved r8608 (gmp.h/libgmp on stderr). 2013-07-10 Paul Zimmermann [configure.ac] print also the versions of gmp.h/libgmp on stderr, hoping they will appear on i686-solaris [src/exp_2.c] removed useless instruction 2013-07-10 Vincent Lefèvre [acinclude.m4] Corrected change in r8602 to get an error in the case i == 0 and u != 1. 2013-07-10 Paul Zimmermann [configure.ac] added fflush to see versions of gmp.h/libgmp 2013-07-10 Vincent Lefèvre [src/exp_2.c] Fixed undefined behavior (present in all MPFR versions) detected by "clang -fsanitize=undefined". [doc/README.dev] Suggest to test with "clang -fsanitize=undefined"; see . 2013-07-10 Paul Zimmermann more helpful debug information added debug information for double-to-integer conversion bug 2013-07-09 Vincent Lefèvre [src/mpfr.h] Updated a comment about ICC. [doc/README.dev] Added URL about compiler detection. 2013-06-07 Vincent Lefèvre [doc/README.dev] Another update about signed and unsigned integer types. [doc/README.dev] Update about signed and unsigned integer types. 2013-06-07 Paul Zimmermann [src/random_deviate.c] applied patch from Charles Karney [tests/Makefile.am] reorder test files 2013-06-07 Vincent Lefèvre [doc/README.dev] Added URL's about C++ reserved keywords. 2013-06-07 Paul Zimmermann changed to allow compilation with C++: [src/random_deviate.h] must declare the types before extern C {...} [tests/tget_sj.c,tests/tset_si.c] "not" seems to be reserved in C++ 2013-06-07 Vincent Lefèvre [doc/algorithms.tex] Slightly improved a bound under which mpfr_hypot cannot have an internal underflow, thus is correct. 2013-06-06 Vincent Lefèvre [tools/mpfrlint] Improved a test to avoid false positives. [doc/algorithms.tex] Updated/improved the proof of mpfr_hypot in the scaling case. [src/hypot.c] Slightly improved scaling to avoid even more underflow in the scaling of y or in its square. [src/hypot.c] Added a comment on the FIXME. [src/mpfr-gmp.h] Removed useless and meaningless definitions. [src] Moved mp_bitcnt_t definition for GMP < 5 from mpfr-gmp.h to mpfr-impl.h (mpfr-gmp.h is only for definitions from GMP internals as it is included only in builds without GMP internals). [src/mpfr-gmp.h] Fixed mp_bitcnt_t presence test. 2013-06-06 Paul Zimmermann changed macro to typedef when mp_bitcnt_t is missing (for coherence with GMP) fixed compiler warnings [mpfr-gmp.h] added replacement for mp_bitcnt_t [hypot.c] added comment 2013-06-05 Paul Zimmermann applied patch from Charles Karney 2013-06-05 Vincent Lefèvre [README] Added ar-lib (due to AM_PROG_AR in r8546) and test-driver (installed by Automake 1.12+). 2013-06-03 Vincent Lefèvre [doc/mpfr.texi] Updated the month. 2013-06-02 Vincent Lefèvre [configure.ac] In AM_INIT_AUTOMAKE, lowered Automake version requirement to 1.11.2 (for AM_PROG_AR), as Ubuntu 12.04 LTS only has Automake 1.11.3 (we assume that such distributions have a security patch). [configure.ac] In AM_INIT_AUTOMAKE, require Automake 1.11.6 for AM_PROG_AR and security reasons. [NEWS,doc/mpfr.texi] New and deprecated functions in MPFR 3.2. Spelling: gaussian -> Gaussian (Wikipedia, Wolfram MathWorld, dict). [doc/mpfr.texi] Slight doc improvement for mpfr_grandom. 2013-06-01 Paul Zimmermann added assertion 2013-06-01 Vincent Lefèvre [src/random_deviate.c] Updated a comment. 2013-06-01 Paul Zimmermann in case mp_limb_t is smaller than unsigned long, use alternate code for highest_bit_idx 2013-06-01 Vincent Lefèvre [tools/mpfrlint] Update for random_deviate. [src/nrandom.c] Corrected indentation. [src/random_deviate.h] Fixed a typo in a macro name. [src/random_deviate.c] Removed trailing spaces. Added ar-lib to svn:ignore property (this script comes from Automake, due to the use of AM_PROG_AR in configure.ac as of r8546). 2013-05-31 Vincent Lefèvre [tests/memory.c] Added a FIXME comment about the time complexity of tests_memory_find (Paul Zimmermann noticed that tgrandom on a large value takes a lot of time, probably because of that). 2013-05-31 Paul Zimmermann updated NEWS and contribution section in mpfr.texi #include <...> -> #include "..." for local files removed obsolete comment GNU style GNU style GNU style added tests files for mpfr_nrandom and mpfr_erandom removed RANDOM_SIMPLE=1 stuff (this was an alternate slower implementation). Kept in svn history as a reference. removed mpfr_grandom_alt (likewise previous commit) removed mpfr_urandom_alt (slower than mpfr_urandom, but it can be recovered from the svn history to illustrate one of the basic properties of a newly initialized mpfr_random_deviate_t) removed mpfr_random.h, headers are in mpfr.h original contribution from Charles Karney 2013-05-30 Vincent Lefèvre Removed obsolete tools/update-patchv script. Use update-version instead. [configure.ac] Added AM_PROG_AR to support unusual archivers (after a warning from Automake 1.13). [tools/ck-copyright-notice] Update for copyright year ranges. [doc/mpfr.texi] Updated the month. Use copyright year ranges, following https://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices [tests] Added *.log and *.trs to svn:ignore property. [INSTALL] Update about configure default options. Added test-driver (from Automake 1.12+) to svn:ignore property. 2013-05-24 Vincent Lefèvre [configure.ac] Updated comment about -mieee-fp icc option. 2013-05-24 Philippe Théveny [tests/tprintf] remove tests of invalid format (continuation of r8525). [src/vasprintf.c] Support all length modifiers defined by ISO C99, even if the corresponding type is not detected by configure (continuation of r8525). 2013-05-24 Vincent Lefèvre [configure.ac] For ICC, changed the deprecated -mp option to the equivalent one -mieee-fp; added a comment about that. 2013-05-24 Philippe Théveny [src/vasprintf.c] Always support 't' and 'L' length modifiers, but don't test them if configure doesn't find the corresponding type. Printing invalid format specifiers (continuation of r8525) [src/vasprintf.c] Add comments. [tests/tprintf.c] Simplify tests. 2013-05-24 Paul Zimmermann new macro MPFR_MAYBE_UNUSED to avoid compiler warnings 2013-05-23 Philippe Théveny [src/vasprintf.c] Print invalid format specifier instead of returning an error code, as in GMP. [tests/tprintf.c] Modify tests for invalid format. 2013-05-22 Paul Zimmermann try to link with GMP even when a dll, since it seems to work now (see https://sympa.inria.fr/sympa/arc/mpfr/2013-05/msg00010.html) replaced macros NPRINTF_T and NPRINTF_L by positive versions PRINTF_T and PRINTF_L, now we don't assume that %td and %Lf are supported when we don't check it (for example when cross-compiling, or under Windows when GMP is a dynamic library) fixed typo 2013-05-15 Vincent Lefèvre [Makefile.am] Added a comment about ACLOCAL_AMFLAGS, based on the GNU Automake 1.13.2 release notes. 2013-04-17 Vincent Lefèvre [src/mpfr-impl.h] With clang, do not use GCC's self-initialization trick as it generates a warning, though clang claims GCC compatibility. 2013-04-04 Paul Zimmermann [algorithms.tex] added reference 2013-03-26 Paul Zimmermann [TODO] added item 2013-03-18 Vincent Lefèvre [src/fits_intmax.c] Corrected a comment. [src/{fits_u.h,fits_uintmax.c}] Fixed the mpfr_fits_u*_p functions, which incorrectly returned 0 ("doesn't fit") on negative arguments when the rounding to an integer was 0. The fits_uintmax.c file now uses fits_u.h for consistency. [tests/tfits.c] Use error numbers to know where an error occurred. [src/fits_uintmax.c] Replaced an obsolete comment by a TODO. [tests/tget_sj.c] Added mpfr_get_uj tests on small negative op, similar to what has been done for mpfr_get_ui in r8498,8499. [tests/tset_si.c] Minor type correction for r8498 (this shouldn't matter because the value is normally small, but perhaps not in case of bug). [tests/tset_si.c] Added mpfr_get_ui tests on small negative op. [tests/tset_si.c] Corrected comment. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Improved documentation of the conversions to an integer (mpfr_get_si, mpfr_get_ui, mpfr_get_sj, mpfr_get_uj). [tests/tfits.c] Added tests, in particular for small negative op and in non-RNDN rounding modes; tfits currently fails. [tools/announce-text] Added short text about what GNU MPFR is. 2013-03-13 Vincent Lefèvre [doc/README.dev] Removed a duplicate word. 2013-03-12 Vincent Lefèvre [INSTALL] Added a paragraph about Cygwin and threading. [INSTALL] Improved information on patches. 2013-03-11 Vincent Lefèvre [tools/announce-text] Added text about how to verify the signatures. [doc/README.dev] Updated "To make a release" about the web pages. 2013-03-08 Vincent Lefèvre [doc/README.dev] Added info about update-version and ck-version-info. 2013-03-05 Vincent Lefèvre [tests/tfpif.c] Clean-up. Improved consistency. 2013-03-04 Vincent Lefèvre [examples] Replaced the old rounding mode macros (GMP_RNDN, etc.) by the new ones (MPFR_RNDN, etc.) in the *.c files; updated ReadMe file. [doc/update-faq] Removed the now useless s/GMP_RND/MPFR_RND/ rewriting. [doc] Slightly modified faq.xsl to avoid libxslt bug 377440, and moved the addition of special CSS comments for XML compatibility from update-faq to faq.xsl file. 2013-03-01 Vincent Lefèvre [tests/tgamma.c] Avoid mpfr_set_d. [tests/tfpif.c] Avoid mpfr_set_d as the results may depend on the C implementation. 2013-01-03 Vincent Lefèvre [doc/mpfr.texi] Updated the month. Copyright notice update: added 2013 with perl -pi -e 's/2012 Free Software/2012, 2013 Free Software/' **/*(^/) under zsh, reverting the ChangeLog file and the m4 directory (the tools/mbench directory was not modified). Removed 2012 from the example in the doc/README.dev file. [configure.ac] Corrected comment on clock_gettime (from r8445). 2012-12-31 Vincent Lefèvre Tuning: reverted changeset r8444 and applied patch by Patrick Pélissier for GMP 5.1.0 to link against librt conditionally. 2012-12-31 Paul Zimmermann [Makefile.am] -lrt is needed for clock_gettime() [undefined with GMP 5.1.0] 2012-12-21 Vincent Lefèvre [tests/tfpif.c] Added a TODO. [src/fpif.c] Added an assert on MPFR_PREC_MIN because the code seems to be based on this (always true with the current value). [doc/mpfr.texi] Minor corrections of mpfr_fpif_import documentation. 2012-12-21 Olivier Demengeon mpfr_fpif_import now check precision size. Documentation updated for mpfr_fpif_import. 2012-12-20 Vincent Lefèvre Compatibility with GMP 5.1.0 when gmp-impl.h is included (thanks to Rob: https://sympa.inria.fr/sympa/arc/mpfr/2012-12/msg00003.html); clean-up. 2012-12-12 Vincent Lefèvre [src/fpif.c] Added a FIXME comment in mpfr_fpif_import concerning the precision. 2012-12-11 Vincent Lefèvre [src/fpif.c] Added comments. Fixed mpfr_fpif_read_precision_from_file in the case where the precision size > sizeof(mpfr_prec_t) and/or when the read precision is too large (as mpfr_prec_t is signed). 2012-12-11 Paul Zimmermann [fpif.c] completed FIXME 2012-12-08 Vincent Lefèvre [src/fpif.c] Added a FIXME comment: large precisions read from the file can trigger undefined behavior if sizeof(mpfr_prec_t) is too small. 2012-12-07 Olivier Demengeon Fixed stack overflow bug in fpif.c 2012-12-05 Vincent Lefèvre [acinclude.m4,configure.ac] Moved the "double-to-integer conversion bug" test after the gmp.h detection as it uses gmp.h (otherwise one gets an incorrect error on this test if gmp.h can't be found or is unusable). 2012-12-03 Vincent Lefèvre [doc/mpfr.texi] Removed a useless comma from r8428. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Updated warning in mpfr_min_prec description, in particular for the use with mpfr_prec_round. 2012-10-17 Vincent Lefèvre [src/set_uj.c] Change to help the compiler to detect dead code, improving the coverage (from a patch by Patrick Pélissier). [src/get_d64.c] Added a const (thanks to Patrick Pélissier). 2012-10-10 Vincent Lefèvre [acinclude.m4] Check struct lconv members (from ) to avoid a build failure under Android, which does not have them; see https://sympa.inria.fr/sympa/arc/mpfr/2012-10/msg00002.html [src/mpfr-impl.h] Decimal point / thousands separator support can now be detected automatically by configure (from the presence of and the above members) or explicitly disabled/enabled by the user by defining the MPFR_LCONV_DPTS macro to 0 or 1 via CFLAGS (a configure switch might be added in the future). [tests/tsprintf.c] Do the locale_da_DK test only if MPFR_LCONV_DPTS is true. 2012-09-29 Vincent Lefèvre [doc/README.dev] Note about GNU extensions and ICC. 2012-09-20 Vincent Lefèvre [get_float128.c,set_float128.c] Avoid an empty translation unit (forbidden by ISO C, detected with gcc -ansi -pedantic-errors) when MPFR_WANT_FLOAT128 is not defined. Applied patch (with minor changes) by Patrick Pélissier to improve the mpfr_round_nearest_away interface. 2012-09-12 Paul Zimmermann [nightly-test] modified so that decimal floats are tested (with gcc) 2012-09-05 Vincent Lefèvre Removed trailing whitespace. [doc/mpfr.texi] Updated the month. 2012-09-04 Vincent Lefèvre [configure.ac] Improved error message when the compiler doesn't know _Decimal64 (if MPFR is built with --enable-decimal-float). 2012-09-04 Paul Zimmermann revert changeset r8412 (_Decimal64 might be defined in C++, but not as a macro) updated documentation wrt --enable-decimal-float added support for --enable-decimal-float with g++ (does not work with icpc, the Intel C++ compiler) [tests/tl2b.c] fix for C++ 2012-09-04 Vincent Lefèvre [src/set_d.c] Updated a comment on the negative zero. [src/get_str.c] #include "mpfr-intmax.h" so that UINT64_C has a chance to be defined (optionally used as of r8406). 2012-09-04 Paul Zimmermann [src/set_d64.c] fix for systems where +0.0 and -0.0 are stored identically in memory [src/set_d64.c] better code to detect -0.0 (copied from set_d.c) [tests/tl2b.c] use UINT64_C for 64-bit integer constants [src/get_str.c] update table generated by "tests/tl2b 1" [get_d64.c,set_d64.c] small fixes (did not work any more with --with-gmp-build) [set_d64.c] some cleanup, since sprintf adds a final '\0', and fixed a too small memory allocation 2012-09-03 Paul Zimmermann [TODO] removed an item (done) Now --enable-decimal-float does not require any more --with-gmp-build. Still disabled by default: some more testing is needed before we can enable it by default (if _Decimal64 is supported). 2012-08-29 Vincent Lefèvre [tests/tstrtofr.c] Updated bug20120829 comment (bug fixed in r8396). [tests/tstrtofr.c] Fixed small type error. 2012-08-29 Paul Zimmermann [strtofr.c] new try to fix the assertion failure on 32-bit 2012-08-29 Vincent Lefèvre [tests/tstrtofr.c] Added more bug20120829 tests, showing that r8394 is still buggy on 32-bit machines (assertion failure in strtofr.c). 2012-08-29 Paul Zimmermann [strtofr.c] fix for failing test case introduced in r8392 2012-08-29 Vincent Lefèvre [tests/tstrtofr.c] Updated a comment: the 2nd testcase of r8392 also triggers an assertion failure on 32-bit machines. [tests/tstrtofr.c] Added 2 testcases: * One triggering an assertion failure in strtofr.c r8389 on 32-bit machines (fixed in r8390). * One still triggering an assertion failure in strtofr.c (r8391) on 64-bit machines. 2012-08-29 Paul Zimmermann [strtofr.c] fixed comments 2012-08-28 Paul Zimmermann [strtofr.c] fix for err >= GMP_NUMB_BITS 2012-08-28 Vincent Lefèvre [src/strtofr.c] Consistency correction: towards → toward. [src/sin_cos.c] Consistency correction: towards → toward. [doc] Updated FAQ.html with update-faq. 2012-08-28 Paul Zimmermann [strtofr.c] fixed bug in mpfr_strtofr in case: (1) the input string was used entirely (2) the conversion was done by a division (3) and the division was exact In such a case the "reconstruction" of the ternary value was inexact. 2012-08-16 Vincent Lefèvre [src/get_d64.c] mpfr_get_decimal64 was buggy in MPFR_RNDN on some values x such that 0.5e-398 < |x| < 1e-398 (smallest subnormal): it was returning 0 instead of +/- 1e-398 (see r8370). [tests/tget_set_d64.c] Added testcases. 2012-08-15 Vincent Lefèvre [src/get_d64.c] Fixed get_decimal64_max by simplifying it completely, and changed get_decimal64_min in the same way. Thanks to Rob (Sisyphus) for the idea. [tests/tget_set_d64.c] Added overflow tests (they cover the two bad tests fixed in r8372 and trigger a bug in get_decimal64_max). [tests/tget_set_d64.c] Added some tests for large numbers. Renamed WANT_ASSERT to MPFR_WANT_ASSERT in order to avoid a clash with GMP when MPFR is configured with --with-gmp-build. 2012-08-14 Vincent Lefèvre [src/get_d64.c] Fixed overflow cases. [tests/tstrtofr.c] Added testcase from bug reported by Joseph S. Myers. 2012-08-13 Vincent Lefèvre [src/get_d64.c] mpfr_get_decimal64 is buggy in MPFR_RNDN for values x such that 0.5e-398 < |x| < 1e-398. Added a FIXME comment. See: https://sympa.inria.fr/sympa/arc/mpfr/2012-08/msg00002.html 2012-07-27 Vincent Lefèvre [src/fpif.c] No longer assume that if HAVE_BIG_ENDIAN is not defined, the architecture is little endian. Detect the case where neither HAVE_BIG_ENDIAN nor HAVE_LITTLE_ENDIAN is defined (currently an error). [configure.ac] Fixed the use of AC_C_BIGENDIAN (since AC_CONFIG_HEADERS is not used, one must have an ACTION-IF-UNIVERSAL argument). [doc/README.dev] Check with "-UHAVE_BIG_ENDIAN -UHAVE_LITTLE_ENDIAN" (unknown/unspecified endianness) before a release. [doc/README.dev] Update now that autogen.sh is in the repository. Added autogen.sh sh script from Daniel Richard G. to install/update the autotools files and clean up caches (useful before a release). Updated autotools files to get rid of obsolete macros (thanks to Daniel Richard G. for the patch; kept the autoconf requirement to 2.60 instead of changing it to 2.68 as done with autoupdate, since 2.60 seems to be sufficient according to the changes and 2.68 is too recent, e.g. Debian/stable still has 2.67). --- Note --- This update has another effect: The "Configs for Windows DLLs." code (from "case $host in" to "esac") is now executed at the right time, after options like --disable-static are taken into account. Juste before this change, the test if test "$enable_shared" = yes; then was always false. This could be seen on hydra: With r8360: [...] configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/95zhbb0v23syxsazx33hg3acbvixyq5a-mpfr-0-3.2.0-dev [...] checking for DLL/static GMP... static [...] checking whether to build shared libraries... yes checking whether to build static libraries... no [...] With r8367: [...] configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/8zblwffd2ww1z0smqlgwrfzcl6b48rim-mpfr-0-3.2.0-dev [...] checking whether to build shared libraries... yes checking whether to build static libraries... no checking for DLL/static GMP... static [...] [src/mpfr-intmax.h] Updated comment formatting so that mpfrlint doesn't complain. 2012-07-26 Vincent Lefèvre [configure.ac] Replaced "sed" by "$SED". [tools/mpfrlint] Check for sed. [tools/mpfrlint] Check for grep, egrep and fgrep (see r8356 correction). 2012-07-26 Paul Zimmermann we use a 77-bit approximation in get_str.c (and not 76-bit) 2012-07-25 Paul Zimmermann [configure.ac] grep -> $EGREP (thanks Marc Glisse) https://sympa.inria.fr/sympa/arc/mpfr/2012-07/msg00006.html 2012-07-24 Paul Zimmermann [acinclude.m4] fix for cross-compilation 2012-07-24 Vincent Lefèvre [acinclude.m4] Improved a message and corrected gmp.h inclusion. 2012-07-24 Paul Zimmermann [acinclude.m4] added test for double-to-integer conversion bug revert r8349 (will do the test in configure) 2012-07-24 Vincent Lefèvre Improved doc/mpfr.texi about MPFR_USE_INTMAX_T. [src/mpfr-intmax.h] Define MPFR_USE_INTMAX_T if and/or is available. This is needed on systems for which the current (non-standard) macro tests in mpfr.h is not sufficient. This will force the support of intmax_t/uintmax_t in this case and also avoids a failure in the tests on such systems. Tested by replacing the macro tests in mpfr.h by just #if defined (MPFR_USE_INTMAX_T) to simulate such a system. 2012-07-24 Paul Zimmermann [tinternals.c] added test for double -> mp_limb_t conversion 2012-07-23 Paul Zimmermann [mpfr.h] patch for FreeBSD (tested on gcc76.fsffrance.org with freebsd-83-amd64) 2012-07-10 Vincent Lefèvre Added tools/announce-text sh script to be run before publishing an announce of a new GNU MPFR release (it does some checking, then it outputs the announce text to stdout). Mention this script in "doc/README.dev". [doc/README.dev] Updated "To make a release". 2012-07-09 Paul Zimmermann [TODO] added item 2012-07-06 Vincent Lefèvre [tests/{tset_d.c,tget_flt.c}] Disabled two tests when HAVE_SIGNEDZ isn't defined, because these tests rely on signed zeros. [acinclude.m4] Added a test for signed zeros (tcc currently doesn't support signed zeros, and 2 MPFR tests fail because of that). [acinclude.m4] Removed useless "#include " in the test for subnormal numbers. [acinclude.m4] Replaced the AC_TRY_RUN obsolete macro by AC_RUN_IFELSE([AC_LANG_SOURCE([[...]])],...) as documented in the GNU Autoconf manual. Minor correction in the test for subnormal numbers. [tests] Added trndna to svn:ignore property. [tests/tset_d.c] Formatting. Replaced "denormalized" by the official term "subnormal". 2012-07-05 Vincent Lefèvre [tools/coverage] unset MPFR_* environment variables in a better way. [tools/coverage] unset MPFR_* environment variables in a better way. 2012-07-05 Paul Zimmermann [coverage] unset MPFR_* environment variables to get reproducible results [tabort_defalloc2.c] changed char* into void* to please g++ compiler 2012-07-04 Vincent Lefèvre [tests/trndna.c] Removed useless initialization. 2012-07-04 Paul Zimmermann [trndna.c] restore emin [coverage] unset GMP_CHECK_RANDOMIZE so that the coverage test is deterministic 2012-07-04 Vincent Lefèvre [doc/mpfr.texi] Replaced a "should not" by a "must not". [doc/mpfr.texi] Consistency change. 2012-07-03 Paul Zimmermann [trndna.c] increase emin when smallest possible [rndna.c] special treatment for the case 2^(emin-2) several changes suggested by Vincent Lefevre [rndna.c] changed the specification since on 32-bit machines we have no margin for the smallest exponent emin added new function mpfr_round_nearest_away() as discussed during the June 2012 workshop 2012-07-03 Vincent Lefèvre [tools/coverage] Minor update, just in case... 2012-07-03 Paul Zimmermann [exp.c] fixed typo 2012-07-03 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [tests/{td_div.c,tget_d.c}] Disable tests with a division by 0 if MPFR_ERRDIVZERO is defined. [tests/tests.c] Improved an error message. [acinclude.m4] Fixed sigaction check to support "gcc -std=c99", like what has been done for math/round. 2012-07-02 Paul Zimmermann [trndna.c] test file for mpfr_round_nearest_away() 2012-07-02 Vincent Lefèvre [src/rndna.c] * Handle singular cases like with other functions. Avoid the goto. * Reordered the tests to make them simpler and easier to understand (it wasn't immediately visible that inex could not be 0 for the second "else") and fixed the case lastbit == 1 && inex < 0. [src/rndna.c] Added a note saying that this method doesn't work for 2^(emin-2). 2012-06-29 Paul Zimmermann [rndna.c] new function that computes rounding to nearest-away 2012-06-28 Vincent Lefèvre [tests/tprintf.c] Test the thousands separator in some en_US locale, if available (modified patch from Patrick). Added coverage tune (from a patch by Patrick). 2012-06-27 Paul Zimmermann [mpfr.texi] added support by ERC grant of Andreas 2012-06-27 Vincent Lefèvre [doc/mpfr.texi] Replaced a few @samp by @code for consistency. 2012-06-27 Paul Zimmermann [mpfr.texi] document MPFR_WANT_DECIMAL_FLOATS and MPFR_WANT_FLOAT128 2012-06-27 Vincent Lefèvre [src/mulders.c] Clean-up and static assertions (patch from Patrick). [tests/tgrandom.c] Replaced GMP_RNDN by MPFR_RNDN. [tests/tgrandom.c] Improved a test and added a new one for mpfr_grandom(x, NULL, ...). [doc/mpfr.texi] Completed spec of mpfr_grandom. 2012-06-27 Paul Zimmermann [coverage] added instructions how to use this script 2012-06-27 Vincent Lefèvre [NEWS] Update: test coverage. [tools/coverage] Detailed coverage (from a patch by Patrick). 2012-06-26 Vincent Lefèvre [src/{mpfr-impl.h,print_raw.c}] Removed unused function mpfr_dump_mant (added in r3410, but never used); patch by Patrick. [tests/tsin.c] Improved coverage. [tests/tset.c] Test the mpfr_set function too (patch by Patrick). Added configure option --enable-assert=none to avoid checking any assertion (this is based on a patch by Patrick). [src/digamma.c] Correction: assertions must never have any side effect. [tests] Updated svn:ignore property. [src/atan.c] Removed trailing whitespace. Forgot to add some files in r8266 (tests that are expected to fail). Support tests that are expected to fail (from a patch by Patrick). [tests/tversion.c] Output the applied patches (if any). [tests/tstckintc.c] Correction and test improvement (from a patch by Patrick). [tools/coverage] Correction by Patrick. 2012-06-26 Paul Zimmermann [atan.c] improved code coverage by removing some dead code after some numerical analysis with Benjamin Dadoun 2012-06-26 Vincent Lefèvre [doc/README.dev] Removed obsolete "but see below". [tests/tinternals.c] mpfr_set_prec_raw missing tests (thanks to Patrick). [tests/tset_si.c] Also test the mpfr_set_ui function (instead of macro). [NEWS] 3.2.0 will be "dinde aux marrons". 2012-06-25 Paul Zimmermann [gamma.c] simplified mpfr_gamma_1_minus_x_exact() after code coverage analysis with Benjamin Dadoun 2012-06-25 Vincent Lefèvre [configure.ac] aclocal -> acinclude.m4 in a comment. [src/{init2.c,mpfr-impl.h}] Clean-up. 2012-06-25 Paul Zimmermann [TODO] removed one item, added one 2012-06-25 Vincent Lefèvre [acinclude.m4] Detect whether _Thread_local (C11) is supported. [src/mpfr-thread.h] Use _Thread_local if supported, instead of __thread. (Patch from Patrick) 2012-06-25 Paul Zimmermann [gamma.c] simplified code for mpfr_gamma_2_minus_x_exact() (thanks to coverage analysis by Benjamin Dadoun) 2012-06-25 Vincent Lefèvre [src/Makefile.am] Added mpfr-sassert.h to libmpfr_la_SOURCES. [src/init2.c] Replaced classic assertions by static assertions. Added Static Assertion support (modified patch from Patrick). * Added src/mpfr-sassert.h: implementation of static assertions. * src/mpfr-impl.h: include "mpfr-sassert.h". * acinclude.m4: test whether static assertions are supported. [doc/README.dev] Suggest to test with and without -std=c11. [tests/tset_float128.c] Test the sign of 0. Use mpfr_equal_p instead of mpfr_cmp (this is safer if a result is NaN). [src/set_float128.c] Avoid a goto (useless here, contrary to set_ld.c). [src/get_float128.c] !MPFR_IS_ZERO -> MPFR_NOTZERO; GNU coding style. tests: updated svn:ignore property. [tests/tset_float128.c] Got rid of the remaining mpfr_printf's. 2012-06-25 Paul Zimmermann [tset_float128.c] added missing empty main when functions are not tested [set_float128.c,tset_float128.c] untabified and got rid of mpfr_printf 2012-06-25 Vincent Lefèvre [NEWS] Added a period. [doc/mpfr.texi] Updated the month. [configure.ac] "configure --help" formatting for --enable-float128. 2012-06-25 Paul Zimmermann compile mpfr_set_float128 and mpfr_get_float128 only when __float128 is supported [configure.ac] __float128 is supported by GCC >= 4.3 2012-06-25 Vincent Lefèvre [tests/tset_float128.c] mp_rnd_t -> mpfr_rnd_t 2012-06-25 Paul Zimmermann added new functions mpfr_set_float128 and mpfr_get_float128 [get_ld.c] fixed typo 2012-06-25 Vincent Lefèvre [tests/tversion.c] Test mpfr_buildopt_tune_case() vs MPFR_TUNE_CASE. [src/buildopt.c] Made mpfr_buildopt_tune_case() simpler. 2012-06-22 Paul Zimmermann [li2.c] replaced mpfr_cmp_d by mpfr_cmp_ui_2exp 2012-06-21 Vincent Lefèvre [tests/tset_ld.c] For _GMP_IEEE_FLOATS, use #if instead of #ifdef since mpfr-impl.h defines it to 0 if it was undefined. 2012-05-18 Vincent Lefèvre [TODO] Added a reference to a new discussion concerning __float128. 2012-05-14 Sylvain Chevillard * Other corrections (essentially bad or missing declarations) in metaMPFR. 2012-05-11 Vincent Lefèvre [doc/mpfr.texi] Improved the description of the mpfr_flags_ functions. 2012-05-10 Sylvain Chevillard * Corrected small errors. 2012-05-10 Vincent Lefèvre [doc/mpfr.texi] Improved mpfr_flags_test description, giving an example. [src/mpfr.h] Define MPFR_FLAGS_ALL from the individual flags (MPFR_FLAGS_UNDERFLOW...). Suggestion by Paul Zimmermann. Note: the output expression looks OK in assertion failures. [doc/mpfr.texi] Correction on mpfr_clear_flags description. 2012-05-09 Vincent Lefèvre Added functions that operate on groups of flags: mpfr_flags_clear, mpfr_flags_set, mpfr_flags_test, mpfr_flags_save and mpfr_flags_restore. (reintegrated flags branch to the trunk: svn merge --reintegrate ...) 2012-05-08 Paul Zimmermann patch from Nitin A Kamble for automake 1.12. This patch avoids these issues with automake 1.12: | configure.ac:304: error: automatic de-ANSI-fication support has been removed | tests/Makefile.am:12: error: automatic de-ANSI-fication support has been removed 2012-05-07 Vincent Lefèvre [AUTHORS,INSTALL,doc/mpfr.texi] Updated the e-mail address of the MPFR mailing-list to match the List-* headers written by the new mailing-list server (the old one still works, but may lead to bad interaction with MUA's that attempt to honor the List-Post header when replying to the list(s)). [src/lngamma.c] Added mpfr_explgamma internal function to handle overflows/underflows (intermediate or not) in mpfr_gamma. Updated the general overflow detection to use this function. [src/gamma.c] Fixed the general underflow detection. [src/lngamma.c] Removed spurious parentheses. [tests/tgamma.c] Added tests for 32-bit and 64-bit machines, showing an underflow detection bug in gamma.c (see FIXME comment added in r8185). [tests/tgamma.c] Added tests to trigger the pre-r8189 endless loop on 32-bit machines. 2012-05-04 Vincent Lefèvre [tests/tgamma.c] Updated exp_lgamma to test the ternary value. [src/lngamma.c] Fixed the problem with the overflow flag (r8192). Improved src/lngamma.c (mainly on changes from r8189): * Declarations of ok variable were used in nested block. * Added a missing "MPFR_ZIV_FREE (loop);". * In the overflow detection code, call mpfr_lngamma only once, use mpfr_equal_p instead of mpfr_cmp, and share code with the end. Note: the problem with the overflow flag (r8192) hasn't been solved yet. [tests/tgamma.c] Added a test showing a failure on 64-bit machines due to an unset overflow flag. [tests/tgamma.c] Updated exp_lgamma to test underflow & overflow flags. [TODO] For mpfr_get_flt, etc., exception flags should be raised. 2012-05-04 Paul Zimmermann [src/lngamma.c] fixed endless loop with test cases introduced in r8188 2012-05-03 Vincent Lefèvre [tests/tgamma.c] Updated the exp_lgamma_tests test to trigger an endless loop due to undetected overflow on 64-bit machines. [tests/tgamma.c] Say that the freeze is for 64-bit machines only. [tests/tgamma.c] Added more mpfr_tgamma tests, showing a freeze. [src/gamma.c] Corrected the FIXME comment concerning the underflow detection. [src/gamma.c] Added a FIXME comment: the underflow detection may still be buggy (or the explanation is incomplete). [src/gamma.c] Completed the explanation concerning the new underflow detection. [src/gamma.c] Removed the FIXME comment (from r8169). [src/gamma.c] Untabified. ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". [doc/mpfr.texi] Updated the month. 2012-05-03 Paul Zimmermann [gamma.c] tentative fix for the underflow problem 2012-05-03 Vincent Lefèvre Updated URL's of mailing-list archives/messages in all files (except ChangeLog, as it is generated). [TODO] Updated URL's of mailing-list archives/messages. 2012-05-02 Vincent Lefèvre [TODO] Updated concerning MPFR_RNDNA. 2012-04-27 Vincent Lefèvre [src/gamma.c] Added a FIXME comment. [TODO] Suggested a new rounding mode: MPFR_RNDE, to be used when the result is known to be exact (normal mode: optimize; debug mode: check). [src/gamma.c] Use the new MPFR_DBGRES macro. [tests/tgamma.c] Improved testcase test20100709. [tests/tgamma.c] Updated testcase test20100709 for 64-bit machines, as this bug reappeared in r8159. 2012-04-26 Paul Zimmermann [src/gamma.c] fixed bug found by Giridhar Tammana https://sympa.inria.fr/sympa/arc/mpfr/2012-04/msg00013.html Note (VL): this fix triggers an infinite loop on 32-bit machines (or with -m32) in test20100709 from tgamma.c and this is partly the opposite of changeset r6996. 2012-04-26 Vincent Lefèvre [tests/texceptions.c] Added a comment for check_groups(). [src/mpfr-impl.h] Improved the noreturn feature. 2012-04-25 Vincent Lefèvre Added support for _Noreturn function specifier (ISO C11). * acinclude.m4: define MPFR_HAVE_NORETURN if _Noreturn is supported. * src/mpfr-impl.h: use _Noreturn when MPFR_HAVE_NORETURN is defined. Tested with GCC 4.6 (no _Noreturn) and 4.7 (supports _Noreturn). [doc/README.dev] Added a note about the new experimental -ftrack-macro-expansion GCC option. 2012-04-24 Vincent Lefèvre [doc/mpfr.texi] Small correction on the mpfr_flags_t description. [src/mpfr-impl.h] Added MPFR_FLAGS_DIVBY0 (missing from r8143). [src/mpfr-impl.h] Forgot to replace the mpfr_clear_divby0 internal macro by MPFR_CLEAR_DIVBY0 in r8141. 2012-04-23 Vincent Lefèvre [src/ai.c] Use an intermediate variable to avoid a huge macro expansion in ASSERT_FAIL with gcc -ansi -pedantic-errors. (Merged changeset r8149 from the trunk) [src/mpfr-impl.h] Added a comment concerning MPFR_INT_CEIL_LOG2 and macro expansion. [src/ai.c] Use an intermediate variable to avoid a huge macro expansion in ASSERT_FAIL with gcc -ansi -pedantic-errors. [tools/mpfrlint] Update after r8143. (Merged changeset r8147 from the trunk) [tools/mpfrlint] Update after r8141. 2012-04-20 Vincent Lefèvre [TODO] Removed item about saving/restoring flags. [tests/texceptions.c] Added test of the mpfr_flags_* functions/macros. [NEWS] New mpfr_flags_* functions. Merged /trunk:r8141-8142 with a few manual changes due to conflict: replaced the flags-related mpfr_clear_* internal macros (which were already removed in this flags branch) by an uppercase version using a do-while in order to prevent one from using them in an expression. Renamed MPFR_SET_ERANGE to MPFR_SET_ERANGEFLAG for consistency. [src/mpfr-impl.h] Improved comment about MPFR_CLEAR_* macros. [src] Replaced the flags-related mpfr_clear_* internal macros by an uppercase version with a do-while in order to prevent one from using them in an expression. Renamed MPFR_SET_ERANGE to MPFR_SET_ERANGEFLAG for consistency. 2012-04-19 Vincent Lefèvre Implemented the mpfr_flags_* functions (and mpfr_flags_test as a macro). The MPFR_FLAGS_* macros had to be moved from mpfr-impl.h to mpfr.h (as they are now part of the API). Check that MPFR_FLAGS_ALL <= INT_MAX (or similar) when need be. Removed the mpfr_clear_* macros and merged r8139 (about the MPFR_SET_ERANGE macro) from the trunk due to a risk to break the sequence point rules. [src/mpfr-impl.h] Use a do-while statement for the MPFR_SET_ERANGE() macro in order to prevent one from using this macro in an expression, as the sequence point rules could be broken if __gmpfr_flags is assigned twice in the same expression (via macro expansions). Note: This cannot be done for the mpfr_clear_* flags macros because we want to be able to follow the API inside MPFR (thus these macros must be usable wherever a function is). These macros should probably be removed or renamed in the future (e.g. via the flags branch). 2012-04-17 Vincent Lefèvre [doc/mpfr.texi] Added documentation for the new functions on groups of flags (not implemented yet). 2012-04-11 Vincent Lefèvre [TODO] Suggest mpfr_pow_q and variants. 2012-03-28 Vincent Lefèvre [doc/mpfr.texi] Updated "API Compatibility" section: functions mpfr_fmodquo, mpfr_fpif_export and mpfr_fpif_import are new in MPFR 3.2. 2012-03-27 Vincent Lefèvre [tests/tfpif.c] Removed trailing whitespace. 2012-03-26 Paul Zimmermann [src/fpif.c,tests/tfpif.c] changed to GNU style 2012-03-26 Olivier Demengeon Add a test on FILE* in fpif.c; Added a missing test on a return value; Changed the way to compute number of bytes needed for the limb of a mpfr number; Increase coverage test of fpif.c 2012-03-26 Vincent Lefèvre [src] New mpfr_flags_t type, defined as an unsigned int. For the __gmpfr_flags variable and internal flags-related variables, replaced unsigned int by mpfr_flags_t (note that this doesn't change the ABI, since unsigned int was already used). [tests] Cast __gmpfr_flags to unsigned int when printed with %u. 2012-03-26 Paul Zimmermann added new function mpfr_fmodquo (cf https://sympa.inria.fr/sympa/arc/mpfr/2012-03/msg00020.html) 2012-03-26 Vincent Lefèvre [src/mpfr-examples/version.c] Output sizeof(mpfr_t) value. [tests/tests.c] Improved src_fopen() a bit. [doc/README.dev] Explain the use of the new MPFR_DBGRES macro. [src/mpfr-impl.h] Added a MPFR_DBGRES macro to avoid a warning in non-debug mode, e.g. with GCC's -Wunused-but-set-variable, when a result is tested only in an MPFR_ASSERTD expression. [src/const_euler.c] Avoid such a warning by using MPFR_DBGRES. MPFR_ASSERTD or MPFR_ASSERTN must be used for assertions, not ASSERT. 2012-03-20 Paul Zimmermann [tests/tests.c] fixed problem with src_fopen (https://sympa.inria.fr/sympa/arc/mpfr/2012-03/msg00021.html) [tests/Makefile.am] inp_str.data -> inp_str.dat renamed tests/inp_str.data into tests/inp_str.dat [tests/tinp_str.c] now use tests/inp_str.dat [tests/tfpif.c] use src_fopen instead of fopen [src/fpif.c] simplified &x[i] into x+i [src/mparam_h.in] better recognition of AMD64 systems [tools/cfarm.sh] updated [tests.c] fixed compiler warning (gcc70.fsffrance.org, NetBSD, gcc 4.1.3) 2012-03-19 Paul Zimmermann [fpif.c] simplified code since nb_data is always 1 [mparam_h.in] recognize __tune_amdfam10__ (for example gcc10.fsffrance.org) [configure.ac] use AC_C_BIGENDIAN to determine endianness of words [tests/Makefile.am] the name of the test file for the export/import functions has changed 2012-03-19 Vincent Lefèvre tests: updated svn:ignore property. [src/mpfr.h] Indentation. 2012-03-19 Paul Zimmermann changed the order of arguments of mpfr_fpif_import so that the modified argument is first [NEWS] updated item about the new mpfr_fpif_export and mpfr_fpif_import functions mpfr_fpif_export_binary -> mpfr_fpif_export mpfr_fpif_import_binary -> mpfr_fpif_import stream.data renamed to mpfrtest.dat [tfpif.c] now use remove() 2012-03-19 Vincent Lefèvre [doc/mpfr.texi] "in future version" → "in future versions". [doc/mpfr.texi] Updated the month. [src/fpif.c,tests/tfpif.c] Corrected coding style. 2012-03-17 Paul Zimmermann [src/fpif.c] fixed a few warnings and errors with g++ (found on hydra) 2012-03-16 Paul Zimmermann [out_raw.c] removed obsolete file (replaced by fpif.c) [tests/Makefile.am] put tfpif at its right place [src/fpif.c] fixed problem with sign on gcc38 [tests/tfpif.c] solved FIXME's, added new test with fixed data file [tests/stream.data] data file for tfpif.c (to check we get same results with different word size and endianness) [tests/Makefile.am] added stream.data to make dist [fpif.c] added comments [tfpif.c] improve error message in case of mismatch [acinclude.m4] forgot double-double big endian [mpfr.texi] added note saying that mpfr_fpif_export_binary and mpfr_fpif_import_binary are experimental [mpfr.texi] added documentation for mpfr_fpif_export_binary and mpfr_fpif_import_binary [fpif.c] replaced sizeof(var) by sizeof(type) 2012-03-15 Paul Zimmermann [fpif.c] fixed a few issues [src/fpif.c,src/mpfr.h,tests/tfpif.c] a few fixes so that make and make check pass on one machine. Will fix the remaining issues later. 2012-03-15 Vincent Lefèvre Added FIXME for export/import MPFR numbers, did some corrections, updated NEWS file. [doc/README.dev] Update about C headers. 2012-03-15 Olivier Demengeon Add copyright material in fpif.c and test_fpif.c Add functions/tests to export/import mpfr number in a binary format 2012-03-13 Vincent Lefèvre Improved mpfr_check and added a missing testcase. 2012-03-09 Vincent Lefèvre [doc/README.dev] Corrected information about valgrind. [src/mpfr-impl.h] Updated a comment. [src/mpfr-impl.h] Improved macros from the changeset r8025, in particular to avoid an error with the --enable-assert configure option and the -ansi -pedantic-errors gcc compiler flags. 2012-03-08 Vincent Lefèvre [tests/tprintf.c] Corrected the test with MPFR_CHECK_LARGEMEM=1 again, and improved it in case _MPFR_PREC_FORMAT == 2, where MPFR_PREC_MAX is INT_MAX minus some small constant (see r8035). [tests/tprintf.c] Corrected the test with MPFR_CHECK_LARGEMEM=1. [tests/tinits.c] Improved the large precision test so that it is still performed after r8035 (where MPFR_PREC_MAX has been decreased). [tests/tconst_log2.c] Replaced mpfr_printf by mpfr_out_str. 2012-03-08 Paul Zimmermann [tconst_log2.c] use hexadecimal output in case of error in check_large() [get_ld.c] added comments and ASSERT() [tset_ld.c] added test to better exercise get_ld and set_ld for subnormals, and replaced some 64 by MPFR_LDBL_MANT_DIG 2012-03-07 Paul Zimmermann [tconst_log2.c] improved error message, cf https://sympa.inria.fr/sympa/arc/mpfr/2012-03/msg00017.html [get_ld.c] deal with the case "long double" == "double" [acinclude.m4] deal with long double == double [src/set_ld.c] idem 2012-03-07 Vincent Lefèvre [NEWS] Prepare for new version 3.2.0 (will be 4.0.0). [INSTALL] Added information about --with-sysroot. [INSTALL] Removed an obsolete paragraph saying that the test suite can't be run with a C++ compiler. C++ related problems have been fixed a long time ago. 2012-03-06 Paul Zimmermann [TODO] added new item about saving/restoring flags added tuning parameters for mips (on gcc49.fsffrance.org) 2012-03-05 Paul Zimmermann [tuneup.c] fixed compiler warning (got on gcc49.fsffrance.org) 2012-03-05 Vincent Lefèvre [src/mpfr.h] Minor change to be consistent with "src/mpfr-gmp.h". [src/mpfr.h] Added a reference to MPFR bug 13947. [src/mpfr.h] Simple temporary fix following GMP's internal __gmp_const macro removal in (and its replacement by const): if __gmp_const isn't define, let's define it to const. 2012-03-03 Vincent Lefèvre [NEWS] Mention the mpfr_exp bug fix (from r6964 in exp_2.c). 2012-02-27 Vincent Lefèvre [configure.ac] If 'gmp.h' and 'libgmp' seem to have different versions, output the temporary LD_RUN_PATH value (may be useful for debugging). 2012-02-24 Vincent Lefèvre [tests] Removed #include of headers already included via "mpfr-test.h" (, , ). Note: this change doesn't apply to tvalist.c, which is a special test that doesn't use "mpfr-test.h". [src] #include unconditionally in mpfr-impl.h; removed this #include from the .c files. [src/logging.c] #include was no longer necessary. Removed. [src/logging.c] Updated a comment (contained obsolete information). [src/mpfr-impl.h] Use %.*Rg instead of %.*Rf for MPFR_LOG_VAR. [NEWS] Mention an internal change in MPFR 3.1.0. Corrected a typo in MPFR_LOG_FUNC of add_d.c, add_ui.c and mul_d.c (mpfr_get_prec → mpfr_log_prec), fixing bug 13933. The consequence was random freezes (on the same binary) with dynamic linking (and just more memory with static linking to the MPFR library) when logging was used. [src/const_euler.c] Use the safer MPFR_BLOCK. 2012-02-23 Vincent Lefèvre [src/const_euler.c] Removed a useless log message added in r8040. [src/const_euler.c] Replaced computations on double by computations on MPFR types, with detection of overflows. Fixed inconsistencies with algorithms.tex (due to rounding) in the computation of n. [src/mpfr-impl.h] Removed #define ALPHA (no longer used). [src/mpfr-impl.h] Removed obsolete #define EXPM1. [src/erf.c] Removed an obsolete #define. [BUGS] Update concerning huge precisions and integer overflows. [examples/version.c] Output mpfr_prec_t information with all MPFR versions. Output signedness information for MPFR types/macros. [src/mpfr.h] Decrease the MPFR_PREC_MAX value by 256 in order to avoid some integer overflows in existing code that increases the working precision (if mpfr_prec_t is on 64 bits, this does not change anything in practice), as too large precisions should be detected via assertions for more security. After discussion, it has been decided to keep the MPFR_PREC_MAX value close to 2^31 when mpfr_prec_t is on 32 bits. [src/mpfr-impl.h] Added a comment concerning MPFR_ADD_PREC. [examples/version.c] Output more information about the precision and exponent types. 2012-02-22 Vincent Lefèvre [src/mpfr-impl.h] Use MPFR_ADD_PREC in MPFR_ZIV_NEXT. [src/mpfr-impl.h] Added an MPFR_ADD_PREC macro to safely increase some precision (i.e. with an assertion check for integer overflow). [src/ai.c] Use this MPFR_ADD_PREC macro, in particular in a case where the additional precision can be huge. TODO: Other files would need to use MPFR_ADD_PREC. [tests/tinits.c] Updated the large precision test to trigger a bug fixed in r8025 on 32-bit machines (or when MPFR is built with -m32). Here the crash was due to (MPFR_PREC (b) + GMP_NUMB_BITS-1)/GMP_NUMB_BITS in "src/set.c". [src/rec_sqrt.c] Removed useless #include (mpfr-impl.h does a better job for stdio). [tests/tinits.c] Improved r8026 (missing #include, support 16-bit prec). Document the MPFR_DEBUG_BADCASES environment variable before bad_cases() in tests/tests.c (where it is used). Remove it from "doc/README.dev" since it is useful only in case of crash / infinite loop in bad_cases(), and will give useless output otherwise. 2012-02-22 Paul Zimmermann [TODO] added comment [doc/README.dev] added environment variables [tinits.c] added test to check #13918 is fixed 2012-02-22 Vincent Lefèvre Avoid potential integer overflows and improve consistency. This should fix bug #13918 "Segfault with precision = MPFR_PREC_MAX on 32-bit". Note: this problem appeared in MPFR 3.0.0 when the precision type (now mpfr_prec_t) was changed to a signed integer. [configure.ac] Added a comment mentioning a problem with GNU gold ld. 2012-02-15 Vincent Lefèvre [TODO] Added reference to ISO/IEC 24747:2009 (C, special functions). 2012-01-27 Paul Zimmermann removed directory src/x86_64/xeon [src/Makefile.am] removed x86_64/xeon/mparam.h 2012-01-25 Paul Zimmermann share parameters between x86_64/core2 and x86_64/xeon (gcc70) [src/Makefile.am] forgot to add new param file added tuning parameters for -mtune=nocona (gcc70) 2012-01-20 Paul Zimmermann [mparam_h.in] swap tests for 32-bit and 64-bit powerpc, since on powerpc64 the parameters for 32-bit are used! 2012-01-15 Vincent Lefèvre [doc/README.dev] Updated "To make a release". 2012-01-10 Vincent Lefèvre [TODO] Added a note to item about sNaN/qNaN. [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Mention the AriC project-team. Reverted incorrect change in ChangeLog from r7993. Changed Arenaire to AriC with: perl -pi -e 's/Contributed by the Arenaire/Contributed by the AriC/' **/*(^/) under zsh. [doc] Updated FAQ.html with update-faq. [doc/faq.xsl] Remove only the top-level comments from the HTML file. [doc/faq.xsl] Updated a comment. Copyright notice update: added 2012 with perl -pi -e 's/2011 Free Software/2011, 2012 Free Software/' **/*(^/) under zsh, reverting the ChangeLog file (the m4 and tools/mbench directories were not modified). Removed 2011 from the example in the doc/README.dev file. 2011-12-09 Paul Zimmermann [TODO] trivial change (to test the commit logs) 2011-12-09 Vincent Lefèvre [configure.ac] Mention --disable-thread-safe. [INSTALL] Added information about system/compiler bugs related to TLS or optimizations. 2011-12-09 Paul Zimmermann [INSTALL] added note about buggy TLS support 2011-11-28 Vincent Lefèvre [tests/turandom.c] Removed an obsolete comment. [src/mpfr-gmp.h] Updated the TODO comment about the rand state. [doc/mpfr.texi] Updated the month. [tests/trandom.c,tests/turandom.c] Fixed compatibility with GMP 4.1.x (since the default PRNG has changed between GMP 4.1 and 4.2). [doc/mpfr.texi] Mentioned the difference between GMP 4.1 and 4.2 about the changes of mpfr_urandom and mpfr_urandomb in MPFR 3.1. [src/mpfr-gmp.h] Added a TODO comment. 2011-11-24 Paul Zimmermann revert previous commit (test) commit test 2011-11-09 Paul Zimmermann [src/mpfr-thread.h] added pointer to TLS on Windows 2011-11-09 Vincent Lefèvre [tests/tsprintf.c] Added a test showing a regression in MPFR 3.1.0 (but fixed in r7931 and later). 2011-11-09 Paul Zimmermann [tests/tatan.c] mpfr_set_emin -> set_emin (idem for emax) 2011-11-09 Vincent Lefèvre [TODO] Added a reference to an old discussion concerning __float128. 2011-11-08 Paul Zimmermann [TODO] added item 2011-11-03 Vincent Lefèvre [src/vasprintf.c] Untabify. 2011-11-03 Philippe Théveny [src/vasprintf.c] Corrected a comment. 2011-11-03 Vincent Lefèvre [tests/tsprintf.c] Coding style. 2011-11-02 Vincent Lefèvre [src/strtofr.c] Spelling. [src/vasprintf.c] Spelling. [src/vasprintf.c] Corrected a comment. [tests/tsprintf.c] Added tests. [src/vasprintf.c] Untabify. Minor correction in a comment. 2011-11-02 Philippe Théveny [src/vasprintf.c] Rewrite in a cleaner way the part of regular_fg implied in the bug reported by Pavel Holoborodko (see r7931). 2011-11-02 Paul Zimmermann [src/mpn_exp.c] changed FIXME into TODO [src/mpn_exp.c] added comment [src/vasprintf.c] (hopefully) fixed bug reported by Pavel Holoborodko [tests/tsprintf.c] added corresponding test case 2011-10-14 Vincent Lefèvre [tests/Makefile.am] Added -L$(top_builddir)/src/.libs to AM_LDFLAGS. [INSTALL] Removed the notes on HP-UX (obsolete after the above change). 2011-10-13 Vincent Lefèvre [INSTALL] Corrected notes for HP-UX. [INSTALL] Added notes for HP-UX after a bug report. See discussion: https://sympa.inria.fr/sympa/arc/mpfr/2011-10/msg00042.html 2011-10-12 Paul Zimmermann [TODO] added one item [corei5/mparam.h] tuning files for Core i5 (not yet used since GMP 5.0.2 does currently recognize Core i5 as "k8", however the k8 tuning parameters are not so bad for Core i5) 2011-10-05 Vincent Lefèvre [src/mpfr-impl.h] Improved MPFR_IS_PURE_FP definition, so that MPFR_ASSERTD takes a boolean (0 or 1). 2011-10-04 Vincent Lefèvre [src/mpfr-impl.h] Fixed a bug in the MPFR_UNLIKELY macro for GCC (found under Mac OS X / PowerPC with the mode32 GMP ABI, and MPFR built with --enable-assert=full). (Merged changeset r7908 from the 3.1 branch.) 2011-09-29 Paul Zimmermann [doc/mpfr.texi] added reference and comment for eint 2011-09-25 Vincent Lefèvre [doc/mpfr.texi] Rephrased mpfr_frexp description. 2011-09-24 Vincent Lefèvre Renamed "division-by-zero" to "divide-by-zero" (term used by the ISO C99 standard, the IEEE 754-2008 standard using divideByZero, and the old IEEE 754-1985 standard using both "divide by zero" and "division by zero"). [src/gmp_op.c] Forgot to update the flags in some functions. [tests/tgmpop.c] Improved division-by-zero tests. 2011-09-23 Vincent Lefèvre [doc/faq.xsl] Added a comment about the MPFR logo. 2011-09-22 Vincent Lefèvre [doc/mpfr.texi] Improved mpfr_frexp description. [doc/mpfr.texi] Corrected typo in the mpfr_frexp description. 2011-09-21 Paul Zimmermann [tools/cfarm.sh] updated for MPFR 3.1.0 rc2 2011-09-20 Paul Zimmermann [cfarm.sh] updated for MPFR 3.1.0-rc1 (with GMP 5.0.2) 2011-09-20 Vincent Lefèvre [examples/version.c] Output mpfr_buildopt_gmpinternals_p() and mpfr_buildopt_tune_case() values with MPFR 3.1 or later. Renamed mpfr_buildopt_internals_p to mpfr_buildopt_gmpinternals_p. Added mpfr_buildopt_internals_p function. [doc/mpfr.texi] Added commas. [src/gmp_op.c] Handle the special cases in mpfr_cmp_q and mpfr_cmp_f. 2011-09-19 Vincent Lefèvre [TODO] Added an item about the minimum and maximum exponents. [src/agm.c] Replaced MPFR_EMIN_MIN and MPFR_EMAX_MAX by MPFR_EXT_EMIN and MPFR_EXT_EMAX respectively (see r7862 and r7863). [src/mpfr-impl.h] Define new macros MPFR_EXT_EMIN and MPFR_EXT_EMAX. [doc/README.dev] Document how to specify the minimum exponent or the maximum exponent. 2011-09-19 Paul Zimmermann [src/agm.c] replaced __gmpfr_emax by MPFR_EMAX_MAX (same for __gmpfr_emin). Solves bug on gcc54 with --enable-thread-safe and GCC 4.3.2. 2011-09-19 Vincent Lefèvre [src/mpfr-gmp.h] Added missing prototype for __gmpn_sbpi1_divappr_q (it could be detected when building MPFR with g++). 2011-09-19 Paul Zimmermann [tests/tgmpop.c] check for erange flag in mpfr_cmp_[f,q,z] (https://sympa.inria.fr/sympa/arc/mpfr/2011-09/msg00013.html) 2011-09-19 Vincent Lefèvre [doc/README.dev] Updated "To make a release". 2011-09-19 Paul Zimmermann [src/mpfr-gmp.h] fixed bug with --enable-gmp-internals introduced in r7455 (mpfr_limb_ptr is not yet defined when reading mpfr-gmp.h thus we can't use it) 2011-09-19 Vincent Lefèvre [doc/mpfr.texi] Correction: "5 exception types" → "6 exception types" (thanks to Case Vanhorsen for the report). 2011-09-14 Vincent Lefèvre [src/mpfr-impl.h] Define LONGLONG_STANDALONE before including mpfr-longlong.h so that udiv_qrnnd_preinv is defined (this is useful at least on IA64 when compiling without gmp-impl.h). Thanks to Patrick Pélissier for the fix. 2011-09-11 Vincent Lefèvre [doc/mpfr.texi] Updated "API Compatibility" section: as of MPFR 3.1, the mpfr.h header can be included several times, while still supporting optional functions. [doc/mpfr.texi] Replaced some @code by @file for consistency. [doc/mpfr.texi] Updated "API Compatibility" section: functions mpfr_frexp, mpfr_grandom and mpfr_z_sub are new in MPFR 3.1. [doc/mpfr.texi] Documented function mpfr_buildopt_tune_case, and added it to the list of added functions. [NEWS] Function mpfr_buildopt_tune_case is new in MPFR 3.1. [doc/mpfr.texi] Updated "API Compatibility" section (new division-by-zero exception in MPFR 3.1). [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] MPFR_RNDA was introduced in MPFR 3.0.0 and should no longer be considered experimental. 2011-09-10 Vincent Lefèvre [tests/trec_sqrt.c] Fixed bug introduced in r7711 (build failure with a C++ compiler). [TODO] Replaced "configure.in" by "configure.ac". [doc/README.dev] Removed obsolete paragraph about AM_MAINTAINER_MODE. [tools/mpfrlint] Correction after r7825. [tools/mpfrlint] Run tools/ck-mparam. Added tools/ck-mparam sh script to check the mparam.h files (gcc is needed). 2011-09-10 Paul Zimmermann [src/amd/k8/mparam.h] removed spurious end of comment 2011-09-09 Vincent Lefèvre [doc/README.dev] For the valgrind example, use the same arguments as in gnulib's valgrind-tests.m4 file. ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". [Makefile.am] Added tools/ck-copyright-notice to EXTRA_DIST as it is used in dist-hook. [tools/ck-copyright-notice] Added copyright notice (since this file is distributed in the tarballs). Note: the first year is 2008 as a part of the code comes from r5370 in mpfrlint. [tools/ck-copyright-notice] Skip src/mpfr-longlong.h as this file (which comes from GMP) has a specific copyright notice. [src/mp_clz_tab.c] Updated the copyright notice. [tools/ck-copyright-notice] Check that the first copyright year for the mparam.h files is 2005. Added copyright notice to the mparam.h files (with the same years as in the template). Added tools/ck-copyright-notice sh script from mpfrlint (updated) to check that copyright notices exist and appear to be correct. Updated tools/mpfrlint to run tools/ck-copyright-notice instead of its old test. In Makefile.am, run tools/ck-copyright-notice in dist-hook for "make dist". [tools/mpfrlint] More files under src and tests directories. 2011-09-08 Vincent Lefèvre [NEWS] Update for MPFR 3.1.x. [tests/Makefile.am] * Added "AM_LDFLAGS = -no-install" to prevent libtool from generating wrapper scripts for the tests (according to discussions and tests, there should be no negative effects); useful for gdb and valgrind. * Added $(VALGRIND) to TESTS_ENVIRONMENT in order to easily run the tests under valgrind with: VALGRIND="valgrind -q" make check [doc/README.dev] Update for gdb and valgrind. 2011-08-31 Vincent Lefèvre [doc/mpfr.texi] Improved the specification of mpfr_get_f. 2011-08-30 Paul Zimmermann [configure.ac] added comment about minimal GMP version dummy change to check if GMP_CHECK_RANDOMIZE is now used in the Hydra builds on http://hydra.nixos.org/jobset/gnu/mpfr-trunk 2011-08-19 Vincent Lefèvre [doc/mpfr.texi] Added some references to the ternary definition. 2011-08-19 Paul Zimmermann [doc/mpfr.texi] improved the documentation of mpfr_set_str, as suggested by Vincent Lefevre 2011-08-19 Vincent Lefèvre [doc/mpfr.texi] Added "Ternary value" to the concept index. 2011-08-15 Vincent Lefèvre [doc/README.dev] Added information on how to update the FAQ. [doc] Updated FAQ.html with update-faq. 2011-08-12 Vincent Lefèvre [tune/tuneup.c] Untabified. [src/mulders.c] Replaced MPFR_ASSERTD by MPFR_ASSERTN on constant expressions (this is a temporary change, as they should later be replaced by static assertions). [src/mulders.c] Replaced mp_ptr and mp_srcptr (internal to GMP) by mpfr_limb_ptr and mpfr_limb_srcptr. [src/mpfr-gmp.h] Avoid potential identifier collision by using an underscore for variable names declared in the invert_pi1 macro. [src/mpfr-gmp.h] Untabified. [doc/mpfr.texi] Updated the month. 2011-08-06 Paul Zimmermann [k8/mparam.h] added comment [x86/mparam.h] new tuning contributed by Jim Cloos [amd/amdfam10/mparam.h] added GMP version [mpfr-gmp.h] use mpfr_pi1_t instead of gmp_pi1_t to avoid using GMP's namespace 2011-08-05 Paul Zimmermann [src/mulders.c] use mpn_sbpi1_divappr_q if available and WANT_GMP_INTERNALS is defined [src/mpfr-gmp.h] defined macros needed for mpfr_divhigh_n_basecase [configure.ac] check for mpn_sbpi1_divappr_q 2011-08-05 Vincent Lefèvre Updated version to 3.2.0-dev. 2011-08-05 Paul Zimmermann [amdfam10/mparam.h] tuning parameters contributed by Jim Cloos [mulders.c] added a basecase code for Mulders' short division [tuneup.c] added corresponding tuning code [TODO] added an item 2011-08-04 Vincent Lefèvre [acinclude.m4] In the INTMAX_MAX test, no longer hardcode the "#include " (for instance, this doesn't work under Solaris 9: INTMAX_MAX is defined only via ), but include "mpfr-intmax.h" instead (needs a temporary CPPFLAGS). 2011-08-01 Vincent Lefèvre [NEWS] Much faster formatted output (mpfr_printf, etc.) with %Rg and similar. [doc/README.dev] Added copyright notice in case the file is distributed. [doc/README.dev] Added information on how to run the MPFR test suite under valgrind. Untabified and removed trailing spaces. [tests/tversion.c] Improved output information. 2011-07-31 Paul Zimmermann [hppa/mparam.h] updated for new Mulders' division [sparc64/mparam.h] updated for new Mulders' division [powerpc64/mparam.h] updated for new Mulders' division [ia64/mparam.h] updated for new Mulders' division [amd/k8/mparam.h] updated for new Mulders' division [x86/core2/mparam.h] updated thresholds for new Mulders' division [mparam_h.in] changed the detection of 64-bit Core 2, and added MPFR_TUNE_CASE for default case [tversion.c] print GMP version (header and library), and file for tuning parameters [x86_64/core2/mparam.h] updated for Mulders' division Added tuning for MPFR_DIV_THRESHOLD, and default value. It now remains to do the tuning on the architectures in mparam_in.h. 2011-07-29 Paul Zimmermann [NEWS] added speed improvement in mpfr_div 2011-07-29 Paul Zimmermann [mulders.c] fixed bug in mpfr_divhigh_n (this routine was not used yet) [div.c] now use Mulders' short product for large division. It remains to do the automatic tuning of MPFR_DIV_THRESHOLD. The speedup is nice, for example on my Core 2 Duo laptop we got with MPFR 3.0.0: [zimmerma@coing tests]$ ./timings-mpfr 1000 Using MPFR-3.0.0 with GMP-5.0.2 [precision is 3322 bits] x*y took 0.004543 ms (262143 eval in 1191 ms) x*x took 0.003616 ms (524287 eval in 1896 ms) x/y took 0.009087 ms (131071 eval in 1191 ms) sqrt(x) took 0.007004 ms (262143 eval in 1836 ms) exp(x) took 0.293040 ms (4095 eval in 1200 ms) log(x) took 0.253724 ms (4095 eval in 1039 ms) sin(x) took 0.306960 ms (4095 eval in 1257 ms) cos(x) took 0.290842 ms (4095 eval in 1191 ms) arccos(x) took 0.590620 ms (2047 eval in 1209 ms) arctan(x) took 0.560332 ms (2047 eval in 1147 ms) and now we get: [zimmerma@coing tests]$ ./timings-mpfr 1000 Using MPFR-3.1.0-dev with GMP-5.0.2 [precision is 3322 bits] x*y took 0.004444 ms (262143 eval in 1165 ms) x*x took 0.002686 ms (524287 eval in 1408 ms) x/y took 0.006989 ms (262143 eval in 1832 ms) sqrt(x) took 0.007084 ms (262143 eval in 1857 ms) exp(x) took 0.292063 ms (4095 eval in 1196 ms) log(x) took 0.246886 ms (4095 eval in 1011 ms) sin(x) took 0.259096 ms (4095 eval in 1061 ms) cos(x) took 0.244933 ms (4095 eval in 1003 ms) arccos(x) took 0.556424 ms (2047 eval in 1139 ms) arctan(x) took 0.526624 ms (2047 eval in 1078 ms) We see that other routines also benefit from the speedup in mpfr_sqr and mpfr_div (log, sin, cos, arccos, arctan). 2011-07-29 Paul Zimmermann [algorithms.tex] added algorithm for division with Mulders' short product (can anybody check the algorithm is ok?) 2011-07-29 Vincent Lefèvre [src/vasprintf.c] Added a comment. [src/get_str.c] Added a comment about the use of mpfr_ceil_mul (exported and declared in mpfr-impl.h since r7760). 2011-07-28 Philippe Théveny Avoid expensive calls to mpfr_get_prec() using mpfr_ceil_mul() instead. Make ceil_mul() public as mpfr_ceil_mul() in mpfr-impl.h 2011-07-28 Vincent Lefèvre [src/mulders.c] MPFR coding conventions for r7752. 2011-07-28 Paul Zimmermann modified the default tuning parameters so they are within the bounds of the ARITH-20 paper "Short Division of Long Integers" [src/mulders.c] declare mpfr_mullow_n as non-static since it might be useful elsewhere [tuneup.c] fix tuning bounds of short product and division according to the ARITH-20 paper [acinclude.m4] detect long double format in m68k [tget_flt.c] added test to check FLT_MAX + FLT_MAX gives INFP (to early detect compiler bugs) [nightly-test] changed -pedantic-errors into -pedantic [mulders.c] added some code for short division (FoldDiv, not used), added comments and fixed bounds in accordance with the ARITH-20 paper 2011-07-28 Philippe Théveny Use a buffer in order to avoid a double call to mpfr_get_str. 2011-07-26 Vincent Lefèvre [src/log.c] Replaced TMP_* by MPFR_GROUP_* (patch by Patrick). 2011-07-22 Vincent Lefèvre [doc/mpfr.texi] Added a comment about TLS variable initialization. [doc/mpfr.texi] Added information about TLS variable initialization. [doc/mpfr.texi] Split Chapter "MPFR Basics" into nodes as it is now quite large (thus references to particular sections are now possible). 2011-07-18 Paul Zimmermann [vasprintf.c] simplified and improved round_to_10_power(), also contributed a negative number of lines of code :-) Still not optimal, since round_to_10_power() is still called twice for printing say pi with mpfr_printf ("%Rg\n", x), once from partition_number(), once from regular_fg(), and thus mpfr_get_str is called at least 3 times! [configure.ac] improve error message when libgmp is not found [mpfr.texi] added note about threads for mpfr_set_default_prec and mpfr_get_default_prec 2011-07-06 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [NEWS, doc/mpfr.texi] mpfr_min_prec was a new function in MPFR 3.0.0. 2011-07-01 Vincent Lefèvre [tests/tget_flt.c] Replaced FLT_MAX + FLT_MAX by (float) DBL_POS_INF, which should trigger fewer compiler bugs. See: https://sympa.inria.fr/sympa/arc/mpfr/2011-07/msg00002.html [src/ieee_floats.h] Added a comment about the NaN format when _GMP_IEEE_FLOATS is defined. 2011-07-01 Paul Zimmermann [tget_flt.c] check for compiler bug (https://sympa.inria.fr/sympa/arc/mpfr/2011-07/msg00000.html) 2011-06-30 Vincent Lefèvre Removed all the svn:eol-style properties (they were set to "native"), and in doc/README.dev, explained why svn:eol-style native should not be used. 2011-06-28 Vincent Lefèvre [tools/ck-version-info] Check DLL version in LIBMPFR_LDFLAGS line from configure.ac (patch by Stefan Graff, with minor changes). 2011-06-26 Vincent Lefèvre [tools/ck-version-info] 2 corrections: * update due to the change of the libmpfr_la_LDFLAGS line in r7724; * to support the CRLF end-of-line sometimes used under MS-Windows (perl should normally take care of that, but Windows software is not always consistent). [doc/mpfr.texi] Due to the "@unnumbered Function and Type Index", replaced the other "Function Index" by "Function and Type Index" (note: the function index and the type index are merged thanks to the "@synindex tp fn" line at the beginning of mpfr.texi). 2011-06-25 Vincent Lefèvre Ported patch r7723 (changes suggested by Stefan Graff to be able to build Windows DLLs with GCC 4.6[*]) to the trunk, not tested (something more may be needed due to the source reorganization). [*] https://sympa.inria.fr/sympa/arc/mpfr/2011-06/msg00013.html 2011-06-21 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [doc/mpfr.texi] Corrected a note about mpfr_set_*, due to the addition of mpfr_set_decimal64. 2011-06-20 Vincent Lefèvre [doc/README.dev] Removed comment added in r7181, as it is no longer necessary since r7182 (new option --enable-gmp-internals). [configure.ac] Updated comment concerning __gmpn_rootrem (mention WANT_GMP_INTERNALS). [doc/README.dev] Added a note about logging and timeout. [src] Conversion into UTF-8 (only comments were concerned). [TODO] Conversion into UTF-8. [src/pow.c] Made the code more robust concerning the scaling (a bug was very unlikely, though), and updated the comments (partial proof). 2011-06-01 Vincent Lefèvre [examples/version.c] Output MPFR features and size of MPFR types. 2011-05-22 Paul Zimmermann [src/rec_sqrt.c] continued review; I can now prove that cu=0 in all cases [tests/trec_sqrt.c] added tests for corner cases 2011-05-20 Paul Zimmermann [rec_sqrt.c] more review of codes, following comments from Vincent 2011-05-19 Paul Zimmermann [rec_sqrt.c] removed tabs [rec_sqrt.c] review and small change of changeset 7651: most probably cu=0 when th=0 (and maybe cu=0 always, I cannot find an example where cu <> 0) but considering the case th=0 is more natural. 2011-05-18 Vincent Lefèvre [doc/mpfr.texi] List the contributors in the alphabetic order, like the main authors. Made AUTHORS and doc/mpfr.texi consistent. Updated AUTHORS file and copyright notices (for more consistency). [tests/thyperbolic.c] Fixed copyright notice. [src/inp_str.c] Improved comment. [src/fits_s.h] Improved comment. [doc/mpfr.texi] Updated the month. [src/mpfr.h] Avoid a warning from mpfrlint. [configure.ac] Consistency change in the copyright notice. [tests/tsqr.c] Added a note in the check_mpn_sqr error message. [tests/tsqr.c] Added a test of mpn_sqr concerning a bug seen with GCC 4.5.2 and GMP 5.0.1 on m68k (m68000 target). 2011-05-17 Vincent Lefèvre [doc/README.dev] Added a note about a texinfo bug. 2011-05-13 Vincent Lefèvre Added mpfr-intmax.h header. Started to support mpfr_exp_t defined as intmax_t (_MPFR_EXP_FORMAT==4). [NEWS] Added that the mpfr.h header can be included several times, while still supporting optional functions. [doc/mpfr.texi] Document what to do if mpfr.h can be included multiple times (fixes MPFR bug #9653). 2011-05-12 Vincent Lefèvre [doc/README.dev] Added a note to run tests with -D_MPFR_PREC_FORMAT=2. [src/mpfr-impl.h] Exponent properties: corrected comments and removed obsolete mp_exp_unsigned_t definition (was internal only). [src/{mpfr.h,mpfr-impl.h,vasprintf.c}] Clean-up and improvement of definitions related to mpfr_exp_t. MPFR can now be built with -D_MPFR_PREC_FORMAT=2 to have mpfr_prec_t and mpfr_exp_t defined as an int. [src/mpfr.h] Fixed spaces in a comment. Fixed printf's calls: support the case where mpfr_prec_t is not a long (or unsigned long). [merged changeset r7643 from the exp-int branch] [src/strtofr.c] Support the case where mpfr_exp_t < long; mpfr_exp_t is currently defined as mp_exp_t, which comes from GMP, and GMP currently defines mp_exp_t as a long, except on Cray (never tested for MPFR). But this may change in the future (possibly as an option)... [merged changeset r7642 from the exp-int branch] [src/mpfr-impl.h] Added missing parentheses in MPFR_SADD_OVERFLOW (fortunately the current MPFR code was not affected). [tests/tpow_z.c] More details for a test in case of failure. [src/sub1.c] Fixed several bugs: integer overflows and potential out-of-bound pointers. They might be visible on particular platforms, with a particular configuration (e.g. 64-bit limbs and 32-bit exponent type) or particular compiler options (to check such overflows). [merged changesets r7637-7638 from the exp-int branch] 2011-05-11 Vincent Lefèvre [tests/tsin.c] Added a test (it failed before the fix in r7308). Fixed constants pi and log(2) computation when logging is used: When MPFR is built with logging support, these two constants are used by the logging functions (via mpfr_fprintf, then mpfr_log, for the base conversion). Since the mpfr_cache function isn't re-entrant when working on the same cache, we need to define two caches for each constant. Otherwise the constants could be incorrect; for instance, "MPFR_LOG_ALL=1 ./tconst_pi" was failing. Note: the bug was introduced with the new logging system from r7575 for MPFR 3.1.0, based on mpfr_fprintf instead of mpfr_out_str (which doesn't depend on mpfr_log). 2011-05-09 Vincent Lefèvre [tests/tests.c] Replaced atoi by strtoul to read the seed from GMP_CHECK_RANDOMIZE, as it is an unsigned long. [tests/texp.c] Fixed the test comparing mpfr_exp_2 and mpfr_exp_3: filter out 0, as it is handled correctly only by mpfr_exp. 2011-05-06 Vincent Lefèvre [doc/README.dev] Completed the note to run tests under gdb. [doc/README.dev] Added a note to run tests under gdb. 2011-05-06 Paul Zimmermann [README.dev] added hint for logging 2011-05-04 Vincent Lefèvre [src/atan.c] Fixed bug in mpfr_atan: mpfr_check_range was called on the unrounded result (no longer allocated) instead of the rounded result. Consequence of this bug: possible incorrect or invalid result and/or incorrect flags if either the unrounded result or rounded result is not in the current exponent range. Or possibly worse if the memory used by the unrounded result is modified before the return of the function. [tests/tatan.c] Corrected a comment. [tests/tatan.c] Added a testcase showing a failure of mpfr_atan in a reduced exponent range. [src/const_pi.c] Removed useless assignment. 2011-05-04 Paul Zimmermann [mpfr-impl.h] fixed typo 2011-05-03 Vincent Lefèvre [src/mpfr-impl.h] In MPFR_RNDRAW_GEN, do not try to compute the sticky bit when not necessary (directed mode with rb = 1). [src/mul.c] FIXME comment: with the change in MPFR_RNDRAW_GEN, uninitialized data are no longer read; there's still something wrong, at least with the code documentation, though. [src/mul.c] Updated the FIXME comment. Bug in mpfr_mul: a call mpfr_mulhigh_n(pointers..., n) where n is some size is done, but the mpfr_mul code assumes a result whose size can be arbitrarily larger, thus may depend on uninitialised data. * [src/mul.c] Added a FIXME comment. * [tests/tmul.c] Added a corresponding test. The result is not checked but valgrind complains of the use of uninitialised value(s). [src/mpfr-impl.h] MPFR_RNDRAW_GEN: added other missing parentheses. [src/mpfr-impl.h] MPFR_RNDRAW_GEN: added missing parentheses. [src/mpfr-impl.h] Logging: do not take into account the Ziv loops due to logging (i.e. used by the MPFR functions called by the mpfr_fprintf in LOG_PRINT). [src/mpfr-impl.h] Avoid recursive logging for MPFR_ZIV_* macros too, and fixed type for the output of the precision. [src/mpfr-impl.h] Avoid recursive logging (not wanted and freezes MPFR). [src/rec_sqrt.c] Improved the comment added in r7651. 2011-05-02 Vincent Lefèvre [src/rec_sqrt.c] Fixed the buffer overflow (bug 12553). [src/rec_sqrt.c] Added an assertion to avoid a buffer overflow (mpn_add_1 and mpn_sub_1 don't support size = 0). It sometimes fails, and this is the following bug: https://gforge.inria.fr/tracker/index.php?func=detail&aid=12553&group_id=136&atid=619 [src/rec_sqrt.c] Added a comment about a buffer overflow. Bug report: https://gforge.inria.fr/tracker/index.php?func=detail&aid=12553&group_id=136&atid=619 [tests/tvalist.c] Make sure that fct is used (avoid a warning). [tests/tsin_cos.c] status_f and status were not read (compared) in coverage_01032011, yielding a warning. [src/mpfr-impl.h] Avoid a spurious warning with some use of MPFR_BLOCK. [doc/README.dev] Added command to test with valgrind. 2011-05-01 Vincent Lefèvre Added "make dist" support for -dev MPFR versions by distributing the tests/data files in the tarball for such MPFR versions ("make check" fails if some data file couldn't be read for such versions). * configure.ac: add a Makefile variable DATAFILES, which contains the list of the tests/data files if the MPFR version ends with "-dev". * Makefile.am: add $(DATAFILES) to EXTRA_DIST. 2011-04-29 Vincent Lefèvre Added casts for printf (mpfr_prec_t was assumed to be an unsigned long). [src/strtofr.c] Support the case where mpfr_exp_t < long. [src/mpfr-impl.h] Added missing parentheses in MPFR_SADD_OVERFLOW. [tests/trint.c] Removed a useless pointer cast (in general, such casts are either useless or incorrect, as breaking aliasing rules). 2011-04-28 Vincent Lefèvre [tests/tpow_z.c] More details concerning a failure. [src/sub1.c] Added a useless cast (for maintainability: may be needed in case of future change) and comments about the last change (r7637). [src/sub1.c] Fixed several bugs: integer overflows and potential out-of-bound pointers. [src/cmp2.c] Added an assertion. 2011-04-18 Vincent Lefèvre [acinclude.m4] Correction of problems triggering the warning "warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body" with autoconf 2.68: * Fixed missing quoting in an AC_RUN_IFELSE. * Added an AC_LANG_SOURCE in another AC_RUN_IFELSE. [acinclude.m4] s/can not/cannot/ [acinclude.m4] Added comment about the warning: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body 2011-04-15 Vincent Lefèvre [acinclude.m4] Use conventional quotes. [acinclude.m4] Added a comment. 2011-04-12 Vincent Lefèvre [src/asin.c] Fixed bug in mpfr_asin for x = 1 or -1 in extremely reduced exponent range (when pi is not representable, but pi/2 is). [tests/tasin.c] Added testcase. 2011-04-08 Vincent Lefèvre [TODO] Removed "allow generic tests to run with a restricted exponent range" (this was done in r7470). 2011-04-08 Paul Zimmermann [TODO] added item 2011-04-05 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [INSTALL,doc/mpfr.texi] Say that mpfr@loria.fr is the MPFR mailing-list. 2011-04-01 Vincent Lefèvre [configure.ac] Removed the -Wno-format GCC option, which was added when logging was used, as it is no longer needed after the changes done in r7575,7578 (mpfr_fprintf is now used for logging instead of fprintf with the Glibc register_printf_function extension). 2011-03-29 Vincent Lefèvre [tests/reuse.c] Added a comment. [src/pow.c] Fixed a bug in mpfr_pow_general when an argument is reused (e.g. mpfr_pow(x,x,y,rnd) or mpfr_pow(y,x,y,rnd)) and the result is negative, thus when x is negative and y is a huge odd integer ("huge" because not-too-large integers are currently handled by mpfr_pow_z). [tests/reuse.c] Added a mpfr_pow(x,x,y,rnd) test showing a failure when x is negative and y is a huge odd integer. [src/subnormal.c] Improved a comment. [tests/reuse.c] Test also negative numbers. [tests/reuse.c] GNU coding style. [src/mul.c] Updated a comment. [src/powerof2.c] Updated comment. [src/powerof2.c] More detailed comment. 2011-03-21 Paul Zimmermann [cfarm.sh] complete tests with mpfr-3.0.1-rc1 2011-03-21 Vincent Lefèvre [src/pow_z.c] Fixed bug bug20110320, that occurs in extremely reduced exponent range (more precisely, if 1 is out of range, i.e. emin > 1). [tests/tpow.c] Added testcase bug20110320. [tests/tgeneric.c] Added debug information. 2011-03-20 Paul Zimmermann [cfarm.sh] shell script to test MPFR on the GCC Compile Farm 2011-03-18 Paul Zimmermann [digamma.c] fixed compiler warning (ISO C90 forbids mixed declarations and code) 2011-03-17 Vincent Lefèvre [NEWS] Added a note about the fix in the mpfr_subnormalize implementation, in case users would think the old behavior was chosen on purpose. Completed r7575 (Get rid of deprecated register_printf_function function in logging system): there was a remaining old MPFR_LOG_FUNC in "src/div_ui.c". Now, the MPFR source no longer contains '%#R'. [src/mul_2si.c] Removed trailing whitespace. [doc/README.dev] Fixed variable name from r7575. 2011-03-17 Philippe Théveny Get rid of deprecated register_printf_function function in logging system. 2011-03-15 Vincent Lefèvre [src/erfc.c] Fixed a problem (incorrect flags or possible crash) in extremely reduced exponent range. Support the case where mpfr_prec_t is larger than a long. [tests/terf.c] Added some tests of the flags (no failure in them, thanks to the mpfr_cmp_si (x, -27282) in erfc.c, for 1b). [tests/tgeneric.c] In failure messages, output the name of the tested function. This is useful for programs that have generic tests for several functions, such as terf. [tests/terf.c] Added a testcase showing a failure due to bad flags in a reduced exponent range. 2011-03-14 Vincent Lefèvre [tests/terf.c] Changed mp_exp_t (r7564) to mpfr_exp_t. 2011-03-11 Vincent Lefèvre [src/erfc.c] Added an assertion for future platforms (e.g. with 128-bit exponent type). [src/erfc.c] Fixed r7564 (comparison must really be signed). [tests/terf.c] Fixed test added in r7564 for 32-bit machines. 2011-03-11 Paul Zimmermann [erfc.c] fixed bug found by Pascal Molin: when we increase the exponent range on 64-bit machines, erfc() wrongly underflows for x >= 27282 2011-03-10 Vincent Lefèvre [src/jn.c] Fixed the MPFR_FAST_COMPUTE_IF_SMALL_INPUT test for n == 1 in underflow cases. [src/jn.c] No need for mpfr_clear_flags (already done in MPFR_BLOCK). [src/jn.c] Check that no intermediate underflow or overflow occurs. [doc/algorithms.tex] For the Bessel function, say that the algorithm assumes that no underflows/overflows occur. 2011-03-09 Vincent Lefèvre [src/gamma.c] More robust code (for the change in r7551). Removed trailing spaces. [tests/tgeneric.c] Added feature for MPFR_SUSPICIOUS_OVERFLOW to avoid spurious failures by defining TGENERIC_SO_TEST to some well-chosen test. [tests/tgamma.c] Added a comment about MPFR_SUSPICIOUS_OVERFLOW. [src/gamma.c] Fixed the special code for tiny values. [tests/tgamma.c] Corrected a test and added other tests for tiny x > 0. [tests/tgamma.c] Updated a comment. [tests/tgamma.c] Restore emax. [tests/tgamma.c] Do not initialize x twice. [tests/tgamma.c] Do not run the same test twice if emin = MPFR_EMIN_MIN. [tests/tgamma.c] Added tests for tiny values, showing bugs in special code for such values. Run tgamma with at least an argument to get all the failures. 2011-03-07 Vincent Lefèvre [src/jn.c] Fixed mpfr_jn_k0() internal function: * The prototype was incorrect: one needs "unsigned long" for n (actually absn), in case absn is equal to - LONG_MIN. * The formula and the code were incorrect for n = 0, due to the division by n; it was yielding k0 = ULONG_MAX. The case n = 0 is now handled separately. * Small optimization: division by log(2) -> multiplication by 1/log(2). [src/jn.c] Avoid integer overflow in the computation of the initial working precision. This makes several tests fail, but logging shows that previous non-failure was due to undefined behavior due to huge k0 computed by mpfr_jn_k0. [src/jn.c] Added a comment for mpfrlint. [tools/mpfrlint] Change of r7515: any mpfr_clear_* can be mentioned. [src/jn.c] Added comments and fixed a bug. [src/jn.c] Detect incorrect error analysis (that may have been the goal of the assertion corrected in r7534, but this wasn't documented). Added a FIXME comment. [src/jn.c] Fixed incorrect assertion. It could occur only in precision >= 2^(1+s/2), where s is the bitsize of a "long", e.g. p >= 2^17 = 131072 on most 32-bit machines and p >= 2^33 = 8,589,934,592 on most 64-bit machines. Only some arguments are affected (|z| between around 2^(s/2) and p/2). [tests/Makefile.am] Added a comment. [doc/README.dev] Corrected a typo. 2011-03-06 Vincent Lefèvre [src/jn.c] Improved underflow detection. Still not complete, though. [src/jn.c] Comments: English usage. 2011-03-05 Vincent Lefèvre [tests/trint.c] mantissa -> significand (standard and correct term). [tests/trint.c] Do not use snprintf (C99). 2011-03-04 Vincent Lefèvre [tools/mpfrlint] Added a test to check that the snprintf function (C99) is not used. 2011-03-04 Olivier Demengeon Previous extended coverage test in trint.c now self generate tests in and compare values Extend test coverage of mpfr_rint to 100% 2011-03-03 Paul Zimmermann [src/add1sp.c] same as previous commits [src/sub1sp.c] ibidem (see previous commit log) [add1.c] ibidem (see previous commit log) 2011-03-03 Vincent Lefèvre [src/add.c,src/sub.c] Split assertions for C90 compilers, to avoid too long strings generated by #expr. Problem seen with: gcc -ansi -pedantic-errors [src/yn.c] Minor change. [src/yn.c] Extend the exponent range (code not checked concerning internal exceptions, such as overflows, underflows and divby0). [src/agm.c] Added comments (for mpfrlint, in particular). [tools/mpfrlint] The use of mpfr_overflow_p, etc. is allowed if mpfr_clear_flags is mentioned (useful for checking purpose at the end of a function, but this needs an explicit mpfr_clear_flags; otherwise MPFR_BLOCK should still be used). [src/agm.c] Completed scaling to avoid intermediate overflow/underflow. [src/agm.c] Bug fix in error computation: in Ziv's iteration, err kept its value from the previous iteration instead of being reset to 0. Consequence: a possible loss of performance in rare cases. [src/cmp2.c] Removed a useless assertion and updated comments. 2011-03-02 Vincent Lefèvre [src/agm.c] Added a FIXME comment. [src/agm.c] Updated exception checking (more informative). [src/agm.c] Check internal exceptions: the error analysis may be incorrect in case of exception. [src/agm.c] Implemented scaling to avoid intermediate overflow/underflow (but the tagm test still fails, due to a rounding error this time). [tests/tagm.c] Added tests triggering intermediate underflow/overflow. [tests/tagm.c] Also test the ternary value and the flags. [tests/tagm.c] Corrected values (using Pari). [src/agm.c] Extend the exponent range. This doesn't make the algorithm correct yet, as intermediate underflow or overflow is still possible in the first multiplication. 2011-03-01 Olivier Demengeon Change some functions called in test tsin_cos.c Extend coverage test of mpfr_sincos_fast to 100% Extend coverage test of mpfr_custom_get_kind to 100% 2011-02-25 Vincent Lefèvre [src/jn.c] Fix: support reduced exponent ranges for small inputs. [src/gamma.c] Added a comment about an overflow case. [tests/tgamma.c] Added tests in maximum exponent range. [src/gamma.c] Fixed flags when x if very small (protect from intermediate overflow). [tests/tgamma.c] Corrected test number. [tests/tgamma.c] Added a test in maximum exponent range. [src/gamma.c] Fixed inexact flag when x if very small. [tests/tgamma.c] Added tests. [src/gamma.c] Fixed a bug occurring in reduced exponent range. [tests/tgamma.c] Added corresponding testcase. [src/lngamma.c] Do not use MPFR_EXP after a mpfr_clear (even though this currently work). [src/rem1.c] Fixed mpfr_rem1 in reduced exponent range (the function is actually simplified). 2011-02-25 Paul Zimmermann [TODO] added an item 2011-02-25 Vincent Lefèvre Fixed mpfr_div_2si, mpfr_div_2ui and mpfr_mul_2si in some corner cases. [tests/tmul_2exp.c] Small correction in output (in case of failure). 2011-02-21 Vincent Lefèvre [tests/tset_q.c] Corrections in function prototypes. 2011-02-21 Olivier Demengeon Remove the use of mpfr_get_default_prec in some coverage test Add some coverage test in tests/tset_q.c fixed coding convention of 2 tests functions 2011-02-19 Paul Zimmermann [tget_d.c] fixed some compiler errors and warnings 2011-02-18 Vincent Lefèvre [tests/tversion.c] Split a printf into several ones to reduce the string length below the 509-byte limit from C90 (useful to avoid an error when testing with gcc -ansi -pedantic-errors). 2011-02-18 Olivier Demengeon Extend test coverage to 100% on mpfr_z_sub and mpfr_mul_q function Extend test coverage on mpfr_get_d_2exp function 2011-02-18 Vincent Lefèvre [tests/tmul_2exp.c] Also test mpfr_div_2si and mpfr_div_2ui (same bug). [tests/tmul_2exp.c] Added a testcase showing a bug in mpfr_mul_2si (possible intermediate overflow). [src/zeta.c] Support zeta(eps) with |eps| very small or 0 in extremely reduced exponent range. [src/atan2.c] Fix: the overflow or underflow flag was set in the case x = power of two and y/x overflows or underflows. [src/atan2.c] Support special cases in extremely reduced exponent range. [src/acos.c] Support acos(0) in extremely reduced exponent range. 2011-02-17 Vincent Lefèvre [tests/tgeneric.c] Added generic tests in a reduced exponent range. This currently makes 10 tests fail on a 64-bit machine. [tests/mpfr-test.h] Defined a SAME_VAL(X,Y) macro to test whether two floating-point data have the same value, seen as an element of the set of the floating-point data (Level 2 in the IEEE 754-2008 standard). [src/mpfr-impl.h] Defined a MPFR_EXP_FSPEC macro containing the format specifier for mpfr_eexp_t, to output an exponent with: printf ("%" MPFR_EXP_FSPEC "d", (mpfr_eexp_t) exponent); [tests/tgeneric.c] Reformat. [doc/README.dev] Added a warning about whitespace in the mpfr.texi file. [doc/mpfr.texi] Fixed spacing for the mpfr.info file. 2011-02-10 Vincent Lefèvre [tools/mpfrlint] Detect the use of mp_ptr and mp_srcptr. [doc/mpfr.texi] Updated the month. [src/gmp_op.c] Added a blank line. 2011-02-09 Olivier Demengeon Added mpfr_z_sub (function/test/doc) 2011-02-09 Vincent Lefèvre Added new types mpfr_limb_ptr and mpfr_limb_srcptr to src/mpfr-impl.h, and replaced mp_ptr and mp_srcptr (GMP internals) by these 2 new types respectively. 2011-02-08 Vincent Lefèvre [src/mpfr-impl.h] Fix for Intel's compiler (ICC) under MS Windows: MPFR was incorrectly assuming that ICC had some extensions like under GNU/Linux. This made the MPFR compilation fail. [src/mpfr-impl.h] Corrected a typo in a comment. 2011-02-05 Vincent Lefèvre [INSTALL] Removed incorrect note. 2011-02-05 Paul Zimmermann [INSTALL] added hint for VS2008 and Intel compiler v11.1 2011-02-03 Vincent Lefèvre [configure.ac,Makefile.am] Clean-up and depend on GNU Automake 1.11. 2011-01-31 Vincent Lefèvre [src/zeta_ui.c,tests/tzeta_ui.c] Patch from Patrick Pélissier for the division-by-zero support in mpfr_zeta_ui (and test): 2011-01-30 Paul Zimmermann [src/zeta.c] patch from Patrick Pelissier (problem with division by zero flag) 2011-01-28 Paul Zimmermann [TODO] removed division by zero item (done) [src/get_str.c,TODO] updated comments, mpfr_get_str already supports base <= 62 2011-01-27 Vincent Lefèvre [tests/tj0.c] GMP_RNDN → MPFR_RNDN. [src/subnormal.c] Set the inexact and underflow flags when needed. Fixes https://gforge.inria.fr/tracker/index.php?func=detail&aid=7958&group_id=136&atid=622 [tests/tsubnormal.c] Improved the tests, in particular for the flags. [doc/mpfr.texi] Documented the change. [doc/mpfr.texi] Corrected order in Section "Changed Functions". [tests/tj0.c] Added case for which s = 0 occurs in mpfr_jn. [src/jn.c] Added a log message. [src/div_ui.c] Added logging support. 2011-01-26 Vincent Lefèvre [tests/tsum.c] Fixed bug in test (do not set the exponent on 0). [tests/tsum.c] Formatting. [tests/tsum.c] Fixed get_prec_max and added some checks. Current failure: tab[1] is not valid. [src/sum.c] Added an assertion. [src/check.c] Replaced MPFR_IS_PURE_FP by !MPFR_IS_SINGULAR, the former macro now has a check for validity in debug mode (r7426). The goal of mpfr_check is to test the validity, so that we don't want this check here. [src/mpfr-impl.h] In the MPFR_IS_PURE_FP test, if positive, check that the number is normalized (debug mode only). This makes 2 tests fail: tcheck and tsum. Note: with logging active, tsum was already triggering an assertion failure in mpfr_get_str (via mpfr_add). [src/add.c] Formatting. [src/li2.c] Fixed crash in mpfr_li2 when logging is used. 2011-01-24 Vincent Lefèvre [src/jn.c] Corrected a comment. 2011-01-24 Paul Zimmermann [src/jn.c] added notes for correctness of the algorithm used 2011-01-24 Vincent Lefèvre [src/jn.c] C90 compatibility fix (empty macro arguments are undefined). [src/jn.c] Added an assaertion against a potential overflow (which probably never occurs, but this should be proved...). 2011-01-24 Paul Zimmermann [src/jn.c] patch from Patrick Pelissier 2011-01-23 Vincent Lefèvre [src/jn.c] Forgot to change an MPFR_EXP to MPFR_GET_EXP. [src/jn.c] Replaced MPFR_EXP by MPFR_GET_EXP when the value should really be an exponent. Removed incorrect and useless casts. Added an assertion to protect against potentially incorrect code. [src/jn.c] Patch from Patrick Pélissier (mpfr_check_range and other). 2011-01-21 Vincent Lefèvre [tools/mpfrlint] Update the check for mpfr_printf-like functions in the tests. [tests/tprintf.c] Consistency. [tests/tgrandom.c] Added a comment. [tests/tgrandom.c] Protection of the mpfr_printf by #ifdef HAVE_STDARG. 2011-01-20 Vincent Lefèvre [src/eint.c] Added a FIXME. 2011-01-18 Paul Zimmermann [src/out_raw.c] added pointer to discussion 2011-01-17 Vincent Lefèvre [tests/tvalist.c] Correction for C++ compilers. [doc/mpfr.texi] Added division-by-zero exception. [doc/README.dev] Updated "To make a release". [NEWS] Update for MPFR 3.1.x. [src/grandom.c] Reformat. [tools/mpfrlint] tests/tvalist.c can use mpfr_printf-like functions. [tests/tgrandom.c] Added a FIXME: do not use mpfr_printf in the tests. [tests] Untabified and removed trailing spaces. [src/grandom.c,src/mpfr.h] Untabified and removed trailing spaces. [src/frexp.c] Corrections. [src/out_raw.c] Untabified. [src/out_raw.c] Fixed some bugs on the incomplete code. [src/atan2.c] MPFR_EXP -> MPFR_GET_EXP and reformat. [src/ai.c] Removed trailing spaces. [doc/mpfr.texi] Updated the month. Copyright notice update: added 2011 with perl -pi -e 's/2010 Free Software/2010, 2011 Free Software/' **/*(^/) under zsh, reverting the ChangeLog file and the m4 and tools/mbench directories. [doc/README.dev] Updated year in example. tests: updated svn:ignore property. [src/pow.c] Added an assertion. [tests/td_div.c] Consistency change. [tests/tdiv_d.c] Updated test of special cases. [src/log1p.c] Added support for the division-by-zero exception. [tests/tlog1p.c] Test the flags for special cases. Added support for the division-by-zero exception in functions mpfr_atanh, mpfr_cot, mpfr_coth, mpfr_csc, mpfr_csch, mpfr_digamma, mpfr_eint, mpfr_gamma, mpfr_lgamma, mpfr_lngamma, mpfr_log, mpfr_log2 and mpfr_log10. 2011-01-16 Laurent Fousse [tests/tgrandom.c] Add missing cast for malloc. 2011-01-16 Vincent Lefèvre [src/yn.c] Added support for the division-by-zero exception. [src/rec_sqrt.c] Added support for the division-by-zero exception. [src/pow_si.c] Improved robustness (in case of future changes). Added support for the division-by-zero exception for the power functions (with additional tests). (Corrected patch from Patrick.) 2011-01-16 Laurent Fousse Rename mpfr_urandom_gaussian to mpfr_grandom. 2011-01-15 Vincent Lefèvre [doc/mpfr.texi] Corrections for mpfr_urandom_gaussian. [tests/turandom_gaussian.c] Fixed C99-only code. 2011-01-15 Paul Zimmermann [src/frexp.c,tests/tfrexp.c] added new function mpfr_frexp [src/urandom_gaussian.c] fixed copyright line [src/out_raw.c] started writing code (work in progress, please continue if you are interested) 2011-01-14 Laurent Fousse [doc/mpfr.texi] Document urandom_gaussian. [tests/Makefile.am] Include turandom_gaussian in tests. [tests/turandom_gaussian.c] Add tests for urandom_gaussian. 2011-01-14 Vincent Lefèvre [tests/tdiv.c] Added consistency tests between mpfr_div, mpfr_ui_div, mpfr_si_div, mpfr_div_ui and mpfr_div_si (check the ternary value, the flags and the result of the division). [src/ui_div.c] Fixed prototype formatting. [src/div_ui.c] Fixed prototype formatting. Set division-by-zero flag. 2011-01-14 Laurent Fousse [src/urandom_gaussian.c] Fix x -> xp, and scaling. [src/urandom_gaussian.c] Pick the signs of the outputs at random. [src/urandom_gaussian.c] Fix precision of temporary results. [src/urandom_gaussian.c] Add missing inits/clears. [src/mpfr.h] Declare urandom_gaussian. [src/Makefile.am] Add urandom_gaussian.c to the sources. [src/urandom_gaussian] Start work on gaussian distribution. 2011-01-14 Vincent Lefèvre [tests/tgeneric.c] Fixed code introduced in r7346, again. 2011-01-14 Paul Zimmermann [sin_cos.c] moved macros to mpfr-impl.h, added README [sin_cos.c] new inexact flags computed by mpfr_check_range were lost 2011-01-14 Vincent Lefèvre [tests/tgeneric.c] Fixed code introduced in r7346. [tools/coverage] Update from Patrick. [src/ui_div.c] Set the division-by-zero flag. [tests/tui_div.c] Updated and improved the test of special cases. Note: tpow_all currently fails since the support of the division-by-zero exception is not complete yet. [src/div.c] Set the division-by-zero flag. [tests/tdiv.c, tests/td_div.c] Updated and improved the test of special cases. [tests/tset.c] Tests didn't fail in case of error from PRINT_ERROR_IF. [tests/tgeneric.c] Added comments. [tests/tgeneric.c] Check the division-by-zero flag. Improved tests/texceptions.c (mpfr_clear_*, mpfr_set_*). Added support for the division-by-zero exception. [src/exceptions.c] Fixed bad #undef's (with currently no consequences). 2011-01-14 Paul Zimmermann [TODO] removed item about inlined mpfr_neg: Patrick Pelissier tried it but it does not speed things 2011-01-14 Vincent Lefèvre [src/mpfr-impl.h] Removed an obsolete comment. 2011-01-13 Laurent Fousse [src/atan2.c] "Exact" division can be inexact because of the exponent range. 2011-01-13 Paul Zimmermann [out_raw.c] exchanged bits for precision and exponent [out_raw.c] first proposal for external format 2011-01-13 Vincent Lefèvre [src/mpfr-impl.h] MPFR_IS_POWER_OF_2: added parentheses. 2011-01-13 Laurent Fousse Add tests for special case of atan2 (x power of 2). Add special case for atan2(x,y) when x is a power of 2. New macro MPFR_IS_POWER_OF_2. 2011-01-13 Vincent Lefèvre TLS support is now detected automatically. If TLS is supported, MPFR is built as thread safe by default. To disable TLS explicitly, configure MPFR with --disable-thread-safe. 2011-01-13 Laurent Fousse Add tests for mpfr_ai special case x=0. Add special case for x=0 in mpfr_ai1. 2011-01-13 Paul Zimmermann [algorithms.tex] extended Lemma 2 to the case of terms of the form 1/(1+delta) 2011-01-13 Vincent Lefèvre tests: return 77 for skipped tests (see GNU Automake manual). tests: updated svn:ignore property. TODO update after r7317 and r7320. Support multiple inclusions of mpfr.h w.r.t. and (MPFR_USE_FILE and/or MPFR_USE_VA_LIST are needed until GMP is fixed). Added test "tests/tvalist.c". 2011-01-13 Paul Zimmermann [src/mpfr-longlong.h] idem as previous commit for other 2 FIXME's [mpfr-longlong.h] resolved one FIXME, by adding a new one :-) 2011-01-13 Vincent Lefèvre Support multiple inclusions of mpfr.h w.r.t. / . 2011-01-06 Paul Zimmermann another patch from Patrick Pelissier to test get_ld (with export of data used) patch from Patrick Pelissier to use clock_getime instead of rdtsc (use "make rt" instead of "make") References: https://stackoverflow.com/questions/3388134/rdtsc-accuracy-across-cpu-cores https://en.wikipedia.org/wiki/Time_Stamp_Counter 2010-12-25 Vincent Lefèvre [src/get_ld.c] Updated a comment about the last change. [src/get_ld.c] Minor performance improvement. 2010-12-19 Vincent Lefèvre [tools/mbench/Makefile] Update due to source reorganization (r7087): patch from Patrick Pelissier. 2010-12-17 Vincent Lefèvre [TODO] Update (exp-int branch, internal macro). [src/sin.c] Fixed failure in debug mode (missing MPFR_IS_ZERO test). [src/rec_sqrt.c] Improved comment. Added exp-int branch from r7304, where mpfr_exp_t is defined as an int instead of mp_exp_t. This is for testing only for usual 64-bit machines (e.g. x86_64 GNU/Linux), where mpfr_exp_t and mpfr_prec_t are now on 32 bits instead of 64 bits. Many tests currently fail for unknown reasons. TODO: find the cause of these failures, starting with the low level functions (since they can affect higher level ones). 2010-12-17 Paul Zimmermann [rec_sqrt.c] put back some information lost in commit 7302 2010-12-17 Vincent Lefèvre [src/cmp2.c] Corrected a comment. Replaced some MPFR_EXP by MPFR_GET_EXP. [src/rec_sqrt.c] Removed a variable that was used only once. [src/mpfr.h] Changed comment for mpfrlint. Added MPFR_TMP_LIMBS_ALLOC macro and updated the source to use it. tools/mpfrlint: check its use instead of MPFR_TMP_ALLOC. [src/sum.c] Improved readability. [src/mpfr-impl.h] Formatting. 2010-12-14 Vincent Lefèvre [TODO] Added year on a date (the item was added on 2007-07-28 in r4707). 2010-12-13 Vincent Lefèvre Added configure.lineno (generated by configure) to the svn:ignore property of the src directory. 2010-12-12 Vincent Lefèvre [NEWS] Update concerning the --with-gmp-build configure option. [INSTALL] Corrected a typo from r7293. Updated INSTALL file after the recent changes in configure.ac concerning the --with-gmp-build configure option. [configure.ac] With --with-gmp-build, do not duplicate the include search paths if the GMP source and build directories are the same. [configure.ac] Fixed another bug in r7289. This new version now seems to work with GMP's srcdir pointing to a relative directory or to an absolute one. [configure.ac] Fixed bug in r7289. [configure.ac] Corrected Patrick Pelissier's patch (not tested). 2010-12-12 Paul Zimmermann [configure.ac] patch from Patrick Pelissier to solve the problem with --with-gmp-build when the GMP build directory and the GMP source directory differ 2010-12-12 Vincent Lefèvre [tests/Makefile.am] tversion is also run at the end (after a discussion with Patrick and Paul). [configure.ac] Fixed two problems with --with-gmp-build: * "grep -w" isn't POSIX (an error shouldn't matter with recent GMP versions, as CFLAGS and CC would then be retrieved from gmp.h). * "sed" was used instead of "$SED". 2010-12-07 Vincent Lefèvre [INSTALL] Added a section "If 'gmp.h' and 'libgmp' do not match". [configure.ac] Improved warning message in case of unmatched 'gmp.h' and 'libgmp'. [INSTALL] Update concerning "configure". 2010-12-06 Paul Zimmermann [NEWS] fixed news for 3.0.0 2010-12-03 Vincent Lefèvre [tests/tversion.c] Now fail if the versions of gmp.h and libgmp do not match (error message improved); previously, the warning could remain unnoticed, in particular with automatic installations. 2010-11-30 Sylvain Chevillard Added metaMPFR in the tools directory of MPFR. 2010-11-29 Vincent Lefèvre [src/mpfr.h] Defined MPFR_DEPRECATED to mark MPFR functions, types or variables as deprecated. 2010-11-25 Vincent Lefèvre [tests/tui_pow.c] Updated a comment. 2010-11-23 Vincent Lefèvre [tools/mpfrlint] Support BSD sed. 2010-11-19 Vincent Lefèvre [tools/mpfrlint] Detect the use of __mpfr_struct structure members in .c files. [src/min_prec.c] Replaced x->_mpfr_d by MPFR_MANT(x). 2010-11-18 Vincent Lefèvre [src/mpfr-impl.h] Commented out the declaration of mpfr_round_raw_3 (since this function is no longer defined). [src/min_prec.c] Major simplification of mpfr_min_prec by using mpn_scan1 (suggestion by Andreas Enge). 2010-11-15 Vincent Lefèvre [src/mpfr-impl.h] Added a comment about mpn_sqr_n. 2010-11-15 Paul Zimmermann [algorithms.tex] replaced reference to Graillat05 by earlier one (Higham02) 2010-11-12 Vincent Lefèvre [tools/nightly-test] Added a comment about the use of -pedantic-errors. 2010-11-10 Vincent Lefèvre [src/sub1.c] Minor simplification. [tests/tpow.c] Avoid warnings if mpfr_exp_t < long. 2010-11-10 Paul Zimmermann [mul.c] fixed bug introduced in revision 7183, and reported by Brian Gladman on Windows, where mpfr_exp_t has 32 bits and mp_limb_t has 64 bits 2010-11-09 Vincent Lefèvre [src/mpfr.h] Use only mpfr_* types in __MPFR_EXP_* macro definitions (should have been done in r7236). [src/mpfr.h] Changed a "void" into a "mpfr_void" in a macro definition (should have been done in r7236). [tests/tset_si.c] Added testcase for problem fixed in r7236. 2010-11-08 Vincent Lefèvre [src/mpfr.h] Removed some useless casts that where added in r7121 and r7236 (such casts prevented the compiler from emitting diagnostics in incorrect calls). [tests/Makefile.am] Added a comment (warning about LOADLIBES). 2010-10-25 Paul Zimmermann [taway.c] reduced time of the test 2010-10-25 Vincent Lefèvre Mentioned --enable-gmp-internals in INSTALL and NEWS. 2010-10-24 Vincent Lefèvre [tests/taway.c] Added a FIXME (test is too long on old machines). [acinclude.m4] Corrected comment for PowerPC. 2010-10-24 Paul Zimmermann added tuning parameters for HPPA (on HP-UX machine kindly provided by David Kirkby) 2010-10-23 Paul Zimmermann [powerpc32/mparam.h] added more info on processor and operating system used needed stuff to use src/powerpc32/mparam.h file (note that long double is IEEE double on PowerPC32) [powerpc32/mparam.h] param file for powerpc32 (made on PowerPC 604 under AIX) 2010-10-22 Paul Zimmermann [tuneup.c] added cast from time_t to long, after warning under HP-UX: tuneup.c:1131: warning: format '%ld' expects type 'long int', but argument 3 has type 'time_t' tuneup.c:1133: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t' (I don't know if it is because time_t is unsigned, or has a different width) 2010-10-22 Vincent Lefèvre [src/mpfr.h] Added a space. [src/mpfr.h] Avoid some problems with macro expansion if the user defines macros with the same name as keywords. [doc/mpfr.texi] Document the use of macros. 2010-10-22 Sylvain Chevillard Included the new /arch/mparam.h files into the dist. 2010-10-20 Sylvain Chevillard Cosmetic change: the constant MPFR_TUNE_CASE is now defined in mparam_h.in. Hence the files src/some-architecture/mparam.h are now simply obtained by performing 'make tune' on some architecture and copying the resulting src/mparam.h to src/some-architecture/mparam.h. Typo. Up-to-date thresholds. 2010-10-20 Vincent Lefèvre [tests/tsub.c] mp_prec_t -> mpfr_prec_t [src/sub1.c] Removed trailing spaces. 2010-10-19 Vincent Lefèvre [tests/*.c] Support the case where mpfr_exp_t is not a long int (but with such a future extension, one should probably provide a MPFR_PRIexp macro, similar to what does). [tests/texceptions.c] Added casts, in case mpfr_exp_t is not a long int. 2010-10-19 Paul Zimmermann [tset_ld.c] replaced hexadecimal long double constants by decimal constants 2010-10-19 Vincent Lefèvre [tests/tset_ld.c] Added a FIXME for r7222 change. 2010-10-19 Paul Zimmermann [set_ld.c] fixed bug #11300 on bug tracker [tset_ld.c] added corresponding tests [algorithms.tex] modified proof of mpfr_sub in accordance with source code 2010-10-19 Paul Zimmermann this is a tree of all possible cases that can happen for rounding in mpfr_sub (file sub1.c) for rounding to nearest. The nodes at depth 1 of the tree correspond to the 3 possible cases before rounding: (1) sh=0, (2) sh>0 and the low sh bits are 1/2 ulp, (3) sh>0 and the low sh bits are 0. The nodes at depth 2 represent the possible subcases for k=0 in the rounding loop. The nodes at depth 3 represent the possible subcases for k=1 in the rounding loop. 2010-10-19 Paul Zimmermann [src/sub1.c] fixed another remaining issue in case 1d1 (case sh=0, i.e., the result uses a full number of limbs, the first neglected limbs of b and c match, and for the next limbs, low(b) > low(c)). This case was incorrectly rounded up (add_one_ulp). [tests/tsub.c] added more test cases [tgmpop.c] in case of error, print mpz_t in decimal instead of binary [tuneup.c] increase maximal number of calls to speed_measure from 5 to 30 (seems to solve problems on gcc15) 2010-10-18 Vincent Lefèvre [tests/tcan_round.c] Removed an incorrect cast, fixing a bug (in the test) that was producing a failure for GMP_CHECK_RANDOMIZE=1287710095 on 64-bit machines (visible since mpfr_prec_t is now signed). [src/sub1.c] Removed trailing whitespace. 2010-10-18 Paul Zimmermann [sub1.c] previous fix was not incorrect (but strangely our tests cases did not exhibit that) [tfma.c] added more test cases from Jakub Jelinek [sub1.c] fixed bug found by Jakub Jelinek (#11301 on tracker) 2010-10-18 Vincent Lefèvre [doc/mpfr.texi] Updated the month. [tests/tsub.c] Fixed inex test in bug20101017. 2010-10-18 Sylvain Chevillard Mention the warning message displayed by gcc when the ABI of gcc and MPFR differ. Note: the message does not automatically imply the problem; however, if the message appears, the ABI somehow differ, so it is worth mentioning it. Users might look for the message in INSTALL in order to see if their problem is mentioned. 2010-10-18 Paul Zimmermann [INSTALL] added "Notes about ABI" section 2010-10-18 Vincent Lefèvre [tests/tsub.c] Updated comment of bug20101017. [tests/tsub.c] Added testcase for bug found by Jakub Jelinek (bug 11301 on INRIAGforge). 2010-10-18 Paul Zimmermann [tuneup.c] print size when speed_measure fails 2010-10-17 Paul Zimmermann [mpfr.texi] added that the 'N' mode rounds ties to even in the mpfr*printf functions 2010-10-15 Sylvain Chevillard Reorganized mparam_h.in in separate files. Added mpfr_buildopt_tune_case function. 2010-10-14 Sylvain Chevillard Modified the number of iterations in the loop of mpfr_speed_measure. 2010-10-14 Paul Zimmermann [tuneup.c] new function mpfr_speed_measure, which calls speed_measure() several times (currently 30) until there is no failure. In case all 30 calls fail, give some hints to the user. 2010-10-13 Paul Zimmermann [tuneup.c] try again when speed_measure returns -1.0 (i.e. fails) also check return value of speed_measure in all cases (was not done for mulhigh, sqrhigh and divhigh, reported by Sylvain Chevillard) 2010-10-12 Sylvain Chevillard Small indication explaining what is the negative threshold for Ai. 2010-10-10 Vincent Lefèvre [src/mpfr-impl.h] Added MPFR_UEXP macro to check (in debug mode) that a value is nonnegative before a cast to mpfr_uexp_t. [src/add1.c] Use the MPFR_UEXP macro to make sure that the avoided warning doesn't hide a real bug. 2010-10-10 Paul Zimmermann avoid several compiler warnings with g++ [nightly-test] added -Wno-sign-compare for g++, to avoid spurious warnings [nightly-test] do not use -Wmissing-prototypes for g++ [add1.c] fixed compiler warning (from g++) 2010-10-08 Paul Zimmermann [src/mulders.c] fixed comment 2010-10-03 Paul Zimmermann [sqrt.c,mulders.c] added missing cast (detected by nightly builds with g++) 2010-10-01 Vincent Lefèvre [src/mulders.c] Untabified. 2010-09-30 Paul Zimmermann [src/mulders.c] fixed comments about error analysis in short product, and improved short division code 2010-09-30 Vincent Lefèvre Removed trailing spaces and untabified several files. [src/mul.c] Added comments concerning the latest changes about mulhigh. 2010-09-30 Paul Zimmermann [src/mulders.c] removed leftover debug stuff 2010-09-29 Paul Zimmermann [src/mulders.c] added new function mpfr_divhigh_n() for short division (not used yet), fixed comments and added error analysis in mpfr_mulhigh_n() and mpfr_sqrhigh_n() [src/sqrt.c] fixed ill-placed MPFR_TMP_MARK [src/mparam_h.in] added default MPFR_DIVHIGH_TAB for mpfr_divhigh_n() [src/round_p.c] typo [src/mpfr-impl.h] added prototype for mpfr_divhigh_n [src/mul.c] added comment, simplified code [tune/tuneup.c] added tuning for mpfr_divhigh_n(), increased MAX_STEPS to get a better tuning (will take longer), set tolerance to 1.0 added new option --enable-gmp-internals to use GMP undocumented function (at user's own risk). So far only mpn_rootrem is used in mpfr_sqrt. [doc/README.dev] added comment about mpn_rootrem 2010-09-28 Vincent Lefèvre [configure.ac] Added a FIXME note about incorrect use of an internal GMP symbol (__gmpn_rootrem). 2010-09-28 Paul Zimmermann [src/sqrt.c] followup to previous commit: only compute an extra limb of the square root for rounding to nearest (for directed rounding, it suffices to know if the remainder is zero or not) [src/sqrt.c] now uses mpn_rootrem (if available) instead of mpn_sqrtrem since mpn_rootrem is faster. Also refactored the code: now compute one more limb of the square root when the target precision is a multiple of GMP_NUMB_LIMB. This greatly simplifies the code. [src/sqrt.c] simplified computation of sticky bit 2010-09-27 Paul Zimmermann [mulders.c] fixed typo 2010-09-27 Vincent Lefèvre [src/mulders.c] Replaced MPFR_ASSERTD with constant expression by MPFR_ASSERTN. [tools/mpfrlint] Added a test: Constant checking should use MPFR_ASSERTN, not MPFR_ASSERTD. 2010-09-27 Paul Zimmermann [mulders.c] modified mpfr_sqrhigh_n threshold so that it is > n/2 2010-09-27 Vincent Lefèvre [acinclude.m4] Added a FIXME concerning autoconf 2.68. 2010-09-25 Paul Zimmermann [mulders.c] use mpn_lshift instead of mpn_add_n, and improved the default Mulders cutoff k beyond 1024 limbs (extrapolated from the cutoff k for n=1023 on Core 2, and checked experimentally it is faster) 2010-09-24 Paul Zimmermann [tuneup.c] changed lower bound for exp_2 threshold from MPFR_PREC_MIN (2) to GMP_NUMB_BITS. Seems to be better (since for p=2 the 2nd routine was sometimes already faster). [mul.c] another changes for Mulders' algorithm in case of a square 2010-09-24 Vincent Lefèvre [src/mul.c] Change in r7166 was incomplete. Fixed suspicious code. 2010-09-24 Paul Zimmermann [mparam_h.in] updated for 64-bit Core2 now use Mulders' algorithm also for mpfr_sqr, provides nice speed improvement in all functions that perform squarings 2010-09-21 Vincent Lefèvre [doc/mpfr.texi] API compatibility section: noted that mpfr_urandom and mpfr_urandomb changed for MPFR 3.1. 2010-09-21 Paul Zimmermann [INSTALL] update about "make tune" 2010-09-21 Vincent Lefèvre [doc] Updated FAQ.html with update-faq. 2010-09-20 Sylvain Chevillard Indicated the location of README.dev. 2010-09-19 Vincent Lefèvre [NEWS] Minor update. 2010-09-19 Paul Zimmermann [NEWS] inform the users that mpfr_add_one_ulp and mpfr_sub_one_ulp will be removed 2010-09-18 Paul Zimmermann [TODO] added efficiency item 2010-09-16 Paul Zimmermann replaced calls to mpfr_printf by calls to mpfr_dump (mpfr_printf might not be defined) [NEWS,doc/mpfr.texi] updated: the GMP random functions do not depend on the computer word size 2010-09-15 Vincent Lefèvre [tools/mpfrlint] Check for mpfr_printf-like functions in the tests. [doc/mpfr.texi] Updated the month. 2010-09-15 Paul Zimmermann [doc/mpfr.texi] added notes for mpfr_urandom and mpfr_urandomb [Makefile.am] updated LOADLIBES with reorganization of the sources [algorithms.tex] added sections for pow_ui and root [src/urandom.c] now mpfr_urandom also returns identical values on 32-bit and 64-bit machines [tests/turandom.c] modified corresponding test replaced mpfr_printf in tests by calls to mpfr_out_str 2010-09-15 Vincent Lefèvre [doc/README.dev] Updated the paragraph added in r7137. [doc/README.dev] Added a paragraph about the use of system-dependent functions in the test suite. Some minor corrections in comments. [src/printf.c] Typo in a comment. [src/printf.c] Slight modification of a comment. 2010-09-15 Paul Zimmermann [urandomb.c] modified to leave the GMP random generator in the same state, independent of GMP_NUMB_BITS [trandom.c] test of the above [urandom.c] added FIXME's [turandom.c] check we leave the GMP random generator in the same state, independent of GMP_NUMB_BITS. Currently this fails on 64-bit computers. [urandomb.c] added comment + slight change 2010-09-01 Vincent Lefèvre [src/mpfr.h] Added casts to improve robustness in case of undefined behavior and compiler extensions based on UB (in particular -fwrapv). MPFR doesn't use such extensions, but these macros will be used by 3rd-party code, where such extensions may be required. [src/mpfr.h] Updated a comment concerning -Wconversion. [src/mpfr.h] Added casts to unsigned long in mpfr_cmp_si and mpfr_set_si macros for GCC, in order to avoid warnings in programs that use MPFR and are compiled with -Wconversion (suggestion by Andreas Enge); such casts are OK since if X is a constant expression, then (unsigned long) X is also a constant expression, so that the optimizations still work. Reformatted these macros. [src/mpfr.h] Fixed bug in the mpfr_cmp_ui macro for GCC (also used by mpfr_cmp_si), when the evaluation of the first argument yields side effects and the second argument is a constant expression with the value 0. [tests/tcmp_ui.c] Added side-effect tests similar to those in tset_si.c, showing a bug in the mpfr_cmp_ui and mpfr_cmp_si macros. [tests/tcmp_ui.c] Check mpfr_cmp_ui and mpfr_cmp_si macros against side effects in the arguments. [src/mpfr.h] Added a comment about the macros that use __builtin_constant_p. 2010-08-30 Paul Zimmermann [tsqrt.c] improved comment, and added test sqrt(+0) == +0 2010-08-29 Vincent Lefèvre [tests/tsqrt.c] Renamed check_nan() to check_singular(). [tests/tsqrt.c] Check that sqrt(-0) has a negative sign. 2010-08-26 Vincent Lefèvre [INSTALL] Replaced "patches" by "allpatches". 2010-08-25 Paul Zimmermann [configure.ac] fixed typo 2010-08-23 Vincent Lefèvre [src/gmp_op.c] Extend the exponent range in mpfr_cmp_q and mpfr_cmp_f. [src/gmp_op.c] In mpfr_add_q / mpfr_sub_q, check with MPFR_ASSERTN that an internal overflow/underflow doesn't occur. In theory, such an exception is possible, but only if q has a huge numerator or denominator. This is not supported (note: other problems may occur first, such as insufficient memory). [tests/tgmpop.c] Added overflow tests for mpfr_add_q / mpfr_sub_q. [tests/{mpfr-test.h,tests.c}] Added flags_out function to output flags. [src/gmp_op.c] Extend the exponent range in mpfr_add_q / mpfr_sub_q (overflow/underflow exceptions are not supported yet). [tests/tgmpop.c] Added corresponding testcases. 2010-08-19 Vincent Lefèvre [src/gmp_op.c] Fixed the Inf +/- Inf cases for mpfr_add_q / mpfr_sub_q. [tests/tgmpop.c] Added Inf +/- Inf tests. 2010-08-19 Philippe Théveny [tests/tgmpop.c] Fix rounding mode in overflow tests 2010-08-19 Vincent Lefèvre [src/gmp_op.c] The function mpfr_cmp_z could fail in a reduced exponent range. [tests/tgmpop.c] Added a corresponding testcase. [src/gmp_op.c] The functions mpfr_mul_z, mpfr_div_z, mpfr_add_z and mpfr_sub_z could fail in a reduced exponent range. Fixed. [tests/tgmpop.c] Added corresponding testcase. 2010-08-18 Vincent Lefèvre [tests/tgmpop.c] Disabled buggy tests. [src/gmp_op.c] Fixed the intermediate overflow case in mpfr_muldiv_z (for mpfr_mul_q and mpfr_div_q). [src/gmp_op.c] Added function mpfr_muldiv_z (currently static -- should it be in the API?) that computes y = RND(x*n/d), where n and d are mpz integers. Changed mpfr_mul_q and mpfr_div_q to use this function. Note: the code of the general case is currently the same as the old mpfr_mul_q/mpfr_div_q code, thus needs to be fixed. [tests/tgmpop.c] Replaced GMP_RNDN by MPFR_RNDN. [tests/tgmpop.c] Added testcase for mpfr_mul_q/mpfr_div_q bug noted in src/gmp_op.c (due to intermediate overflow). 2010-08-17 Vincent Lefèvre [src/logging.c] Added a comment about register_printf_function. Added tools/ck-version-info Perl script with the same license as Makefile.am, to check consistency concerning -version-info and that the -version-info value is up-to-date. Updated Makefile.am: * In dist-hook, replaced complex sh code by a call to ck-version-info. * Distribute ck-version-info (EXTRA_DIST). Updated svn:ignore properties. [Makefile.am] Put tools/get_patches.sh back to EXTRA_DIST. [src/Makefile.am] Fixed -version-info (I forgot to increment CURRENT). 2010-08-17 Vincent Lefèvre Source reorganization. In short: * Added directories and moved related files into them: - src for the MPFR source files (to build the library). - doc for documentation files (except INSTALL, README...). - tools for various tools (scripts) and mbench. - tune for tuneup-related source files. - other for other source files (not distributed in tarballs). Existing directories: - tests for the source files of the test suite (make check). - examples for examples. - m4 for m4 files. * Renamed configure.in to configure.ac. * Added/updated Makefile.am files where needed. * Updated acinclude.m4 and configure.ac (AC_CONFIG_FILES line). * Updated the documentation (INSTALL, README, doc/README.dev and doc/mpfr.texi). * Updated NEWS and TODO. * Updated the scripts now in tools. The following script was used: #!/usr/bin/env zsh svn mkdir doc other src tools tune svn mv ${${(M)$(sed -n '/libmpfr_la_SOURCES/,/[^\]$/p' \ Makefile.am):#*.[ch]}:#get_patches.c} mparam_h.in \ round_raw_generic.c jyn_asympt.c src svn mv mbench check_inits_clears coverage get_patches.sh mpfrlint \ nightly-test update-patchv update-version tools svn mv bidimensional_sample.c speed.c tuneup.c tune svn mv *.{c,h} other svn mv FAQ.html README.dev algorithm* faq.xsl fdl.texi mpfr.texi \ update-faq doc svn mv configure.in configure.ac svn cp Makefile.am src/Makefile.am svn rm replace_all [Modifying some files, see above] svn add doc/Makefile.am svn add tune/Makefile.am 2010-08-16 Vincent Lefèvre [Makefile.am] Updated -version-info (the interface hasn't really been changed yet -- though the future bug fix / rewrite of mpfr_mul_q and mpfr_div_q could be seen as an addition -- but this eases maintenance and avoids -version-info conflict with the 3.0 branch). [bidimensional_sample.c] Added copyright notice. [ai.c] Prototype clean-up. 2010-08-16 Vincent Lefèvre Avoid a compilation failure on OSF/1 (Tru64) 5.1 due to non-C99 conformance though is available. In various source files and m4 files, use the following form only: #if HAVE_INTTYPES_H # include #endif #if HAVE_STDINT_H # include #endif Updated README.dev to mention this form. 2010-08-13 Vincent Lefèvre [tests] Avoid warning due to -Wunused-but-set-variable (from future GCC 4.6). Only let the one from tsubnormal.c because it's a TODO. * mpf_compat.h: use the variables, that are there for prototype checking. * tpow.c, tpow_z.c: test the ternary value. * tremquo.c: removed inex variables (the bug due to the MPFR value). * tset.c: test the ternary value. * tset_ld.c: removed the long double variable (it cannot be tested in a portable way and the bug was an assertion failure). * tzeta_ui.c: removed the inexact variable (not really useful here). [get_f.c] Avoid warning due to -Wunused-but-set-variable (from future GCC 4.6). [gamma.c] Avoid warning due to -Wunused-but-set-variable (from future GCC 4.6). [gmp_op.c] Avoid warning due to -Wunused-but-set-variable (from future GCC 4.6). [exp_2.c] No longer define qn and sizer, which are no longer used since r6919. This was detected by gcc-snapshot (4.6.0 prerelease) under Debian (-Wunused-but-set-variable). [NEWS] Update. [ieee_floats.h] Avoid breaking aliasing-rules when _GMP_IEEE_FLOATS is defined (e.g. with --with-gmp-build), by replacing a struct by a union like in r6381 for long double. [configure.in] Removed useless slash. 2010-08-12 Vincent Lefèvre [NEWS] Prepare for new version 3.1.0. [README.dev] Removed obsolete paragraph about the old prepare script. [update-version] Detect errors. Updated FAQ.html with update-faq. [faq.xsl] Do not copy XML comments. Updated FAQ.html with update-faq. [README.dev] INRIAGforge -> INRIAGForge. [README] Update: * InriaGforge -> INRIAGForge (official typography). * Updated URL of the Subversion FAQ (now on apache.org). * README.dev provided via SVN only. * Removed the old note about the old CVS repository. 2010-08-11 Vincent Lefèvre [gmp_op.c] mpfr_mul_q and mpfr_div_q are still buggy; added comment. [tests/tgmpop.c] Added missing "static". 2010-08-11 Philippe Théveny gmp_op.c: Fix ternary value returned by mpfr_mul_q and mpfr_div_q in overflow cases. 2010-08-04 Vincent Lefèvre README.dev: updated "To make a release" (test of FP division by 0). Support implementations where the floating-point division by 0 fails. * acinclude.m4: added a test to check whether the FP division by 0 fails, and define MPFR_ERRDIVZERO in such a case. * tests/tests.c: if MPFR_TEST_DIVBYZERO is defined, test whether there has been a floating-point division by 0 (FE_DIVBYZERO or FE_INVALID exception). * tests/tgeneric.c: if MPFR_ERRDIVZERO is defined, disable the huge and tiny cases. * tests/t*_{flt,d,ld}.c: if MPFR_ERRDIVZERO is defined, disable tests involving NaN and infinities. [README.dev] Update about the compilers. [README.dev] Mention clang. [get_sj.c] Fixed bug found by John Regehr: https://gforge.inria.fr/tracker/index.php?func=detail&aid=10839&group_id=136&atid=619 Note: the problem was an undefined behavior that could occur when sizeof(mp_limb_t) < sizeof(intmax_t) and |x| was small enough, because a right shift was >= the type width. However as the shifted value was 0, most platforms should not be affected by this bug. This problem was detected with clang -fcatch-undefined-ansic-behavior. [tests/tget_sj.c] Added tests of 1 and -1. [get_sj.c] Added assertions concerning https://gforge.inria.fr/tracker/?func=detail&atid=619&aid=10839&group_id=136 [configure.in] When logging is enabled, remove the possible -pedantic from GMP's CFLAGS to avoid warnings about C conformance. [mpfr-impl.h] Reverse-merged changeset r7042. The code was not incorrect: the warning is due to the -pedantic from GMP's CFLAGS. [mpfr-impl.h] Correction to avoid GCC warnings warning: invalid storage class for function 'x_f' warning: invalid storage class for function '__mpfr_log_cleanup' when building MPFR with logging support. 2010-08-03 Vincent Lefèvre [mpfrlint] Correction for the future MPFR source structure. [mpfrlint] Execute check_inits_clears. [check_inits_clears] Correction. 2010-08-02 Vincent Lefèvre [Makefile.am] Moved ieee_floats.h from EXTRA_DIST to libmpfr_la_SOURCES. [Makefile.am] Clean-up: removed gen_inverse.h from EXTRA_DIST because it is already in libmpfr_la_SOURCES. 2010-08-01 Vincent Lefèvre [mparam_h.in] Removed the comment about the dependency bug. (svn merge -r7032:7031 mparam_h.in) [Makefile.am] Added "BUILT_SOURCES = mparam.h", fixing bug https://gforge.inria.fr/tracker/index.php?func=detail&aid=10810&group_id=136&atid=619 [mparam_h.in] Added a comment concerning the bug in the mparam.h dependency rule: https://gforge.inria.fr/tracker/index.php?func=detail&aid=10810&group_id=136&atid=619 [mparam_h.in] Enable C mode for Emacs. [mparam_h.in] Deleted trailing whitespace. [mparam_h.in] Bug fix: added a newline at the end of the file. 2010-07-30 Vincent Lefèvre Replaced Contributed by the Arenaire and Cacao projects by Contributed by the Arenaire and Caramel projects [AUTHORS] Updated a sentence. Added configure.lineno (generated by configure) to svn:ignore property. 2010-07-29 Vincent Lefèvre [README.dev] For announces, changed mpfr into mpfr-announce. 2010-07-26 Vincent Lefèvre [ai.c] Replaced mp_exp_t by mpfr_exp_t. 2010-07-25 Vincent Lefèvre [ai.c] Fixed several bugs in mpfr_ai. 2010-07-20 Sylvain Chevillard Updated bidimensional_sample to take into account the fact the mpfr_ai1 and mpfr_ai2 are now statically defined. mpfr_ai1 and mpfr_ai2 are now declared static. Only mpfr_ai is global. Forgot a declaration in the previous commit. 2010-07-20 Sylvain Chevillard Added automatic tuning of mpfr_ai. More precisely: * removed ai2.c: both implementations are now in the same file ai.c * added thresholds and automatic choice of the method to use in function of the thresholds. * added procedures for tuning functions like ai into tuneup.c * added a tuning procedure into tuneup.c 2010-07-19 Vincent Lefèvre [tests/tget_flt.c] Fixed printf strings (missing backslash). 2010-07-15 Paul Zimmermann [tget_flt.c] completed previous commit [tget_flt.c] print more information in case a test fails 2010-07-09 Vincent Lefèvre [gamma.c] Added an assert concerning the mpfr_exp_t size. [tests/tgamma.c] Use mpfr_set_str instead of mpfr_set_d. [exp_2.c] Untabified. 2010-07-09 Paul Zimmermann [gamma.c] fixed bug reported on MPFR list: https://sympa.inria.fr/sympa/arc/mpfr/2010-07/msg00001.html In the underflow detection: * we took log instead of log2 * at the end, we added the wrong terms 2010-07-01 Vincent Lefèvre [mpfr-impl.h] Added a comment concerning the 'noreturn' property. 2010-06-28 Paul Zimmermann [exp_2.c] added 3 more bits to initial working precision. On a sample of 20247 tests by Sylvain Chevillard with precisions in [50, 100], the number of Ziv's failures decreased from 1184 to 144, which is less than 1% (to reduce to zero, we would have to increase the number of extra bits from 8 to 17). 2010-06-28 Vincent Lefèvre [round_prec.c] Applied a patch from Patrick Pélissier (with slightly modified comments) to make mpfr_prec_round compatible with non-mpfr_init allocation methods when no realloc is needed. 2010-06-25 Vincent Lefèvre [acinclude.m4] Use AC_FUNC_ALLOCA to have HAVE_ALLOCA_H defined when available. This problem was introduced when AC_FUNC_ALLOCA was removed from configure.in in r6765. Note: building MPFR with --with-gmp-build is not affected as GMP's config.h is used. [mpfr-gmp.h] Reverted incorrect changeset r6987 (see code about alloca). 2010-06-25 Paul Zimmermann [mpfr-gmp.h] include alloca.h [mpfr.texi] added comment about config.log 2010-06-24 Paul Zimmermann [exp_2.c] fixed problem reported by Sylvain Chevillard for large x, where the cancelled bits were counted twice 2010-06-24 Vincent Lefèvre [tests/tfprintf.c] Cosmetic improvement suggested by Denis Excoffier. 2010-06-23 Vincent Lefèvre [README.dev] Minor change to match a filename on the website. [tests/tout_str.c] Fixed bug introduced in r6976: changed size_t into unsigned int for printf (the size of unsigned int is sufficient here). 2010-06-22 Vincent Lefèvre [out_str.c] Handle the output errors. [out_str.c] Handle output error in the special cases of mpfr_out_str (and use MPFR_IS_SINGULAR like in the other functions). 2010-06-22 Philippe Théveny Fix wrong return value of mpfr_out_str on special values. 2010-06-22 Vincent Lefèvre Updated version to 3.1.0-dev. [README.dev] Added a paragraph about the precision, rounding mode and exponent types. In mpfrlint, detect the use of mp_exp_t and mp_prec_t. Fixed the files that were generating warnings. 2010-06-22 Sylvain Chevillard I forgot to replace one occurrence of isqrt. Use of __gmpfr_isqrt instead of my own isqrt wrapper. Added a tool for nicely displaying which method is the best in function of x and prec when several method can be used for evaluating a given function f in x at precision prec. 2010-06-21 Vincent Lefèvre [Makefile.am] Fixed dist-hook for -dev versions (I assumed that || and && were right associative, while they are left associative). Thanks to Laurent Rineau for noticing this problem. 2010-06-21 Paul Zimmermann [exp_2.c] fixed inefficiency for large x: the initial precision was too small, which had the effect that the first Ziv iteration did fail with non-negligible probability (problem reported by Sylvain Chevillard). Also in case of 2 iterations or more the K variable was corrupted. Note (2012-03-03): huge inefficiency has been noticed when evaluating mpfr_exp on an argument close to log(2^n) in RNDU: https://sympa.inria.fr/sympa/arc/mpfr/2012-03/msg00000.html One has an obvious hard-to-round case, meaning that several iterations are needed and that K is corrupted. This changeset fixes this bug. 2010-06-15 Paul Zimmermann [INSTALL] added note about problem with MSVC runtime (seems to be fixed) [Makefile] alternate patch to r6959 from Patrick Pelissier [INSTALL] comments from Vincent Lefevre [mbench] fixes to make mbench work again (tested with GCC 4.4.3) [INSTALL] updated notes on Windows (contributed by Brian Gladman) 2010-06-10 Vincent Lefèvre [tests/Makefile.am] Reordered check_PROGRAMS. [README.dev] Untabified. [BUGS] Update. 2010-06-09 Vincent Lefèvre [INSTALL] Added a note on Mac OS X; thanks to FX Coudert and Fumihiro Chiba: https://sympa.inria.fr/sympa/arc/mpfr/2010-06/msg00011.html 2010-06-08 Vincent Lefèvre [INSTALL] Update concerning CC/CFLAGS and the --with-gmp-build option. 2010-06-07 Vincent Lefèvre [NEWS] Added an item about the --with-gmp-build configure option and the use of GMP's internal header files. 2010-06-06 Vincent Lefèvre [exp_2.c] Reverted incorrect optimization patch r6922 (added a comment). There were failures on 32-bit machines. [mpfr-impl.h] Added log messages for the MPFR_GROUP_* macros. [mpfrlint] Detect incorrect use of MPFR_LOG_MSG. [ai2.c] Fixed build failure with --enable-logging, due to incorrect MPFR_LOG_MSG usage (see README.dev). README.dev: updated "To make a release". [ai.c] Fixed build failure with --enable-logging, due to incorrect MPFR_LOG_MSG usage (see README.dev). 2010-06-04 Paul Zimmermann [exp_2.c] speed improvement using MPFR_GROUP_* (from Patrick Pelissier): Pass 69 mpfr_add: 63 / 102.97 / 126 mpfr_exp: 430 / 11861.26 / 46588 Was before we removed MY_MPZ_INIT: Pass 50 mpfr_add: 63 / 103.09 / 126 mpfr_exp: 430 / 10911.86 / 44215 2010-06-04 Vincent Lefèvre [exp_2.c] Removed useless and possibly incorrect cast (in case -q doesn't necessarily fit in an int). 2010-06-04 Paul Zimmermann [exp_2.c] got rid of MY_INIT_MPZ, small slowdown, but code should be more robust. Below are timings from Patrick Pelissier with mbench: mpz_init: Pass 78 mpfr_add: 63 / 102.86 / 126 mpfr_exp: 441 / 12067.81 / 47355 MY_MPZ_INIT Pass 50 mpfr_add: 63 / 103.09 / 126 mpfr_exp: 430 / 10911.86 / 44215 Prec=53 bits (core 2 duo 64 bits) 2010-06-03 Paul Zimmermann [exp_2.c] fixed problem reported by Sylvain Chevillard with following code and MPFR_EXP_2_THRESHOLD=36 (valgrind complains). It was due to the fact that GMP might allocate extra limbs, see https://gmplib.org/list-archives/gmp-devel/2010-June/001577.html. The fix is not optimal in the sense that GMP does not give a bound on the allocated memory, thus we can only guess. #include "mpfr.h" int main(void) { mpfr_t x,w; mpfr_init2(x, 37); mpfr_init2(w, 37); mpfr_set_str(x, "-1.000001100100100001111110110101010001p+20", 2, MPFR_RNDN); mpfr_exp (w, x, MPFR_RNDN); mpfr_clear (w); mpfr_clear (x); return 0; } 2010-06-03 Vincent Lefèvre [acinclude.m4] Math library check: removed rule specific to HP-UX (only -lM was tested while this library may not be available; so, let's use the default rule as -lm works). [mpfr.texi] Arenaire -> Arénaire. 2010-06-02 Vincent Lefèvre [NEWS] 3.0 -> 3.0.0. [NEWS] Added test coverage for MPFR 3.0.0. 2010-05-31 Vincent Lefèvre [INSTALL] Added missing blank lines (consistency). [tests/tset_z_exp.c] Fixed type in a printf. 2010-05-31 Paul Zimmermann [INSTALL] added instructions for "make tune" [README.dev] completed missing instructions for "make tune" [tset_z_exp.c] fixed two FIXME 2010-05-31 Vincent Lefèvre [tests/tset_z_exp.c] Added 2 FIXME in the test. [tests/tset_z_exp.c] Removed testcase bug20100531 (this was a bug in the test, which didn't detect overflow cases due to too large random exponent). [tests/tset_z_exp.c] Added testcase bug20100531. [mpfr.texi, NEWS] Update related to r6879: "Made defined the previously undefined cases of mpfr_get_si, mpfr_get_ui, mpfr_get_sj, mpfr_get_uj, mpfr_get_z and mpfr_get_z_2exp. In such cases, the erange flag is set.". [mpfr.texi] Corrected mpfr_atan2 range (added in r6831). 2010-05-28 Vincent Lefèvre [mpfr.texi] Made an example fit on 80 columns for the info manual. [mpfr.texi] Changed some @math into @var in the mpfr_fmod description (for consistency). [mpfr.texi] Corrected a paragraph. [mpfr.texi] Added an example to get the MPFR version (and at the same time, check whether MPFR is already installed). Added examples/version.c (and updated Makefile.am). [mpfr.texi] Correction (English usage). [Makefile.am] Improved dist-hook rule. 2010-05-27 Philippe Théveny Fix typo. 2010-05-26 Paul Zimmermann [TODO] removed one item, added one [mpfr.texi] removed FIXME (resolved: Philippe confirmed that gmp_printf does not work with mpf2mpfr.h) 2010-05-25 Vincent Lefèvre Made defined the previously undefined cases of mpfr_get_si, mpfr_get_ui, mpfr_get_sj, mpfr_get_uj, mpfr_get_z and mpfr_get_z_2exp. In such cases, the erange flag is set. 2010-05-25 Sylvain Chevillard * 80 columns. do ... while(0) style for macros. 2010-05-25 Vincent Lefèvre [NEWS] Correction. [mpfr.texi] Minor changes. [INSTALL] Reverted incorrect changeset r6870. [mpfr.texi] Added a comment about non-ASCII characters. 2010-05-25 Philippe Théveny More explicit documentation on the use of specifiers in printf function. 2010-05-25 Vincent Lefèvre [mpfr.texi] Encoding correction for ±. [NEWS, mpfr.texi] mpfr_custom_get_mantissa was renamed to mpfr_custom_get_significand. [tests/tstckintc.c] Changed mpfr_custom_get_mantissa into mpfr_custom_get_significand (but mpfr_custom_get_mantissa was still working thanks to the #define). [mpfr.h, stack_interface.c] Changed mpfr_custom_get_mantissa into mpfr_custom_get_significand (r6862 was incomplete). [mpfr.h] support: also test _STDINT (for MS Visual Studio). Thanks to Brian Gladman for the information. [buildopt.c] Missing #include "mpfr-impl.h" for cygwin builds. [mpfrlint] Detect such errors (mpfr-impl.h may be needed because it includes config.h when there is one). 2010-05-24 Paul Zimmermann [mpfr.texi] more changes after answers by Vincent to my questions 2010-05-24 Vincent Lefèvre [NEWS] Reformat / fixed typography. [sub1sp.c] Fixed a problem that appeared after mpfr_prec_t has been made signed. It was visible on PowerPC (tested on Linux 32 bits and on Mac OS X 32 & 64 bits), but could potentially affect any platform as a negative shift count was generated. As the faulty expressions were in a MPFR_ASSERTD, the failure could occur only when assertion checking had been enabled. 2010-05-22 Vincent Lefèvre [README.dev] Removed trailing spaces. [README.dev] Added information about intmax_t and corresponding macros. Detect when the intmax_t type is available but INTMAX_MAX doesn't work (e.g. with gcc -ansi -pedantic-errors in 32-bit mode under GNU/Linux). New macros MPFR_UINTMAX_MAX, MPFR_INTMAX_MAX and MPFR_INTMAX_MIN are defined and used internally instead of UINTMAX_MAX, INTMAX_MAX and INTMAX_MIN. If these C99 macros work, then the MPFR_* macros use them, otherwise MPFR uses its own definitions. mpfr_div_ui8 and mpfr_mul_ui5 didn't have to be exported. [ai2.c] GNU style. [ai2.c] Style correction (necessary for ansi2knr, if still useful). [ai.c, ai2.c] Untabified / removed trailing spaces. [ai.c] GNU style. [mpfr.texi] Corrected the paragraph about whether MPFR is installed. [mpfr.texi] Corrections and answers to PZ comments from r6831. The document encoding is now UTF-8. 2010-05-21 Vincent Lefèvre [mpfr.texi] n-char-sequence was changed into n-char-sequence-opt in r6132, but I forgot to update all the occurrences. 2010-05-21 Sylvain Chevillard * Removed double precision numbers. * Handle +0 and -0 the same way. * Use MPFR_GET_EXP in ai2.c 2010-05-20 Sylvain Chevillard * Corrected a bug when x=0 (MPFR_GET_EXP requires to assert that x!=0). Corrected some warnings. Corrected an error that prevented the doc from compiling. 2010-05-20 Vincent Lefèvre mpfr.texi: corrections. 2010-05-20 Paul Zimmermann [mpfr.texi] explain why mpfr_sum uses an array of pointers to mpfr_t [mpfr.texi] changes after a complete reading of the documentation. There are some issues left that I don't know how to solve, they are marked with @c PZ in mpfr.texi. 2010-05-19 Vincent Lefèvre [mpfr.texi, NEWS] Noted that the mpfr_ai implementation is incomplete and experimental. [ai.c] Use MPFR_IS_SINGULAR. Added a FIXME comment for Ai(0). Type corrections for C++ compilers (in particular, mpfr_rnd_t vs int). [ai.c] Fixed possible problem in reduced exponent range. Removed trailing spaces. 2010-05-19 Sylvain Chevillard * Removed some warnings. * More conform to GNU coding standards. 2010-05-19 Vincent Lefèvre Removed obsolete patch-aclocal-icc and updated README.dev (about "To make a release"). [Makefile.am] Added a comment concerning -version-info and MPFR 3.0.x. ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". [mpfr.texi] Preliminary interfaces are no longer preliminary. [mpfr.texi] API Compatibility: mention the detection of the availability of intmax_t with C++ compilers. [mpfr.texi] signness -> signedness (thanks to Philippe). [mpfr.texi] Missing @code. [mpfr.texi] Corrected C terminology (table -> array). 2010-05-18 Vincent Lefèvre [mpfr.texi, NEWS] Mention that mpfr_ai is a new function in MPFR 3.0. Removed obsolete prepare script (autoreconf does the same thing). 2010-05-18 Sylvain Chevillard * I added a new implementation of Airy Ai. This implementation uses Smith's algorithm. Currently, it is provided as a separate implementation mpfr_ai2. * Please note that both mpfr_ai and mpfr_ai2 need to efficiently evaluate Gamma(1/3) and Gamma(2/3). This is provided by functions in the file gammaonethird.c * There is no test file for mpfr_ai2 since it should quickly disappear behind a single implementation using the best of mpfr_ai and mpfr_ai2. However, if necessary, a test file can be obtained by copying tai.c and replacing mpfr_ai by mpfr_ai2 everywhere. * I do not know if gammaonethird.c will remain like that in the future. Should we make this implementation available as a public MPFR function? In this case, I have to write a wrapper for providing a correctly rounded implementation. Moreover, it contains functions that could be interesting for the implementation of other functions (the functions mpfr_div_ui*). Maybe, it could be worth providing a file specially for this purpose. 2010-05-18 Vincent Lefèvre [NEWS] Added release name. [NEWS] Updated "Changes from versions 2.3.* to version 2.4.0" from MPFR 2.4.2. [mpfr.texi] Completed Section 6.1 "Type and Macro Changes". [mpfr.texi] Updated Section 6.1 "Type and Macro Changes". [mpfr.texi] Missing space. [mpfr.texi] Updated Section 6.1 "Type and Macro Changes". [NEWS] A bit less ambiguous... [NEWS] More details for mp_rnd_t/mpfr_rnd_t, like mp_prec_t/mpfr_prec_t. 2010-05-17 Vincent Lefèvre Added "API Compatibility" section to the MPFR manual. TODO: Section 6.1 "Type and Macro Changes". [NEWS] mpfr_strtofr now accepts bases from 37 to 62 (r5965). 2010-05-10 Vincent Lefèvre INSTALL: updated section about MS Windows. INSTALL: updated section about MS Windows. 2010-05-08 Vincent Lefèvre [tests/tests.c] Fixed code when _MPFR_PREC_FORMAT != 3. 2010-05-08 Paul Zimmermann [tests/tests.c] fixed compiler warning (found by nightly tests) 2010-05-07 Vincent Lefèvre New exponent type mpfr_exp_t for MPFR (replacing GMP's mp_exp_t). [README.dev] Updated a paragraph concerning signed and unsigned types. Changed the precision type mpfr_prec_t from an unsigned integer type into the corresponding signed integer type, in order to avoid problems due to the usual arithmetic conversions when mixing mpfr_prec_t and mp_exp_t in an expression. * NEWS: mentioned this change. * mpfr-impl.h: removed MPFR_INTPREC_MAX (which wasn't used) and updated the MPFR_UNSIGNED_MINUS_MODULO(S,A) macro, which assumed that A was unsigned; this macro now works even when A is signed. * mpfr.h: added mpfr_uprec_t; updated mpfr_prec_t and MPFR_PREC_MAX. * tests/tcheck.c: disabled a test on MPFR_PREC_MAX+1 with MPFR >= 3 (this test doesn't work with a signed mpfr_prec_t and isn't needed). Note: all tests pass under GNU Linux x86 and x86_64. [tests/tcheck.c] Forgot to remove a printf (added during testing). [tests/tcheck.c] Support signed mpfr_prec_t (avoid integer overflow). [tests/mpf_compat.h] Fixed prototype of function main. [mpfr.h] Added a comment concerning the definition of MPFR_PREC_MAX. 2010-05-06 Vincent Lefèvre print_rnd_mode.c: added an assertion so that we do not forget to update this file after a new rounding mode is added. 2010-05-03 Vincent Lefèvre [mpfr.texi] Added a paragraph about multiple inclusions of mpfr.h and/or gmp.h header files. 2010-05-03 Philippe Théveny Update documentation for mpfr_print_rnd_mode. 2010-05-03 Vincent Lefèvre To avoid breaking the ABI when faithful rounding gets implemented, added MPFR_RNDF to the mpfr_rnd_t enum type now, and removed MPFR_RND_MAX from the enumeration (it is now defined as a macro in mpfr-impl.h). fits_* (signed version): corrections and optimizations. [fits_uintmax.c, fits_u.h] Some casts could be incorrect in the case mp_exp_t > mpfr_prec_t. Set prec to the int type since in practice, prec will be small enough to fit in an int. The fact that prec is now signed allows us to remove a useless test (also note that prec should be computed at compile time, so that this should be at least as fast). [fits_uintmax.c, fits_u.h] Comments: doesn't -> don't mpfr.texi: updated the month. 2010-05-03 Philippe Théveny Add specifier 'Y' for the rounding away from zero mode in printf-like functions. 2010-04-30 Paul Zimmermann [mpfr.texi] removed obsolete mpfr_round_prec 2010-04-30 Vincent Lefèvre [fits_intmax.c,fits_s.h] Added FIXME comments. Optimized fits_u.h and made fits_uintmax.c like fits_u.h for the special numbers. Optimized mpfr_fits_uintmax_p. Changed mp_prec_t into mpfr_prec_t. 2010-04-19 Vincent Lefèvre [configure.in] r6765 introduced non-POSIX syntax. Fixed. 2010-04-19 Paul Zimmermann [configure.in] check for GMP internal files only with --with-gmp-build 2010-04-12 Vincent Lefèvre [NEWS] New function mpfr_regular_p (was added in r6417, 2009-09-14). 2010-04-07 Vincent Lefèvre [mpfr-gmp.h] Fixed alloca prototype (bug detected by tcc 0.9.25 under Linux/x86_64). 2010-03-24 Vincent Lefèvre [mpfr.texi] Improved/corrected the documentation of functions mpfr_lgamma, mpfr_digamma, mpfr_j0/j1/jn, mpfr_y0/y1/yn, mpfr_agm, mpfr_hypot and mpfr_min_prec. [mpfr.texi] Removed a "currently" that is no longer needed. [mpfr.texi] Updated description of mpfr_atan2, now that IEEE 754-2008 has been published and follows the same conventions as C99 for atan2. [mpfr.texi] Updated description of mpfr_pow, now that IEEE 754-2008 has been published and follows the same conventions as C99 for pow. (IEEE 754-2008 doesn't currently specify pow(±inf,non-zero), but I've suggested a correction for the errata page.) 2010-03-23 Vincent Lefèvre [mpfr.texi] Improved documentation of mpfr_print_rnd_mode (from a suggestion by Chris Saunders). 2010-03-22 Vincent Lefèvre [mpfr.texi] Various corrections and other improvements. [mpfr.texi] Improved the documentation of mpfr_dim too. 2010-03-22 Paul Zimmermann [mpfr.texi] improved the documentation of mpfr_rec_sqrt and mpfr_cbrt (thanks Vincent) [mpfr.texi] improved documentation of mpfr_sqrt and mpfr_sqrt_ui 2010-03-21 Vincent Lefèvre [mpfr.h] Added a comment about integer overflows in macros. 2010-03-19 Paul Zimmermann [tai.c] enable first test of check_large, and reduced total time 2010-03-19 Sylvain Chevillard Added a mention about the current limitation of mpfr_ai in mpfr.texi. Removed check of ai.c for large arguments. I added in algorithms.tex a mention about the fact that mpfr_ai is currently not made for large arguments. * Corrected problems regarding the GNU recommendations for formatting source code. 2010-03-18 Vincent Lefèvre tests: added tai to the svn:ignore property. 2010-03-18 Paul Zimmermann [tai.c] reduce the maximal exponents in test_generic() also reduce the number of random tests to decrease the test time 2010-03-18 Vincent Lefèvre README.dev: in the tests, use mpfr_equal_p rather than mpfr_cmp. 2010-03-18 Paul Zimmermann [tai.c] replace mpfr_cmp by mpfr_equal_p 2010-03-18 Vincent Lefèvre tests/tset_z_exp.c untabified. mpfr.texi: removed trailing whitespace. mpfr.texi: updated the month. Untabified AUTHORS (consistency). 2010-03-18 Sylvain Chevillard * Corrected problems regarding the GNU recommendations for formatting source code. * Corrected the date of the copyright. 2010-03-18 Paul Zimmermann [tai.c] added test for large inputs [AUTHORS] added Sylvain Chevillard 2010-03-17 Paul Zimmermann [mpfr.texi] added Sylvain as contributor 2010-03-17 Sylvain Chevillard * Added function mpfr_ai. The implementation is the most naive: it evaluates the series step by step until it can stop. A special strategy is used to detect possible problems when Ai(x) is very close to 0. * Updated algorithms.tex with the technical description of the implementation of mpfr_ai. * Added algorithm2e.sty and algorithm2e-compatibility.sty (necessary to compile algorithms.tex now). * Updated mpfr.texi to let it know this new function. * Added a basic test file for mpfr_ai. I will add other test cases later. * Added a small HOWTO to README.dev about how to add a new test file for new functions. 2010-03-11 Vincent Lefèvre GMP_RNDx -> MPFR_RNDx 2010-03-11 Paul Zimmermann [tstrtofr.c] added test for 1.23e, cf https://gmplib.org/list-archives/gmp-bugs/2010-March/001898.html 2010-03-11 Vincent Lefèvre [tests/tsqrt.c] Add the test -1 <= x/sqrt(x^2) <= 1, which corresponds to -1 <= x/sqrt(x^2+y^2) <= 1 with y = 0. I don't think the test with random y is still necessary, though, since even a bad sqrt accuracy would not be detected. 2010-03-10 Vincent Lefèvre [tests/tsqrt.c] Added a comment about the x/sqrt(x^2+y^2) test. 2010-03-10 Paul Zimmermann [tsqrt.c] fixed bug reported by Sam Rawlins (https://sympa.inria.fr/sympa/arc/mpfr/2010-03/msg00007.html) Note: this "bug" had no noticeable consequences; this can just be seen as an incomplete test. 2010-02-26 Paul Zimmermann [NEWS] added item 2010-02-24 Paul Zimmermann [acinclude.m4] now also recognize "IEEE double, little endian" long-double format (not tested, should happen on ARM) [acinclude.m4] added recognition of "IEEE double big endian" long double format (tested on gcc40.fsffrance.org and gcc53, both PowerPC's) 2010-02-24 Vincent Lefèvre [acinclude.m4] Added test for long double = double-double (GCC/PowerPC). This test cannot currently be reliable, so we just output a warning. 2010-02-23 Paul Zimmermann [NEWS] minor grammar fix [NEWS] be more precise about API compatibility [mpfr.h] added #define mpfr_get_z_exp mpfr_get_z_2exp for compatibility 2010-02-23 Vincent Lefèvre tests: added tset_z_exp to the svn:ignore property. 2010-02-22 Paul Zimmermann changed mpfr_get_z_exp -> mpfr_get_z_2exp (old function) mpfr_set_z_exp -> mpfr_set_z_2exp (new function) added new function mpfr_set_z_exp (companion to mpfr_get_z_exp) 2010-02-18 Vincent Lefèvre * Added tests/tstdint.c to test the double inclusion of mpfr.h when only the second occurrence needs (this can happen when one uses several libraries that use MPFR under different conditions). * Added tstdint to the svn:ignore property of "tests". * TODO: mentions that tstdint should be added to check_PROGRAMS in the tests/Makefile.am file once this is fixed. mpfr.texi: updated Section "Internals". 2010-02-16 Vincent Lefèvre mpfr.texi: updated the month. mpfr.h: disable the INTMAX_C / UINTMAX_C test with C++ compilers as it doesn't work well in this case (e.g. possible failure with Boost); see https://sympa.inria.fr/sympa/arc/mpfr/2010-02/msg00025.html and the whole discussion. mpfr.texi: update. 2010-02-05 Paul Zimmermann [configure.in] removed check for C++ and Fortran compiler (comment said to remove it for libtool >= 2.0) 2010-02-01 Paul Zimmermann [TODO] dummy change to check if we still get commit mails 2010-01-29 Paul Zimmermann [mpfr.texi] added note about mpfr_set_str 2010-01-25 Vincent Lefèvre Simplified get_patches.sh; minor consequence: the trailing space in the string returned by mpfr_get_patches() when there are patches is no longer present (this trailing space wasn't desired anyway). configure.in: updated message for different gmp.h and libgmp versions. See . 2010-01-20 Vincent Lefèvre FAQ.html, faq.xsl, README, TODO: slightly changed the copyright notice to make it consistent with the one of the other files. In short, "and the GNU General Public License" has been removed, but it was ambiguous (we did not say which version of the GNU GPL) and useless (for GPLv3) because the LGPLv3 is compatible with the GPLv3: https://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean INSTALL: * added copyright notice (at the top, like GMP); * replaced "Installing MPFR" by "Installing GNU MPFR". Copyright notice update: added 2010 with perl -pi -e 's/2009 Free Software/2009, 2010 Free Software/' **/*(^/) under zsh, reverting the ChangeLog file and the mbench directory. tests: added turandom to the svn:ignore property. INSTALL: updated paragraphs about the search paths (in particular, --with-gmp=/usr/local is no longer chosen as an example as it does not work as expected; a note has been added about that). INSTALL: rewrote a paragraph about search paths. 2010-01-18 Philippe Théveny [urandom.c] Fix case emin > 0. 2010-01-18 Paul Zimmermann [TODO] added more details for random distribution functions [tprintf.c, tfprintf.c] cleaned up previous commit 2010-01-18 Vincent Lefèvre tests/turandom.c: updated a test (if emin > 1 and rnd == MPFR_RNDN, then the result is necessarily 0). tests/turandom.c: more tests in restricted exponent range. urandom.c: corrected a comment. 2010-01-18 Paul Zimmermann [tprintf.c,tfprintf.c] print obtained chain in test #8 (https://sympa.inria.fr/sympa/arc/mpfr/2009-12/msg00035.html) 2010-01-18 Philippe Théveny [urandom.c] Fix bug in setting random exponent. 2010-01-16 Vincent Lefèvre urandom.c: added a FIXME comment. 2010-01-15 Vincent Lefèvre urandom.c: removed unused variable k; updated a comment. 2010-01-15 Philippe Théveny [urandom.c] Improve generation of random exponent. [urandom.c] Fix bug introduced in r6667. 2010-01-15 Paul Zimmermann [TODO] added item 2010-01-15 Philippe Théveny [urandom.c] Fix case nextabove(0) in reduced exponent range. [tests/turandom.c] Change accumulation of ternary value in the loop, it was not portable in system with sign and magnitude representation for integers. [urandom.c] Move generation of a random rounding bit in a separate function. [urandom.c] Remove trailing whitespace. [urandom.c] Call mpfr_nextabove in maximum exponent range. 2010-01-15 Vincent Lefèvre urandom.c: added a FIXME so that it is not forgotten. mpfr.texi: updated the month. mpfrlint: require bash. 2010-01-14 Vincent Lefèvre urandom.c: clean-up (avoid a useless goto). README.dev: added a paragraph (use MPFR_ASSERTN, not printf + exit). 2010-01-14 Philippe Théveny [mpfr.texi] Cosmetic change. [urandom.c, mpfr.texi] Change the behavior of mpfr_urandom to the usual mpfr function interface (wrt the ternary value and the out-of-range behavior). [tests/turandom.c] Check new behavior and add a test for the inclusion in [0, 1]. 2010-01-13 Philippe Théveny New function mpfr_urandom. 2010-01-11 Vincent Lefèvre README.dev: added a note about patches and the autotools. 2010-01-10 Vincent Lefèvre Added mpfrlint test for the required autoconf versions (see r6649). 2010-01-10 Paul Zimmermann [README.dev] required version of autoconf did not agree with acinclude.m4 2010-01-08 Vincent Lefèvre configure.in: replaced BITS_PER_MP_LIMB by GMP_NUMB_BITS (should have been done in r6645). mpfrlint: check that GMP_LIMB_BITS isn't used. Replaced GMP_LIMB_BITS by GMP_NUMB_BITS to use only one of these macros. 2010-01-08 Paul Zimmermann [configure.in] put back test BITS_PER_MP_LIMB == BYTES_PER_MP_LIMB * CHAR_BIT (this is done only with --with-gmp-build, and BYTES_PER_MP_LIMB is defined in this case in gmp-impl.h, at least in GMP 5) BITS_PER_MP_LIMB -> GMP_LIMB_BITS got rid of BYTES_PER_MP_LIMB in configure.in (no longer defined by GMP) Note[VL] (mpfr-impl.h): a mpn_sqr_n() macro is defined to use mpn_mul if it is not already defined (in gmp-impl.h from GMP 4.x). 2009-12-23 Vincent Lefèvre [mbench/Makefile] Patch from Patrick Pelissier to solve the -I problem with GCC. 2009-12-21 Vincent Lefèvre [mbench/Makefile] Added a comment (warning about the use of -I). 2009-12-20 Paul Zimmermann patch from Patrick Pelissier 2009-12-18 Paul Zimmermann [scale2.c] added missing include (compilation with --with-gmp-build did fail) [exp_2.c] small improvements in Smith method: compute x^{2i} as (x^i)^2 instead of x^{i-1} * x. The error analysis is unchanged. [tuneup.c] fix for sin_cos threshold (we had a problem since mpfr_sin_cos was calling mpfr_cos, which was calling mpfr_sincos_fast in some cases [mparam_h.in] put new thresholds for Core 2 64-bit 2009-12-11 Paul Zimmermann [acinclude.m4] reversed order for case "quad, mais en little endian" for coherence with other cases 2009-12-10 Paul Zimmermann patch to recognize IEEE quad, little endian format for "long double" [scale2.c] now mpfr_scale2 is included in mpfr-impl.h, instead of #including "scale2.c" twice (thus it was compiled twice) 2009-12-07 Vincent Lefèvre sin_cos.c: in case of tiny inputs, keep the flags. In practice, this fixes the following bug in mpfr_sin_cos (shown by the latest additions to tsin_cos.c): if emin is the minimal exponent (MPFR_EMIN_MIN), the absolute value of the input is the minimum positive number and the rounding mode is toward 0 (or equivalent), then the underflow flag is dropped. The other exception cases (e.g., in case of reduced exponent range) are handled by mpfr_check_range(). tests/tsin_cos.c: in consistency(), better error message. tests/tsin_cos.c: in consistency(), improved testing on underflow case. tests/tsin_cos.c: in consistency(), added testing on underflow case. tests/tsin_cos.c: in consistency(), fixed flags testing. tests/tsin_cos.c: in consistency(), test also the flags. tests/tsin_cos.c: in consistency(), test also the returned value (the one that gives inexact-related information). 2009-11-30 Paul Zimmermann [tfits.c] converted to GNU coding style 2009-11-30 Vincent Lefèvre README.dev: updated "To make a release". uceil_exp2.c: fixed indentation. 2009-11-29 Vincent Lefèvre mpfr-impl.h: got rid of broken code when _GMP_IEEE_FLOATS was defined (broken aliasing rules, yielding failures with GCC 4.5.0 20091119). 2009-11-27 Paul Zimmermann [tset_ld.c] now perform tests even if old gcc bug is present 2009-11-26 Paul Zimmermann [tget_d.c] removed workaround for old gcc bug. Comment was: /* workaround for gcc bug on m68040-unknown-netbsd1.4.1, where DBL_MIN gives (1-2^(-52))/2^1022 */ [tadd.c, tmul.c] got rid of workaround for old gcc bug. Comment was: /* Parameter "z1" of check() used to be last in the argument list, but that tickled a bug in 32-bit sparc gcc 2.95.2. A "double" in that position is passed on the stack at an address which is 4mod8, but the generated code didn't take into account that alignment, resulting in bus errors. The easiest workaround is to move it to the start of the arg list (where it's passed in registers), this macro does that. FIXME: Change the actual calls to check(), rather than using a macro. */ [strtofr.c] removed patch for old FreeBsd/Alpha bug (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=72024) 2009-11-26 Vincent Lefèvre [pow_si.c] Updated comment added in r4355 concerning a bug in Sun's compiler for Solaris/x86. Updated comments concerning the old FreeBSD bug 72024 on LONG_MIN / 1. 2009-11-25 Vincent Lefèvre [tfprintf.c,tprintf.c] Fixed other types in function with variable arguments (even though there were no warnings on the tested machine). [tfprintf.c,tprintf.c] Fixed types in function with variable arguments. 2009-11-25 Paul Zimmermann [tfprintf.c,tprintf.c] applied patch from Philippe Theveny [acinclude.m4] removed check for %zu, no longer needed [acinclude.m4] added test for %zu [tfprintf.c,tprintf.c] added #ifdef's for NPRINTF_ZU 2009-11-25 Vincent Lefèvre configure.in: corrected a comment. tests/tstckintc.c: fixed types for the printf %p format specifier. 2009-11-25 Paul Zimmermann [tget_flt.c] replaced %a by %.8e [tget_d.c,tget_ld_2exp.c] replaced %a and %La by %.16e and %.16Le [tget_d.c] removed C99-specific instruction [nightly-test] added -ansi -pedantic-errors 2009-11-24 Vincent Lefèvre configure.in: completed the GMP CC/CFLAGS detection. configure.in: added a test to check for CC and CFLAGS in gmp.h only when the user doesn't redefine them and he isn't cross-compiling. configure.in: improved the GMP CC/CFLAGS detection. configure.in: try to fix the GMP CC/CFLAGS detection. Not finished. configure.in: replaced "test ... -o ..." (obsolete in POSIX) by "test ... || test ...". configure.in: replaced "test ... -a ..." (obsolete in POSIX) by "test ... && test ...". INSTALL: made instructions more clear. 2009-11-23 Vincent Lefèvre README.dev: updated "To make a release". README.dev: last things to do when making a release. 2009-11-22 Vincent Lefèvre sin_cos.c: fixed a potential bug by changing a rnd_mode into MPFR_RNDZ in mpfr_can_round. Indeed, in r4574, the change from if (!mpfr_can_round (c, m, GMP_RNDZ, rnd_mode, MPFR_PREC (z))) to if (!mpfr_can_round (c, m, GMP_RNDN, rnd_mode, MPFR_PREC (z) + (rnd_mode == GMP_RNDN))) looks wrong to me: in RNDN, the extra bit due to rnd_mode == GMP_RNDN changes a RNDN worst case into a RNDZ worst case. Note: The second mpfr_can_round with the same problem has been fixed in r6513. tests/tsin_cos.c: ported bug20091122 from the 2.4 branch to the trunk. But no failure in the trunk. 2009-11-20 Vincent Lefèvre tests/tconst_pi.c: fixed types for C++. Changeset r6162 broke Solaris builds. Fixed that by no longer checking INTMAX_MAX and UINTMAX_MAX to detect use of / . 2009-11-01 Paul Zimmermann [cos.c] fixed case where reduced argument is zero 2009-10-30 Vincent Lefèvre tcos.c: added a testcase yielding an assertion failure (this bug makes tsin_cos fail). tests/tsin_cos.c: ported the consistency test from the 2.4 branch. This yields an assertion failure (Linux/x86_64). 2009-10-30 Paul Zimmermann [cache.c] fixed bug with directed rounding [tconst_pi.c] added test for bug with directed rounding 2009-10-21 Vincent Lefèvre exceptions.c: improved a comment. tpow.c: added an overflow test. tpow.c: added an overflow test in RNDZ. 2009-10-20 Paul Zimmermann [TODO] added efficiency item 2009-10-19 Paul Zimmermann [lngamma.c] fixed typo, added comments about argument reduction, and replaced code using doubles [TODO] added efficiency item 2009-10-15 Paul Zimmermann [exp.c] binary splitting is now used for prec >= MPFR_EXP_THRESHOLD (instead of prec > MPFR_EXP_THRESHOLD before). This is more consistent with the other thresholds. [TODO] added efficiency item [mparam_h.in] added /* bits */ for MPFR_EXP_THRESHOLD and MPFR_EXP_2_THRESHOLD 2009-10-13 Paul Zimmermann [tsin_cos.c] removed useless instruction, and added comments [sin_cos.c] fixed call to mpfr_can_round (rounding mode was wrong) [tsin_cos.c] added new test [li2.c] fixed bug when x is near 0 [tli2.c] added new test 2009-10-09 Vincent Lefèvre tests/tsin_cos.c: mp_rnd_t -> mpfr_rnd_t. tests/tsin_cos.c: added a comment about bug20091008, corresponding to r6507; in fact, the bug concerns only the return value (see r6444). 2009-10-08 Paul Zimmermann [sin_cos.c] fixed error analysis [tsin_cos.c] added new test 2009-10-07 Vincent Lefèvre tests/tsin_cos.c: mp_rnd_t -> mpfr_rnd_t. tests/tsin_cos.c: removed trailing spaces. 2009-10-07 Paul Zimmermann [tsin_cos.c] changed binary to hexadecimal string (was too long for C89) [sin_cos.c] fixed bug introduced in r6447 (some variables had their precision not updated in Ziv's loop) [tsin_cos.c] added a new test 2009-09-29 Vincent Lefèvre FAQ update. 2009-09-29 Paul Zimmermann [mpfr.texi] added note about mpfr_can_round [tcan_round.c] added more tests 2009-09-24 Paul Zimmermann [README.dev] added item for new releases: we should say if they are binary and/or API compatible with previous releases (we often forgot to say it in the past) 2009-09-23 Vincent Lefèvre tests: added tget_flt to the svn:ignore property. tests/Makefile.am: added information about LOADLIBES. 2009-09-23 Paul Zimmermann [tests/Makefile.am] put back LOADLIBES=... (enables to compile a program foo.c in the test directory by simply doing "make foo") [atan.c] updated the comments 2009-09-22 Vincent Lefèvre atan.c: added a FIXME comment. atan.c: added some assertions. 2009-09-22 Paul Zimmermann [atan.c] implemented argument reduction (cf error analysis in algorithms.tex) 2009-09-21 Paul Zimmermann [tests/Makefile.am] removed LOADLIBES=... 2009-09-20 Vincent Lefèvre mpfrlint: check that lines aren't too long. Makefile.am: line-wrap libmpfr_la_SOURCES (M-q with Emacs) for compatibility with some vendor grep. Makefile.am, tests/Makefile.am: patch from Ralf Wildenhues. https://lists.gnu.org/archive/html/bug-automake/2009-09/msg00033.html 2009-09-18 Vincent Lefèvre mpfr-impl.h, sin_cos.c, tests/tsin_cos.c: mp_rnd_t -> mpfr_rnd_t. sin_cos.c: GMP_RNDx -> MPFR_RNDx. sin_cos.c: untabified. frac.c, tests/tfrac.c: fixed underflow case in mpfr_frac and added testcase. 2009-09-18 Paul Zimmermann [acos.c] initial working precision was too small 2009-09-18 Vincent Lefèvre modf.c: no longer extend the exponent range at all, since there are no intermediate computations (note: the mpfr_frac bug that has just been fixed affected this change in modf.c). [frac.c] Patch r6456 was incorrect: the problem with the non-significant bits had to be dealt with only in the case t = r. This is now fixed. tests/tfrac.c: reverted overflow case test (was incorrect because the input was too large). tests/tfrac.c: also test the overflow case. tests/tfrac.c: more tests (case where the fractional part rounds to 1). 2009-09-18 Paul Zimmermann [NEWS] added item [sin.c,cos.c] use mpfr_sincos_fast when prec >= MPFR_SINCOS_THRESHOLD 2009-09-18 Vincent Lefèvre tests/tfrac.c: more tests (there are also problems in rounding away from zero or equivalent). 2009-09-18 Paul Zimmermann added tuning mechanism for mpfr_sin_cos 2009-09-18 Vincent Lefèvre tests/tfrac.c: also test the ternary value (it is incorrect too). frac.c: fixed bug in mpfr_frac (the non-significant bits in low limb were not cleared). tests/tfrac.c: improved the testcase so that it triggers the bug for both 32 bits and 64 bits. tests/tfrac.c: added a comment for latest testcase. tests/tfrac.c: added testcase for bug in mpfr_frac. tests/tmodf.c: typo in error message. modf.c: extending the exponent range in the first two cases is useless because there are no intermediate computations (just a mpfr_set). Let's do that only for the general case. tests/tmodf.c: added overflow tests. modf.c: corrected a comment (rounding can yield an overflow, but not an underflow). 2009-09-18 Paul Zimmermann [sin_cos.c] added asymptotically fast code, with threshold currently hardcoded at 20000 bits, should be determined by tuneup.c 2009-09-18 Vincent Lefèvre Deleted trailing spaces. 2009-09-18 Paul Zimmermann [modf.c] changed semantics of return value in accordance with mpfr_sin_cos 2009-09-17 Paul Zimmermann [sin_cos.c] more precise meaning of the return value [sinh_cosh.c] idem as above [taway.c] fixed to check the more precise return value 2009-09-16 Paul Zimmermann [mpfr.texi] t was not initialized in Newton's example 2009-09-15 Paul Zimmermann changed _binary32 into _flt for file names too: svn mv get_binary32.c get_flt.c svn mv set_binary32.c set_flt.c svn mv tests/tget_binary32.c tests/tget_flt.c [TODO] removed an item [mpfr.texi] added an example for mpfr_prec_round [NEWS] added mpfr_set_flt and mpfr_get_flt changed suffix _binary32 -> _flt [get_binary32.c] fixed a bug in subnormal range 2009-09-15 Vincent Lefèvre mpfrlint: bug fix. mpfr.texi: updated the month. mpfrlint: execute svn in C locale. mpfrlint: check mpfr.texi's UPDATED-MONTH. 2009-09-15 Paul Zimmermann [tget_d.c] fixed FIXME 2009-09-15 Vincent Lefèvre tget_d.c code is C99-only (bug introduced in r6424). Please fix! 2009-09-15 Paul Zimmermann [get_binary32.c] also forgot in previous commit [set_binary32.c] file forgot in previous commit added new functions mpfr_set_binary32 and mpfr_get_binary32 fixed bug in mpfr_get_d and mpfr_get_decimal64 for RNDA [mpfr.texi] improved description of mpfr_sum, and fixed typo 2009-09-14 Vincent Lefèvre mpfr.h: added mpfr_regular_p macro. 2009-09-14 Paul Zimmermann [sum.c] added reference [get_ld.c] fixed bug reported by Nelson Beebe https://sympa.inria.fr/sympa/arc/mpfr/2009-05/msg00061.html [isregular.c] new function mpfr_regular_p [iszero.c] fixed typo in comment [tests/tisnan.c] added tests for mpfr_regular_p 2009-09-11 Vincent Lefèvre vasprintf.c: changeset r6414 was incorrect, in particular under Linux (at least some platforms), where wint_t is an unsigned int, not an int. Instead, let's detect whether integer promotion will occur or not, even though the ISO C99 standard requires a wint_t type that doesn't yield an integer promotion (7.24.1#2), because mingw32 defines wint_t as an unsigned short (thus with integer promotion). 2009-09-11 Paul Zimmermann [vasprintf.c] https://sympa.inria.fr/sympa/arc/mpfr/2009-09/msg00012.html (changed __wint_type into int) 2009-09-08 Vincent Lefèvre tests/tdigamma.c: added missing void in prototype. 2009-09-08 Paul Zimmermann [digamma.c] forgot to set sign for Psi(+Inf) 2009-09-04 Paul Zimmermann changed function into bernoulli.c (which was static, included 3 times) into an internal function mpfr_bernoulli_internal 2009-09-03 Paul Zimmermann [TODO] removed psi(=digamma) 2009-09-02 Vincent Lefèvre tests/data/digamma: for the special values, use the new mode '*' (exact cases) instead of 'n'. tests.c: added special support for exact cases in data_check (to test all the rounding modes and check the ternary value). towards -> toward (consistency). tests: added tdigamma to svn:ignore property. digamma.c: moved a comment. 2009-09-02 Paul Zimmermann [digamma.c] fixed bug (emin/emax were not restored) [data/digamma] added special values [tests/tests.c] fix to allow putting nan in data/* files [data/digamma] unitary test file for mpfr_digamma [tdigamma.c] now use data/digamma 2009-09-02 Vincent Lefèvre Removed trailing whitespace. 2009-09-02 Paul Zimmermann bernoulli.c goes into EXTRA_DIST [digamma.c] new function mpfr_digamma [lngamma.c,li2.c] factored computation of Bernoulli numbers in new file bernoulli.c (also used by digamma.c) 2009-08-27 Paul Zimmermann replaced obsolete GMP functions (suggested by Brian Gladman): 1. mpz_div_2exp ==> mpz_fdiv_q_2exp 2. mpz_div_ui ==> mpz_fdiv_q_ui 3. gmp_randinit (state, GMP_RAND_ALG_LC, 128) ==> gmp_randinit_lc_2exp_size (state, 128) (Didn't replace mpn_divrem by mpn_tdiv_qr since the parameters differ, and also for efficiency reasons.) 2009-08-26 Vincent Lefèvre tsprintf.c: fixed locale_da_DK test. 2009-08-26 Paul Zimmermann [csch.c,coth.c,csc.c,cot.c] fixed bug for tiny input and RNDA (result was rounded to zero instead of away) 2009-08-26 Vincent Lefèvre tests/tsprintf.c: bug fix (uncommented an "exit(1);"). 2009-08-26 Paul Zimmermann [tgeneric.c] revert previous change, bug is elsewhere [tgeneric.c] temporary fix in mpfr_can_round call (mpfr_can_round does not correctly handle MPFR_RNDA) 2009-08-26 Vincent Lefèvre set_ld.c: replaced a struct by a union. The struct was triggering the following warning with GCC 4.4: dereferencing type-punned pointer will break strict-aliasing rules (possibly due to possible memory alignment problems). The old code looked strange anyway and unions are exactly for such kind of things. 2009-08-26 Paul Zimmermann [tset.c] removed unused variables 2009-08-25 Vincent Lefèvre tcmp_ld.c: use "long double" constants. Note: this might solve the tcmp_ld failure reported on https://www.linuxquestions.org/questions/linux-from-scratch-13/mpfr-2-4-1-check-failures-in-lfs-6-5-rc2-746538/ (not tested). 2009-08-24 Vincent Lefèvre NEWS: update (new function mpfr_set_zero, added in r6339). mpfr.texi: NaN has a sign bit (in its binary representation), but as a FP datum, it does not have a sign. 2009-08-24 Paul Zimmermann [mpfr.texi] added mention of unspecified NaN sign bit for mpfr_set_nan 2009-08-21 Vincent Lefèvre mpfr.texi: do not use @code for roundTiesToAway and binary64 as this is not code and the IEEE 754-2008 standard doesn't use special typography. mpfr.texi: the sign bit of a NaN is unspecified. 2009-08-18 Vincent Lefèvre Add examples into $docdir (without using a subdir, as this would be a bit bloated just to add a few files). * Added "examples" directory with a ReadMe file and 3 examples. * Makefile.am: added files from the "examples" directory and changed dist_doc_DATA into nobase_dist_doc_DATA so that the "examples" directory is not stripped in the target directory $docdir. * README: added "examples/". get_str.c: corrected copyright notice, incorrectly modified in r6364. 2009-08-12 Philippe Théveny mpfr.texi: Fix typo. get_str.c: Format a comment. get_str.c vasprintf.c: Add support for the rounding away from zero mode. mpfr.texi: MPFR_RNDA mode support in printf functions. tests/tsprintf.c tests/tget_str.c: Test MPFR_RNDA support. 2009-08-06 Vincent Lefèvre NEWS: update. Install some documentation files. 2009-08-05 Vincent Lefèvre mpfr.texi: updated section "Installing MPFR". mpfr.texi: corrected a spelling mistake. Since GNU Automake 1.11 is available on too few platforms, removed its requirement (reverted to 1.10 requirement: 1.10.1 was needed only for dist-lzma, which has been removed). Instead, added hardcoded dist-xz support (tested with both Automake 1.10.2 and Automake 1.11). 2009-08-04 Vincent Lefèvre configure.in: replaced dist-lzma by dist-xz (the xz format is the successor of the lzma format); as a consequence, automake 1.11 is needed. 2009-07-30 Vincent Lefèvre Makefile.am, tests/Makefile.am: added copyright notice (similar to the one of the generated Makefile.in file). Since COPYING.LESSER makes a reference to the GPLv3, updated COPYING to the GPLv3. Autotools files are now distributed under the same license as MPFR (to avoid any reference to the GPLv2). Renamed COPYING.LIB as COPYING.LESSER (GNU Coding Standards, #7.3) and updated all the references (except in ChangeLog). Added algorithms.fdb_latexmk to svn:ignore property. 2009-07-30 Philippe Théveny tests/tset.c: With revision 6339, some tests were moved and added in the function check_special but this one was not called. tests/Makefile.am: Strech check_PROGRAMS list to ease insertion of new tests. Makefile.am: Sort tests in alphabetical order except the very first ones which are needed by the test suite itself. 2009-07-20 Philippe Théveny vasprintf.c mpfr.texi: Change behavior with %Rf and an empty precision field. The default precision is now 6 with %Rf and %Rg. tests/tprintf.c tests/tfprintf.c tests/tsprintf.c: Change tests with empty precision field and %Rf. Makefile.am mpfr.h mpfr.texi set_zero.c: New function mpfr_set_zero. tests/tset.c: Replace all MPFR_ASSERTN with verbose message. Add tests for mpfr_set_zero. 2009-07-15 Paul Zimmermann [INSTALL] hint about patch command 2009-07-14 Paul Zimmermann [mpn_exp.c] reverted previous change (MPN_ZERO is a macro for memset, which does not forbid zero size) [coth.c, tcoth.c] fixed coth(+/0) which was wrong (reported by Christopher Creutzig) [mpn_exp.c] fixed bug reported by David Kirkby on Solaris (GMP compiled with Solaris compiler) 2009-07-08 Vincent Lefèvre vasprintf.c: typo in a comment. 2009-07-08 Philippe Théveny vasprintf.c: Fix bug with %Rf, non-zero precision and a value rounded up to the next power of ten. 2009-07-08 Vincent Lefèvre vasprintf.c: deleted trailing spaces. tsprintf.c: added tests of some halfway cases. 2009-07-08 Philippe Théveny vasprintf.c: Fix bug in precision 0 with format %.0Rf (0.5 rounds to 0). 2009-07-08 Vincent Lefèvre tsprintf.c: added a test that triggers an assertion failure. tsprintf.c: fixed a test and added more tests for %.0Rf with the even rounding rule (shows a bug added in the latest corrections). 2009-07-07 Vincent Lefèvre tsprintf.c: completed the test on emax (for %Ra and %Rb). Everything is OK. tsprintf.c: my test was incorrect (I forgot the R), sorry. Still completing it... tsprintf.c: comment (so that the test can be ported to the 2.4 branch). tsprintf.c: started to write a test for emax, showing a bug (random output). 2009-07-06 Vincent Lefèvre ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". mpfr.texi: updated the month. mpfr.texi consistency: @var{stdout} -> @code{stdout}. vasprintf.c: do not use a potential function call in SAFE_ABS macro. 2009-07-06 Philippe Théveny vasprintf.c tests/tsprintf.c: deleted trailing spaces. 2009-06-29 Philippe Théveny vasprintf.c: Fix bug when the value to be printed is rounded to the next power of ten with %Rf or %Rg (continuation of fix in r6278). tests/tsprintf.c: Add tests for rounding to next power of ten bug with %Rf or %Rg. 2009-06-26 Vincent Lefèvre mp_exp_unsigned_t -> mpfr_uexp_t (internal type only). mpfrlint: check the use of the obsolete mp_rnd_t type. mp_rnd_t -> mpfr_rnd_t Suppressed MPFR_CLEAR_FLAGS (no longer did anything). 2009-06-23 Vincent Lefèvre mpfr.texi: updated the month. mpfr.texi: fixed description of mpfr_get_str (clash with variables, inconsistent cases in the info format). get_str.c: added a space. 2009-06-21 Vincent Lefèvre vasprintf.c: corrected comments. 2009-06-19 Philippe Théveny vasprintf.c: convert GMP_RNDx to MPFR_RNDx. vasprintf.c: Add brace to disambiguate nested if, and remove unused variable. tests/tfprintf.c tests/tprintf.c: Do not test very small values with %f. vasprintf.c: Fix bug when the value to be printed is rounded to the next power of ten with %Rf or %Rg. tests/tsprintf.c: Add tests for rounding to next power of ten bug. 2009-06-18 Paul Zimmermann [TODO] added new functions to implement 2009-06-16 Philippe Théveny sinh_cosh.c: precision of intermediate computation no more depends on precision of input variables. 2009-06-15 Vincent Lefèvre mpfr.h: new MPFR_VALUE_OF macro, now used by mpfr_get_prec and mpfr_get_exp macros (this is cleaner than the old hack). 2009-06-14 Vincent Lefèvre acinclude.m4: Make sure results of calculations on constants used with the fesetround() test are not precomputed by GCC (occurs on MIPS). Patch from Maciej W. Rozycki. https://sympa.inria.fr/sympa/arc/mpfr/2009-06/msg00036.html gmane.comp.lib.mpfr.general:174 2009-06-13 Paul Zimmermann [algorithms.tex] bounds for get_str were checked by Mark Dickinson 2009-06-12 Paul Zimmermann [algorithms.tex] fixed typo [algorithms.tex] fixed and completed up to b=62 table of bounds for get_str [mpfr.texi] fixed description of case n=0 for get_str (case of powers of two bases was not coherent with the code) 2009-06-10 Paul Zimmermann [algorithms.tex] analyzed precisely the cases where the value is m+1 instead of m 2009-06-10 Vincent Lefèvre acinclude.m4: reverted incorrect patch r6267 that makes the test no longer work on x86 (with traditional FPU, no SSE), where one should get checking for gcc float-conversion bug... yes, use -ffloat-store instead of checking for gcc float-conversion bug... no Indeed the "volatile" has the effect to have all the intermediate results x stored into memory, i.e. it is more or less equivalent to the -ffloat-store option, so that it does not allow one to test whether -ffloat-store is needed or not (which is the goal of this test). 2009-06-09 Paul Zimmermann [acinclude.m4] patch from Maciej W. Rozycki on mpfr mailing-list, 9 Jun 2009 added more test cases for the Bessel functions (from John Harrison paper at Arith19) 2009-06-04 Philippe Théveny vasprintf.c: Binary output with no digit after the decimal point is now supported. Fix bug when the binary or hexadecimal output value is rounded to the next power of the base. This also change outputs like 0xf.f with format string "%.0Ra" from 8p+1 to 1p+4 (as does gnu libc's printf). tests/tsprintf.c: add check for rounding to the next base power and fix some test value with %.0Ra (now output 1p+4 instead of 8p+3). 2009-06-03 Philippe Théveny mpfr-longlong.h: Update to newer GMP version (changeset 12418:12a1d0bf21f0 Sun Mar 01 23:47:31 2009 +0100), merging modifications from r4657. 2009-05-29 Vincent Lefèvre vasprintf.c: do not use GMP's namespace for identifiers defined in MPFR. README.dev: added: do not use the GMP namespaces... mpfr.h: rewrote a comment. 2009-05-29 Philippe Théveny vasprintf.c: Fix bug, "%%" was not correctly displayed when used alone or before a mpfr_t output. tests/tfprintf.c tests/tprintf.c: Fix expected values for tests with "%%". mpfr.texi: Restate subsection Formatted Output Functions/Format String. 2009-05-28 Philippe Théveny mpfr.texi: details on use of 'P' type in mpfr_printf. 2009-05-27 Philippe Théveny NEWS: remind bug fixes since version 2.4.0. set_d64.c: Partial revert of r6190 to fix problem in a simpler way: the decimal digits can be stored in array of char (no need to be unsigned). 2009-05-27 Vincent Lefèvre mpfr.texi: updated the month. tests/tfmod.c: deleted trailing whitespace. 2009-05-22 Philippe Théveny tests/tatan.c: Add test triggering underflow (test coverage is now 100%). 2009-05-20 Vincent Lefèvre tests/tgeneric.c: for the second computation, increase the precision of the inputs in order to trigger the mpfr_fmod bug fixed in r6230 (and potentially other bugs). Thanks to Eric Veach for the idea. Added tbuildopt to svn:ignore property of tests. 2009-05-20 Philippe Théveny tests/tfmod.c: complete tests with special values. tests/tfmod.c: code simplification + check ternary value too. 2009-05-20 Vincent Lefèvre tests/tfmod.c: replaced NULL by (mpfr_ptr) 0 in mpfr_inits2/mpfr_clears. tests/mpfr-test.h: added mpfr_cmp_ui0 macro (check that x is not a NaN). tests/tfmod.c (bug20090519): check that the results are not NaN's and replaced GMP_RNDN by MPFR_RNDN. 2009-05-20 Paul Zimmermann [tests/tfmod.c] added testcase for bug reported by Eric Veach [rem1.c] fixed bug reported by Eric Veach 2009-05-19 Paul Zimmermann [TODO] added one item 2009-05-13 Laurent Fousse Clarify the fact that mpfr_sum guarantees correct rounding. 2009-05-13 Vincent Lefèvre mpfr.h: updated a comment. 2009-05-13 Philippe Théveny mpfr.h: Add a warning comment (removed in r6026). [merge -c 6209 from branch 2.4] 2009-05-13 Vincent Lefèvre fms.c: improve the performance of memory allocations in small precision (almost identical to changeset 6195 for fma.c). 2009-05-12 Vincent Lefèvre fma.c: patch by Patrick Pélissier to improve the performance of memory allocations in small precision. 2009-05-05 Philippe Théveny Put '#include ' in mpfr-impl.h, remove it elsewhere. Other cleanup of header inclusion. Other change (by mistake): corrections in algorithms.tex 2009-05-05 Vincent Lefèvre NEWS: corrections / limit to 80 characters per line. 2009-05-05 Philippe Théveny get_d64.c set_d64.c: Fix types. printf.c tests/tpow_all.c: is not automatically included when compiling with --with-gmp-build option. NEWS Makefile.am mpfr.h mpfr.texi buildopt.c: New functions mpfr_buildopt_tls_p and mpfr_buildopt_decimal_p. tests/Makefile.am tests/tbuildopt.c: Add tests for mpfr_buildopt_tls_p and mpfr_buildopt_decimal_p. 2009-05-05 Vincent Lefèvre atan.c: added comments after checking r6186. 2009-05-05 Philippe Théveny atan.c: expand exponent range when computing arctan(Inf) and arctan(+-1). tests/tatan.c: Check underflow of arctan(Inf) and arctan(1) with reduced exponent range. 2009-05-04 Vincent Lefèvre tests/tatan.c: replaced GMP_RNDN by MPFR_RNDN. 2009-04-29 Vincent Lefèvre Removed trailing spaces. 2009-04-29 Paul Zimmermann [atan.c] fixed bug when x is very near but differs from 1 2009-04-29 Vincent Lefèvre tests/tatan.c: added testcase for bug found by Christopher Creutzig (atan2_different_prec). 2009-04-22 Vincent Lefèvre tests/tests.c (data_check): try to open the data file first from the build directory, then from the source directory. init2.c: check that mp_bits_per_limb == BITS_PER_MP_LIMB (useful in case GMP is upgraded with a different ABI, e.g. 32 vs mode32 on PowerPC 64). Without such a check, MPFR can give incorrect results if the ABI's don't match. Improved fix for problem dealt with in r6174: use function src_fopen() (from tests.c) instead of a macro MPFR_SRCDIR. Fixed problem when the srcdir value contains a word that is #define'd by the C implementation (test failure) or a comma (worse, the build of the tests terminates with an error). This can happen only when objdir and srcdir are different directories. * tests/Makefile.am (tmul_CPPFLAGS): Put srcdir pathname in quotes. * tests/tmul.c (MPFR_SRCDIR): Make the default a string. (QUOTE, NAME): Delete. (check_regression): Don't QUOTE MPFR_SRCDIR. Thanks to Sandra Loosemore for the patch. https://sympa.inria.fr/sympa/arc/mpfr/2009-04/msg00038.html 2009-04-15 Philippe Théveny get_f.c: remove dead code (x and z always have the same number of limbs). tests/tget_f.c: Add tests with every rounding mode, add tests with random values. tests/tget_f.c: Fix typos, better error messages. 2009-04-14 Philippe Théveny tests/tget_f.c get_f.c: Set result to the maximum value when the mpfr_t is plus infinity and set correct ternary value. tests/tget_f.c: Fix typo, increase size of y so that x and y have different limb size (they had the same size on MacOS X-32bits). 2009-04-10 Vincent Lefèvre mpfr.texi: update concerning intmax_t after the change in r6166. mpfr.h: for intmax_t, also test _STDINT_H and _STDINT_H_. [merged changeset r6165 from the 2.4 branch] mpfr.texi: updated the month. mpfr.h: for the intmax_t detection, also test INTMAX_MAX / UINTMAX_MAX (this may be useful for users of C++ compilers, if they have defined __STDC_LIMIT_MACROS but not __STDC_CONSTANT_MACROS). mpfr.texi: improvement concerning the use of intmax_t and uintmax_t. [merged changesets r6160 and r6161 from the 2.4 branch] 2009-04-09 Paul Zimmermann [INSTALL] updated Notes on AIX/PowerPC 2009-04-08 Philippe Théveny NEWS mpfr.texi get_f.c: mpfr_get_f now returns the usual ternary value. tests/tget_f.c: test the ternary value and the erange flag. 2009-04-08 Vincent Lefèvre tests/tget_z.c: do not assume specific values of the ternary value. get_z.c: simplified code. NEWS: s/an inexact value/a ternary value/ 2009-04-08 Philippe Théveny NEWS mpfr.texi get_z.c: mpfr_get_z now returns an inexact value. mpfr.h: change prototype of mpfr_get_z. tests/tget_z.c: test inexact value. 2009-04-08 Paul Zimmermann [mpf2mpfr.h] added comment for #endif 2009-04-08 Philippe Théveny mpf2mpfr.h: fix typo 2009-04-02 Vincent Lefèvre get_z.c: fixed title in comment. 2009-04-01 Vincent Lefèvre get_z.c: detect out-of-range precision (such a detection could be missed if mpfr_exp_t > mpfr_prec_t). Removed the comment from mpfr.h added in r6149, and patched get_z.c (safer code is better than a comment). mpfr.h: important comment to validate the change done in r6147. get_z_exp.c: updated comments. 2009-04-01 Paul Zimmermann [get_z.c] simplified the code, removed the FIXME [tget_z.c] added new test [mpfr.texi] completed documentation of mpfr_get_z_exp (was incomplete for 0) [tget_z.c] added test case for 0 with emin > 0 (should give 100% coverage for get_z.c) 2009-03-30 Philippe Théveny strtofr.c tests/tset_str.c: Code simplification (sizeof (char) is always 1). vasprintf.c: Cast into size_t (just in case). vasprintf.c: Code simplification (sizeof (char) is always 1). 2009-03-27 Philippe Théveny acinclude.m4: remove definition of va_copy, just detect its presence. printf.c vasprintf.c: #define a replacement of va_copy if needed (in the same way as gmp). 2009-03-26 Philippe Théveny acinclude.m4: Change MPFR_FUNC_PRINTF_SPEC (renamed MPFR_FUNC_GMP_PRINTF_SPEC) so that it actually checks output. 2009-03-25 Philippe Théveny Change base upper limit in string conversion up to 62. 2009-03-25 Paul Zimmermann [mpfr.texi] fixed documentation of mpfr_get_str which was wrong [tget_str.c] added test cases for odd base and tie breaking case [get_str.c] fixed typos in comments [tests/random2.c] added missing mpfr-test.h (revealed by nightly tests), and removed mpfr-impl.h (already included in mpfr-test.h) I have also removed MPFR_NEED_LONGLONG_H: I don't see why it is needed, and all tests pass. 2009-03-24 Philippe Théveny mpfr.texi: Add a note on mpfr_printf output in binary with precision one. urandomb.c mpfr-gmp.c mpfr-gmp.h: mpfr_rand_raw is now in urandom.c. mpfr-impl.h: mpfr_rand_raw is now always build as an internal function. TODO tests/tests.c tests/random2.c: Use mpfr_rand_raw instead of _gmp_rand Move mpfr_random2 to tests directory, remove it from API. mpfr.texi: Improve documentation in Formatted Output Functions/Format String subsection. 2009-03-24 Vincent Lefèvre cos.c, sin.c: added MPFR_ASSERTN for huge expx. 2009-03-21 Vincent Lefèvre mpfr.texi: corrected mpfr_strtofr documentation ("NAN()" is accepted). tests/tstrtofr.c: added a test for "NAN()". Note: the code follows the ISO C99 standard for strtod, as explained in the mpfr_strtofr documentation, so that the code was correct. [merged changeset 6131 from the 2.4 branch and changed GMP_RNDN into MPFR_RNDN] 2009-03-19 Vincent Lefèvre mpfrlint: added some tests for acinclude.m4 and configure.in (sh). Applied patch from Ralf Wildenhues. * configure.in: Avoid unportable (and unneeded) shell quoting. * acinclude.m4: Avoid non-POSIX shell construct. 2009-03-18 Vincent Lefèvre tests/tmin_prec.c: replaced GMP_RNDN by MPFR_RNDN. 2009-03-16 Vincent Lefèvre tests/tset_ld.c: removed unused variable. 2009-03-16 Philippe Théveny tests/tset_ld.c: Add test case for the bug fixed with r6101. 2009-03-16 Vincent Lefèvre tests/tmin_prec.c: added tests. tests: updated svn:ignore property. min_prec.c: fixed another bug (the code was incorrect with >= 2 limbs). tests/tmin_prec.c: bug fix (side effects in MPFR_ASSERTN), new tests. README.dev: added a note about assertions and code with side effects. 2009-03-16 Philippe Théveny tests/tfprintf.c: Use a value less than 2^31-1 compatible (thus < LONG_MAX) in bug_20090316 (cf r6112). 2009-03-16 Vincent Lefèvre Replaced GMP_RND* by MPFR_RND*. 2009-03-16 Paul Zimmermann [tests/tmin_prec.c] new file contributed from Laurent Fousse [tests/Makefile.am] added tmin_prec 2009-03-16 Vincent Lefèvre min_prec.c: removed a useless test. min_prec.c: fixed another bug. 2009-03-16 Philippe Théveny vasprintf.c: Add more debug assertion on the buffer size. vasprintf.c: Fix bug_20090316 (in buffer_cat, the buffer was 1 character too small in some cases). tests/tfprintf.c: Add test for bug_20090316. 2009-03-16 Vincent Lefèvre tests/tadd.c: changed GMP_RND* (from r6071) into MPFR_RND*; this should have been done when porting the patch from the 2.4 branch. 2009-03-16 Philippe Théveny tests/tprintf.c: Use new environment variable MPFR_CHECK_LARGEMEM for memory expensive test. 2009-03-16 Vincent Lefèvre min_prec.c: bug fixed by Laurent. 2009-03-16 Philippe Théveny tests/tsprintf.c: Fix typo. 2009-03-16 Vincent Lefèvre Fixed the prototype of mpfr_min_prec (should return a mpfr_prec_t) and its description. min_prec.c: fixed a bug (but the code should be improved). min_prec.c: simplified the singular cases (see other functions). 2009-03-15 Laurent Fousse Add prototype for mpfr_min_prec in mpfr.h. Add documentation for mpfr_min_prec. New function mpfr_min_prec. 2009-03-15 Vincent Lefèvre get_ld.c: fixed bugs in the case HAVE_LDOUBLE_IEEE_EXT_LITTLE (one found by Steve Kargl, and another one concerning the mpfr_set_emax value). 2009-03-13 Philippe Théveny vasprintf.c: This is probably dead code, but being uncertain, put an assert here. vasprintf.c: As the buffer helper functions are not used in the current code with a zero parameter len, do not handle this case anymore, check that these cases do not happened in MPFR_ASSERTD macros, add some additional assert to ensure consistency. vasprintf.c: make clear that string_buffer.curr is a pointer to the null terminating character, fix the only place where it was not handle so. vasprintf.c: Fix bug. tests/tprintf.c: Add an expensive test where the output number has more than INT_MAX characters. vasprintf.c: Fix the bug triggered by the new test in tsprintf.c. mpfr.texi: Do cosmetic changes and add some details on printf behavior when the precision field is empty. tests/tsprintf.c: improve code coverage. tests/tprintf.c: improve code coverage, check the behavior describe in mpfr.texi. 2009-03-12 Vincent Lefèvre zeta_ui.c: correction r6090 was incorrect as there was another problem: the 3rd argument of mpz_divexact_ui is an unsigned long, not a limb. So, fixed the shift count (assuming no padding bits in unsigned long). zeta_ui.c bug fix: a shift count could be >= width of type (if a limb is a long long and long long is twice the size of a long). This problem was detected by a warning on gcc40 with CFLAGS="-mpowerpc64 -mcpu=970 -O2". 2009-03-10 Vincent Lefèvre tests/tprintf.c: added missing cast to void * for %p. 2009-03-09 Vincent Lefèvre tests/tfprintf.c: added missing cast to void * for %p. vasprintf.c: fixed bug in CONSUME_VA_ARG for case MP_LIMB_ARG (%Mu). README.dev: GMP with ABI=mode32 should be tested on 64-bit PowerPC. 2009-03-06 Philippe Théveny vasprintf.c: now return -1 when the format string is invalid (undefined behavior in standard C99) tests/tprintf.c: Additional checks with invalid format strings. mpfr.texi: Add missing conversion specifier accepted with mpfr_t variable. 2009-03-06 Vincent Lefèvre add1.c: assertions on the argument values should use MPFR_ASSERTN. 2009-03-06 Paul Zimmermann [cache.c] improved comment for mpfr_init_cache [add1.c] transformed switch() into if-then-else, to get 100% coverage 2009-03-06 Vincent Lefèvre untabify update-faq: change GMP_RND into MPFR_RND from the version on the web (since MPFR 3.0 hasn't been released yet, the FAQ still uses the 2.x API). 2009-03-05 Vincent Lefèvre tests/tadd.c: completed the code coverage (case bk == 0 in add1.c). 2009-03-05 Paul Zimmermann [mpfr-impl.h,cache.c] commented out mpfr_init_cache [const_catalan.c] decreased initial Ziv precision to get 100% coverage [cmp2.c] added comments [tcmp2.c] added test to improve coverage to 100% [atan2.c,tatan.c] reduced Ziv's initial precision and added test to have 100% coverage of atan2.c [atan.c] coverage should now be 100% 2009-03-04 Paul Zimmermann [algorithms.bib] added new reference [TODO] added pointers 2009-03-04 Vincent Lefèvre mpfr-gmp.c (mpfr_assert_fail): output "MPFR" too in assertion failure messages. Updated mpfrlint script. mpfr.texi: updated month. NEWS: say that the license has changed. 2009-03-03 Vincent Lefèvre Updated NEWS (function mpfr_random has been removed). 2009-03-03 Paul Zimmermann GMP_RNDX -> MPFR_RNDX 2009-03-03 Vincent Lefèvre tests: added taway to svn:ignore property. Update to LGPL v3+, as decided by the main MPFR developers. 2009-02-27 Vincent Lefèvre Untabified and deleted trailing spaces (for patches). 2009-02-27 Paul Zimmermann [rint.c] fixed a bug incorporated with the round away mode [tget_sj.c] fixed the tests for round away [rint.c] fixed bug with round away [taway.c] new test file for round away (with random values) [tests/Makefile.am] added taway [set_z.c] GNU style 2009-02-27 Philippe Théveny tests/tests.c: Change test5rm (formerly test4rm) so that it checks the new GMP_RNDA rounding mode, and that the corresponding rounding towards infinity is checked with GMP_RNDZ or with GMP_RNDA in one-pass mode (now, two-pass mode). Remove a comment about a warning from gcc solved with r5057. 2009-02-27 Paul Zimmermann [rem1.c] fixed bug found in adding tests for round away [add.c] added comment for 0 + 0 with round away 2009-02-26 Vincent Lefèvre tests/texceptions.c: removed obsolete comments from r2427. 2009-02-26 Paul Zimmermann [mpfr.h] added comment about order of rounding modes [texceptions.c] added comments, fixed typo [tsub.c] added test, fixed typo 2009-02-26 Philippe Théveny Add tests with round away mode. 2009-02-26 Vincent Lefèvre Updated version to 3.0.0-dev. 2009-02-26 Paul Zimmermann added round to away (still experimental) [mpfr.h] added comments for rounding modes 2009-02-26 Vincent Lefèvre Added svn:ignore property on the m4 directory (these .m4 files are generated automatically). Makefile.am: updated -version-info (since mpfr_random has been removed, we already know its value). Makefile.am: do not check libtool -version-info value if the VERSION file contains "-dev". Makefile.am: In a "make dist", check that libtool -version-info value is up-to-date (this is a heuristic only). README.dev: updated "To make a release" -- it is important to read this section entirely before making any release (even if some steps may be skipped for some particular releases). 2009-02-25 Vincent Lefèvre tests/tsprintf.c: do not use VLA's (C99 only). README.dev: update about patches. tests/tsprintf.c: coding style: removed spurious spaces. mpfr.texi: updated month. printf.c: fixed assertion failures in the case buffer == NULL and size == 0 (see r5995). Also replaced MPFR_ASSERTD(buf != NULL) by MPFR_ASSERTN(buf != NULL) since buf is provided as an argument. tests/tsprintf.c: added mpfr_snprintf/mpfr_vsnprintf tests with buffer == NULL and size == 0 (as allowed in C99 snprintf/vsnprintf and by the MPFR documentation). 2009-02-25 Philippe Théveny mpfr.texi: Fix typos. 2009-02-24 Vincent Lefèvre tuneup.c: untabified. 2009-02-24 Philippe Théveny printf.c: Fix wrong return value, mpfr_snprintf and mpfr_vsnprintf functions must always return the number of character that would be written if the parameter n had been sufficiently large (it previously returned zero when n == 0). tests/tsprintf.c: Fix test of mpfr_snprintf and mpfr_vsnprintf (the wrong return value was checked). 2009-02-24 Vincent Lefèvre printf.c: fix buffer overflow in mpfr_snprintf and mpfr_vsnprintf. tsprintf.c: added a test showing a buffer overflow in mpfr_vsnprintf. tsprintf.c: added a test showing a buffer overflow in mpfr_snprintf. 2009-02-23 Vincent Lefèvre Changed how the test of MPFR_VERSION_MAJOR, MPFR_VERSION_MINOR and MPFR_VERSION_PATCHLEVEL vs MPFR_VERSION_STRING is performed. Detailed explanations: The test was enabled only in release tarballs (suffix not present), where tests/tversion.c normally contained a "#if 1" (though this is not the case in the MPFR 2.4.0 tarball). In patches, this test should be disabled by changing the "#if 1" into "#if 0", due to the suffix. But as one should be able to apply any patches (in any order), this method was not satisfactory. The test has been moved from tests/tversion.c to tests/tests.c (in function test_version), and the suffix is now ignored in this test; the change of #if has been removed from the update-version script. 2009-02-20 Vincent Lefèvre README.dev: corrected update-version usage for patches. FAQ update. 2009-02-20 Paul Zimmermann [mparam_h.in] added default thresholds for sparc64 [tuneup.c] print gcc patchlevel 2009-02-19 Vincent Lefèvre speed.c, tests/texp.c: untabified. mpfr.texi: improved mpfr_strtofr documentation (completing r5965). 2009-02-18 Paul Zimmermann [mparam_h.in] added tuning for powerpc64 2009-02-18 Philippe Théveny strtofr.c: fix typo. strtofr.c: accept bases up to 62. mpfr.texi: modify mpfr_strtofr documentation accordingly. tests/tstrtofr.c: add tests for bases 62, 60, and 61. 2009-02-17 Philippe Théveny mparam_h.in: Change core2/64bit parameters. 2009-02-17 Vincent Lefèvre Checks whether C99 length modifiers 'hh' and 'll' are supported by the system ('hh' is absent on alpha-OSF1-V5, bug reported by Kate Minola). [Merged changeset 5956 from the 2.4 branch.] 2009-02-17 Paul Zimmermann [texp.c] yet another better fix [texp.c] fixed previous patch and added comment [texp.c] fixed corner case test 2009-02-16 Vincent Lefèvre README.dev: improved latest change. README.dev: mentioned update-version for patches. 2009-02-11 Paul Zimmermann [mpfr-gfx.c] added -p option to produce a Postscript file 2009-02-10 Paul Zimmermann [mparam_h.in] added thresholds for ARM [README.dev] added description of how to tune MPFR [README.dev] added another example of using mpfr-gfx [Makefile] modified Makefile to compile statically, and to allow also build directories of GMP/MPFR 2009-02-10 Philippe Théveny mbench/mpfr-gfx.c: add option -rPREC_RATIO for geometric progression. 2009-02-10 Paul Zimmermann [mparam_h.in] updated Itanium parameters (now for Itanium2) [mparam_h.in] added symbol __itanium__ for Itanium[12] 2009-02-09 Paul Zimmermann [README.dev] fixed typo [mpfr-gfx.c] added comments in the code (might be useful) [README.dev] added pointer to mbench to check the thresholds [mpfr-gfx.c] now also produces a plot.gnuplot file together with plot.data [mparam_h.in] updated default thresholds with gmp-4.2.4 [tuneup.c] fixed typo [Makefile.am] added stuff to compile speed program [speed.c] preliminary program to check the tuning of mpfr (based on tuneup.c) So far it only measures mpfr_mul up to 1000 bits, with increment ratio of 1.1. Requires --with-gmp-build like tuneup. Feel free to improve! [mparam_h.in] allow __tune_ia64__ in addition to __ia64 [mparam_h.in] replaced __pentium4 by __tune_pentium4__, ... 2009-02-08 Paul Zimmermann [acinclude.m4] removed detection of HAVE_HOST_CORE2 [mparam_h.in] replaced HAVE_HOST_CORE2 by __tune_core2__ 2009-02-06 Philippe Théveny tests/mpf_compat.h: complete r5922 adding missing mpz_init/mpz_clear. 2009-02-06 Vincent Lefèvre TODO: updated efficiency items. 2009-02-06 Paul Zimmermann [TODO] added 2 efficiency items 2009-02-06 Vincent Lefèvre mpfr.texi: moved MPFR_DECL_INIT specification into Section "Initialization Functions" (now in the standard MPFR API), and removed now empty Section "Advanced Functions". 2009-02-05 Vincent Lefèvre mparam_h.in: updated comment to mention -march=native and -mtune=native. mpfr.h: updated a comment concerning MPFR_DECL_INIT. 2009-02-05 Paul Zimmermann [mpf2mpfr.h] added mpz_set_f (reported by Francois Morain) [mpfr.texi] moved mpfr_inits, mpfr_inits2, mpfr_clears to supported functions [TODO] added new info about MPIR 2009-02-04 Paul Zimmermann [TODO] added info to distinguish GMP and MPIR 2009-01-26 Vincent Lefèvre Updated the version on the trunk. 2009-01-25 Paul Zimmermann [nightly-test] removed --disable-alloca (GMP option) 2009-01-25 Vincent Lefèvre README.dev: --disable-alloca is a GMP configure option. 2009-01-21 Philippe Théveny tests/tsprintf.c: remove tests against libc's printf with "%a" (not in ISO C90), and with "%p" (implementation defined). [merge -c 5885 from branches/2.4] 2009-01-21 Vincent Lefèvre mpfr-impl.h: avoid a compiler bug under Mac OS X Tiger + Xcode (&x == &x is false) that makes tset_d fail; this problem was introduced in r5880. 2009-01-20 Vincent Lefèvre Fixed bug reported by Chris Saunders: if _GMP_IEEE_FLOATS is defined, the build of tset_ld.c fails because DOUBLE_ISNAN expects a lvalue. * mpfr-impl.h: documented that for such macros, the argument must be a lvalue, and always make sure that it is a lvalue (so that a failure doesn't depend on the environment). * tests/tset_ld.c: fixed the bug. tests/tversion.c: be more tolerant when checking whether gmp.h version and libgmp version are the same (in case patch level is 0). tests/tset_ld.c: added explanation of NaN-related failures in case MPFR_NANISNAN is defined. Added missing void's. tests/tsprintf.c: removed a blank line (for consistency with the 2.4 branch). vasprintf.c: deleted trailing spaces. 2009-01-19 Vincent Lefèvre mpfr-impl.h: comment for DOUBLE_ISNAN with MPFR_NANISNAN defined. tests/tset_d.c: fixed test of mpfr_set_d on -0 with gcc -ffast-math (the -d for d = 0.0 was giving 0.0, hence a spurious failure). mpfr-impl.h: the DOUBLE_ISNAN macro wasn't working with gcc -ffast-math (at least on x86_64); fixed that by adding another test. tests/tset_ld.c: Isnan_ld wasn't working either; also the NaN test was incorrect. Now, the failure on NaN is correctly reported. tests/tcmp_d.c, tests/tcmp_ld.c, tests/tset_d.c: corrected message. tests/tcmp_d.c, tests/tcmp_ld.c, tests/tset_d.c: added explanations of NaN-related failures in case MPFR_NANISNAN is defined. Note: in tset_d.c, moved the NaN test before the signed-zero test to catch the failure on the NaN first. acinclude.m4: improved warning message. INSTALL: updated "In case of problem". acinclude.m4: added a warning message for the NAN != NAN test. 2009-01-19 Philippe Théveny tcmp_d.c tset_d.c tcmp_ld.c: Remove tests with NaN when MPFR_NANISNAN is defined. tests.c: Add a warning in a comment that Isnan always returns 0 on systems where MPFR_NANISNAN is defined. vasprintf.c: do not support 't' when NPRINTF_T is defined, HAVE_STDINT_H -> _MPFR_H_HAVE_INTMAX_T. tests/tfprintf.c: renumber tests (there was two tests #9). 2009-01-19 Vincent Lefèvre tests/tfprintf.c: %c takes an int argument, not a char (see C standard). tests/tprintf.c, tests/tsprintf.c: * %c takes an int argument, not a char (see C standard), even though this may be equivalent due to integer promotion. * Add void in prototypes of functions taking no arguments. mpfr.texi: updated references to the GMP manual. mpfr.texi: typo in comment. mpfr.texi: added .info extension in cross-references, to avoid the bug reported here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=484740 mpfr.texi: added a reference to a texinfo bug in a comment. mpfr.texi: added missing @code{}. mpfr.texi: don't -> do not, doesn't -> does not, won't -> will not. mpfr.texi: improved Section "Format String". 2009-01-19 Philippe Théveny tests/tsprintf.c: check if native types are really processed by libc printf. 2009-01-19 Vincent Lefèvre README.dev: no longer mentions HAVE_QUAD_T since it is no longer used. 2009-01-19 Philippe Théveny mpfr.texi: Explicit list of type supported by mpfr_printf functions. acinclude.m4: Remove detection of type modifier 'q'. vasprintf.c: Remove support of type modifier 'q'. tests/tfprintf.c tests/tprintf.c: Remove tests with type modifier 'q'. INSTALL: Warn that --with-gmp, --with-gmp-include/--with-gmp-lib, and --with-gmp-build options are mutually exclusive. configure.in: Check and fail if --with-gmp, --with-gmp-include/--with-gmp-lib, or --with-gmp-build are use simultaneously. 2009-01-19 Vincent Lefèvre tests/tests.c: include only if need be. 2009-01-16 Paul Zimmermann [mpfr.texi] made difference between mpfr_set_str and mpfr_strtofr clearer (after remark from Luis Rivera) [mpfr.texi] fixed order -> kind (typo found by Luis Rivera, thanks) 2009-01-16 Philippe Théveny tfprintf.c tprintf.c: Test double with "%f" instead of "%e" so as to avoid failure due to exponent "e+000" on MS Windows. tests/tfprintf.c tests/tsprintf.c tests/tprintf.c acinclude.m4 vasprintf.c: No longer check libc's printf. acinclude.m4: Check if %Ld specification is supported (not always the case with MS Windows) tests/tfprintf.c tests/tprintf.c tests/tsprintf.c: do not check %Ld specification when not available. get_uj.c get_sj.c tests/tset_sj.c tests/tfits.c fits_intmax.c fits_uintmax.c set_uj.c set_sj.c: make #include-s for intmax_t uniform. vasprintf.c: make #include-s for intmax_t uniform and use _MPFR_H_HAVE_INTMAX_T instead of HAVE_INTMAX_T. 2009-01-15 Philippe Théveny tfprintf.c tprintf.c: Remove tests with u_quad_t (on Solaris 10, quad_t exists but u_quad_t doesn't, bug reported by Michael Abshoff). tfprintf.c tprintf.c: Fix included headers, type intmax_t may be defined in inttypes.h or in stdint.h (see autoconf manual 5.6.1 Portability of Headers). 2009-01-15 Vincent Lefèvre ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". vasprintf.c: deleted trailing spaces. configure.in: be more tolerant when checking whether gmp.h version and libgmp version are the same (in case patch level is 0). Copyright notice update: added 2009 with perl -pi -e 's/2008 Free Software/2008, 2009 Free Software/' **/*(^/) under zsh. 2009-01-14 Vincent Lefèvre Fixed remaining printf format strings. tests/tadd1sp.c, tests/tsub1sp.c: fixed function prototypes. tests/teq.c, tests/tests.c: fixed printf format strings. tests/tcmp2.c: fixed printf format strings. 2009-01-13 Vincent Lefèvre tests/tset_str.c: fixed printf format string. 2009-01-12 Vincent Lefèvre mpfr.texi: consistency changes and corrections concerning the "erange" flag (do not use @code{} as this is not an identifier, @emph{} is used as this is not an English word -- but @emph{} should probably be used too for the other flag names). mpfr.texi: typo. 2009-01-12 Philippe Théveny acinclude.m4: New macro MPFR_CHECK_PRINTF_SPEC looking for support of the "%jd", "%qd", and "%td" conversion specifications in printf and gmp_printf. configure.in: Call MPFR_CHECK_PRINTF_SPEC when we can link against a suitable gmp library and run test programs at compile time, otherwise (for instance, when cross compiling), everything is enable by default. vasprintf.c: Disable support for length modifiers not supported by libc's printf ('j' and 'q' for this time). tests/tprintf.c, tests/tfprintf.c: Disable tests for length modifiers not supported by gmp_printf ('j', 'q', and 't' for this time). mpfr.texi: Fix typo. 2009-01-08 Vincent Lefèvre mpfr.texi: update to January 2009. Removed useless #include of gmp.h from tests/tfprintf.c and tests/tsprintf.c for consistency. 2009-01-08 Philippe Théveny tests/tfprintf.c: Make tests with 'M' specifier optional. mpfr.texi: Add a warning that gmp may not support 'M' specifier. vasprintf.c: Add warning comment about 'M' specifier. mpfr.texi: Fix wrong definition of rounding specifiers. 2008-12-30 Vincent Lefèvre out_str.c: added assert (check that base is in the required range). 2008-12-26 Vincent Lefèvre README.dev: suggest "-Wformat=2". zeta.c: fixed types for printf when DEBUG is defined. sub1sp.c: fixed types for printf when WANT_ASSERT >= 2 and when DEBUG is defined. sub1.c: fixed types for printf when DEBUG is defined. set_d64.c: set T[] to unsigned int (instead of int) since its values are printed with %u. add1sp.c: fixed types for printf when DEBUG is defined. mpfr-impl.h: fixed MPFR_UNSIGNED_MINUS_MODULO logic and added missing parentheses. div.c: fixed types for fprintf when DEBUG and/or DEBUG2 is defined. div.c: fixed #ifdef. round_p.c: fixed types for fprintf when WANT_ASSERT >= 2 (since mp_prec_t is unsigned, it's better to use unsigned long). round_p.c: fixed types for fprintf when WANT_ASSERT >= 2. 2008-12-22 Paul Zimmermann [mpfr.tex] improve documentation of %P 2008-12-18 Vincent Lefèvre Deleted trailing spaces. 2008-12-17 Philippe Théveny tests/tsprintf.c: clean-up code, improve comment, and put optional tests in tail so that they fail last. tests/tsprintf.c: Add two regression tests. 2008-12-16 Philippe Théveny acinclude.m4, vasprintf.c, tests/tfprintf.c, tests/tprintf.c, mpfr.texi: quad_t support tests/tfprintf.c: code clean-up and output improvement. tests/tprintf.c: code clean-up. Note that unsigned long long variable is not set to 1 instead of -1 which was architecture dependent. 2008-12-16 Vincent Lefèvre tests/tprintf.c: * stdout_redirect is a boolean (i.e., 0 or 1). * output freopen(..., stdout) error message to stderr. 2008-12-16 Philippe Théveny tfprintf.c: more user-friendly messages. tprintf.c: more user-friendly messages. Warning: because stdout might be redirected, error messages are printed to stderr. 2008-12-15 Vincent Lefèvre mpfr.texi: more explanations on the precision field for mpfr_printf. untabify and remove trailing spaces 2008-12-15 Philippe Théveny mpfr.texi: more explanations on the precision field. mpfr.texi: Clearly mention that the length modifier 'q' is unsupported by mpfr-*printf. vasprintf.c: Do not take quad_t as a long long but as an insupported length modifier. acinclude.m4: Remove check for quad_t. tests/tprintf.c tests/tfprintf.c: Remove tests with 'q' length modifier. 2008-12-15 Vincent Lefèvre tests/tstrtofr.c: fixed a test (in case |res| > 1). tests/tstrtofr.c: fixed alignment bug in error message. 2008-12-15 Paul Zimmermann [nightly-test] added MPFR_CHECK_LIBC_PRINTF 2008-12-15 Philippe Théveny acinclude.m4: Check for quad_t. vasprintf.c: Accept length modifier 'q' if HAVE_QUAD_T is defined (instead of HAVE_LONG_LONG). README.dev: Add notice for new HAVE_QUAD_T macro. 2008-12-15 Paul Zimmermann [mpfr.texi] added warning about usage of mpfr_init 2008-12-15 Vincent Lefèvre tests/tprintf.c: _MPFR_H_HAVE_INTMAX_T -> HAVE_STDINT_H for . 2008-12-15 Philippe Théveny tests/tsprintf.c: Tests against libc's sprintf function are no more executed unless the MPFR_CHECK_LIBC_PRINTF is defined. tests/tsprintf.c: move bugs 20080610 and 20081214 outside the function random_double. 2008-12-15 Vincent Lefèvre tests/tsprintf.c: completed comment about the sign of a null exponent. INSTALL: added a note saying the L modifier was added in C89 (source: C99 rationale, Section 7.19.6.1). 2008-12-15 Paul Zimmermann [INSTALL] more Windows-related changes [INSTALL] update on Windows (from Brian Gladman) [configure.in] removed useless comment 2008-12-14 Vincent Lefèvre INSTALL: references to ISO (international) instead of ANSI (American). tests/tsprintf.c: corrected a comment. 2008-12-14 Paul Zimmermann [printf.c,vasprintf.c] include config.h if HAVE_CONFIG_H is defined, to solve problem noticed by Brian Gladman 2008-12-14 Vincent Lefèvre tests/tsprintf.c: untabified. 2008-12-14 Paul Zimmermann [INSTALL] added hint for using the MinGW runtime [tsprintf.c] added new hard-coded test (needs work to overcome error in system asprintf) [tsprintf.c] fixed hard-coded test (spec was missing), and print values of xi,yi,spec in case of error 2008-12-14 Vincent Lefèvre INSTALL: corrections on r5730. 2008-12-13 Paul Zimmermann [INSTALL] added notes on Windows Vista 64 problem 2008-12-12 Vincent Lefèvre README: added "compile" since it is distributed in the tarball. Added "compile" to svn:ignore property (this file is installed by "automake --add-missing" due to AM_PROG_CC_C_O, added in r5710). vasprintf.c: avoid an abort if field width or precision is > INT_MAX. 2008-12-12 Philippe Théveny tests.c, tset_ld.c, tgeneric.c: Code clean-up based on icc warnings (as in r5492): Use #ifdef BOOL_MACRO instead of #if BOOL_MACRO. configure.in: remove line 'GCC=' in icc tests which seems to confuse libtool. 2008-12-12 Vincent Lefèvre set_ld.c: rewrote exp computation. vasprintf.c: avoid a possible gcc 4.1.2 bug with -ftrapv. vasprintf.c: revert incorrect change in r5713. 2008-12-12 Paul Zimmermann [set_ld.c] fixed problem with CC=g++ on 64-bit computer: $ g++ -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu Thread model: posix gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) [vasprintf.c] patch to MPFR_ASSERTN(...) call to avoid failure with gcc -ftrapv with gcc 4.1.2 (probably compiler error) 2008-12-12 Philippe Théveny Makefile.am, tmul.c: Rename macro __SRCDIR to MPFR_SRCDIR. 2008-12-11 Philippe Théveny configure.in: Add AM_PROG_CC_C_O needed by tmul_CPPFLAGS. tests/Makefile.am: Add tmul.dat in EXTRA_DIST and pass srcdir to tmul.c through tmul_CPPFLAGS. tests/tmul.c: Add path to tmul.dat. 2008-12-09 Vincent Lefèvre INSTALL: TLS on darwin may work, but I don't know anything more. See thread . 2008-12-08 Vincent Lefèvre README: CVS -> Subversion. 2008-12-03 Vincent Lefèvre configure.in: format --enable-decimal-float description on 80 columns. configure.in: for --enable-thread-safe, say that the system must support it (like what has been done for --enable-logging, just above). INSTALL: added details about ---enable-thread-safe and TLS support. 2008-11-28 Vincent Lefèvre urandomb.c: added comments and cleaned up code. mpfr.texi: improved description of mpfr_urandomb. 2008-11-26 Vincent Lefèvre mpfr.texi: changed URL added in r5696 to avoid a redirection. 2008-11-26 Paul Zimmermann [mpfr.texi] added official url on ftp.gnu.org 2008-11-26 Vincent Lefèvre tests/tmul.c: removed useless variable. tests/tmul.c: made reading a string from file more robust. 2008-11-26 Paul Zimmermann [tmul.c] moved long strings to file tmul.dat, so that gcc -ansi -pedantic-errors works (ISO C90 does not support strings of length > 509) 2008-11-26 Vincent Lefèvre tests/tinternals.c: updated tests for guaranteed C90 support, e.g. with gcc -ansi -pedantic-errors (avoid error "string length 'nnn' is greater than the length '509' ISO C90 compilers are required to support" because expression for #expr in ASSERT_FAIL macro is too long). README.dev: in Section "To make a release", suggest -pedantic-errors. 2008-11-22 Vincent Lefèvre r5689 undone: some casts were incorrect (mp_exp_t may be greater than mp_prec_t, so that casting a mp_exp_t into a mp_prec_t can introduce a bug). There may be bugs in some cases, but the casts fix the symptom, not the bug (unless one casts the unsigned type to a signed type that is *strictly* larger, which is not possible here). 2008-11-22 Paul Zimmermann fixed some signed/unsigned warnings with g++ (please review) 2008-11-21 Paul Zimmermann [nightly-test] removed MPFR_CHECK_ALL (no longer used) added possibility to choose compiler (e.g., g++) [README.dev] better check ./configure CC=g++ 2008-11-21 Philippe Théveny Fix inclusion order: the limit of integer types like size_t are defined in C++ only when __STDC_LIMIT_MACROS is defined before is included (from ISO C99 7.18.3). 2008-11-21 Vincent Lefèvre README: added m4 directory (since it is distributed in the tarball). 2008-11-20 Vincent Lefèvre Forgot to update Makefile.am too (for r5680). configure.in: added AC_CONFIG_MACRO_DIR([m4]) for r5680. 2008-11-20 Paul Zimmermann [mpfr-gmp.c] added comment on recent bug fix on MacOS [tests] changes to make compilation work with g++ (only fixed errors, several warnings remain) 2008-11-20 Vincent Lefèvre Added m4/size_max.m4 file (from gettext). README.dev: paragraph on tentative definitions. 2008-11-20 Paul Zimmermann [mpfr-gmp.c] replace tentative definitions by real definitions, solves configure problems with mpc (see https://lists.gforge.inria.fr/pipermail/mpc-discuss/2008-November/000048.html) 2008-11-18 Vincent Lefèvre hypot.c: updated a comment. tests/thypot.c: added a test. hypot.c: simplified an expression; cosmetic changes. 2008-11-17 Philippe Théveny hypot.c: Fix underflow problem when diff_exp<=MPFR_EMAX_MAX-2 using fma (provided that mpfr_fma is immune to it). algorithms.tex: Fix one typo in dilogarithm section. 2008-11-12 Vincent Lefèvre mpfr.texi, NEWS: update concerning mpfr_eq. mpfr.texi: improved mpfr_eq documentation. 2008-11-12 Philippe Théveny tests/tstrtofr.c: Add more information when test bug20081028 fails. 2008-11-07 Philippe Théveny strtofr.c: Replace non-zero digits look up by a simpler test, using the fact that parse_string did remove zeros at end of pstr->mant. tests/tstrtofr.c: Add other test values around 1 for the bug20081028 non regression test. 2008-11-07 Vincent Lefèvre strtofr.c: improved style ("exact" is a boolean). 2008-11-06 Paul Zimmermann [strtofr.c] new patch (ternary value was still wrong in some cases), should be ok now [tstrtofr.c] added new test 2008-11-05 Paul Zimmermann [strtofr.c] review of patch added in revision 5660, and added comments 2008-10-29 Vincent Lefèvre Updated NEWS file. strtofr.c: in r5660, as pstr_size and pstr->prec both have type size_t, changed the type of i from mp_size_t to size_t for consistency. strtofr.c: reverted the change done in r3008, which led to a trivial assertion. I think the goal is to make sure that pstr_size (of type size_t) can be represented in a mp_exp_t (as required in the code). 2008-10-29 Philippe Théveny strtofr.c: fix bug '[#6604] incorrect directed rounding in mpfr_strtofr'. 2008-10-29 Vincent Lefèvre configure.in: replaced $(...) quoting style by "`...`" since the former is not supported everywhere (and indeed is not used by the autotools): https://gmplib.org/list-archives/gmp-bugs/2008-October/001185.html tests/tstrtofr.c: added bug20081028 (bug found by Christoph Lauter in mpfr_set_str; this is the corresponding bug in mpfr_strtofr). tests/tstrtofr.c: corrections related to C usage. tests/tset_str.c: added bug20081028 (bug found by Christoph Lauter). 2008-10-27 Vincent Lefèvre mpfr.texi: updated @dircategory (request by Karl Berry). This is now GNU MPFR! README: CVS -> Subversion. 2008-10-23 Philippe Théveny vasprintf.c: Fix bug with '#' and 'g' flag combination, see also defect report at http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_233.htm. tests/tsprintf.c: Fix wrong test value accordingly, add non-regression tests. 2008-10-23 Paul Zimmermann [get_d64.c,set_d64.c] added reference to TR 24732 2008-10-16 Vincent Lefèvre mpfr.h: added a comment about MPFR_SIGN. 2008-10-05 Paul Zimmermann [mpfr.h] fixed typo, and added warning about MPFR_SIGN. Shouldn't we move it in mpfr-impl.h? 2008-10-03 Vincent Lefèvre INSTALL, configure.in: corrected documentation of --with-gmp* options. 2008-10-02 Vincent Lefèvre INSTALL: gave more details about --with-gmp-build. 2008-10-02 Paul Zimmermann [INSTALL] added warning about usage of --with-gmp-build 2008-09-21 Vincent Lefèvre TODO: updated LIA-2 terminology ("pole" was in the latest public draft, "infinitary" in the final standard). 2008-09-19 Philippe Théveny tests/tstrtofr.c: Remove underflow test unintentionally committed with revision 5640. 2008-09-18 Philippe Théveny Remove obsolete mpfr_random function and replace it by mpfr_urandomb in tests. Add void in prototype. 2008-09-18 Vincent Lefèvre tests/tests.c: added comments about the MPFR_FPU_PREC macro. 2008-09-18 Paul Zimmermann [tget_str.c] replaced 'double' input by 'char*' to avoid problems with single precision (partially solves #3353) 2008-09-17 Paul Zimmermann [README.dev] added item about coverage of releases 2008-09-16 Paul Zimmermann final got rid of generic.c (bug 6199) [generic.c] removed unused file 2008-09-16 Vincent Lefèvre NEWS, mpfr.texi: documented the fact that mpfr_random and mpfr_random2 will be suppressed in the next release. ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". 2008-09-10 Philippe Théveny tests/tpow_z.c: Check test for bug20080904 with the minimum possible negative exponent so as not to underflow with (future) 128 bits machine. 2008-09-06 Vincent Lefèvre pow.c: fixed bug20080904 (from tpow_z.c). pow.c: added log messages. 2008-09-05 Philippe Théveny tests/tpow_z.c: Add a test that underflows. 2008-09-05 Vincent Lefèvre configure.in: updated a comment (for the next automake version). NEWS: added a note about mpfr_init_gmp_rand (removed in r4953). 2008-09-04 Vincent Lefèvre README.dev: update (about AM_MAINTAINER_MODE). 2008-09-02 Vincent Lefèvre Updated README file. 2008-09-01 Vincent Lefèvre Removed patch-libtool and updated README.dev as libtool has been fixed. NEWS file update (get default $CC and $CFLAGS from gmp.h). configure.in: removed a useless blank line. README.dev: reverse-merged r5440 (about __GMP_CC/__GMP_CFLAGS) as said. 2008-08-27 Paul Zimmermann [algorithms.tex] the truncation error for rec_sqrt was correct, but the reasoning was not detailed enough 2008-08-27 Vincent Lefèvre Added patch-aclocal-icc; this is a port of the patch posted on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=485421 for aclocal.m4 when libtool 1.5.26-4 from Debian has been used. 2008-08-27 Paul Zimmermann [rec_sqrt.c] fixed bug "bad_case1" (truncation error was forgotten, when output precision was smaller than input precision) 2008-08-27 Vincent Lefèvre mpfr.texi: updated the month. 2008-08-26 Vincent Lefèvre tests/trec_sqrt.c: enable the tests only with MPFR 2.4.0+. NEWS: noted when some changes were applied in 2.3.* versions. 2008-08-25 Vincent Lefèvre README.dev: completed information about integer types. README.dev: added information about mixing signed and unsigned types. li2.c: avoid even more mixing between signed and unsigned types, by casting mpfr_prec_t to mp_exp_t in expressions involving mp_exp_t. This time the bug is fixed: tli2 no longer freezes in 64 bits. li2.c: use an "int" instead of "unsigned int" in li2_series() to avoid mixing signed and unsigned types, which can yield implicit conversions from signed into unsigned, and maybe problems on some platforms. This doesn't fix the current freeze of tli2 on 64-bit machines, though. 2008-08-24 Vincent Lefèvre tests/tgeneric.c: changed the way a warning with gcc 4.2+ is avoided (r5335), as suggested by Manuel López-Ibáñez on GCC bug 36299. 2008-08-21 Vincent Lefèvre Added data_check support to mpfr_sqr. Added bad_cases support to mpfr_sqr and mpfr_sqrt. tests/tsqr.c: corrected function definitions. Added data_check & bad_cases support to mpfr_rec_sqrt. tests/trec_sqrt.c: added bad case that makes mpfr_rec_sqrt fail. mpfr-impl.h: as not all ICC versions define the __ICC macro (only the __INTEL_COMPILER macro can be defined), define the __MPFR_ICC and __MPFR_GNUC macros in another way. tests/tsprintf.c: fixed compilation failure when HAVE_DENORMS isn't defined, such as with icc 10.1 on Itanium. tests/tprintf.c: to allow random values to be reproducible, do not call randlimb several times in a same expression, because the evaluation order is unspecified. tests/tpow_all.c: added test of mpfr_rec_sqrt (only with MPFR 2.4.0+). tests/tpow_all.c: removed useless parentheses. rec_sqrt.c: added logging support. algorithms.tex: replaced "towards" by "toward" for consistency with the MPFR manual and the standards. algorithms.tex: corrected English usage, spelling and typography in the section on mpfr_hypot. 2008-08-20 Vincent Lefèvre tests/thypot.c: added a test for tiny x and y (already done by the generic tests, but not yet in the 2.3 branch in extended exponent range). tests/tgeneric.c: for the special cases tested in precision p1 for n <= 3, set the extended exponent range. tests/thypot.c: improved error messages. tests/thypot.c: perform some tests both in the current exponent range and in the extended exponent range, so that the lost-overflow bug of MPFR 2.3.1 can be triggered on 64-bit machines too. tests/tpow_all.c: * In cmpres(), if z1 and z2 were both zeros, their sign wasn't tested. * Added test of mpfr_sqr and mpfr_sqrt. mpfr.texi: added a paragraph on MPFR internal data. pow_si.c: fixed the underflow/overflow detection for n < 0 by using a method similar to mpfr_pow_z. pow_si.c: added logging support. pow.c: fixed bug in mpfr_pow_general by computing correct bounds on exp(y*ln|x|). ==> tpow no longer fails in bug20080820. Note: this bug could affect only underflow cases and possibly cases near overflow. tests/tpow.c: updated comment for bug20080820(). tests/tpow.c: added testcase for bug mentioned in r5552. pow_z.c: solves the underflow problem in round-to-nearest by using mpfr_pow_general in precision 2 (like in mpfr_pow_pos_z), but this currently fails due to a more general bug from r4940 (the rounding modes to compute an upper bound on exp(y*ln|x|) are incorrect). pow_z.c: formatting. pow_z.c: moved a log message. pow_z.c: added log messages. tests/tpow_all.c: added an underflow test of x^y with y integer < 0. pow_z.c: no longer take care of the possibly lost overflow flag, as the other functions do not do this either; this general problem has been fixed in mpfr_check_range (r5545). Fixed the following problem: The overflow flag can be lost in many functions called with the maximum exponent equal to MPFR_EMAX_MAX (this is the default on 32-bit machines) when the temporary result (in a higher precision) is representable but once rounded, it yields an overflow. This needed a slight change of behavior of the mpfr_check_range function (defined in exceptions.c). Described this change in mpfr.texi and NEWS. pow_z.c: fixed some of the underflow/overflow problems for z < 0. tests/tpow_all.c: fixed mpfr_clear in overflow_inv. tests/tpow_all.c: more detailed error messages. tests/tpow_all.c: improved overflow_inv tests to trigger a bug in mpfr_pow_z due to incorrect rounding mode settings in r5315: on a 64-bit Linux machine, "./tpow_all 1" ends with: Bad overflow flag in overflow_inv for mpfr_pow, extended exponent range, s = 1, t = 1, GMP_RNDZ tests/tpow_all.c: in overflow_inv, reduced t to [0,5] and added tests. 2008-08-19 Vincent Lefèvre tests/tpow_all.c: improved error messages. tests/tpow_all.c: changed the precisions in overflow_inv for clearer output (the reported failures are the same). tests/tpow_all.c: information about extended exponent range wasn't always output. For simplicity to provide such an information, made ext a global variable. tests/tpow_all.c: added overflow tests for x^(-1). -> Failure. Fixed basic underflow checking in mpfr_pow. 2008-08-18 Vincent Lefèvre mpfr-impl.h: defined macro INITIALIZED to declare that some variable is initialized before being used. README.dev: described the use of this macro. lngamma.c: replaced the dummy initialization by this macro. 2008-08-16 Vincent Lefèvre pow.c: updated comments. tests/tpow_all.c: added tests -> assertion failed in pow.c line 603. 2008-08-15 Vincent Lefèvre tests/tpow_all.c: added test of mpfr_ui_div. pow_z.c: improved comments. 2008-08-14 Vincent Lefèvre mpfr.texi: additions related to MPFR caches. * Added Section "Memory Handling" mentioning caches. * Added call to mpfr_free_cache in the first example. * Updated description of function mpfr_free_cache. tests/texp.c: improved an underflow test to trigger the bug fixed in r5453 on 32-bit machines too. log.c: fixed a log message. exp_2.c: fixed other log messages. exp_2.c: fixed a log message (the format didn't correspond to the types) and improved it. 2008-08-12 Vincent Lefèvre tests/tdiv.c: completed underflow test by testing negative results too. mul_2si.c, div_2si.c, div_2ui.c: fixed double-rounding problem in rounding to nearest when the rounded result in unbounded exponent range is 2^(emin - 2). tests/tmul_2exp.c: test x = 15/16 too. Now tmul_2exp no longer fails (with the correction in div.c from r5515). tests/tdiv.c correction: the underflow bug was in case when the result had to be zero. div.c: fixed underflow bug that occurs in rounding to nearest when the rounded result in unbounded exponent range is 2^(emin - 2) and inex > 0: one got a non-zero result instead of +/-0. tests/tdiv.c: added a test that triggers a bug in mpfr_div in case of underflow in rounding to nearest when the result must be non-zero. div.c: added logging support. tests/tmul_2exp.c: test mpfr_div_2ui too. tests/tmul_2exp.c: test mpfr_div_2si too. tests/tmul_2exp.c: updated underflow() test to trigger a double-rounding bug in case of underflow. tests/texp.c: updated comment (the double-rounding bug triggered by underflow_up() is in mpfr_mul_2si). tests/texp.c: updated underflow_up() test: added case exp(eps) ~= 1/2, which fails due to a double-rounding problem in rescaling the result. tests/texp.c: improved comments in underflow_up(). 2008-08-11 Vincent Lefèvre Merged vlefevre branch: svn merge -c-5445 . svn merge -r5436:HEAD .../mpfr/branches/vlefevre * pow.c: - Moved the general case from mpfr_pow() to a new internal function mpfr_pow_general(). - In this function (from old code), avoid unnecessary overflow test if the intermediate result is not an infinity (which was the case of underflow with non-zero result, thus not an overflow). - Fixed a double-rounding problem that occurred in this function in some underflow cases when rescaling the result. - Added log messages. * mpfr-impl.h: added mpfr_pow_general prototype. * pow_z.c: - The underflow case of mpfr_pow_pos_z() in rounding to nearest, which was incorrect, is now handled by calling mpfr_pow_general(), which can scale the result thus decide whether the rounded result should be 0 or nextabove(0). To avoid the exact cases of x^y with y integer (not supported by mpfr_pow_general()), rounding is done in precision 2 (this is also faster!). - Fixed underflow-related bug (case exact result = 2^(emin-2), in rounding to nearest). - Added log messages. * pow_ui.c: - Swapped parameters x and y for consistency (-> y = x^n). - Fixed the internal overflows and underflows (which could yield spurious overflows/underflows and incorrect results) by using mpfr_pow_z. * tests/tpow_all.c: - Test flags in test_others and cmpres; cmpres argument z1 can now be a null pointer (if unknown pure FP value, thus not tested). - Added a test of 2^(emin - i/4) with 0 <= i <= 12, that triggered the bugs mentioned above (and now fixed). [Added during the Subversion to Git conversion] A merge commit could not be generated for Git. Branch in Git: refs/deleted/r5506/heads/vlefevre 2008-08-11 Vincent Lefèvre tests/tmul_2exp.c: added underflow tests. Added logging support to mpfr_{mul,div}_2{si,ui}. 2008-08-08 Vincent Lefèvre mpfr-impl.h: added a space for MPFR_LOG_MSG. README.dev: corrected MPFR_LOG_MSG example. mpfr.h: added a comment concerning ICC. 2008-08-07 Vincent Lefèvre Final code clean-up based on icc warnings. Further code clean-up (and consistency) based on icc warnings: * Removed useless code. * Avoid hiding variable declarations. * Use #ifdef BOOL_MACRO instead of #if BOOL_MACRO. * In MPFR_RNDRAW_GEN macro definition, variables declared locally now start with an underscore to avoid possible conflits with parameters (and modified macro calls that use these variables). round_prec.c: avoid hiding variable declaration (detected by icc). pow_si.c: fixed Ziv's iteration (code from r3305) by using MPFR_ZIV_NEXT (problem detected by icc, because variable "loop" was never used). mul_ui.c: removed variable that was set but never used (detected by icc, but not by gcc, probably because of early optimization). inp_str.c: fixed possible implementation-defined behavior (a value from the unsigned char range -- from getc -- was stored in a char, and if the char type is signed and the value cannot be represented in a char, this is implementation-defined). get_str.c: avoid hiding variable declaration (detected by icc). div.c: avoid hiding variable declaration (detected by icc). mpfr.h, mpfr-impl.h: avoid warnings with icc (at least icc 10.1). README.dev: added a paragraph on the test of "boolean" macros. 2008-08-05 Vincent Lefèvre configure.in: dist-lzma needs automake 1.10.1. 2008-08-04 Vincent Lefèvre configure.in: "make dist" generates lzma-compressed tarball too. 2008-08-02 Paul Zimmermann [exp_2.c] fixed case where cancel is negative, added comments and improved code when initial n is known to be 0 2008-08-01 Vincent Lefèvre exp_2.c: MPFR_EXP -> MPFR_GET_EXP. 2008-08-01 Paul Zimmermann [exp_2.c] fixed bug20080731 2008-07-31 Vincent Lefèvre Added algorithms.out to svn:ignore property. tests/texp.c: added testcase for new bug found in mpfr_exp_2. exp.c, exp_2.c: fixed the overflow/underflow detection. The underflow_up test in texp.c still fails for mpfr_exp_2 only, but this seems to be due to a bug in this function (incorrect error bound?). tests/texp.c: added underflow tests to underflow_up; currently fail due to incorrect underflow detection in mpfr_exp (and if this detection is disabled, mpfr_exp_3 behaves correctly, but not mpfr_exp_2). 2008-07-31 Philippe Théveny Fix typos, improve wording. 2008-07-31 Vincent Lefèvre Added logging support to mpfr_exp_2 (exp_2.c). tests/texp.c: updated comment concerning the bug fixed in r5469. exp.c: updated comment about the exp3.c routine. exp3.c: fixed internal underflow. fma.c, fms.c: added a comment about apparently incorrect scaling. Added logging support to mpfr_sqr and mpfr_sqrt. 2008-07-31 Philippe Théveny hypot.c: Fix comment. BUGS: Add known bug for mpfr_hypot. 2008-07-30 Philippe Théveny algorithms.tex: Prove the correctness of the algorithm used for mpfr_hypot when the difference of inputs' exponents is less then exp_max - 2. hypot.c: Change algorithm according to its description in algorithms.tex tests/thypot.c: Fix tests (some were present but didn't trigger any error). 2008-07-30 Vincent Lefèvre tests/texp.c: completed a comment. tests/texp.c: updated underflow_up test of log(2^(emin - 1)) + eps: * In the old test (- log(2) < eps < 0 in GMP_RNDN), do not test the flags, as this may be incorrect on some platforms (though unlikely). Better tests will be provided later. * Added test for case eps > 0, which triggers a bug in mpfr_exp_3 (underflow flag sometimes set while it shouldn't be set). exp.c: completed a comment, describing how rigorous underflow/overflow detection can be done. exp.c: removed an incorrect comment (corresponds to exp_2.c and already in exp_2.c). 2008-07-29 Vincent Lefèvre exp.c: underflow/overflow detection is still a bit incorrect. TODO: added "test underflow/overflow detection...". exp.c: fixed underflow/overflow detection. exp_2.c: GNU style. mpfr-impl.h: make sure that mpfr_get_exp_t and mpfr_set_exp_t are correctly defined. 2008-07-26 Vincent Lefèvre tests/texp.c: updated comment of underflow_up. exp_2.c: solved the assertion failure by detecting a zero due to a cancellation and increasing the precision via Ziv's loop in such a case. exp_2.c: added another assertion, that is checked independently of the value of MPFR_EXP_2_THRESHOLD (better for debugging). exp_2.c: added an assertion (more explicit than a similar assertion that would fail later) in mpfr_exp2_aux, caught by the underflow_up test in texp.c for prec = 16 on a 64-bit Linux machine. 2008-07-25 Vincent Lefèvre tests/texp.c: added a test that shows incorrect underflow detection in mpfr_exp, with possible assertion failure. tests/tpow_all.c: added test of mpfr_exp2 and mpfr_exp10. TODO: update. TODO: added "option to use a 32-bit exponent type on LP64 machines". 2008-07-23 Vincent Lefèvre acinclude.m4: updated AC_PREREQ line due to the use of AC_PROG_SED. 2008-07-23 Paul Zimmermann added reminder patch from Patrick to get __GMP_CC and __GMP_CFLAGS from gmp.h (future undocumented feature for GMP 4.2.3) -> we need to check those are the names chosen by GMP 4.2.3 when it will be out 2008-07-21 Vincent Lefèvre pow.c: fixed incorrect rounding in the general case when the result is negative and rnd = GMP_RNDD or GMP_RNDU (bug20080721 in tpow.c). tests/tpow.c: completed test bug20080721. pow.c: fixed the non-trivial cases with large integer y. tests/tpow.c: added comment for bug20080721. tests/tpow.c: found another bug in mpfr_pow with large integers. tests/tpow_all.c: added a test that detects a bug in an underflow case. tests/tpow_all.c: made the comparisons between the power functions generic to be able to add other tests. 2008-07-20 Vincent Lefèvre pow_z.c: use MPFR_IS_POS(x) instead of MPFR_SIGN(x) > 0. pow_si.c: corrected a comment. tests/tpow_z.c: fixed NaN^0 test. Fixed a bug in pow_ui.c and pow_z.c: NaN^0 returned NaN instead of 1 (see documentation). Affected functions: mpfr_pow_ui, mpfr_pow_si and mpfr_pow_z (but not mpfr_pow). Added new test file tests/tpow_all.c to test all the MPFR power functions on simple and special values. 2008-07-19 Vincent Lefèvre mpfr.texi: forgot the case x^(±0). pow_z.c: updated comments. tests/tpow_z.c: test bug20080223() didn't check that the result wasn't a NaN. Fixed. tests/tsprintf.c: removed trailing whitespace. 2008-07-11 Vincent Lefèvre BUGS: potential problem with integer division and pre-C99 compilers, noted by Philippe. 2008-07-08 Philippe Théveny Fix typos 2008-06-30 Philippe Théveny Fix typo (gmp macro TMP_ALLOC instead of MPFR_TMP_ALLOC). 2008-06-27 Vincent Lefèvre vasprintf.c: fixed comment from r5408. 2008-06-27 Philippe Théveny acinclude.m4: add a check defining va_copy macro when needed. vasprintf.c: use TMP_ALLOC instead of variable-length array (C99). tests/tfprintf.c tests/tsprintf.c: #define length of array instead of const int so as to avoid variable-length array (C99). tests/tprintf.c: #define length of array instead of const int so as to avoid variable-length array (C99). remove use of function dup (dependency with ). 2008-06-25 Vincent Lefèvre README.dev: updated "To make a release" (mention various compilers). 2008-06-23 Vincent Lefèvre configure.in: added comments about icc. 2008-06-22 Vincent Lefèvre TODO: added "replace the *_THRESHOLD macros by global (TLS) variables that can be changed at run time [...]". 2008-06-16 Vincent Lefèvre INSTALL: updated GMP's URL (the old one no longer worked), using http://www.gnu.org/software/gmp/ as suggested by Karl Berry (see GNU policies). 2008-06-13 Vincent Lefèvre mpfr.texi: changed the license for the inclusion of the manual in Debian (see AUTHORS: converted from ISO-8859-1 to UTF-8 (this is the standard nowadays and this is the encoding declared on InriaGforge). 2008-06-11 Philippe Théveny Fix typo in mpfr_printf documentation. 2008-06-11 Vincent Lefèvre vasprintf.c: removed a misleading and now useless comment. vasprintf.c: improved a comment. tsprintf.c: typo in a comment. 2008-06-11 Philippe Théveny Fix comparison between mpfr string and libc string. 2008-06-10 Paul Zimmermann added test for bug(?) found by Vincent with icc 2008-06-10 Philippe Théveny Change #include to #include when compiled with a C++ compiler. Assume that mpfr_rnd_t and wchar_t arguments in a variadic functions are converted to 'int' by C++ compilers. 2008-06-10 Vincent Lefèvre mpfr-impl.h: generate an error (with a clear error message) with g++ and --enable-logging since compilation fails (--enable-logging is mainly for testing and is already incompatible with threading support anyway). 2008-06-10 Paul Zimmermann the O(l^{1/2}) method to evaluate power series is due to Paterson and Stockmeyer and not Brent/Kung 2008-06-09 Vincent Lefèvre Clean-up and various changes to be able to build MPFR with g++. But the following 3 tests currently fail with g++ 4.3.1: FAIL: tprintf FAIL: tsprintf FAIL: tfprintf This is an "Illegal instruction" error, so probably a bug in g++. [Edit: acinclude.m4 now uses gl_SIZE_MAX, typically from size_max.m4, but which is not installed on all machines; this will be added to the MPFR repository in changesets 5680 and 5683.] vasprintf.c: do not use pointer arithmetic on void *. configure.in: added -Wpointer-arith to gcc options (this warning is useful as pointer arithmetic on void * is a gcc extension and doesn't work with g++). README.dev: mentioned a libtool bug with recent versions of icc. sum.c: * Completed a comment about T ** and const T ** mismatch. * Removed a useless and misleading const that makes icc complain. 2008-06-08 Paul Zimmermann fixed typos 2008-06-07 Paul Zimmermann use DeclareMathOperator for erf and erfc fixed typo, added argument reduction for atan (we should try it since I believe atan is slow wrt exp, log, sin, cos for large precisions) simplified error analysis of log1p (did not match the code), and improved the code (in particular when 1+x is exact, directly call mpfr_log and avoid Ziv). 2008-06-06 Vincent Lefèvre rec_sqrt.c: removed execution bit. mpfr.texi: update about build problems and the FAQ. mpfr.texi: added a comment about why the cross reference to GNU Libtool doesn't work from MPFR's directory. mpfr.texi: added Section 4.1 "Headers and Libraries" partly based on GMP's. Note: in the generated mpfr.info file, the cross reference to libtool does not work (though GMP's info manual has exactly the same one and it works there). I couldn't figure out why. mpfr.texi: make cross reference in HTML similar to texinfo's default one in PDF. 2008-06-04 Vincent Lefèvre mpfr.texi: updated the month. mpfrlint: check the LGPL license version. mpfr.texi: updated paragraph on the license in "Introduction to MPFR". mpfr.texi: updated GFDL version from 1.1 to 1.2 to match fdl.texi (this should have been done in r4059). mpfrlint: check GFDL versions. mpfr.texi, update-version: in the MPFR manual, replaced two http://www.mpfr.org/ by the URL corresponding to the version, which can be updated by update-version. mpfr.texi: completed paragraph on MPFR vs double-precision numbers. mpfr.texi: replaced each @code{mpfr} by MPFR (for consistency). 2008-06-03 Vincent Lefèvre mpfr.h: fixed a comment. 2008-05-23 Vincent Lefèvre tests: added tprintf to svn:ignore property. Added documentation about "'var' may be used uninitialized in this function" warnings. 2008-05-22 Paul Zimmermann Added comments about int i = i trick to avoid warning about uninitialized variables. This has the advantage to generate no code, but works for gcc only. 2008-05-21 Paul Zimmermann initialize bbcp and bbcp1 to -1 (should be invalid) added MPFR_ASSERTN to check they are not -1 before reads simplified a test: (rnd == RNDN) || (rnd != RNDZ) ==> rnd != RNDZ got rid of false (?) compiler warnings for uninitialized values -> we might want to revert this change if we find a better solution and/or if the problem is fixed in gcc 2008-05-20 Vincent Lefèvre Reverted changeset r5355. Better patch to avoid the warnings "warning: label 'addoneulp_doit' defined but not used" in MPFR_RNDRAW_GEN by adding the dummy code in the macro itself. Avoid warnings "warning: label 'addoneulp_doit' defined but not used" due to the use of MPFR_RNDRAW_GEN. Dummy source code is inserted, but this is safe, clean (optimized away) and IMHO not too obtrusive. 2008-05-08 Vincent Lefèvre acinclude.m4: locally add -I$srcdir to CPPFLAGS for the thread-safe test (fixes bug #5556). 2008-04-10 Vincent Lefèvre INSTALL: added a paragraph about -ffast-math / -fast compiler options. 2008-04-07 Vincent Lefèvre tcmp.c: fixed some tests (if mpfr_cmp2 returns an incorrect result, the bug may be some non-reproducible behavior, so don't compute it a second time to say what the value was!) and clean-up. 2008-04-07 Paul Zimmermann fixed compiler warning 2008-04-06 Paul Zimmermann some other changes suggested by Patrick Pelissier for 16-bit portability a few patches suggested by Patrick Pelissier to ease porting to 16-bit architectures: removed useless #include , changed 1024 to 1024L, int i to lng i 2008-03-17 Paul Zimmermann added item about frac_* functions 2008-03-16 Paul Zimmermann fixed typo 2008-03-11 Philippe Théveny tests/tfprintf.c: set output to stdout when invocked with one command-line parameter. tests/tprintf.c: add IO errors processing. 2008-03-10 Philippe Théveny tests/tprintf.c: add tests for mpfr_printf and mpfr_vprintf. Makefile.am: add tprintf.c to check_PROGRAMS. TODO: remove newly added functions vasprintf.c: change type of some variables taking care of signed/unsigned comparisons, improve conditional tests, improve buffer allocation, improve comments. tests/tfprintf.c: remove silly code. acinclude.m4: add check for long long compiler support, define HAVE_LONG_LONG. vasprintf.c: raise an error when it encounter an unsupported format in format string. tests/tfprintf.c: HAVE_SDTINT_H -> _MPFR_H_HAVE_INTMAX_T vasprintf.c: fix rounding bit bug with %RNa. tests/tsprintf.c: add tests for %RNa (rounding bit bug, tie case, trailing zeros in fractional part. vasprintf.c: fix bug in macro CONSUME_VA_ARG with a mp_limb_t or mp_limb_t array argument vasprintf.c: clean code storing the number of character in a pointer and fix bug with a mp_limb_t or mp_limb_t array argument tests/tfprintf.c: add tests for %n with all kinds of type, get rid of machine dependent limits of type (use +1/-1 instead) vasprintf.c: fix bug of forgotten decimal point with %#.0Rf tests/tsprintf.c: add test with %#Rf and an integer mpfr_t li2.c: improve error estimation in Ziv loop. algorithm.tex:improve proof of mpfr_li2 algorithm. hypot.c: change shift amount for exponents so as to avoid overflow in Ziv loop. algorithm.tex: improve proof for mpfr_hypot algorithm (unfinished). 2008-03-07 Vincent Lefèvre tgeneric.c: avoid a warning with gcc 4.2+ about a test that is always true (the style of the code is now a bit better too). 2008-02-29 Philippe Théveny add mpfr_hypot fix wrong arguments (set in r5332) add missing functions cosmetic changes 2008-02-28 Philippe Théveny add mixed format tests (with different types and different sizes) vasprintf.c: fix "%%" bug tests/tsprintf.c: add a test setting "%%" bug off cosmetic changes use system number of bits in the significant of a double (instead of 53) 2008-02-27 Philippe Théveny add handle for the case exp(x) overflows but sinh(x) is representable further code simplification code simplification (same as in r5323) code simplification. add_d.c, div_d.c, sub_d.c, d_div.c, d_sub.c: restore flags in case of exception. This fixes the bug revealed by MPFR_SUSPICIOUS_OVERFLOW tests/tadd_d.c, tests/tsub_d.c, tests/tdiv_d.c, tests/tmul_d.c, tests/td_sub.c, tests/td_div.c, test/tmul_d.c: add checks for exception flags and ternary value mul_d.c: restore flags set by mpfr_mul. This fixes the bug revealed by MPFR_SUSPICIOUS_OVERFLOW test/tmul_d.c: add checks for exception flags 2008-02-27 Vincent Lefèvre README.dev: updated the section about new functions (added a paragraph on exception handling). 2008-02-26 Philippe Théveny improve proof for euclidean distance algorithm (unfinished) 2008-02-26 Vincent Lefèvre pow_z.c: rewrote an ambiguous comment. pow_z.c: removed obsolete comments and updated a comment. pow_z.c: the same variable was used with two different meanings. Changed the type and the name of the one inside the Ziv loop (unsigned is theoretically more correct due to the bitwise OR). 2008-02-24 Paul Zimmermann fixed bug reported by Carl Witty (on 32-bit computers): sage: RR(1.99999999)^RR(-(2^30)) 5.11264311088393e-323228495 sage: RR(1.999999999)^RR(-(2^30)) 0.000000000000000 sage: RR(2.0)^RR(-(2^30)) 2.38256490488795e-323228497 2008-02-23 Paul Zimmermann added bug reported by Carl Witty 2008-02-22 Philippe Théveny remove commented code add worst cases for RNDZ and RNDU with inexact flag checking 2008-02-22 Vincent Lefèvre hypot.c: added a FIXME comment. algorithms.tex: one can have a better upper bound on \sqrt{x^2+y^2}-|x| (added as a comment in case this can be useful). algorithms.tex: use hyperref. 2008-02-21 Philippe Théveny add more details in mpfr_hypot description cosmetic change: display "EXP" in small capitals no more use of {\rm \EXP}, use macro \Exp everywhere 2008-02-20 Philippe Théveny add worst case test add test with locale da_DK actually trigger overflow on all architectures 2008-02-20 Paul Zimmermann added MPFR_SUSPICIOUS_OVERFLOW in nightly tests 2008-02-20 Vincent Lefèvre hypot.c: fixed overflow flag problem in RNDD/RNDZ modes (testcase was added in r5301, and another check in r5300). tests/thypot.c: added check_overflow test (currently fails in 32 bits). tests/tgeneric.c: added a test that detects suspicious overflows and fails when the overflow flag is not set. This test is enabled only if the MPFR_SUSPICIOUS_OVERFLOW environment variable is set, and shows a bug in mpfr_hypot on 32-bit machines (i.e. when the current exponent range is the maximum exponent range, so that mpfr_check_range() has no effect). 2008-02-19 Philippe Théveny restore flag overflow dropped by MPFR_SAVE_EXPO 2008-02-18 Philippe Théveny use of (*__gmp_allocate_func)/(*__gmp_free_func) instead of mpfr_allocate_func/mpfr_free_func; the modification in r5281 doesn't work when mpfr is compiled with --gmp_build option. 2008-02-18 Vincent Lefèvre hypot.c: it's better to scale by (Ex + Ey) / 2. README.dev: now, the ChangeLog file should be in UTF-8, like in other software (not much difference in practice). 2008-02-18 Philippe Théveny improve code coverage code simplification take trailing zeros into account when separating thousands 2008-02-18 Paul Zimmermann fixed problem when x and y are very small 2008-02-18 Philippe Théveny hypot.c: set flags when returning tests/thypot.c: change custom random tests to tgeneric ones 2008-02-15 Vincent Lefèvre For the terminating null pointer of the functions mpfr_inits, mpfr_inits2, mpfr_clears, always use the type mpfr_ptr (no longer void *). Updated the description of these functions in the manual (mpfr.texi). The reason is that the C standard does not guarantee that (void *) 0 has the same representation as a null pointer to a structure (and even the same size). In most C implementations, the representations are the same, but one never knows (dynamical checking is also always possible)... The change has been done with: perl -pi -e \ 's/(mpfr_(clear|init)s.*)\(void *\*\) *0\)/$1(mpfr_ptr) 0)/' **/*.c under zsh. 2008-02-15 Philippe Théveny fix typo vasprintf.c: fix buffer_sandwich (use for thousands separator) tests/tsprintf.c: add tests with "da_DK" locale add generic tests cosmetic changes fix incorrect function call 2008-02-14 Philippe Théveny fix "%P" case, add test for it. 2008-02-13 Philippe Théveny avoid style 'f' with large numbers 2008-02-13 Vincent Lefèvre tests: updated svn:ignore property. 2008-02-12 Philippe Théveny use of mpfr_allocate_func/mpfr_free_func instead of malloc/free remove unneeded free and mpfr_clear add tests for mpfr_snprintf and mpfr_vsnprintf 2008-02-12 Vincent Lefèvre README.dev: added a note about freeing the memory in the tests. 2008-02-12 Philippe Théveny move tests of mpfr_get_str function from tout_str.c to tget_str.c initialize fmt[] size tfprintf.c: fix comment. tsprintf.c: fix comment and get rid of libc rand(). rename tprintf.c as tsprintf.c, because it does not deal with mpfr_printf. add tests for mpfr_fprintf functions remove errno setting in snprintf, it is already done in vasprintf correct grammatical faults in comment 2008-02-08 Vincent Lefèvre tests/tests.c: undo r5270. tests/tests.c: fixed assertion failure introduced in r5265. 2008-02-08 Philippe Théveny remove exponent checking mpfr-gmp.h: Cancel r5261 changes removing the overload due to added test. set_uj.c: Don't call memset when len is zero. improve assertion. add support of thousands separator option (' flag, defined in Single UNIX Specification v2) better string buffer management 2008-02-07 Vincent Lefèvre In tests_default_random, allow emin and emax to be outside of the current exponent range, so that underflow/overflow checks can be done on 64-bit machines. If the resulting random number is outside of the current range, the exponent range is extended, and restored by the caller once the test has been done. In tests/tacosh.c, changed TEST_RANDOM_EMIN and TEST_RANDOM_EMAX to MPFR_EMAX_MAX for test_generic_huge, so that the intermediate overflow case in mpfr_acosh is tested on 64-bit machines. 2008-02-07 Philippe Théveny fix comment. In fact, GNU libc4 accept '%F', libc5, glibc 2.0, and glibc 2.1 don't, and glibc 2.2 accept it with C99 semantics. 2008-02-06 Vincent Lefèvre mpfr.h: added a comment about the mpfr_rnd_t enum. mpfr-impl.h: removed MPFR_CHECK* macros as they are not used. 2008-02-05 Philippe Théveny MPN_ZERO (dst, n) doesn't call memset when n==0, it prevents warning when compiled with gcc -D_FORTIFY_SOURCE 2008-02-04 Paul Zimmermann added suggestion from Keith Briggs 2008-02-04 Philippe Théveny vasprintf.c: add code for %n specifier with any type tests/tprintf.c: add test for %n specifier improve mention on format string restriction mention restriction on type field in the format string. check possible overflows in exponent part, improve comments. ensure null-terminated string for (v)snprintf. 2008-02-01 Philippe Théveny improve mpfr_printf documentation 2008-02-01 Vincent Lefèvre tests.c: fixed perror argument in data_check. 2008-02-01 Philippe Théveny improve error handling check fscanf return value, manage error case 2008-02-01 Paul Zimmermann added parentheses to avoid ambiguity (suggested by Keith Briggs) 2008-02-01 Philippe Théveny add some "%s" format string to prevent format string attack 2008-01-31 Philippe Théveny fix typo 2008-01-30 Philippe Théveny homogeneous use of logical variable 2008-01-30 Vincent Lefèvre rec_sqrt.c: use MPFR_GET_EXP instead of MPFR_EXP, and avoid the bitwise AND on a signed integer. Reformat. Document how to produce PDF and HTML versions of the manual. 2008-01-30 Philippe Théveny change to values acceptable by 32-bits machines fix wrong statement in MPFR_ASSERTD 2008-01-30 Paul Zimmermann added compilation options suggested by Debian: http://alioth.debian.org/projects/hardening/ https://lists.debian.org/debian-devel/2007/12/msg00090.html (except -Wl,zrelro which does not seem to work) 2008-01-29 Philippe Théveny So as to avoid conversion error, get rid of mpfr_set_d/mpf_set_d except in random_double(). Skip conversion error in random_double(). fix typo in comment get rid of limitation on number of character by specifier vasprintf.c: fix %Rg case tests/tprintf.c: add %Re, %Rf, and %Rg tests tests/tprintf.c: add random checking against libc 2008-01-28 Philippe Théveny remove (undocumented) integer conversion support for mpfr_t set errno to EOVERFLOW when printf-like functions should return value exceeding INT_MAX change internal name of printf-like functions under preprocessor conditionals, add explanation in comment. 2008-01-25 Vincent Lefèvre TODO: added a possible class of tests. 2008-01-23 Vincent Lefèvre tests.c: remove a blank line in an error message. Test that the MPFR library version matches the mpfr.h version in any test file (this should avoid some bug reports that don't mention the real problem). tversion.c: improved an error message. acinclude.m4: fixed configure test for TLS support. NEWS file update (configure test for TLS support). Changes related to thread-local variables / TLS support. * Moved the MPFR_THREAD_ATTR definition from mpfr-impl.h into a new header file mpfr-thread.h, and updated Makefile.am accordingly. * Removed the compiler check __MPFR_GNUC(3,3) || __MPFR_ICC(8,1,0) as this test leaded to both false positives and false negatives concerning TLS support. Assume that __thread should be used for thread-local variables (except for the MS compiler). * Added a configure test to acinclude.m4 (in MPFR_CONFIGS). 2008-01-22 Paul Zimmermann added item about timings for a new release mbench program written by Patrick Pelissier to measure clock cycles of MPFR (and other libraries) for small precision 2008-01-22 Vincent Lefèvre NEWS: noted the changes concerning mpfr_strtofr (changesets 5146, 5147, 5148, 5149, 5167, 5172, 5173). mpfr-gmp.h: small fix of a macro. 2008-01-21 Vincent Lefèvre mpfr-gmp.h: for temporary allocations, use alloca() if size < 16384. 2008-01-19 Vincent Lefèvre mpfr.texi: inverse square root -> reciprocal square root. 2008-01-18 Paul Zimmermann added mpfr_rec_sqrt in mpfr.texi (forgot in last commit) 2008-01-18 Vincent Lefèvre NEWS: added mpfr_rec_sqrt for MPFR 2.4.*. 2008-01-18 Paul Zimmermann removed rec_sqrt (done) 2008-01-17 Philippe Théveny vasprintf.c: merge code for "%Ra" and "%Rb" 2008-01-16 Philippe Théveny cosmetic change: replace "enum _arg_type" by "enum arg_t" vasprintf.c: fix %g case; merge %e, %f, %g code tests/tprintf.c: add tests for %Rg add MPFR_SAVE_EXPO macros cosmetic changes: only one leading underscore for an identifier with file scope add needed va_list argument in READ_INT macro 2008-01-16 Vincent Lefèvre tests: added trec_sqrt to svn:ignore property. mpfr-impl.h: when building MPFR with the GMP build directory, use TMP_ALLOC(s) instead of TMP_SALLOC(s), as we don't know whether allocations are small or big (see gmp-impl.h). 2008-01-16 Paul Zimmermann moved from ASSERTD to ASSERTN an assertion which does not depend on MPFR 2008-01-15 Paul Zimmermann this file might be useful to test mpfr_rec_sqrt... rec_sqrt.c: complete rewrite, to allow to use directly the MPFR internal representation as input (without shift), and to allow different input and output precisions, without loss of efficiency other files: added new function mpfr_rec_sqrt 2008-01-14 Vincent Lefèvre rec_sqrt.c: deleted trailing whitespace. mpfr-gmp.{c,h}: no longer use alloca() for the temporary allocations as this can make MPFR crash in some high precisions, due to limited stack. 2008-01-14 Philippe Théveny add bug found by Paul Zimmermann vasprintf.c: fix wrong computation of digit number with %Rf when 0 < op < 1 tests/tprintf.c: simpler 10^-n case 2008-01-14 Vincent Lefèvre mpfr.texi: typo. 2008-01-11 Vincent Lefèvre mpfr.texi: updated month. mpfr.texi: added a warning concerning huge precisions. 2008-01-10 Philippe Théveny fix %f case cosmetic changes 2008-01-08 Paul Zimmermann small changes for acos/asin/atan/atan2 rounded outside their output range 2008-01-07 Paul Zimmermann added note about output of acos/asin/atan/atan2 which might be outside the function domain 2008-01-05 Paul Zimmermann new version with improved tables, use macros from mpfr-impl.h, removed tabs 2008-01-04 Vincent Lefèvre Fixed return value of mpfr_strtofr in case of invalid data (it was -1, but it should be 0 since it is a ternary value and the result is 0, which is exact). Added test of the ternary value in this case. mpfr.texi: better description of mpfr_strtofr. NEWS update (new functions in the trunk). Changes related to mpfr_strtofr. * strtofr.c: for mpfr_strtofr, data corresponding to NaN can now have an optional sign (since the documentation said that parsing followed the standard C strtod function and this change makes invalid data now valid, so that there should be no compatibility problems). * tests/tstrtofr.c: changed the test for -42P17 in base 16 (this was eventually regarded as a documentation bug); added tests. * mpfr.texi: almost completely rewrote the specification of the mpfr_strtofr function. Changes: - the binary exponent is now accepted even without the 0b or 0x prefix; - data corresponding to NaN can now have an optional sign (this was a bit ambiguous); - many other ambiguities avoided. 2008-01-04 Paul Zimmermann the function mpfr_mpn_rec_sqrt() provides a faithful approximation of the inverse square root. Some improvements can still be made, but the interface should not change, thus we can start writing the mpfr_rec_sqrt function that calls it. 2008-01-02 Vincent Lefèvre FAQ update. 2008-01-01 Vincent Lefèvre tgamma.c: completed test in r5159 with another one that was failing in the default exponent range. delete trailing spaces. 2008-01-01 Paul Zimmermann fixed bug in case of underflow (wrong sign) 2008-01-01 Vincent Lefèvre gen_inverse.h: fixed the bug reported by Kevin Rauch a few hours ago (and that was detected by the generic tests and by mpfrlint after the latest changes). mpfrlint: incorrect use of mpfr__p is also checked in .h files. Copyright notice update: added 2008 with perl -pi -e 's/2007 Free Software/2007, 2008 Free Software/' **/*(^/) under zsh. tgeneric.c: in the bug detection with flags set before the function call, the erange flag was set, so that no checks were performed on the return value. Fixed that by not setting the erange flag. -> Now, 7 tests fail! 2007-12-31 Vincent Lefèvre tstrtofr.c: added test of -42P17 with base = 0 and 16. This currently fails with base = 16 (-42P17 is parsed as -0x42P17 instead of -42 with the remaining characters "P17"), but we could alternatively regard the mpfr_strtofr specification (in mpfr.texi) as incorrect. 2007-12-30 Vincent Lefèvre mpfr.texi: corrections in the specification of mpfr_strtofr (see FIXME). strtofr.c: base arguments different from 0 and 2..36 have never been accepted. So, instead of returning the confusing -1 (it's a ternary value), let's add an assert for the moment. An alternative solution is to return 0 and set the erange flag. strtofr.c: minor change (in the style); a comment was ambiguous. 2007-12-29 Vincent Lefèvre TODO update (tests: generic bad cases). Added #if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0) conditionals to be able to test MPFR 2.3.* with the (more complete) tests from the trunk. README.dev: updated item 6 of "To make a release". 2007-12-28 Vincent Lefèvre mpfr.texi: updated month. 2007-12-27 Vincent Lefèvre tests: check the exponent range, in particular at the end of each test. texceptions.c: GNU coding style. texceptions.c: restore the exponent range. exp2.c: removed incorrect comment (the overflow test was OK due to the mpfr_clear_flags above, but the new test is slightly better anyway). 2007-12-21 Paul Zimmermann added tuning parameters for 32-bit Core 2 (thanks to Patrick Pelissier and Emmanuel Thome) 2007-12-20 Vincent Lefèvre tpow.c: enable testcase bug20071218. 2007-12-19 Vincent Lefèvre BUGS: possible incorrect results due to internal underflow. pow.c: detect all underflow cases (some of them were leading to an infinite loop, see bug20071218 in tpow.c). mpfr-impl.h: updated description of MPFR_CAN_ROUND. round_p.c: in comment, "round to zero" -> "round toward zero". tpow.c: formatting. tpow.c: added testcase for another bug found by Kevin P. Rauch. Execute tpow with an argument to enable it. 2007-12-19 Philippe Théveny vasprintf.c: add sprnt_fp_e for "%e" processing tests/tprintf.c: change tests for decimal output (but need further tests) add checks for zero 2007-12-18 Vincent Lefèvre Merged the feature-block branch to the trunk: * New MPFR_BLOCK* macros (see mpfr-impl.h) and mpfrlint check to test exception flags in a more reliable way and detect possible problems with mpfrlint. * Improved the generic tests (tests/tgeneric.c): for the second function call, sometimes set all the flags since risk of failures are known when some flags are already set. * Modified code to use these new MPFR_BLOCK* macros. This fixed bugs related to exceptions (where flags are set before the call); in particular, tcot and ty1 failed with the improved generic tests. [Added during the Subversion to Git conversion] A merge commit could not be generated for Git. Branch in Git: refs/deleted/r5131/heads/feature-block 2007-12-18 Philippe Théveny printf.c: each mpfr_printf-like function return -1 and set erange flag in error case vasprintf.c: change types in struct char_fp vasprintf.c: add many size checking simplify code, improve comments 2007-12-18 Vincent Lefèvre Fixed bug in mpfr_pow_z: if x = y (same mpfr_t argument), the input argument is negative and not a power of two, z is positive and odd, an overflow or underflow occurs, and the temporary result res is positive, then the result gets a wrong sign (positive instead of negative). Testcase. Fixed bug in mpfr_pow_ui (introduced in r3214): if x = y (same mpfr_t argument), the input argument is negative, n is odd, an overflow or underflow occurs, and the temporary result res is positive, then the result gets a wrong sign (positive instead of negative). Testcase. pow_ui.c: fixed an assertion. BUGS: update concerning overflow/underflow exceptions. 2007-12-18 Philippe Théveny exponent continuity with one hexadecimal digit output 2007-12-17 Philippe Théveny #define CASE_INT_MAX_ARG to nil when HAVE_STDINT_H is not defined vasprintf.c: add sprnt_fp_b for "%b" processing tests/tprintf.c: add tests for binary output fix count of characters in exponent part simplify code, remove trailing spaces and improve comment 2007-12-17 Vincent Lefèvre TODO: added note about the successive calls to strcat in vasprintf.c. 2007-12-17 Philippe Théveny add tests for 1 hexa digit output 2007-12-16 Vincent Lefèvre tests/tpow.c: fixed indentation. 2007-12-15 Paul Zimmermann fixed typo fixed bug reported by Kevin Rauch 2007-12-14 Philippe Théveny change display with just one hexadecimal digit 2007-12-14 Paul Zimmermann simplified MPFR_FAST_COMPUTE_IF_SMALL_INPUT part (in case of overlap) 2007-12-14 Philippe Théveny fix wrong call 2007-12-14 Paul Zimmermann added comments, got rid of compiler warnings added warning 2007-12-14 Vincent Lefèvre sin_cos.c: improved changeset 5084; in particular, added a missing cast. 2007-12-14 Paul Zimmermann sin_cos.c, tsin_cos.c: fixed bug occurring when arguments overlap and MPFR_FAST_COMPUTE_IF_SMALL_INPUT fails reuse.c: improved output in case of error 2007-12-14 Philippe Théveny improve one digit case, add comment 2007-12-14 Vincent Lefèvre vasprintf.c: added a FIXME comment. Bug? Minor changes concerning num_to_text. The ending \0 isn't needed. 2007-12-14 Philippe Théveny simplify error output code add num_to_text array for hexadecimal digits output errors to stdout 2007-12-13 Philippe Théveny vasprintf.c: group hexadecimal output processing in a new sprnt_fp_a function. tests/tprintf.c: add tests for %a case tests/tprintf.c: factorize error message output 2007-12-13 Vincent Lefèvre get_d64.c: fixed comment. vasprintf.c: added missing #include (useful if MPFR is built with the GMP build directory, as mpfr-gmp.h isn't used in this case). 2007-12-13 Philippe Théveny Fix typos. Add handle for null size case in mpfr_snprintf Add some comments and assertions. #define's for nan and inf strings short documentation of printf-like functions. 2007-12-12 Vincent Lefèvre README.dev: added information about my tool "eet" to be able to see the warnings more easily. vasprintf.c: updated comment concerning the case nbchar > INT_MAX. 2007-11-30 Paul Zimmermann changed default return value in mpfr_jn_k0 fixed underflow problem in mpfr_exp_3 tests/tset_str.c: added command-line argument for output base jn.c: replaced double-precision LOG2 constant by binary string (more portable) fixed underflow problem experimental code to distinguish Core2 from AMD64 removed manual change to __gmpfr_emin outside the allowed range added suggestion from Patrick Pelissier 2007-11-29 Paul Zimmermann Fixed another bug reported by Kevin Rauch (__gmpfr_emin was set smaller than the minimum allowed value, which produced an exponent wrap-around and a wrong result in mpfr_mul). Not sure if all problems are solved, nevertheless __gmpfr_emin is now in the allowed range. 2007-11-29 Vincent Lefèvre Fixed indentation. tests.c: in test4rm, initialize rndnext with an invalid value (meaning that rndnext will really be initialized later), and added an assert to check that this value isn't propagated to rnd. tests.c: added a comment about rndnext in test4rm. tests.c: added an assertion. 2007-11-29 Paul Zimmermann fixed bug reported by Kevin Rauch (wrong sign in case of underflow for large negative x and large odd negative y) 2007-11-29 Philippe Théveny untabify and remove trailing spaces fix padding error in sprnt_inf factorization of special numbers output in sprnt_nan and sprnt_inf functions fix comment about the size of format string buffer replace memory management functions mpfr_default_* by __gmp_*_func 2007-11-29 Paul Zimmermann updated Core 2 thresholds (obtained with gmp-4.2.2 and Gaudry's patch) 2007-11-29 Vincent Lefèvre Typo in comment. 2007-11-29 Philippe Théveny fix typo pointed out in revision 5044 2007-11-28 Vincent Lefèvre printf.c: more comments about snprintf. printf.c: added a comment concerning a warning (a bug, IMHO). vasprintf.c: added FIXME comment concerning the case nbchar > INT_MAX, with a reference to POSIX. 2007-11-28 Philippe Théveny add explanations about buffer size change __gmp_const into const 2007-11-28 Vincent Lefèvre vasprintf.c: added an assert. 2007-11-28 Philippe Théveny fix output with space flag add MPFR_ASSERTD to prevent buffer overflow replace use of ptrdiff_t by size_t where possible 2007-11-27 Philippe Théveny factorisation of temp string alloc in buffer_pad function cosmetic changes compatibility of types between nbc fields and mp_exp_t fix wrong size of buffer string exp_fmt 2007-11-27 Vincent Lefèvre Added initial mpfrlint sh script to check possible problems in the MPFR source. 2007-11-27 Philippe Théveny change 'g'/'G' to 'e'/'E' or 'f'/'F' according to C99 rules 2007-11-26 Philippe Théveny replace mpfr_default_(re)allocate by __gmp_(re)allocate for the returned string (freed by mpfr_free_str) tprintf.c: replace __gmp_const by const 2007-11-26 Vincent Lefèvre printf.c: added FIXME comment: snprintf is new in C99. It must be checked with a configure test. tests: updated svn:ignore property. vasprintf.c: reformat. MPFR_DECIMAL_POINT now needs to have type char (because of vasprintf.c). tests/tprintf.c: changeset 4996 was incorrect. Fixed. README.dev: Avoid variable names "l", "I" and "O". README.dev: added a note about the locales. 2007-11-26 Philippe Théveny printf.c: fix use of pointer of string vasprintf.c: add conditional compilation directives for wchar and wint_t vasprintf.c: add padding for special values vasprintf.c: fix output for value 1.0 and format "%Rf" vasprintf.c: replace __gmp_const by const 2007-11-26 Vincent Lefèvre acinclude.m4: check wchar.h header (see below). vasprintf.c: * No longer depend on toupper (which returns locale-dependent results) to generate 'A'..'F' (see C standard). * Removed #include which was hiding a bug (see below). * Added missing #include if HAVE_WCHAR_H is defined. But the compilation fails if doesn't exist due to the use of wchar_t and wint_t. vasprintf.c: updated comments. vasprintf.c: * Removed #include now useless. * Added FIXME comment. * Replaced _MP_EXP_FORMAT_SPEC (reserved) by MPFR_EXP_FORMAT_SPEC. vasprintf.c: added FIXME comments. vasprintf.c: fixed a typo in a comment and improved another comment. 2007-11-24 Vincent Lefèvre mpfr.h: moved function declarations out of "#ifdef _MPFR_H_HAVE_VA_LIST" and/or "#ifdef _MPFR_H_HAVE_FILE" when this makes sense. tests/tprintf.c: added missing "void" in function declarations. Untabified and removed trailing spaces. mpfr.texi: corrections (English usage and texinfo). Added corresponding notes at the end of the README.dev file. mpfr.texi: s/rounding to the nearest mode/rounding to nearest mode/ mpfr.texi consistency changes: "towards" -> "toward" (because this is what the IEEE-754 standard uses, and we have mpfr_nexttoward). mpfr.texi: English typography corrections (no space before ":"). vasprintf.c: the use of the abs function was incorrect as its argument has type int, which may be smaller than an mp_exp_t. Fixed that and replaced uceil_log10 by uceil_log10_exp_p2. vasprintf.c: fixed uceil_log10 for x close to ULONG_MAX. 2007-11-23 Paul Zimmermann got rid of math.h 2007-11-23 Vincent Lefèvre tests/tprintf.c: include . stdarg-related corrections, as HAVE_STDARG is not standard thus must not be tested in mpfr.h! tests/tprintf.c: enable the tests only if HAVE_STDARG is defined, i.e. if the printf-like functions are defined. tests/tprintf.c: * Non-standard headers should be included after the standard headers (when possible). * The setlocale function is used only if has been included. * Use tests_start_mpfr / tests_end_mpfr; this shows a bug: tests_free(): attempt to free bad pointer 0x1801200 tests/tests.c: setlocale is used only if has been included. out_str.c: remove other occurrence of . 2007-11-23 Philippe Théveny Makefile.am: add mpfr_printf-like functions mpfr.h: add mpfr_printf-like functions printf.c: printf, sprintf, snprintf, asprintf and 'v' variants vasprintf.c: vasprintf functions used by its likes mpfr.texi: add description for printf family functions tests/Makefile.am: add test for printf tests/tprintf.c: tests for printf-like functions acinclude.m4: define HAVE_LOCALE_H mpfr-impl.h: define MPFR_DECIMAL_POINT even if no locale.h strtofr.c: remove locale.h inclusion (done by mpfr-impl.h ) tests/tests.c: use HAVE_LOCALE_H 2007-11-23 Vincent Lefèvre tests/tisqrt.c: test the 32-bit __gmpfr_cuberoot bound cases (9 per value) exhaustively (running tisqrt is still immediate on a recent machine). tests/tisqrt.c: test the 32-bit __gmpfr_isqrt bound cases exhaustively. acinclude.m4: test the availability of . acinclude.m4: test the availability of . acinclude.m4: updated comment concerning the checked functions. acinclude.m4: added memmove to the checked functions (though this test is currently useless, except for the corresponding information). acinclude.m4: updated a comment concerning the function checking. gmp_op.c: removed old "#include " line (seems to be useless now, and note that is included by default in mpfr-impl.h). tests/tj0.c: fixed test. jn.c: added integer overflow checking. tests/memory.c: fixed copyright notice. 2007-11-21 Vincent Lefèvre tests/tzeta.c: completed test of mpfr_zeta bug fixed in r4920 (the value of zeta(large negative) was also wrong in GMP_RNDU: -Inf instead of the largest negative MPFR number). 2007-11-20 Paul Zimmermann reverted back to rev. 4951 (otherwise we would have to free memory for all exit calls) 2007-11-20 Philippe Théveny use of RANDS instead of __gmp_rands tset_f.c add checking with random values 2007-11-19 Philippe Théveny tli2.c: fix wrong assertion in copyright motice test.c: fixed seed for reproducible errors trandom.c tpow_z.c tset_f.c: integration with GMP_CHECK_RANDOMIZE process 2007-11-17 Paul Zimmermann added missing call to tests_end_mpfr got rid of mpfr_init_gmp_rand/MPFR_TEST_USE_RANDS and not-reentrant gmp random functions (mpn_random*, mpz_random*, mpf_random*). Now all tests use either RANDS (which is cleared by tests_rand_end called by tests_end_mpfr), or the gmp_randstate_t mechanism. 2007-11-16 Paul Zimmermann added missing mpfr_clear and tests_end_mpfr (thanks Michael Abshoff) fixed problem reported by valgrind (thanks to Michael Abshoff) 2007-11-06 Paul Zimmermann fixed bug in div_ui for x=0 and u<>0 (sign of result was not set) 2007-11-06 Philippe Théveny algorithms.tex: fix bibtex references for dilogarithm function algorithms.bib: add references for dilogarithm function 2007-11-05 Vincent Lefèvre mpfr-impl.h: removed trailing spaces. 2007-11-05 Paul Zimmermann added new macro MPFR_ALIAS 2007-11-04 Paul Zimmermann removed unused label 2007-11-04 Vincent Lefèvre pow_z.c: fixed bug that occurs when x is a power of 2 and the result overflows (wrong sign); this bug has always been present (from r3215). tpow.c, tpow_z.c: removed a printf that was left by mistake. tpow_z.c: added testcase for the latest mpfr_pow bug (rev 4942), which is in fact a bug in mpfr_pow_z. tpow.c: added testcase for new bug found by Kevin P. Rauch; removed a mpfr_dump that was left by mistake. 2007-11-03 Vincent Lefèvre pow.c: removed FIXME comment. 2007-11-03 Paul Zimmermann fixed case x < 0, y large integer 2007-11-03 Vincent Lefèvre pow.c: added FIXME comment. tpow.c: added testcase for new bug found by Kevin P. Rauch. The problem occurs on x^y with x negative and y an integer whose exponent is > 256 (so that mpfr_pow_z isn't used, and the generic code is used instead and fails because x is negative). 2007-11-02 Vincent Lefèvre Fixed several bugs in mpfr_pow (from rev 3592 and 4932); added testcase. tpow.c: added an overflow test in reduced exponent range (-> assertion failure in the current pow.c code). mpfr-impl.h: added a comment concerning __gmpfr_one, __gmpfr_two and __gmpfr_four. Bug fix: in cmp_abs.c, changed MPFR_GET_EXP into MPFR_EXP to allow exponents outside the current exponent range (needed for mpfr_pow). 2007-10-31 Vincent Lefèvre Untabified and removed trailing spaces. 2007-10-30 Paul Zimmermann pow.c, tpow.c: fixed bugs reported by Kevin Rauch mpfr-impl.h: fixed typo cosmetic changes added missing \Li2 2007-10-28 Paul Zimmermann added more test cases for mpfr_li2 improved MPFR_FAST_COMPUTE_IF_SMALL_INPUT case for x > 0 fixed bug mentioned by Kevin Rauch: mpfr_lgamma was hanging for tiny input (had to implement a complete loop in that case) fixed bug reported by Kevin Rauch: wrong sign for jn(n even, large negative x) removed item on mpfr_sinh_cosh (done) added more info on item on efficiency of mpfr_sin added comment about function/macro in custom interface jn.c: improved choice of initial precision in Taylor series (takes into account cancellation) tests/tjn.c: now "tjn p n z" evaluates j(n,z) to precision p 2007-10-27 Vincent Lefèvre factorial.c: added FIXME comment. gamma.c: attempt to fix wrong fix in 4918 (the maximum exponent can be > 2^30 on 64-bit machines). There may still be problems in huge precisions. 2007-10-27 Paul Zimmermann added note about efficiency of special functions corrected typo fixed bug in zeta(large negative) reported by Kevin Rauch [wrong inexact flag] fixed inefficiency reported by Kevin Rauch when x large negative (erfc -> 2) 2007-10-26 Paul Zimmermann fixed another bug found by Kevin Rauch: gamma(huge integer) failed on 64-bit fixed bug found by Kevin Rauch (emin/emax not restored for x=1,2) added test for reference values reference values for li2 2007-10-26 Philippe Théveny algorithms.tex: description of dilogarithm algorithm li2.c: conformity with description in algorithm.tex 2007-10-23 Vincent Lefèvre mpfr.texi: small change in the description of mpfr_subnormalize. 2007-10-23 Paul Zimmermann added more details in the description of subnormalize 2007-10-23 Vincent Lefèvre subnormal.c: fixed the bugs when old_inex is INT_MIN or INT_MAX. tsubnormal.c: added some tests showing bugs when old_inex is INT_MIN or INT_MAX. subnormal.c: corrected comment. Changeset r4904 introduced an assertion failure, but the assertion emax - emin >= PREC(x) wasn't necessary: the value of emax doesn't matter, except when the exponent is increased due to the rounding. So, we just document that if the result cannot be represented in the current exponent range, the behavior is undefined (updated mpfr.texi accordingly). Removed the assertion from subnormal.c and added a new one to have an abort if such an undefined behavior occurs. 2007-10-22 Paul Zimmermann fixed 2 bugs reported by Kevin Rauch 2007-10-22 Vincent Lefèvre subnormal.c: replaced incorrect comment. tests: updated svn:ignore property. 2007-10-22 Paul Zimmermann added new references 2007-10-20 Paul Zimmermann added asymptotic expansions 2007-10-19 Philippe Théveny li2.c: add Ziv's loop in li2_series tli2.c: add a function for fixed value checking 2007-10-17 Philippe Théveny li2.c: fix a typo and fix use of taylor series tests/tli2.c: use default random function 2007-10-16 Philippe Théveny add dilogarithm function 2007-10-15 Paul Zimmermann added item in Efficiency section added table of contents removed last section (mpf/mpfr integration) 2007-10-15 Vincent Lefèvre Fixed acosh(x) with x slightly larger than 1, using sqrt(2(x-1)) and a complete error analysis. tests/tacosh.c: added another test with x a bit larger than 1 and prec(y) << prec(x). 2007-10-12 Vincent Lefèvre acosh.c: added a comment about the fix I did in r4814. 2007-10-09 Paul Zimmermann added extra reference for slowness of mpfr_root 2007-10-09 Vincent Lefèvre FAQ update (added Question 8). mpfr.texi: another small change in Contributors section. mpfr.texi: small change in Contributors section. mpfr.texi: mention Fiable and AOC actions in the Contributors section. 2007-10-09 Paul Zimmermann added reference to ACM TOMS paper updated other references, and Contributors section fixed typo in sectioning 2007-10-08 Paul Zimmermann removed mpfr_get_d1 from documented functions removed old commented functions renamed "Rounding Mode Related Functions" to "Rounding Related Functions" put mpfr_can_round in "Rounding Related Functions" (now exported) exchanged order of sections "Miscellaneous Functions" and "Rounding Related Functions" added hint for mpfr_can_round to get ternary value changed mpfr_can_round() call into MPFR_CAN_ROUND() call 2007-10-05 Vincent Lefèvre Updated update-version to make patches easier to produce. 2007-10-04 Vincent Lefèvre Fixed a bug (found by Robert Bajema) in mpfr_atan2, which can occur if the underflow flag is set before the call and x > 0; added testcase. 2007-10-03 Vincent Lefèvre mpfr.texi: improved mpfr_set_exp description too. mpfr.texi: improved mpfr_get_exp documentation. mpfr.texi: mantissa -> significand (to use the terminology from IEEE 754 and ISO C99). configure.in: better error message if libgmp is not found. 2007-10-02 Philippe Théveny fix some typos 2007-09-28 Paul Zimmermann added references 2007-09-28 Philippe Théveny merge fmod, remaider and remquo into a single file rem1.c. merge code into a single internal function mpfr_rem1. fix false statement in mpfr.texi: rop and op1 have the same sign for mpfr_fmod but not for mpfr_remainder and mpfr_remquo. 2007-09-26 Vincent Lefèvre tests/tfmod.c: added static. 2007-09-26 Philippe Théveny new fmod function 2007-09-22 Vincent Lefèvre tests: updated svn:ignore property. GNU coding style, reformatting, exit (-1) -> exit (1). 2007-09-21 Philippe Théveny new mpfr_sinh_cosh function 2007-09-19 Vincent Lefèvre BUGS: removed __gmpfr_isqrt bug. isqrt.c: quick fix of __gmpfr_cuberoot (a full proof is needed). tests/tisqrt.c: added much more tests for __gmpfr_cuberoot. tisqrt.c: improved tests. When doing touch tests.c tisqrt.c make tisqrt CFLAGS="-g -O2 -ffloat-store -DMPFR_FPU_PREC=_FPU_SINGLE" ./tisqrt with gcc 4.2.1 on a Linux/x86 machine, on gets: Error in __gmpfr_cuberoot (4251527999): got 1620 instead of 1619 tisqrt.c: added __gmpfr_cuberoot() tests. isqrt.c: corrected the explanation. isqrt.c: fixed __gmpfr_isqrt. 2007-09-18 Vincent Lefèvre tests: updated svn:ignore property. tests: added tisqrt.c (test file for __gmpfr_isqrt internal function). BUGS: added __gmpfr_isqrt bug. isqrt.c: fixed a cast and added a FIXME comment. isqrt.c: GNU coding style. sin.c: extend the exponent range. sqr.c: set the global inexact flag. sqrt.c: avoid the exponent range extension. tsqr.c: added generic tests (shows that the inexact flag isn't set). sqrt.c: extend exponent range (this also fixes the fact that the global inexact flag wasn't set). tsqrt.c: added generic tests (shows that the inexact flag isn't set, which is a bug reported by Guillaume Revy). 2007-09-17 Philippe Théveny modf.c: take care of user exponent range (possible underflow/overflow) 2007-09-16 Vincent Lefèvre tsin_cos.c: fixed the tiny() test. sin_cos.c: fixed the overflow and cancellation problems by using MPFR_FAST_COMPUTE_IF_SMALL_INPUT from the mpfr_sin and mpfr_cos functions (I'll fix the test later). tsin_cos.c: added test on tiny values. 2007-09-16 Paul Zimmermann Put back previous patch, now avoids overflow, and added more explanations. This is still not a definitive solution, but more efficient than 2.3.0 in the case x is small. 2007-09-15 Vincent Lefèvre Efficiency regression wasn't fixed correctly -> commented out the code. 2007-09-15 Paul Zimmermann fixed efficiency regression pointed out by Andreas Enge 2007-09-13 Paul Zimmermann fixed bug in mpfr_sin_cos found by Philippe: z (to save the cosine) was not allowed to be identical to the input x 2007-09-13 Philippe Théveny new function mpfr_modf and add restrictions on mpfr_sin_cos' variables 2007-09-11 Philippe Théveny add some simple test cases in tadd_d.c and friends 2007-09-10 Vincent Lefèvre prepare: output a message saying that this script is obsolete. 2007-09-09 Paul Zimmermann added restrictions to mpfr_add_d and friends 2007-09-08 Paul Zimmermann removed functions mpfr_add_d ... which are done 2007-09-07 Paul Zimmermann added Philippe Theveny 2007-09-07 Philippe Théveny new arithmetic functions with a double argument 2007-09-07 Vincent Lefèvre tacosh.c: added generic tests for the overflow case. acosh.c: reduce the precision for ln(2); smaller error bound. tgeneric.c: undefine some macros at the end. acosh.c: fixed overflow bug. acosh.c: mentioned bug due to overflow in mpfr_mul. tests/tacosh.c: added corresponding testcase (for 32-bit machines). tacosh.c: use tests_default_random(). tests.c: improved tests_default_random(). 2007-09-02 Vincent Lefèvre Makefile.am: fixed get_patches rule. Makefile.am: cd $(srcdir) before executing get_patches.sh (thanks to Daniel Jacobowitz for noticing this); for more information, see the note just before the get_patches.c rule. 2007-08-31 Vincent Lefèvre acosh.c: added MPFR_UNLIKELY. Added generic bad case tests. algorithms.tex: deleted trailing spaces. algorithms.tex: correction in section on mpfr_asinh: acosh -> asinh. Fixed bug in mpfr_acosh for arguments slightly larger than 1; updated algorithms.tex; fixed testcase. tacosh.c: added testcase for bug in mpfr_acosh (assertion failure). tasin.c: increased the number of generic tests. Improved generic tests by limiting the exponent range of the random numbers for some functions. 2007-08-30 Vincent Lefèvre Generic tests: adjust the proportion of negative numbers returned by the random function in order to get fewer NaN cases. tgeneric.c: output a warning when too few normal cases are tested (so that the random function can be improved...). tests.c: function split (for future addition). configure.in: updated copyright notice (for consistency). Bug fix: added missing _MPFR_PROTO in mpfr-test.h. tgeneric.c: updated description line. 2007-08-29 Vincent Lefèvre Updated copyright notice (for an unknown reason, some files were missing from the change done in r4350). 2007-08-28 Vincent Lefèvre atan2.c: as we supposed some property, let's add an assertion (which can be evaluated at compile time). atan2.c: improved comment. atan2.c: completed the underflow case. atan2.c: fixed the underflow case except in GMP_RNDN with 2^(-emin-2) < |y/x| < 2^(-emin-1). tatan.c: added small-value tests in the other rounding modes. atan2.c: implemented the special case where x is positive and y/x is computed exactly (solving the underflow problems in this case). tatan.c: added a similar test, but with an exact division result. tatan.c: fixed test. README.dev: added a paragraph concerning Ziv loops. tatan.c: updated comment. tatan.c: extended the latest testcase to any platform (e.g. 64 bits). tatan.c: added testcase from a bug reported by Christopher Creutzig. 2007-08-27 Vincent Lefèvre Updated svn:ignore properties. FAQ update: * The question numbers are now hardcoded instead of being generated with CSS rules. * Added the list of questions at the top. * CSS styles: a grey bar is displayed on the left of the target answer (if the browser supports the ":target" pseudo-class from CSS3). faq.xsl: added a comment. FAQ update. 2007-08-22 Vincent Lefèvre INSTALL: added another warning concerning the --with-gmp options. For instance, under Linux, "cpp -I/usr/include -v < /dev/null" says: ignoring duplicate directory "/usr/include" as it is a non-system directory that duplicates a system directory and does not modify the include search path as wanted. 2007-08-15 Vincent Lefèvre mpfr.texi: improved description of mpfr_setsign. 2007-08-14 Vincent Lefèvre Added to NEWS: Thread-safe support with Microsoft Visual compiler. mpfr-impl.h: if MPFR_USE_THREAD_SAFE is defined (--enable-thread-safe): * Added support for MSC (thanks to Brian Gladman). * Define MPFR_THREAD_ATTR even after #error to make the error more visible (see comment in the source). 2007-08-13 Vincent Lefèvre tstckintc.c: fixed bus error on Solaris (the address of Buffer was not a multiple of 4). NEWS: new functions mpfr_signbit, mpfr_setsign, mpfr_copysign. Implemented changes suggested in . * Made mpfr_copysign() like the corresponding function in IEEE 754 (was an internal function until now). * Added mpfr_signbit() and mpfr_setsign(). * Documented these three functions. * Updated TODO. 2007-08-11 Vincent Lefèvre Fixed mpfr_inits and mpfr_clears calls in tests/tatan.c. Added check_inits_clears Perl script to check that a cast is performed for the last argument of mpfr_inits, mpfr_inits2 and mpfr_clears. 2007-08-10 Vincent Lefèvre Updated version to 2.4.0-dev. NEWS update. ChangeLog update with "TZ=UTC svn log -v". asinh.c: fixed assertion failure (see test 4 in tasinh.c, added in r4740), that was due to an exception. tasinh.c: fixed test. tasinh.c: added worst case that yields an assertion failure. 2007-08-09 Vincent Lefèvre Added data_check support to cbrt. log.c: fixed assertion failure (see test x_near_one in tlog.c, added in r4736), that was due to an exception. pow.c: added MPFR_SMALL_INPUT_AFTER_SAVE_EXPO for the case where |y * log(x)| is very small (I can't really test because this code currently fails due to a bug in mpfr_log: see test x_near_one added to tlog.c as changeset 4736; this bug is also present in the 2.2 branch). tlog.c: added a test leading to an assertion failure in mpfr_log. tpow.c: added a test where x is close to 1. Added empty file tests/data/exp10 to avoid an error with -dev versions. Added a TODO concerning the description of mpfr_round_near_x. Added empty files in tests/data to avoid errors with -dev versions. mpfr_ui_pow fix: added a MPFR_SAVE_EXPO_UPDATE_FLAGS. Added texp10.c (texp10 currently fails). texp2.c: reformat and added some tests which were missing. 2007-08-08 Vincent Lefèvre Added data_check calls to texpm1, tlog1p and tlog2. tests/tests.c: in data_check(), mode 'Z', do not test GMP_RNDN if the precision for the directed rounding modes is MPFR_PREC_MIN. 2007-08-04 Vincent Lefèvre TODO: more on mpfr_sin (and mpfr_cos). TODO: update concerning sin/cos/tan. 2007-08-03 Vincent Lefèvre tests/tests.c: in data_check(), check the 4 rounding modes if rnd is 'Z' (in order to test the worst cases). Fixed coding style (for ansi2knr in particular). 2007-08-02 Vincent Lefèvre Makefile.am: added a comment about "get_patches.c". No longer set "CLEANFILES = get_patches.c" in Makefile.am so that a "make clean" doesn't remove the get_patches.c file, as rebuilding it needs a Unix shell (and some standard utilities). Anyway the update of this file should be regarded as part of the patch process, then this file is just like any other .c files. Note: "make dist" includes this file in the archives, so that concerning the build, everything is like before as long as no patches are applied. 2007-08-01 Paul Zimmermann added item about sNaN/qNaN 2007-07-31 Vincent Lefèvre copysign.c: reformat, updated comment (but this function is still not documented in mpfr.texi). Updated version back to 2.3.0-dev since the 2.3 branch will be recreated from the trunk (too many changes!). tl2b.c: enable output even when the constants are correct. Added get_patches.c to the svn:ignore property, as this file is generated. Replaced l2b cache by constants, as suggested by Patrick Pelissier, to avoid efficiency problems with the stack interface and heavily threaded applications. * Added tests/tl2b.c to generate / check the constants. * tests/Makefile.am: added tl2b to check_PROGRAMS. * tests directory: added tl2b to the svn:ignore property. * mpfr-impl.h: updated the __gmpfr_l2b declaration. * free_cache.c: disabled free_l2b (since there's no longer a cache). * get_str.c: added the code generated by tl2b; for the bootstrap, one can just write: const __mpfr_struct __gmpfr_l2b[BASE_MAX-1][2] = { { { 0 } } }; Removed the code (in ceil_mul) that computed these constants. 2007-07-30 Vincent Lefèvre mpfr.texi: updated the documentation of the mpfr_get_d function family. Patch tracking: updated README.dev and TODO files. Added support for tracking applied patches with new function mpfr_get_patches(). mpfr.texi: updated the example concerning mpfr_get_version() vs MPFR_VERSION_STRING ("Warning" instead of "Error", make sure that the example fits on 80 columns in the info file). mpfr.texi: updated description of mpfr_get_version(). mpfr.texi: updated description of mpfr_get_version(). 2007-07-28 Paul Zimmermann added files that are not 100% covered by tests 2007-07-27 Vincent Lefèvre coverage: added --disable-shared --enable-static to configure. mpfr-impl.h: added more casts for g++. Reformat. Applied patch from Patrick to be able to build MPFR with g++. 2007-07-26 Paul Zimmermann added default thresholds for Core 2 2007-07-25 Vincent Lefèvre No longer use MPFR_CHECK_ALL in tests. In '-dev' versions, assume that the data files exist and return an error whenever a file cannot be opened. In the other versions, return silently if the file cannot be opened. Moved mpfr-test.h into the tests directory. 2007-07-25 Paul Zimmermann fixed "efficiency bug" (argument reduction was broken) 2007-07-25 Vincent Lefèvre tests.c: in data_check(), made whitespace skipping consistent and check that the result value is immediately followed by a \n. [tests.c] Fixed some types (the result of getc() is not necessarily representable in a char). tests.c: changes in the error messages (BTW, we decided to output everything to stdout for consistency, even though messages for assertion failure are written to stderr) and replaced an abort () by an exit (1). Delete trailing spaces. 2007-07-25 Paul Zimmermann jyn_asympt.c: new common file for asymptotic expansion in jn/yn tests/tests.c: print precisions in case of failure jn.c: now use jyn_asympt.c yn.c: now implement asymptotic expansion (jyn_asympt.c) fixed more wrong entries in Gonnet's test suite 2007-07-24 Paul Zimmermann contribution of first neglected term to error was wrong fixed wrong entry (not enough precision was used in Maple) implemented asymptotic expansion for large argument in j0/j1/jn 2007-07-20 Paul Zimmermann define MPFR_CHECK_ALL for nightly tests Added code to check mpfr against Gonnet's tables when the environment variable MPFR_CHECK_ALL is defined (some table entries were checked by MuPAD) added comment test data files mpfr mpfr_y0 and mpfr_y1, ***not*** checked with MuPAD added auxiliary MuPAD functions improved Ziv's strategy: add half of DIGITS each time test data file for mpfr_tanh, checked by MuPAD test data file for mpfr_tan, checked with MuPAD (except 3 indicated entries) test data file for mpfr_sqrt, checked with MuPAD test data file for mpfr_sinh, checked by MuPAD (except indicated lines) test data file for mpfr_sin, checked by MuPAD (except tiny inputs indicated in file) test data file for x^(11/4), checked with MuPAD finally, I was able to check it with MuPAD test data file for 2^x, checked with MuPAD test data file for Pi*x, checked with MuPAD test data file for mpfr_log, checked with MuPAD test data files for mpfr_j0, mpfr_j1, mpfr_lgamma, mpfr_log10, ***not*** tested with MuPAD (not Dom::Interval interface) test data file for 1/x, i.e., mpfr_ui_div(1,x), checked with MuPAD test data file for mpfr_gamma, ***not*** checked by MuPAD test data file for mpfr_exp, checked with MuPAD test data files for erf and erfc (not checked by MuPAD, since Dom::Interval does not have an interface for those functions in MuPAD 3.2.0) test data file for mpfr_cosh, checked with MuPAD test data file for mpfr_cos, checked by MuPAD test data file for mpfr_atanh, checked with MuPAD test data file for atan, checked with MuPAD test file for mpfr_asinh, checked with MuPAD data file for mpfr_asin, checked with MuPAD using CheckData.mu data file for mpfr_acosh, checked with MuPAD using CheckData.mu improved output MuPAD file to check a data file 2007-07-20 Vincent Lefèvre Renamed mpfr_l2b as __gmpfr_l2b for consistency. 2007-07-19 Paul Zimmermann patch from Brian Gladman to build mpfr.dll added copyright information about Gonnet's package modified data_check() to allow comment lines starting with # new (experimental) mechanism to check data files (see example in tacos.c) new directory for test data added test for inexact flag (bug fixed in r4630) 2007-07-18 Vincent Lefèvre erfc.c, atan2.c: added missing "MPFR_SAVE_EXPO_FREE (expo);" before "return mpfr_underflow (...);". erfc.c: replaced a goto by an else. 2007-07-18 Paul Zimmermann now deal with underflow in y/x (remains to deal with overflow) now can specify output base when argc > 1 MPFR_EQUAL -> mpfr_equal_p fixed problem with erfc() near underflow region atan2.c: quick-and-dirty fix for atan2(y,1) tests/tatan.c: fix tests from Christopher [x and y were interchanged] added test from Ch. Creutzig apply patch suggested in bug #3604 2007-07-17 Paul Zimmermann previous bug fix for tiny negative inputs in mpfr_lgamma was incorrect: result was NaN, but this was not detected by the tests since mpfr_cmp (y, NaN) is always true! 2007-07-17 Vincent Lefèvre Added comments and fixed an indentation bug. 2007-07-17 Paul Zimmermann in reconstruction after computation of cos(x/2^k) for reduced argument, it may be that cos(x) is zero to the working precision. Then restart Ziv's algorithm with a larger precision. 2007-07-16 Paul Zimmermann lngamma.c: fix for small inputs tlgamma.c: added more tests from Kaveh Ghazi sin_cos.c: 2nd arg of 1st mpfr_can_round call was wrong ttan.c: fixed wrong reference value added comment about sinpi, etc. 2007-07-15 Paul Zimmermann added new test, and re-enabled test that was too slow 2007-07-14 Paul Zimmermann removed MPFR_CHECK_TINY, added MPFR_CHECK_MAX 2007-07-10 Vincent Lefèvre terf.c: added testcase for bug reported by Christopher Creutzig. 2007-07-09 Vincent Lefèvre Removed a #include that was probably added by mistake in r2590. and are now included unconditionally in mpfr-impl.h (removed their inclusion from the C files for consistency). 2007-07-04 Paul Zimmermann ternary flag was wrong in case s=1 or -1 and rounding up/nearest updated algorithms.tex with new additive argument reduction for sin/cos/tan 2007-07-03 Vincent Lefèvre lngamma.c: reformat and replaced mpfr_cmp(...) == 0 by mpfr_equal_p. 2007-07-03 Paul Zimmermann changed stdlib to stdio for NULL (see README.dev) fixed bug in tlgamma and added test (need to implement Ziv's strategy in tiny case) added missing include 2007-07-03 Vincent Lefèvre Fixed the bug reported by David Billinghurst to the MPFR mailing-list on 2007-07-03 (memory leaks under some conditions): * moved the free_l2b() function from tests/tests.c to free_cache.c; * mpfr_free_cache() (from free_cache.c) now calls free_l2b(); * as a consequence, no longer call free_l2b() in tests_end_mpfr(); * documented the behavior in mpfr.texi (under mpfr_free_cache). tj0.c: added testcase from Sisyphus (assertion failed). README.dev: explain how to test the library interface compatibility. 2007-07-02 Vincent Lefèvre README.dev: mentions patch-libtool and how to apply it. Added patch-libtool (patch for aclocal.m4 and configure that comes from or gmane.comp.gnu.libtool.bugs:5776). NEWS: mention that the shared library is now enabled by default on 2.3. README.dev: updated item 2 of "To make a release". Reformat. Updated version to 2.4.0-dev. ChangeLog update. NEWS: update. 2007-07-01 Vincent Lefèvre Makefile.am: updated comment concerning -version-info. Added mpfr_fms based on mpfr_fma. tfma.c: added a space. tfma.c: typo. Reformat. fma.c: minor changes for consistency with the future fms. Completed the implementation of mpfr_fma (except in some corner cases where overflows/underflows and huge precisions are involved at the same time). Added underflow tests. Removed item from the BUGS file (the remaining problems more or less correspond to the first item). Untabified. tfma.c: added overflow test to test_underflow. fma.c: implemented the main cases where x * y underflows. tests/tfma.c: fixed overflow tests and added underflow tests. 2007-06-30 Vincent Lefèvre NEWS: update. 2007-06-29 Vincent Lefèvre BUGS: updated item on mpfr_fma. fma.c: completed the cases where x*y/4 needs to be used, except the very particular cases where an underflow occurs, that remain to be done. tfma.c: fixed a printf. fma.c: added an assertion. tfma.c: fixed overflow tests. tfma.c: check NaN in test_overflow2. fma.c: updated a comment. tfma.c: added more overflow tests (needed to distinguish the cases where z/4 underflows or not -- see fma.c). tfma.c: added tests (-> assertion failed because mpfr_fma implementation isn't complete). 2007-06-28 Vincent Lefèvre acos.c: disabled change from r3145 ("Optimize mpfr_acos by choosing a better initial precision.") that was buggy. BUGS: removed mpfr_acos bug. BUGS: updated item on the mpfr_acos bug. BUGS: updated item on the mpfr_acos test (the bug wasn't visible on 32-bit machines due to an integer overflow, but the result should have been correct anyway). acos.c: fixed integer overflows; to avoid undefined behavior, I had to add an assertion that is not always satisfied (the code needs to be rewritten to take tiny arguments into account). BUGS: update (mpfr_cot has just been fixed). cot.c: implemented the case |x| = 2^emin. tests/tcot.c: added tests for this case, in 3 exponent ranges (as this is an overflow limit). Fixed bug in div.c: rnd_mode could be modified (MPFR_INVERT_RND), but the original value was assumed in case of underflow or overflow. tdiv.c: added a test showing another bug in mpfr_div. cot.c: use MPFR_SAVE_EXPO_UPDATE_FLAGS, but the case +/- 2^emin could still be buggy with the current code; added a MPFR_ASSERTN (0) until it is implemented. BUGS: updated item on mpfr_cot. 2007-06-28 Paul Zimmermann fixed several problems with huge arguments in periodic functions mpfr_sin: complete rewrite, using mpfr_remainder for argument reduction mpfr_sin_cos: ditto 2007-06-25 Paul Zimmermann fixed stupid bug (subtraction of unsigned longs) cos.c: implemented argument reduction by 2Pi tcos.c/tgeneric.c: reduce large exponent used when MPFR_CHECK_MAX is defined 2007-06-22 Vincent Lefèvre BUGS: added bugs. coth.c, sech.c: a rounding mode was incorrect. tests/tcoth.c: added underflowed_cothinf test. tests/tsech.c: added overflowed_sech0 test. * gen_inverse.h: ACTION_TINY must be called after MPFR_SAVE_EXPO_MARK (this is necessary for some functions). Moved MPFR_SAVE_EXPO_FREE after the "end:" label. * coth.c, csc.c, csch.c: as a consequence, MPFR_SAVE_EXPO_UPDATE_FLAGS had to be added before "goto end;". * sec.c: a rounding mode was incorrect. * tests/tsec.c: added overflowed_sec0 test. 2007-06-21 Vincent Lefèvre sin_cos.c: fixed a bug for x = 0 in reduced exponent range. tests/tsin_cos.c: added overflowed_sin_cos0 test. BUGS: Some functions do not use MPFR_SAVE_EXPO_* macros, thus do not behave correctly in a reduced exponent range. factorial.c: a rounding mode was incorrect. tests/tfactorial.c: added overflowed_fac0 test. exp2.c: use MPFR_SMALL_INPUT_AFTER_SAVE_EXPO instead of MPFR_FAST_COMPUTE_IF_SMALL_INPUT since 1 (__gmpfr_one) isn't necessarily representable. tests/texp2.c: added overflowed_exp2_0 test. exp.c: fixed problems in reduced exponent range. tests/texp.c: added overflowed_exp0 test. exp.c bug fix: a rounding mode was incorrect. tcos.c: fixed error message in overflowed_cos0 test. tcos.c: removed an obsolete comment from the overflowed_cos0 test. tcos.c: improved overflowed_cos0 test. get_str.c: use MPFR_SAVE_EXPO. tests/tget_str.c: enabled the test with a reduced exponent range. tget_str.c: added a test (disabled by default) with emax = 0. Corrected mpfr_inits, mpfr_inits2 and mpfr_clears calls with NULL argument (-> (void *) 0). tget_str.c: reformatted/corrected a function. Tests: when restoring the exponent range, save emin/emax first instead of using MPFR_EMIN_MIN/MPFR_EMAX_MAX (which have no longer corresponded to the default exponent range since quite a long time). BUGS: update. 2007-06-20 Vincent Lefèvre Untabified and removed trailing spaces. Bug fix: preprocessor # must be in the first column. remquo.c bug fix: preprocessor # must be in the first column. tcos.c: fixed and improved the overflowed_cos0 test. cos.c bug fix: a rounding mode was incorrect. cos.c: use MPFR_SMALL_INPUT_AFTER_SAVE_EXPO instead of MPFR_FAST_COMPUTE_IF_SMALL_INPUT. cos.c: untabified. tcos.c: added tests for x very small and emax = 0 (some of them currently fail). Added a comment concerning the MPFR_SMALL_INPUT_AFTER_SAVE_EXPO macro. Added MPFR_SMALL_INPUT_AFTER_SAVE_EXPO macro; updated expm1.c to use this variant (and moved MPFR_SAVE_EXPO_MARK after the test ex < 0). 2007-06-19 Vincent Lefèvre Documented log(-0). Added a few tests of log functions. 2007-06-18 Vincent Lefèvre mpfr.texi: updated Section "Floating-Point Values on Special Numbers". 2007-06-12 Vincent Lefèvre TODO: allow generic tests to run with a restricted exponent range. expm1.c: fixed bug for x = -max_value due to an intermediate overflow (flags were incorrect); at the same time, potential problems due to a restricted exponent range are also fixed. tgeneric.c: check the function on large arguments (±maximum_value) when the MPFR_CHECK_MAX environment variable is defined. 2007-06-11 Vincent Lefèvre tests/tlgamma.c: re-enabled sign checking. 2007-06-11 Paul Zimmermann fixed problem with mpfr_lgamma for tiny negative input (and fixed use of generic test) 2007-06-05 Vincent Lefèvre [mpfr.texi] Small change in new Section "Floating-Point Values on Special Numbers" (suggested by Paul). 2007-06-05 Paul Zimmermann fixed bug for tiny negative input (and added corresponding test) 2007-06-05 Vincent Lefèvre algorithms.tex: Mulder -> Mulders. 2007-06-04 Paul Zimmermann added test for "Witty's bug" on 64-bit machines 2007-06-04 Vincent Lefèvre div.c: GNU coding style. 2007-06-04 Paul Zimmermann tdiv.c: added missing mpfr_clear's, and spaces before function calls div.c: fixed bug found by Carl Witty, and added more comments 2007-06-04 Vincent Lefèvre tdiv.c: oops... the result should be 1. tdiv.c: added test from Carl Witty's bug report on 2007-06-03. 2007-06-01 Vincent Lefèvre mpfr.texi: updated Section "Floating-Point Values on Special Numbers". mpfr.texi: updated Section "Floating-Point Values on Special Numbers". mpfr.texi: updated month. mpfr.texi: added @: after "resp." (when it was missing). 2007-05-31 Vincent Lefèvre Started a new section "Floating-Point Values on Special Numbers". mpfr.texi: inf -> Inf for consistency. mpfr.texi @deftypefun correction: void * -> {void *} (for the PDF). mpfr.texi: consistency changes in section titles; made titles unique. set_d64.c: replaced an "if" by a "#if" to avoid a gcc warning. get_d64.c: use BITS_PER_MP_LIMB instead of GMP_BITS_PER_LIMB (which does not seem to exist). set_d64.c: use BITS_PER_MP_LIMB instead of mp_bits_per_limb. get_d64.c, set_d64.c: improved code to avoid some warnings. Untabified get_d64.c and set_d64.c. get_d64.c: added missing #include. BUGS: update. mpfr-impl.h: improved error message when thread safe is not supported. 2007-05-30 Vincent Lefèvre INSTALL: say that relative paths in configure options are not supported (autoconf doesn't seem to have support for them). Documented the new behavior of mpfr_sgn (in fact, it was already partly required by the tsgn.c tests!) and added new mpfr_sgn tests. TODO: added an item about the behavior of mpfr_sgn on NaN. tgeneric.c: no longer check the MPFR_CHECK_TINY environment variable as all the bugs related to tiny arguments have been fixed. mpfr.texi: corrections following the remarks by Nathalie Revol. 2007-05-29 Vincent Lefèvre yn.c: untabify. 2007-05-29 Paul Zimmermann fix for small inputs in y1 2007-05-29 Vincent Lefèvre Defined new macros SIGN and SAME_SIGN in mpfr-impl.h to canonicalize the ternary value and to compare such values. Use SAME_SIGN in erf.c and lngamma.c. 2007-05-29 Paul Zimmermann fixed problem of tiny arguments for y0 lngamma.c: fixed problem of tiny inputs in lngamma (still remains lgamma to deal with) erf.c: small correction (inexact flags might have been inexact :-) fixed tiny input problem with csch, j0, j1 added special code for tiny inputs 2007-05-29 Vincent Lefèvre tgeneric_ui.c: no longer check the MPFR_CHECK_TINY environment variable. erf.c: removed workaround to mpfr_div_ui bug, as the bug is now fixed. div_ui.c: * Cleaned up the use of the sh variable (there was a useless sh = 0, so I'm not sure that there isn't a bug...). * Added underflow check. Added check of tiny arguments to tgeneric_ui.c (if MPFR_CHECK_TINY is defined, like in tgeneric.c); mpfr_div_ui currently fails due to the lack of underflow checking. 2007-05-29 Paul Zimmermann README.dev: fixed typo erf.c: implemented special case for tiny x, and partially get rid of double usage implemented 2007-05-28 Vincent Lefèvre MPFR_RET (mpfr_check_range (...)) -> return mpfr_check_range (...) as mpfr_check_range already handles the inexact flag. Reformatting (removed trailing spaces, untabified). 2007-05-28 Paul Zimmermann fixed problem of tiny input fixed problem of tiny input for coth (and new fix again for csc, which takes into account the sign of the input) fixed problem of tiny inputs in mpfr_sec and mpfr_csc, by adding a SPECIAL_TINY macro in gen_inverse.h the test for the tiny input case was too optimistic: fixed and added test. fixed case of tiny input fixed problem for tiny arguments added MPFR_FAST_COMPUTE_IF_SMALL_INPUT call changed 1st-order Taylor term from x to v to avoid confusion with the argument x of the function f(x), and fixed some typos fixed direction of rounding for MPFR_FAST_COMPUTE_IF_SMALL_INPUT (was wrong for x < 0) fixed typo added call to MPFR_FAST_COMPUTE_IF_SMALL_INPUT in exp2 re-enabled MPFR_CHECK_TINY improved documentation of mpfr_set/get_decimal64 functions fixed problem in configure.in (_Decimal64 was tested too early) 2007-05-28 Vincent Lefèvre tests/tests.c: fixed two bugs concerning the timeout (including an old one: we need to call getrlimit to initialize rlim_max). 2007-05-28 Paul Zimmermann new syntax for timeouts fixed typo 2007-05-28 Vincent Lefèvre Added mkinstalldirs to svn:ignore property. Changed --with-tests-timeout into --enable-tests-timeout as documented in the autoconf manual (--with-* are for external packages only). When this is enabled, environment variable MPFR_TESTS_TIMEOUT allows to override the default timeout (use the value 0 to disable timeouts). Updated NEWS file. mpfr.texi: small improvement. Fixed a bug in the mpfr_cmp_ui macro occurring on NaN and the constant 0 by specifying the behavior of mpfr_sgn on NaN. mpfr.texi: typography corrections concerning "i.e.". mpfr.texi: consistency changes. mpfr.texi: more details in Section "Exceptions". tgeneric.c: check the function on tiny arguments (±2^(emin-1)) when the MPFR_CHECK_TINY environment variable is defined. Typo. Avoid integer overflow in MPFR_FAST_COMPUTE_IF_SMALL_INPUT. 2007-05-25 Paul Zimmermann completed implementation of Vincent's algorithm for mpfr_remquo all tests now pass again 2007-05-24 Paul Zimmermann new version of mpfr_remainder, using Vincent's algorithm (still remains to deal with special arguments, and make mpfr_remquo call it) 2007-05-23 Paul Zimmermann added note about fms fixed typo fixed problem for x integer and rounding to nearest workaround for bug when x is very small (check_tiny in tsin) 2007-05-22 Vincent Lefèvre Updated BUGS (again). Updated BUGS and TODO (mpfr_lgamma has been implemented, but see BUGS, and gamma(-integer) with integer >= 1 is defined as NaN). tsin.c: check sin on +/- 2^(emin-1) (test by Christopher Creutzig). tgamma.c: added test of gamma on some integral values (from Christopher Creutzig); this test is enabled only when an argument is provided. fma.c: improved comments and simplified the code. fma.c: implemented exponent range expansion and the main part when the multiplication overflows. The following remains to do: * when the multiplication overflows: some corner cases; * when the multiplication underflows: everything. 2007-05-21 Vincent Lefèvre tlgamma.c: I re-enable the generic tests of mpfr_lgamma now, to make sure that it is fixed before the 2.3.0 release candidate. tfma.c: added an overflow test (currently fails). tfma.c: whitespace change. tfma.c: added tests on special and exact values. 2007-05-17 Paul Zimmermann fixed error analysis in mpfr_lngamma added mpfr_inp_raw/mpfr_out_raw in TODO 2007-05-16 Vincent Lefèvre TODO: fixed mpfr_fms formula to match the one on Itanium and PowerPC. 2007-05-07 Vincent Lefèvre algorithms.tex: improved the description of mpfr_remquo. 2007-05-06 Paul Zimmermann improved description of remainder and remquo 2007-05-06 Vincent Lefèvre My latest change was not completely correct... Updated description of algorithm for mpfr_remainder. 2007-05-06 Paul Zimmermann added description of algorithm for mpfr_remainder 2007-05-04 Vincent Lefèvre remquo.c: suggest to use mpz_powm. remquo.c: added a comment (idea to compute the remainder much more efficiently in the case x much larger than y). 2007-05-04 Paul Zimmermann added assert and ideas for native implementation put back test (disabled for test) fixed problem when rem and x are the same variable 2007-05-04 Vincent Lefèvre tremquo.c: added a test that leads to a segmentation fault. tremquo.c: fixed tests (= -> ==). 2007-05-03 Paul Zimmermann fixed two issues found by Kaveh Ghazi: * remainder was wrong for |x/y| < 1 * remainder had wrong sign when zero more details of error analysis 2007-05-03 Vincent Lefèvre Updated svn:ignore property. Updated svn:ignore property. 2007-05-03 Paul Zimmermann fixed precision for command-line usage 2007-05-03 Vincent Lefèvre mpfr.texi: added mpfr_lgamma. 2007-05-03 Paul Zimmermann added code to use tremquo with command-line arguments (tremquo x y) 2007-05-02 Vincent Lefèvre configure.in: improved comment. configure.in: added a comment on the AC_ARG_ENABLE(decimal-float...) part. The addition of this code was the cause of the test_CFLAGS problem (see r4425 log), but this code is still wrong. 2007-05-02 Paul Zimmermann modified test (2147483648 is not representable as 32-bit long in C90) 2007-05-02 Vincent Lefèvre Removed unused variables. get_str.c: * Removed useless prototype declaration (function no longer defined). * Fixed initializer. configure.in: moved the definition of test_CFLAGS upward (it was always set to "set", either because of things added to configure.in or because of new autoconf). mpfr.h: added mpfr_lgamma prototype. 2007-05-02 Paul Zimmermann argument quo of remquo is now a pointer to long instead of int added new functions in NEWS changed order of arguments: now mpfr_remquo (r, q, x, y, rnd). 2007-05-02 Vincent Lefèvre remquo.c: fixed variable name for MPFR_LOG_FUNC. 2007-05-02 Paul Zimmermann added mpfr_remquo and mpfr_remainder 2007-04-27 Paul Zimmermann fixed error analysis (error was over-estimated) 2007-04-26 Vincent Lefèvre lngamma.c: a bit more details in the error analysis for z0 < 1. lngamma.c: a bit more details in the error analysis for z0 < 1. 2007-04-26 Paul Zimmermann u was used for two different meanings in the error analysis for z0 < 1 2007-04-25 Vincent Lefèvre Updated svn:ignore property. Added preliminary support for mpfr_lngamma and tests. TODO: add support for negative numbers with small exponent. Re-enable the generic tests when this is done. lngamma.c: There was an assertion failed, probably because the error was too large; fixed that by restarting with a larger precision. lngamma.c: fixed -2k-1 <= x <= -2k test. tests/tlngamma.c: added a test showing a bug in lngamma (due to the use of mpfr_get_si even when the number doesn't fit in a long). 2007-04-22 Paul Zimmermann fixed bug for negative even index in mpfr_jn (wrong sign) 2007-04-12 Paul Zimmermann added warning added Bit Twiddling Hacks 2007-04-05 Vincent Lefèvre MPFR manual: added a brief description of mpfr_t (this may be needed to write correct code) and mpfr_ptr (used by mpfr_sum). 2007-04-02 Vincent Lefèvre Changed mpfr_{jn,yn}_si (mpfr_t res, mpfr_t x, long n, ...) into mpfr_{jn,yn} (mpfr_t res, long n, mpfr_t x, ...), as discussed by mail; fixed a typo in mpfr.texi in mpfr_{y0,y1,yn} description. 2007-03-31 Paul Zimmermann added url of GSL manual fixed misunderstanding about definition of Bessel functions removed Bessel functions J_n and Y_n added Bessel functions of second kind (y0, y1, yn_si) now test_generic calls respectively j0 and j1, not zeta! 2007-03-30 Vincent Lefèvre mpfr.texi: INF -> Inf for consistency. mpfr.texi: PI -> Pi for consistency. 2007-03-29 Vincent Lefèvre mpfr.texi: -0 -> @minus{}0. mpfr.texi: fixed bug introduced in rev 4377, which made TeX fail. Added tj0, tj1 and tjn to svn:ignore property of "tests" directory. 2007-03-26 Paul Zimmermann mpfr_jn -> mpfr_jn_si 2007-03-23 Paul Zimmermann now check underflow for large n in mpfr_jn_si added more tests added more tests (large values of n) fixed another stupid bug mpfr_jn -> mpfr_jn_si, with 'int' argument changed to 'long' fixed bug in mpfr_jn_si (forgot to increase working precision) 2007-03-23 Vincent Lefèvre README.dev: added a warning about the meaning of the output "inexact" value in the function logging code. Added log support for mpfr_add and mpfr_sub. 2007-03-23 Laurent Fousse Correction: added missing $b_n$. 2007-03-22 Paul Zimmermann added Bessel functions of first kind: j0, j1, jn 2007-03-19 Vincent Lefèvre MPFR manual: improved description of mpfr_get_str. 2007-03-19 Paul Zimmermann fixed typos in comments 2007-03-18 Paul Zimmermann documented restriction to n in mpfr_get_str 2007-03-13 Vincent Lefèvre Updated INSTALL based on AIX/PowerPC tests and results from Julie Kurpa and information on . 2007-03-03 Vincent Lefèvre README.dev: updated "To make a release" section. 2007-03-02 Vincent Lefèvre Made modified paragraph on mpfr_get_str more correct from a logical point of view. 2007-03-02 Paul Zimmermann modified paragraph on mpfr_get_str (size of allocated string) 2007-02-25 Paul Zimmermann added tentative implementation of fmod 2007-02-20 Paul Zimmermann added suggestion about remquo 2007-02-19 Paul Zimmermann added comment added C99 rationale for remquo fixed error in generic error for the logarithm, and propagated new bound in algorithms.tex and source files 2007-02-18 Paul Zimmermann added new item 2007-02-15 Vincent Lefèvre Added update-patchv script to update some files before a patch is built (script from 2.2 branch). 2007-02-14 Vincent Lefèvre mpfr.texi: updated paragraph on the underflow before/after rounding. 2007-02-14 Paul Zimmermann added reference 2007-02-12 Vincent Lefèvre mpfr.texi: added Exceptions section. mpfr.texi: updated month. Note that the mpfr.info file is now installed in the share subdirectory. 2007-02-10 Vincent Lefèvre tests/tpow.c: removed comment since there are other macros in the file (and this is an old bug: the first one was introduced in rev 2783). 2007-02-10 Paul Zimmermann added missing include 2007-02-09 Vincent Lefèvre Fixed an integer overflow in pow_si.c (detected with -ftrapv) and added a corresponding testcase in tests/tpow.c. pow_si.c: another comment about the overflow detection. pow_si.c: added the proof of overflow checking. mpfr-impl.h: added a comment about the exponent limits for MPFR numbers. 2007-02-08 Vincent Lefèvre Reimplemented mpfr_set_si_2exp and mpfr_set_ui_2exp, and mpfr_set_si and mpfr_set_ui using the 2exp versions with e = 0. This fixes a bug in corner cases (emin >= 4 and some other constraints) in mpfr_set_si and mpfr_set_ui that incorrectly lead to an underflow flag set, and fixes mpfr_set_si_2exp and mpfr_set_ui_2exp in case of overflow or underflow (replacing the r4346 fix). Added corresponding testcases. 2007-02-07 Vincent Lefèvre Added "Contributed by the Arenaire and Cacao projects, INRIA." to the copyright notices and removed a few old things. 2007-02-01 Paul Zimmermann added missing macro (thanks to Izhar Wallach ) 2007-01-20 Vincent Lefèvre Fixed mpfr_set_si_2exp in case of overflow or underflow. 2007-01-19 Vincent Lefèvre pow_si.c: fixed the overflow detection for x power of 2 and n negative. tests/tget_f.c: fixed a test that had an integer overflow (detected with -ftrapv). pow_si.c: Before fixing the bug corresponding to the testcase added in rev 4342, let's fix another one that can be detected with -ftrapv when n = LONG_MIN (since -n is not representable in this case). With wrapping, we always got the correct result because mp_exp_t is currently at most a long *and* because of side effects! tests/tpow.c: added a test which fails (undetected integer overflow). tests/tpow.c: new test was wrong; fixed. tests/tpow.c: corrected tests and added another test. tests/tpow.c: added tests. pow_si.c: added an assertion. 2007-01-18 Vincent Lefèvre TODO: merged both requests for mpfr_sinh_cosh. 2007-01-17 Paul Zimmermann added documentation for mpfr_dim (was missing) added item 2007-01-17 Vincent Lefèvre Replaced some computations using the type double by computations using MPFR, for mpfr_get_str, allowing it to work with an x86 processor set up in single-precision mode. 2007-01-16 Vincent Lefèvre Updated comment concerning LONG_MIN / 1. 2007-01-15 Vincent Lefèvre README.dev: updated "To make a release" section. 2007-01-10 Vincent Lefèvre Removed mpzroot.c and rootrem.c from the repository. Removed log_b2.h (has never been used) from the repository and from libmpfr_la_SOURCES in Makefile.am. FAQ.html: Added details to MPF-related Q&A's. Copyright notice update: added 2007. * tests/tests.c: under Linux/x86, the FPU precision can be set before doing the tests (see MPFR_FPU_PREC), so that MPFR can be tested under various FP environments (2 tests currently fail with _FPU_SINGLE). * README.dev: updated "To make a release" section. * BUGS: mentioned the above bug. 2007-01-08 Vincent Lefèvre mpfr.texi -> January 2007. 2007-01-08 Paul Zimmermann added support from LIP, and different INRIA project-teams 2007-01-03 Vincent Lefèvre Minor change. 2006-12-29 Vincent Lefèvre TODO: macros/functions to get/set the sign of a MPFR number. 2006-12-21 Paul Zimmermann remove new rootrem implementation (unclear copyright status) 2006-12-19 Vincent Lefèvre Replaced mpfr_mul_2exp and mpfr_div_2exp by mpfr_mul_2ui and mpfr_div_2ui respectively (when this makes sense, of course). 2006-12-19 Paul Zimmermann mpfr_div_2exp -> mpfr_div_2ui improved efficiency of zeta_ui(s) for 3^(-s) < 1/2*ulp(1) 2006-12-18 Vincent Lefèvre mpfr.texi: update concerning MPFR_USE_EXTENSION. 2006-12-18 Paul Zimmermann added copyright header added item 2006-12-15 Vincent Lefèvre Implemented MPFR_USE_EXTENSION support. 2006-12-15 Paul Zimmermann improved efficiency for zeta(m) in precision p when m is large but still smaller than p, for example m=1024 and p=2048 gives a speedup of about 23 (thanks to Jim White for reporting the problem) 2006-12-14 Paul Zimmermann added MPFR_ZIV_INIT stuff 2006-12-07 Paul Zimmermann fixed typo 2006-12-05 Vincent Lefèvre TODO: to be added: MPFR_USE_EXTENSION macro. 2006-11-29 Vincent Lefèvre README.dev: update. INSTALL: update of the "Notes on Windows 32" section. 2006-11-27 Paul Zimmermann added comment about last change fixed warning on 64-bit machines 2006-11-26 Vincent Lefèvre tests/tpow.c: added worst cases. tests/troot.c: two more worst cases. 2006-11-25 Vincent Lefèvre tests/troot.c: added a worst case. BUGS: removed obsolete "compiler bugs" section. 2006-11-25 Paul Zimmermann added worst case 2006-11-25 Vincent Lefèvre Partially rewrote the INSTALL file. 2006-11-24 Vincent Lefèvre Makefile.am: fixed libtool's -version-info flag (and comment). configure.in: check for gmp.h a bit earlier. 2006-11-23 Paul Zimmermann added --with-tests-timeout=60 for nightly tests test timeout is now a configure option (e.g. --with-tests-timeout=60) replaced set_d by set_str_binary (more portable) 2006-11-23 Vincent Lefèvre INSTALL: several additions. 2006-11-22 Vincent Lefèvre INSTALL: small update. FAQ update (added a CSS counter). update-faq: added a workaround for the libxslt bug 377440. TODO: update concerning the patches information. 2006-11-22 Paul Zimmermann set GMP_CHECK_RANDOMIZE to get random tests 2006-11-21 Vincent Lefèvre Updated README file. 2006-11-20 Vincent Lefèvre README.dev: mention the version suffix. Updated version to 2.3.0-dev. Added version suffix support (useful for dev and rc versions). Rewrote nightly-test in sh and fixed a security hole. 2006-11-20 Paul Zimmermann added cpu time limit of 60 seconds in tests 2006-11-20 Vincent Lefèvre TODO: update. 2006-11-20 Paul Zimmermann added an argument to give the branch (use trunk or branches/2.2 for example) 2006-11-20 Vincent Lefèvre tests/tgamma.c: restore emin and emax to their default values. 2006-11-20 Paul Zimmermann fixed bug in overflow test fixed bug in mpfr_gamma for exact result added two configure options simplified test :-) 2006-11-20 Vincent Lefèvre configure.in: unset GMP_CFLAGS and GMP_CC in case the user has set such environment variables for another use. tests/texp2.c: fixed a problem with a value that is not necessarily representable (on platforms without long long). BUGS: removed item on mpfr_eint (now fixed). Untabify. 2006-11-19 Paul Zimmermann replaced double by mpfr_t (problem on 64-bit machines) added more tests script for nightly tests fixed bug in pow (isodd -> assertion failed) fixed problem in erfc for large input reduced tests that took too much time 2006-11-19 Vincent Lefèvre mpfr.texi: updated description of mpfr_eint, as the whole input domain is now supported. Untabify. mpfr-impl.h: added a comment about MPFR_WARNING. 2006-11-19 Paul Zimmermann fixed bug in erfc (forgot to compare result of cmp_si) fixed infinite loop in eint (test for use of asympt was not tight enough) added asymptotic expansion for mpfr_eint (don't need MPFR_WARNING any more) 2006-11-18 Vincent Lefèvre Added a mpfr_erfc test that shows a bug and updated BUGS file. 2006-11-17 Vincent Lefèvre configure.in: Added a comment concerning GMP version checking. configure.in: Before testing GMP header and library versions, set LD_RUN_PATH locally if a --with-gmp* option is used, so that the right version of the GMP library is used. There is no need to do something similar for "make check" as libtool does the job. Updated mpfr_erfc documentation (now supported in whole domain). BUGS: removed mpfr_pow_z bug. 2006-11-17 Vincent Lefèvre Merged the new generic tests. [Added during the Subversion to Git conversion] A merge commit could not be generated for Git. Branch in Git: refs/deleted/r4290/heads/new-generic-tests 2006-11-17 Vincent Lefèvre Partially fixed a bug in mpfr_pow_si (overflow/underflow detection for n < 0). tests/tpow_z.c: various corrections. Partially fixed another bug in mpfr_pow_z (overflow/underflow detection for z < 0) and added corresponding testcases. Fixed a bug in mpfr_pow_z concerning the underflow flag and added the corresponding testcase (but the case z < 0 is still buggy concerning the flags). 2006-11-16 Paul Zimmermann implemented asymptotic formula for erfc (fixed both slowness for large arguments, and call to MPFR_WARNING with return value NaN for huge arguments) added new test 2006-11-14 Paul Zimmermann fixed problem for large negative input 2006-11-14 Vincent Lefèvre TODO: slight change in the proposed mpfr_lgamma prototype (arg order). 2006-11-13 Vincent Lefèvre About mpfr_lngamma/mpfr_lgamma: added mpfr_lgamma to TODO and updated mpfr_lngamma description in mpfr.texi. BUGS: update. tests/terf.c: added a test that yields a segfault (execute "terf 1"). 2006-11-10 Paul Zimmermann moved the [gs]et_decimal64 functions after the [gs]et_ld functions 2006-11-10 Vincent Lefèvre mpfr.texi: changed @code{--enable-decimal-float} into @samp{...} for consistency with the other configure options. mpfr.texi: updated the note concerning mpfr_eint and mpfr_erfc. 2006-11-10 Vincent Lefèvre Added warnings support. * configure.in: added --enable-warnings configure option. * mpfr-impl.h: defined MPFR_WARNING(W) macro. * eint.c, erfc.c: use MPFR_WARNING instead of fprintf. * tests/Makefile.am (new-generic-tests branch): run the tests with MPFR_QUIET=1 to avoid output of useless warnings, as some tests (with large arguments) can generate such warnings, which are all expected. [[Split portion of a mixed commit.]] 2006-11-10 Vincent Lefèvre Added tget_set_d64 to svn:ignore property of "tests" directory. TODO: "add a configure test for --enable-logging..." More information for --enable-logging configure option. Fixed test of logging support. Removed --with-irix64 configure option and "case $OS_TYPE" code from configure.in; see https://sympa.inria.fr/sympa/arc/mpfr/2006-11/msg00009.html for the reasons. 2006-11-09 Paul Zimmermann added more checks with native format added detection of decimal format in configure (DPD or BID) 2006-11-09 Vincent Lefèvre strtofr.c: removed a useless cast (ISO C99 standard 6.2.5#3) and updated a comment as isdigit is no longer used. strtofr.c fix: no longer use isdigit, as MPFR requires non-localized digits. 2006-11-09 Paul Zimmermann modified to work on 64-bit machines too 2006-11-09 Vincent Lefèvre get_d64.c: fixed problems related to signed/unsigned values. strtofr.c: fixed a bug that could occur on platforms with signed chars, when the user provides a string with negative characters (e.g. accented characters, in practice). 2006-11-09 Paul Zimmermann complete rewrite of mpfr_set_decimal64 and mpfr_get_decimal64: now use internal string <-> _Decimal64 conversion functions, which perform native conversion from/to BID or DPD 2006-11-08 Paul Zimmermann added mpfr_set_decimal64 and mpfr_get_decimal64 2006-11-08 Vincent Lefèvre mpfr-impl.h: fixed a compile error if _Decimal64 is unknown. 2006-11-08 Paul Zimmermann added new configure option --enable-decimal-float to build mpfr_set_decimal64 and mpfr_get_decimal64 (checks _Decimal64, and _GMP_IEEE_FLOATS is defined) 2006-11-07 Paul Zimmermann added --enable-decimal-float in configure, and corresponding macro WANT_DECIMAL_FLOATS 2006-11-07 Vincent Lefèvre tests/tversion.c: improved error message and added gmp.h/libgmp test. Fixed a small bug in tests/tversion.c (should never occur anyway). 2006-11-06 Vincent Lefèvre logging.c: clean-up. 2006-11-05 Vincent Lefèvre README.dev: updated things to do before a release. 2006-11-05 Paul Zimmermann added new (preliminary) conversions functions to/from decimal64 changed header file: stdlib.h -> stdio.h 2006-11-03 Vincent Lefèvre Fixed a bug related to signed/unsigned types. tgamma.c: avoid useless mpfr_get_d. tpow.c: replaced a mpfr_cmp_d by a mpfr_cmp_str1. lngamma.c: added a comment. tlngamma.c: avoid useless mpfr_get_d. 2006-10-27 Vincent Lefèvre eint.c: better overflow checking; fix: all allocated memory now freed. eint.c: forgot 2 mpfr_clear's. eint.c fix: and changed the #if into if. eint.c fix: replaced BITS_PER_MP_LIMB by sizeof(mp_exp_t) * CHAR_BIT. The current implementation of mpfr_erfc cannot compute the result for large inputs. Return NaN with the erange flag set instead of aborting. Documented this behavior in mpfr.texi. 2006-10-27 Paul Zimmermann improved bound for x with BITS_PER_MP_LIMB=32 added bound for BITS_PER_MP_LIMB=64 2006-10-27 Vincent Lefèvre The current implementation of mpfr_eint cannot compute the result for large inputs. Return NaN with the erange flag set instead of aborting. Documented this behavior in mpfr.texi. tzeta.c patch 4166 should have been committed to the trunk. Fixing... 2006-10-26 Paul Zimmermann added tests for overflows or underflows 2006-10-26 Paul Zimmermann fixed problem for large negative s (return +Inf or -Inf) [[Split portion of a mixed commit.]] 2006-10-26 Paul Zimmermann fixed dummy error in last commit 2006-10-26 Vincent Lefèvre In latest change, replaced exit(1) by abort(). 2006-10-26 Paul Zimmermann added test for eint() added error message when input is too large in eint(), waiting for asymptotic expansion 2006-10-26 Vincent Lefèvre Untabified and added a FIXME. 2006-10-25 Paul Zimmermann fixed overflow/underflow problems in csch and sech fixed problem for huge argument in coth 2006-10-25 Vincent Lefèvre FAQ-related updates: * faq.xsl: Include styles from http://www.mpfr.org/styles/visual.css by using a system entity (but GNOME libxslt bug 345147 is still present in Debian, so don't use /**/ yet). * update-faq: add /**/ after calling xsltproc. * FAQ.html: update from the MPFR web site: various changes, including: + added id attributes on dt elements (FAQ items) to allow anchors; + updated FAQ for undefined references. INSTALL: mention the MPFR FAQ. 2006-10-23 Vincent Lefèvre Added a comment about a warning (this confused a user). 2006-10-11 Vincent Lefèvre TODO: added an item about version information. 2006-10-05 Vincent Lefèvre TODO: updated item. 2006-10-05 Paul Zimmermann added item 2006-10-02 Paul Zimmermann fixed wrong emax in example for mpfr_subnormalize 2006-09-07 Vincent Lefèvre MPFR manual: say that errno may be set to non-zero. 2006-08-31 Vincent Lefèvre tests/tests.c: typo. 2006-08-28 Vincent Lefèvre Fixed texp2 overflow tests on 64-bit machines. tests/reuse.c: avoid a warning; code reformatted (GNU style). 2006-08-23 Vincent Lefèvre BUGS: minor update. 2006-08-21 Vincent Lefèvre BUGS: updated "known bugs" section. Fixed an exponent/flags-related bug in lngamma.c. Updated svn:ignore property. 2006-08-20 Vincent Lefèvre Fixed several problems in pow.c concerning underflows, overflows and flags (including the inexact flag, which could be incorrectly set in case of NaN), and added some testcases. Problems in pow_z.c have not been fixed yet. Partial fix: The inexact flag was not always set in some functions. In particular, it is now set by mpfr_check_range (if t is not zero) since mpfr_check_range usually comes just after MPFR_SAVE_EXPO_FREE (which restores the previous flags). 2006-08-19 Vincent Lefèvre Added an assertion for mpfr_exp2 and a test. 2006-08-16 Vincent Lefèvre Optimized mpfr_expm1 for large (in absolute value) negative values in order to avoid the TMD (the result is very close to -1). Without this patch, mpfr_expm1 could take dozens of MBs and the new generic tests for texpm1 could take several hours instead of less than 1 second. Fixed a bug in expm1 for very small negative arguments (and perhaps some very small positive arguments too); this bug is similar to the one in log1p that was recently found and fixed. It was detected by the new generic tests (not committed yet), therefore no testcases are provided. Note: the mpfr_expm1 function is still buggy (freezes on -0.10E18, prec 2 -> prec 13); this is a different bug. In mpfr_exp2, the overflow flag was not set if mpfr_exp2 overflowed with x < emax. Added testcase. 2006-08-15 Vincent Lefèvre The latest mpfr_exp2 fix contained a bug. Partially rewrote mpfr_exp2 to fix this bug and another one (and added a corresponding testcase: exp2(10000000000.5), which was freezing). Better fix for exp2 exponent range bug. Fixed bug in mpfr_exp2 when the argument is an integer and emin > 1. Added a testcase to texp2. 2006-08-14 Vincent Lefèvre Added tget_ld_2exp to svn:ignore property of "tests" directory (should have been done in rev 4028). Fixed bug in log1p for small negative values of x and added testcase. Code style correction for ansi2knr. 2006-07-25 Vincent Lefèvre INSTALL: more information. INSTALL: added a note about include/library paths. 2006-07-21 Vincent Lefèvre INSTALL: added information about setup after the library installation. 2006-07-20 Vincent Lefèvre Improved linker flag settings on darwin. 2006-07-18 Vincent Lefèvre configure.in: fixed a linking problem on darwin. 2006-07-16 Vincent Lefèvre One needs automake 1.6; autoreconf fails with automake 1.4. Adding the 1.6 automake option will make the error message less obfuscated, but unfortunately, one won't have the necessary automake version automatically called, even if it is installed. 2006-07-05 Paul Zimmermann added item fixed wrong comment (thanks Keith Briggs) new mpn_rootrem is still not in gmp-4.2 2006-06-20 Paul Zimmermann replaced <= by = 2006-06-19 Paul Zimmermann changed <= into = comments from Keith Briggs 2006-06-09 Vincent Lefèvre algorithms.tex: corrected several English mistakes and typography. 2006-06-09 Paul Zimmermann fixed typo replaced error() by \error() 2006-06-09 Vincent Lefèvre algorithms.tex: another fixed notation for roundings. 2006-06-09 Paul Zimmermann added section on Notations fixed notations for roundings 2006-06-09 Vincent Lefèvre algorithms.tex: changed the page style to plain (for page numbers). 2006-06-07 Vincent Lefèvre FAQ update. 2006-05-29 Vincent Lefèvre Define HAVE_ATTRIBUTE_MODE if supported; useful for s390, but incomplete and will fail on platforms with gcc and CHAR_BIT != 8. 2006-05-19 Vincent Lefèvre Add compiler flags (CPPFLAGS, LDFLAGS) in a consistent order. 2006-05-18 Vincent Lefèvre MPFR manual consistency: Custom interface -> Custom Interface. 2006-05-17 Vincent Lefèvre TODO: added a note about the change 4049 in div.c. 2006-04-18 Vincent Lefèvre Removed the #ifndef __hpux from mul.c (after a test on a HP-UX machine, I got no failures, even with the old mpfr-longlong.h). README.dev: added a point on mpfr-longlong.h in "To make a release". Updated mpfr-longlong.h from the GMP 4.2 longlong.h file. mpfr.texi: removed dot from a section title. 2006-04-11 Vincent Lefèvre FAQ update. 2006-04-06 Vincent Lefèvre div.c: removed the bad use of MPFR_LIMB_ZERO. In get_f.c, updated the case precy + sh > precx: this one was correct, but added a comment, assertions and simplified a MPN_ZERO. 2006-04-05 Vincent Lefèvre tget_f.c: test that there is no lost of accuracy when converting a mpfr_t number into a mpf_t number (test with various precisions and exponents). The fix of get_f.c was wrong. This should be now OK for the case precy + sh <= precx. Fixed bug in mpfr_get_f (reported by Yury Lukach) and added test. 2006-03-31 Vincent Lefèvre Updated FDL to version 1.2. Updated FSF address. Fixed FSF address. 2006-03-30 Vincent Lefèvre Another FAQ update (taking GMP 4.2 into account). FAQ update. 2006-03-24 Vincent Lefèvre Removed all code related to mpn_sub_nc (no longer used). div.c: fixed a bug and no longer use mpn_sub_nc. Some clean-up in div.c; do not steal GMP's namespace (could lead to clashes if future GMP versions define the corresponding macros). Build shared libraries by default. 2006-03-23 Vincent Lefèvre random2.c: minor change suggested by Patrick. configure.in: typography consistency. Mention --enable-thread-safe and --enable-shared in the INSTALL file since users may need them and could be confused otherwise (just seen that). Untabified the file. 2006-03-16 Vincent Lefèvre TODO: new exception "division by zero" / "pole". README.dev: added "Do not use C99-only features, such as...". 2006-03-16 Paul Zimmermann replaced 6th empty argument of MPFR_FAST_COMPUTE_IF_SMALL_INPUT by {} 2006-03-14 Vincent Lefèvre In random2.c, replaced NULL by 0 (more general) and removed the now unnecessary #include . 2006-03-14 Paul Zimmermann added missing include file 2006-03-14 Vincent Lefèvre Tests: added new worst case for x^(3/2). 2006-03-02 Paul Zimmermann added reference to INRIA report for Zeta added another reference added reference 2006-02-28 Vincent Lefèvre More details concerning mpfr_eq. 2006-02-28 Paul Zimmermann removed "but does not make much sense" added contribution from Damien new test file for mpfr_get_ld_2exp 2006-02-27 Paul Zimmermann added mpfr_get_ld_2exp (contributed by Damien Stehle) 2006-02-20 Vincent Lefèvre Updated mpfr_random2 user documentation. Fixed bug in mpfr_random2 when size == 0 and added testcase. trandom.c: reformat. trandom.c: use calloc instead of malloc and check return value. mpfr_random2_raw -> static. 2006-02-17 Vincent Lefèvre Added mpfr_remainder to TODO. 2006-02-15 Paul Zimmermann fixed wrong url 2006-02-15 Vincent Lefèvre Fixed various spelling mistakes, typos... in algorithms.tex. In algorithms.tex, \em -> \emph. Typography corrections in algorithms.tex. In algorithms.tex, added a missing blackslash. In algorithms.tex, removed \date (was incorrectly used) and added the web site as a footnote. 2006-02-13 Vincent Lefèvre Code reformatted. C99 comment replaced by traditional comment. 2006-02-13 Guillaume Hanrot * Added comments on all random number generator functions ; * Inlined the mpn_random2 code in mpfr_random2, to avoid the use of the same internal randstate ; added a mpfr_random2_raw (not exported at the time) to allow specification of a randstate ; * Checked normalization of the result of random2 in trandom.c 2006-01-31 Vincent Lefèvre Changed a part of the documentation of mpfr_get_d_2exp, introduced in rev 4008, to specify a behavior very similar to the ISO C standard. 2006-01-31 Paul Zimmermann fixed documentation bug 2006-01-19 Vincent Lefèvre Reverted comments on (that were added in r3976). Replaced -0.0 by a new macro DBL_NEG_ZERO. With MSVC, the negative zero no longer depends on the non-standard _chgsign function, as static double double_zero = 0.0; # define DBL_NEG_ZERO (-double_zero) has been reported to work. 2006-01-17 Vincent Lefèvre Added comments. 2006-01-13 Vincent Lefèvre Type clean-up. The problem with the conversion was not completely fixed... Now OK. Fixed conversion with a non-representable value. Untabify. 2006-01-12 Vincent Lefèvre More reliable tests for mpfr_set_f (x, y, GMP_RNDN) for y = 2^emax and y = 2^(emax-1). Use mpfr_get_emax() instead of obsolete __mpfr_emax. More reliable test for mpfr_set_f (x, y, GMP_RNDN) for y=2^ULONG_MAX. Untabified. Fixed a bug related to exponent range. Replaced obsolete __mpfr_emax by __gmpfr_emax. 2006-01-11 Vincent Lefèvre Removed add_one_ulp.c and sub_one_ulp.c (no longer used). 2006-01-10 Vincent Lefèvre MPFR manual: changes from Paul concerning the ulps. In the manual, replaced "exact rounding" by "correct rounding", and added a sentence on the consequence of correct rounding (as suggested by Paul). 2006-01-05 Vincent Lefèvre Added ', Inc.' when missing after 'Free Software Foundation'. README.dev: Added a note about copyright notices. Updated the copyright notices according to the new GNU rules on: https://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices i.e. added 2006 to every MPFR file. Note: the copyright notices (currently 336) should match the regexp Copyright.* 2006 Free Software so that it will be easier to update them for the next year... 2006-01-03 Paul Zimmermann added suggestion from K. Briggs 2006-01-01 Vincent Lefèvre Updated copyright line (we are now in 2006!). 2006-01-01 Paul Zimmermann use mpfr_overflow 2005-12-29 Paul Zimmermann fixed bug in mpfr_set_f for huge argument 2005-12-26 Paul Zimmermann bug fix in mpfr_get_f 2005-12-23 Paul Zimmermann updated comment for float.h (_chgsign) fixed bug found by Vincent (worst-case) patch for Visual C (does not compile -0.0 properly) patch for Visual C (-0.0) 2005-12-20 Paul Zimmermann fixed typo 2005-12-16 Vincent Lefèvre Better definition for mpf_set_prec_raw (so that the value is kept). 2005-12-08 Vincent Lefèvre Updated a comment. Added test cases for a bug introduced on 2005-01-29 in sin.c rev 3248. README.dev: remember to test MPFR on the worst cases. 2005-11-29 Paul Zimmermann added lemma + reference 2005-11-25 Vincent Lefèvre Removed mpfr_div bug from BUGS (as it has been fixed). Added consistency tests for mpfr_div (e.g. to test small-size divisors). 2005-11-24 Paul Zimmermann fixed efficiency bug for small divisor (division had same cost than for divisor of the same size than the result) 2005-11-23 Vincent Lefèvre Updated FAQ. faq.xsl: add copyright information to the downloaded FAQ. Added information about the patches to the INSTALL file. BUGS: Noted the slow division when the precision of the divisor is small compared to the precision of the target. 2005-11-21 Vincent Lefèvre Fixed a bug preventing the compilation of MPFR with GMP 4.1.90 (non-public development version) without the build directory. Fixed memory leak in mpfr_mpn_rootrem(). 2005-11-09 Vincent Lefèvre Added a note about running the trunk tests in a branch. Make trunk tests work with MPFR 2.2 (branch), by testing the version. Removed .cvsignore file (useless after the switch to Subversion). Added a MPFR_UNLIKELY. In mpfr_round_near_x, use the new MPFR_RNDRAW_GEN with a correct middle handler instead of MPFR_RNDRAW_EVEN so that the correction of the wrong rounding is no longer necessary (BTW, the wrong rounding could have lead to problems in case of intermediate underflow/overflow -- not checked). mpfr_round_near_x test completed. Added a test for mpfr_cbrt, from the following failure with MPFR 2.2 and gcc 4.0.2 under Linux/m68k: Seed GMP_CHECK_RANDOMIZE=1131612275 (include this in bug reports) results differ for x=1.1000e-2 prec=5 rnd_mode=GMP_RNDN got 1.1000e-1 expected 1.0111e-1 approx 0.101110001001100E0 FAIL: tcbrt 2005-11-04 Vincent Lefèvre Improved note r3493 concerning mpfr_set_d/ld. More information in the "Reporting Bugs" section. Added a comment about the macros MPFR_RNDRAW* and the labels. Moved definitions of struct __gmpfr_cache_s and mpfr_cache_t, and declarations of mpfr_init_cache, mpfr_clear_cache and mpfr_cache from mpfr.h to mpfr-impl.h as they are internal (not documented). 2005-11-03 Vincent Lefèvre Eliminated the case inex == 0. Started to write code to test mpfr_round_near_x. Typos & English usage. Fixed typos. 2005-11-03 Paul Zimmermann added hint on forbidden variable name added "tune" item for new releases done make tune for amd64 with gmp-4.1.4 2005-11-02 Vincent Lefèvre Merged the changes from branch vlefevre: * mpfr-impl.h: Added MPFR_RNDRAW_GEN based on MPFR_RNDRAW and MPFR_RNDRAW_EVEN codes, but taking an additional argument: a handler executed in rounding to nearest mode when the value is the middle of two consecutive numbers in dest precision. MPFR_RNDRAW and MPFR_RNDRAW_EVEN are now defined by a "call" to MPFR_RNDRAW_GEN. * cache.c: Clean-up and use MPFR_RNDRAW_GEN instead of MPFR_RNDRAW_EVEN to avoid an unnecessary correction in the halfway case. * hypot.c: Fixed mpfr_hypot when the rounding mode is to nearest, x is "much larger" than y, and x is the middle of two consecutive numbers in the target precision. * tests/thypot.c: Added the corresponding testcase. [Added during the Subversion to Git conversion] A merge commit could not be generated for Git. Branch in Git: refs/deleted/r3930/heads/vlefevre 2005-11-02 Vincent Lefèvre Updated svn:ignore property. 2005-11-02 Paul Zimmermann fixed remaining problems declared variables as mp_prec_t instead of int use MPFR_MPZ_SIZEINBASE2 instead of mpz_sizeinbase 2005-11-02 Vincent Lefèvre Reverted the latest change to constant.c: removed MPFR_THREAD_ATTR as these constants can be shared. Removed MPFR_THREAD_ATTR from mpfr-impl.h too (this should have been the right correction for rev 3838 concerning the type mismatch). Thanks to Patrick for noticing this. 2005-10-31 Vincent Lefèvre Added an MPFR_UNLIKELY (suggested by Patrick) and an MPFR_ASSERTN. 2005-10-31 Paul Zimmermann factored calls to gmp_alloc removed unused variables improved atan (now can cut series before 2^m) revised error analysis and code of tanh 2005-10-31 Vincent Lefèvre Reformat (GNU coding style). Fixed MPFR_INT_CEIL_LOG2 (in mpfr-impl.h) and __gmpfr_int_ceil_log2 (in int_ceil_log2.c) when the argument is a power of 2, and added a test (new test file tests/tinternals.c). This made a bug appear in div_ui.c and mul_ui.c; fixed that too. Added a test that fails after fixing MPFR_INT_CEIL_LOG2. 2005-10-30 Paul Zimmermann improved exp_3 (binary-splitting algorithm) 2005-10-30 Vincent Lefèvre Fixed padding-bit test. 3 corrections in cos.c concerning maxi: * corrected a comment; * failed if sizeof(int) <= sizeof(long) / 2; * now take possible padding bits into account. 2005-10-29 Paul Zimmermann patched root.c to use rootrem.c with gmp-4.1.90 added comment in exp3.c added more initial guard bits in agm now tune Mulders short square (not yet used) improved mpfr_cos 2005-10-26 Paul Zimmermann updated code for gmp-dev 2005-10-26 Vincent Lefèvre Removed .cvsignore file (useless after the switch to Subversion). 2005-10-25 Vincent Lefèvre More portable update-version script (use perl instead of sed). 2005-10-24 Vincent Lefèvre First revision after the switch to Subversion: * Removed fixperm as it is now useless. * Updated README and README.dev files. Update. 2005-10-19 Paul Zimmermann documented algorithm used in mpfr_agm and fixed code accordingly 2005-10-10 Paul Zimmermann added efficiency item now mpzroot/rootrem compile without gmp internal headers 2005-10-07 Vincent Lefèvre Disabled new rootrem/mpz_root as compilation fails (headers can't be found). Temporary optimization (patch from Patrick Pelissier). 2005-10-06 Vincent Lefèvre One of the tests was using the fabs function, but -lm isn't given when generating the executable, making the linking fail under HP-UX. Fixed by not using this fabs function. 2005-10-05 Paul Zimmermann small improvement in sign detection improved mpfr_root, using the new mpn_rootrem code written with Torbjo"rn 2005-09-29 Vincent Lefèvre Update. Fixed bug in mpfr_set_ui macro when parameters are expressions with side effects. 2005-09-29 Paul Zimmermann fixed missing accent 2005-09-28 Vincent Lefèvre Small optimization. Test the sign of 0. 2005-09-28 Paul Zimmermann fixed infinite loop for lngamma(2) 2005-09-28 Vincent Lefèvre Updated libmpfr_la_LDFLAGS (note: it shouldn't be incremented again before the 2.3.0 release). 2005-09-26 Paul Zimmermann new function: Zeta with integer argument 2005-09-23 Paul Zimmermann new function mpfr_zeta_ui for integer argument 2005-09-21 Paul Zimmermann added brief description of algorithm for mpfr_zeta 2005-09-18 Vincent Lefèvre Mentioned problems with the Tru64 make and other minor changes. 2005-09-17 Vincent Lefèvre Fixed the GMP linking test: replaced __gmp_version, which corresponds to a variable, by __gmpz_init (suggested by the GMP documentation), which corresponds to a function, as the auto tools assume the symbol corresponds to a function. It was failing with the AIX linker. 2005-09-16 Vincent Lefèvre Untabify. Update. Untabify. 2005-09-16 Paul Zimmermann added missing documentation for mpfr_get_f and mpfr_pow_z 2005-09-16 Vincent Lefèvre Fixed typos found by Tomonori Kouya. 2005-09-16 Paul Zimmermann fixed stupid bug (coth was computing 1/tan instead of 1/tanh) 2005-09-15 Paul Zimmermann fixed overflow problem for large precision added log(precz) in initial precision 2005-09-13 Paul Zimmermann fixed bug in exp(-eps) for rounding toward zero (test was also wrong...) 2005-09-13 Vincent Lefèvre Updated "To make a release". Minor update. Added missing MPFR_THREAD_ATTR. 2005-09-11 Vincent Lefèvre Avoid a conflict with GMP. Reverted to previous mparam_h.in and mul.c, and applied Patrick's patch instead. Update. Added #include for memmove (see ISO C99 standard). Minor change. Fixed uninitialized variable (with gcc -std=c99). Fixed a #ifdef (when --enable-assert isn't used). Update. Changed the MPFR_ASSERTD into a MPFR_ASSERTN for MPFR_INT_CEIL_LOG2 since the assertion cannot be guaranteed for every C implementation. 2005-09-10 Patrick Pélissier Fix spelling mistake. Add new note about MPFR_TMP_DECL 2005-09-09 Paul Zimmermann reduced default of MPFR_MUL_THRESHOLD by 1, since now MPFR_MUL_THRESHOLD+1 is considered in mul.c 2005-09-09 Vincent Lefèvre Fixed another LaTeX error. Update. Updated "To make a release". Use (mpz_t *) 0 instead of NULL (this is not less clear and this works with the native SunOS 4 C compiler). 2005-09-09 Paul Zimmermann avoid . in mpf_set_str (locale-sensitive) cleanup of gamma and lngamma 2005-09-08 Paul Zimmermann MUL_THRESHOLD -> MUL_THRESHOLD+1 (to allow MUL_THRESHOLD=0, needed for tuneup.c) fixed LaTeX error 2005-09-08 Vincent Lefèvre Fix. Update. Added fixperm script to fix the file permissions broken by CVS. Update. 2005-09-08 Paul Zimmermann added one item 2005-09-08 Vincent Lefèvre Update. Fix: readded dependencies. 2005-09-06 Vincent Lefèvre More detailed error message. Change for ansi2knr. Code clean-up (again). Use GMP's allocate functions instead of C's. Code clean-up. Reformat. 2005-09-06 Paul Zimmermann missing set_emin added missing call to MPFR_TEST_USE_RANDS() [3 blocks non-freed] 2005-09-06 Vincent Lefèvre Fixed a bug (detected after mpfr_set_str_binary has been fixed) in tests/tsub.c introduced in 1.6 (2001-10-19). mpfr_set_str_binary was buggy and inefficient. Let's use mpfr_strtofr. Replaced unsigned long bit-fields (GCC extension) by insigned int bit-fields. 2005-09-05 Vincent Lefèvre MPN_COPY now calls memcpy only if dst != src (otherwise this is an undefined behavior), and if WANT_ASSERT is defined, it checks that there is no overlap. 2005-09-02 Vincent Lefèvre Avoid MIPSpro / IRIX64 (incorrect) optimizations for DOUBLE_ISNAN. More portable DOUBLE_ISNAN (useful for MIPSpro under IRIX64). 2005-09-02 Paul Zimmermann improved trade-off between fac_ui and gamma when argument is integer 2005-09-02 Vincent Lefèvre Reformat. 2005-09-02 Paul Zimmermann fixed remaining problem in gamma removed LogGamma from TODO 2005-09-02 Vincent Lefèvre Do not put expressions with side effects in MPFR_ASSERTN. 2005-09-01 Paul Zimmermann now uses lngamma code for x < 1 too added new tests from Kenneth Wilder added another test removed useless prototype 2005-08-31 Vincent Lefèvre Fixed memory leak (missing MPFR_TMP_FREE in a particular case). Fixed the code formatting. Updated Point 6 of "To make a release". Fixed memory leak (missing MPFR_TMP_FREE in a particular case). 2005-08-31 Paul Zimmermann added lngamma added new test (emax) now random tests also use x >= 1 added SAVE_EXPO stuff new function lngamma now uses lngamma code for x > 1 added lngamma 2005-08-31 Vincent Lefèvre Updated version to 2.3.0. Fix for the following problem: #error is not sufficient with cc on IRIX64, and autoconf 2.59 doesn't cope with that. 2005-08-30 Vincent Lefèvre Added .cvsignore files. Unobfuscated 2 assertions. Fixed indentation and some comments. Recommitted the patch (without discarding previous modifications). Reverted to the previous version, as the patch discarded previous modifications. 2005-08-30 Paul Zimmermann added two new tests patch from Patrick to solve efficiency problem when one operand is sparse (e.g. from ui_pow_ui) 2005-08-29 Paul Zimmermann check for overflow/underflow in pow and gamma 2005-08-24 Vincent Lefèvre When WANT_ASSERT >= 2: the corresponding messages are now output to stderr instead of stdout. Update. Improved C compliance when mp_limb_t and uintmax_t have the same size (concerning >> BITS_PER_MP_LIMB); some other small improvements. No longer assume that a mp_limb_t fits in an unsigned long (this is not true under IRIX, where a mp_limb_t has 64 bits and a long has 32 bits by default). In round_p.c, error messages are output to stderr instead of stdout. 2005-08-23 Vincent Lefèvre Update. This was wrong. Let's do it even more like the 2.1 branch. Update. Patch 1.25 didn't work under OSF1 with cc. Let's do it like the 2.1 branch (it now does work under OSF1 with cc). 2005-08-21 Vincent Lefèvre Better locale support (for the decimal point in string conversions and input/output). 2005-08-18 Vincent Lefèvre Update. Misc changes (spelling, typography...). Removed trailing spaces (better for future patches, as such spaces are sometimes stripped). Converted tabs to spaces with expand. Updated copyright line. Support C implementations giving an incorrect value for the precision of long double or where long doubles are implemented with FP expansions (like under Mac OS X), as in the 2.1 branch. Updated mpfr_get_ld: removed useless and non-portable hacks, fixed bugs, and slightly changed the behavior for the x87 extended format (we shouldn't return long double's with more precision than really supported, e.g. on FreeBSD and NetBSD). Added an assertion. 2005-08-17 Vincent Lefèvre Reformatted (GNU style). 2005-08-17 Patrick Pélissier Improve the warning message by adding the lines: "we cannot run a program linked with GMP (if you cannot see the version numbers above)." 2005-08-16 Paul Zimmermann added pointer for gamma fixed comments (code did not change) added formula for gamma function fixed last test (expected result was wrong) fixed bug for tiny input added test case 2005-08-12 Patrick Pélissier Reintroduce the computing of the dependencies. 2005-08-11 Vincent Lefèvre Added MPFR_DOUBLE_SPEC (not used yet, except for warning messages). 2005-08-10 Vincent Lefèvre Completed the documentation of mpfr_strtofr (concerning the exponent). Removed double spaces in mpfr_strtofr description (this matters for the info format). Added a temporary test for non-IEEE-754 double's. 2005-08-09 Patrick Pélissier Fix bug for pre-ansi compiler. Remove redundant entries. 2005-08-08 Paul Zimmermann fixed bug in mpfr_sin (possible wrong inexact flag for rounding to nearest) added items in NEWS and TODO 2005-08-05 Patrick Pélissier Update information Rename mpfr_stack to mpfr_custom_ 2005-08-03 Vincent Lefèvre Added/updated copyright information. 2005-08-03 Vincent Lefèvre Update. [[Split portion of a mixed commit.]] 2005-08-02 Patrick Pélissier Remove "Stack Interface" from TODO. 2005-08-01 Patrick Pélissier Add test file for mpfr_subnormalize Add documentation for MPFR stack interface Add a new test to avoid potential problems if mp_limb_t != long. 2005-08-01 Vincent Lefèvre Update. 2005-07-26 Patrick Pélissier Add first version of MPFR stack interface. Need to check if everything is ok, specially the test. Fix and clean up logging for GCC 4.0.x Clean up code. Improve logging: + The file is not created if there is nothing to log. + Add new ENVIRONMENT variables: MPFR_LOG_ALL and MPFR_LOG_STAT. Add experimental code (Disabled). Fix comment Add a new regression test (to fix). 2005-07-22 Patrick Pélissier Fix bug for high values of input (assertion failed) because erf(x) ~ 1, so 1-erf(x) ~ 0, and we can't get the EXP of tmp. 2005-07-18 Patrick Pélissier Fix bug (AC_INIT version wasn't updated). Display a note about libtool version before quitting. Clean up. Add comment. Add a new test: check if the charset has consecutive values. 2005-07-12 Vincent Lefèvre Updated documentation of mpfr_strtofr. 2005-07-12 Patrick Pélissier Fix an overflow bug (use of int instead of unsigned long). Optimize code (5% faster). 2005-07-11 Vincent Lefèvre Fixed locale bug. Function strncasecmp is no longer used. 2005-07-09 Vincent Lefèvre In the tests, set the locale to the current one. This allows to test MPFR under various locales, showing a bug in the parse_string function due to the use of the strncasecmp function ('i' and 'I' don't match with LC_ALL="tr_TR.ISO8859-9"). 2005-07-07 Patrick Pélissier Improve displayed warning if GMP versions differ. 2005-07-06 Patrick Pélissier Add a solution for a problem. 2005-07-05 Vincent Lefèvre Added in-place tests for atan(+/-0). 2005-07-05 Patrick Pélissier Fix bug of signed 0. Optimize code. (20% for 53 bits). Improve test for signed 0. 2005-06-28 Patrick Pélissier Simplify a condition which was always true. (p is always negative). Add assertion. Simplify code for final step (when i== n0): since we do n0-i=0 steps, atan(Ak/2^k) ~= Ak/2^k. So we could speed up the final computation (9% faster). Optimize: when computing arctan(p/2^r) simplify p/2^r if p is even. Clean up and remove tabi table. It was useless. 2005-06-22 Patrick Pélissier Clean up configure and acinclude: + Remove useless test in MPFR_CONFIGS (Check for valid NAN). Its result is not use by MPFR. + Remove useless macros (AC_CHECK_OS, AC_CHECK_MACH and AC_MY_HEADERS). + Move detection of math/rint,round,floor,ceil to MPFR_CONFIGS. 2005-06-20 Vincent Lefèvre GNU coding style. 2005-06-16 Paul Zimmermann improved m=0 case when b is a power of 2 2005-06-15 Patrick Pélissier Replace mpfr_div_2ui call by SET_EXP/GET_EXP since it can't overflow. Speed up a few (from 10822 to 10600). Update 2005-06-14 Patrick Pélissier Replace check for a power of 2 for the high limb by a check for "high bit limb" for the high limb. Fix bug in mul_ui (always alloc buffer instead of trying to reuse it). Add new test (failed). Add Fast case for u==1 Add Fast case for u a power of 2 (Call mul/div_2si). Fix bug (use of GCC specific attribute). 2005-06-13 Patrick Pélissier Rechnage the meaning of root for k=0. Fix bug with x<0 and k even Add special case for k==0 Add test for special case k==0 2005-06-13 Paul Zimmermann added assertion 2005-06-13 Patrick Pélissier Improve efficiency of initial call to mpfr_cache. Add new check (+INF -INF --> NAN). 2005-06-10 Patrick Pélissier Fix bug of NAN and INF. Fix bug in documentation (mpfr_sum wasn't exactly what is described). Improve test. Change internal names. Clean up. Fix bug: check if mpfr_log returns 0. 2005-06-08 Patrick Pélissier Replace MPFR_EXP to MPFR_GET_EXP Use GROUP function Use MPFR_MPZ_SIZEINBASE2 Factorize the mpfr_mul_2exp chain. Replace int to mp_prec_t for precision... Fix warning due to comparison of unsigned and signed integers. Fix warnings due to comparison between signed and unsigned. Reinclude string.h for strtofr. 2005-06-08 Vincent Lefèvre Fixed bug introduced with the new internal format on 2003-10-27. Updated comments. 2005-06-08 Patrick Pélissier Fix introduced bug due to missing NULL. Fix introduced bug (NULL not defined). Clean up use of stdio.h: it is now included by mpfr-impl iff DEBUG is defined or WANT_ASSERT is defined. Fix warnings. Clean up code. Improve checking if WANT_ASSERT >= 2 2005-06-07 Patrick Pélissier Fix wrong assertion. Improve test by adding special cases. MPFR_GET_EXP was wrongly defined and does nothing due to recursive macro (mpfr_get_exp is also defined to be a fast macro). Fix this by removing the macro call in MPFR_GET_EXP in case of ASSERT >= 1. 2 tests failed now! Clean up and improve check. Handle case n==0 and n==1 as special cases. Simplify test to use tgeneric. Add note about Worst Case of const_catalan up to 100,000,000 Use GROUP functions. Improve coverage. Fix bug in MPFR_GROUP_REPREC_3. 2005-06-06 Patrick Pélissier Improve coverage Improve coverage test Remove mpfr_sub_one_ulp from MPFR library. Keep the C file until we are sure it not needed anymore. Improve coverage. Remove mpfr_add_one_ulp from MPFR library. The function is still in the CVS. Add experimental code (disabled). For 5000 bits, gamma(12.5) takes 4s instead of 18s. But it changes the error analysis... Reduce use of intermediary variables. Improve comment of previous change. Use FastCompute if x is positive and big, ie it uses Zeta(x)=1+1/2^X+O(1/3^x) 2005-06-03 Patrick Pélissier Add new and faster trivial case for y <= 1 and n <= 1 2005-06-02 Patrick Pélissier Forget those two. Update from FSF site. Finish updating files. Change the address of the FSF. Optimize it a few by avoiding calling fac_ui for each iteration of the main loop. Reduce # of vars inside the main loop. Use GROUP function. Improve overflow problems (Use of int instead of mp_prec_t). Improve efficiency by removing 2 variables (Loop uses only 4 vars). Use GROUP. Add support for MPFR_GROUP functions. Add attribute const and noreturn for function (via macros). Add new macros GROUP_INIT_6 and GROUP_REPREC_6 for zeta and gamma. 2005-06-02 Paul Zimmermann added missing functions from gnumeric 2005-06-02 Patrick Pélissier Update stack-interface. Remove round_near_x item. Add new functions to implement. Reformat file. Fix input precision of mp_prec_t. May be outside 'int' range. So it uses 'long' instead and a proper check. 2005-05-25 Vincent Lefèvre Added coding recommendations concerning C++ compilers. 2005-05-23 Patrick Pélissier Final version of MPFR_GROUP macros. Improve coverage test. 2005-05-20 Patrick Pélissier Remove variable t which wasn't used! 2005-05-18 Patrick Pélissier Replace TMP_ALLOC by MPFR_TMP_ALLOC Replace TMP_DECL by MPFR_TMP_DECL Replace TMP_MARK by MPFR_TMP_MARK Replace TMP_FREE by MPFR_TMP_FREE Add support for GMP's TMP_SALLOC. New way of handling exact value. Fix bug of wrong rounding and wrong ternary value if the power is exact, but at an upper precision than the working precision. Now it computes the power exactly if it detects it is exact. Precise that 1 is not the only value. 2005-05-18 Vincent Lefèvre an 1 -> a 1. 2005-05-18 Patrick Pélissier Add a note about special case 1 Add assertions Remove useless function is_odd_even. Fix bug: returning 1 didn't take the rounding mode into account. Simplify dependencies of mpfr_pow. Fix bug of overflow Fix bug of wrong ternary value in case of overflow Add test cases. Fix bug of overflow. Fix bug of ternary value in case of overflow. Clean up previous patch. Fix bug of overflow. Fix bug of ternary value in case of overflow. Still some bugs... 2005-05-17 Patrick Pélissier Rewrite the way of handling overflow. Fix bug due to overflow. Fix bug due to wrong ternary value. Typo. Fix bug of overflow. Still a problem if exp(x) is near the limit of EMAX_MAX. Add new macro MPFR_SAVE_DECL_UPDATE_FLAGS Improve way of handling overflow (still not perfect but far better). Improve coverage test. Improve coverage test. 2005-05-17 Vincent Lefèvre hypot(±oo, NaN) now returns +oo, as in ISO C99 (wasn't documented). 2005-05-17 Patrick Pélissier Improve coverage test. Remove useless test. Improve coverage test. Improve coverage Improve coverage test. Add CFLAGS -g. Clean up Improve coverage tests. Improve coverage test. Special a condition by the simplified one. Improve coverage test (Forget to test tiny functions). Typo Add 'coverage' script. Add 'static' Reformating code. Fix potential (?) overflow for very large precision. Various tiny optimizations Improve the initial estimation of the needed precision. Extract constants (__gmpfr_one, two and four) from log.c to constant.c Fix bug in MPFR_SET_ONE. Remove a space. 2005-05-16 Vincent Lefèvre Typography + spelling. Note that mpfr_out_str has slightly changed. 2005-05-16 Patrick Pélissier asin, atan, atanh are not slow anymore for small input. Remove it in the TODO. 2005-05-14 Vincent Lefèvre Fixed a bug due to a typo on a variable name. It produced a segmentation fault in the tests on Linux/ppc (uninitialized data were read), not always reproducible when stepping with gdb. 2005-05-13 Patrick Pélissier Add support for MPFR_FAST_COMPUTE_IS_SMALL_INPUT Add support for FAST_COMPUTE_IS_SMALL_INPUT. Add round_near_x support for small arguments. Add new internal function mpfr_round_near_x. 2005-05-13 Paul Zimmermann added missing documentation for mpfr_hypot 2005-05-13 Patrick Pélissier Add a \n for all error strings. Fix copyright date. Fix some problems when you define mpfr_prec_t to be an unsigned short. Now all tests passed when mpfr_prec_t is defined to be an unsigned short on a 32 bit CPU! 2005-05-12 Vincent Lefèvre Detect/avoid potential integer overflows. 2005-05-12 Patrick Pélissier Fix typos. 2005-05-11 Patrick Pélissier Same patch for exp_3. Fix bug when exp(x) is near the limit of an overflow or an underflow (mpfr_exp_2 didn't allow an overflow/underflow in its internal loop). Add corresponding test case. exp_3 may need similar patchs. 2005-05-11 Vincent Lefèvre Update (with reformatting so that the logs are readable on 80 columns). 2005-05-11 Patrick Pélissier Fix bug due to wrong assertion. 2005-05-10 Patrick Pélissier 1. Change the prototype of mpfr_can_round to use const. 2. Change the prototype of mpfr_round_raw_2 (remove first argument since it is useless). 3. Change round_raw_generic to use preprocessor if rather than compiler to detect if flag == 1 or 0 4. mpfr_round_raw_xxx use const attribute too. 5. Remove mpfr_round_raw_3 since it is unused by MPFR. 6. Add first prototype of MPFR_FAST_COMPUTE_IF_SMALL. Update. Fix a bug in the product of 2limbs per 2 limbs. Add new regression test. Fix problem with mingw: if the configure detects MS-Windows, it skips the tests which try to link against GMP within the configure, hoping the Makefile works. The main problem is that we need libtool inside the configure to link against GMP. 2005-05-09 Patrick Pélissier Improve random tests. 2005-05-04 Patrick Pélissier Replace initial estimation of K0 from sqrt (p/2) to sqrt(p/16). It seems to be 30% faster for 5000 bits, and 5% faster for 50 bits. 2005-05-04 Vincent Lefèvre Reformatted the code. 2005-05-04 Paul Zimmermann fixed dummy init2 followed by set_prec 2005-05-04 Vincent Lefèvre Added LIA-2 functions to implement. 2005-05-04 Patrick Pélissier Add functions mpfr_sech, mpfr_coth and mpfr_csch. init2 alloc what is needed, not 2 (more efficient). 2005-05-04 Paul Zimmermann improved const_euler and eint removed dependency from input precision in several functions fixed two bugs in pow (detection of exact cases) 2005-05-04 Patrick Pélissier Update to reflect the current state. 2005-05-03 Patrick Pélissier Fix computing of `sup` to reflect what is described in algorithms.tex. Tiny optimization of mpfr_atan. On opteron with p=53, from 9231 / 18049.89 / 81758 to 9004 / 17522.76 / 78601. 2005-05-03 Vincent Lefèvre Fixed a problem in test_small (already done in the 2.1 branch) when long double = double. 2005-05-03 Patrick Pélissier Improve detection again (use callback). Improve previous change. Add detection of function round, rint, ceil, floor and nearbyint at configure time so that spe206 which defines itself as C99 compliant can build the trint test. Update (Move bugs to potential). 2005-05-03 Vincent Lefèvre Fixed the mpfr_hypot bug, and re-enabled the test_large_small test. 2005-05-02 Vincent Lefèvre Update. Mention the mpfr_hypot bug. Added a test showing a bug, enabled when TEST_LARGE_SMALL is defined (to avoid a freeze with make check). 2005-05-02 Patrick Pélissier Fix bug. Remove useless function f. Fix a bug: the test to detect EVEN_rounding was wrong. Update example of use of mpfr_subnormalize. mpfr_cmp_str checks for NAN. Add macro mpfr_cmp0 in mpfr-test. Undo previous change for tgeneric. troot uses tgeneric_ui instead. 2005-05-01 Patrick Pélissier Add new functions in reuse test. 2005-04-30 Paul Zimmermann added efficiency item added mpfr_eint 2005-04-29 Patrick Pélissier Add something to do :) 2005-04-29 Paul Zimmermann added comment about efficiency of atan 2005-04-29 Vincent Lefèvre The FAQ is now distributed with MPFR. Use update-faq to update it from the MPFR web site. 2005-04-29 Paul Zimmermann commented out argument reduction analysis for arctan (was wrong) 2005-04-28 Paul Zimmermann wrong commit, put revision 1.37 back wrong commit, put back revision 1.47 added error analysis for Geoff's argument reduction for arctan 2005-04-27 Vincent Lefèvre Added a note about mpfr_set_d and mpfr_set_ld. Define MPFR_VERSION_STRING using the update-version script (works with any compiler). 2005-04-26 Paul Zimmermann added internal interface added suggestion from Geoff added MPFR_VERSION_STRING 2005-04-25 Paul Zimmermann added new item improved expm1/log1p for small argument improved to taken account of case |x| small (reported by Keith Briggs) 2005-04-25 Vincent Lefèvre Added a missing "-" and replaced a few "-" by @minus{}. Added a note for mpfr_cmp functions. 2005-04-25 Paul Zimmermann fixed bug with tiny number 2005-04-22 Paul Zimmermann removed done item 2005-04-22 Patrick Pélissier Add a macro for mpfr_const_catalan for internal use. Fix typos. 2005-04-22 Paul Zimmermann removed Root, updated eint* added sec, csc, cot proposal for exponential integral definition added mpfr_root, removed from TODO added mpfr_root 2005-04-21 Vincent Lefèvre Update. Added the ability to change the control word when compiling tset_ld with -DWITH_FPU_CONTROL=1 and executing tset_ld with an argument (not used in the automatical tests yet). Added test_small (the same as in the 2.1 branch). Updated a comment and reformatted the code. 2005-04-21 Paul Zimmermann added explanation 2005-04-20 Paul Zimmermann adjusted initial guard digits for const_catalan to avoid failure for prec<=10^4 updated documentation and improved tests for mpfr_const_catalan removed Catalan's constant (done) added Catalan's constant added efficiency items suggested by Geoff Bailey fixed minor problem (wrong rounding mode for x=0, y<0), thanks Geoff Bailey 2005-04-19 Paul Zimmermann added one efficiency item completely rewritten algorithm and error analysis for acosh (did not match those in acosh.c) algorithm and error bound did not match those of algorithm.tex!!! added missing functions for Magma changed semantics of mpfr_get_str for ndigits=0 2005-04-14 Paul Zimmermann added one item (efficiency) 2005-04-14 Patrick Pélissier Fix atan2 to fit C99 semantic. Fix typos. Add TODO. Add documentation for mpfr_subnormalize. Fix bugs. 2005-04-13 Patrick Pélissier Apply Guillaume's patch about mpfr_div_ui. Fix a bug in tsi_op (forget to clean memory). Add function mpfr_subnormalize (To Test!!!!!) Add TODO. Fix wrong comment. 2005-04-07 Patrick Pélissier Reenable tests. Add documentation about mpfr_atan2. Improve test suite by adding new random values. Add random tests (tgeneric + random2). 2005-04-05 Vincent Lefèvre Test with -ansi when making a release. Typo. 2005-04-05 Paul Zimmermann replaced // comments by /* ... */ 2005-04-04 Patrick Pélissier Add note about mpfr_neg Add function mpfr_atan2 2005-03-31 Patrick Pélissier Change to add future function mpfr_sqrhigh_n. Add documentation for mpfr_erfc. Add items. Add function mpfr_erfc. Add a note about auto-checking correctness of MPFR. 2005-03-30 Vincent Lefèvre Added a testcase (the one added to the 2.1 branch). 2005-03-30 Patrick Pélissier Use random2 instead of random. 2005-03-30 Vincent Lefèvre Weaker conditions for return 0 in mpfr_round_p. 2005-03-30 Patrick Pélissier Add generic test for functions which looks inexact = MPFR_TOTO (rop, op, INTEGER, RND); Add ceil(log2(size)) bits to initial precision to avoid committing in error for huge operands. 2005-03-30 Vincent Lefèvre Added a test (corresp. to the one added on 2005-03-25 in tpow_z.c). 2005-03-29 Vincent Lefèvre Reformatted code (GNU style, untabify...). 2005-03-29 Patrick Pélissier Tiny update. Add group functions macros. Replace test ('p <= i') by assertion ('p > i). 2005-03-25 Paul Zimmermann fixed bug in pow_ui (and pow_z): missing factor 2 in error bound fixed bug in gamma of negative integer 2005-03-25 Patrick Pélissier Add info. Add new internal function for debugging reasons. Forget to free x and y Add failed regression test. Improved version. Undo previous change (I was wrong). Add new regression test. 2005-03-24 Patrick Pélissier Fix wrong extimated precision. It is log2(n+2) ulps so that log2(log2(n+2)) bits! Add checking. 2005-03-23 Paul Zimmermann added new test 2005-03-23 Patrick Pélissier Remove an signed integer trap overflow (GCC 4 + '-ftrapv'). Don't use Mulder at n+1 for MPFR_MUL_THRESHOLD+1 Reduce the threshold for AMD64. 2005-03-22 Patrick Pélissier Initial version of Short Division. Fix bug on HP-UX. longlong's umul_ppmm seems to be buggy on such a system. Don't use it under HP-UX. 2005-03-21 Patrick Pélissier Add case where bn == 1 and bn == 2 by using longlong.h. Modify tuneup to start with prec=2*BITS_PER_MP_LIMB+1 Fix bug in computing the estimated precision when you switch from N limbs to N+1 limbs. Add regression tests. 2005-03-19 Vincent Lefèvre Typo. 2005-03-18 Paul Zimmermann added one efficiency item 2005-03-17 Paul Zimmermann added two property-tests 2005-03-17 Vincent Lefèvre Fixed a bug for mpfr_atanh(x) with 1 < |x| < 2 (found by Matt Reddick). 2005-03-14 Patrick Pélissier Update Improve test: compare between mpfr_round_p and mpfr_can_round. Replace mpfr_can_round (..., GMP_RNDN, GMP_RNDZ, ...) to fast replacement mpfr_round_p. Remove a FIXME. Add new internal function mpfr_round_p which is a fast replacement to mpfr_can_round (x, y, GMP_RNDN, GMP_RNDZ, ...) Improve an error message. 2005-03-10 Patrick Pélissier Fix bug: tmp may have changed in mulhigh code. Restore it before calling mpn_mul. 2005-03-09 Patrick Pélissier Better defaults threshold. Handle case where Prec(a) ~ estimated prec of mulhigh. Add one extra limb, and still uses mulhigh. Fix bug: compute Mulder Threshold from n/2+1 instead of (n+1)/2 Forget ';;' in switch. Add '-v' for tuneup. Add assertion. Improve checking Add test. Short Mulder product failed for this. Improve full assertion mode (Check mpfr_mul). 2005-03-08 Patrick Pélissier Move GLIBC detection from mpfr-impl to logging.c Add log info. Improve default threshold. Add Mulder Short product for mpfr_mul. Update algorithm.tex to describe the estimated error. Add an assert. Cosmetic change. Update default values. Clean up macro namespace. Cosmetics change. 2005-03-08 Paul Zimmermann new function mpfr_get_f 2005-03-08 Patrick Pélissier Fix bug in case of reuse of variable (a,b,a) with Exp(b)=Exp(a)+Prec(b). Move copy of mantissa after test. 2005-03-07 Patrick Pélissier Add tune for mpfr_mulhigh Add --with-mulhigh-size option at configure time. 2005-03-04 Patrick Pélissier Fix bug due to wrong estimation of (get_d (x) / LOG2). TODO: Rexamine the algorithm of mpfr_exp_2! Transform DEBUG message to LOG message. Improve it. Tune mpfr_exp_2 now! 2005-03-03 Patrick Pélissier Fix bugs. Update it. New code for mpfr_mul. 2005-03-02 Patrick Pélissier Add new default threshold for different CPU. Update for tune. Fix bug in estimated error (See previous ChangeLog). 2005-02-24 Patrick Pélissier Add tune program for MPFR. Do make tune instead of make. BUT you need to have configure MPFR with --with-gmp-build=... (It uses internal libspeed.la of GMP). Tuning is slow... Add note. 2005-02-22 Patrick Pélissier Tiny optimization Update Add logging. Reduce InterObject dependency by moving mul_si, div_si and si_div to the unique function they used. Improve mul_ui by inlining the rounding. 2005-02-21 Patrick Pélissier Improve test to 1. 2005-02-21 Vincent Lefèvre Updated copyright lines. Code reindented / reformatted. Fixed a bug for u == 0 and x == +0 introduced in ui_sub.c 1.23, when 0 was taken into account as a special case: the sign of the result 0 was incorrect. -> Consider the case u == 0 first. 2005-02-19 Paul Zimmermann added generic tests in tpow 2005-02-18 Paul Zimmermann fixed bug (variable used twice for different things) more changes for interface with NTL 2005-02-18 Patrick Pélissier Likely a test. Update 2005-02-18 Paul Zimmermann added interface for NTL 2005-02-16 Vincent Lefèvre Update. Suppress some spaces. 2005-02-16 Patrick Pélissier Reenable underflow tests. Update 2005-02-16 Vincent Lefèvre Removed texinfo.tex, as it can be installed by autoreconf -i. 2005-02-16 Patrick Pélissier Fix LOADLIBES so that it works (it doesn't due to libtool change). But it still needs to have s static version of MPFR. 2005-02-16 Vincent Lefèvre autoreconf -> autoreconf -i 2005-02-16 Patrick Pélissier Fix wrong integer types. 2005-02-16 Vincent Lefèvre Spelling mistakes & reformatted code. 2005-02-15 Vincent Lefèvre Reformatted code. 2005-02-15 Patrick Pélissier Improve initial prec. Remove code. Add special case if t=1. mpfr_set doesn't produce an EVEN inexact flag. Fix this. USe of mpfr_nexttozero. Fix bug: use x instead of xf in LOG. Log input and output of functions. Fix bug of overflow in tan. Use of MPFR_LOG_FUNC. Do not print final log message if there was no call. Add ZivLoop for sign 2005-02-14 Patrick Pélissier Fix bug: during the display of a logged var, logging is turn off. Add MPFR_LOG_FUNC Use mpfr_cos as testing example. Add ZivLoop controller for constantes. Augment exponent range in the cache. Remove it in const_pi. Add generic ZivLoop controller. 2005-02-14 Laurent Fousse Document mpfr_sum returned int value. 2005-02-14 Patrick Pélissier Clean up code. Add generic ZivLoop controller. 2005-02-14 Laurent Fousse Consider return value's precision for rounding in mpfr_sum. 2005-02-14 Paul Zimmermann removed garbage 2005-02-14 Patrick Pélissier Clean up Add ZivLoop Remove malloc/free. Use of MPFR_INT_CEIL_LOG2 Add ZivLoop controller. Clean up code. Fix bug with Exponent range. Add ZivLoop controller. Cleanup code. 2005-02-14 Paul Zimmermann further efficiency improvement (avoid mpz_init/mpz_clear) 2005-02-14 Patrick Pélissier Add ZivLoop controller. Clean up code. Optimize it by removing the # of used vars. Add ZivLoop controller. 2005-02-12 Paul Zimmermann new faster algorithm for log(2) 2005-02-11 Patrick Pélissier Remove detection of C++ and Fortran due to libtool. ---- Note (VL, 2010-02-08): this removal by an always false test was working with libtool 1.5.26, but doesn't work with libtool 2.2 to 2.2.6b (used by the MPFR 2.4.{0,1,2} tarballs). https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568520 Clean up configure (simpler). Still a bug with CXXCPP to solve. Clean up const_log2 code. 2005-02-10 Patrick Pélissier Add log for other functions. Add ZivLoop too. Cleanup exp3. 2005-02-09 Patrick Pélissier Update for ICC (disable shared since it doesn't work). The previous fixs don't work. New one which works but is VERY ugly. Fix again to avoid fail on laurent5... Set CXXCPP to "g++ -E" to avoid detection (which may fail on some systems). Reduce the tested compiler for C++ and Fortran to the minimum. Update GMP detection to be much more libtool compatible. As a consequence some tests using AC_RUN_IFELSE may fail due to ugly things like LD_LIBRARY_PATH no set or wrong selection of libgmp. So they just produce a warning, not a fatal error. TODO: Check if we can avoid those problems... 2005-02-08 Patrick Pélissier Remove automake and libtool files. Use `automake --add-missing --copy -i` to generate them. Add support for ansi2knr Add support for Shared Library in MPFR (both Unix and Windows) by using libtool. Improve configure (remove unused macros, make dist produce .zip and .bz2) Update update-version to modify configure.in too. Update NEWS. 2005-02-04 Vincent Lefèvre Update. 2005-02-04 Patrick Pélissier Add forgotten functions to reuse test. Improve reuse tests (Include 1, -1, 1/2, 2, PI and PI/2 now). Fix bug of atan(-1) (wrong sign). 2005-02-03 Patrick Pélissier Remove unused option --disable-cache. Add option "thread-safe" to configure. Limited to use with GCC and ICC (using extension __thread). Add description of added functions. mpfr.h doesn't export anymore any globals. It doesn't define MPFR_FLAGS too. Change user interface for mpfr_const_pi, mpfr_const_log2 and mpfr_const_euler. No more access to the cache itself. Create dummy functions which call the cache, and rename old functions to "_internal". Internally, it doesn't change at all (You still call directly the cache instead of the dummy function which calls the cache). Add functions mpfr_set_overflow, mpfr_set_underflow, mpfr_set_erangeflag, mpfr_set_inexflag, mpfr_set_nanflag Rename internal functions mpfr_set_overflow in mpfr_overflow and mpfr_set_underflow in mpfr_underflow so that we can add new functions mpfr_set_underflow and mpfr_set_overflow (which set the global flags). Add support for logging. Add support for ZivLoop. Improve efficiency if prec(op) >> prec(rop), and rop ~= 0 Fix wrong place for MPFR_LOG_BEGIN. Rename MPFR_LOG_BADCASE in MPFR_LOG_ZIV Reduce the size of some lines (more than 80 chars). 2005-02-02 Patrick Pélissier Fix again. My previous fix was incorrect. Fix wrong order of include system files. (printf.h is not available everywhere). 2005-02-02 Paul Zimmermann inexact flag was inexact :-) 2005-02-02 Patrick Pélissier Move mpfr_nexttozero and mpfr_nexttoinf from static to mpfr-impl. Use them in sub1 and sin. Add forgotten logging file. Add description of new macros in README.dev Add support for ZivLoop controller and logging. Add experimental logging feature. Add ZivLoop controller. Forget that mpf doesn't have mpf_free_str. Fix this. Fix bug of sub1 if dest=src2 and src1 >> src2 => Fix problem of mpfr_sin 2005-02-02 Paul Zimmermann added two tests 2005-02-01 Patrick Pélissier Now MPFR tries to get GMP's CC and CFLAGS from its build directory. Add AC_COPYRIGHT Clean up AC_ARG_ENABLE handling Add `--enable-logging` option. 2005-01-31 Paul Zimmermann added item 2005-01-31 Patrick Pélissier Fix a wrong assertion when double == long double. Add loop counter Check if the result is 0 (Due to new algorithm, it may be 0) and in that case, increase a lot the precision. 2005-01-29 Paul Zimmermann changed algorithm for mpfr_sin (to get inexact flag) 2005-01-29 Vincent Lefèvre Fixed a sign bug in mpfr_exp (found by Mark J Watkins). 2005-01-28 Paul Zimmermann solved efficiency problem in mpfr_sin_sign for x near Pi 2005-01-28 Vincent Lefèvre Removed tests/tdump.c (was no longer used and mpfr_dump is already tested in toutimpl.c). Updated copyright line. 2005-01-28 Patrick Pélissier Clean up code (due to mix with Paul changes). Improve inexact code since sin & cos can't be exact if x != 0 2005-01-28 Vincent Lefèvre Removed a useless test in macro MPFR_UNSIGNED_MINUS_MODULO. 2005-01-28 Patrick Pélissier Much faster worst case (ie result near 0 or 1). 2005-01-28 Paul Zimmermann speed-up special case where approximation is 1 or -1 2005-01-28 Vincent Lefèvre Updated comments about the rounding modes. 2005-01-28 Patrick Pélissier Fix bug and optimize code. FIx a warning (Wrong proto between declaration and implementation : forget some const). 2005-01-28 Vincent Lefèvre Updated copyright line. Updated copyright lines. 2005-01-28 Paul Zimmermann fixed efficiency problem in case of cos(Pi) 2005-01-28 Patrick Pélissier Fix bug if dest==src. Transform some MPFR_ASSERTN to MPFR_ASSERTD. 2005-01-27 Patrick Pélissier Fix a buffer overflow. New version of mpfr_set_ld and mpfr_get_ld for IEEE Extended Little Endian. (Due to problem on x86 with extended precision). 2005-01-27 Paul Zimmermann partially fixed memory leak test for huge cancellation was misplaced fixed memory leak fixed inefficiency problem for x near from Pi casts to allow compilation with g++ added missing cast added missing casts 2005-01-25 Paul Zimmermann fixed bug (overlap in mpn_divrem) 2005-01-24 Vincent Lefèvre Removed tests/Makefile.in from CVS. 2005-01-24 Patrick Pélissier Fix bug reported by Eric Buchlin by using new function mpfr_pow_z. Add new function mpfr_pow_z and its test file. Fix overflows problems. Clean up overflow handling. Maybe some bugs remain... 2005-01-24 Vincent Lefèvre Update. 2005-01-24 Patrick Pélissier Add an explicit reference to mpfr_dump so that you can use this function inside the tests with GDB, even if you don't use it in the tests. 2005-01-24 Paul Zimmermann added check before mpz_get_si() call 2005-01-24 Vincent Lefèvre Update. Corrections on the typography. Corrected English usage. Typos. 2005-01-21 Paul Zimmermann added LOADLIBES=... 2005-01-21 Vincent Lefèvre Updated Copyright line. 2005-01-20 Patrick Pélissier Fix again this previous patch! 2005-01-20 Paul Zimmermann fixed problems in get_str for huge exponent 2005-01-20 Patrick Pélissier Update longlong from GMP 4.1.4 (problem with opteron). 2005-01-18 Patrick Pélissier Fix bug in case n==0 or n==1 (Reported and fixed by Laurent Fousse). 2005-01-14 Patrick Pélissier Add comments Fix bug in my patch (Need tests). Optimize mpfr_atan_aux by removing all power of 2 in the sum to reduce the size of the multiplication, normalize the input to extract as many zeros as possible and add a special case if the input is 1 (after normalisation). But it doesn't optimize too much... I need to invertigate a few more too understand what is still costly. It seems that mpz_mul is the most called function. Improve and fix tanh for big floats. Fix bug in some corner case (Just hope it doesn't add new bugs). It should be much faster in these cases too. Remove warning Tiny update Fix bug (Forget a debug line). 2005-01-13 Patrick Pélissier Fix overflow bug Optimize code Fix bug in mpn_sub_nc in case the compiler optimize too much. 2005-01-12 Patrick Pélissier Add forgotten 2005 copyright line. Fix problem of `mpn_sub_nc' which may or may not be defined in libgmp.a (Add a test in the configure and a new macro MPFR_HAVE_MPN_SUB_NC) Add MPFR_LOG2_BIT_PER_MP_LIMB macro Massive optimization of mpfr_atan (20x faster than 2.1.0 at 53 bits!) Minor optimization of mpfr_acos 2005-01-11 Patrick Pélissier Fix typo Reduce size of code Optimize a few too. Forget 2005 ! Improve and fix detection of NAN and GCC bug. 2005-01-04 Patrick Pélissier new version (completely rewritten) by Paul Zimmermann. Fix forgotten '2005' Line. Fix wrong inexact value (regression). FIXME: It seems that adding MPFR_GET_EXP (xp) bits is too much (since previously it always add 0, but the results were quite always exact - this bug was only discovered under rare case). 2005-01-04 Paul Zimmermann added item (mpfr_printf) 2005-01-04 Patrick Pélissier Optimize mpfr_exp2 by inlining some code, and by avoiding using mpz_sizeinbase. Remove unused code. Remove _MPFR_PROTO for static functions. Other cosmetic change. Remove _MPFR_PROTO for static functions. Remove unused code. Optimize mpfr_get_d. Add a new configuration to check before releasing MPFR. Fix problem of tab with ncurses. Likely some tests Fix bug if not gmp-impl.h (mpn_sub_nc is internal). Move MPFR_SET_EXP after checking the exponent range. Minor change in the way to return the ternary value. 2005-01-01 Paul Zimmermann changed tab[] into *tab (and removed 'tab' in mpfr.h) 2004-12-24 Paul Zimmermann new version (completely rewritten) improved coverage (and fixed bug) 2004-12-21 Patrick Pélissier Fixed errors reported by Nelson H. F. Beebe (forget to include sys/fpu.h if defined and math.h if std=c99). 2004-12-20 Patrick Pélissier Fix wrong integer type and a test. Add some assertion. Unlikely one test. Fix wrong integer type Reindent the code. 2004-12-17 Patrick Pélissier Optimize mpfr_tan Optimize the computing of the sign of sinus if GET_EXP(x) < 0 Optimize mpfr_cos. From 3363 / 21663.99 / 79727 to 3139 / 18920.58 / 69624 (opteron). Fix precision used to test long double. Now it is sizeof(long_double)*CHAR_BIT instead of fixed 113. FIx wrong integer types Add an assertion. Likely / Unlikely some code. Fix problem with long double with ICC (Wrong x86 processor flag). 2004-12-16 Patrick Pélissier Fix wrong integer types. Fix bug. Optimize mpfr_acos by choosing a better initial precision. Optimize mpfr_asin by improving the choice of the initial precision. Optimize mpfr_atan. 2004-12-15 Patrick Pélissier Fix problem with GCC 4.0 20041212. Remove thread attribute until I found a good way to use it. Test Add 'const' attribute to table. Remove unused file. New way of detecting GMP libraray, which should be more portable. 2004-12-14 Patrick Pélissier Remove useless assembly code. Add "MPFR_USE_NO_MACRO" user macro: it allows the user to link directly with MPFR functions rather than using Macros to access them. It doesn't define MPFR variable inside mpfr.h too. Fix set.c and cmp.c in consequences. Fix mpf2mpfr.h to use mpfr_get_default_rounding_mode () if needed. 2004-12-13 Patrick Pélissier Improved prototype. Fix bug of overflow (I hope). Update mpfr_set_q overflow problem. Fix wrong integer types. 2004-12-10 Patrick Pélissier Optimize by increasing with BITS_PER_MP_LIMB instead of log2(prec) Clean up code (Fix integer types + rewrite some code). Optimize the code by reducing the number of used variables inside the loop. Replace mpfr_neg to MPFR_CHANGE_SIGN. Cosmetic changes. Clean the code. Avoid mixing integer types. Fix bug of overflow if Pi is in the range but not Pi/2. Clean up the code (Removing useless variables and avoid mixing wrong integer types). Optimize the code by improving memory allocation scheme and by incrementating by BITS_PER_MP_LIMB in case of an error instead of MPFR_INT_CEIL_LOG2 (prec). Fix an overflow bug for X=+/-1 (If PI is inside the exponent range, but not PI/2). 2004-12-09 Patrick Pélissier Simplify MPFR_SIGN by removing unnecessary ( ). Add support for new attribute sentinel in incoming GCC 4.0 Optimize initial precision in case of EXP(x) < 0. Optimize mpfr_set4. Inline rounding in mpfr_set4 and mpfr_cache mpfr_set4 doesn't return MPFR_EVEN_INEX (It was undocumented before). Fix problems with tests (Avoid mixing MPFR_EVEN_INEX and 1). Add MPFR_RNDRAW_EVEN for rounding with MPFR_EVEN_INEX inexact support 2004-12-08 Patrick Pélissier Optimize mpfr_mul by inlining and rewriting the rounding. It seems that GCC option `-frename-registers` for mpfr_mul / Athlon XP improves its performance (But it decreases it on Pentium4)... 2004-12-01 Paul Zimmermann first try to implement Mulders' algorithm 2004-11-29 Patrick Pélissier Update TODO. 2004-11-29 Paul Zimmermann added new tests for corner cases added algo for pi 2004-11-25 Patrick Pélissier Change initial term if exp(a)<0. Simplify the inner loop. Change initial precision if EXP(op) < 0. 2004-11-23 Patrick Pélissier Optimize code and rewrite the rounding part. FIXME: It seems that the previous rounding code was buggy. Still I am not sure. Improve tests. 2004-11-19 Patrick Pélissier Improve the initial value of prec: 10% improvement (?) on average. Improve coverage test. Fix bug for mpfr_ui_pow_ui (Wrong inexact flag). Improve coverage tests. Fix typos in INSTALL. Sort README.dev, and add a new section about How to write a MPFR function. Add a link to README.dev in mpfr-impl.h. Fix a bug on some compilators: First MPFR_SAVE_EXPO_DECL, then TMP_DECL. 2004-11-18 Patrick Pélissier Fix an overflow bug. Fix bug with inexact flag. FIXME: Maybe still a bug with inexact flag if overflow in mpfr_mul_2exp ? Remove mpfr_save_emin_emax and mpfr_restore_emin_emax from MPFR library since they are useless. Forget to remove rndraw.c test. Replace use of mpfr_save_emin_emax () / mpfr_restore_emin_emax() by MPFR_SAVE_EXPO macros (DECL, MARK and FREE) which are faster and thread safe. Enable fast computing. 2004-11-18 Vincent Lefèvre Fix: GMP -> MPFR Copying Conditions (noted by Patrick). 2004-11-18 Patrick Pélissier Reorder the file and put sections to make it cleaner and more readable. Reduce number of used variables. Optimize code and clean it. 2004-11-18 Vincent Lefèvre In HTML, suppress the non-existing link to GMP. 2004-11-18 Patrick Pélissier Add a prototype of own TMP_ALLOC. Don't know if it is a good idea. To enable it, just build MPFR with MPFR_USE_OWN_TMP_ALLOC. 2004-11-17 Patrick Pélissier Fix bug with TMP_MARK. 2004-11-16 Patrick Pélissier Optimize the code: + Special case for n == 2 + The first squaring is done using the original input. Add new assertion to check. Likely / Unlikely some tests. 2004-11-15 Patrick Pélissier Add unused code (Still needs a proof). Add macro version for small functions: mpfr_get_prec, mpfr_get_exp, mpfr_get_default_rounding_mode, mpfr_get_default_prec and mpfr_set_ui Refix another bug (The same). Fix a bug (Use __gmpfr_ceil_log2 instead of MPFR_INT_CEIL_LOG2). 2004-11-12 Paul Zimmermann added algorithm for mpfr_sqrt improved algorithm for mpfr_div use MPFR_SET_EXP/MPFR_GET_EXP instead of MPFR_EXP(r)++ 2004-11-12 Vincent Lefèvre Bug fix: delayed all the initializations after the singular test. 2004-11-11 Vincent Lefèvre Untabified the source. The test MPFR_GET_EXP(u) != MPFR_EMAX_MAX is no longer necessary since we decided to lower MPFR_EMAX_MAX to avoid such tests. 2004-11-10 Patrick Pélissier Remove use of CNST_LIMB and TMP_ALLOC_LIMB which are GMP internal. Add MPFR_LIMB_ZERO. 2004-11-10 Paul Zimmermann new simpler and faster code 2004-11-10 Patrick Pélissier Replace __gmpfr_ceil_log2 by MPFR_INT_CEIL_LOG2 when possible. Add __extension__ to avoid warning useless in GCC. 2004-11-03 Vincent Lefèvre Update. 2004-11-03 Patrick Pélissier Fix wrong Visual C++ code. 2004-11-02 Vincent Lefèvre Code checking for GMP library wasn't working (always returning "yes"?). 2004-10-27 Vincent Lefèvre Updated copyright line. Added a bug and updated copyright line. Update. Removed the definitions of DBL_POS_INF/DBL_NEG_INF/DBL_NAN for Visual C++ as they were incorrect. Modified DOUBLE_ISINF(x) so that infinities are no longer used (this should fix a part of the problem for Visual C++). If IEEE 754 is not supported, one should probably use the standard INFINITY macro instead of (1.0/0.0), since (1.0/0.0) is specific to IEEE 754. Applied patch by Steve M. Robbins for non-IRIX MIPS systems (originally for MPFR 2.0.3). 2004-10-26 Vincent Lefèvre Reformatted the code. Replaced mpfr_set_emin/emax by set_emin/emax in tests to check the return value; defined set_emin/emax in "tests/tests.c". Fix: added missing #include in "tests/tests.c". Removed variable names in prototypes in "mpfr-test.h". 2004-10-22 Vincent Lefèvre Reformatted the code -> GNU style. Update. 2004-10-22 Patrick Pélissier Declaration of "tests_rand_start" and "tests_rand_end" with the same storage class specifier in tests.c (static missing line 65 and 109). 2004-10-21 Vincent Lefèvre Bug fixed: cast to unsigned char instead of int for isspace (no, these are not "psycho" systems, just systems with signed chars). Untabified the source. 2004-10-20 Patrick Pélissier Improve ICC CFLAGS by removins meaningless warnings. Remove some warnings on some "psycho" systems. Update the chapter "Make a release". Fix bug when you build MPFR outside source directory. Add function src_fopen to open a file in the source directory, which may be different from the current directory. Fix a typo. 2004-10-19 Vincent Lefèvre Another correction (English). Minor correction. 2004-10-19 Patrick Pélissier Update NEWS to reflect the change in mpfr_set_str. Update mpfr_set_str to be much more like strtofr. Update the documentation to reflect the changes. 2004-10-19 Paul Zimmermann changed contributors section 2004-10-19 Patrick Pélissier Add a line about binary compatibility. 2004-10-19 Paul Zimmermann changed "contributors" section changed rights (remove executable permission) 2004-10-18 Vincent Lefèvre Misc corrections: + spelling mistakes + consistency: in direction @var{rnd} -> in the direction @var{rnd} + @code{NULL} pointer -> null pointer (as in the C standard) + in the example for mpfr_inits2 / mpfr_clears: NULL -> (void *) 0 as NULL isn't necessarily a pointer. 2004-10-18 Patrick Pélissier Update Change "unsigned int" to "int" for base in proto of strtofr. Change set_str to use strtofr (Fix a bug too). Limit base to 36 in strtofr (since get_str is limited to 36). Update documentation to reflect the changes. mpfr_get_d1 is moved to section internal in the documentation. Update the tests. Hard code NAN, +INF and -INF values for MVC. Fix problem on systems where "/dev/null" doesn't exist. 2004-10-16 Vincent Lefèvre Misc corrections. 2004-10-15 Vincent Lefèvre Updated the section "To make a release". Updated the version on the trunk. Update. Update for 2.1.0. 2004-10-13 Vincent Lefèvre Added a comment about autoreconf and a bug in Debian (now fixed). 2004-10-12 Patrick Pélissier Add a note about Windows 64. 2004-10-11 Patrick Pélissier Update documentation. Improve Windows installation. Add a line about "near" and "far". 2004-10-07 Patrick Pélissier Add support for ".lib" since it seems to work. Display GMP version inside the configure. 2004-10-05 Paul Zimmermann added one new test 2004-10-04 Vincent Lefèvre Added worst cases. 2004-10-02 Paul Zimmermann added new tests (worst-case) 2004-10-01 Paul Zimmermann added new worst-cases (directed rounding) added new function to implement (dilog) 2004-09-30 Paul Zimmermann fixed bug in get_str_aux when one extra digit 2004-09-30 Vincent Lefèvre Added functions mpfr_rint_round, mpfr_rint_trunc, mpfr_rint_ceil, mpfr_rint_floor. 2004-09-30 Patrick Pélissier Add new test (One failed). 2004-09-30 Vincent Lefèvre The cast to uintmax_t wasn't really useful, so I removed it. Added a comment. The real fix for sizeof(intmax_t) == sizeof(mp_limb_t). 2004-09-30 Patrick Pélissier Fix a bug if sizeof(intmax_t) == sizeof(mp_limb_t) 2004-09-29 Paul Zimmermann added worst-case 2004-09-29 Patrick Pélissier cmp(x,y) if x=NAN or y=NAN returns 0 and erange flag. Update documentation and NEWS to reflect new functions and functionality. Improve assertion. Add mpfr_clear_erangeflag and mpfr_erangeflag_p. Add test for theses two functions. mpfr_get_[s/u][i/j] have a deterministic behavior in case of OVERFLOW. (Return the MINIMUM or the MAXIMUM in the current type, and set ERANGE_flag). Add mpfr_uintmax_p and mpfr_intmax_p. Update INSTALL about C++ Update TODO and VERSION. Move mpfr_inits from mpfr-impl to mpfr.h. Add doc too. 2004-09-28 Patrick Pélissier Reindent the sources (again). Fix how to detect overflow so that it can be build with GCC -ftrapv option without any bugs (In the previous code, the overflow was detected afterwards, whereas, now, it is detected before). Fix also another real problem of overflow (Addition of two signed integers). Rename this variable again. Replace variable 'near' to 'the_real_near' since MSVC incorrectly recognize "far" and "near" as obsolete keywords (100% incorrect, and clearly MSVC fault but it doesn't cost many things to change the name). 2004-09-27 Patrick Pélissier Fix typo in the documentation about get_ functions. Retab the sources. 2004-09-27 Vincent Lefèvre Added mpfr_get_uj and mpfr_get_sj in the changes 2.0.3 -> 2.1.0. Added an item about the future MPFR_FLAGS_ERANGE flag. New functions mpfr_get_sj and mpfr_get_uj, with tests. 2004-09-27 Patrick Pélissier Remove MPFR_NEED_LONGLONG_H macro. 2004-09-26 Vincent Lefèvre Added a cast to avoid an integer overflow. 2004-09-24 Vincent Lefèvre Fixed integer overflow. Fixed bugs (like those in mpfr_get_ui). The standard autoreconf script should now be used instead of prepare. 2004-09-24 Paul Zimmermann forgot to check for 0 now use mpfr_rint() 2004-09-24 Patrick Pélissier Update doc of mpfr_get_str (Minimum space is 7). 2004-09-24 Paul Zimmermann fixed double-rounding bug in get_ui 2004-09-23 Patrick Pélissier Prevent from multiple inclusion. mpf_init inits to 0 rather than NAN. Fix some tiny problems. 2004-09-23 Paul Zimmermann added item on rounding to odd 2004-09-21 Patrick Pélissier Fix a bug in FreeBsd 5.20 / Alpha / Gcc 3.3.3. Not a MPFR bug, but add some code to avoid it. Reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=72024 Add a new test and clarify a comment. Update Assertion for pow2. 2004-09-20 Patrick Pélissier Update NEWS. Update TODO due to new function mpfr_strtofr Add ICC detection && support. Remove some potential warnings in the test files. Add mpfr_strtofr function. Add mpfr_strtofr test file. Add mpfr_strtofr documentation. Improve GMP.h vs libgmp.a version checking. 2004-09-17 Paul Zimmermann added one entry (new function 1/sqrt(x)) 2004-09-17 Patrick Pélissier Use LIBS instead of LDADD for libraries (GMP). Min GMP version is 4.1.0 now. 2004-09-16 Patrick Pélissier Add a check if both gmp.h and libgmp.a have the same version. Fix a typo. 2004-09-15 Patrick Pélissier Add a forgotten regression test "1.2.3" 2004-09-15 Vincent Lefèvre Update from the autotools-dev Debian package. Update. 2004-09-14 Patrick Pélissier Add 2 new macros for handling correctly overflow. 2004-09-13 Paul Zimmermann fixed bug (several '.' allowed in mantissa) 2004-09-03 Paul Zimmermann added notes for Windows 2004-09-02 Patrick Pélissier Add a line about Dynamic Version of MPFR. 2004-09-01 Paul Zimmermann added warnings about init functions (mpf wrt mpfr) 2004-08-31 Patrick Pélissier Update documentations. Rename mpz_set_fr to mpfr_get_z. Provide a conditionnal macro for mpz_set_fr. Add doc for mpfr_sqr. Fix month. 2004-08-26 Patrick Pélissier Add a new test to check overflow. 2004-08-24 Patrick Pélissier Try to retype correctly the functions (replace int by the correct type). Still some works to do. 2004-08-23 Patrick Pélissier Add description of what does MPFR_INT_CEIL_LOG2. Move __gmpfr_isqrt and __gmpfr_cuberoot to another file. Clean up the code of mpfr_exp_2: remove DEBUG condition to use TRACE, ASSERT and DUMP. Use MPFR_INT_CEIL_LOG2 instead of __gmpfr_ceil_log2. Improve a comment. Add MPFR_INT_CEIL_LOG2 macro and __gmpfr_int_ceil_log2 function (don't use function but macro). Fix 2 typos. 2004-08-19 Patrick Pélissier Fix a bug on 64-bits introduced due to huger MPFR_EMAX_MAX. Add new functions: mpfr_get_emin_min, mpfr_get_emax_max, mpfr_get_emin_max and mpfr_get_emax_min. Add documentation and explanation about potential portability problem when you mpfr_set_emin and mpfr_set_emax. 2004-07-28 Vincent Lefèvre Added mpfr-longlong.h to libmpfr_a_SOURCES so that it is distributed with make dist. Added mpfr-gmp.h to libmpfr_a_SOURCES so that it is distributed with make dist. 2004-07-26 Patrick Pélissier Add a new section. 2004-07-20 Patrick Pélissier Add function mpfr_sqr (TODO: Make doc) 2004-07-19 Patrick Pélissier Fix an unsigned/signed comparison. Improve the emulation of mpn_sqr_n and fix some typos. 2004-07-16 Patrick Pélissier Remove unused item "rnd_mode" in cache struct. Renamme mpfr_version to mpfr_get_version to be more GMP compatible. Add macro mpfr_version. Likely some tests. 2004-07-15 Patrick Pélissier Add a speciliation for set_si for GCC. 2004-07-09 Patrick Pélissier Try to optimize a few agm by rewriting a few the loop. Likely / Unlikely some tests using gcov. 2004-07-06 Patrick Pélissier Remove some unused code. Add MPFR_LMIB_PER_DOUBLE Add MPFR_DUMP Add MPFR_TRACE Likely some tests. Used static precision for the array of limb for double. Likely some tests / Other minor optimisations. Minor modifications. Unlikely a test so that it is faster when you call theses functions with the same dest and source which is the common case in MPFR. Likely a test to optimize when dest and src are the same (which is very likely inside MPFR). Likely a test (since cache should always work fine). 2004-06-28 Patrick Pélissier Add some likely, and use a static table instead of a dynamic one. 2004-06-16 Patrick Pélissier Unlikely some tests. 2004-06-10 Patrick Pélissier Likely / Unlikely the code. Respace some macro. Retab some lines. Optimize a bit. Fix an overflow bug. 2004-06-08 Paul Zimmermann fixed bug in mpfr_exp_3 (wrong assert) 2004-05-27 Patrick Pélissier Fix typos. Update doc. 2004-05-18 Paul Zimmermann fixed problem for x near from Pi/2 (the internal precision should take into account the cancellation) 2004-05-18 Patrick Pélissier Improve tests for sin. 2004-05-18 Paul Zimmermann mpfr_sin_sign() should use at least MPFR_GET_EXP() bits 2004-05-17 Patrick Pélissier Remove an item. 2004-05-12 Patrick Pélissier Add a potential test (Too slow). Simplify the code. 2004-05-11 Patrick Pélissier Remove a C++ comment. 2004-05-10 Patrick Pélissier Remove a forgotten "assertd" which isn't useful anymore. 2004-05-07 Patrick Pélissier Optimize cos. 2004-05-07 Paul Zimmermann improved initial value of working precision (did not take into account 2K lost bits for large arguments) 2004-05-06 Patrick Pélissier Fix overflow and add corresponding tests. Fix a bug in a formula. Optimize it a bit. Fix overflow problems. Fix overflow bug. 2004-05-05 Patrick Pélissier Remove the double vars. (Use fixed instead). Add a note about tanh. Fix a bug in cas of overflow in tanh. Optimize a few by reducing the # of used vars. Fix critical bugs due to different kind of overflow in cosh. Add MPFR_TMP_INIT_ABS macro. Optimize cosh a few by removing an unused intermedary var. Fix a critical bug in case of overflow. 2004-05-04 Patrick Pélissier Fix a critical bug in cos in case you have set the float range for the exponents. Optimize a few cos. Optimize the way of computing initial precision. Add a test to check an overflow in const_pi (called by log in case of emulation of the float type). Move to ASSERT mode some code. Push/Pop emin/emax so that an overflow can't occur in mpfr_set_z(x,pi,r) Add test too. Add some UNLIKELY to the while. Add some UNLIKELY to the tests. Fix an overflow bug in add1sp. 2004-04-29 Patrick Pélissier Fix a typo in AC_MY_LIBS. 2004-04-28 Patrick Pélissier Add mpfr_cmp as a real function, not only a macro. Add mpfr_set and mpfr_abs as real functions. 2004-04-27 Patrick Pélissier When using GCC, optimize certain common comparisons. 2004-04-27 Paul Zimmermann added one item 2004-04-27 Patrick Pélissier Minor Optimizations. Fix a bug (Use nextbeloz instead of sub_one_ulp). 2004-04-21 Patrick Pélissier Add option in configure: --disable-cache to disable the use of the cache for the const. Fix a typo. Add preliminary generic code to handle cached const. Move const_pi, const_log2 to use this generic cache, which fix bugs of the previous implementation. const_euler is now cached too. Fix a bug (If x = Nan, the new new precision wasn't set). Fix a typo bug. 2004-04-20 Patrick Pélissier Add new test about the cache: new bug to fix. Add forgotten file for mpfr_zero_p. Add mpfr_zero_p. Add macros for mpfr_inf_p, mpfr_nan_p and mpfr_zero_p. Add macro for mpfr_sgn. Update doc. Add new tests. Fix a bug in a proto. Fix a bug when both op are < 0 (It seems it was my fault). Add a test to check it. 2004-04-09 Patrick Pélissier Fix a bug (Remove useless function). 2004-04-08 Patrick Pélissier Fix another bug (Maybe the last?). Fix a tiny bug. Update memory allocations scheme without gmp-impl.h. Now the semantic of the memory allocation scheme is the same with and without gmp-impl, as it should be. 2004-04-07 Patrick Pélissier For add/sub_type functions where type is a type without signed zeros, specify the expected result when both operands are 0. Modify a few the allocation scheme without gmp-impl.h Add pseudo-constants __MPFR_EXP_NAN, __MPFR_EXP_ZERO and __MPFR_EXP_INF for future (?) inlining of some functions. 2004-04-07 Paul Zimmermann fixed problem when overflow in destination exponent happens 2004-04-07 Patrick Pélissier Fix a bug in case a mpz_t == 0 (mpz_sizeinbase(0Z,2)==0 and MPFR_PREC_MIN=2). Fix a bug in case of pow(2E1000000,-10); 2004-04-05 Paul Zimmermann fixed problem (cmpabs doesn't work for x=0) 2004-03-26 Patrick Pélissier Change from MP_LIMB_T_ONE to MPFR_LIMB_ONE and/or MPFR_LIMB_MASK. Improve comments. Fix a bug. Move detecting macros (__MPFR_GCC, __MPFR_STDC, __MPFR_GLIBC and __MPFR_GMP) from mpfr to mpfr-impl 2004-03-22 Paul Zimmermann removed blank 2004-03-22 Vincent Lefèvre Test write access to CVS. 2004-03-18 Patrick Pélissier Fix a bug in a string. 2004-03-17 Patrick Pélissier Add documentation of 'j' functions. Fix (?) definition of MPFR_PREC_MAX. Change the order of the tests. Rename mpfr_exp3 in mpfr_exp_3. Update THRESHOLD for mpfr_exp. Add MPFR_EXP_THRESHOLD. 2004-03-16 Patrick Pélissier Add new option "--with-gmp-build=" Update INSTALL Fix a bug (Forget to cast to mp_exp_t). Update comment Add mpz_set_fr function and its test. 2004-03-15 Patrick Pélissier Add new functions: mpfr_set_sj_2exp, mpfr_set_sj mpfr_set_uj_2exp, mpfr_set_uj Fix a compiler bug (limb !=0 instead of limb). Fix a cast problem on some systems (sizeof(mp_limb_t) > sizeof(unsigned long)). 2004-03-12 Patrick Pélissier Remove use of abort (They can create core dump on some systems). Fix bug of inexact flag for acos(0). Update. 2004-03-11 Patrick Pélissier Fix bug about forgotten MPFR_INVERT_RND. Add test too. Add doc about HAVE_STDINT_H 2004-03-10 Patrick Pélissier Fix doc about MPFR_DECL_INIT. Fix the declaration of 'MPFR_DECL_INIT' Add 'MPFR_DECL_INIT' macro. Rename NEAREST_AWAY in GMP_RNDNA. Add the description of mpfr_set_ui_2exp and mpfr_set_si_2exp. 2004-03-09 Patrick Pélissier Add mpfr_set_si_2exp and mpfr_set_ui_2exp and their tests. Add doc about mpfr_cmp_f function Add mpfr_cmp_f and its test. Add mpfr_cmp_ld and its test Add doc of 2 macros. Add mpfr_cmp_ui and mpfr_cmp_si as real functions (The macros are still defined and used). Add mpfr_add_si, mpfr_sub_si, mpfr_si_sub, mpfr_mul_si, mpfr_div_si and mpfr_si_div. Add the corresponding test. Add `mpfr_cmp_q` and `mpfr_cmp_z`. Clean up configure Add ASSERT for NAN. 2004-02-27 Patrick Pélissier Add documentation for MPFR_VERSION 2004-02-26 Patrick Pélissier Optimize a few mpfr_mul. Add Laurent Fousse in the AUTHORS file. 2004-02-26 Vincent Lefèvre Fixed a bug in check2b and added a test; add1.c coverage is now complete. 2004-02-25 Vincent Lefèvre Improved coverage. Improved coverage. Bugs fixed in a test function -> improved coverage. 2004-02-25 Patrick Pélissier Optimize mpfr_round_raw_? Simplify the code. 2004-02-24 Vincent Lefèvre Avoid integer overflow. Ported code clean-up to trunk. 2004-02-24 Patrick Pélissier Remove some warnings. MPFR can be compiled (but not checked!) with a C++ compiler. Improve test coverage. 2004-02-24 Paul Zimmermann further simplification of the code (replaced one in-place shift and copy by out-of-place shift or copy) 2004-02-23 Paul Zimmermann use GMP_RND_MAX instead of hard-coded constant simplified the code of div.c and improved coverage 2004-02-23 Patrick Pélissier Rename 'longlong.h' in 'mpfr-longlong.h' so that when MPFR is built within GMP it uses GMP's 'longlong.h' rather than MPFR's copy. 2004-02-23 Vincent Lefèvre Update. 2004-02-23 Patrick Pélissier Add mpfr_free_cache (2). Add mpfr_free_cache. Add mpfr_free_str function. Remove a warning. Reorder the declarations of the functions. Remove duplicate declarations. Remove mpfr_factorial. 2004-02-23 Paul Zimmermann patch from Guillaume Hanrot 2004-02-23 Patrick Pélissier Improve coverage tests. Fix 2 underflow bugs. Update comment Improve comments. Add a comment. 2004-02-22 Vincent Lefèvre Added tests. 2004-02-20 Laurent Fousse Changed mpfr_sum to use unsigned long instead of unsigned int. More tests. 2004-02-20 Patrick Pélissier mpfr_neg (b, b, r) for b=NAN didn't set NAN flag. mpfr_sgn is no longer a macro. 2004-02-19 Patrick Pélissier Fix bug with exact rationnal arguments (0.5+3/2 freezes). 2004-02-18 Vincent Lefèvre Update from the autotools-dev Debian package (2004-01-05). Fixed a bug in mpfr_set_f for 0 (wrong sign) and added the test. 2004-02-18 Patrick Pélissier Fix bug if you build MPFR with ASSERT. 2004-02-17 Patrick Pélissier Reduce the number of used variables. 2004-02-17 Paul Zimmermann improved again documentation simplified rounding improved documentation of *inexp 2004-02-17 Patrick Pélissier Simplify the random code. Optimize it a few. Add 2004 in copyright line. Add a section which describes the needed macros for building MPFR. 2004-02-17 Paul Zimmermann added comment about probability of normalized product 2004-02-17 Vincent Lefèvre Added a note about the ternary value, important in practice. 2004-02-17 Paul Zimmermann fixed 2 bugs and added test added comment about return value 2004-02-17 Patrick Pélissier Try so support GMP as a Shared Library. 2004-02-16 Paul Zimmermann improved error message 2004-02-16 Patrick Pélissier Fix the computing of the error for mpq_add and mpq_sub. 2004-02-16 Vincent Lefèvre Added more tests (improved tadd1.c coverage). 2004-02-16 Paul Zimmermann added cancellation test for add_q 2004-02-16 Vincent Lefèvre Added tests (improved tadd1.c coverage). 2004-02-16 Patrick Pélissier Fix bug of add_q and sub_q with special values (NAN, INF and ZERO). 2004-02-16 Paul Zimmermann deal with overflow/underflow in mpfr_div added hard-coded tests 2004-02-16 Vincent Lefèvre When the precisions are the same, test both mpfr_add1sp and mpfr_add1. Added overflow check. 2004-02-16 Patrick Pélissier Optimize add1sp, sub1sp and div. Improve coverage test for sub1sp. 2004-02-16 Vincent Lefèvre Removed unused label. Really reverted to rev. 1.54 + kept optimization + commented out is_odd_even. 2004-02-16 Paul Zimmermann take into account possible out-of-range exponent revert to rev 1.54 code for case x infinite (was less efficient but simpler) fixed bug with in-place computation 2004-02-16 Vincent Lefèvre Code clean-up and fix to avoid warnings. 2004-02-16 Paul Zimmermann changed back to C99 standard for special values of x^y added test for *function* mpfr_round check return value of fopen 2004-02-16 Vincent Lefèvre Removed the no longer used label "fin" and fixed the indentation. Fix: MPFR_NOT_ZERO -> MPFR_NOTZERO. Commented out the now useless "double uo, vo;". 2004-02-16 Paul Zimmermann improved coverage tests 2004-02-14 Paul Zimmermann new coverage tests improved coverage test 2004-02-13 Paul Zimmermann improved coverage test improved test coverage improved test coverage improved test coverage 2004-02-13 Patrick Pélissier Fix a bug in taddsp (Forget to check if random does not generate zero). 2004-02-13 Paul Zimmermann improved editing style improved test coverage partly rewritten, and improved test coverage 2004-02-13 Vincent Lefèvre Added tests for mpfr_mul_2si and mpfr_div_2si + corrections. Replaced mpfr_mul_2exp and mpfr_div_2exp by mpfr_mul_2ui and mpfr_div_2ui as the 2exp form is obsolete. 2004-02-13 Paul Zimmermann removed warnings 2004-02-13 Patrick Pélissier Add test for mpfr_cmpabs Add test for mpfr_fits_ Add test for internal dumping functions. Improve coverage test for exceptions / set / check. 2004-02-13 Paul Zimmermann improved coverage removed Kevin, added missing accent improved coverage test 2004-02-12 Patrick Pélissier Rewrite (simplify) mpfr_dump. Change its proto. Fix mpf_dump macro in mpf2mpfr. Remove MPFR_ASSERTN(0) and add MPFR_ASSERTD(last condition) instead. 2004-02-12 Paul Zimmermann improved coverage improved coverage improved cov. test improved cov. test improved coverage test improved coverage test improved test coverage 2004-02-12 Patrick Pélissier Improve coverage of const_pi and const_log2 (Test for prec > 20000). 2004-02-12 Paul Zimmermann fixed tiny bugs for corner cases improved test coverage 2004-02-12 Patrick Pélissier + Add mpfr_add1sp which provides addition when all the operands have the same precision. + Add new test files for mpfr_copysign and mpfr_min and mpfr_max. + Add test for mpfr_exp10 in tests/texp.c + Improve coverage of div_2ui.c and mul_2ui.c + Add a forgotten ASSERT in mpfr_sqrt 2004-02-12 Paul Zimmermann improved test coverage replaced mpfr_get_d1 by mpfr_get_si improved coverage test added new coverage test 2004-02-12 Patrick Pélissier Fix some mistakes. Add a description of the gcov tool. 2004-02-12 Paul Zimmermann now 100% of coverage of sub1.c new test file for mpfr_dim 2004-02-06 Patrick Pélissier Replace AS_HELP_STRING to AC_HELP_STRING (obsolete) Add forgotten copyright 2004 line. Add a small documentation about mpfr_sum. Added mpfr_sum function. + Better support of non IEEE doubles. + You can compile MPFR without gmp internal files (ie gmp-impl.h, gmp-mparam.h, and config.h). You only need gmp.h and libgmp.a. But you can still compile with GMP internal files (configure detects them). 2004-02-06 Vincent Lefèvre Update. Updated MPFR URL. Added the changes from version 2.0.1 to version 2.0.2. Added: "3) Update the NEWS file.". 2004-02-03 Paul Zimmermann fixed bug in get_str (case pow2, rnd=up or down) 2004-01-30 Paul Zimmermann fixed problem (s1 = s-1 inexact) fixed problem in gamma/factorial added new tests for agm and hypot (+ fixed bugs) 2004-01-29 Patrick Pélissier Add GMP_RND_MAX so that a for loop of the rounding modes looks like: for(int r = 0 ; r < GMP_RND_MAX ; r++) 2004-01-28 Patrick Pélissier Better supports of non IEEE-754 floats (don't use anymore ieee_double_extract if _GMP_IEEE is not set). 2004-01-28 Vincent Lefèvre Added comments and a temporary fix. 2004-01-27 Paul Zimmermann fixed bugs in atan cbrt erf added new hard-coded tests 2004-01-26 Paul Zimmermann removed argument reduction in sin(Pi*s/2) [delegated to mpfr_sin] print inputs of test2 in binary form commented out test for 0.8 (input is not exactly representable) 2004-01-26 Patrick Pélissier + Internal functions of zeta are now declared as static. + Add new tests which fail. 2004-01-22 Paul Zimmermann added several hard-coded tests (and fixed bugs found) 2004-01-20 Patrick Pélissier Fix tiny bug of Concept Index / Rounding Modes. Update minor things. 2004-01-20 Paul Zimmermann minor change in contributions added Patrick in the main contributors 2004-01-20 Vincent Lefèvre Fixed spelling mistake. 2004-01-20 Patrick Pélissier Reorder the documentation. 2004-01-19 Kevin Ryde # Add a remark to mpf_strto. # Drop my thought about addmul instead of fma. The latter takes a # separate destination and is hence not the same as what mpn and mpz # addmul do. 2004-01-19 Patrick Pélissier Update tests to remove the use of double when possible. Reenable the cmp between inexact flags. Add mpfr_get_default_rounding_mode. Add the tests for mpfr_get/set_default_rounding_mode. Fix mpfr_set_default_rounding_mode. 2004-01-19 Vincent Lefèvre _mpfr_ceil -> mpfr_ceil_double + check for overflow. Moved the mpfr_mpn_exp function to a new file "mpn_exp.c" as it is used by both "get_str.c" and "set_str.c". 2004-01-16 Patrick Pélissier Update it to remove the use of float/double. 2004-01-15 Patrick Pélissier Add a new check in tget_str.c. Add new macros. Readd stdio.h in case of DEBUG mode. Optimize a few sub1sp by removing the normalisation in case of exact rounding and by removing the calcul of the rounding mode in case of exact rounding. 2004-01-15 Paul Zimmermann fixed problem in case m=0 and b=2^k (lost bits from 1st digit were not taken into account) mpn_exp -> mpfr_mpn_exp 2004-01-15 Vincent Lefèvre Removed gammaPiAGMformula.c (old version, no longer used). 2004-01-14 Vincent Lefèvre Changed some error messages into assertions. Removed some useless #include's. 2004-01-14 Patrick Pélissier Continue to port tests so that they don't use double. 2004-01-09 Patrick Pélissier Update the tests to reduce the use of floats. Remove unused files mpfi.c and mpfi.h Update test. Don't use floats anymore. Add RND_RAND Add SIGN_RAND + Simplify the singular code. + Fix potential type errors. (Used mpfr_prec_t instead of mpfr_uexp_t). 2004-01-08 Patrick Pélissier + Add a new test file for checking functions mpfr_add/sub/mul/div_q/z (from gmp_op.c). + Fix bugs of mpfr_add/sub/mul/div_q/z. 2004-01-07 Vincent Lefèvre -0 -> @minus{}0. Specifications for mpfr_min and mpfr_max. Updated MPFR_INTPREC_MAX definition, as mpfr_prec_t has changed. 2004-01-07 Patrick Pélissier Add a new test between sub1 and sub1sp. Fix copyright line. 2004-01-07 Paul Zimmermann fixed wrong sign of inexact flag 2004-01-07 Vincent Lefèvre Added casts to size_t so that integers representing a size get this type as soon as possible. 2004-01-07 Patrick Pélissier Use MPFR_ASSERTN(0) instead of abort. Fix the definition of MPFR_PREC_MAX 2004-01-07 Paul Zimmermann added new test to check bug repair fixed bug (wrong inexact flag) for rounding to nearest when sh=0 and first trailing limbs coincide 2004-01-07 Patrick Pélissier Fix copyright lines (2004). Fix bug of sub1sp.c on sparck. Add new tests for sub1sp. Reenable sub1sp for mpfr_add / mpfr_sub. Change output format of mpfr_print_mant_binary. 2004-01-07 Vincent Lefèvre Clarified comment. 2004-01-06 Vincent Lefèvre Updated copyright line. Added mpfr_version function and test. The mpfr_print_rnd_mode return type is const char *, not char *. 2004-01-06 Patrick Pélissier Update the copyright line of the source files to 2004. Add the tests to check if 0 for signed class with unsigned 0 is set to 0+. 2004-01-05 Paul Zimmermann specified sign of zero in mpfr_set_* removed test using denorms 2003-12-22 Patrick Pélissier Disable sub1sp in add.c and in sub.c since it provides some bugs on spark (Log/acos/asin and atan tests failed but not tsub or tsub1sp). Change comment. + Rearrange the code to be more "compatible" with broken systems. + Preprocessing checks are done in init2.c since GMP constants can't be used in preprocessing #if. Use MPFR_UNSIGNED_MINUS_MODULO when needed. Explicit support for K&R C since ansi2knr can't be used. 2003-12-20 Kevin Ryde (tests_rand_start): Use gmp_randinit_default not the RANDS macro, to cope with new non-seeding MT setup by RANDS. 2003-12-19 Patrick Pélissier Support of MPFR_PREC_FORMAT. Fix a bug in case mp_prec_t = unsigned short. 2003-12-19 Vincent Lefèvre Update due to a change in mpfr.h. 2003-12-19 Patrick Pélissier + Modify Version to 2.1.0. + Add MPFR_VERSION_MAJOR, MPFR_VERSION_MINOR and MPFR_VERSION_PATCHLEVEL in mpfr.h + Add MPFR_VERSION_NUM and MPFR_VERSION to check Mpfr version. Remove one warning in mpf_compat.h Create a new macro: MPFR_RET_NEVER_GO_HERE Modify ui_sub/div to use it to make Insure++ happy. 2003-12-19 Paul Zimmermann updated mpfr_root entry 2003-12-19 Vincent Lefèvre Added update-version script to update the MPFR version. 2003-12-19 Paul Zimmermann removed one item, added one 2003-12-16 Paul Zimmermann removed unused target "tests" removed AC_DEFINE(hpux) [not used any more] 2003-12-15 Kevin Ryde (EXTRA_DIST): Add round_raw_generic.c. 2003-12-15 Patrick Pélissier + Optimize a few div.c + Remove some warnings in asin.c, atan.c. + Include limits.h before gmp-impl.h in mpfr-impl.h + mpfr-tests.h doesn't include anumore standard include files. + Test files include only standard includes and mpfr-tests.h. + Add some forgotten mpfr_clear in mpf[r]_compat. + Remove some warnings in the tests. 2003-12-15 Paul Zimmermann removed unused arguments removed AC_DEFINE(__STDC__) for OSF removed MISCFLAGS (not used any more) 2003-12-14 Kevin Ryde Quote AC_DEFUN names, for automake 1.8. 2003-12-10 Patrick Pélissier + Add a new test in case of underflow. + Fix bug in case of underflow for sub1 / sub1sp (mpfr_powerof2 could be called with invalid numbers). 2003-12-09 Patrick Pélissier + Fixed bugs of mpfr_print_mant_binary on 64 bits CPU (1L instead of 1). + Fixed bugs of mpfr_sub1sp on 64-bits CPU (mp_limb_t instead of int). + Add function mpfr_print_mantissa_binary, for debugging reason. + Rename MPFR_ALLOC_SIZE in MPFR_MALLOC_SIZE. + Add conditionnal -DSMALL directive in mpfr-impl.h. + Add new function: sub1sp. Subtraction in case of all the ops have the same prec. + Add its test (tsub1sp). + Modify a few the tests to avoid comparing mpfr results with double, for portability reason. 2003-12-05 Vincent Lefèvre Added mpfr_exp10 function. 2003-12-01 Patrick Pélissier Port all the IEEE dependent remaining functions so that it uses a generic way to compute the result if it detects that the double is not in IEEE format ( _GMP_IEEE_FLOATS == 0). MPFR now should work well on non-IEEE machines. 2003-12-01 Paul Zimmermann added suggestion for 2 new functions added entry (portability) 2003-11-25 Patrick Pélissier Optimize a few add1.c/sub1.c by using MPFR_LIKELY / MPFR_UNLIKELY. 2003-11-21 Patrick Pélissier Remove some warnings and potential errors (Comparison between signed and unsigned). + Add new internal function: mpfr_check. + Add the corresponding test file. + Translate mpfr_set_d to mpfr_set_str / mpfr_set_ui in the tests for portability reasons. 2003-11-21 Paul Zimmermann use integers instead of double's 2003-11-21 Vincent Lefèvre Notes about not using mpfr_set_d in the tests. 2003-11-19 Patrick Pélissier Optimization of mpfr_mul. Tiny optimization of mpfr_pow (The case y=0 has been put inside the MPFR_ARE_SINGULAR block). Tiny optimisation of mpfr_set_ui. 2003-11-18 Paul Zimmermann fixed bug in case exact result added new tests 2003-11-18 Patrick Pélissier Optimize round_raw_generic by reducing the number of redundant tests. 2003-11-17 Patrick Pélissier * Optimize a few div.c and mul.c. * Reorder the tests. * Remove mpfr_round_raw_generic and create 4 new functions which replace it, for efficiency reasons. * Add round_raw_generic.c which is the generic file to create the 4 new functions. * Add new MACRO: MPFR_RNDUTEST_OR_RNDDNOTTEST which is a faster way to check if (rnd_mode==GMP_RNDU && test) || (rnd_mode==GMP_RNDD && !test). * Add new MACRO: MPFR_UNSIGNED_MINUS_MODULO. * Optimize mpfr_can_round_raw. * Some new defines in mpfr.h to increase compatibility with MPFR v2.0.1 and above. 2003-11-14 Paul Zimmermann fixed bug in pow_si (exact result, case z = x) added test to check bug fix (bug was in mpfr_pow) added new test to check for bug fix (output precision > input precisions) just improved editing style fixed bug for output precision > max(input precisions) 2003-11-14 Vincent Lefèvre Ported the gcc-3.3 bug detection patch to the trunk. 2003-11-07 Patrick Pélissier Fix a stupid bug (diff_exp is not equal to the difference of prec) 2003-11-07 Vincent Lefèvre Initialize the exp field. 2003-11-07 Patrick Pélissier Some minor optimizations. Optimization of mul.c / sub1.c. Some clean up in the header files. 2003-11-05 Patrick Pélissier Fix some bugs (Use MPFR_ASSERT(1) instead of MPFR_ASSERT(0)) Optimize swap.c and copysign.c. Optimize mpfr_prec_round. Optimize mpfr_set (Case of both src & dest have the same precision). Start optimizing mpfr_sub1. Add a real function for mpfr_sgn (not a call to mpfr_cmp_ui_2exp). Add a test for mpfr_sgn. Change the proto of mpfr_add1 and mpfr_sub1 by removing the last arg. Simplify the logic of the sign in mpfr_sub1. Tiny speed up for cmp/set/sqrt. mpfr-impl auto include all the needed local header files (gmp, gmp-impl, mpfr). 2003-11-04 Vincent Lefèvre Merged the mpfr-2-0-2-branch pow_ui.c changes to the trunk. The check_inf test wasn't called. Added 2 missing mpfr_clear and \n. 2003-11-04 Patrick Pélissier + Remove MPFR_CLEAR_NAN and MPFR_CLEAR_INF. Only use MPFR_CLEAR_FLAGS. MPFR_SET_INF, MPFR_SET_ZERO and MPFR_SET_ZERO must clear the flags before setting them. + Add a new test in tacosh.c : check Inf / Nan flags. + Use MPFR_IS_SINGULAR in all the remaining files. + Fix the use of MPFR_CLEAR_FLAGS. + mpfr-impl.h auto include gmp.h, gmp-impl.h, mpfr.h and limits.h. + Rename _PROTO to _MPFR_PROTO, and remove _GMP_PROTO. + Add MPFR_INT_SIGN macro. + Encapsulate a few more the sign. 2003-10-30 Vincent Lefèvre MPFR_RET_NAN -> MPFR_RET(0). 2003-10-28 Patrick Pélissier Use of MPFR_UNLIKELY and MPFR_IS_SINGULAR for fast detection of special values (Nan, Inf or Zero). Start to encapsulate the sign to be independent of the representation (Must be 1 or -1). 2003-10-27 Patrick Pélissier Change the internal format of MPFR: ZERO, INF and NAN have special values of exp. Rename MPFR_ESIZE in MPFR_LIMB_SIZE. Rename MPFR_ABSZISE in MPFR_ALLOC_SIZE. Rename MPFR_INIT in MPFR_TMP_INIT (INIT1 too). "mpfr.h" includes if GMP isn't detected. Change the way of detecting stdio.h (To check). Use mpfr namespace for new definitions in "mpfr.h". 2003-10-27 Vincent Lefèvre Another fix, for acosh(-INF). Fixed exit status. 2003-10-21 Vincent Lefèvre Merged the mpfr-2-0-2-branch changes to the trunk. 2003-10-20 Vincent Lefèvre Merged the mpfr-2-0-2-branch changes to the trunk. 2003-10-17 Vincent Lefèvre Merged the mpfr-2-0-2-branch changes to the trunk. 2003-10-16 Vincent Lefèvre Update. Updated version on trunk. Update. Fixed several bugs. Added XDEBUG support (like in set_d.c). 2003-10-15 Vincent Lefèvre Replaced all non-ASCII characters by an equivalent 7-bit sequence to support unpatched texinfo.tex files. 2003-10-15 Paul Zimmermann removed #define DEBUG (turned on accidentally) 2003-10-15 Vincent Lefèvre Bug on the ternary value was fixed by Paul Zimmermann on 2003-10-14. 2003-10-14 Paul Zimmermann added preamble about ternary flag for special functions now uses #include "tgeneric.c" everywhere (and modified test_generic to check also the inexact flag) check_nan() is back removed old unused code fixed tests for x=0 removed composition tests (were already in-between #if 0 ... #endif) replaced mpfr_can_round (approx, err, rnd1, GMP_RNDN, prec) by mpfr_can_round (approx, err, rnd1, GMP_RNDZ, prec + 1) which in addition guarantees a correct inexact flag added new items (version number, rounding modes) added comment about --enable-alloca=debug 2003-10-13 Paul Zimmermann added section "Problems due to compiler bugs" change in can_round calls to get correct inexact flag for rounding to nearest 2003-10-10 Paul Zimmermann fixed bug in mpfr_pow found by Ming J. Tsai (overflow) 2003-10-08 Vincent Lefèvre Removed useless inclusion of standard headers and some #ifdef DEBUG code. Partial reindentation. Added a #include because size_t is used. 2003-10-07 Paul Zimmermann reduced test time reduced test time reduced test time 2003-10-06 Paul Zimmermann fixed comment of mpfr_round_raw_generic replaced ABSSIZE by ESIZE (ABSSIZE is the allocated size, and should be used only in functions init, set_prec, round_prec) fixed bug in allocation for in-place operation inexact flag should now be correct for directed rounding fixed a bug for mpfr_atan(-Inf) [gave +Pi/2 instead of -Pi/2] added test for atan(-Inf) use macros to avoid possible problem with float input new proposal for mpfr_can_round mpfr_mul_2exp/mpfr_div_2exp are not obsolete 2003-10-05 Vincent Lefèvre Clearer mpfr_eq documentation (thanks to Kevin Ryde for the remark). 2003-10-03 Vincent Lefèvre MPFR_ASSERTN rewritten to avoid "statement with no effect" warnings with gcc when the assertion is always true. Optimization (thanks to Patrick Pelissier), as the allocated size may be larger than the size used by the significant bits. Updated installation notes. Infinities are now accepted in mpfr_cmpabs. Updated its definition in the source (no longer sign(abs(b) - abs(c))). 2003-10-02 Vincent Lefèvre Use @url{} for URLs. As suggested by PZ: o documentation of mpfr_fits_* functions moved to the section on conversions; o grouped some mpfr_pow special cases; o explanation concerning the meaning of rnd in mpfr_frac. Updated documentation. In particular, mpfr_set_str_raw renamed as mpfr_set_str_binary. This function and mpfr_print_binary are now internal functions. mpfr_print_binary no longer prints the non-significant 0 bits. Updated the source to match the manual. mpfr_print_binary has been completely rewritten (now directly prints to stdout, without using an intermediate string). In mpfr_set_str_binary, replaced atol by strtol + error checking. 2003-10-02 Paul Zimmermann added paragraph on support/grants added help for mpfr_erf 2003-10-02 Vincent Lefèvre Make node titles match section titles, and updated menus and xrefs. Added a line break after @samp{uninstall}. 2003-10-01 Vincent Lefèvre Corrections in the MPFR manual (PZ & VL). Functions mpfr_const_pi, mpfr_const_log2 and mpfr_zeta now return a ternary value. Updated TODO file. 2003-09-30 Vincent Lefèvre Added a bug related to the ternary value and worst cases. Added exponent range support. Corrections up to Section 5.6 (PZ & VL). Re-added the assert on the exponent, but replacing MPFR_EMIN_MIN by MP_EXP_T_MIN (this makes more sense): an assertion failed would mean that the exponent is not representable (an undefined behavior in the ISO C standard). If need be, we could choose to return MP_EXP_T_MIN in such a case, or perhaps MP_EXP_T_MAX to signal an error. The mantissa would still be meaningful. 2003-09-30 Patrick Pélissier Update TODO & mpfr_set_prec. 2003-09-29 Vincent Lefèvre Corrections up to Section 4. Added authors Kevin Ryde and Patrick Pelissier. Removed "known problems" that are no longer problems. 2003-09-26 Vincent Lefèvre Removed bugs related to the tests and to the exponents as they no longer occur. Updated some potentials bugs. 2003-09-25 Vincent Lefèvre Removed mpfr_inits, mpfr_inits2, mpfr_clears from the documentation. Moved their prototypes to mpfr-impl.h (internal functions until decided otherwise). 2003-09-25 Patrick Pélissier Modify 'r' arg of GENERIC from int to long (min 32 bits). 2003-09-25 Vincent Lefèvre 8-bit ISO-8859-1 characters + consistent spelling. Update. Changed the remaining stderr to stdout. 2003-09-24 Vincent Lefèvre Changed some stderr to stdout. Added documentation for mpfr_greater_p, mpfr_greaterequal_p, mpfr_less_p, mpfr_lessequal_p, mpfr_lessgreater_p, mpfr_equal_p and mpfr_unordered_p. Added tests for mpfr_greater_p, mpfr_greaterequal_p, mpfr_less_p, mpfr_lessequal_p, mpfr_lessgreater_p, mpfr_equal_p, mpfr_unordered_p. Added a few more tests (involving mpfr_nexttoward). The tests for the mpfr_nextabove, mpfr_nextbelow and mpfr_nexttoward functions should now be sufficient. Added generic tests for mpfr_nextabove and mpfr_nextbelow. Fixed a bug in next.c related to assertion checks. Accept (case-insensitive) NaN and Inf in input for bases <= 16 for backward compatibility in these bases (for bases > 16, we cannot guaranty backward compatibility with the current wanted behavior). Added tests. 2003-09-24 Paul Zimmermann added one item from Kevin 2003-09-24 Vincent Lefèvre Added support for some top-bit-set characters in the .texi source. Added information on special values for mpfr_pow. 2003-09-24 Paul Zimmermann added MAKEINFOFLAGS = --enable-encoding to get 8-bit characters in mpfr.info used ISO-8859-1 in AUTHORS and @`e, @"o in mpfr.texi (waiting for code for ISO-8859-1 compatibility) 2003-09-24 Kevin Ryde (MPFR_C_LONG_DOUBLE_FORMAT): Remove conftest* temporary files. 2003-09-24 Vincent Lefèvre Fixed comparisons (cases @NaN@ and @Inf@). 2003-09-23 Paul Zimmermann two updates 2003-09-22 Vincent Lefèvre Updated mpfr_pow description. 2003-09-22 Paul Zimmermann changed __gmp_const into const in *.c [Torbjo"rn: Please use __gmp_const just in user header files, plain C const in other files.] 2003-09-22 Vincent Lefèvre Removed - allow the ISO C "P" exponent separator for base 16 in input functions (already done). 2003-09-22 Vincent Lefèvre Implemented the following: - use (LDBL_MAX/2)+(LDBL_MAX/4*LDBL_EPSILON) instead of loop in tset_ld to get largest power of 2 that fits in a long double Added some MPFR_ASSERTN and improved a comment. Avoid string literals longer than 509 characters (ISO C89 limit). (test_set_underflow, test_set_overflow): Cleaner fix (for pre-C99 compilers). 2003-09-22 Kevin Ryde (test_set_underflow, test_set_overflow): Use "static" on "r" to allow non-constant initializers. 2003-09-21 Kevin Ryde (Converting Floats): In mpfr_get_d_2exp, the rounding mode is given, it doesn't use the default mode. (Assigning Floats): In mpfr_set_str and mpfr_set_str_raw, show "const" not "__gmp_const". (Simultaneous Float Init & Assign): In mpfr_init_set_str, ditto. (Rounding Modes): Add blank line around @itemize. (Miscellaneous Float Functions): In mpfr_urandomb and mpfr_random, use @math and @le. 2003-09-20 Kevin Ryde (Assigning Floats): In mpfr_set_*, remove remarks about long being rounded (this should be clear already), about rounding of decimal double constants like 0.1 (too basic to appear here), (Converting Floats): In mpfr_get_d_2exp, remove remark about exp exceeding IEEE exponent range (should be clear already). 2003-09-19 Paul Zimmermann updated items: removed conversion from/to float (obsolete) got rid of dependency in mpfr_zeta mpfr_round_prec is now obsolete new function mpfr_prec_round replaces it 2003-09-18 Vincent Lefèvre Fix for C implementations with 16-bit int. 2003-09-18 Patrick Pélissier Optimization of macros MPFR_IS_INF, MPFR_IS_NAN and MPFR_IS_FP 2003-09-18 Vincent Lefèvre Removed a comment that should have been removed in revision 1.8. 2003-09-15 Paul Zimmermann No longer perform the pre-check for exactness when first division step was actually a complete division. This introduced way too much overhead. replaced test stream==0 by stream==NULL 2003-09-15 Vincent Lefèvre Fixed a bug in mpfr_can_round_raw and added other mpfr_can_round tests. Added a test to tests/tcan_round.c and assertions to round_prec.c. 2003-09-14 Vincent Lefèvre Fixed mpfr_set_overflow, added tests for mpfr_set_underflow and mpfr_set_overflow, and reverted exp.c. 2003-09-13 Paul Zimmermann overflow with round to zero was incorrect 2003-09-11 Vincent Lefèvre New functions mpfr_inits, mpfr_inits2 and mpfr_clears to initialize or free several floating-point numbers (written by Patrick Pélissier). 2003-09-09 Vincent Lefèvre Replaced malloc/free by __gmp_allocate_func/__gmp_free_func in mpfr_zeta_pos. zeta.c still uses math (libm) functions -> TODO: remove this dependence. Added a test that makes MPFR crash (coming from the mpfr_zeta crash). Case that crashes MPFR (coming from test_generic) -> function test1. Ended up by simplifying mpfr_ui_pow to fix it completely (with a call to mpfr_pow, in a way similar to other ui functions). There isn't significant differences with the old code anyway, and the case integer^integer wasn't optimized like in mpfr_pow. The test tui_pow now passes, but the test tzeta now fails! Code clean-up and reindented. Replaced a 8 by CHAR_BIT, as CHAR_BIT isn't necessarily equal to 8. The bug seems to occur on all machines. 2003-09-08 Vincent Lefèvre Added a test to reproduce a bug (to be fixed later) on all 64-bit machines. Added a cast (useful under Linux/alpha). 2003-09-01 Vincent Lefèvre Changes (Patrick Pelissier's suggestions): _ mpfr_print_rnd_mode now has __gmp_const char * return type; _ some corrections in mpfr.texi, documentencoding set. 2003-08-30 Kevin Ryde #Corrections to initial checkin. (EXTRA_libfrtests_a_SOURCES): Add amd64.asm. New file. Correction to: (MPFR_CONFIGS): Add amd64-*-* to x86 test objects. (tests_machine_prec_long_double): Add amd64 to the comments. (MPFR_CONFIGS): Add amd64-*-* to x86 test objects. (check_set_get): Improve error messages. (ld_trace): New function. (ldbl_max_struct): Use octal character constants, since hex is an ANSI-ism. 2003-08-07 Vincent Lefèvre Avoid a potential overflow. 2003-08-04 Paul Zimmermann fixed pb found by Damien Fisher 2003-07-24 Vincent Lefèvre If the exponent of the number is meaningless (src = NaN, inf or 0), 0 is stored in expptr (behavior similar to the ISO C frexp function). 2003-07-21 Paul Zimmermann added one item 2003-07-19 Kevin Ryde (check_PROGRAMS): Add tget_d_2exp.c. New file, partly derived from tget_d.c. (mpfr_get_d_2exp): Ensure 0.5 <= abs(ret) < 1.0 is respected when rounding away from zero. (d_trace): New function. (Converting Floats): mpfr_get_d_2exp stores to a long. (mpfr_get_d_2exp): Store exp in a long, same as mpz_get_d_2exp and mpf_get_d_2exp. 2003-07-15 Vincent Lefèvre Updated comment. 2003-07-08 Vincent Lefèvre Correction in a comment (patch by Torbjorn). 2003-07-01 Paul Zimmermann can_round returns 0 for NaN/Inf fixed Uninitialized memory read in mpfr_can_round (when b is NaN or Inf) 2003-06-30 Paul Zimmermann fixed array bound write (need 6+1 characters in s1 to represent -@inf@ + \0) 2003-06-28 Kevin Ryde Add "const" to IEEE byte sequence data. (tests_rand_end): Remove explicit __gmp_rands clearing, it's what RANDS_CLEAR does already. 2003-06-26 Kevin Ryde # Clarify nan/inf bits under efficiency. # Add mpfr_get_d3 ieee portability. # Add mpfr_random not wanted in mpf integration. 2003-06-26 Paul Zimmermann moved macros for [L]DBL_MANT_DIG in mpfr-impl.h 2003-06-25 Paul Zimmermann fixed several problems noticed by Kevin changed test for 2^1024, using LDBL_MAX_EXP 2003-06-25 Kevin Ryde # Add efficiency of separate flag bit operations. 2003-06-24 Kevin Ryde Remove file, no longer used. (libmpfr_a_SOURCES): Remove mpfr-math.h. (MPFR_DBL_INFP, MPFR_DBL_INFM, MPFR_DBL_NAN): Make private definitions based on IEEE byte sequences, in particular avoid HUGE_VAL from mpfr-math.h since that's not infinity on hppa1.1-hp-hpux10. Remove includes of mpfr-math.h, math.h and stddef.h. (check_inf_nan): New test. (MPFR_C_LONG_DOUBLE_FORMAT): Use octal char constants, '\xHH' is an ANSI-ism. 2003-06-24 Paul Zimmermann check 2^1024 only when sizeof(long double) > sizeof(double) correction to previous patch correction to previous patch: problem was that x and u can be 0, then MPFR_PREC() undefined 2003-06-24 Kevin Ryde (tests_start_mpfr): Make stdout and stderr unbuffered. (check_inexact): For pz, use at least MPFR_PREC_MIN since this is required by mpfr_set_prec. # Correction to: # (check_inexact): For pz, use at least MPFR_PREC_MIN # since this is required by mpfr_set_prec. (check_inexact): For pz, use at least MPFR_PREC_MIN since this is required by mpfr_set_prec. 2003-06-23 Kevin Ryde Remove mingw portability of random/rand48, no longer used. Remove __setfpucw, no longer used. Remove mpfr_integer_p, done. Remove gmp rand functions in test programs, done. Remove MPFR_CHECK_RANDOMIZE, done (as GMP_CHECK_RANDOMIZE). 2003-06-21 Vincent Lefèvre mpfr_random is deprecated. 2003-06-20 Paul Zimmermann changed since mpfr_random now can return 0 2003-06-20 Vincent Lefèvre The distribution should now be uniform (mpfr_random implemented by calling mpfr_urandomb). Take the current exponent range into account in mpfr_urandomb (which now returns an int). Bug fix. 2003-06-20 Paul Zimmermann moved _gmp_rands_initialized stuff from tests_end_mpfr() to tests_rand_end() reduced default number of tests improved style reduced default number of tests improved style 2003-06-19 Paul Zimmermann fixed bug in mpfr_exp2_aux2 (spe175.testdrive.hp.com) improved style added more information in case of failure removed randseed() stuff [obsolete now we use the GMP mechanism] added memory test mechanism added new test from Parks fixed allocation problem (forgot to clear) 2003-06-19 Vincent Lefèvre Removed drand48/lrand48/srand48 prototypes. 2003-06-18 Kevin Ryde Don't use mpz_get_d1, since a 53-bit double is not enough when long is 64-bits. Don't use mpz_get_d1, since a 53-bit double is not enough when long is 64-bits. 2003-06-13 Kevin Ryde Use autoconf recommended style for time.h with sys/time.h. (MPFR_CONFIGS): Require AC_HEADER_TIME, add AC_CHECK_HEADERS of sys/time.h. (MPFR_CONFIGS): Add AC_CHECK_FUNCS of gettimeofday. 2003-06-13 Paul Zimmermann moved disabled test to "special" code added reference to Higham improved error analysis on erf improved indentation 2003-06-12 Paul Zimmermann added support for random see (when env. variable GMP_CHECK_RANDOMIZE set) 2003-06-12 Vincent Lefèvre Replaced misc random functions by GMP ones. Added function randlimb(). Fixed a few bugs concerning special values, code simplified. 2003-06-12 Paul Zimmermann added error function 2003-06-11 Vincent Lefèvre Make x positive + some minor changes. New version written by Torbjorn Granlund. 2003-06-10 Paul Zimmermann updated formular for erf added url for Abramowitz & Stegun 2003-06-10 Vincent Lefèvre Added a comment concerning NO_MATH_DEFS. 2003-06-10 Paul Zimmermann made test faster reduced test time reduced time of test reduced time 2003-06-09 Kevin Ryde Patch by Torbjorn: use puts not putchar, to avoid GNUPro compiler bug. 2003-06-08 Kevin Ryde Disable "8093416094703476*2^(-1075)" because mips64 SGI cc doesn't seem to like the value (a denorm). Include before , to avoid problems with gcc 3.2 on hppa2.0w-hp-hpux11.11. (random): Remove prototype, since it conflicts with stdlib.h on osf4. 2003-05-28 Vincent Lefèvre Added prototypes of non-standard functions that weren't always defined. MPFR_EXP_CHECK is now defined when WANT_ASSERT is defined. 2003-05-26 Vincent Lefèvre The special case s = 1 is taken into account (the previous code seemed to work, but perhaps not for rigorous reasons). Added test for case s = 1. (mpfr_round_prec): Bug fixed (case zero wasn't taken into account) and 'assertion failed' avoided. Update related to MPFR_GET_EXP and MPFR_SET_EXP. MPFR_GET_EXP (r) -> exp. Function mpfr_swap rewritten using memcpy. Updates/optimizations related to MPFR_GET_EXP and MPFR_SET_EXP. Updates/optimizations related to MPFR_GET_EXP and MPFR_SET_EXP. 2003-05-23 Vincent Lefèvre Code clean-up. Assertion failed avoided. 2003-05-22 Vincent Lefèvre Update. Macros MPFR_EXP_INVALID (invalid exponent value) and MPFR_EXP_CHECK added. Code update to use MPFR_GET_EXP and MPFR_SET_EXP instead of MPFR_EXP to allow more bug detection related to special values. Macros MPFR_SET_NAN, MPFR_SET_INF, MPFR_SET_ZERO and MPFR_INIT set the exponent of the number to MPFR_EXP_INVALID if MPFR_EXP_CHECK is defined. Compile with -DMPFR_EXP_CHECK and make check to see the potential problems; currently, 40 of 76 tests fail. 2003-05-21 Vincent Lefèvre #include "gmp-impl.h" added. MPFR_ASSERTD: use MPFR_ASSERTN instead of ASSERT_ALWAYS so that it can be used as an expression. New macros MPFR_GET_EXP and MPFR_SET_EXP (they should almost completely replace MPFR_EXP). 2003-05-19 Paul Zimmermann added test 'special' fixed bug when n_bits larger than size*BITS_PER_MP_LIMB 2003-05-18 Vincent Lefèvre Bugs fixed (special cases). 2003-05-13 Paul Zimmermann removed dummy test tdump compatibility with mpf is done updated mpfr_cmp_d added mpfr_cmp_d in mpf2mpfr.h and mpfr.texi 2003-05-13 Guillaume Hanrot Added cmp_d.c, tcmp_d.c. Added cmp_d/tcmp_d. 2003-04-11 Paul Zimmermann moved test for NaN/Inf added Riemann Zeta function (contribution from Jean-Luc Re'my) 2003-04-08 Kevin Ryde Move macros down below @copying. Add @: after various abbreviations. 2003-04-01 Paul Zimmermann fixed pb with count_leading_zeros (n=0) added test for bug found by Franky Backeljauw fixed bug found by Franky 2003-03-28 Vincent Lefèvre Added some asserts. 2003-03-28 Paul Zimmermann fixed pb found by Will Galway (continued) 2003-03-28 Guillaume Hanrot Patches from W. Galway. 2003-03-28 Paul Zimmermann fixed reference to Plouffe/Bailey/Borwein formula 2003-03-27 Guillaume Hanrot Credits for the pi formula modified. 2003-03-26 Paul Zimmermann changed back "unsigned char *" to "char *" 2003-03-25 Paul Zimmermann char * -> const unsigned char * for mpfr_set_str, mpfr_set_str_raw, and mpfr_init_set_str 2003-03-24 Paul Zimmermann removed unused variable 2003-03-18 Paul Zimmermann fixed documentation bug in mpfr_log2 (exact results) changed new test in 'check4' style 2003-03-17 Vincent Lefèvre Update concerning underflow problems. 2003-03-17 Kevin Ryde (main): Comment out underflows(), until it works. Comment out an assert tickled for an f with exponent near MPFR_EMIN_MIN. 2003-03-16 Kevin Ryde (LONGDOUBLE_NAN_ACTION): New version for IEEE quad big endian, fixing HP cc. (WANT_LONGDOUBLE_VOLATILE): New define for when LONGDOUBLE_VOLATILE is wanted. (WANT_GMPFR_LONGDOUBLE_VOLATILE): New define for when __gmpfr_longdouble_volatile is wanted. Use WANT_GMPFR_LONGDOUBLE_VOLATILE. (MPFR_C_LONG_DOUBLE_FORMAT): Add IEEE quad big endian, check long double exists before testing. 2003-03-14 Vincent Lefèvre Added underflow test showing a bug in mpfr_pow. 2003-03-14 Paul Zimmermann fixed bug for x=1 2003-03-14 Vincent Lefèvre This wasn't a compiler bug; mpfr_pow is really buggy. Added some asserts to show that. The infinite loop concerning 1^0.5 was probably due to a bug in the compiler [cc (GCC) 3.2.3 20030309 (Debian prerelease)]: adding some printf's changes the values of the variables and the correct result is returned. 2003-03-13 Paul Zimmermann fixed sign problem in particular_cases() declared mpfr_ui_pow_is_exact as static gnu-style 2003-03-13 Vincent Lefèvre Removed some useless and inaccurate tests on NaN, infinities, zeros (as the behavior of mpfr_pow on such particular cases has changed); similar tests were added to "tests/tpow.c". Test of mpfr_pow: particular cases. Bugs. 2003-03-12 Vincent Lefèvre Special cases for mpfr_pow(). 2003-03-11 Paul Zimmermann when stream=NULL, use stdout (as indicated in the documentation) 2003-03-03 Vincent Lefèvre mpfr_sin_sign -> static. Useless declaration removed. Special cases for mpfr_pow: like Section F.9.4.4 of the ISO C99 standard. Prototype fixed. 2003-02-27 Vincent Lefèvre mpfr_set_str now accepts a binary exponent for base 16 (as defined by the ISO C99 standard). Comment concerning the installation of MPFR: done. New recommendation to install MPFR. 2003-02-24 Guillaume Hanrot Replaced NaN, Inf by @NaN@, @Inf@ [for bases > 24]. 2003-02-21 Paul Zimmermann added one test 2003-02-21 Vincent Lefèvre Fixed cast (though unnecessary). 2003-02-21 Paul Zimmermann added one test 2003-02-13 Paul Zimmermann added mpf_compat, mpfr_compat test files for mpf-mpfr compatibility added mpfr_init_set_str added "const" to char* arg. of mpfr_init_set_str added macros for new mpfr functions changed some old macros mpfr_isinteger -> mpfr_integer_p document new functions (fits_*, get_ui, get_si, get_d_2exp) added integer_p that was not documented mpfr_isinteger -> mpfr_integer_p new functions: mpfr_fits_*, mpfr_get_ui, mpfr_get_si, mpfr_get_d_2exp added mpfr_get_d_2exp new functions mpfr_fits_* and mpfr_get_ui/si new functions mpfr_fits_* and mpfr_get_[us]i 2003-01-27 Paul Zimmermann check for +/-0.0 after variable set to NaN 2003-01-25 Vincent Lefèvre Suppressed the underscores of AC_CHECK_LIBM in comments, otherwise aclocal 1.4-p6 includes libtool code in aclocal.m4 and this leads to compilation problems. 2003-01-25 Kevin Ryde (_MPFR_H_HAVE_FILE): Copy FILE define tests from gmp.h, adds Borland, Microsoft and Apple MPW. (libmpfr_a_SOURCES): Add volatile.c. New file. (Isnan_ld): New function based on LONGDOUBLE_NAN_ACTION, use it instead of LONGDOUBLE_ISNAN. (LONGDOUBLE_ISNAN): Remove. (LONGDOUBLE_ISNAN): Remove this, use LONGDOUBLE_NAN_ACTION instead. (LONGDOUBLE_NAN_ACTION): New macro. 2003-01-24 Kevin Ryde Allow "e" exponent in base<=10 not <10. Restrict "E" exponent to base<=10 too, since digits are not case sensitive. 2003-01-24 Vincent Lefèvre Prototypes: use static. Some code reformatting. The sign wasn't set when the result was zero. 2003-01-24 Kevin Ryde Reject "", "+" and "-", also fixing an attempt to allocate a 0 length block in these cases. Clear NAN and INF flags when setting result to zero. 2003-01-24 Vincent Lefèvre Fixed prototypes (use static...). Missing #include. 2003-01-23 Paul Zimmermann workaround for gcc bug on m68040-unknown-netbsd1.4.1 added cast to double 2003-01-23 Kevin Ryde Use mpfr_set_nan and mpfr_set_inf for NaN and Inf tests, not "double" nans and infs. 2003-01-22 Kevin Ryde Use mpfr_set_nan and mpfr_set_inf for NaN and Inf tests, not "double" nans and infs. Use mpfr_set_nan and mpfr_set_inf for NaN and Inf tests, not "double" nans and infs. Use tests_start_mpfr / tests_end_mpfr. Use tests_start_mpfr / tests_end_mpfr. Use tests_start_mpfr / tests_end_mpfr. (check_large): Use __gmp_free_func to free mpfr_get_str result. Use mpfr_set_nan and mpfr_set_inf for NaN and Inf tests, not "double" nans and infs. Use tests_start_mpfr / tests_end_mpfr. Use mpfr_set_nan and mpfr_set_inf for NaN and Inf tests, not "double" nans and infs. Remove tests involving "double" nans and infs, covered by check_nan. Use mpfr_set_nan and mpfr_set_inf for NaN and Inf tests, not "double" nans and infs. 2003-01-18 Kevin Ryde Move log_b2.h from include_HEADERS to libmpfr_a_SOURCES, it doesn't want to be installed. Correction to memory leak fix, need "result" for final rounding. 2003-01-17 Kevin Ryde Fix two memory leaks. (LDADD): Add $(MPFR_LIBM). Remove -lm setups, now handled by MPFR_CHECK_LIBM. (MPFR_CHECK_LIBM): New macro. (MPFR_CONFIGS): Use it. 2003-01-17 Paul Zimmermann added copyright notices and license statements now use __gmpfr_floor_log2 instead of floor/log to get rid of math.h removed unused function dagm(), and get rid of math.h added tests for NaN, Inf's 2003-01-17 Vincent Lefèvre Re-added $OBJEXT, using AC_REQUIRE([AC_OBJEXT]) for old autoconf. 2003-01-16 Paul Zimmermann put back math.h added back math.h (for sqrt) added log_b2.h in include_HEADERS added tsin_cos added #ifdef HAVE_DENORMS for denormalized test removed math.h added year 2003 in copyright line removed math.h added 2003, removed math.h added 2003 removed math.h added year 2003 removed math.h patch for compiler bug on hppa2.0w-hp-hpux11.11 2003-01-16 Vincent Lefèvre Macro LONGDOUBLE_ISNAN wasn't defined. 2003-01-16 Paul Zimmermann now always define Isnan moved LONGDOUBLE_ISNAN to mpfr-test.h removed check from isnan replaced isnan() by Isnan() 2003-01-16 Vincent Lefèvre AC_PREREQ(2.50) added (useful when both autoconf 2.13 and autoconf 2.50 are installed, with a wrapper to select the required version). Comment in mpfr_test_init: s/preprocessor/compiler/. 2003-01-16 Paul Zimmermann fixed pb in mpfr_test_init with the compiler optimizing too much (this happened on Alpha with -O1 or higher) 2003-01-15 Vincent Lefèvre Standard prototype only. Particular cases added. 2003-01-15 Paul Zimmermann moved common prototype for mpn_exp in mpfr-impl.h removed spurious ; after MPFR_ESIZE added prototype for mpn_exp removed items done new tests from Alain Delplanque new version using mpn_set_str [written by Alain Delplanque, edited by Paul Zimmermann] 2003-01-15 Vincent Lefèvre Replace $OBJEXT by o (as $OBJEXT isn't defined everywhere). A ` must be quoted to avoid an error with Autoconf 2.13. Use type mp_prec_t for precisions. Source re-indented. Several bugs fixed concerning the particular cases. and not included by default. int mpfr_gamma _PROTO ... removed (was useless). 2003-01-15 Paul Zimmermann get rid of ceil() call, that requires -lm 2003-01-14 Kevin Ryde Force LDBL_MANT_DIG on IEEE extended, to avoid problems with some i386 gcc. Avoid problems with bad LDBL_MAX and LDBL_MANT_DIG on some i386 gcc. (MPFR_C_LONG_DOUBLE_FORMAT): New macro. (MPFR_CONFIGS): Use it. 2003-01-11 Vincent Lefèvre Required casts added (and switch from uint to ulong); in particular, useful on Alpha. 2003-01-10 Kevin Ryde # Add a copyright year. Tolerate empty argv[1], which can arise from ancient bash executing the libtool shared library wrapper script. Tolerate empty argv[1], which can arise from ancient bash executing the libtool shared library wrapper script. Avoid unnecessary extra power of 2 squaring, so as not to provoke an overflow exception when result is in range. 2003-01-10 Vincent Lefèvre Extended precision detection fixed. 2003-01-09 Paul Zimmermann fixed possible overflow when EXP=1024 rewritten to avoid overflows added one test 2003-01-08 Kevin Ryde # Add a copyright year. #Add a copyright year. (mpn_exp): Don't store -1 in a uint then return it as a long. Fixes systems such as alpha where sizeof(uint)!=sizeof(long). (AC_CHECK_HEADERS): Remove fpu_control.h, no longer required. Use tests_machine_prec_long_double. Use LDBL_MAX for largest value and to find largest power of 2. (__setfpucw, _FPU_EXTENDED, etc): Remove these setups. (tests_machine_prec_double, tests_machine_prec_long_double, x86_fstcw, x86_fldcw): Add prototypes. (tests_machine_prec_double, tests_machine_prec_long_double): New functions. (mpfr_test_init): Replace __setfpucw with tests_machine_prec_double. (MPFR_CONFIGS): Add tests/x86.asm support. (X86_PATTERN): New define, supporting acinclude.m4. Add x86.asm support. New file. 2003-01-07 Paul Zimmermann fixed pb for underflow and rounding to nearest added macro LONGDOUBLE_ISNAN use LONGDOUBLE_ISNAN in set_ld instead of cast to double and DOUBLE_ISNAN (did raise exception under freebsd) 2003-01-07 Vincent Lefèvre Added assertions that can be resolved at compile time: the exponents must be representable in a long int (IMHO, this limitation should be avoided in a clean way). 2003-01-06 Kevin Ryde Remove mpfr_get_ld, done. Remove mpfr_set_machine_rnd_mode, done. 2003-01-06 Vincent Lefèvre Bug fix: __mpfr_emax -> __gmpfr_emax. 2003-01-06 Kevin Ryde Use separate function calls to second strncasecmp and strncmp for consistency and to avoid gcc warnings. 2003-01-06 Paul Zimmermann fixed infinite loop for 2^integer 2003-01-06 Vincent Lefèvre Use digit_value_in_base for the part after the '.'. Static function digit_value_in_base is now compatible with any locale. 2003-01-03 Kevin Ryde () [__mips]: Move from mpfr-test.h to tests/tests.c, and conditionalize with HAVE_SYS_FPU_H. (AC_CHECK_HEADERS): Add sys/fpu.h. (HAVE_DENORMS) [__mips]: Remove this, let the configure test decide. Use separate function calls to strncasecmp and strncmp, rather than ?: on function pointers, since the latter demands declarations not present on SunOS. Both forms are optimized the same by gcc. 2003-01-03 Vincent Lefèvre Added some potential bugs (mpfr_exp2 is known to have such a bug). 2003-01-02 Kevin Ryde Add gmp-impl.h for __gmp_free_func. 2002-12-16 Vincent Lefèvre Suppress some #define and fix symbol names (makes code cleaner): perl -pi -e 's/__mpfr_flags/__gmpfr_flags/g' **/*.{c,h} perl -pi -e 's/__mpfr_emin/__gmpfr_emin/g' **/*.{c,h} perl -pi -e 's/__mpfr_emax/__gmpfr_emax/g' **/*.{c,h} perl -pi -e 's/__mpfr_default_fp_bit_precision/__gmpfr_default_fp_bit_precision/g' **/*.{c,h} perl -pi -e 's/__gmp_default_rounding_mode/__gmpfr_default_rounding_mode/g' **/*.{c,h} perl -pi -e 's/__mpfr_const_log2_prec/__gmpfr_const_log2_prec/g' **/*.{c,h} perl -pi -e 's/__mpfr_const_pi_prec/__gmpfr_const_pi_prec/g' **/*.{c,h} perl -pi -e 's/_mpfr_ceil_log2/__gmpfr_ceil_log2/g' **/*.{c,h} perl -pi -e 's/_mpfr_floor_log2/__gmpfr_floor_log2/g' **/*.{c,h} perl -pi -e 's/_mpfr_ceil_exp2/__gmpfr_ceil_exp2/g' **/*.{c,h} perl -pi -e 's/_mpfr_isqrt/__gmpfr_isqrt/g' **/*.{c,h} perl -pi -e 's/_mpfr_cuberoot/__gmpfr_cuberoot/g' **/*.{c,h} perl -pi -e 's/^#define __gmpfr_.*\n//' *.h 2002-12-13 Vincent Lefèvre Update. IEEE 754 / IEEE P754 -> IEEE 754-1985. Correction. Added a note about the signed zero. Assertion re-added. Update for new version of automake/autoconf. depcomp script added for new version of automake. 2002-12-12 Kevin Ryde Don't -D define PACKAGE_VERSION etc, to avoid conflict with gmp config.h. 2002-12-12 Paul Zimmermann added paragraph about accuracy rewritten unclear paragraph about precision added one item use MPN_NORMALIZE_NOT_ZERO instead of loop 2002-12-11 Vincent Lefèvre Added #include "mpfr.h" (needed by mpfr-test.h as it uses mp_rnd_t in one of the prototypes). 2002-12-10 Vincent Lefèvre Patch by Torbjorn Granlund : Don't use TMP_ allocation mechanism for fixed size objects. Resulting streamlining. Misc addressing changes to work around GNUPro bugs. Patch by VL: Some other changes in mpfr_set_d. 2002-12-07 Vincent Lefèvre (mpfr_const_euler_S, mpfr_const_euler_R) Make declaration match prototype (patch by Torbjorn Granlund). 2002-12-04 Vincent Lefèvre Update from ftp://ftp.gnu.org/pub/gnu/config/ 2002-12-03 Paul Zimmermann Use @ifnottex/@end iffnotex instead of @ifinfo/@end ifinfo 2002-12-02 Vincent Lefèvre Fix rnd_mode.c (again). 2002-12-02 Paul Zimmermann put redefinitions of external symbols just before prototypes updated added new known bugs 2002-11-29 Kevin Ryde Add notes on mpf_t maintaining actual size for efficiency. Remove mpfr_set_machine_rnd_mode task. Tweak some math formatting for tex. (mpfr_set_machine_rnd_mode): Move prototype to mpfr-test.h. (libfrtests_a_SOURCES): Add rnd_mode.c. (libmpfr_a_SOURCES): Remove rnd_mode.c. Remove file, moved to tests directory. New file, moved from top-level directory. (Rounding Modes): Remove mpfr_set_machine_rnd_mode. Use GNU style code layout. Use GNU style code layout. 2002-11-29 Paul Zimmermann redefined external symbols in the __gmpfr namespace 2002-11-25 Paul Zimmermann added one fprintf in case of error 2002-11-25 Vincent Lefèvre mpfr_set_machine_rnd_mode fixed to compile on some architectures (e.g. ARM). Now returns an int. Bug fixed. 2002-11-25 Paul Zimmermann removed all tests that compare to libm changed to distinguish mpfr failures from libm failures added 3 tests that make libm fail under HP-PA 2002-11-23 Vincent Lefèvre Update. 2002-11-22 Paul Zimmermann forgot to remove debug statement fixed bug (infinite loop) for exact powers 2002-11-21 Kevin Ryde More on tuned thresholds, more on config.h etc, new section on mpf/mpfr integration. 2002-11-20 Vincent Lefèvre Code clean-up. 2002-11-20 Paul Zimmermann fixed some problems found by insure forgotten fclose() call fixed array bound write 2002-11-19 Paul Zimmermann fixed non-ansi features added explicit cast 2002-10-24 Paul Zimmermann added mpfr_cbrt 2002-10-20 Vincent Lefèvre Update. 2002-10-20 Paul Zimmermann fixed bug with wrong sign detection 2002-10-19 Vincent Lefèvre Some fixes to avoid overflows. 2002-10-19 Paul Zimmermann fixed bug for large arguments improved code for rounding to nearest fixed bug for EXP(x) > EMAX/2 modified description of hypot and cbrt 2002-10-18 Vincent Lefèvre Update. Added test showing bug in sign detection. Added newline. Bug in mpfr_hypot. Added test that makes mpfr_hypot fail. Precision Nt: int -> mp_prec_t. Added some tests. main () -> main (void). 2002-10-18 Paul Zimmermann added tcbrt.c, test file for mpfr_cbrt fixed overflow problem completely rewritten using mpz_root added cbrt 2002-10-17 Vincent Lefèvre C9X -> ISO/IEC 9899:1999 (ISO C99). Cases NaN and -0.0 taken into account. 2002-10-17 Paul Zimmermann added check for +0 and -0 added one test (2^1024) fixed bug when overflow for double type added mpfr_set_ld and mpfr_get_ld 2002-10-16 Vincent Lefèvre Fix for -0.0. 2002-10-16 Paul Zimmermann constants for mpfr_get_str and mpfr_set_str 2002-10-16 Vincent Lefèvre Obsolete comment removed. Removed log_b2.h as it doesn't seem to be necessary. 2002-10-16 Paul Zimmermann added prototype for mpfr_get_ld added mpfr_get_ld and tests for set_ld/get_ld added cast to long double 2002-10-16 Vincent Lefèvre Update (tset_ld). Test removed as the minimal precision for a long double is something like 10 decimal digits. Anyway, there are implementations for which long double = double = IEEE double precision. DBL_MANT_DIG and LDBL_MANT_DIG are normally defined by . 2002-10-15 Paul Zimmermann added mpfr_set_ld and test file 2002-10-13 Vincent Lefèvre Bug in mpfr_sin (and perhaps other functions): error analysis. Bug fixed (found by Dmitrii Baksheyev): atan(1) cannot be exact. 2002-10-08 Kevin Ryde Remove mpfr_get_str using mpn_get_str (done). Remove no grepping for __setfpucw, done (near enough). New thread-safety section, add const_pi and const_log2 caching. New portability section, add mingw random and _mpfr_ceil_log2 IEEE-ism. (AC_MY_LIBS): Show the filename in the error message. 2002-10-04 Paul Zimmermann mpfr_get_default_prec was missing (thanks to F. Morain) 2002-09-30 Vincent Lefèvre Removed get_str.c bug, as the mpfr_get_str function has completely been rewritten. 2002-09-26 Paul Zimmermann fixed wrong inexact flag for a - b where a and b are of different signs and EXP(a) < EXP(b) added test for inexact flag (bug found by Andreas Enge) 2002-09-23 Kevin Ryde (mpfr_init, mpfr_init2, mpfr_set_prec): Make void return, these always succeed. 2002-09-23 Paul Zimmermann fixed various tiny problems added more tests for mpfr_urandomb, and for small precision fixed bugs in mpfr_random2 (wrong exponent, invalid numbers) added checks for mpfr_random2 cmp_abs -> cmpabs (for compatibility with mpz) 2002-09-21 Kevin Ryde (Converting Floats): Don't refer to the internal _mp_free_func with mpfr_get_str. (Special Functions, Internals): Make these into nodes. 2002-09-20 Paul Zimmermann now accept uppercase letters too added test for uppercase letters 2002-09-18 Paul Zimmermann now mpfr_agm returns an int (inexact flag) 2002-09-13 Vincent Lefèvre Some more information. 2002-09-12 Vincent Lefèvre On HP-UX, use the +allowunsats switch for ld, otherwise ld complains that some GMP symbols are unsatisfied. 2002-09-12 Paul Zimmermann fixed bug in reflection formula for x<1 2002-08-23 Vincent Lefèvre MPFR now needs GMP 4.1 or higher. 2002-08-22 Kevin Ryde (__mpfr_nan): Clarify comments about HP C and alpha. (_MPFR_NAN_BYTES, _MPFR_INFP_BYTES, _MPFR_INFM_BYTES): Use HAVE_DOUBLE_IEEE_LITTLE_ENDIAN etc to select endianness, not a big block of #ifdefs. 2002-08-12 Vincent Lefèvre strcasecmp.c -> strcasecmp.c & strncasecmp.c 2002-08-07 Kevin Ryde Use $(top_builddir) consistently with libmpfr.a, for the benefit of srcdir!=builddir. 2002-08-02 Vincent Lefèvre Don't touch user specified flags (CFLAGS). [patch by Kevin Ryde] 2002-07-30 Vincent Lefèvre Better check for strcasecmp and strncasecmp. Bug fixed. 2002-07-28 Vincent Lefèvre Functions mpfr_greater_p, mpfr_greaterequal_p, mpfr_less_p, mpfr_lessequal_p, mpfr_lessgreater_p, mpfr_equal_p, mpfr_unordered_p. Use AUTOMAKE_OPTIONS = gnu [suggested by Kevin Ryde] check target -> TESTS = $(check_PROGRAMS) [suggested by Kevin Ryde] strcasecmp and strncasecmp -> mpfr_strcasecmp and mpfr_strncasecmp if they are provided by MPFR. TMP_MARK missing (patch by Kevin Ryde). 2002-07-26 Vincent Lefèvre Update. Update (mainly concerning CVS use). Prototype of mpfr_setmax and mpfr_setmin changed (exponent given). In mpfr_exp for x ~= 0, add_one_ulp and sub_one_ulp are no longer used (sub_one_ulp was incorrect). These cases should now be faster. Small fix in mpfr_nextabove, mpfr_nextbelow and mpfr_nexttoward. New internal functions mpfr_setmin and mpfr_setmax. New functions mpfr_nextabove, mpfr_nextbelow, mpfr_nexttoward. Small fix in mpfr_sub_one_ulp. 2002-07-26 Paul Zimmermann improved the computation of g = ceil((e-1)/log_2(beta)), using two tables 2002-07-25 Vincent Lefèvre Function mpfr_check_range now propagates the inexact ternary value. Function mpfr_restore_emin_emax OR's the saved flags with the current flags, as this is more useful in general. Macro MPFR_RESTORE_RET removed (no longer useful). 2002-07-24 Vincent Lefèvre Change concerning an assertion, due to GMP limitation. 2002-07-24 Paul Zimmermann gnu indentation reduce range of tests (did take too much time) added plenty of new cases, now covers all lines of get_str.c updated documentation of mpfr_get_str completely new version, written by Alain Delplanque and Paul Zimmermann. It now directly uses mpn_get_str, with subquadratic complexity. About 3 times faster than previous version in most cases. 2002-07-24 Vincent Lefèvre Bug fixed: unsigned int variables changed to int to avoid operations with mixed signed/unsigned variables and unwanted casts. Function mpfr_frac and tests added. Bug fixed (0 was forgotten). Optimization: mpfr_trunc no longer used! mpfr_isinteger extended to non-fp numbers and to zero. Simpler test. 2002-07-23 Vincent Lefèvre Re-adding mul.c with fixed permissions. Temporarily removing mul.c in order to try to fix its permissions. Function mpfr_check_range improved in the underflow case. 2002-07-22 Vincent Lefèvre Update. 2002-07-22 Paul Zimmermann now dump in base 2 forgot one free() call 2002-07-22 Vincent Lefèvre mpfr_pow bug removed. Reindentation. pow.c: bug fixed (in the call to mpfr_can_round). tpow.c: mpfr_clear added. Modified the two tests to make the bug appear. 2002-07-22 Paul Zimmermann added two tests 2002-07-19 Vincent Lefèvre Updated note concerning rcs2log. Line mpfr_get_exp / mpfr_set_exp removed. 2002-07-16 Paul Zimmermann added function check_large 2002-07-15 Vincent Lefèvre Update from ftp://ftp.gnu.org/pub/gnu/config/ 2002-07-14 Vincent Lefèvre Add __sparc__ (patch by Nix ). Note about randomized tests. 2002-07-04 Vincent Lefèvre Bug concerning the rounding of pow(). mpfr_pow() didn't work when the exponent was a negative integer. mpfr_get_z_exp() didn't work when the MPFR number was negative. New functions mpfr_get_exp and mpfr_set_exp. 2002-06-27 Paul Zimmermann removed duplicated entry (thread-safe) added new items added special cases added one reference (nocite) added one reference fixed bug in return value new additions added pointer to mpfr_inp_str in mpfr_set_str 2002-06-26 Vincent Lefèvre Update. MP_LIMB_T_HIGHBIT -> MPFR_LIMB_HIGHBIT. MPFR is now compatible with GMP 4.1. 2002-06-15 Vincent Lefèvre Added: make MPFR thread-safe. 2002-06-14 Paul Zimmermann fixed bug found by Gerardo Ballabio added one test (bug in mpfr-2.0.1 found by Gerardo Ballabio) 2002-06-13 Paul Zimmermann added mpfr_modf 2002-06-12 Vincent Lefèvre Added modf (to implement). 2002-06-08 Vincent Lefèvre check: Apply a hack to the parameter order to make sparc gcc 2.95.2 happy (patch by Kevin Ryde) + static added. Patch by Kevin Ryde. Suppress tests if sqrt is not affected by mpfr_set_machine_rnd_mode (patch by Kevin Ryde). Update. fdl.texi added. Patch by Kevin Ryde (and Vincent Lefevre). mpfr.texi: Change license to FDL, use @copying per texinfo 4.2. Use @dircategory, @direntry, @documentdescription. Move @contents to start of file. (VERSION, UPDATED): New variables. (m, GMPtimes, times): New macros. (Float Arithmetic): Fix html output. Reported by Richard Dawe. (GNU Free Documentation License): New appendix. 2002-06-06 Vincent Lefèvre Use gmp-impl.h to get MPFR_HAVE_FESETROUND (reported by Kevin Ryde). 2002-06-05 Paul Zimmermann patch for mpfr.texi patch from Richard Dawe to generate HTML added mpfr_gamma in libmpfr 2002-06-05 Vincent Lefèvre Check for isnan. 2002-05-29 Vincent Lefèvre Bug fixed (possible integer overflow). Bug fixed (possible integer overflow). Bug fixed (possible integer overflow). Note added for mpfr_check_range. Bug fixed. Sign wasn't set (reported by Dmitrii Baksheyev). Types fixed and code clean-up. Types fixed and code clean-up. 2002-05-27 Vincent Lefèvre Patch by Kevin Ryde for memory leak checking + misc declaration fixes. Code moved from mpfr-test.h to tests.c. 2002-05-14 Vincent Lefèvre Ternary flag for mpfr_agm. Copyright line updated. 2002-05-14 Paul Zimmermann ternary flag for mpfr_agm? update wrt mpfr_set_machine_rnd_mode added mathematical description of arithmetico-geometric mean 2002-05-08 Vincent Lefèvre The problem on a G4 PowerPC was a bug in gcc; this is now tested in configure (float-conversion bug) and -ffloat-store is used if need be. 2002-05-06 Vincent Lefèvre Problem on the G4 PowerPC. 2002-04-30 Paul Zimmermann fixed problem (infinite loop) in mpfr_pow for exact powers fixed errors found by Sylvain Pion 2002-04-27 Vincent Lefèvre not relevant -> undefined. Some changes concerning the internals and zeros (including remarks by Kevin Ryde). 2002-04-25 Vincent Lefèvre Check if HUGE_VAL is supported. Changes in mpfr_set_str. 2002-04-25 Paul Zimmermann update mpfr_set_str doesn't require any more a final '\0' and return the number of characters read modified tests for special values 2002-04-24 Vincent Lefèvre Description updated. mpfr_cmp_abs no longer an internal function and described in mpfr.texi. In mpfr.texi, a @var{} was forgotten. mpfr_cmp_abs can now be called on zero numbers. Structures are used to get correct alignment. 2002-04-23 Vincent Lefèvre _MPFR_INF*_BYTES fix. On alpha, use a "double" for the bytes, to avoid a mis-conversion on alpha gcc 3.0.2. (Kevin Ryde) Underflow semantics changed (not tested). Code simplified due to change in the maximum exponent range. 2002-04-23 Paul Zimmermann modifs from Andreas 2002-04-22 Vincent Lefèvre Union -> array + cast because of the HP compiler. 2002-04-20 Vincent Lefèvre Avoid constant floating expression, as this doesn't give the correct result with gcc on some Alpha machines. (patch by Paul Zimmermann) 2002-04-19 Vincent Lefèvre RAND_MAX defined if not already defined (as it should be). Include config.h, for the benefit of test programs not using gmp-impl.h (Kevin Ryde). 2002-04-19 Paul Zimmermann added tests in mpfr_test_init for denorms and extended precision mpfr_init and mpfr_init2 now return an int 2002-04-19 Vincent Lefèvre Exponent range saved/restored. Returns NaN when the numerator or the denominator is too large for MPFR. Added some assertions (any unsigned long must be representable in a mp_limb_t). SAFE_ABS changed so that it can be used for any unsigned type. 2002-04-18 Vincent Lefèvre Added code to prevent possible integer overflow when the input number is very large. New values for exponent range. 2002-04-18 Paul Zimmermann call get_d with rounding mode in check2, to avoid problems near +Inf 2147483647 -> INT_MAX improved ulp() to deal with infinities and fixed tadd/check2 to deal with infinities 2002-04-17 Paul Zimmermann improved documentation of mpfr_set_precset_prec. 2002-04-16 Paul Zimmermann fixed documentation of cosh/sinh/tanh 2002-04-16 Vincent Lefèvre mpfr_cmp_ui_2exp and mpfr_cmp_si_2exp rewritten. Prototype changed. Use AC_CANONICAL_HOST and $host instead of $OS_TYPE and $MACHTYPE (patch suggested by Kevin Ryde). Added files from ftp.gnu.org for automake and AC_CANONICAL_HOST. 2002-04-15 Paul Zimmermann replaced 2.2e-307 by DBL_MIN 2002-04-15 Vincent Lefèvre Typo: Gnu -> GNU. Update for future 2.0.2. Update for mpfr 2.0.1. Back to version 2.0.1, updated documentation. Post-release commit. Update for mpfr 2.0.1. mpfr_cmp_ui_2exp and mpfr_cmp_si_2exp can no longer be called with a NaN. Misc bugs fixed. 2002-04-15 Paul Zimmermann added main changes in version 2.0.1 2002-04-15 Vincent Lefèvre Update for "make dist". COPYING -> COPYING.LIB and GPL re-added. Update. Removed switches -g -O2 as already done by configure. 2002-04-14 Vincent Lefèvre Update. Removed useless @iftex... Update. When q = 0, +0 is returned. 2002-04-13 Vincent Lefèvre Update for the next pre-release. Support for NaN and Inf (case insensitive) in mpfr_set_str. Tests. Bug fixed. Update for the next pre-release. Misc changes. Use of AC_CACHE_CHECK. 2002-04-12 Vincent Lefèvre Code clean-up. Update for the next pre-release. New tests. mpfr_get_d* fixed. Types fixed in const_log2.c (this fixes the tconst_log2 crash). Added a note about the native SunOS 4 C compiler. 2002-04-11 Vincent Lefèvre Type fixed. mpfr_set_d bug fixed, but other bugs still remain... NULL was undeclared on some architectures (reported by Torbjorn Granlund). #include ordering changed for Windows + Cygwin 32. LDFLAGS changed on HP-UX. Update for the next pre-release. Subnormal test in different rounding modes + fix. Function MPFR_CONFIGS. Tests added. get_d.c partly rewritten (Paul Zimmermann). #include ordering fixed. Check for gcc float-conversion bug. 2002-04-10 Vincent Lefèvre Added comment for mpfr_round_raw_generic (about using 1-bit precision). Update (thanks to Nathalie Revol). Update for the next pre-release. HAVE_FESETROUND renamed to MPFR_HAVE_FESETROUND to avoid possible name conflict. Added missing headers in libmpfr_a_SOURCES. 2002-04-09 Vincent Lefèvre Update for the next pre-release. Possible tconst_log2 crash under Solaris. Under OSF, use option -ffloat-store only when the compiler is gcc. include_HEADERS should contain only mpfr.h and mpf2mpfr.h. Added code to support fesetround under Solaris. "In case of problem" update. Old URL removed. Renaming: DIR -> GMPINSTALL, GMPDIR -> GMPBUILD. Bug on IRIX updated. Removed note about stack-alloc.h. Check for fenv.h -> check for fesetround. Added note concerning patch submission. 2002-04-08 Vincent Lefèvre Note about overflows. Functions mpfr_{div,mul}_{si,ui} described. 2002-04-07 Vincent Lefèvre Update for the next (and last?) pre-release. Stricter test for HAVE_INFS. Update. Added note about IRIX. Update for the next pre-release. mpfr_get_d -> mpfr_get_d1 and mpfr_get_d2 -> mpfr_get_d. 2002-04-06 Vincent Lefèvre Update for the next pre-release. Update. 2002-04-05 Vincent Lefèvre New file from Paul. COPYING.LIB removed. COPYING.LIB -> COPYING. README.dev added. 2002-04-05 Paul Zimmermann put back label removed by error removed _FPU_RC_NEAREST ... for x86 (not used any more, now use fenv.h) removed nested TMP_MARK's (problems when configuring gmp with --disable-alloca) fixed pb with two markers (with --disable-alloca) 2002-04-05 Vincent Lefèvre Removed (not used). 2002-04-05 Paul Zimmermann use AC_CHECK_HEADERS to check for fenv.h and AC_CHECK_FUNCS to check for lrand48 2002-04-04 Vincent Lefèvre Added "VERSION" and "prepare" descriptions. 2002-04-04 Paul Zimmermann fixed bugs found by Nathalie 2002-04-04 Vincent Lefèvre Update for the next pre-release. Removed check for extended precision, as no longer used. 2002-04-04 Paul Zimmermann added check for denormalized numbers added new functions to implement 2002-04-03 Vincent Lefèvre Update for the next pre-release. -ffloat-store is a gcc option. Added 4th argument to AC_TRY_RUN. Re-fix. 2002-04-03 Paul Zimmermann added check for fpu_control.h added missing cast to double 2002-04-02 Vincent Lefèvre [ ] used around error message. Update. Check BITS_PER_MP_LIMB and BYTES_PER_MP_LIMB. sqrtrem.c removed. New ChangeLog file (generated by rcs2log). Suppress PACKAGE and VERSION definitions for the compiler. 2002-04-01 Paul Zimmermann old file 2002-03-31 Paul Zimmermann more "internal" changes suggested by Vincent added suggestions from Kevin in "internals" 2002-03-28 Paul Zimmermann added test for denorms on a 32-bit machine, denormalized numbers with high 32 bits to 0 were flushed to zero 2002-03-27 Paul Zimmermann sign of sin(-1) was not set added check for asin(-1) added one test previous fix was completely wrong fixed pb in cmp_si when i = -2^31 (then beware that -1 * i < 0 !!!) added check for underflow 2002-03-26 Paul Zimmermann - use mpfr_test_init to initialize hardware floats - use #ifdef HAVE_INFS when using DBL_NAN, ... - fixed some problems with wrongly converted f-p values (esp. under IRIX) use AC_TRY_CPP instead of AC_TRY_RUN for fenv.h (otherwise fails on Itanium) added function mpfr_test_init to initialize full IEEE behaviour put back simple algorithm that computes x*y exactly and then directly calls mpfr_add, to avoid wrong inexact flags added 2002 in copyright line fixed problem on x86 (set precision to double to avoid double rounding) added check for valid 1/0, denormalized, and extended precision 2002-03-26 Vincent Lefèvre New-style comment removed. 2002-03-26 Paul Zimmermann added a description of the mpfr_t type in "Internals" 2002-03-26 Vincent Lefèvre #include removed. Redefined macros ABS removed. Patch by Kevin Ryde + misc fixes. 2002-03-25 Paul Zimmermann replaced getpid() by time(NULL) MPFR_SIZE and sign were incorrectly set [thanks Kevin] added check_nan (from Kevin) fixed bug for sqrt(-0) found by Kevin [NaN flag not cleared] 2002-03-22 Vincent Lefèvre Error message now copes with extended precision. 2002-03-22 Paul Zimmermann added test in configure for checking rand48 functions (HAVE_RAND48) and fenv.h (HAVE_FENV) added mpfr_set_machine_rnd_mode (if fenv.h exists) replaced TEST by HAVE_FENV 2002-03-22 Vincent Lefèvre Missing #include. MPFR_RETNAN shouldn't be used as no value is returned. Regarde 0 as positive rather than negative (though it's better not to use it). Memory leak (patch by Kevin Ryde). 2002-03-21 Paul Zimmermann replaced rand/lrand48, drand48, srand/srand48 by macros LONG_RAND, DBL_RAND, SEED_RAND and time(NULL) by getpid() added macros LONG_RAND, DBL_RAND, SEED_RAND added VERSION and mpfr-math.h for "make dist" 2002-03-19 Paul Zimmermann new functions now use macros DBL_NAN, DBL_POS_INF, DBL_NEG_INF, and functions mpfr_set_nan, mpfr_set_inf defined macros for 0/0, 1/0, -1/0 added new functions mpfr_set_nan and mpfr_set_inf 2002-03-19 Vincent Lefèvre File VERSION added. Contains the next version (currently 2.0.1). configure.in updated accordingly. Macros MPFR_DBL_NAN, MPFR_DBL_INFP and MPFR_DBL_INFM. 2002-03-19 Paul Zimmermann MP_LIMB_T_HIGHBIT -> ULONG_HIGHBIT moved code under #ifdef moved code under #ifdef TEST remove variable sizer (not used) Library GPL -> Lesser GPL updated 2002-03-17 Vincent Lefèvre Some changes in the types. 2002-03-17 Paul Zimmermann changed Nt variable to signed 2002-03-17 Vincent Lefèvre Bugs fixed. 2002-03-17 Paul Zimmermann added back mpfr_sin_cos new version (adapted from sin.c) added tests for tan(3*Pi/4) and tan(7*Pi/4) fixed bug for tan(3*Pi/4) [wrong sign] added test for log(10^n) fixed infinite loop problem for log(10^n) 2002-03-13 Vincent Lefèvre Fix (patch by Kevin Ryde). Do not read the exponent if it has no meaning. 2002-03-12 Vincent Lefèvre mpfr_random update (patch by Kevin Ryde). 2 more known bugs. mpfr_a{cos,sin,tan} documentation at a better place. Some mpfr_clear added (patch by Kevin Ryde). 2002-03-11 Vincent Lefèvre mpfr_get_d3 partially rewritten (to follow the new specifications). tget_d.c updated because of changes in get_d.c. Return a null pointer if rnd_mode is an invalid rounding mode. 2002-03-11 Paul Zimmermann set sign before calling mpfr_check_range stupid typo in previous commit removed expx (not used) fixed typo (ai [potentially unsigned] replaced by i) 2002-03-11 Vincent Lefèvre New mpfr_get_d, mpfr_get_d2, mpfr_get_d3. 2002-03-11 Paul Zimmermann added return 2002-03-11 Vincent Lefèvre set_d.c split into get_d.c and set_d.c 2002-03-11 David Daney add cbrt in fonctionnality 2002-03-11 Vincent Lefèvre Bug removed. #include changes. 2002-03-07 Paul Zimmermann fixed problem when te=ti=1 (i.e. t=0) found by Kevin Ryde simplified test4() 2002-03-06 Vincent Lefèvre Update. Update. Patch by Kevin Ryde concerning nodes/menus. 2002-03-05 Vincent Lefèvre Casts fixed. 2002-03-04 Vincent Lefèvre File renaming. Copyright line changed. 2002-03-01 Paul Zimmermann updated changed name of mpz_set_fr to mpfr_get_z_exp 2002-02-28 Vincent Lefèvre Removed some dependencies. Fixed. mpfr_get_d rewritten (still needs to be fixed when the result is a subnormal). 2002-02-27 Vincent Lefèvre mpfr_get_d2 tested. Update. New tests. Additional flags for gcc + minor changes. Minor update. 2002-02-25 Vincent Lefèvre mpfr_get_d2 prototype changed (mp_exp_t instead of long). __mpfr_scale2 fixes: checks for integer overflows, signed zeros, exact rounding for subnormals in the rounding to the nearest mode (problems due to multiple roundings avoided). mpfr_get_d2: signed zeros taken into account. This function still needs to be rewritten (because of multiple roundings). 2002-02-21 Vincent Lefèvre _mpfr_ceil_log2, _mpfr_floor_log2, _mpfr_ceil_exp2 in separate files. 2002-02-19 Vincent Lefèvre Fixes, code clean-up and some asserts against integer overflows. Code need to be checked. 2002-02-14 Vincent Lefèvre mpfr_{div,mul}_2exp -> mpfr_{div,mul}_2ui. Partial code clean-up and some asserts against integer overflows (2). 2002-02-13 Vincent Lefèvre Partial code clean-up and some asserts against integer overflows. MP_EXP_T_MAX and MP_EXP_T_MIN defined. Macros IS_POW2 and NOT_POW2. 2002-02-12 Vincent Lefèvre Use mpfr_save_emin_emax and MPFR_RESTORE_RET. Update due to changes in mpfr_get_str. mpfr_get_str: the returned exponent for 0 is 0 (like in frexp()). mpz_set_fr.c: comment added. out_str.c: minor changes. Update. Bug fixed and other changes. NULL -> null pointer and other small changes. mpfr_get_str: null pointer returned in case of error, NaN taken into account. 2002-02-11 Vincent Lefèvre mpfr_set_str partially rewritten to cope with integer overflows. The rounding code hasn't been fixed yet. 2002-02-08 Vincent Lefèvre Typo. mpfr_set_str: base must be between 2 and 36. 2002-02-06 David Daney change the return values Change the test return values 2002-02-06 Vincent Lefèvre Some optimizations. 2002-02-04 Vincent Lefèvre Misc bug fixes and code clean-up. Misc bug fixes and code clean-up. 2002-02-03 Vincent Lefèvre For the value 0, return __mpfr_emin instead of 0. 2002-02-01 Vincent Lefèvre Misc bug fixes and code clean-up. 2002-02-01 Guillaume Hanrot Patch. 2002-01-30 Vincent Lefèvre Bux fixed. mpfr_set_z rewritten. Update concerning mpfr_round_prec, mpfr_rint, mpfr_ceil, mpfr_floor, mpfr_round and mpfr_trunc. Tests added (mpfr_trunc, mpfr_floor, mpfr_ceil, mpfr_round). mpfr_rint, mpfr_trunc, mpfr_floor, mpfr_ceil, mpfr_round rewritten. 2002-01-25 Vincent Lefèvre mpfr_round -> mpfr_round_prec. Code reformatted. 2002-01-23 Vincent Lefèvre MAX, MIN, ABS macros undefined before being redefined. Fix in ABS macro. 2002-01-22 Vincent Lefèvre Example with high bit set. Fix (Kevin Ryde). MPFR_PREC_MAX redefined. MPFR_INTPREC_MAX defined (internal maximum precision). Some integer overflow detection. 2002-01-21 Vincent Lefèvre Set sign of sqrt(0). Support for exponent range. can_round type changed: char -> int. Case sqrt(0) improved. Bug fixes: * return 1 -> MPFR_RET_NAN * a MPFR_CLEAR_INF was missing. 2002-01-20 Vincent Lefèvre New macro MPFR_RESTORE_RET. 2002-01-18 Vincent Lefèvre Code clean-up (goto suppressed). Cases 0 * 0 + 0. Nt: int -> mp_prec_t <> changed back to "". 2002-01-18 David Daney change "" -> <> in headers Change indentation + replace "" -> <> in header 2002-01-17 Vincent Lefèvre Particular cases rewritten. Test "__hpux", not "hpux". Mask off mrand48 return value to 31 bits to work around sloppy mpfr #include practices. (Torbjorn Granlund) #include fixes (Torbjorn Granlund). 2002-01-16 Vincent Lefèvre Comments were incorrect. 2002-01-15 Vincent Lefèvre Note concerning mpfr_trunc, mpfr_floor and mpfr_ceil. 2002-01-14 Vincent Lefèvre Special cases. 2002-01-12 Vincent Lefèvre Patches by Kevin Ryde for K&R compilers and other fixes in prototypes. 2002-01-10 Vincent Lefèvre Test check_min added. Test check_max added. Spelling: "canceled" 2002-01-10 Paul Zimmermann GMP_PROTO change was already done by Vincent prepare change PROTO -> GMP_PROTO 2002-01-04 Vincent Lefèvre The precision can no longer be 1. __GMP_PROTO defined if not already defined. Optimization: mpfr_cmp2 now accepts any combination of real arguments and computes the sign of |b| - |c| (in addition to the number of cancelled bits); mpfr_add, mpfr_sub, mpfr_sub1, mpfr_agm and some tests updated to take this change into account. 2001-12-21 Paul Zimmermann added check for sin(3*Pi/2) fixed bug for sin(3*Pi/2) 2001-12-19 Vincent Lefèvre Global NaN flag set when result is NaN. 2001-12-19 Paul Zimmermann forgot to clear nan flag for Inf changed description of mpfr_cmp to correspond to the implementation: NaNs are not allowed fixed mpfr_cmp2 : there was a bug noticed by Nicolas Magaud and Didier Bondyfalat for inputs: 100 011 111 100 010 110 where it gave 8 instead of 5. 2001-12-19 Vincent Lefèvre Better comments. 2001-12-10 Paul Zimmermann added "PI and the AGM" 2001-12-06 Vincent Lefèvre Files renamed (log in base 2 and 10). Files renamed (constants). File aclocal.m4 removed, as generated by aclocal (called by prepare). Files log_base_*.c renamed. Functions (constants) renamed. Files configure, Makefile.in, tests/Makefile.in removed. Use the `prepare' script to generate them. Removed 2 bugs. Initial release. 2001-12-05 Paul Zimmermann added arc-tangent (from Mathieu) added paragraph on asin and acos from Mathieu Dutour added tacos in check5, test NaNs before calling mpfr_cmp added acos added acos.c added acos (from Mathieu Dutour) use now new sqrtrem from gmp-4.0 improved test (avoid mpfr_get_d) removed isnan prototype added stdlib.h for exit 2001-11-30 Paul Zimmermann test NaN before Inf changed precision to 2 for test 2001-11-30 Vincent Lefèvre Cast added. 2001-11-30 Paul Zimmermann added a new test (worst case) nouvelle version de Mathieu Dutour, corrigeant certains bugs avec les pires cas de Vincent 2001-11-30 Vincent Lefèvre #include order changed. Misc fixes. Unused variables. 2001-11-30 Paul Zimmermann start tests with precision 2 instead of 1 start from precision 2 big rewrite to fix problems when the estimate base exponent is too small fixed detection of exact cases (in particular 0) now use MPFR_PREC_MIN exptol is now of type mp_exp_t rewritten part with Taylor series changed MPFR_PREC_MIN to 2 updated wrt MPFR_PREC_MIN/MPFR_PREC_MAX case x=0 was forgotten now use MPFR_PREC_MIN added comment 2001-11-30 Vincent Lefèvre mpfr_set_z rewritten to support overflows/underflows and ternary value. 0 -> set to +0. Better sign comparison. 2001-11-29 Vincent Lefèvre Use MPFR_SET_POS. Bug fixed concerning integer overflows. 2001-11-29 Paul Zimmermann added comment fixed bug for small precision, where r can be >= 1 2001-11-29 Vincent Lefèvre Functions mpfr_{mul,div}_2{si,ui} added. Functions mpfr_{mul,div}_2exp still exist for backward compatibility; they are obsolete and should not be used any longer. 2001-11-28 Vincent Lefèvre Particular cases (NaN and signed zeros). Init variables to NaN instead of 0. Possible integer overflow fixed. Particular cases fixed. 2001-11-25 Vincent Lefèvre Overflow support. K&R -> ISO C prototype. mpfr_div_2exp rewritten. mpfr_mul_2exp rewritten. Overflow support. Casts to size_t added (safer and could be required in the future). 2001-11-23 Vincent Lefèvre Minor change. mpfr_mul partially rewritten: * Integer overflows almost completely avoided. * Now supports signed zeros and overflows. Not tested yet. 2001-11-22 Vincent Lefèvre mpfr_can_round_raw: integer overflows checked and code duplication avoided. More bugs. mpfr_can_round and mpfr_can_round_raw: prototypes changed. 2001-11-21 Vincent Lefèvre Bug fixed. mpfr_add_one_ulp and mpfr_sub_one_ulp changed. Added MPFR_PREC_MIN and MPFR_PREC_MAX. Error test -> assert. mp_prec_t -> mp_size_t. 2001-11-20 Vincent Lefèvre Test added. mpfr_round rewritten. mpfr_round_raw_generic: NULL changed to 0 as not necessarily defined. Added macro MPFR_SET_ABSSIZE. mpfr_round: Check for overflow. 2001-11-17 Vincent Lefèvre Some type changes. 2001-11-16 Vincent Lefèvre Integer overflows checked. MPFR_ASSERTN instead of fprintf + exit. GMP assert mechanism: macros changed until GMP is fixed. 2001-11-16 Paul Zimmermann version -> 2002 removed executable flag mpfr_print_raw -> mpfr_print_binary split from init.c 2001-11-16 David Daney remove math.h remve math.h 2001-11-16 Paul Zimmermann added one test 2001-11-16 David Daney remove math.h 2001-11-16 Paul Zimmermann init -> init + init2. 2001-11-16 David Daney remove math.h 2001-11-16 Guillaume Hanrot Ajoute retours chariots dans div.c, etc. if () remplace par if ( ==0) ou if ( != 0) 2001-11-16 Paul Zimmermann removed K&R function headers 2001-11-16 Guillaume Hanrot Beuh ? return -> MPFR_RET, patch d'un leak dans inp_str.c 2001-11-16 Paul Zimmermann changed to use GMP assert mechanism 2001-11-16 David Daney remove stdio.h math.h 2001-11-16 Paul Zimmermann assert -> MPFR_ASSERT 2001-11-16 David Daney remove stdio math .h remove stdio.h math.h 2001-11-16 Paul Zimmermann ASSERT_ALWAYS -> MPFR_ASSERTN added COPYING.LIB replaced by GPL 2001-11-16 David Daney remove limits.h 2001-11-16 Paul Zimmermann changed Library GPL to Lesser GPL GNU Lesser General Public License, version 2.1 2001-11-16 David Daney remove limits.h math.h 2001-11-16 Paul Zimmermann now treats all *.h 2001-11-16 David Daney remove the proto, remove math.h 2001-11-16 Paul Zimmermann removed DEBUG's removed old patch for GMP 2.xx GNU MP -> MPFR added year 2001 in copyright line added year 2001 in copyright line added year 2001 in copyright line removed #if __STDC__ now two separate files cos.c and sin.c added year 2001 in copyright line updated old version, removed added isinf and isnum (split from isnan) new files (split from isnan.c) removed prototype already in mpfr.h translated french comments to english added mpfr_sub added static to local functions 1 -> MP_LIMB_T_ONE 1 -> BITS_PER_MP_LIMB added static to local functions removed prototype already in mpfr.h removed mpfr_exp2_si (not used) added static to local functions translated french comments to english translated french comments to english removed prototype already in mpfr.h initialized inexact to 0 used TMP_ALLOC translated french comments to english simplified test moved inf_p and number_p to different files added static to local functions explained threshold removed prototypes already in mpfr.h does not include stdio.h any more added stdio.h 1 -> BITS_PER_MP_LIMB 1 << (BITS_PER_MP_LIMB - 1) -> MP_LIMB_T_HIGHBIT removed french comment added static to local functions removed prototype already in mpfr.h 1 -> BITS_PER_MP_LIMB translated french comments to english added static to local functions 1 -> BITS_PER_MP_LIMB 1 -> BITS_PER_MP_LIMB translated french comments to english 1 -> BITS_PER_MP_LIMB added static to local functions removed proto already in mpfr.h 1 -> MP_LIMB_T_ONE added stdio.h 2001-11-15 Vincent Lefèvre add.c -> add.c & add1.c sub.c -> sub.c & sub1.c + some changes. 2001-11-13 Paul Zimmermann iff the results are exact -> iff the result is exact 2001-11-10 Vincent Lefèvre GNU coding style. K&R function headers removed. MP_LIMB_T_ONE defined. mp_size_unsigned_t defined. Important bugs fixed (in particular when int has fewer than 32 bits). Still unavoidable possible bugs due to the fact that mp_size_t is signed. 2001-11-09 David Daney add tests file for gamma add gamma function an other version add gamma function 2001-11-09 Paul Zimmermann mis a` jour valeur de retour de mpfr_tan 2001-11-09 Vincent Lefèvre Some -'s missing in floating-point. 2001-11-08 Paul Zimmermann modifs suite aux remarques de Nathalie 2001-11-08 David Daney remove some name of variables 2001-11-08 Vincent Lefèvre cmp2.c: Integer overflows checked. Update. Fix. 2001-11-08 David Daney suppress variable name in dim min max export isinteger in the file isinteger.c exporte pow_si from pow2.c to pow_si.c rename pow2.c in pow.c (source for mpfr_pow) add ui_pow_ui.c (initially in pow.c) add pow_ui.c file (initially in pow.c) 2001-11-08 Vincent Lefèvre mpfr_cmp2: return type changed to mp_prec_t. 2001-11-08 David Daney add function test4 for 3 input test + fma tests 2001-11-08 Vincent Lefèvre Macros added. MP_LIMB_T_MAX instead of (mp_limb_t) -1 (a little nicer...). 2001-11-06 Vincent Lefèvre Code clean-up. 2001-11-05 Vincent Lefèvre Prototypes for K&R C. mpfr_round_raw_generic prototype fixed. 2001-11-01 David Daney clear xp for Nan Inf or 0 are returned clear variable if an error is return clear x for Nan inf 0 return clear x for Nan Inf 0 return clear te 2001-11-01 Vincent Lefèvre Added prototype. Bug fixed. 2001-11-01 Paul Zimmermann fixed MLK's fixed MLK's in mpfr_isinteger fixed MLK's fixed missing mpfr_clear's added missing mpfr_clear added clear's in bug_ddefour added mpfr_clear's fixed MLK's 2001-10-31 Paul Zimmermann fixed MLK for Inf or Nan fixed MLK in check_case_2 2001-10-31 David Daney rename factorial -> fac_ui 2001-10-30 Fabrice Rouillier Change mpfr__mpz to mpfr__z Change mpfr__mpq to mpfr__q where is mul,div,add,sub 2001-10-30 David Daney correct factorial -> fac_ui in comments rename tfactorial -> fac_ui rename factorial -> fac_ui 2001-10-27 Vincent Lefèvre Bug fixed. 2001-10-26 Paul Zimmermann drand -> drand48 put MAX_PREC back to 100 added test for inexact flag use MPFR_RET_NAN and MPFR_RET removed MPFR_DEBUG_LEVEL definition mpfr_set_q and mpfr_abs now return an int mpfr_pow_ui and mpfr_ui_pow_ui now implement exact rounding updated the documentation of the mpfr_*pow* functions removed some internal functions implemented exact rounding (but no ternary flag) 2001-10-26 David Daney add some flags mixed version between DD and Pau => (gestion des flag inexacte dirige) rien 2001-10-26 Paul Zimmermann MAX_PREC included implemented inexact flag 2001-10-26 Guillaume Hanrot Clearing high part of rem2. 2001-10-26 Fabrice Rouillier adds gmp_op.c 2001-10-26 Paul Zimmermann mpfr_set_q now returns an int added test for inexact flag 2001-10-26 Fabrice Rouillier Adds the file gmp_op.c containing the implementations of operations between mpfr and mpz/mpq data 2001-10-26 David Daney err <0 => is now tester 2001-10-26 Guillaume Hanrot Patch for bits shifted out when the high word of the quotient is nonzero. Induced error on inexact flag (and hence on rounding in some cases). 2001-10-26 David Daney add copysign.c 2001-10-26 Paul Zimmermann added one test 2001-10-26 David Daney simplify dim add exact flag err => long int 2001-10-26 Paul Zimmermann added one test cosmetic changes can_round return 0 for b=0 2001-10-26 David Daney add thypot add coopysign add copysign correct mp_prec_t err => long int correst mp_prec_t err => long int 2001-10-26 Fabrice Rouillier Add multiplication/division/addition/subtraction by mpz and mpq 2001-10-26 Paul Zimmermann added two tests fixed bug in generic tests (one more bit is needed to get an exact result) fixed pb with exact results not detected (ck was < 0) 2001-10-26 Guillaume Hanrot Rien. Patch for the computation of the u_lo + r part of the remainder when u_lo = 0. 2001-10-26 Paul Zimmermann added test for inexact flag fixed pbs with inexact flag now mpfr_div and mpfr_ui_div return an int implemented ternary flag in mpfr_ui_div removed unnecessary CLEAR_FLAGS used MPFR_RET_NAN reduced number of tests removed unnecessary CLEAR_FLAGS improved mpfr_compare fixed wrong function name for mpfr_log2 rewritten to implement ternary inexact flag fixed generic test (pb with double rounding) increased MAX_PREC 2001-10-25 Guillaume Hanrot Changed the type of err from mp_prec_t (unsigned) to int. Added tests for inexact flag. Patch for even rounding. 2001-10-25 David Daney rien rien 2001-10-25 Vincent Lefèvre Warning avoided. 2001-10-25 Paul Zimmermann added tfma slong -> t nouvelew version (without loop) 2001-10-25 David Daney rien rien change 2001-10-25 Vincent Lefèvre Bug fixed. 2001-10-25 David Daney correct bugs with reuse test for log2 log10 pow 2001-10-25 Guillaume Hanrot La division nouvelle est arrivee. 2001-10-25 Paul Zimmermann ajoute' nouveau test 2001-10-25 Vincent Lefèvre Bug fixed. 2001-10-25 Guillaume Hanrot round_raw, round_raw2 -> round_raw_generic. Macros to simulate previous behaviour. Even rounding returns +- MPFR_EVEN_INEX. 2001-10-25 Paul Zimmermann fixed pb with mpfr_log10(a, a) with a=-Inf added two tests added one test 2001-10-25 David Daney add log2 and log10 correction for reuse coorection for reuse 2001-10-25 Paul Zimmermann test file for testing exceptions 2001-10-25 Vincent Lefèvre mpfr_add1 completely rewritten. Overflows are checked. The ternary value should now be supported (but it hasn't been tested yet). 2001-10-25 David Daney new version 2001-10-25 Paul Zimmermann added one test add possibility to define a random function (default is mpfr_random) to get random variables in specific ranges now use tgeneric.c added texceptions documented exception mechanism (with Vincent Lefe`vre) changed stupid test (was computing only 200!) implemented inexact flag 1999 -> 2001 check overflow added two tests implemented overflow/underflow 2001-10-25 David Daney correct atanh(INF)=INF exact correct test inf for atanh 2001-10-25 Paul Zimmermann added warning for mpfr_set_d 2001-10-25 David Daney correct bug in tests file (test of atanh for + or - Inf) 2001-10-25 Paul Zimmermann added tadd_ui (forgotten?) added special test fixed bug in rounding part when rounding towards 0 (infinite loop due to bn correct the Nan case add the function mpfr_dim add function mpfr_min and mpfr_max correct these tesats files correct some bugs 2001-10-24 Paul Zimmermann added EXTRA_DIST= tgeneric.c 2001-10-24 David Daney remove tfma add tfma acosh revue et corrige...+beau 2001-10-23 David Daney add mpfr_log10 add log_base_10 add tlog_base_10 add test file for log_base_10 function correct a bug in mpfr_log10 section add help of log10 + fma correct particular cases improve the clear flags correction dans l'entete 2001-10-21 Vincent Lefèvre Some changes to avoid warnings. Bug fixed (char -> int). 2001-10-19 Vincent Lefèvre Update. Bugs fixed concerning the "inexact" ternary value. 2001-10-19 David Daney suppress thypot tgeneric suppress sample 2001-10-19 Paul Zimmermann void -> int as return value for mpfr_add_ui added ternary flag void -> int for mpfr_add and mpfr_add_ui 2001-10-19 David Daney add test for hypot add some test add some functions add some proto add test file for pow add the help for pow and pow_si add the function pow and pow_si 2001-10-19 Paul Zimmermann added two tests for 0-c and c-0 with prec(c) > prec(a) 2001-10-19 Vincent Lefèvre Removed #include , "return 0;" replaced by "MPFR_RET(0);". mpfr_add1 and mpfr_sub1 prototypes moved to mpfr-impl.h (to detect clashes). Bug fix concerning the inexact ternary value in mpfr_sub. mpfr_add now returns an int (inexact ternary value unsupported if true add). Update. Underflow/overflow check. Documentation updated. Comment added. MPFR_RET(0) replaced by MPFR_RET_NAN. Macro MPFR_RET_NAN. 2001-10-18 Vincent Lefèvre Code clean-up in mpfr_round_raw (well... IMHO). 2001-10-18 David Daney take in account of CHAR_BIT in ui_pow 2001-10-18 Paul Zimmermann cast to mp_limb_t was missing 2001-10-18 Vincent Lefèvre BITS_PER_CHAR replaced by the standard CHAR_BIT. 2001-10-18 Guillaume Hanrot *** empty log message *** 2001-10-18 David Daney add test of ui_pow add the help of ui_pow add the function pow(unsign long int, mpfr_t) 2001-10-18 Vincent Lefèvre Improved configure.in. configure generated by Autoconf 2.52. 2001-10-18 David Daney ajout du flag inexact 2001-10-18 Vincent Lefèvre fixed and improved check for gmp.h/gmp-impl.h/config.h/gmp-mparam.h/longlong.h and corresponding error message 2001-10-18 David Daney add the help on log2 add the test file of the log2 (log in base 2) ajout de log2 (log en base 2) correst tanh(0) 2001-10-18 Paul Zimmermann added two more tests wrong sign passed to mpfr_can_round (mp_limb_t may be unsigned) 2001-10-18 David Daney correct a bug for sinh(Inf) 2001-10-17 David Daney correct syntax of tanh.c correct an error correct few things little patch for cosh add the test function of expm1 add the test of the function log1p add the function expm1 add the function log1p add to mpfr.texi log1p and expm1 actualisation de exp2.c actualisation de exp2 2001-10-17 Guillaume Hanrot New tests in tdiv.c. New division in div.c, old one renamed in mpfr_div2. Remains to implement exact/inexact flag. Should not be *that* hard. 2001-10-16 David Daney ajout de functions pow, fma, hypot etc etc 2001-10-16 Paul Zimmermann added fma.c added prototypes for mpfr_fma and mpfr_hypot small changes for inexact flag added some cases for Inf implement (partly) inexact flag 2001-10-16 David Daney ajout hypot ajout de fma 2001-10-16 Vincent Lefèvre Comment: // --> /* ... */ 2001-10-15 Paul Zimmermann generic test file added cast to (void*) for new functions returning an int added test for inexact flag now use tgeneric.c added more tests now use tgeneric.c fixed test of return values for infinities: foo(+/-Inf) is *exact* now also try with negative numbers implement ternary inexact flag implement inexact flag return type is now int for mpfr_mul_2exp and mpfr_div_2exp return type is now int for more functions sign was not set rewritten completely mpfr_can_round_raw documented mpfr_set4 return non-zero if malloc failed cosmetic changes implement ternary inexact flag avoid one variable 2001-10-12 David Daney correction d'erreurs sur les notations + correction de la regle 9 2001-10-12 Paul Zimmermann fixed MPFR_ASSERT documented MPFR_ASSERTN and MPFR_ASSERTD added test for mpfr_init_set_f prototype added test for inexact flag corrected a wrong test cosmetic change added tsub_ui (did exist but forgotten in Makefile) and tset (new file) test file for mpfr_set, initial version void -> int as return value for several functions and explained the ternary return value implemented inexact flag void -> int as return value for new functions implementing inexact flag implemented inexact flag in mpfr_set_d implemented inexact flag in mpfr_round completely rewritten computation of inexact flag now directly uses mpfr_round_raw added 'if' in MPFR_ASSERT to avoid compiler warning put initial value in variables which may be used without being initialized updated things done, added Rounding section 2001-10-11 David Daney ajout de log1p et expm1 2001-10-11 Paul Zimmermann reduced number of random tests (took too much time) added random tests for inexact flag implemented inexact flag added random tests for inexact flag 2001-10-11 David Daney ajout du log generic et de fma 2001-10-11 Paul Zimmermann inexact flag was wrong in some cases added random tests for inexact flag reduced number of loops per precision from 100 to 10 (test was too long) improved check for gmp-impl.h/config.h/gmp-mparam.h/longlong.h and corresponding error message stack-alloc.h no longer needed (will be included in gmp-impl.h) stack-alloc.h is no longer needed (will be included in gmp-impl.h) 2001-10-09 Paul Zimmermann added proof of rules fixed buggy test 2001-10-05 Paul Zimmermann fixed bug for b + d where b=2^900+2^500+2^110, d=2^900-2^500-2^110 2001-10-03 Paul Zimmermann fixed bug in mpfr_set_d on 64-bit machines 2001-09-28 Paul Zimmermann fixed a few problems in mpfr_set_d for sizer < MPFR_LIMBS_PER_DOUBLE added paper of Brent and McMillan does not call compare_exp2_exp3 when argc=4 added one item now mpfr_set_prec returns 1 instead of producing an error in case prec=0 2001-09-27 David Daney New version with new generic function + / * etc 2001-09-20 Vincent Lefèvre BUGS updated. 2001-09-13 Vincent Lefèvre Prototype changes. -> (ISO C). #include added. #include added/removed. GCC option -Wno-implicit removed and prototype added to mpfr-impl.h 2001-09-12 Vincent Lefèvre INCLUDES in Makefile.am: -I$(top_srcdir) and @INCLUDES@ swapped. This defines the following precedence for the tests: 1) MPFR directories 2) User-defined directory 3) GMP include directory This allows the user to override the GMP longlong.h file with the gcc-3 one, by using: INCLUDES="-I.../include" ./configure ... #include order fixed. Tests added (in particular, inex value). Bug fixed. 2001-09-11 Vincent Lefèvre MPFR_RET: definition changed to avoid warning. Inexact ternary value for mpfr_set4, mpfr_set_ui and mpfr_set_si. Macro SAFE_ABS. Inexact ternary value and flag for mpfr_set_underflow, mpfr_set_overflow and mpfr_check_range. Macro MPFR_RET added. Ternary value for mpfr_set4. New flags. 2001-09-10 Vincent Lefèvre Parameter added to mpfr_round_raw: pointer to inexact ternary value. 2001-09-10 Guillaume Hanrot Zqwiuyt Zorgs. Gleurbs. Patch grotesque. Patch for the case SIZE(r) < MPFR_LIMBS_PER_DOUBLE. 2001-09-10 Paul Zimmermann test file for mpfr_tan fixed a few typos added mpfr_tan added ttan added the tangent added tan.c tangent function 2001-09-07 Paul Zimmermann removed mpfr_sin and mpfr_cos (now separate implementations) removed sin_cos added sine and cosine removed sin_cos, added sin and cos removed mpfr_sin_cos removed sin_cos, added sin and cos removed tsin_cos, added tsin and tcos test files for mpfr_cos and mpfr_sin new implementation of mpfr_sin, using mpfr_cos new (faster) implementation of mpfr_cos 2001-09-06 Vincent Lefèvre Fix: flags set in mpfr_set_{under,over}flow(). Cases where the result is 0 fixed. Integer overflow checked in mpfr_sub. In add.c: use mpfr_cmp_abs instead of mpfr_cmp3; x - x fixed for GMP_RNDD. Compare the absolute values of two nonzero FP numbers. 2001-09-05 Vincent Lefèvre mpfr_cmp3 changed and integer overflows checked. 2001-09-05 Paul Zimmermann added efficiency item 2001-09-03 Vincent Lefèvre Cases [+-]0 + [+-]0 fixed (depending on the rounding mode). 2001-08-29 Vincent Lefèvre Optimization + overflow support. Case +0 + -0 fixed. 2001-08-29 Paul Zimmermann added one test another test from Norbert another fix (final copy when xsize > ysize was wrong) 2001-08-28 Paul Zimmermann added several tests for case (1b) another fix (previous one was incomplete) added one more test (from Norbert) 2001-08-28 Vincent Lefèvre Bug fixed. Bug fixed and update to check the exponents. 2001-08-27 Paul Zimmermann added test for 53 <= xprec, yprec <= 128 added multiple tests for 53 <= xprec, yprec <= 128 was completely wrong for ysize > xsize added faster formula in exp(-8*n) for Euler's constant 2001-08-25 Vincent Lefèvre Assertion support with debug level. Some support for exponent change and exceptions. 2001-08-23 Paul Zimmermann added constant ALPHA (for mpfr_const_euler) added euler/teuler added teuler added euler.c fixed pb with c2 = c2old << dif with dif negative fixed bug for (2^53+4) - 1 added new test from Norbert Mueller fixed pb: sh becomes "negative" included Euler's constant bibtex file for algorithms.tex test file for mpfr_const_euler computation of Euler's constant 0.577... added missing prototype mpfr_const_euler returns an int added mpfr_const_euler 2001-08-22 Vincent Lefèvre Tests added. Bugs fixed (particular cases). "mant(c) != 1/2" test was broken. check fixed. Check added: 2^53 + 1 --> 2^53. Update. 2001-08-21 Paul Zimmermann added one test fixed stupid bug when dif < 0 2001-08-14 Paul Zimmermann added mpfr_asin added missing cast test file for mpfr_asin arc-sine, contributed by Mathieu Dutour added mpfr_asin new name for file tarctan.c renamed to tatan.c renamed tarctan.c into tatan.c added tasin.c renamed arctan.c to atan.c added asin.c new name for file arctan.c moved to atan.c low significant bit is in ap[0] and not in ap[an-1] !!! 2001-08-13 Vincent Lefèvre Cleaner MPFR_SET_SAME_SIGN. Macros MPFR_SET_SAME_SIGN, MPFR_INIT and MPFR_INIT1 changed to expressions. 2001-08-10 Vincent Lefèvre Bugs fixed (wrong types). Macros mpfr_init_set_* changed to expressions. Makefile.in update. 2001-07-06 Paul Zimmermann edited wrt GNU style fixed stupid bug: ceil(a/b) isn't (a+b-1)/a but simply a/b for a negative! fixed array bound write (bn < an + cancel1 + 1) macros MPFR_NOTZERO and MPFR_ISZERO did not work properly with 64-bit words 2001-06-29 Paul Zimmermann fixed bug for output base 2^k added one test added a section for the exponential fixed bug when dividend is 0 2001-06-28 Paul Zimmermann moved TMP_FREE added 2 things 2001-06-27 Paul Zimmermann added mpfr.info to files to remove for "make distclean" 2001-06-23 Vincent Lefèvre Non-existent C source references removed. Macros MPFR_INIT and MPFR_INIT1 fixed. 2001-06-18 Paul Zimmermann nested double TMP_DECL's 2001-06-14 David Daney A few patches. 2001-06-07 Paul Zimmermann added mpfr_sin and mpfr_cos corrected in the documentation some exact values 2001-06-01 Paul Zimmermann removed 2 tabs added change explaining the LGPL with non-free programs 2001-05-31 Guillaume Hanrot Patch for the case b = 0 or c = 0. 2001-05-23 Guillaume Hanrot Added DDefour's bug. 2001-05-22 Guillaume Hanrot Patch in the case MPFR_PREC(b) > MPFR_PREC(a)+cancel. 2001-05-10 Vincent Lefèvre fixed bug in mpfr.texi 2001-05-10 David Daney correction du bug donne par vincent + ajout des aides des fonctions hyperbolic 2001-05-09 David Daney *** empty log message *** 2001-04-20 Paul Zimmermann log(0) now returns 0 (exact infinity) 2001-04-18 Paul Zimmermann fixed pbs with NaN/Inf fixed new bug found by Nathalie Revol (case when add_one_ulp produces a carry) added new bug found by Nathalie Revol fixed bug for 1.0000... - 0.000001 for rounding up or nearest 2001-04-17 Nathalie Revol Case where argument < 0 included, NR 17-04-2001 2001-04-12 Paul Zimmermann added new (special) tests test file for mpfr_sub added tsub 2001-04-06 David Daney change old exp2 (conflict with 2^x) to exp_2 2001-04-05 Paul Zimmermann 0 -> GMP_RNDN check apart the case c=0 (otherwise some low significant limbs may be non zero, which may produce a wrong result) mpfr_exp2 -> mpfr_exp_2 mpfr_exp2 -> mpfr_exp_2 2001-04-05 David Daney reactualise .h change header change reuse to suppress factorial suppress of timing in makefile add the old exp2 function and file renamed by exp_2 change makefile for new functions change make file test for hyperbolic function exp2 and factorial add new test file for hyperbolic function add test file for new function add function new file function new function file 2001-04-05 Paul Zimmermann new version with cmp2.c fixed pb with inexact flag when 'int' and 'mp_limb_t' has different sizes 2001-04-05 David Daney fixed bug for mpfr_cmp_ui (Inf, 0) fixed bug for mpfr_set_ui (x, 0) [was giving -0] 2001-04-03 Paul Zimmermann added algorithm for mpfr_cmp2 added cmp2.c fixed bug when diff_exp >= BITS_PER_MP_LIMB added new test for worst cases: 1 - 1/2^i and (1 + 1/2^i) - 1/2^i changed return value of mpfr_cmp2 new file for mpfr_cmp2 moved mpfr_cmp2 to separate file cmp2.c added several tests, and a routine that generates worst cases two changes suggested by Kevin Ryde 2001-04-02 Paul Zimmermann new version from new Makefile.am 2001-03-27 Paul Zimmermann added new test fixed new bug in mpfr_cmp2 found by Fabrice 2001-03-21 Paul Zimmermann added new test fixed bug found by Nathalie Revol 2001-03-20 Paul Zimmermann added 2 items added test for mpfr_cmp_ui (-0, 0) now prints -0 for -0 2001-03-19 Nathalie Revol Comparison between 0- and 0 now returns 0, NR 19-03-2001 2001-03-16 Vincent Lefèvre added cast to avoid a warning 2001-03-13 Paul Zimmermann added tests for inexact return value tiny bug in inexact value determination mpfr_mul now returns an int 2001-03-09 Paul Zimmermann description of algorithms reorganized 2001-03-08 Paul Zimmermann added few things added arc-tangent added tarctan added test to mpfr_arctan added header test file for mpfr_arctan removed math.h arctangent function (contributed by Mathieu Dutour, done slight changes) added Mathieu Dutour in contributors added mpfr_arctan added one test fixed bug in mpfr_can_round_raw, when err > bn*BITS_PER_MP_LIMB now tset_str is possible 2001-03-06 Paul Zimmermann fixed bug for Infinity (was testing zero before) 2001-03-01 Paul Zimmermann replaced (mp_limb_t) 4294967295 by CNST_LIMB(0xFFFFFFFF) 2001-02-22 Paul Zimmermann forgot to declare q in mpfr_get_d2 when BITS_PER_MP_LIMB=64 2001-02-21 Paul Zimmermann removed fprintf() when unexpected end of string added undef's to avoid warnings at compilation 2001-02-19 Paul Zimmermann removed mpfr_set_machine_rnd_mode 2001-02-18 Paul Zimmermann changed "int main(..)" to two lines now initialize str_is_null correctly added more tests don't change MPFR_SIZE when allocated size is enough updated specification of mpfr_sgn changed definition of mpfr_sgn to get rid of MPFR_NOTZERO size of freed block by __gmp_free_func was wrong added tisnan and tget_d fixed bug for Inf (recognized as an ordinary number) new test file 2001-02-16 Paul Zimmermann check overflow in _mpfr_ceil_exp2 2001-02-15 Paul Zimmermann added prototype for Ulp changed _d to _p, added mpfr_number_p changed MPN_COPY into MPN_COPY_INCR/MPN_COPY_DECR in mpfr_round_raw added tests for one of arguments NULL moved mpfr_sgn to mpfr.h (defined in manual) use MPZ_REALLOC added const to 2nd argument of mpfr_set_str added set_ui.c added cast to "unsigned long" for ai = ABS(i) moved mpfr_set_ui to separate file now when str==NULL return a block which is exactly strlen(str)+1 bytes long fixed problems with old K&R compilers (_PROTO missing) 2001-02-08 Paul Zimmermann added more items 2001-01-23 Paul Zimmermann fixed ulp computation 2001-01-19 Paul Zimmermann changed behaviour for "tlog N": prints only differences with increasing ulps fixed pb in mpfr_get_d2 for 64-bit machines: in q + res/MP_BASE_AS_DOUBLE, q seems first to be cast into a double, which gives more than one ulp of error 2001-01-18 Paul Zimmermann added guard to prevent multiple inclusion fixed bug in mpfr_cmp2 (found on the IA64) 2001-01-11 Paul Zimmermann added tests for 0 in mpfr_set_str_raw fixed bug for +0000E0 incorporated changes from Kevin/Torbjorn for GMP 3.2 truncate the last uk (when the precision is not a power of 2) _mp_allocate_func -> _gmp_allocate_func _mp_reallocate_func -> _gmp_reallocate_func __gmp_default_fp_bit_precision -> __mpfr_default_fp_bit_precision _mp_xxx_func -> _gmp_xxx_func removed mpfr_srandom sprintf -> fprintf _mp_free_func -> _gmp_free_func _mp_reallocate_func -> __gmp_reallocate_func added paragraph on NaN and infinities, docu on mpfr_nan_d and mpfr_inf_d removed mpfr_srandom some renamings removed srandom __gmp_default_fp_bit_precision -> __mpfr_default_fp_bit_precision added protocols for mpfr_get_default_prec, mpfr_nan_d and mpfr_inf_d removed superfluous TMP_FREE(marker) _mp_xxx_func -> _gmp_xxx_func _mp_free_func -> _gmp_free_func functions to check for NaN and infinities added isnan.c, removed srandom.h added two items from Kevin add 2 items 0.4 -> 1.0 2001-01-05 Paul Zimmermann added one test for large operands fixed bug in _mpfr_ceil_exp2 (underflow when exp < -1022) 2000-12-22 Paul Zimmermann remove what was done added mpfr-test.h added Vincent 1.1 -> 2001 cast for _mpfr_floor_log2 was on the wrong side added one test simplified _mpfr_floor_log2 code was wrong for infinity only editing added special() cases removed #if 0 (on Alpha with cc the enclosed code was still used since the # was not in the first column) changes for version 1.1 added one test (exp2 vs exp3) changed c from mp_limb_t into unsigned long in mpfr_exp2_aux2 (otherwise bugs on IRIX -n32) added one test fixed wrong combination of conditions for Infinity added mpfr-test.h for MIPS 2000-12-22 Guillaume Hanrot Modified macro calls 2000-12-22 Paul Zimmermann added cast (int) to random() to avoid warning on Solaris added tiny change at the end of main routine (suggested by Guillaume) added one test added two more tests fixed bug when c does not overlap with a, b is negative and GMP_RNDN moved prototypes for mpfr_set4 and mpfr_cmp3 to mpfr.h fixed bug in mpfr_cmp2 when d=0 and lots of bits match updated for version 1.1 2000-12-21 Paul Zimmermann test file for power functions test file for in-place operations unsigned char (or int) -> mp_rnd_t unsigned char -> mp_rnd_t unsigned int -> mp_rnd_t k2r -> ansi style removed #include by defining auxiliary functions fixed several tiny remaining bugs with NaN/Inf updated description of mpfr_cmp* and mpfr_sin_cos added MPFR_SIGN added MPFR_CLEAR_NAN MPFR_RESET_INF -> MPFR_CLEAR_INF moved MPFR_SIGN to mpfr.h added prototypes for log2/isqrt/cuberoot functions added reuse, tcmp2, teq, tpow, trandom, ttrunc removed isnan(), ... removed gmp-impl.h, isnan(), ... removed gmp-impl, isnan(), ... removed cputime stuff k&r -> ansi style removed isnan() decl. MINNORM -> mpfr-test.h ulp -> mpfr-test.h removed isnan() declaration now use MINNORM and MAXNORM max, min -> macros added new tests added MINNORM, MAXNORM, MIN, MAX, ABS 2000-12-20 Guillaume Hanrot A few basic patches. Added support for PPC/Linux Patch for wrong prototype. Added prototypes for all test files. 2000-12-18 Vincent Lefèvre Warnings suppressed on Alpha/OSF1. 2000-12-18 Paul Zimmermann added mpfr-test.h back to 1.3 auxiliary test files moved to main directory auxiliary test functions changed name of mpfr struct fields: _mp_d -> _mpfr_d (to detect conflicts with mpf) fixed a few problems in non-STDC headers moved definitions of mpfr-impl.h to mpfr-test.h and created a real mpfr-impl.h 2000-12-15 Paul Zimmermann removed tzeta explained how to enter NaN/Inf with mpfr_set_str_raw removed zeta.c added 'to do' for NaN/Inf flags clear NaN/Inf flags of result improved indentation adapted to NaN/Inf nothing (only better indenting) adapted to NaN/Inf removed warnings adapted to NaN/Inf removed warnings clear NaN/Inf flags in normal case adapted to NaN/Inf added prototype for mpfr_srandom now uses directly mpn_random, to avoid all problems with include files added 4 tests _mp_d -> MPFR_MANT added error message when memory allocation fails added error message when memory allocation fails _mp_d -> MPFR_MANT 0 -> NULL added error message if memory allocation fails _mp_d -> PTR _mp_prec -> MPFR_PREC _mp_d -> MPFR_MANT added mpfr_swap removed MPFR_SET_IS_FP (not used) 2000-12-15 Guillaume Hanrot A few patches. 2000-12-15 Vincent Lefèvre MPFR_CHANGE_SIGN modified to avoid a possible side effect. 2000-12-15 Paul Zimmermann warning: x is a MPF not a MPFR! 2000-12-15 Guillaume Hanrot Modification of the order of includes in random.c 2000-12-15 Vincent Lefèvre Added some warning flags for GCC. 2000-12-15 Guillaume Hanrot Header file for srandom() Patches for compiler warnings. Yet another patch for include files. Permutation of includes to avoid warnings due to careless multiple definition of ULONG_MAX. 2000-12-14 Vincent Lefèvre Bug fixed concerning the flags. Bugs fixed (in case char is signed and accented characters are given). Include "urandom.h". Old code removed. Take into account Inf, Nans ; clear the flags of the return variable in most function calls. Use urandom(). Take into account Inf, Nans ; clear the flags of the return variable in most function calls. 2000-12-14 Guillaume Hanrot Yet another random patch. Replaced random by rand. 2000-12-13 Paul Zimmermann fixed pb with mp_ptr vs mp_srcptr 2000-12-13 Guillaume Hanrot Take into account Inf, Nans ; clear the flags of the return variable in most function calls. Tests updated accordingly Take into account Inf, Nans ; clear the flags of the return variable in most function calls. 2000-12-13 Paul Zimmermann check that we can round the cosine too 2000-12-12 Paul Zimmermann removed TIMING stuff ensures prec_x >= 0 we need m >= 2 in mpfr_exp2_aux2 forgot TMP_MARK(marker) forgot TMP_MARK(marker) or free'd in wrong order forgot TMP_MARK(marker) fixed mpf_reldiff, mpf_urandomb and mpf_t added stack-alloc.h when --disable-alloca 2000-12-11 Vincent Lefèvre out_str.c: included set_d.c: (0./0.) instead of sqrt(-1) for NaN (doesn't need ) set_d.c: () added for macros Infp and Infm 2000-12-07 Paul Zimmermann shortened string in mpfr_set_str_raw which was greater than precision replaced isnan/isinf/math.h (not portable, for example isinf does not exist on Sparc) by new macros from mpfr.h added an error message when the mantissa is larger than the precision (in mpfr_set_str_raw) added macros to recognize doubles that are NaNs and infinities (isinf is not portable and requires math.h) in case the destination precision is less than that of the operands, and the 1st iteration fails, increase directly the precision to the maximum of that of the operands, otherwise divisions by 1.0 may need lots of iterations added 'return' after dealing with infinities added wish from JC Fauge`re 2000-12-05 Paul Zimmermann mpfr_init/mpfr_init2 initialize to 0 (compatibility with mpf) fixed bug in mpfr_cmp2 when return value is k*BITS_PER_MP_LIMB-1 added new test for mpfr_cmp2 now ABSSIZE uses only 29 bits 2000-12-04 Paul Zimmermann added some explanations how to free the memory space allocated by mpfr_get_str fixed one bug found by N. Mueller (MPFR_ABSSIZE(u) was used instead of usize) added one more test from N. Mueller 2000-12-01 Paul Zimmermann cleaned calls to mpfr_extract added new line added error message when _mp_allocate_func returns 0 added header for mpfr_extract - documented what function does - cleaned code - added header about license... replaced log(2.0) by LOG2 [first step in getting rid of math.h] added extern "C" { ... } for inclusion in C++ removed old KARATSUBA threshold for gmp 2.0.2 fixed bug in mpfr_cmp3 (when b=0, s not taken into account) added swap/tswap test file for new function mpfr_swap added new function mpfr_swap changed copyright to Free Software Foundation added possible bug in mpfr_get_str now all is in mpfr.h return value was wrong for input non-zero (should return 1 = inexact) fixed/improved doc. of mpfr_sin_cos and mpfr_urandomb removed macro for mpfr_init_set_str_raw added prototype for mpfr_sin_cos sign of result was not correctly (re)set added test to check sign of square root 2000-11-29 Paul Zimmermann gained a factor of 2 in most cases (replaced initial constant factor=2 for additional bits for cos(x) by log(n)) added tsin_cos fixed potential problem in mpfr_sub1 (k=0 and kc<0) test file for sin/cos 2000-11-28 Paul Zimmermann forgot cast to int before comparison between imax (can be negative) and an returned value was one too small in case d=1 added new test from N. Mueller added return for case of infinities added macro MPFR_RESET_INF don't forget to reset infinity flag if set! fixed bug in mpfr_cmp2: wrong limb considered after cp[cn--] when cp[cn] was not 111...111 fixed bug when imax>an 2000-11-27 Paul Zimmermann added macro MPFR_IS_ZERO 2000-11-21 Guillaume Hanrot Infinis, premiere tentative (tests) Infinis, premiere tentative. 2000-11-13 Paul Zimmermann added one remark from GH removed mpfr_cmp2 2000-11-13 Guillaume Hanrot Added support for Inf. Modified zeta. 2000-10-26 Paul Zimmermann protection of macros done shell-script to replace xxx by yyy in all source files protected macros: xxx -> MPFR_xxx protected all macros: xxx -> MPFR_xxx 2000-10-24 Paul Zimmermann fichier d'include pour mpfi.c interval arithmetic level (1st version) added two suggestions from Ben Hinkle 2000-10-19 Guillaume Hanrot Bof. Suppression de vieilleries. 1 << 31 -> ((unsigned int)1) << 31. Correction de prototypes faux dans le cas ou on n'est pas -D__STDC__. 2000-10-02 Paul Zimmermann malloc -> *_mp_allocate_func or TMP_ALLOC mpfr_t -> mpfr_ptr or mpfr_srcptr 2000-09-29 Paul Zimmermann removed -> all is in texp.c added comparison between exp2 and exp3 take also the target precision into account for the guard bits new faster version with O(n^(1/3)*M(n)) algorithm adjusted exp2-exp3 threshold for new faster version of mpfr_exp2 added mpz_set_fr.c added tdump fixed pb for op=0 (added \0 at the end of string) use strlen to determine memory to free test file for mpfr_dump removed karasqrt.c, added sqrtrem.c kara_sqrtrem -> mpn_sqrtrem_new now replaced by new code in sqrtrem.c now uses new code mpn_sqrtrem_new new version of fast MPN square root (should be integrated in a future release of GNU MP) 2000-09-28 Paul Zimmermann added another example from N. Mueller fixed another ABW bug fixed two Array Bound Writes fixed one Array Bound Read (to_nearest, bp=cp and k>=cn) added 2 new tests from Norbert Mueller 2000-09-27 Paul Zimmermann added new test fixed Array Bound Write 2000-09-20 Paul Zimmermann added some words about the inclusion of mpfr.h we need to better protect macros removed MPFR_OBJECTS (does not work) added $(MPFR_OBJECTS) in libmpfr_a_LIBADD added $(MPFR_OBJECTS) in libmpfr_a_DEPENDENCIES added contributions from Emmanuel Jeandel and Thom Mulders added Thom Mulders routines for naive/fast short multiplication, contributed by Thom Mulders (ETH Zu"rich) 2000-09-19 Paul Zimmermann added new test for overlapping x, y fixed problem when x=y 2000-09-14 Paul Zimmermann added pb from Norbert Muller fixed SEGV (mpn_lshift doesn't seem to like src_size=0) now prints "failed" when test file doesn't return 0 2000-08-29 Paul Zimmermann replaced mpn_divrem by mpn_tdiv_qr for gmp 3 or later and avoid copy of one operand when possible updated (make check, make install) described each file News for version 1.0 2000-08-25 Paul Zimmermann fixed bug for 0.9999999999... added test for 0.99999999999999999 2000-08-24 Paul Zimmermann added mpfr_swap now store last computed value together with last rounding mode 2000-08-23 Paul Zimmermann target ps -> mpfr.ps added $(srcdir) to trunc.c for sub-directory compilation 2000-08-16 Paul Zimmermann removed some memory leaks solved memory leaks with T[i] and qtoj[i] updated (done autoconf, faster mpfr_exp, sin/cos) updated for version 1.0 COPYING.LIB -> COPYING renamed back (wanted for "make dist") renamed back to COPYING (wanted for "make dist") GNU Library General Public License renamed to COPYING.LIB, according to mpfr.texi result was free'd twice when good=1 put information about authors PACKAGE and VERSION are not defined any more gmp-mparam.h is required too IRIX make does not recognize $< (MISCFLAGS) do not define PACKAGE and VERSION in AM_INIT_AUTOMAKE, this avoids conflicts with GMP 3.1 config.h [thanks to Kevin Ryde] updated for GMP 3.1 MP_BASE_AS_DOUBLE already defined in gmp-impl.h nb_terms[0] was not initialized fixed some FNH (free not in heap) problems for binary splitting method (prec >= 30000) gmp.info -> mpfr.info set_dfl_rnd.* -> set_rnd.* (to avoid conflict with set_dfl_prec.* on DOS 8.3) now automatically generated by configure added if (__GNU_MP_VERSION < 3) for mpn_divrem_1-bug patch set_dfl_rnd -> set_rnd new name of set_dfl_rnd.c (avoids clash with set_dfl_prec.c on DOS 8.3) renamed to set_rnd.c (otherwise truncates like set_dfl_prec.c on a DOS 8.3 filesystem) setfilename: gmp.info -> mpfr.info replaced path for libmpfr.a by $(top_builddir) test files are now in check_PROGRAMS instead of bin_PROGRAMS (they don't need to be installed) replaced back BITS_PER_MP_LIMB by mp_bits_per_limb (not important in test files) 2000-08-16 Paul Zimmermann replaced macros for mpfr_init_set_si by "do { ... } while (0)" so they'll work in an if/else like if (foo) mpfr_init_set_si (f, -123, GMP_RNDN); else bar (); [thanks to Kevin Ryde] 2000-08-16 Paul Zimmermann replaced mp_bits_per_limb by BITS_PER_MP_LIMB (constant) 2000-08-14 Paul Zimmermann added mpf2mpfr.h define check2 only with -DTEST updated for new configure from Emmanuel Jeandel, to GMP 3.xxx and removed errors with texinfo solaris --> __sparc__ ifdef IRIX64 -> ifdef __mips IRIX/make does not understand $< : expanded to trunc.c use standard macro for Alpha 2000-07-13 Emmanuel Jeandel autoconf options described timestamp modified timestamp changed nothing to say Timestamp Small bug fixed Timestamp modified ? Timestamp modified Nothing New release Bugs fixed Bug fixed sin_cos added New algorithm, new wrapper 2000-07-12 Paul Zimmermann replaced 0 by GMP_RNDN fixed (hopefully) bug for 1/1 in precision 32, 64, ... added test for 1/1 in precision 32 or 64 2000-07-11 Paul Zimmermann use mpfr_print_rnd_mode now 2000-07-11 Emmanuel Jeandel Bug Fixed, and installation guide made Fixed bug Bug Fixed with Solaris make strings.h added Deps included Bug Fixed Bug fixed Bug Fixed First Release *** empty log message *** First Release First release Added sin_cos First Release 2000-06-29 Emmanuel Jeandel Memory problems fixed Memory Leaks Fixed 2000-06-29 Paul Zimmermann added prototype for mpfr_sub_ui now use mpfr macros be careful not to call mpn_sub_n/mpn_sub_1 with a size 0 fixed to free an entire number of limbs test file for sub_ui 2000-06-28 Emmanuel Jeandel mpfr_exp3 and mpfr_extract added to Makefile First Release 2000-06-21 Paul Zimmermann distinguish between mpfr failure and difference with sqrt() ensures random numbers given to sqrt() are positive adapted for freebsd modified drand to avoid false NaNs (makes SEGV under FreeBSD) added entry for FreeBSD, removed -pedantic option added one test added new tests added prototype for mpfr_set_prec_raw removed work done fixed several bugs merged different roundings in case diff_exp Various patches for leaks, UMR and (one) BUS. 2000-06-19 Guillaume Hanrot This patch suppresses a few mem leaks. Suppressed memory leaks. Patch for 1 << (BITS_PER_MP_LIMB - x) when x is 0 (produces inexact results on PPCs). 2000-06-16 Paul Zimmermann arguments of gmp_randinit were in wrong order 2000-06-16 Guillaume Hanrot Patch in the case when n_bits is a multiple of 32. 2000-06-16 Paul Zimmermann added patch to get denorms on IRIX64 put instruction to get denormalized numbers on IRIX64 out of #ifdef TEST fixed bug occurring on LinuxPPC (1 << 32) added one test (bug on LinuxPPC) added one test fixed several problems added more tests 2000-06-16 Guillaume Hanrot Patches for the case where the precision is a multiple of the word size. 2000-06-16 Paul Zimmermann fixed another bug added one test added prototype for mpz_set_fr improved choice of initial precision added mpz_set_fr (conversion from mpfr to mpz) added return type 'int' for main 2000-06-15 Guillaume Hanrot Added TESTFLAGS to the main Makefile. Added ttrunc. Minor patch (put to 0 the nonsignificant bits). Added declaration of trunc, ceil, floor. Tests for trunc, ceil, floor. Added TESTFLAGS variable to the compile instruction, for use as make "TESTFLAGS=-DTEST" 2000-06-15 Paul Zimmermann 1 -> (mp_limb_t) 1 [pb on 64-bit machines] reduced number of tests to 1000 2000-06-15 Guillaume Hanrot Display of statistics is only toggled if a number of tests to be performed is given. Shameful hack, but is getopt really portable ? Added trandom, teq Added random2, urandomb Added div_2exp to the (very rough) test. Very basic statistical tests for random, random2, urandomb. Patch for random (libc's random() is on 31 bits only) Test for mpfr_eq. Patch a few incoherences of eq.c wrt the manual + adapt to mpfr usual semantics 2000-06-07 Paul Zimmermann header file providing cputime() function test file comparing mpfr_exp and mpfr_exp2 O(n^(1/3)*log(n)) algorithm using Brent's method and Brent-Kung's O(sqrt(t)) algorithm to evaluate a power series of order t [exact rounding not yet finished] 2000-05-29 Paul Zimmermann fixed bug in mpfr_round (wrong sign) fixed bug in mpfr_round: did not check allocated space was large enough main -> int main added #ifdef TEST: if not defined (default), then function mpfr_set_machine_rnd_mode is not defined added #ifdef TEST to disable comparison with machine arithmetic by default (i.e. calls to mpfr_set_machine_rnd_mode) removed longlong.h (not needed) now deals with NaN RND_MODE -> rnd_mode mpfr_init is now a function (no more a macro) printf -> fprintf added mpfr_init as function changed (x) -> x fixed several typos removed printf 2000-05-26 Paul Zimmermann added ifdef TEST removed debug line added one test added 2 new tests little change more changes added ifdef TEST does not use machine rounding mode any more added 7 new tests fixed typo in printf format fixed several rounding problems rewritten case dif<=0 and PREC(b)>PREC(a) (merged all roundings) removed DEBUG, VERBOSE ifdef's fixed (hopefully) the case dif<=0, PREC(b)>PREC(a), directed rounding replaced (mp_limb_t)1 by macro ONE fixed bug for GMP_RNDN with overlap=1 removed misplaced comment added one test does not use rnd_mode.c by default removed unused label fixed more tiny bugs 2000-05-25 Paul Zimmermann use mpfr_print_rnd_mode now added one test added more tests removed TMP_ALLOC stuff fixed new bug when a <- b - c with tiny c fixed bug in a <- b-c when c very small but does not overlap with a removed 'inline' (does not compile on Alpha with gcc 2.8.1) added include file unistd.h fixed warning with long arguments initial version added tests for mpfr_set_str now returns 0 if all works changed to return the error in ulps added new functions mpfr_set_str and mpfr_inp_str added prototypes for set_str, inp_str changed return value for mpfr*pow* separated functions with/without rounding argument added tabs added set_str.o and inp_str.o 2000-05-24 Paul Zimmermann initial version added rule for sub_ui.o use only one file (trunc.c) for ceil, floor, trunc now use trunc.c for all 3 functions (ceil, floor, trunc) added ifdef to avoid warning at compilation removed unused variable fixed output type for mpfr_ui_div removed 3rd argument (use PREC(rop) instead) added include longlong.h stupid typo: ABSSIZE -> ABSSIZE(x) change due to new semantics of mpfr_init_set* macros now makes an error when precision too large wrt allocated space added new implemented functions - added macro for mpfr_sgn - removed argument 'p' in mpfr_init_set* macros for compatibility with mpf updated wrt new functions added sub_ui added new test files new test files added new tests improved tests new functions (compatibility with mpf) added 4th arg (was missing in non-stdc def) added new functions (compatibility with mpf) added several prototypes fixed remaining bug (case overlap=5, dif>0) added add_ui, sqrt_ui, ui_div, ui_sub, reldiff 2000-05-21 Guillaume Hanrot Compatibility mpf/mpfr, second part. Ceil, floor, trunc. Yet untested. Include file for compatibility module mpf -> mpfr. Compatibility with mpf. WARNING: THESE FUNCTIONS ARE UNTESTED IN THEIR PRESENT FORM. THEY *DO* COMPILE HOWEVER. 2000-05-18 Paul Zimmermann removed unused variables removed ';' added return added calls to mpf[r]_clear, and rewrote to avoid memory leaks added calls to free corrected comment about field mp_size 2000-05-12 Paul Zimmermann added tests for negative numbers added one test fixed pb with rounding of negative numbers 2000-05-11 Paul Zimmermann added mpfr_abs test file for mpfr_abs added mpfr_abs (macro using mpfr_set4) updated wrt done/new tasks 2000-05-05 Paul Zimmermann added two tests split mpfr_init2 into mpfr_init and mpfr_set_prec removed karadiv.o replaced mpn_divrem_n by mpn_divrem (efficient in GMP 3.0) not needed any more with GMP 3.0 removed mpn_divrem_n stuff, now that Burnikel/Ziegler algorithm is in GMP 3.0 added one test 2000-05-04 Paul Zimmermann completely rewritten (changed semantics) initialized variable bh to avoid warning at compilation added prototype for mpfr_set_default_rounding_mode fixed pb in mpfr_cmp_ui_2exp for i=0 updated according to meeting from May 4, 2000 updated for AIX updated for AIX (thanks to Gerardo Ballabio) 2000-05-02 Paul Zimmermann added one test fixed bug found by G. Ballabio for b=0 and 0 added -ffloat-store for Alpha/OSF added cast to mp_limb_t (bug on Alpha in tadd with -O2) added one test removed #if 0 swapped gmp-impl.h and longlong.h for GMP 3.0 2000-04-14 Paul Zimmermann added more tests fixed pb when target precision is less than integer length fixed problem not solved so far, i.e. when adding round bit produces a change of exponent 2000-04-13 Paul Zimmermann fixed computation of ulps removed variable xrw in mpfr_round_raw (not used) replaced 1st my by my+sh in mpfr_round_raw call added 2 more tests 2000-04-13 Guillaume Hanrot Correction d'un bug quand le carry contient tous les bits significatifs. 2000-02-11 Paul Zimmermann improved indentation mpfr_pi -> mpfr_const_pi added one test mpfr_pi -> mpfr_const_pi use mpfr_cmp_ui instead of SIGN mpfr_log2 -> mpfr_const_log2 added -O2 compilation flag added set_q convert rational (mpz_q) to floating-point (mpfr_t) removed things which were done unsigned char -> mp_rnd_t SIGN -> MPFR_SIGN use PREC() macro instead of _mp_prec, and corrected size to free SIGN -> MPFR_SIGN unsigned char -> mp_rnd_t SIGN -> MPFR_SIGN added non standard C header unsigned char -> mp_rnd_t unsigned long int -> mp_prec_t renamed to mpfr_const_log2 unsigned char -> mp_rnd_t unsigned char -> mp_rnd_t SIGN -> MPFR_SIGN unsigned long int -> mp_prec_t unsigned char -> mp_rnd_t unsigned long int -> mp_prec_t unsigned char -> mp_rnd_t renamed to mpfr_const_pi unsigned char -> mp_rnd_t unsigned char -> mp_rnd_t added non standard C header SIGN -> MPFR_SIGN added non standard C header unsigned char -> mp_rnd_t SIGN -> MPFR_SIGN unsigned long int -> mp_prec_t unsigned char -> mp_rnd_t SIGN -> MPFR_SIGN unsigned long int -> mp_prec_t har -> mp_rnd_t changed rounding mode to mp_rnd_t 2000-02-04 Paul Zimmermann now distinguish between true mpfr errors and possible errors from libm.a now use print_rnd_mode added suggestion from JP Merlet added print_rnd_mode.c added more tests fixed bug(s) found by Jean-Pierre Merlet changed prototype of mpfr_set_f (takes now only 3 arguments) 2000-02-03 Paul Zimmermann added karasqrt.o added prototype for kara_sqrtrem added redefinition of KARATSUBA_MUL_THRESHOLD (if not defined) removed definition of LOG_MP_BITS_PER_LIMB (was not used) changed return type to mp_size_t and included mpfr.h moved definition of KARATSUBA_MUL_THRESHOLD (if not defined) to mpfr.h implements Katatsuba square root now use kara_sqrtrem instead of mpn_sqrtrem fixed bug when high limb of quotient is zero 2000-02-02 Paul Zimmermann added one test [did fail on alpha] added cast to mp_limb_t in front of 1< added prototype for mpn_divrem_n (Burnikel-Ziegler algorithm) use mpn_divrem_n (Burnikel-Ziegler algorithm) instead of mpn_divrem when rsize=rrsize added karadiv.c (to be removed when incorporated in GMP) Burnikel-Ziegler division 2000-01-31 Paul Zimmermann added further examples from V. Lefe`vre 1999-12-16 Paul Zimmermann added macri VERSION for target dist added new tests from V. Lefe`vre improved interface: tdiv N for doing N random tests added one test DEBUG2 -> DEBUG added debug instructions fixed nasty bug in mpfr_cmp2 (case cc=1) replaced printf by fprintf for error 1999-12-10 Paul Zimmermann added new tests for large input fixed bug for large input rewritten the error analysis: - now analyzes the cancellation a posteriori - takes into account errors from rounding and initial approximation added tests from Vincent Lefe`vre no warning any more for negative exponent (thanks to V. Lefe`vre) 1999-12-08 Paul Zimmermann fixed bug found by V. Lefe`vre (when n<0, we have to compute an upper bound of log(2) instead of a lower bound) added new test (bug found by V. Lefe`vre) 1999-12-07 Paul Zimmermann added suggestion from V. Lefe`vre added several remarks from Vincent Lefe`vre corrected many typos found by Vincent Lefe`vre 1999-11-27 Paul Zimmermann removed executable rights improved GMP link (thanks to Vincent Lefe`vre) added pointer to Alpha-Linux f-p problems removed executable right on file 1999-10-20 Paul Zimmermann put back test for x=y modified to avoid y=-0.0 modified test procedure to return 53 when x=y mpfr_cmp2(b,c) now returns PREC(b) if b=c, even if c=0 added one test added test under Cygwin $make -> $MAKE removed *rand48 prototypes (pb under Cygwin) removed *rand48 prototypes removed lrand48 prototype (pb under Cygwin) added rounding instructions for Cygnus compiler under Windows added dummy *rand48 functions for CYGWIN added info about gmp-mparam.h incorporated data for CYGWIN 1999-10-15 Paul Zimmermann added one test added boundary cases from paper from Michael Parks 1999-10-14 Paul Zimmermann now set sign correctly added test to check sign is correctly set added worst case for arg. reduction fixed bug when initial approx. floor(x/log(2)) is too large 1999-10-08 Paul Zimmermann now use macros for Linux case, and added ifdef for _ISOC9X_SOURCE changed target dist to create archive in a directory 1999-10-07 Paul Zimmermann added targets doc and dist added documentation and contact for problems file for installation of mpfr added more tests now deal with 0 and fixed bug on 64-bit machine moved to sqrt.c now use directly mpn_sqrtrem (previously sqrt3.c) updated prototypes of mpfr_div/mpfr_sqrt removed div3 and sqrt3 div3 -> div moved to div.c replaced implementation using Goldschmidt's algorithm by that using directly mpn_divrem (previously div3.c) sqrt3 -> sqrt GNU Library Public License 1999-08-31 Paul Zimmermann removed printf statement added ABS for SIZ(z) when z<0 removed special 'exact' stuff for n=0 fixed prototype of random 1999-07-30 Paul Zimmermann replaced GNU MPFR by MPFR (not yet the GNU label) added copyright notice 1999-07-09 Paul Zimmermann added one test with prec=160 error term is N+1 and not N fixed bug in case sh=0 1999-07-08 Paul Zimmermann completely rewritten mpfr_can_round_raw, which costs now O(1) --- or more probably O(log n) --- instead of O(n) 1999-07-07 Paul Zimmermann changed mpfr_init2 to mpfr_set_prec added one test added prototype for mpfr_add1 added mpfr_clear 1999-07-07 Guillaume Hanrot sqrt3 now returns an exact / inexact flag. sqrt3 now returns an exact/inexact flag. 1999-07-07 Paul Zimmermann fix UMR (missing 0 terminating string) put initialization of exponent back (avoids some UMRs) fixed array bound write bug added one test added several tests, and does not print on stdout when no argument fixed several bugs 1999-07-07 Guillaume Hanrot Added an example which causes an ABW in mpz_get_str. 1999-07-07 Paul Zimmermann moved drand to mpfr-impl.h and added test in large precision added tout_str 1999-07-07 Guillaume Hanrot Problem with the exponents in the destructive case. 1999-07-07 Paul Zimmermann more changes from G. Hanrot use now drand48 instead of drand simply set to zero the non-significant bits, don't call mpfr_round_raw upgrade from bug fixes from Guillaume Hanrot stores now last computed value together with its rounding mode checks now destructive version 1999-07-07 Sylvie Boldo changes on random using div3 using sqrt3 1999-07-06 Guillaume Hanrot HPUX support, 2nd try. Patch for the (very seldom encountered) case of even rounding. 1999-07-06 Paul Zimmermann added def. for random/srandom, which do not exist under HPUX store now computed values _mpfr_log2_* -> __mpfr_log2_* merged machine rounding instructions for Sun and HP patch for HPUX (no random function) added print_rnd_mode fixed prototype of mpfr_print_rnd_mode improved ulp to deal with case a=0.0 added return 0 to main 1999-07-06 Guillaume Hanrot Forgotten casts. Added sqrt3 + tentative support for Alpha linux. The word added when the exponent is odd was sometimes uninitialized. Initial version. Added mpfr_sqrt3. 1999-07-06 Paul Zimmermann added several functions, and updated others changed prototype of mpfr_log returns now an int instead of void removed initialization of exponent special case for exp(0) added test for exp(0) 1999-07-06 Guillaume Hanrot config.in -> ./config.in 1999-07-05 Sylvie Boldo new, quick & clean 1999-07-05 Paul Zimmermann added two tests and converted to double's 1999-07-05 Sylvie Boldo more checking ways 1999-07-05 Paul Zimmermann distinguishes now between true errors and differences with libm.a (which may fail too) removed mpf stuff in check added some mpfr_clear's changed defs of random/srandom to work on Alpha mpfr_init2 -> mpfr_set_prec in check64 added function dbl added prototypes for mpfr_cmp3 and mpfr_set4 use mpfr_set4 now (no modification of const parameters any more) return 0 in mpfr_can_round_raw introduced auxiliary function mpfr_set4 fixed possible bug (testing sign of unsigned long) in mpfr_mul_ui replaced PREC(r) by prec (which was defined but not used) moved drand and ulp to mpfr-impl moved ulp to mpfr-impl.h and used input routine 'dbl' in some tests modified one test to avoid rounding from double input routines introduced auxiliary function mpfr_cmp3(x,y,sign) to compare x and sign*y moved drand and ulp to mpfr-impl.h mpfr_sub now calls directly mpfr_add1/mpfr_sub1 (no modification of const parameters any more) moved drand to mpfr-implh.h use mpfr_cmp3 instead of mpfr_cmp (avoids warning due to modification of const parameters) moved drand to mpfr-impl.h and removed warnings use the result of mpfr_can_round moved drand and ulp to mpfr-impl.h moved drand to mpfr-impl.h moved drand to mpfr-impl and removed warnings added include of math.h moved drand and ulp to mpfr-impl.h include file for mpfr developers only long -> int in drand adapted drand to sizeof(long)=64 config.in -> ./config.in (otherwise don't work under IRIX) removed warnings patch for GMP bug when UDIV_NEEDS_NORMALIZATION=1 1999-07-02 Guillaume Hanrot Correction of a typo. 1999-07-02 Paul Zimmermann fixed horrible hack yp[-1] 1999-07-02 Guillaume Hanrot Support of IRIX64 (n32/64 modes) plus cosmetic modifications. 1999-07-02 Paul Zimmermann added one test, and adapted to ANSI C 1999-07-02 Guillaume Hanrot Yet Another Backslash Forgotten... Bug le plus stupide de tous les temps corrige. Ca marchait sous Solaris... 1999-07-02 Paul Zimmermann added one test and removed warnings 1999-07-02 Guillaume Hanrot Added mpfr_div3. Added div3.c 1999-07-02 Paul Zimmermann fixed bug when sizeof(long) <> sizeof(mp_limb_t) and removed DEBUG2 stuff added one test, and removed warnings 1999-07-02 Guillaume Hanrot Added div3.c, initial release. Patch of the patch :) Pattern matching rules in tests Makefile for non-GNU make (eg Solaris) 1999-07-02 Paul Zimmermann adapted to enable denormalized numbers on IRIX64, added one test and removed warnings changed type of 3rd arg. 'neg' of mpfr_can_round_raw from char to int (pb with signed char's on some machines, e.g. IRIX64) adapted to IRIX64 (enable denorm. numbers) and removed warnings adapted to IRIX64 (enable denormalized numbers) and removed warnings adapted to IRIX64 (no denormalized by default) and removed warnings unsigned long -> mp_limb_t 1999-07-02 Sylvie Boldo unused variables unused variable 1999-07-02 Paul Zimmermann added ifdef to avoid warning "unused variable" on 64-bit machine added def. of swapRM to avoid warning on IRIX64 1UL -> ((mp_limb_t) 1) changed type of mask to mp_limb_t in mpfr_round_raw2 adapted for denormalized on IRIX64 now test NaNs too 1999-07-01 Guillaume Hanrot Due to the representation of 0 it might have happened that 0 != 0. Patch mpfr_set -> MPN_COPY Patch when prec < 32. 1999-07-01 Paul Zimmermann fixed bugs for 64-bit machines added casts to mp_limb_t added cast to mp_limb_t for shifts 1999-07-01 Sylvie Boldo prints nothing is everything is allright memory gestion one single bug more bad cases 1999-07-01 Paul Zimmermann added some certified tests added one test to check that 1*y = y 1999-07-01 Guillaume Hanrot Patch of an MLK due to multiple initialization of the same variables without freeing them in-between. Same as in sqrt (allocation problem). 1999-07-01 Paul Zimmermann fixed bug due to shift=0 in mpn_rshift 1999-07-01 Guillaume Hanrot (Temporary) patch for memory gestion in sqrt.c 1999-07-01 Paul Zimmermann mpfr_init -> mpfr_init2 initialize temporary variables with current precision 1999-06-30 Guillaume Hanrot Unbelievably stupid bug fixed. Two patches : one for an UMR which actually had no effect, one for an FNH in old code.. 1999-06-30 Sylvie Boldo new bug there were some conflicts there were some conflicts memory gestion 1999-06-29 Paul Zimmermann replaced outputs by direct comparison when no argument modified to do only certified test when no argument modified to do only tests with precomputed values when no argument does exact rounding only for n=0 1999-06-29 Jean-Luc Rémy added zeta/tzeta added prototypes for mpfr_exp and mpfr_zeta computes Riemann function Zeta(s) first version: only works for s=2 with PREC(result)=53 and rnd_mode=nearest test file for mpfr_zeta added prototype for mpfr_set_default_prec file renamed zeta.c first version: computes Zeta(2) with fixed precision 53 bits and round to nearest 1999-06-29 Guillaume Hanrot Patch in the case when the number of bits is a multiple of the word size. Patch in the case when the low words of the product are zero. 1999-06-28 Paul Zimmermann changed arguments of mpfr_round_raw (continued) changed arguments of mpfr_round_raw (now uses precision instead of size) modified wrt warnings at compilation modified description of mpfr_get_str for n_digits=0 now performs an exact output when n_digits=0 1999-06-28 Guillaume Hanrot Yet another corrected prototype. 1999-06-25 Guillaume Hanrot Prototypes et quelques causes de warnings corriges. Modifs cosmetiques. Fichier vide. 1999-06-25 Paul Zimmermann do not print anything when no argument use GMP allocate/free functions instead of malloc/free do not print anything on stdout put correctly sign with macro CHANGE_SIGN 1999-06-25 Guillaume Hanrot Ajoute la dépendance de libmpfr.a pour le Makefile des tests. 1999-06-25 Paul Zimmermann correctly handle case sizer=1 in mpfr_set_d corrected allocated size in mpfr_round make clean does not remove config.in any more 1999-06-25 Guillaume Hanrot Correction d'un UMR en inversant le while (sans incidence tres probablement). 1999-06-25 Paul Zimmermann added four tests adapted mpfr_set_d to case where allocated limbs > significant limbs fixed bug for b=2^n and c very small 1999-06-25 Guillaume Hanrot Some limbs of the result where not set to zero as they should. 1999-06-25 Paul Zimmermann added prototypes, and errors to stderr binary file -> remove it use PREC(x) instead of ABSSIZE(x) to get number of significant limbs adapted to different numbers of significant limbs for x and y fixed pbs with ABSSIZE(x) wrt PREC(x) in mpfr_round added pointer to exponent, removed test with sprintf removed DEBUG stuff use PREC(x) instead of ABSSIZE(x) to get the number of significant limbs do 10^6 tests if no argument 1999-06-25 Guillaume Hanrot J'avais oublie -g... Ajoute des flags de paranoiaque schizophrene. 1999-06-25 Paul Zimmermann now prints nothing with no argument added texp and tdiv_ui test file for div_ui, initial revision commented out "avant arrondi..." clear res1/res2 1999-06-25 Guillaume Hanrot Patches an ABR. Patch of an ABR. Patch in the case n = 0. Patch for a memory leak. 1999-06-25 Paul Zimmermann added two tests for exact roots removed DEBUG stuff and fixed pb with exact root and GMP_RNDZ 1999-06-25 Guillaume Hanrot Correction d'un ABR. 1999-06-25 Paul Zimmermann added test for prec=53 bits, removed output for argc==1 1999-06-25 Guillaume Hanrot Initial revision. 1999-06-24 Guillaume Hanrot Patched an Array Bound Read. Corrected an Array Bound Read when all the bits are significative. 1999-06-24 Paul Zimmermann i -> s in tests on mpfr_cmp_si fixed pb in mpfr_cmp_si_2exp (case b=0 or i=0) & -> && removed 3rd arg. of mpfr_set_prec treats case b=c in mpfr_sub(a,b,c) removed 3rd argument in mpfr_set_prec reallocates only when more limbs are needed removed 3rd arg. of mpfr_set_prec added some mpfr_clear's that were missing removed 3rd argument from mpfr_set_prec removed 3rd argument of mpfr_set_prec changed prototype of mpfr_set_prec (no rounding mode needed any more) added test for case of missing exponent and if one argument, print it as a double fixed bug when exponent was missing (wrong result when part before binary point is not zero) added tests from JM Muller and V Lefevre 1999-06-23 Paul Zimmermann corrected bad case in mpfr_can_round_raw where rnd1=GMP_RNDN and err is a multiple of BITS_PER_MP_LIMB (was modifying an extra limb perhaps not allocated) 1999-06-23 Sylvie Boldo qq bugs d'arrondis 1999-06-23 Paul Zimmermann added exp and div_ui added test of exp(Pi*sqrt(163)/3)-640320 [texp 0.0 prec] test file for mpfr_exp, initial revision added two tests removed printf's and added one test for leading '+' now allows leading '+' 1999-06-23 Sylvie Boldo nettoye 1999-06-23 Paul Zimmermann removed printf removed printf's added tests for large precision (tlog x prec rnd) added test for exact division mpfr_cmp -> mpfr_cmp2 removed printf, added exit on error initial revision cleaned local variables changed prototype of mpfr_div (now returns int) now deals correctly with exact division removed DEBUG stuff returns 0/1 according to exact division 1999-06-22 Paul Zimmermann fixed bug found by F. Rouillier: x * Z(2/x) -> 0 [carry from mpfr_round_raw] 1999-06-22 Guillaume Hanrot Fill with 0 the part added in case of a larger reallocation. Rajoute le bug report de Fabrice. 1999-06-22 Paul Zimmermann fixed bug in mpfr_can_round when prec or err are multiples of BITS_PER_MP_LIMB added test to check sign of result fixed bug: wrong sign when SIGN(a)<0 at beginning 1999-06-22 Sylvie Boldo avec plein de cas d'erreurs marche bien Marche bien 1999-06-21 Guillaume Hanrot Corrected prototype of mpfr_can_round_raw. Various patches. Added prototype for mpfr_can_round_raw Added mpfr_can_round_raw ; mpfr_can_round just calls it. Declaration mpfr_print_rnd_mode.c print_rnd_mode.c -> mpfr_print_rnd_mode.c Print the rounding mode. Changement de semantique (plus d'arrondi) et alloc + free -> realloc. 1999-06-21 Paul Zimmermann initial revision added one test now deal with carry from mpfr_round_raw fixed problem with count_leading_zeros undefined for 0 store computed value and try to reuse it for next calls added test cn>= in mpfr_cmp2 added mpfr_sub_one_ulp 1999-06-18 Sylvie Boldo tests par rapport aux doubles pour decouvrir les erreurs version qui marche 1999-06-18 Paul Zimmermann special cases NaN and 0 fixed a few errors 1999-06-17 Paul Zimmermann added tests for n=0 and d=0 added test for 0.0/1.0 SET_NAN(q) -> SET_NAN(Q) added one exact root with rounding towards zero added one test added two tests patch to detect exact roots (otherwise problem with rounding to zero) changed way zero is represented : most sign. limb is zero added special case for zero special case for zero special cases for NaN and zero special case when one of the arguments is zero added bug found by S. Boldo and fixed (pb in mpfr_round_raw2) fixed bug in mpfr_round_raw2 which was returning other values than 0 or 1 1999-06-17 Guillaume Hanrot Corrected a potential problem in add(a, a, a); Corrected a potential problem in sub(a, a, a); 1999-06-17 Paul Zimmermann SET_NAN(x) -> SET_NAN(X) 1999-06-17 Guillaume Hanrot Patch in cmp2 for some dirty cases (2^a + 2^b <-> 2^a + z, z << 2^a, b << a) 1999-06-17 Paul Zimmermann added test to check bug found by JL Remy added TMP_DECL/TMP_MARK/TMP_FREE in mpfr_sub1 to deal with case where destination=source 1999-06-16 Guillaume Hanrot Bug dans set_d(0) ; la mantisse n'est pas initialisee a 0 correctement. Gere differemment les problemes d'egalite entre destinations et arguments. Rajoute log.o et tlog Vire fichier inutile. 1999-06-16 Paul Zimmermann added new tests fixed bug for overlap=k*mp_bits_per_limb, k>=1 1999-06-16 Guillaume Hanrot Vire Makefile de CVS. Vire les Makefile de CVS. 1999-06-16 Paul Zimmermann added one test and random init. added one test added tests for cases where destination = source cases NaN and destination=source now iterates if one cannot round after 1st try, and deals with case destination = source mpfr_can_round again and again added case of NaN added macro SET_ZERO now allows destination = source 1999-06-16 Guillaume Hanrot Vire les tests de cvs. 1999-06-15 Paul Zimmermann printf -> fprintf error message when destination equals source (case not yet treated) now uses the given rounding mode internally instead of always GMP_RNDZ now rounding to nearest should be correct 1999-06-15 Guillaume Hanrot Encore et toujours mpfr_can_round... Nettoyage. Patch pour mpfr_can_round. 1999-06-15 Sylvie Boldo sans instructions de debuggage rajout de log.o et tlog rajout de tlog ajout du log *** empty log message *** premiere version du log 1999-06-15 Paul Zimmermann now recognizes division by exact power of 2 added mpfr_cmp_[us]i_2exp added mpfr_[us]i_2exp added mpfr_cmp_[us]i_2exp 1999-06-15 Guillaume Hanrot Correction de bug (pas msb normalise). 1999-06-15 Paul Zimmermann fixed mistake in error analysis (does not change code) 1999-06-15 Guillaume Hanrot Ajout de random.o dans les objets. random.c : engendre un mpfr_t dans [0, 1[. GH, 15/06 TODO : un random qui engendre un mpfr_t avec exposant gaussien centre. 1999-06-15 Jean-Luc Rémy changed return value to void 1999-06-14 Guillaume Hanrot Ajoute les modes d'arrondi RNDN et RNDD. Correction du prototype de mpfr_mul_ui Correction du prototype de mpfr_mul_ui 1999-06-14 Sylvie Boldo *** empty log message *** 1999-06-14 Paul Zimmermann added several files added several prototypes added set_z, add_one_ulp added mpfr_get_d2 which only considers the mantissa now uses mpfr_get_d2 (no side effect on arguments) test file for mpfr_log2 test file for mpfr_set_z test file for mpfr_pi computes log(2) add one ulp set a mpfr from an integer computes Pi to n bits 1999-06-14 Sylvie Boldo *** empty log message *** 1999-06-11 Paul Zimmermann Initial revision of mpfr documentation 1999-06-10 Guillaume Hanrot Patch d'un mpfr_set_d dans tsqrt.c ; GH, 100699 Patch d'un mpfr_set_d dans get_str.c ; GH, 100699 Tentative de configuration automatique, v. initiale. GH, 100699 1999-06-10 Sylvie Boldo *** empty log message *** 1999-06-10 Paul Zimmermann added tout_str Initial revision. added out_str.c and pow.c added proto for mpfr_pow_ui and mpfr_ui_pow_ui Initial revision. added include (needed for FILE in mpfr.h) added proto for mpfr_out_str function to print a mpfr to a stream. Initial revision. changed proto of mpfr_get_str: 2nd arg is mp_exp_t*, not char* now conforms to the specification 1999-06-09 Guillaume Hanrot tset_i -> tset_si dans le Makefile de tests. Version corrigee de mmpfr. Makefile qui devrait fonctionner pour tous. Correction de warnings dans tmul_2exp.c Initial revision