summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [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
* [tests/tui_sub.c] Avoid a failure in 32-bit ABI by replacingvlefevre2017-05-291-1/+1
| | | | | | RND_LOOP by RND_LOOP_NO_RNDF. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11544 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the latest changes from the trunk.vlefevre2017-05-2951-490/+792
|\ | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11543 280ebfd0-de03-0410-8827-d642c229c3f4
| * added new referencezimmerma2017-05-291-0/+1
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11542 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tsprintf.c] Fixed setlocale usage (problem detected with MinGW)vlefevre2017-05-241-3/+2
| | | | | | | | | | | | | | | | 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". git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11533 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src] Moved "#include <errno.h>" from printf.c to vasprintf.cvlefevre2017-05-242-1/+2
| | | | | | | | | | | | | | | | (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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11532 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] Added overflow detection at the end (due to the switchvlefevre2017-05-241-23/+29
| | | | | | | | | | | | | | | | | | | | 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). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11531 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] Added log messages.vlefevre2017-05-241-0/+2
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11530 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] In case of overflow, do not stop before everything hasvlefevre2017-05-241-23/+9
| | | | | | | | | | | | been processed, allowing the %...n arguments to be filled, as decided. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11529 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tprintf.c] check_long_string() error handling: initialize n2 tovlefevre2017-05-241-8/+19
| | | | | | | | | | | | an invalid value and do all tests before exiting. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11528 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] Fixed some parts of overflow tracking.vlefevre2017-05-241-8/+16
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11527 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tprintf.c] More detailed error message.vlefevre2017-05-241-3/+5
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11526 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tprintf.c] Added tests with %ln.vlefevre2017-05-241-2/+29
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11525 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tprintf.c] Improved check_vprintf_failure().vlefevre2017-05-241-5/+12
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11524 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] Fixed the handling of the 'n' format specifiervlefevre2017-05-242-49/+41
| | | | | | | | | | | | | | | | | | | | | | 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(). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11523 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/mpfr-intmax.h] Define mpfr_uintmax_t and MPFR_INTMAX_MAX too.vlefevre2017-05-231-0/+5
| | | | | | | | | | | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11522 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] In a macro definition, changed a parameter tovlefevre2017-05-221-4/+4
| | | | | | | | | | | | lowercase so that it doesn't look like a constant to mpfrlint. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11521 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] Added a FIXME for the percent_n() / mixed() bug duevlefevre2017-05-221-0/+12
| | | | | | | | | | | | | | | | 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... git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11520 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/mpfr-intmax.h] Define mpfr_intmax_t as being the largestvlefevre2017-05-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11519 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tsprintf.c] Added explanation for the percent_n() / mixed() bugs.vlefevre2017-05-221-1/+4
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11518 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tsprintf.c] Added percent_n() test to reproduce the bug foundvlefevre2017-05-221-1/+28
| | | | | | | | | | | | in mixed(), bug without random data. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11517 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] In partition_number(), complete check for overflowvlefevre2017-05-221-26/+23
| | | | | | | | | | | | on total. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11516 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] Partially fixed check for integer overflow whenvlefevre2017-05-221-8/+11
| | | | | | | | | | | | the long and int types have the same size. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11515 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] With assertions enabled, check that the number ofvlefevre2017-05-221-1/+5
| | | | | | | | | | | | | | characters to be written computed in partition_number() corresponds to what is really written. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11514 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/vasprintf.c] Fixed the bug in the da_DK locale test: thevlefevre2017-05-221-1/+1
| | | | | | | | | | | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11513 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tsprintf.c] Do more tests in the da_DK locale (these are thevlefevre2017-05-221-6/+17
| | | | | | | | | | | | only tests for which the thousands separator is not empty). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11512 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tsprintf.c] Do more tests involving check_sprintf() in a loopvlefevre2017-05-221-18/+21
| | | | | | | | | | | | | | (to test mpfr_snprintf with size = 0 more often), and call mixed() later in order to get failures without the use of %n first. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11511 280ebfd0-de03-0410-8827-d642c229c3f4
| * get rid of computations with 'double' in mpfr_zetazimmerma2017-05-191-25/+1
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11510 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tsprintf.c] Added a TODO about %n test.vlefevre2017-05-191-0/+1
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11509 280ebfd0-de03-0410-8827-d642c229c3f4
| * [doc/README.dev] Added MPFR_TESTS_FPE_TRAP documentation.vlefevre2017-05-191-0/+4
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11508 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tests.c] Corrected comment about MPFR_TESTS_FPE_TRAP.vlefevre2017-05-191-1/+1
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11507 280ebfd0-de03-0410-8827-d642c229c3f4
| * Renamed MPFR_TESTS_DIVBYZERO to MPFR_TESTS_FPE_DIV (less confusing).vlefevre2017-05-193-7/+9
| | | | | | | | | | | | In doc/README.dev, updated the corresponding description. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11506 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests] Renamed MPFR_RAISE_EXCEPTIONS to MPFR_TESTS_FPE_TRAP.vlefevre2017-05-191-2/+2
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11505 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests] Got rid of MPFR_TESTS_EXCEPTIONS (added in r11489 and above),vlefevre2017-05-1912-52/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/tsprintf.c] Do the locale_da_DK() test several times to yieldvlefevre2017-05-191-6/+7
| | | | | | | | | | | | a failure by default once the bug triggered by mixed() is fixed. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11503 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tsprintf.c] Updated comment about r11501: the failure occursvlefevre2017-05-191-2/+2
| | | | | | | | | | | | with %n when the size argument of mpfr_vsnprintf is 0. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11502 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tsprintf.c] Do more tests with %n. One now gets a failurevlefevre2017-05-191-36/+51
| | | | | | | | | | | | by default (which occurs when one gets randsize <= 0). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11501 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tsprintf.c] Fixed portability issues: The va_end(3) man pagevlefevre2017-05-191-11/+9
| | | | | | | | | | | | | | | | 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." git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11500 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tget_set_d64.c] Disable tests with a division by 0 (which nowvlefevre2017-05-191-0/+4
| | | | | | | | | | | | occurs only with -DXDEBUG) if MPFR_ERRDIVZERO is defined. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11499 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
| * [doc/README.dev] Details for "-DMPFR_TESTS_DIVBYZERO -DMPFR_ERRDIVZERO".vlefevre2017-05-191-3/+10
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11497 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tsprintf.c] In mixed(), initialize n2 to an invalid valuevlefevre2017-05-191-0/+3
| | | | | | | | | | | | in order to ease failure analysis. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11496 280ebfd0-de03-0410-8827-d642c229c3f4
| * removed leftover debug statement in last commitzimmerma2017-05-191-1/+0
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11495 280ebfd0-de03-0410-8827-d642c229c3f4
| * fix for clang bug (https://bugs.llvm.org//show_bug.cgi?id=17686)zimmerma2017-05-191-0/+9
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11494 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tests.c] Change for MPFR_TESTS_DIVBYZERO: in case of FE_DIVBYZEROvlefevre2017-05-191-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11493 280ebfd0-de03-0410-8827-d642c229c3f4
| * more work on MPFR_TESTS_EXCEPTIONSzimmerma2017-05-1911-28/+37
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11492 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tests.c] Re-added code testing FE_DIVBYZERO and FE_INVALID withvlefevre2017-05-191-3/+20
| | | | | | | | | | | | | | -DMPFR_TESTS_DIVBYZERO -DMPFR_ERRDIVZERO, because MPFR_TESTS_EXCEPTIONS is not ready yet. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11491 280ebfd0-de03-0410-8827-d642c229c3f4
| * [tests/tversion.c] Output IEEE floats status.vlefevre2017-05-191-0/+6
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11490 280ebfd0-de03-0410-8827-d642c229c3f4
| * check for fp exceptions (experimental)zimmerma2017-05-191-11/+14
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11489 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/cmp2.c] Added/updated comments.vlefevre2017-05-171-2/+4
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11488 280ebfd0-de03-0410-8827-d642c229c3f4