summaryrefslogtreecommitdiff
path: root/tests/tdiv.c
Commit message (Collapse)AuthorAgeFilesLines
* [tests/tdiv.c] Use set_emax rather than mpfr_set_emax with a test.vlefevre2021-01-311-6/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14285 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/*.c] When not in a test, use set_emin and set_emax rather thanvlefevre2021-01-311-3/+3
| | | | | | | 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
* 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
* [src,tests] Consistency: in prototypes, changedvlefevre2020-08-211-1/+1
| | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@14103 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
* [tests/*.c] Added missing "const" qualifier to "char *" when thisvlefevre2019-07-021-1/+1
| | | | | | | involves string literals (detected by using GCC's -Wwrite-strings option, via the default -Wdiscarded-qualifiers warning). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13515 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/tdiv.c] fixed test_20151023 (was giving an error with micro-gmp-8zimmerma2018-12-101-3/+5
| | | | | | | and GMP_CHECK_RANDOMIZE=1544431052619574) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13329 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] Fixed bad format string for an error message, detectedvlefevre2018-11-271-1/+2
| | | | | | with -D_MPFR_PREC_FORMAT=2 (using -Werror...). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13298 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] !mpfr_equal_p is better than mpfr_cmp.vlefevre2018-09-061-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13151 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] fixed test_20151023()zimmerma2018-09-061-3/+13
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13149 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] more detailed error messagezimmerma2018-09-041-2/+12
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13116 280ebfd0-de03-0410-8827-d642c229c3f4
* Replaced mpfr_mul_2exp & mpfr_div_2exp by mpfr_mul_2ui & mpfr_div_2ui,vlefevre2018-04-171-4/+4
| | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12607 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] improve coverage, now 100% for div.czimmerma2018-02-201-0/+47
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12347 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/div.c] get rid of mpfr_div_with_mpz_tdiv_qzimmerma2018-02-201-43/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12344 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] improve coveragezimmerma2018-02-201-3/+43
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12341 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] improve coverage of mpfr_div_2zimmerma2018-02-201-0/+75
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12340 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] mpfr_div bug bug20180126: also test negative values.vlefevre2018-01-271-19/+32
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12137 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] Updated comment about mpfr_div bug bug20180126.vlefevre2018-01-271-5/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12136 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] mpfr_div bug bug20180126 was introduced by r9086.vlefevre2018-01-271-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12134 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] Completed r12128 test with new comments and an assert.vlefevre2018-01-261-3/+9
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12132 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] Added test case for a mpfr_div bug of MPFR 4.vlefevre2018-01-261-0/+59
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12128 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
* [tests/tdiv.c] Added new non-regression test: the was the real cause ofvlefevre2017-12-191-0/+25
| | | | | | | the ttanh failure in r11993 without the tanh.c fix in this same commit. But this mpfr_div was fixed in r12002. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12016 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/div.c] fixed bug in mpfr_div2_approx()zimmerma2017-12-181-0/+17
| | | | | | | | [tests/tdiv.c] added non-regression test [tests/ttan.c] added test triggering bug in mpfr_div2_approx() git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12002 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] Solve issues with the incorrect use of mpfr_sgn, and make surevlefevre2017-09-151-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11755 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] Got rid of the use of mpfr_print_binary, in general withvlefevre2017-09-141-11/+12
| | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11750 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] Code simplification and improvement by using SAME_VAL().vlefevre2017-05-291-2/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11551 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged r11198-11280 from the trunk; no conflicts but additional changes:vlefevre2017-05-041-0/+25
| | | | | | | | | | | | | | | | | * 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11455 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the latest changes from the trunk.vlefevre2017-01-061-1/+49
| | | | 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
* Merged the latest changes from the trunk except those related tovlefevre2016-12-061-2/+4
| | | | | | | 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). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10971 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the following changesets from the trunk:vlefevre2016-09-021-0/+54
| | | | | | | | | 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
* [tests] Define the RND_RAND_NO_RNDF and RND_LOOP_NO_RNDF macros, similarvlefevre2016-07-221-6/+3
| | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10656 280ebfd0-de03-0410-8827-d642c229c3f4
* disable mpfr_all_div() for RNDFzimmerma2016-06-241-5/+7
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10499 280ebfd0-de03-0410-8827-d642c229c3f4
* replaced mpfr_cmp by !mpfr_equal_pzimmerma2016-06-241-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10498 280ebfd0-de03-0410-8827-d642c229c3f4
* added exhaustive tests for add,sub,mul,div,sqrtzimmerma2016-06-241-0/+51
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10497 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed mpfr_all_div() for RNDFzimmerma2016-06-231-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10481 280ebfd0-de03-0410-8827-d642c229c3f4
* more work on the faithful branchzimmerma2016-05-301-5/+13
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10385 280ebfd0-de03-0410-8827-d642c229c3f4
* Replaced various instances of mpfr_print_binary + newline (sometimesvlefevre2016-04-071-19/+19
| | | | | | missing) by mpfr_dump. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10252 280ebfd0-de03-0410-8827-d642c229c3f4
* changed test_generic() calls to start from MPFR_PREC_MIN instead of 2;zimmerma2016-02-051-1/+1
| | | | | | | this revealed a special-case code in mpfr_exp which didn't work for prec=1 git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9955 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
* 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/tdiv.c] Improved comment about the mpfr_divhigh_n_basecase bug.vlefevre2015-10-291-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9710 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] Updated comment about the mpfr_divhigh_n_basecase bug.vlefevre2015-10-291-2/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9705 280ebfd0-de03-0410-8827-d642c229c3f4
* fix bug reported by Ricky Farrzimmerma2015-10-271-0/+62
| | | | | | | (https://sympa.inria.fr/sympa/arc/mpfr/2015-10/msg00023.html) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9699 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2015 withvlefevre2015-02-131-1/+1
| | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9278 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] Forgot "exit (1);".vlefevre2014-06-261-0/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9103 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tdiv.c] Added mpfr_div tests on extreme values. This detectsvlefevre2014-06-261-0/+89
| | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9101 280ebfd0-de03-0410-8827-d642c229c3f4