summaryrefslogtreecommitdiff
path: root/tests/tset_ld.c
Commit message (Collapse)AuthorAgeFilesLines
* Copyright notice update: added 2020 withvlefevre2020-01-091-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/branches/4.0@13659 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/branches/4.0@13373 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/branches/4.0@13360 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed type errors with -D_MPFR_PREC_FORMAT=2 in CFLAGS and thevlefevre2018-04-111-1/+1
| | | | | | | --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
* Added codespell.ignore file with simple words to ignore with codespellvlefevre2018-03-081-1/+1
| | | | | | | | | | ("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
* [tests]vlefevre2018-02-081-3/+0
| | | | | | | | | * tset_float128.c, tset_ld.c: removed obsolete WITH_FPU_CONTROL related code. * Added/updated comments about the config.h inclusion. (merged changesets r12214-12215 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12216 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests]vlefevre2018-02-021-0/+1
| | | | | | | | | | * Replaced calloc + free by tests_allocate + tests_free as usual. * Replaced some fprintf with stderr by printf. * Do bitwise operations in unsigned arithmetic. * Formatting. (merged changesets r12188-12190 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12191 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] Fixed the cases where tests_start_mpfr was called too late,vlefevre2018-02-021-10/+0
| | | | | | | | | | | | | | | | | | | | 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). [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. (merged changesets r12185-12186 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12187 280ebfd0-de03-0410-8827-d642c229c3f4
* Minor date-related changes as in the trunk:vlefevre2018-01-091-1/+1
| | | | | | | | | | * Copyright notice update in most files: added 2018. * 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). * doc/mpfr.texi: updated the month. (merged changesets r12067-12069 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12077 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Also test mpfr_get_ld in reduced exponent rangevlefevre2017-10-091-27/+45
| | | | | | (no failures on x86). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11778 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] Got rid of MPFR_TESTS_EXCEPTIONS (added in r11489 and above),vlefevre2017-05-191-4/+4
| | | | | | | | | | | | | | | | | which is redundant with MPFR_TESTS_DIVBYZERO and MPFR_ERRDIVZERO. The code related to these exception 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 <errno.h> is included. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11504 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Disable an overflow test with a division by 0vlefevre2017-05-191-0/+2
| | | | | | (now occurs only with -DXDEBUG) if MPFR_ERRDIVZERO is defined. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11498 280ebfd0-de03-0410-8827-d642c229c3f4
* more work on MPFR_TESTS_EXCEPTIONSzimmerma2017-05-191-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11492 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2017 withvlefevre2017-01-011-1/+1
| | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11117 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/set_ld.c,tests/tset_ld.c] Updated comments, in particularvlefevre2016-11-171-12/+4
| | | | | | concerning LDBL_MAX. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10963 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Added an overflow test that triggers a bug forvlefevre2016-11-151-0/+27
| | | | | | | double-double (IBM long double format). See: https://sympa.inria.fr/sympa/arc/mpfr/2016-11/msg00006.html git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10961 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Added a missing exit(1).vlefevre2016-11-151-0/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10959 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests] _GMP_IEEE_FLOATS was got rid of in r10150, but still used invlefevre2016-11-151-1/+1
| | | | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10958 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Moved a comment.vlefevre2016-09-121-2/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10851 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Fixed print_binary (and no longer any failure withvlefevre2016-09-121-18/+15
| | | | | | gcc -mpc64 on x86). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10850 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Corrected note in print_binary.vlefevre2016-09-121-5/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10849 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Reverted r10847 (it was incomplete and I was testingvlefevre2016-09-121-16/+21
| | | | | | the wrong code). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10848 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Fixed print_binary.vlefevre2016-09-121-21/+16
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10847 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Added a FIXME in print_binary, which can yield anvlefevre2016-09-121-0/+3
| | | | | | | incorrect output (this is not related to the failure, i.e. this is a second bug to fix). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10846 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Added a test that triggers a failure with gcc -mpc64vlefevre2016-09-121-1/+9
| | | | | | on x86 (64-bit ABI). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10845 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Added some tests in case the rounding precision isvlefevre2016-09-121-2/+18
| | | | | | smaller than MPFR_LDBL_MANT_DIG (e.g. with gcc -mpc64 on x86). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10844 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] In print_binary, added an assertion that may failvlefevre2016-09-121-1/+4
| | | | | | with flush-to-zero on underflow (avoiding an infinite loop). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10843 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Simplified a condition in print_binary (BTW, the oldvlefevre2016-09-121-3/+4
| | | | | | | | 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). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10842 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Replaced a condition by a simpler, equivalent one.vlefevre2016-09-121-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10841 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] added notezimmerma2016-09-101-0/+8
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10840 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] get rid of C99-only stuffzimmerma2016-09-091-8/+12
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10839 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Removed a variable that is no longer used.vlefevre2016-09-091-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10838 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] FIXME: nextafterl and ilogbl are C99 only.vlefevre2016-09-091-0/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10837 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] fixed computation of smallest subnormal using nextafterlzimmerma2016-09-091-10/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10836 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] added warningzimmerma2016-09-091-2/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10835 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] fixed print_binary() for when the rounding precision is lesszimmerma2016-09-091-4/+17
| | | | | | | than the precision of long double git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10834 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/get_ld.c] Replaced FIXME by an explanation of the current behavior.vlefevre2016-09-091-0/+1
| | | | | | [tests/tset_ld.c] Added a FIXME as a consequence. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10833 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Avoid a freeze in print_binary under NetBSD due tovlefevre2016-09-081-6/+13
| | | | | | excess precision in LDBL_MAX (we do not run the test in this case). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10825 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] The print_binary function is freezing on a NetBSDvlefevre2016-09-081-6/+8
| | | | | | machine; let's start with some improvements (assertions...). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10823 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Moved mpfr_test_init at the right place (likevlefevre2016-09-081-2/+1
| | | | | | tget_d.c, tset_d.c, etc.). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10821 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Fixed a loop in case an extended range is usedvlefevre2016-09-081-5/+7
| | | | | | (there are issues on a NetBSD machine, and this could be a cause). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10819 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] Corrected a type (due to a printf with %ld).vlefevre2016-09-081-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10818 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] The bug_20160907 test is valid only withvlefevre2016-09-071-1/+3
| | | | | | HAVE_LDOUBLE_IEEE_EXT_LITTLE. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10811 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] check more numbers in bug_20160907()zimmerma2016-09-071-0/+22
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10809 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tset_ld.c] added test that triggers bug in mpfr_get_ldzimmerma2016-09-071-0/+33
| | | | | | | (https://sympa.inria.fr/sympa/arc/mpfr/2016-09/msg00005.html) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10807 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
* 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
* Use MPFR_IS_NEG and MPFR_IS_POS instead of comparing the sign with 0.vlefevre2014-06-251-1/+1
| | | | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9092 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated URL's.vlefevre2014-06-221-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9081 280ebfd0-de03-0410-8827-d642c229c3f4