summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* [tests/*.c] Added missing "const" qualifier to "char *" when thisvlefevre2019-07-027-13/+17
| | | | | | | | involves string literals (detected by using GCC's -Wwrite-strings option, via the default -Wdiscarded-qualifiers warning). (merged changeset r13515 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13516 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] Use MPFR_DBL_* macros when necessary.vlefevre2019-02-065-16/+19
| | | | | | (merged changeset r13446 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13449 280ebfd0-de03-0410-8827-d642c229c3f4
* Shared cache: cleanup and various improvements / corrections.vlefevre2019-01-271-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * acinclude.m4: - test $enable_shared_cache instead of $mpfr_want_shared_cache; - check ISO C11 thread support and/or POSIX thread support only when necessary; - 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 <pthread.h>); - with POSIX threads, 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; - 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); - 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. * acinclude.m4, configure.ac: 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. * src/mpfr-impl.h: added a comment about the cache-related types, which depend on the locking methods. * 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). * 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. * NEWS: update. (merged changesets r13032,13390-13396,13410,13412 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13416 280ebfd0-de03-0410-8827-d642c229c3f4
* [configure.ac] By default (i.e. if CFLAGS is not already set), ifvlefevre2019-01-251-4/+4
| | | | | | | | | | the compiler is GCC not in C++ mode, add the -Wc++-compat warning since we expect the code to compile with a C++ compiler. [acinclude.m4,tests/trint.c] Fixed C++ compatibility issues detected thanks to this option used with -Werror. (merged changesets r13406-13408 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13409 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tcheck.c] Corrected meaningless error message.vlefevre2019-01-131-1/+1
| | | | | | (merged changeset r13401 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13402 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tversion.c] Decimal formats: output the encoding type (DPD/BID).vlefevre2019-01-131-6/+12
| | | | | | | (merged changeset r12776 from the trunk, and as a consequence, completed the merge of r13003) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13400 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tstrtofr.c] Updated comment about GCC bug 86554: now fixed invlefevre2019-01-081-1/+3
| | | | | | | the GCC trunk. (merged changeset r13385 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13386 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/Makefile.am] Replaced "env -u DISPLAY" by "env DISPLAY=''" asvlefevre2019-01-071-2/+7
| | | | | | | the -u option is not supported by NetBSD. (merged changeset r13383 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13384 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated the www.gnu.org URL's (http → https) on all the files with:vlefevre2019-01-07192-192/+192
| | | | | | | perl -pi -e 's,http://www.gnu.org/,https://www.gnu.org/,g' **/*(.) under zsh. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13373 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/strtofr.c] Fixed various issues. In particular, the error analysisvlefevre2019-01-071-2/+257
| | | | | | | | | | | | | | | | | | with associated code was incorrect (due to the bad correction r8384 of a past bug, later really fixed in r11056). Also adapted the code to work with small-size limbs. [tests/tstrtofr.c] Added tests, including random tests. In particular, some part of the code was tested only on hard-to-round cases, meaning that some potential issues could not be detected (intermediate results were thrown out due to the next Ziv iteration). Moreover, in case of failure of some particular test, output the probable cause of this failure (GCC bug 86554) with a workaround. (merged changesets associated with these files r12566-13306,13364-13365 from the trunk) Note: There may still remain issues with mpfr_strtofr, to be checked later. At least, the tests do not fail. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13366 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2019 withvlefevre2019-01-01192-192/+192
| | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13360 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/set.c] Fixed double-rounding bug in the internal functionvlefevre2018-12-312-0/+153
| | | | | | | | | | | | mpfr_set_1_2 (and simplified the generic algorithm, avoiding the non-portable inex | inex2). [tests/tset.c] Added corresponding tests. [tests/tfmma.c] Added tests as this bug was affecting mpfr_fmma (note: mpfr_set_1_2 is also called in mpfr_fma, but the buggy code could not be executed in this case). (merged changesets r13346-13347,13353-13356 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13357 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] fixed test_20151023 (random number must not be 0).vlefevre2018-12-101-3/+5
| | | | | | (merged changeset r13329 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13330 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/Makefile.am] Unset DISPLAY as it is not needed and it can yieldvlefevre2018-11-292-4/+11
| | | | | | | | | error messages when running the tests with LOG_COMPILER=wine (for builds with MinGW). [tests/tversion.c] Updated a comment about this issue. (merged changesets r13305,13307-13309 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13310 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] Fixed test_20151023().vlefevre2018-11-271-3/+14
| | | | | | (merged changesets r13149,13151,13298 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13301 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_str.c] Added bug20180908() test.vlefevre2018-11-261-0/+17
| | | | | | (merged changesets r13164,13296 from the trunk, for the tests directory) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13297 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv_ui.c] fixed corner_cases() testvlefevre2018-09-131-1/+3
| | | | | | (merged changeset r13162 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13187 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tversion.c] Portability corrections related to the use of thevlefevre2018-08-221-29/+40
| | | | | | | preprocessor / code robustness. (merged changeset r13003 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13010 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tsub1sp.c] Added a test by merging r12997 from the trunk, andvlefevre2018-08-211-0/+21
| | | | | | modified the comment to say that the bug is only in the trunk. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12999 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tcan_round.c] Added missing casts for printf (error messages).vlefevre2018-08-201-4/+4
| | | | | | | | Bug detected under MS Windows, where size_t > unsigned long. See: https://sympa.inria.fr/sympa/arc/mpfr/2018-08/msg00002.html (merged changeset r12983 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12993 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tversion.c] Updated comment about missing output from thevlefevre2018-07-311-1/+2
| | | | | | | first printf with i586-mingw32msvc-gcc -D__USE_MINGW_ANSI_STDIO and run under Wine (issue not reproducible). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12969 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tversion.c] Try to detect missing output from the first printfvlefevre2018-07-301-1/+17
| | | | | | with i586-mingw32msvc-gcc -D__USE_MINGW_ANSI_STDIO and run under Wine. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12968 280ebfd0-de03-0410-8827-d642c229c3f4
* [acinclude.m4,configure.ac] Check the support of the group flag forvlefevre2018-07-301-0/+20
| | | | | | | | | native integers, which is a Single UNIX Specification extension. [src/vasprintf.c] Fixed bug with the P length modifier (mpfr_prec_t). [tests/tsprintf.c] Added testcases. (merged changesets r12958-12959,12961-12964 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12967 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/erf.c] In the computation of an error bound, replaced somevlefevre2018-07-231-2/+17
| | | | | | | | | | | | double's (which could overflow) by mpfr_t to fix bug reported by Naoki Shibata: https://sympa.inria.fr/sympa/arc/mpfr/2018-07/msg00028.html [tests/terf.c] Added a testcase for this bug. Increased the number of generic tests in order to reproduce the bug there too with the default seed. (merged changesets r12946-12949 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12950 280ebfd0-de03-0410-8827-d642c229c3f4
* Shared caches: fix and minor changes.vlefevre2018-07-192-1/+9
| | | | | | | | | | | | | | | * Fixed detection and use of C11 thread support: the C11 header is <threads.h>, not <thread.h>. * 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. (merged changeset r12937 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12938 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tconst_pi.c] Removed an incorrect assertion, as the #else wouldvlefevre2018-07-181-2/+4
| | | | | | | | be applicable when WANT_SHARED_CACHE is defined but not HAVE_PTHREAD (which may occur when MPFR_HAVE_C11_LOCK is defined). (merged changeset r12935 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12936 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/{tprintf.c,tsprintf.c}] Merged the latest tests from the trunkvlefevre2018-07-062-21/+196
| | | | | | (r12562:12903). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12904 280ebfd0-de03-0410-8827-d642c229c3f4
* Added MPFR_CHECK_LOCALES environment variable for the tests (to bevlefevre2018-07-042-10/+38
| | | | | | | | | used by developers): when set, terminate with an error if locales cannot be tested. (merged changeset r12870 from the trunk; merging tests/tprintf.c r12861 was needed first) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12872 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tget_set_d64.c] Tests on powers of 10: test negative numbers too.vlefevre2018-06-201-8/+23
| | | | | | (merged part of changeset r12792 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12793 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/set_d64.c] Fixed ternary value, which was always 0. This is done byvlefevre2018-06-191-0/+46
| | | | | | | | | using mpfr_strtofr instead of mpfr_set_str (merged part of changeset r12783 from the trunk). [tests/tget_set_d64.c] Added tests on powers of 10, checking the ternary value in particular (merged part of changeset r12782 from the trunk). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12786 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tstckintc.c] Avoid false warnings with -Wcast-align=strict fromvlefevre2018-06-191-6/+24
| | | | | | | | | GCC 8.1 by adding casts "(long *) (void *)", still allowing checks of other alignment requirements (which are not handled by the tstckintc.c code). (merged changeset r12698 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12785 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated mpfr.org URL's to use https (except in ChangeLog and NEWS).vlefevre2018-05-311-1/+1
| | | | | | (marked changeset r12740 as merged from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12741 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/gmp_op.c] Fixed a bug in mpfr_cmp_q on NaN rational: the NaN flagvlefevre2018-04-261-4/+27
| | | | | | | | | | was set by mpfr_set_q, but the flags were not restored just after. [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. (merged changesets r12343,12677 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12679 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged recent tests from the trunk (r12500-12555,12558,12561).vlefevre2018-04-266-5/+262
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12675 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/Makefile.am] Update of the "check" rule:vlefevre2018-04-261-1/+7
| | | | | | | | | * Output svnversion info when applicable. * Do not echo (complex) commands. * Do not output a useless "PASS ..." line at the end. (merged changesets r12535-12536 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12674 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/gmp_op.c] Fixed bug in mpfr_cmp_q when the denominator of thevlefevre2018-04-251-0/+49
| | | | | | | | mpq_t argument is 0. [tests/tgmpop.c] Added tests. (merged changesets r12499,12502 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12664 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged recent tests from the trunk (r12435-12453).vlefevre2018-04-253-3/+15
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12662 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed an issue with mpfr_get_str: The number 1 of significant digitsvlefevre2018-04-191-0/+36
| | | | | | | | | | | | | | | | | output in the string is now fully supported, i.e. * the value 1 can be provided for n (4th argument); * if n = 0, then the number of significant digits in the output string can now be 1, as already implied by the documentation (but the code was increasing it to 2). Changes: * doc/mpfr.texi: updated mpfr_get_str description to accept n = 1. * src/get_str.c: fixed the code as explained above (for n = 0, removed the increase to 2, and removed an MPFR_ASSERTN). * tests/tget_str.c: added tests. (merged changesets from the trunk: r12430 on tests/tget_str.c only; r12432,12434,12440) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12642 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tget_flt.c] Correction about the use of mpfr_signbit, in casevlefevre2018-04-191-1/+1
| | | | | | | the implementation would change. (merged changeset r12631 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12632 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged recent tests from the trunk (r12393-12424).vlefevre2018-04-196-101/+333
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12630 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/sqr.c] Fixed a bug in mpfr_sqr_1n in a rare case near underflow.vlefevre2018-04-191-0/+151
| | | | | | | | [tests/tsqr.c] Added tests, including non-regression for above bug (manually patched src/sqr.c since r12398 had other, unrelated changes; merged changesets r12398-12399 on tests/tsqr.c from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12629 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fma.c] Fixed various bugs related to internal overflows/underflows.vlefevre2018-04-191-62/+561
| | | | | | | | [tests/tfma.c] Added tests. (merged changesets r12393-12405,12583-12623 on these files from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12624 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] Removed some useless #include's, in particular all thevlefevre2018-04-113-8/+0
| | | | | | | | | | | | unconditional #include <math.h> 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, <math.h> is not required by freestanding implementations, so that it may be better to avoid it if possible. (merged changeset r12488 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12581 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] Merged the test from r12348, and replaced MUL_FFT_THRESHOLDvlefevre2018-04-111-1/+16
| | | | | | | by its default value 8448 (since the definition of MUL_FFT_THRESHOLD has not been moved in the 4.0 branch). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12580 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged recent tests from the trunk (r12288-12347).vlefevre2018-04-119-20/+699
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12579 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed type errors with -D_MPFR_PREC_FORMAT=2 in CFLAGS and thevlefevre2018-04-112-6/+7
| | | | | | | --enable-assert=full configure option (signaled by GCC's -Wformat). (merged changesets r12301-12302 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12578 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tversion.c] Output the sizes of long and intmax_t, andvlefevre2018-04-111-0/+18
| | | | | | | "Generic ABI code" info (MPFR_GENERIC_ABI). (merged changesets r12447,12575 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12577 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed spelling mistakes found by codespell 1.12.0.vlefevre2018-03-092-2/+2
| | | | | | (merged changeset r12474 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12475 280ebfd0-de03-0410-8827-d642c229c3f4
* Added codespell.ignore file with simple words to ignore with codespellvlefevre2018-03-082-3/+3
| | | | | | | | | | ("cas"; "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. Fixed spelling mistakes found by codespell 1.11.0. (merged changesets r12467-12469 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12470 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the latest tests from the trunk (r12258-12287).vlefevre2018-02-175-4/+401
| | | | | | | tsub and tsub1sp fail (bug fixed in the trunk) with both 32-bit and 64-bit ABI's, except when MPFR is built with "-DMPFR_GENERIC_ABI". git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12288 280ebfd0-de03-0410-8827-d642c229c3f4