summaryrefslogtreecommitdiff
path: root/tests/tgeneric.c
Commit message (Collapse)AuthorAgeFilesLines
* [tests/tgeneric.c] Added debug info.vlefevre2021-02-061-0/+5
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14390 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests]vlefevre2021-02-021-191/+228
| | | | | | | | * 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). git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14322 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/*.c] When not in a test, use set_emin and set_emax rather thanvlefevre2021-01-311-10/+10
| | | | | | | 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 git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14284 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Added a cast for printf.vlefevre2021-01-291-1/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14271 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Corrected indentation.vlefevre2021-01-291-9/+9
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14270 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Corrected indentation.vlefevre2021-01-291-3/+3
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14269 280ebfd0-de03-0410-8827-d642c229c3f4
* new function mpfr_acosu (still to be added in NEWS and mpfr.texi)zimmerma2021-01-291-5/+12
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14267 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2021 withvlefevre2021-01-031-1/+1
| | | | | | | | 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. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14229 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Removed the use of __func__ as it is not supportedvlefevre2020-12-171-2/+1
| | | | | | by ISO C90 (it was not really useful here, though). git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14224 280ebfd0-de03-0410-8827-d642c229c3f4
* For the generic tests, output the number of normal cases and the totalvlefevre2020-12-171-0/+4
| | | | | | | if the MPFR_TGENERIC_STAT environment variable is defined. Added description to the README.dev file. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14221 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed a compiler warning found by Clang 10.0.1 on armv8-a (Samsung S8zimmerma2020-08-201-1/+1
| | | | | | | | | | | | | | 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) ^~~~~~~~~~~~~~ git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@14098 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] In the MPFR_SUSPICIOUS_OVERFLOW case, output yprec.vlefevre2020-06-091-4/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13952 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2020 withvlefevre2020-01-081-1/+1
| | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13652 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated the www.gnu.org URL's (http → https) on all the files with:vlefevre2019-01-071-1/+1
| | | | | | | 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/trunk@13372 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2019 withvlefevre2019-01-011-1/+1
| | | | | | | | 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/trunk@13359 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] revert 13107 (abort might lose some data in open files)zimmerma2018-09-031-3/+3
| | | | | | | [src/mul_ui.c] fixed for 16-bit limb and reduced exponent range git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13108 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] replace exit(1) by abort() to allow debugging with gdbzimmerma2018-09-031-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13107 280ebfd0-de03-0410-8827-d642c229c3f4
* removed TEST_FLAGS stuffzimmerma2018-08-311-4/+0
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13095 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/mpfr-test.h] added macro TEST_FLAGS (debug use only)zimmerma2018-08-221-0/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13004 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Do several overflow/underflow tests instead of 1, andvlefevre2018-01-101-5/+10
| | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12088 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Added comments for tests in a reduced exponent range.vlefevre2018-01-101-5/+17
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12087 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2018 withvlefevre2018-01-031-1/+1
| | | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12067 280ebfd0-de03-0410-8827-d642c229c3f4
* DEBUG_TGENERIC -> MPFR_DEBUG_TGENERICzimmerma2017-12-111-7/+7
| | | | | | | XDEBUG -> MPFR_DISABLE_IEEE_FLOATS git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11956 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] Avoid duplicate code by defining the MAKE_STR() macro invlefevre2017-09-131-3/+0
| | | | | | mpfr-test.h only instead of tgeneric.c and tversion.c. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11739 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] For MPFR_RNDF, replaced EQUAL() by SAME_VAL(),faithfulvlefevre2017-05-291-8/+1
| | | | | | which also tests the sign (to distinguish +0 and -0). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11545 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the latest changes from the trunk.vlefevre2017-01-061-0/+10
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11151 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the latest changes from the trunk.vlefevre2017-01-011-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11121 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/round_prec.c] Forbid rnd2 = MPFR_RNDF as it does not make muchvlefevre2016-09-021-1/+2
| | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10780 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the following changesets from the trunk:vlefevre2016-09-021-1/+1
| | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10776 280ebfd0-de03-0410-8827-d642c229c3f4
* Removed trailing spaces.vlefevre2016-06-241-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10507 280ebfd0-de03-0410-8827-d642c229c3f4
* more work on branch faithfulzimmerma2016-06-221-10/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10480 280ebfd0-de03-0410-8827-d642c229c3f4
* RNDF: fixed texp10 and tgenericzimmerma2016-06-021-2/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10406 280ebfd0-de03-0410-8827-d642c229c3f4
* more work on the faithful branchzimmerma2016-05-301-11/+80
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10385 280ebfd0-de03-0410-8827-d642c229c3f4
* start implementing RNDF (work in progress)zimmerma2016-05-281-2/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10380 280ebfd0-de03-0410-8827-d642c229c3f4
* added generic tests for mpfr_log_ui + compare with mpfr_logzimmerma2016-05-241-9/+26
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10359 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Check NaN argument, mainly in order to check the NaNvlefevre2016-05-201-10/+27
| | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10299 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed the number of special tests for 2-argument functionszimmerma2016-02-171-8/+8
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10057 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Fixed a typo in latest commit, and added min/maxvlefevre2016-02-171-4/+31
| | | | | | | and max/min special tests for functions with 2 arguments. This triggers a failure in tfmod on 64-bit machines at least. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10051 280ebfd0-de03-0410-8827-d642c229c3f4
* now mpfr_gamma_inc(a,x) also works for 'a' a negative integerzimmerma2016-02-171-3/+8
| | | | | | | | (however a and x should not be too large, we should implement Legendre's continued fraction for the general case) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10049 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/{tgeneric.c,tsi_op.c}] Added TODO.vlefevre2016-02-091-0/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10004 280ebfd0-de03-0410-8827-d642c229c3f4
* Replacedvlefevre2016-02-041-1/+1
| | | | | | | | Contributed by the AriC and Caramel projects by Contributed by the AriC and Caramba projects git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9941 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Improved the generic tests in order to trigger thevlefevre2016-01-201-1/+6
| | | | | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9848 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2016 withvlefevre2016-01-011-1/+1
| | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9779 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Fixed overflow/underflow tests introduced in r9539:vlefevre2015-06-101-82/+70
| | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9544 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Check whether the exponent range has beenvlefevre2015-06-101-4/+13
| | | | | | | modified by the tested function (which should never happen). This check triggers failures in tlgamma, tlngamma and tsin. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9541 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Added overflow/underflow tests (→ 4 failed tests).vlefevre2015-06-101-85/+201
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9539 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Removed unless parentheses.vlefevre2015-06-051-2/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9511 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Special cases with unsigned long argument.vlefevre2015-06-051-9/+9
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9510 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tgeneric.c] Major clean-up, with some minor corrections.vlefevre2015-06-041-87/+120
| | | | | | | | 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). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9502 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] Added always_scale argument (boolean) to tests_default_random()vlefevre2015-05-291-2/+9
| | | | | | | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9471 280ebfd0-de03-0410-8827-d642c229c3f4