diff -Nru mpfr4-4.0.1/acinclude.m4 mpfr4-4.0.2/acinclude.m4 --- mpfr4-4.0.1/acinclude.m4 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/acinclude.m4 2019-01-27 18:30:16.000000000 +0000 @@ -1,6 +1,6 @@ dnl MPFR specific autoconf macros -dnl Copyright 2000, 2002-2018 Free Software Foundation, Inc. +dnl Copyright 2000, 2002-2019 Free Software Foundation, Inc. dnl Contributed by the AriC and Caramba projects, INRIA. dnl dnl This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ dnl dnl You should have received a copy of the GNU Lesser General Public License dnl along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -dnl http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +dnl https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., dnl 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. dnl autoconf 2.60 is necessary because of the use of AC_PROG_SED. @@ -44,6 +44,66 @@ AC_REQUIRE([AC_HEADER_TIME]) AC_REQUIRE([AC_CANONICAL_HOST]) +dnl Features for the MPFR shared cache. This needs to be done +dnl quite early since this may change CC, CFLAGS and LIBS, which +dnl may affect the other tests. + +if test "$enable_shared_cache" = yes; then + +dnl Prefer ISO C11 threads (as in mpfr-thread.h). + MPFR_CHECK_C11_THREAD() + + if test "$mpfr_c11_thread_ok" != yes; then +dnl Check for POSIX threads. Since the AX_PTHREAD macro is not standard +dnl (it is provided by autoconf-archive), we need to detect whether it +dnl is left unexpanded, otherwise the configure script won't fail and +dnl "make distcheck" won't give any error, yielding buggy tarballs! +dnl The \b is necessary to avoid an error with recent ax_pthread.m4 +dnl (such as with Debian's autoconf-archive 20160320-1), which contains +dnl AX_PTHREAD_ZOS_MISSING, etc. It is not documented, but see: +dnl https://lists.gnu.org/archive/html/autoconf/2015-03/msg00011.html +dnl +dnl Note: each time a change is done in m4_pattern_forbid, autogen.sh +dnl should be tested with and without ax_pthread.m4 availability (in +dnl the latter case, there should be an error). + m4_pattern_forbid([AX_PTHREAD\b]) + AX_PTHREAD([]) + if test "$ax_pthread_ok" = yes; then + CC="$PTHREAD_CC" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$LIBS $PTHREAD_LIBS" +dnl Do a compilation test, as this is currently not done by AX_PTHREAD. +dnl Moreover, MPFR needs pthread_rwlock_t, which is conditionally defined +dnl in glibc's bits/pthreadtypes.h (via ), not sure why... + AC_MSG_CHECKING([for pthread_rwlock_t]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +]], [[ +pthread_rwlock_t lock; (void) lock; +]])], + [AC_MSG_RESULT([yes]) + mpfr_pthread_ok=yes], + [AC_MSG_RESULT([no]) + mpfr_pthread_ok=no]) + else + mpfr_pthread_ok=no + fi + fi + + AC_MSG_CHECKING(if shared cache can be supported) + if test "$mpfr_c11_thread_ok" = yes; then + AC_MSG_RESULT([yes, with ISO C11 threads]) + elif test "$mpfr_pthread_ok" = yes; then + AC_MSG_RESULT([yes, with pthread]) + else + AC_MSG_RESULT(no) + AC_MSG_ERROR([shared cache needs C11 threads or pthread support]) + fi + +fi + +dnl End of features for the MPFR shared cache. + AC_CHECK_HEADER([limits.h],, AC_MSG_ERROR([limits.h not found])) AC_CHECK_HEADER([float.h],, AC_MSG_ERROR([float.h not found])) AC_CHECK_HEADER([string.h],, AC_MSG_ERROR([string.h not found])) @@ -206,24 +266,6 @@ dnl Check for attribute constructor and destructor MPFR_CHECK_CONSTRUCTOR_ATTR() -dnl Check for POSIX Thread. Since the AX_PTHREAD macro is not standard -dnl (it is provided by autoconf-archive), we need to detect whether it -dnl is left unexpanded, otherwise the configure script won't fail and -dnl "make distcheck" won't give any error, yielding buggy tarballs! -dnl The \b is necessary to avoid an error with recent ax_pthread.m4 -dnl (such as with Debian's autoconf-archive 20160320-1), which contains -dnl AX_PTHREAD_ZOS_MISSING, etc. It is not documented, but see: -dnl https://lists.gnu.org/archive/html/autoconf/2015-03/msg00011.html -dnl -dnl Note: each time a change is done in m4_pattern_forbid, autogen.sh -dnl should be tested with and without ax_pthread.m4 availability (in -dnl the latter case, there should be an error). -m4_pattern_forbid([AX_PTHREAD\b]) -AX_PTHREAD([]) - -dnl Check for ISO C11 Thread -MPFR_CHECK_C11_THREAD() - dnl Check for fesetround AC_CACHE_CHECK([for fesetround], mpfr_cv_have_fesetround, [ saved_LIBS="$LIBS" @@ -504,14 +546,6 @@ dnl Now try to check the long double format MPFR_C_LONG_DOUBLE_FORMAT -if test "$enable_logging" = yes; then - if test "$enable_thread_safe" = yes; then - AC_MSG_ERROR([enable either `Logging' or `thread-safe', not both]) - else - enable_thread_safe=no - fi -fi - dnl Check if thread-local variables are supported. dnl At least two problems can occur in practice: dnl 1. The compilation fails, e.g. because the compiler doesn't know @@ -635,9 +669,19 @@ dnl Check if __float128 is available. We also require the compiler dnl to support C99 constants (this prevents the __float128 support dnl with GCC's -std=c90, but who cares?). +dnl Note: We use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE since an +dnl error may occur only at link time, such as under NetBSD: +dnl https://mail-index.netbsd.org/pkgsrc-users/2018/02/02/msg026220.html +dnl https://mail-index.netbsd.org/pkgsrc-users/2018/02/05/msg026238.html +dnl By using volatile and making the exit code depend on the value of +dnl this variable, we also make sure that optimization doesn't make +dnl the "undefined reference" error disappear. if test "$enable_float128" != no; then - AC_MSG_CHECKING(if compiler knows __float128 with C99 constants) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[__float128 x = 0x1.fp+16383q;]])], + AC_MSG_CHECKING(if __float128 with hex constants is supported) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ +volatile __float128 x = 0x1.fp+16383q; +return x == 0; +]])], [AC_MSG_RESULT(yes) AC_DEFINE([MPFR_WANT_FLOAT128],1,[Build float128 functions])], [AC_MSG_RESULT(no) @@ -680,11 +724,6 @@ MPFR_LTO fi -dnl Check if the shared cache was requested and its requirements are ok. -if test "$mpfr_want_shared_cache" = yes ;then - MPFR_CHECK_SHARED_CACHE() -fi - ]) dnl end of MPFR_CONFIGS @@ -909,11 +948,13 @@ /* "before" is 16 bytes to ensure there's no padding between it and "x". We're not expecting any "long double" bigger than 16 bytes or with alignment requirements stricter than 16 bytes. */ -struct { +typedef struct { char before[16]; long double x; char after[8]; -} foo = { +} foo_t; + +foo_t foo = { { '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\001', '\043', '\105', '\147', '\211', '\253', '\315', '\357' }, -123456789.0, @@ -1423,6 +1464,31 @@ [AC_DEFINE([NPRINTF_T], 1, [gmp_printf cannot read ptrdiff_t])]) ]) +dnl MPFR_CHECK_PRINTF_GROUPFLAG +dnl --------------------------- +dnl Check the support of the group flag for native integers, which is +dnl a Single UNIX Specification extension. +dnl This will be used to enable some tests, as the implementation of +dnl the P length modifier for mpfr_*printf relies on this support. + +AC_DEFUN([MPFR_CHECK_PRINTF_GROUPFLAG], [ +AC_MSG_CHECKING(if gmp_printf supports the ' group flag) +AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +]], [[ + char s[256]; + + if (gmp_sprintf (s, "%'d", 17) == -1) return 1; + return (strcmp (s, "17") != 0); +]])], + [AC_MSG_RESULT(yes) + AC_DEFINE([PRINTF_GROUPFLAG], 1, [Define if gmp_printf supports the ' group flag])], + [AC_MSG_RESULT(no)], + [AC_MSG_RESULT(cannot test, assume no)]) +]) +]) + dnl MPFR_LTO dnl -------- dnl To be representative, we need: @@ -1480,32 +1546,6 @@ rm -f conftest* ]) -dnl MPFR_CHECK_SHARED_CACHE -dnl ---------------------- -dnl Check if the conditions for the shared cache are met: -dnl * either pthread / C11 are available. -dnl * either constructor or once. -AC_DEFUN([MPFR_CHECK_SHARED_CACHE], [ - AC_MSG_CHECKING(if shared cache is supported) - if test "$enable_logging" = yes ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([shared cache does not work with logging support.]) -dnl because logging support disables threading support - elif test "$enable_thread_safe" != yes ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([shared cache needs thread attribute.]) - elif test "$ax_pthread_ok" != yes && "$mpfr_c11_thread_ok" != yes ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([shared cache needs pthread/C11 library.]) - else - AC_MSG_RESULT(yes) - if test "$ax_pthread_ok" = yes ; then - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$LIBS $PTHREAD_LIBS" - fi - fi -]) - dnl MPFR_CHECK_CONSTRUCTOR_ATTR dnl --------------------------- dnl Check for constructor/destructor attributes to function. @@ -1547,7 +1587,7 @@ AC_MSG_CHECKING([for ISO C11 thread support]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include -#include +#include mtx_t lock; once_flag once = ONCE_FLAG_INIT; thrd_t thd_idx; diff -Nru mpfr4-4.0.1/aclocal.m4 mpfr4-4.0.2/aclocal.m4 --- mpfr4-4.0.1/aclocal.m4 2018-02-07 12:57:45.000000000 +0000 +++ mpfr4-4.0.2/aclocal.m4 2019-01-31 20:43:19.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -460,7 +460,8 @@ AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], [ax_cv_PTHREAD_PRIO_INHERIT], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[int i = PTHREAD_PRIO_INHERIT;]])], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], [ax_cv_PTHREAD_PRIO_INHERIT=yes], [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) @@ -506,7 +507,7 @@ AC_LANG_POP ])dnl AX_PTHREAD -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -518,10 +519,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15.1], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -537,12 +538,12 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15.1])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -604,7 +605,7 @@ # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -656,7 +657,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -687,7 +688,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -878,13 +879,12 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -892,49 +892,41 @@ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -943,18 +935,17 @@ # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1041,8 +1032,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -1109,7 +1100,7 @@ Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -1151,7 +1142,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1172,7 +1163,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2017 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1194,7 +1185,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1229,7 +1220,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1237,49 +1228,42 @@ # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1318,7 +1302,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1347,7 +1331,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1394,7 +1378,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1413,7 +1397,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1494,7 +1478,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1554,7 +1538,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1582,7 +1566,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1601,7 +1585,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru mpfr4-4.0.1/ar-lib mpfr4-4.0.2/ar-lib --- mpfr4-4.0.1/ar-lib 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/ar-lib 2019-01-31 20:43:20.000000000 +0000 @@ -4,7 +4,7 @@ me=ar-lib scriptversion=2012-03-01.08; # UTC -# Copyright (C) 2010-2017 Free Software Foundation, Inc. +# Copyright (C) 2010-2018 Free Software Foundation, Inc. # Written by Peter Rosin . # # This program is free software; you can redistribute it and/or modify @@ -18,7 +18,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a diff -Nru mpfr4-4.0.1/AUTHORS mpfr4-4.0.2/AUTHORS --- mpfr4-4.0.1/AUTHORS 2016-05-22 22:27:26.000000000 +0000 +++ mpfr4-4.0.2/AUTHORS 2018-07-06 07:21:18.000000000 +0000 @@ -18,9 +18,9 @@ Philippe Théveny Main author Sylvain Chevillard Original version of ai.c Charles Karney mpfr_nrandom and mpfr_erandom functions -Fredrik Johannsson New version of mpfr_const_euler +Fredrik Johansson New version of mpfr_const_euler Mickaël Gastineau MPFRbench program The main authors are included in the MPFR mailing-list . This is the preferred way to contact us. For further information, please -look at the MPFR web page . +look at the MPFR web page . diff -Nru mpfr4-4.0.1/BUGS mpfr4-4.0.2/BUGS --- mpfr4-4.0.1/BUGS 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/BUGS 2019-01-07 13:53:20.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ############################################################################## diff -Nru mpfr4-4.0.1/ChangeLog mpfr4-4.0.2/ChangeLog --- mpfr4-4.0.1/ChangeLog 2018-02-07 12:52:40.000000000 +0000 +++ mpfr4-4.0.2/ChangeLog 2019-01-31 20:38:43.000000000 +0000 @@ -1,4 +1,2208 @@ ------------------------------------------------------------------------ +r13433 | vlefevre | 2019-01-31 20:33:50 +0000 (Thu, 31 Jan 2019) | 2 lines +Changed paths: + M /branches/4.0/NEWS + +[NEWS] Put the "Option -pedantic is now always removed [...]" line +at the right place (4.0.2, not 4.0.1: r13422 was wrong). +------------------------------------------------------------------------ +r13432 | vlefevre | 2019-01-31 20:29:48 +0000 (Thu, 31 Jan 2019) | 1 line +Changed paths: + M /branches/4.0/VERSION + M /branches/4.0/configure.ac + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/src/mpfr.h + M /branches/4.0/src/version.c + +Updated version to 4.0.2. +------------------------------------------------------------------------ +r13431 | vlefevre | 2019-01-31 15:59:16 +0000 (Thu, 31 Jan 2019) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/Makefile.am + +[src/Makefile.am] In check-exported-symbols, replaced grep by $(GREP) +as usual and like in check-gmp-symbols. +(merged changeset 13429 from the trunk) +------------------------------------------------------------------------ +r13424 | vlefevre | 2019-01-30 12:45:13 +0000 (Wed, 30 Jan 2019) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/configure.ac + +[configure.ac] Updated comment about default options in CFLAGS for GCC. +(merged changeset r13423 from the trunk) +------------------------------------------------------------------------ +r13422 | vlefevre | 2019-01-30 09:26:44 +0000 (Wed, 30 Jan 2019) | 8 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/INSTALL + M /branches/4.0/NEWS + M /branches/4.0/configure.ac + +Update about CC / CFLAGS settings from GMP (__GMP_CC / __GMP_CFLAGS). + * configure.ac: remove -pedantic unconditionally; since r7044, it was + removed only when logging was enabled, as at that time only logging + was using C extensions. + * NEWS: added a line about this change. + * INSTALL: updated the note about CC / CFLAGS, removing the obsolete + reference to GMP 4.3.0 at the same time. +(merged changeset r13421 from the trunk) +------------------------------------------------------------------------ +r13418 | vlefevre | 2019-01-27 23:08:51 +0000 (Sun, 27 Jan 2019) | 1 line +Changed paths: + M /branches/4.0/ChangeLog + +ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC0 svn log -rHEAD:0 -v". +------------------------------------------------------------------------ +r13417 | vlefevre | 2019-01-27 23:01:21 +0000 (Sun, 27 Jan 2019) | 1 line +Changed paths: + M /branches/4.0/VERSION + M /branches/4.0/configure.ac + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/src/mpfr.h + M /branches/4.0/src/version.c + +Updated version to 4.0.2-rc2. +------------------------------------------------------------------------ +r13416 | vlefevre | 2019-01-27 18:30:16 +0000 (Sun, 27 Jan 2019) | 38 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/NEWS + M /branches/4.0/acinclude.m4 + M /branches/4.0/configure.ac + M /branches/4.0/src/mpfr-impl.h + M /branches/4.0/src/mpfr-thread.h + M /branches/4.0/tests + M /branches/4.0/tests/tversion.c + +Shared cache: cleanup and various improvements / corrections. + * 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 + ); + - 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) +------------------------------------------------------------------------ +r13409 | vlefevre | 2019-01-25 02:00:06 +0000 (Fri, 25 Jan 2019) | 6 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/acinclude.m4 + M /branches/4.0/configure.ac + M /branches/4.0/tests + M /branches/4.0/tests/trint.c + +[configure.ac] By default (i.e. if CFLAGS is not already set), if +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) +------------------------------------------------------------------------ +r13402 | vlefevre | 2019-01-13 15:39:13 +0000 (Sun, 13 Jan 2019) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tcheck.c + +[tests/tcheck.c] Corrected meaningless error message. +(merged changeset r13401 from the trunk) +------------------------------------------------------------------------ +r13400 | vlefevre | 2019-01-13 01:15:11 +0000 (Sun, 13 Jan 2019) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tversion.c + +[tests/tversion.c] Decimal formats: output the encoding type (DPD/BID). +(merged changeset r12776 from the trunk, and as a consequence, +completed the merge of r13003) +------------------------------------------------------------------------ +r13399 | vlefevre | 2019-01-13 00:17:11 +0000 (Sun, 13 Jan 2019) | 1 line +Changed paths: + M /branches/4.0/VERSION + M /branches/4.0/configure.ac + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/src/mpfr.h + M /branches/4.0/src/version.c + +Updated version to 4.0.2-dev. +------------------------------------------------------------------------ +r13398 | vlefevre | 2019-01-13 00:15:31 +0000 (Sun, 13 Jan 2019) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/doc/mpfr.texi + +[doc/mpfr.texi] Minor correction for non-tex versions. +Thanks to Trevor Spiteri for the bug report. +(merged changeset r13397 from the trunk) +------------------------------------------------------------------------ +r13387 | vlefevre | 2019-01-08 13:43:12 +0000 (Tue, 08 Jan 2019) | 1 line +Changed paths: + M /branches/4.0/ChangeLog + +ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC0 svn log -rHEAD:0 -v". +------------------------------------------------------------------------ +r13386 | vlefevre | 2019-01-08 13:30:18 +0000 (Tue, 08 Jan 2019) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tstrtofr.c + +[tests/tstrtofr.c] Updated comment about GCC bug 86554: now fixed in +the GCC trunk. +(merged changeset r13385 from the trunk) +------------------------------------------------------------------------ +r13384 | vlefevre | 2019-01-07 16:11:57 +0000 (Mon, 07 Jan 2019) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/Makefile.am + +[tests/Makefile.am] Replaced "env -u DISPLAY" by "env DISPLAY=''" as +the -u option is not supported by NetBSD. +(merged changeset r13383 from the trunk) +------------------------------------------------------------------------ +r13382 | vlefevre | 2019-01-07 15:22:38 +0000 (Mon, 07 Jan 2019) | 1 line +Changed paths: + M /branches/4.0/ChangeLog + +ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC0 svn log -rHEAD:0 -v". +------------------------------------------------------------------------ +r13381 | vlefevre | 2019-01-07 15:17:51 +0000 (Mon, 07 Jan 2019) | 4 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/COPYING + M /branches/4.0/COPYING.LESSER + +Updated files: + * COPYING from https://www.gnu.org/licenses/gpl-3.0.txt + * COPYING.LESSER from https://www.gnu.org/licenses/lgpl-3.0.txt +These are URL updates and cosmetic changes. +------------------------------------------------------------------------ +r13379 | vlefevre | 2019-01-07 14:32:20 +0000 (Mon, 07 Jan 2019) | 4 lines +Changed paths: + M /branches/4.0/ChangeLog + +ChangeLog update with "LC_ALL=en_US.UTF8 TZ=UTC0 svn log -rHEAD:0 -v". +Note: For r5400, this changes an incorrect update done via r13373 back +to the old log message, as the URL in this log message here describes +a change in one of the files. +------------------------------------------------------------------------ +r13377 | vlefevre | 2019-01-07 14:06:05 +0000 (Mon, 07 Jan 2019) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/doc/README.dev + +[doc/README.dev] Updated some URL's (http → https). +(merged changeset r13376 from the trunk) +------------------------------------------------------------------------ +r13375 | vlefevre | 2019-01-07 13:57:16 +0000 (Mon, 07 Jan 2019) | 1 line +Changed paths: + M /branches/4.0/doc/texinfo.tex + +[doc/texinfo.tex] Update to 2018-02-12.17 with "autoreconf -i -f". +------------------------------------------------------------------------ +r13373 | vlefevre | 2019-01-07 13:53:20 +0000 (Mon, 07 Jan 2019) | 3 lines +Changed paths: + M /branches/4.0/BUGS + M /branches/4.0/COPYING + M /branches/4.0/ChangeLog + M /branches/4.0/INSTALL + M /branches/4.0/NEWS + M /branches/4.0/README + M /branches/4.0/TODO + M /branches/4.0/acinclude.m4 + M /branches/4.0/configure.ac + M /branches/4.0/doc/FAQ.html + M /branches/4.0/doc/README.dev + M /branches/4.0/doc/faq.xsl + M /branches/4.0/doc/fdl.texi + M /branches/4.0/examples/can_round.c + M /branches/4.0/examples/divworst.c + M /branches/4.0/examples/rndo-add.c + M /branches/4.0/examples/sample.c + M /branches/4.0/examples/version.c + M /branches/4.0/src/abort_prec_max.c + M /branches/4.0/src/acos.c + M /branches/4.0/src/acosh.c + M /branches/4.0/src/add.c + M /branches/4.0/src/add1.c + M /branches/4.0/src/add1sp.c + M /branches/4.0/src/add_d.c + M /branches/4.0/src/add_ui.c + M /branches/4.0/src/agm.c + M /branches/4.0/src/ai.c + M /branches/4.0/src/amd/amdfam10/mparam.h + M /branches/4.0/src/amd/athlon/mparam.h + M /branches/4.0/src/amd/k8/mparam.h + M /branches/4.0/src/arm/mparam.h + M /branches/4.0/src/asin.c + M /branches/4.0/src/asinh.c + M /branches/4.0/src/atan.c + M /branches/4.0/src/atan2.c + M /branches/4.0/src/atanh.c + M /branches/4.0/src/bernoulli.c + M /branches/4.0/src/beta.c + M /branches/4.0/src/buildopt.c + M /branches/4.0/src/cache.c + M /branches/4.0/src/cbrt.c + M /branches/4.0/src/check.c + M /branches/4.0/src/clear.c + M /branches/4.0/src/clears.c + M /branches/4.0/src/cmp.c + M /branches/4.0/src/cmp2.c + M /branches/4.0/src/cmp_abs.c + M /branches/4.0/src/cmp_d.c + M /branches/4.0/src/cmp_ld.c + M /branches/4.0/src/cmp_si.c + M /branches/4.0/src/cmp_ui.c + M /branches/4.0/src/comparisons.c + M /branches/4.0/src/const_catalan.c + M /branches/4.0/src/const_euler.c + M /branches/4.0/src/const_log2.c + M /branches/4.0/src/const_pi.c + M /branches/4.0/src/constant.c + M /branches/4.0/src/copysign.c + M /branches/4.0/src/cos.c + M /branches/4.0/src/cosh.c + M /branches/4.0/src/cot.c + M /branches/4.0/src/coth.c + M /branches/4.0/src/csc.c + M /branches/4.0/src/csch.c + M /branches/4.0/src/d_div.c + M /branches/4.0/src/d_sub.c + M /branches/4.0/src/digamma.c + M /branches/4.0/src/dim.c + M /branches/4.0/src/div.c + M /branches/4.0/src/div_2exp.c + M /branches/4.0/src/div_2si.c + M /branches/4.0/src/div_2ui.c + M /branches/4.0/src/div_d.c + M /branches/4.0/src/div_ui.c + M /branches/4.0/src/dump.c + M /branches/4.0/src/eint.c + M /branches/4.0/src/eq.c + M /branches/4.0/src/erandom.c + M /branches/4.0/src/erf.c + M /branches/4.0/src/erfc.c + M /branches/4.0/src/exceptions.c + M /branches/4.0/src/exp.c + M /branches/4.0/src/exp10.c + M /branches/4.0/src/exp2.c + M /branches/4.0/src/exp3.c + M /branches/4.0/src/exp_2.c + M /branches/4.0/src/expm1.c + M /branches/4.0/src/extract.c + M /branches/4.0/src/factorial.c + M /branches/4.0/src/fits_intmax.c + M /branches/4.0/src/fits_s.h + M /branches/4.0/src/fits_sint.c + M /branches/4.0/src/fits_slong.c + M /branches/4.0/src/fits_sshort.c + M /branches/4.0/src/fits_u.h + M /branches/4.0/src/fits_uint.c + M /branches/4.0/src/fits_uintmax.c + M /branches/4.0/src/fits_ulong.c + M /branches/4.0/src/fits_ushort.c + M /branches/4.0/src/fma.c + M /branches/4.0/src/fmma.c + M /branches/4.0/src/fms.c + M /branches/4.0/src/fpif.c + M /branches/4.0/src/frac.c + M /branches/4.0/src/free_cache.c + M /branches/4.0/src/frexp.c + M /branches/4.0/src/gamma.c + M /branches/4.0/src/gamma_inc.c + M /branches/4.0/src/gammaonethird.c + M /branches/4.0/src/gen_inverse.h + M /branches/4.0/src/generic/coverage/mparam.h + M /branches/4.0/src/generic/mparam.h + M /branches/4.0/src/get_d.c + M /branches/4.0/src/get_d64.c + M /branches/4.0/src/get_exp.c + M /branches/4.0/src/get_f.c + M /branches/4.0/src/get_float128.c + M /branches/4.0/src/get_flt.c + M /branches/4.0/src/get_ld.c + M /branches/4.0/src/get_q.c + M /branches/4.0/src/get_si.c + M /branches/4.0/src/get_sj.c + M /branches/4.0/src/get_str.c + M /branches/4.0/src/get_ui.c + M /branches/4.0/src/get_uj.c + M /branches/4.0/src/get_z.c + M /branches/4.0/src/get_z_exp.c + M /branches/4.0/src/gmp_op.c + M /branches/4.0/src/grandom.c + M /branches/4.0/src/hppa/mparam.h + M /branches/4.0/src/hypot.c + M /branches/4.0/src/ia64/mparam.h + M /branches/4.0/src/ieee_floats.h + M /branches/4.0/src/init.c + M /branches/4.0/src/init2.c + M /branches/4.0/src/inits.c + M /branches/4.0/src/inits2.c + M /branches/4.0/src/inp_str.c + M /branches/4.0/src/int_ceil_log2.c + M /branches/4.0/src/invert_limb.h + M /branches/4.0/src/invsqrt_limb.h + M /branches/4.0/src/isinf.c + M /branches/4.0/src/isinteger.c + M /branches/4.0/src/isnan.c + M /branches/4.0/src/isnum.c + M /branches/4.0/src/isqrt.c + M /branches/4.0/src/isregular.c + M /branches/4.0/src/iszero.c + M /branches/4.0/src/jn.c + M /branches/4.0/src/jyn_asympt.c + M /branches/4.0/src/li2.c + M /branches/4.0/src/lngamma.c + M /branches/4.0/src/log.c + M /branches/4.0/src/log10.c + M /branches/4.0/src/log1p.c + M /branches/4.0/src/log2.c + M /branches/4.0/src/log_ui.c + M /branches/4.0/src/logging.c + M /branches/4.0/src/min_prec.c + M /branches/4.0/src/minmax.c + M /branches/4.0/src/mips/mparam.h + M /branches/4.0/src/modf.c + M /branches/4.0/src/mp_clz_tab.c + M /branches/4.0/src/mparam_h.in + M /branches/4.0/src/mpf2mpfr.h + M /branches/4.0/src/mpfr-cvers.h + M /branches/4.0/src/mpfr-gmp.c + M /branches/4.0/src/mpfr-gmp.h + M /branches/4.0/src/mpfr-impl.h + M /branches/4.0/src/mpfr-intmax.h + M /branches/4.0/src/mpfr-longlong.h + M /branches/4.0/src/mpfr-mini-gmp.c + M /branches/4.0/src/mpfr-mini-gmp.h + M /branches/4.0/src/mpfr-sassert.h + M /branches/4.0/src/mpfr-thread.h + M /branches/4.0/src/mpfr.h + M /branches/4.0/src/mpn_exp.c + M /branches/4.0/src/mul.c + M /branches/4.0/src/mul_2exp.c + M /branches/4.0/src/mul_2si.c + M /branches/4.0/src/mul_2ui.c + M /branches/4.0/src/mul_d.c + M /branches/4.0/src/mul_ui.c + M /branches/4.0/src/mulders.c + M /branches/4.0/src/neg.c + M /branches/4.0/src/next.c + M /branches/4.0/src/nrandom.c + M /branches/4.0/src/odd_p.c + M /branches/4.0/src/out_str.c + M /branches/4.0/src/pool.c + M /branches/4.0/src/pow.c + M /branches/4.0/src/pow_si.c + M /branches/4.0/src/pow_ui.c + M /branches/4.0/src/pow_z.c + M /branches/4.0/src/powerof2.c + M /branches/4.0/src/powerpc32/mparam.h + M /branches/4.0/src/powerpc64/mparam.h + M /branches/4.0/src/print_raw.c + M /branches/4.0/src/print_rnd_mode.c + M /branches/4.0/src/printf.c + M /branches/4.0/src/random_deviate.c + M /branches/4.0/src/random_deviate.h + M /branches/4.0/src/rec_sqrt.c + M /branches/4.0/src/reldiff.c + M /branches/4.0/src/rem1.c + M /branches/4.0/src/rint.c + M /branches/4.0/src/rndna.c + M /branches/4.0/src/root.c + M /branches/4.0/src/round_near_x.c + M /branches/4.0/src/round_p.c + M /branches/4.0/src/round_prec.c + M /branches/4.0/src/round_raw_generic.c + M /branches/4.0/src/scale2.c + M /branches/4.0/src/sec.c + M /branches/4.0/src/sech.c + M /branches/4.0/src/set.c + M /branches/4.0/src/set_d.c + M /branches/4.0/src/set_d64.c + M /branches/4.0/src/set_dfl_prec.c + M /branches/4.0/src/set_exp.c + M /branches/4.0/src/set_f.c + M /branches/4.0/src/set_float128.c + M /branches/4.0/src/set_flt.c + M /branches/4.0/src/set_inf.c + M /branches/4.0/src/set_ld.c + M /branches/4.0/src/set_nan.c + M /branches/4.0/src/set_prc_raw.c + M /branches/4.0/src/set_prec.c + M /branches/4.0/src/set_q.c + M /branches/4.0/src/set_rnd.c + M /branches/4.0/src/set_si.c + M /branches/4.0/src/set_si_2exp.c + M /branches/4.0/src/set_sj.c + M /branches/4.0/src/set_str.c + M /branches/4.0/src/set_str_raw.c + M /branches/4.0/src/set_ui.c + M /branches/4.0/src/set_ui_2exp.c + M /branches/4.0/src/set_uj.c + M /branches/4.0/src/set_z.c + M /branches/4.0/src/set_z_exp.c + M /branches/4.0/src/set_zero.c + M /branches/4.0/src/setmax.c + M /branches/4.0/src/setmin.c + M /branches/4.0/src/setsign.c + M /branches/4.0/src/sgn.c + M /branches/4.0/src/si_op.c + M /branches/4.0/src/signbit.c + M /branches/4.0/src/sin.c + M /branches/4.0/src/sin_cos.c + M /branches/4.0/src/sinh.c + M /branches/4.0/src/sinh_cosh.c + M /branches/4.0/src/sparc64/mparam.h + M /branches/4.0/src/sqr.c + M /branches/4.0/src/sqrt.c + M /branches/4.0/src/sqrt_ui.c + M /branches/4.0/src/stack_interface.c + M /branches/4.0/src/strtofr.c + M /branches/4.0/src/sub.c + M /branches/4.0/src/sub1.c + M /branches/4.0/src/sub1sp.c + M /branches/4.0/src/sub_d.c + M /branches/4.0/src/sub_ui.c + M /branches/4.0/src/subnormal.c + M /branches/4.0/src/sum.c + M /branches/4.0/src/swap.c + M /branches/4.0/src/tan.c + M /branches/4.0/src/tanh.c + M /branches/4.0/src/ubf.c + M /branches/4.0/src/uceil_exp2.c + M /branches/4.0/src/uceil_log2.c + M /branches/4.0/src/ufloor_log2.c + M /branches/4.0/src/ui_div.c + M /branches/4.0/src/ui_pow.c + M /branches/4.0/src/ui_pow_ui.c + M /branches/4.0/src/ui_sub.c + M /branches/4.0/src/urandom.c + M /branches/4.0/src/urandomb.c + M /branches/4.0/src/vasprintf.c + M /branches/4.0/src/version.c + M /branches/4.0/src/volatile.c + M /branches/4.0/src/x86/core2/mparam.h + M /branches/4.0/src/x86/mparam.h + M /branches/4.0/src/x86_64/core2/mparam.h + M /branches/4.0/src/x86_64/corei5/mparam.h + M /branches/4.0/src/x86_64/pentium4/mparam.h + M /branches/4.0/src/yn.c + M /branches/4.0/src/zeta.c + M /branches/4.0/src/zeta_ui.c + M /branches/4.0/tests/Makefile.am + M /branches/4.0/tests/cmp_str.c + M /branches/4.0/tests/data/digamma + M /branches/4.0/tests/data/li2 + M /branches/4.0/tests/memory.c + M /branches/4.0/tests/mpf_compat.c + M /branches/4.0/tests/mpf_compat.h + M /branches/4.0/tests/mpfr-test.h + M /branches/4.0/tests/mpfr_compat.c + M /branches/4.0/tests/random2.c + M /branches/4.0/tests/reuse.c + M /branches/4.0/tests/rnd_mode.c + M /branches/4.0/tests/tabort_defalloc1.c + M /branches/4.0/tests/tabort_defalloc2.c + M /branches/4.0/tests/tabort_prec_max.c + M /branches/4.0/tests/tabs.c + M /branches/4.0/tests/tacos.c + M /branches/4.0/tests/tacosh.c + M /branches/4.0/tests/tadd.c + M /branches/4.0/tests/tadd1sp.c + M /branches/4.0/tests/tadd_d.c + M /branches/4.0/tests/tadd_ui.c + M /branches/4.0/tests/tagm.c + M /branches/4.0/tests/tai.c + M /branches/4.0/tests/talloc-cache.c + M /branches/4.0/tests/talloc.c + M /branches/4.0/tests/tasin.c + M /branches/4.0/tests/tasinh.c + M /branches/4.0/tests/tassert.c + M /branches/4.0/tests/tatan.c + M /branches/4.0/tests/tatanh.c + M /branches/4.0/tests/taway.c + M /branches/4.0/tests/tbeta.c + M /branches/4.0/tests/tbuildopt.c + M /branches/4.0/tests/tcan_round.c + M /branches/4.0/tests/tcbrt.c + M /branches/4.0/tests/tcheck.c + M /branches/4.0/tests/tcmp.c + M /branches/4.0/tests/tcmp2.c + M /branches/4.0/tests/tcmp_d.c + M /branches/4.0/tests/tcmp_ld.c + M /branches/4.0/tests/tcmp_ui.c + M /branches/4.0/tests/tcmpabs.c + M /branches/4.0/tests/tcomparisons.c + M /branches/4.0/tests/tconst_catalan.c + M /branches/4.0/tests/tconst_euler.c + M /branches/4.0/tests/tconst_log2.c + M /branches/4.0/tests/tconst_pi.c + M /branches/4.0/tests/tcopysign.c + M /branches/4.0/tests/tcos.c + M /branches/4.0/tests/tcosh.c + M /branches/4.0/tests/tcot.c + M /branches/4.0/tests/tcoth.c + M /branches/4.0/tests/tcsc.c + M /branches/4.0/tests/tcsch.c + M /branches/4.0/tests/td_div.c + M /branches/4.0/tests/td_sub.c + M /branches/4.0/tests/tdigamma.c + M /branches/4.0/tests/tdim.c + M /branches/4.0/tests/tdiv.c + M /branches/4.0/tests/tdiv_d.c + M /branches/4.0/tests/tdiv_ui.c + M /branches/4.0/tests/teint.c + M /branches/4.0/tests/teq.c + M /branches/4.0/tests/terandom.c + M /branches/4.0/tests/terandom_chisq.c + M /branches/4.0/tests/terf.c + M /branches/4.0/tests/tests.c + M /branches/4.0/tests/texceptions.c + M /branches/4.0/tests/texp.c + M /branches/4.0/tests/texp10.c + M /branches/4.0/tests/texp2.c + M /branches/4.0/tests/texpm1.c + M /branches/4.0/tests/tfactorial.c + M /branches/4.0/tests/tfits.c + M /branches/4.0/tests/tfma.c + M /branches/4.0/tests/tfmma.c + M /branches/4.0/tests/tfmod.c + M /branches/4.0/tests/tfms.c + M /branches/4.0/tests/tfpif.c + M /branches/4.0/tests/tfprintf.c + M /branches/4.0/tests/tfrac.c + M /branches/4.0/tests/tfrexp.c + M /branches/4.0/tests/tgamma.c + M /branches/4.0/tests/tgamma_inc.c + M /branches/4.0/tests/tgeneric.c + M /branches/4.0/tests/tgeneric_ui.c + M /branches/4.0/tests/tget_d.c + M /branches/4.0/tests/tget_d_2exp.c + M /branches/4.0/tests/tget_f.c + M /branches/4.0/tests/tget_flt.c + M /branches/4.0/tests/tget_ld_2exp.c + M /branches/4.0/tests/tget_q.c + M /branches/4.0/tests/tget_set_d64.c + M /branches/4.0/tests/tget_sj.c + M /branches/4.0/tests/tget_str.c + M /branches/4.0/tests/tget_z.c + M /branches/4.0/tests/tgmpop.c + M /branches/4.0/tests/tgrandom.c + M /branches/4.0/tests/thyperbolic.c + M /branches/4.0/tests/thypot.c + M /branches/4.0/tests/tinits.c + M /branches/4.0/tests/tinp_str.c + M /branches/4.0/tests/tinternals.c + M /branches/4.0/tests/tisnan.c + M /branches/4.0/tests/tisqrt.c + M /branches/4.0/tests/tj0.c + M /branches/4.0/tests/tj1.c + M /branches/4.0/tests/tjn.c + M /branches/4.0/tests/tl2b.c + M /branches/4.0/tests/tlgamma.c + M /branches/4.0/tests/tli2.c + M /branches/4.0/tests/tlngamma.c + M /branches/4.0/tests/tlog.c + M /branches/4.0/tests/tlog10.c + M /branches/4.0/tests/tlog1p.c + M /branches/4.0/tests/tlog2.c + M /branches/4.0/tests/tlog_ui.c + M /branches/4.0/tests/tmin_prec.c + M /branches/4.0/tests/tminmax.c + M /branches/4.0/tests/tmodf.c + M /branches/4.0/tests/tmul.c + M /branches/4.0/tests/tmul_2exp.c + M /branches/4.0/tests/tmul_d.c + M /branches/4.0/tests/tmul_ui.c + M /branches/4.0/tests/tnext.c + M /branches/4.0/tests/tnrandom.c + M /branches/4.0/tests/tnrandom_chisq.c + M /branches/4.0/tests/tout_str.c + M /branches/4.0/tests/toutimpl.c + M /branches/4.0/tests/tpow.c + M /branches/4.0/tests/tpow3.c + M /branches/4.0/tests/tpow_all.c + M /branches/4.0/tests/tpow_z.c + M /branches/4.0/tests/tprintf.c + M /branches/4.0/tests/trandom.c + M /branches/4.0/tests/trandom_deviate.c + M /branches/4.0/tests/trec_sqrt.c + M /branches/4.0/tests/tremquo.c + M /branches/4.0/tests/trint.c + M /branches/4.0/tests/trndna.c + M /branches/4.0/tests/troot.c + M /branches/4.0/tests/trootn_ui.c + M /branches/4.0/tests/tround_prec.c + M /branches/4.0/tests/tsec.c + M /branches/4.0/tests/tsech.c + M /branches/4.0/tests/tset.c + M /branches/4.0/tests/tset_d.c + M /branches/4.0/tests/tset_exp.c + M /branches/4.0/tests/tset_f.c + M /branches/4.0/tests/tset_float128.c + M /branches/4.0/tests/tset_ld.c + M /branches/4.0/tests/tset_q.c + M /branches/4.0/tests/tset_si.c + M /branches/4.0/tests/tset_sj.c + M /branches/4.0/tests/tset_str.c + M /branches/4.0/tests/tset_z.c + M /branches/4.0/tests/tset_z_exp.c + M /branches/4.0/tests/tsgn.c + M /branches/4.0/tests/tsi_op.c + M /branches/4.0/tests/tsin.c + M /branches/4.0/tests/tsin_cos.c + M /branches/4.0/tests/tsinh.c + M /branches/4.0/tests/tsinh_cosh.c + M /branches/4.0/tests/tsprintf.c + M /branches/4.0/tests/tsqr.c + M /branches/4.0/tests/tsqrt.c + M /branches/4.0/tests/tsqrt_ui.c + M /branches/4.0/tests/tstckintc.c + M /branches/4.0/tests/tstdint.c + M /branches/4.0/tests/tstrtofr.c + M /branches/4.0/tests/tsub.c + M /branches/4.0/tests/tsub1sp.c + M /branches/4.0/tests/tsub_d.c + M /branches/4.0/tests/tsub_ui.c + M /branches/4.0/tests/tsubnormal.c + M /branches/4.0/tests/tsum.c + M /branches/4.0/tests/tswap.c + M /branches/4.0/tests/ttan.c + M /branches/4.0/tests/ttanh.c + M /branches/4.0/tests/ttrunc.c + M /branches/4.0/tests/tui_div.c + M /branches/4.0/tests/tui_pow.c + M /branches/4.0/tests/tui_sub.c + M /branches/4.0/tests/turandom.c + M /branches/4.0/tests/tvalist.c + M /branches/4.0/tests/tversion.c + M /branches/4.0/tests/ty0.c + M /branches/4.0/tests/ty1.c + M /branches/4.0/tests/tyn.c + M /branches/4.0/tests/tzeta.c + M /branches/4.0/tests/tzeta_ui.c + M /branches/4.0/tools/bench/benchtime.h + M /branches/4.0/tools/bench/mpfrbench.c + M /branches/4.0/tools/get_patches.sh + M /branches/4.0/tools/mbench/generate.c + M /branches/4.0/tools/mbench/mfv5-arprec.cc + M /branches/4.0/tools/mbench/mfv5-cln.cc + M /branches/4.0/tools/mbench/mfv5-crlibm.cc + M /branches/4.0/tools/mbench/mfv5-libc.cc + M /branches/4.0/tools/mbench/mfv5-lidia.cc + M /branches/4.0/tools/mbench/mfv5-mpf.cc + M /branches/4.0/tools/mbench/mfv5-mpfr.cc + M /branches/4.0/tools/mbench/mfv5-ntl.cc + M /branches/4.0/tools/mbench/mfv5-pari.cc + M /branches/4.0/tools/mbench/mfv5-void.cc + M /branches/4.0/tools/mbench/mfv5.cc + M /branches/4.0/tools/mbench/mfv5.h + M /branches/4.0/tools/mbench/mpfr-gfx.c + M /branches/4.0/tools/mbench/mpfr-v4.c + M /branches/4.0/tools/mbench/mpfr-v6.c + M /branches/4.0/tools/mbench/timp.h + M /branches/4.0/tools/timings-mpfr.c + M /branches/4.0/tune/bidimensional_sample.c + M /branches/4.0/tune/speed.c + M /branches/4.0/tune/tuneup.c + +Updated the www.gnu.org URL's (http → https) on all the files with: + perl -pi -e 's,http://www.gnu.org/,https://www.gnu.org/,g' **/*(.) +under zsh. +------------------------------------------------------------------------ +r13371 | vlefevre | 2019-01-07 13:35:33 +0000 (Mon, 07 Jan 2019) | 1 line +Changed paths: + M /branches/4.0/src/Makefile.am + +[src/Makefile.am] Updated libmpfr_la_LDFLAGS for MPFR 4.0.2. +------------------------------------------------------------------------ +r13370 | vlefevre | 2019-01-07 13:22:53 +0000 (Mon, 07 Jan 2019) | 1 line +Changed paths: + M /branches/4.0/VERSION + M /branches/4.0/configure.ac + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/src/mpfr.h + M /branches/4.0/src/version.c + +Updated version to 4.0.2-rc1. +------------------------------------------------------------------------ +r13366 | vlefevre | 2019-01-07 09:39:52 +0000 (Mon, 07 Jan 2019) | 14 lines +Changed paths: + M /branches/4.0/src/strtofr.c + M /branches/4.0/tests/tstrtofr.c + +[src/strtofr.c] Fixed various issues. In particular, the error analysis + 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. +------------------------------------------------------------------------ +r13363 | vlefevre | 2019-01-04 12:11:10 +0000 (Fri, 04 Jan 2019) | 3 lines +Changed paths: + M /branches/4.0/src/mpfr-impl.h + +[src/mpfr-impl.h] Added a comment with a warning concerning the meaning +of MPFR_EXP_FSPEC (corresponding to the merge of mpfr-impl.h r13299 +from the trunk; the other part of this commit with be merged later). +------------------------------------------------------------------------ +r13362 | vlefevre | 2019-01-01 21:18:11 +0000 (Tue, 01 Jan 2019) | 1 line +Changed paths: + M /branches/4.0/doc/mpfr.texi + +[doc/mpfr.texi] Updated the month. +------------------------------------------------------------------------ +r13360 | vlefevre | 2019-01-01 21:02:47 +0000 (Tue, 01 Jan 2019) | 4 lines +Changed paths: + M /branches/4.0/BUGS + M /branches/4.0/INSTALL + M /branches/4.0/Makefile.am + M /branches/4.0/NEWS + M /branches/4.0/README + M /branches/4.0/TODO + M /branches/4.0/acinclude.m4 + M /branches/4.0/configure.ac + M /branches/4.0/doc/FAQ.html + M /branches/4.0/doc/Makefile.am + M /branches/4.0/doc/README.dev + M /branches/4.0/doc/check-typography + M /branches/4.0/doc/faq.xsl + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/examples/can_round.c + M /branches/4.0/examples/divworst.c + M /branches/4.0/examples/rndo-add.c + M /branches/4.0/examples/sample.c + M /branches/4.0/examples/version.c + M /branches/4.0/src/Makefile.am + M /branches/4.0/src/abort_prec_max.c + M /branches/4.0/src/acos.c + M /branches/4.0/src/acosh.c + M /branches/4.0/src/add.c + M /branches/4.0/src/add1.c + M /branches/4.0/src/add1sp.c + M /branches/4.0/src/add_d.c + M /branches/4.0/src/add_ui.c + M /branches/4.0/src/agm.c + M /branches/4.0/src/ai.c + M /branches/4.0/src/amd/amdfam10/mparam.h + M /branches/4.0/src/amd/athlon/mparam.h + M /branches/4.0/src/amd/k8/mparam.h + M /branches/4.0/src/arm/mparam.h + M /branches/4.0/src/asin.c + M /branches/4.0/src/asinh.c + M /branches/4.0/src/atan.c + M /branches/4.0/src/atan2.c + M /branches/4.0/src/atanh.c + M /branches/4.0/src/bernoulli.c + M /branches/4.0/src/beta.c + M /branches/4.0/src/buildopt.c + M /branches/4.0/src/cache.c + M /branches/4.0/src/cbrt.c + M /branches/4.0/src/check.c + M /branches/4.0/src/clear.c + M /branches/4.0/src/clears.c + M /branches/4.0/src/cmp.c + M /branches/4.0/src/cmp2.c + M /branches/4.0/src/cmp_abs.c + M /branches/4.0/src/cmp_d.c + M /branches/4.0/src/cmp_ld.c + M /branches/4.0/src/cmp_si.c + M /branches/4.0/src/cmp_ui.c + M /branches/4.0/src/comparisons.c + M /branches/4.0/src/const_catalan.c + M /branches/4.0/src/const_euler.c + M /branches/4.0/src/const_log2.c + M /branches/4.0/src/const_pi.c + M /branches/4.0/src/constant.c + M /branches/4.0/src/copysign.c + M /branches/4.0/src/cos.c + M /branches/4.0/src/cosh.c + M /branches/4.0/src/cot.c + M /branches/4.0/src/coth.c + M /branches/4.0/src/csc.c + M /branches/4.0/src/csch.c + M /branches/4.0/src/d_div.c + M /branches/4.0/src/d_sub.c + M /branches/4.0/src/digamma.c + M /branches/4.0/src/dim.c + M /branches/4.0/src/div.c + M /branches/4.0/src/div_2exp.c + M /branches/4.0/src/div_2si.c + M /branches/4.0/src/div_2ui.c + M /branches/4.0/src/div_d.c + M /branches/4.0/src/div_ui.c + M /branches/4.0/src/dump.c + M /branches/4.0/src/eint.c + M /branches/4.0/src/eq.c + M /branches/4.0/src/erandom.c + M /branches/4.0/src/erf.c + M /branches/4.0/src/erfc.c + M /branches/4.0/src/exceptions.c + M /branches/4.0/src/exp.c + M /branches/4.0/src/exp10.c + M /branches/4.0/src/exp2.c + M /branches/4.0/src/exp3.c + M /branches/4.0/src/exp_2.c + M /branches/4.0/src/expm1.c + M /branches/4.0/src/extract.c + M /branches/4.0/src/factorial.c + M /branches/4.0/src/fits_intmax.c + M /branches/4.0/src/fits_s.h + M /branches/4.0/src/fits_sint.c + M /branches/4.0/src/fits_slong.c + M /branches/4.0/src/fits_sshort.c + M /branches/4.0/src/fits_u.h + M /branches/4.0/src/fits_uint.c + M /branches/4.0/src/fits_uintmax.c + M /branches/4.0/src/fits_ulong.c + M /branches/4.0/src/fits_ushort.c + M /branches/4.0/src/fma.c + M /branches/4.0/src/fmma.c + M /branches/4.0/src/fms.c + M /branches/4.0/src/fpif.c + M /branches/4.0/src/frac.c + M /branches/4.0/src/free_cache.c + M /branches/4.0/src/frexp.c + M /branches/4.0/src/gamma.c + M /branches/4.0/src/gamma_inc.c + M /branches/4.0/src/gammaonethird.c + M /branches/4.0/src/gen_inverse.h + M /branches/4.0/src/generic/coverage/mparam.h + M /branches/4.0/src/generic/mparam.h + M /branches/4.0/src/get_d.c + M /branches/4.0/src/get_d64.c + M /branches/4.0/src/get_exp.c + M /branches/4.0/src/get_f.c + M /branches/4.0/src/get_float128.c + M /branches/4.0/src/get_flt.c + M /branches/4.0/src/get_ld.c + M /branches/4.0/src/get_q.c + M /branches/4.0/src/get_si.c + M /branches/4.0/src/get_sj.c + M /branches/4.0/src/get_str.c + M /branches/4.0/src/get_ui.c + M /branches/4.0/src/get_uj.c + M /branches/4.0/src/get_z.c + M /branches/4.0/src/get_z_exp.c + M /branches/4.0/src/gmp_op.c + M /branches/4.0/src/grandom.c + M /branches/4.0/src/hppa/mparam.h + M /branches/4.0/src/hypot.c + M /branches/4.0/src/ia64/mparam.h + M /branches/4.0/src/ieee_floats.h + M /branches/4.0/src/init.c + M /branches/4.0/src/init2.c + M /branches/4.0/src/inits.c + M /branches/4.0/src/inits2.c + M /branches/4.0/src/inp_str.c + M /branches/4.0/src/int_ceil_log2.c + M /branches/4.0/src/invert_limb.h + M /branches/4.0/src/invsqrt_limb.h + M /branches/4.0/src/isinf.c + M /branches/4.0/src/isinteger.c + M /branches/4.0/src/isnan.c + M /branches/4.0/src/isnum.c + M /branches/4.0/src/isqrt.c + M /branches/4.0/src/isregular.c + M /branches/4.0/src/iszero.c + M /branches/4.0/src/jn.c + M /branches/4.0/src/jyn_asympt.c + M /branches/4.0/src/li2.c + M /branches/4.0/src/lngamma.c + M /branches/4.0/src/log.c + M /branches/4.0/src/log10.c + M /branches/4.0/src/log1p.c + M /branches/4.0/src/log2.c + M /branches/4.0/src/log_ui.c + M /branches/4.0/src/logging.c + M /branches/4.0/src/min_prec.c + M /branches/4.0/src/minmax.c + M /branches/4.0/src/mips/mparam.h + M /branches/4.0/src/modf.c + M /branches/4.0/src/mp_clz_tab.c + M /branches/4.0/src/mparam_h.in + M /branches/4.0/src/mpf2mpfr.h + M /branches/4.0/src/mpfr-cvers.h + M /branches/4.0/src/mpfr-gmp.c + M /branches/4.0/src/mpfr-gmp.h + M /branches/4.0/src/mpfr-impl.h + M /branches/4.0/src/mpfr-intmax.h + M /branches/4.0/src/mpfr-longlong.h + M /branches/4.0/src/mpfr-mini-gmp.c + M /branches/4.0/src/mpfr-mini-gmp.h + M /branches/4.0/src/mpfr-sassert.h + M /branches/4.0/src/mpfr-thread.h + M /branches/4.0/src/mpfr.h + M /branches/4.0/src/mpn_exp.c + M /branches/4.0/src/mul.c + M /branches/4.0/src/mul_2exp.c + M /branches/4.0/src/mul_2si.c + M /branches/4.0/src/mul_2ui.c + M /branches/4.0/src/mul_d.c + M /branches/4.0/src/mul_ui.c + M /branches/4.0/src/mulders.c + M /branches/4.0/src/neg.c + M /branches/4.0/src/next.c + M /branches/4.0/src/nrandom.c + M /branches/4.0/src/odd_p.c + M /branches/4.0/src/out_str.c + M /branches/4.0/src/pool.c + M /branches/4.0/src/pow.c + M /branches/4.0/src/pow_si.c + M /branches/4.0/src/pow_ui.c + M /branches/4.0/src/pow_z.c + M /branches/4.0/src/powerof2.c + M /branches/4.0/src/powerpc32/mparam.h + M /branches/4.0/src/powerpc64/mparam.h + M /branches/4.0/src/print_raw.c + M /branches/4.0/src/print_rnd_mode.c + M /branches/4.0/src/printf.c + M /branches/4.0/src/random_deviate.c + M /branches/4.0/src/random_deviate.h + M /branches/4.0/src/rec_sqrt.c + M /branches/4.0/src/reldiff.c + M /branches/4.0/src/rem1.c + M /branches/4.0/src/rint.c + M /branches/4.0/src/rndna.c + M /branches/4.0/src/root.c + M /branches/4.0/src/round_near_x.c + M /branches/4.0/src/round_p.c + M /branches/4.0/src/round_prec.c + M /branches/4.0/src/round_raw_generic.c + M /branches/4.0/src/scale2.c + M /branches/4.0/src/sec.c + M /branches/4.0/src/sech.c + M /branches/4.0/src/set.c + M /branches/4.0/src/set_d.c + M /branches/4.0/src/set_d64.c + M /branches/4.0/src/set_dfl_prec.c + M /branches/4.0/src/set_exp.c + M /branches/4.0/src/set_f.c + M /branches/4.0/src/set_float128.c + M /branches/4.0/src/set_flt.c + M /branches/4.0/src/set_inf.c + M /branches/4.0/src/set_ld.c + M /branches/4.0/src/set_nan.c + M /branches/4.0/src/set_prc_raw.c + M /branches/4.0/src/set_prec.c + M /branches/4.0/src/set_q.c + M /branches/4.0/src/set_rnd.c + M /branches/4.0/src/set_si.c + M /branches/4.0/src/set_si_2exp.c + M /branches/4.0/src/set_sj.c + M /branches/4.0/src/set_str.c + M /branches/4.0/src/set_str_raw.c + M /branches/4.0/src/set_ui.c + M /branches/4.0/src/set_ui_2exp.c + M /branches/4.0/src/set_uj.c + M /branches/4.0/src/set_z.c + M /branches/4.0/src/set_z_exp.c + M /branches/4.0/src/set_zero.c + M /branches/4.0/src/setmax.c + M /branches/4.0/src/setmin.c + M /branches/4.0/src/setsign.c + M /branches/4.0/src/sgn.c + M /branches/4.0/src/si_op.c + M /branches/4.0/src/signbit.c + M /branches/4.0/src/sin.c + M /branches/4.0/src/sin_cos.c + M /branches/4.0/src/sinh.c + M /branches/4.0/src/sinh_cosh.c + M /branches/4.0/src/sparc64/mparam.h + M /branches/4.0/src/sqr.c + M /branches/4.0/src/sqrt.c + M /branches/4.0/src/sqrt_ui.c + M /branches/4.0/src/stack_interface.c + M /branches/4.0/src/strtofr.c + M /branches/4.0/src/sub.c + M /branches/4.0/src/sub1.c + M /branches/4.0/src/sub1sp.c + M /branches/4.0/src/sub_d.c + M /branches/4.0/src/sub_ui.c + M /branches/4.0/src/subnormal.c + M /branches/4.0/src/sum.c + M /branches/4.0/src/swap.c + M /branches/4.0/src/tan.c + M /branches/4.0/src/tanh.c + M /branches/4.0/src/ubf.c + M /branches/4.0/src/uceil_exp2.c + M /branches/4.0/src/uceil_log2.c + M /branches/4.0/src/ufloor_log2.c + M /branches/4.0/src/ui_div.c + M /branches/4.0/src/ui_pow.c + M /branches/4.0/src/ui_pow_ui.c + M /branches/4.0/src/ui_sub.c + M /branches/4.0/src/urandom.c + M /branches/4.0/src/urandomb.c + M /branches/4.0/src/vasprintf.c + M /branches/4.0/src/version.c + M /branches/4.0/src/volatile.c + M /branches/4.0/src/x86/core2/mparam.h + M /branches/4.0/src/x86/mparam.h + M /branches/4.0/src/x86_64/core2/mparam.h + M /branches/4.0/src/x86_64/corei5/mparam.h + M /branches/4.0/src/x86_64/pentium4/mparam.h + M /branches/4.0/src/yn.c + M /branches/4.0/src/zeta.c + M /branches/4.0/src/zeta_ui.c + M /branches/4.0/tests/Makefile.am + M /branches/4.0/tests/cmp_str.c + M /branches/4.0/tests/data/digamma + M /branches/4.0/tests/data/li2 + M /branches/4.0/tests/memory.c + M /branches/4.0/tests/mpf_compat.c + M /branches/4.0/tests/mpf_compat.h + M /branches/4.0/tests/mpfr-test.h + M /branches/4.0/tests/mpfr_compat.c + M /branches/4.0/tests/random2.c + M /branches/4.0/tests/reuse.c + M /branches/4.0/tests/rnd_mode.c + M /branches/4.0/tests/tabort_defalloc1.c + M /branches/4.0/tests/tabort_defalloc2.c + M /branches/4.0/tests/tabort_prec_max.c + M /branches/4.0/tests/tabs.c + M /branches/4.0/tests/tacos.c + M /branches/4.0/tests/tacosh.c + M /branches/4.0/tests/tadd.c + M /branches/4.0/tests/tadd1sp.c + M /branches/4.0/tests/tadd_d.c + M /branches/4.0/tests/tadd_ui.c + M /branches/4.0/tests/tagm.c + M /branches/4.0/tests/tai.c + M /branches/4.0/tests/talloc-cache.c + M /branches/4.0/tests/talloc.c + M /branches/4.0/tests/tasin.c + M /branches/4.0/tests/tasinh.c + M /branches/4.0/tests/tassert.c + M /branches/4.0/tests/tatan.c + M /branches/4.0/tests/tatanh.c + M /branches/4.0/tests/taway.c + M /branches/4.0/tests/tbeta.c + M /branches/4.0/tests/tbuildopt.c + M /branches/4.0/tests/tcan_round.c + M /branches/4.0/tests/tcbrt.c + M /branches/4.0/tests/tcheck.c + M /branches/4.0/tests/tcmp.c + M /branches/4.0/tests/tcmp2.c + M /branches/4.0/tests/tcmp_d.c + M /branches/4.0/tests/tcmp_ld.c + M /branches/4.0/tests/tcmp_ui.c + M /branches/4.0/tests/tcmpabs.c + M /branches/4.0/tests/tcomparisons.c + M /branches/4.0/tests/tconst_catalan.c + M /branches/4.0/tests/tconst_euler.c + M /branches/4.0/tests/tconst_log2.c + M /branches/4.0/tests/tconst_pi.c + M /branches/4.0/tests/tcopysign.c + M /branches/4.0/tests/tcos.c + M /branches/4.0/tests/tcosh.c + M /branches/4.0/tests/tcot.c + M /branches/4.0/tests/tcoth.c + M /branches/4.0/tests/tcsc.c + M /branches/4.0/tests/tcsch.c + M /branches/4.0/tests/td_div.c + M /branches/4.0/tests/td_sub.c + M /branches/4.0/tests/tdigamma.c + M /branches/4.0/tests/tdim.c + M /branches/4.0/tests/tdiv.c + M /branches/4.0/tests/tdiv_d.c + M /branches/4.0/tests/tdiv_ui.c + M /branches/4.0/tests/teint.c + M /branches/4.0/tests/teq.c + M /branches/4.0/tests/terandom.c + M /branches/4.0/tests/terandom_chisq.c + M /branches/4.0/tests/terf.c + M /branches/4.0/tests/tests.c + M /branches/4.0/tests/texceptions.c + M /branches/4.0/tests/texp.c + M /branches/4.0/tests/texp10.c + M /branches/4.0/tests/texp2.c + M /branches/4.0/tests/texpm1.c + M /branches/4.0/tests/tfactorial.c + M /branches/4.0/tests/tfits.c + M /branches/4.0/tests/tfma.c + M /branches/4.0/tests/tfmma.c + M /branches/4.0/tests/tfmod.c + M /branches/4.0/tests/tfms.c + M /branches/4.0/tests/tfpif.c + M /branches/4.0/tests/tfprintf.c + M /branches/4.0/tests/tfrac.c + M /branches/4.0/tests/tfrexp.c + M /branches/4.0/tests/tgamma.c + M /branches/4.0/tests/tgamma_inc.c + M /branches/4.0/tests/tgeneric.c + M /branches/4.0/tests/tgeneric_ui.c + M /branches/4.0/tests/tget_d.c + M /branches/4.0/tests/tget_d_2exp.c + M /branches/4.0/tests/tget_f.c + M /branches/4.0/tests/tget_flt.c + M /branches/4.0/tests/tget_ld_2exp.c + M /branches/4.0/tests/tget_q.c + M /branches/4.0/tests/tget_set_d64.c + M /branches/4.0/tests/tget_sj.c + M /branches/4.0/tests/tget_str.c + M /branches/4.0/tests/tget_z.c + M /branches/4.0/tests/tgmpop.c + M /branches/4.0/tests/tgrandom.c + M /branches/4.0/tests/thyperbolic.c + M /branches/4.0/tests/thypot.c + M /branches/4.0/tests/tinits.c + M /branches/4.0/tests/tinp_str.c + M /branches/4.0/tests/tinternals.c + M /branches/4.0/tests/tisnan.c + M /branches/4.0/tests/tisqrt.c + M /branches/4.0/tests/tj0.c + M /branches/4.0/tests/tj1.c + M /branches/4.0/tests/tjn.c + M /branches/4.0/tests/tl2b.c + M /branches/4.0/tests/tlgamma.c + M /branches/4.0/tests/tli2.c + M /branches/4.0/tests/tlngamma.c + M /branches/4.0/tests/tlog.c + M /branches/4.0/tests/tlog10.c + M /branches/4.0/tests/tlog1p.c + M /branches/4.0/tests/tlog2.c + M /branches/4.0/tests/tlog_ui.c + M /branches/4.0/tests/tmin_prec.c + M /branches/4.0/tests/tminmax.c + M /branches/4.0/tests/tmodf.c + M /branches/4.0/tests/tmul.c + M /branches/4.0/tests/tmul_2exp.c + M /branches/4.0/tests/tmul_d.c + M /branches/4.0/tests/tmul_ui.c + M /branches/4.0/tests/tnext.c + M /branches/4.0/tests/tnrandom.c + M /branches/4.0/tests/tnrandom_chisq.c + M /branches/4.0/tests/tout_str.c + M /branches/4.0/tests/toutimpl.c + M /branches/4.0/tests/tpow.c + M /branches/4.0/tests/tpow3.c + M /branches/4.0/tests/tpow_all.c + M /branches/4.0/tests/tpow_z.c + M /branches/4.0/tests/tprintf.c + M /branches/4.0/tests/trandom.c + M /branches/4.0/tests/trandom_deviate.c + M /branches/4.0/tests/trec_sqrt.c + M /branches/4.0/tests/tremquo.c + M /branches/4.0/tests/trint.c + M /branches/4.0/tests/trndna.c + M /branches/4.0/tests/troot.c + M /branches/4.0/tests/trootn_ui.c + M /branches/4.0/tests/tround_prec.c + M /branches/4.0/tests/tsec.c + M /branches/4.0/tests/tsech.c + M /branches/4.0/tests/tset.c + M /branches/4.0/tests/tset_d.c + M /branches/4.0/tests/tset_exp.c + M /branches/4.0/tests/tset_f.c + M /branches/4.0/tests/tset_float128.c + M /branches/4.0/tests/tset_ld.c + M /branches/4.0/tests/tset_q.c + M /branches/4.0/tests/tset_si.c + M /branches/4.0/tests/tset_sj.c + M /branches/4.0/tests/tset_str.c + M /branches/4.0/tests/tset_z.c + M /branches/4.0/tests/tset_z_exp.c + M /branches/4.0/tests/tsgn.c + M /branches/4.0/tests/tsi_op.c + M /branches/4.0/tests/tsin.c + M /branches/4.0/tests/tsin_cos.c + M /branches/4.0/tests/tsinh.c + M /branches/4.0/tests/tsinh_cosh.c + M /branches/4.0/tests/tsprintf.c + M /branches/4.0/tests/tsqr.c + M /branches/4.0/tests/tsqrt.c + M /branches/4.0/tests/tsqrt_ui.c + M /branches/4.0/tests/tstckintc.c + M /branches/4.0/tests/tstdint.c + M /branches/4.0/tests/tstrtofr.c + M /branches/4.0/tests/tsub.c + M /branches/4.0/tests/tsub1sp.c + M /branches/4.0/tests/tsub_d.c + M /branches/4.0/tests/tsub_ui.c + M /branches/4.0/tests/tsubnormal.c + M /branches/4.0/tests/tsum.c + M /branches/4.0/tests/tswap.c + M /branches/4.0/tests/ttan.c + M /branches/4.0/tests/ttanh.c + M /branches/4.0/tests/ttrunc.c + M /branches/4.0/tests/tui_div.c + M /branches/4.0/tests/tui_pow.c + M /branches/4.0/tests/tui_sub.c + M /branches/4.0/tests/turandom.c + M /branches/4.0/tests/tvalist.c + M /branches/4.0/tests/tversion.c + M /branches/4.0/tests/ty0.c + M /branches/4.0/tests/ty1.c + M /branches/4.0/tests/tyn.c + M /branches/4.0/tests/tzeta.c + M /branches/4.0/tests/tzeta_ui.c + M /branches/4.0/tools/bench/Makefile.am + M /branches/4.0/tools/bench/benchtime.h + M /branches/4.0/tools/bench/mpfrbench.c + M /branches/4.0/tools/ck-clz_tab + M /branches/4.0/tools/ck-copyright-notice + M /branches/4.0/tools/ck-news + M /branches/4.0/tools/ck-version-info + M /branches/4.0/tools/get_patches.sh + M /branches/4.0/tune/Makefile.am + M /branches/4.0/tune/bidimensional_sample.c + M /branches/4.0/tune/speed.c + M /branches/4.0/tune/tuneup.c + +Copyright notice update: added 2019 with + 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. +------------------------------------------------------------------------ +r13357 | vlefevre | 2018-12-31 11:11:10 +0000 (Mon, 31 Dec 2018) | 8 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/set.c + M /branches/4.0/tests + M /branches/4.0/tests/tfmma.c + M /branches/4.0/tests/tset.c + +[src/set.c] Fixed double-rounding bug in the internal function + 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) +------------------------------------------------------------------------ +r13330 | vlefevre | 2018-12-10 09:24:24 +0000 (Mon, 10 Dec 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tdiv.c + +[tests/tdiv.c] fixed test_20151023 (random number must not be 0). +(merged changeset r13329 from the trunk) +------------------------------------------------------------------------ +r13310 | vlefevre | 2018-11-29 07:48:54 +0000 (Thu, 29 Nov 2018) | 5 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/Makefile.am + M /branches/4.0/tests/tversion.c + +[tests/Makefile.am] Unset DISPLAY as it is not needed and it can yield +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) +------------------------------------------------------------------------ +r13301 | vlefevre | 2018-11-27 13:17:11 +0000 (Tue, 27 Nov 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tdiv.c + +[tests/tdiv.c] Fixed test_20151023(). +(merged changesets r13149,13151,13298 from the trunk) +------------------------------------------------------------------------ +r13297 | vlefevre | 2018-11-26 13:24:37 +0000 (Mon, 26 Nov 2018) | 2 lines +Changed paths: + M /branches/4.0/tests + M /branches/4.0/tests/tset_str.c + +[tests/tset_str.c] Added bug20180908() test. +(merged changesets r13164,13296 from the trunk, for the tests directory) +------------------------------------------------------------------------ +r13294 | vlefevre | 2018-11-23 10:34:21 +0000 (Fri, 23 Nov 2018) | 1 line +Changed paths: + M /branches/4.0/doc/mpfr.texi + +[doc/mpfr.texi] Updated the month. +------------------------------------------------------------------------ +r13284 | vlefevre | 2018-11-22 15:36:13 +0000 (Thu, 22 Nov 2018) | 4 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/NEWS + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/src/get_str.c + +MPFR manual: corrected/completed the mpfr_get_str description in order +to follow the historical behavior and GMP's mpf_get_str function. +(Discussion in the Trier meeting.) +(merged changeset r13283 from the trunk, with a correction in NEWS) +------------------------------------------------------------------------ +r13277 | vlefevre | 2018-11-20 08:17:39 +0000 (Tue, 20 Nov 2018) | 1 line +Changed paths: + M /branches/4.0 + M /branches/4.0/src/amd/amdfam10/mparam.h + M /branches/4.0/src/amd/k8/mparam.h + M /branches/4.0/src/arm/mparam.h + M /branches/4.0/src/generic/coverage/mparam.h + M /branches/4.0/src/hppa/mparam.h + M /branches/4.0/src/ia64/mparam.h + M /branches/4.0/src/mips/mparam.h + M /branches/4.0/src/powerpc64/mparam.h + M /branches/4.0/src/sparc64/mparam.h + M /branches/4.0/src/x86/core2/mparam.h + M /branches/4.0/src/x86/mparam.h + M /branches/4.0/src/x86_64/core2/mparam.h + M /branches/4.0/src/x86_64/corei5/mparam.h + +Removed trailing whitespace. +------------------------------------------------------------------------ +r13252 | vlefevre | 2018-10-18 17:57:10 +0000 (Thu, 18 Oct 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/mpfr-longlong.h + +[src/mpfr-longlong.h] Fix obsolete ARC asm constraints; see patch posted +on . +(merged changeset r13251 from the trunk) +------------------------------------------------------------------------ +r13245 | vlefevre | 2018-10-08 12:50:55 +0000 (Mon, 08 Oct 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/codespell.ignore + +[codespell.ignore] Also ignore "ue" (codespell 1.14). +(merged changeset r13244 from the trunk) +------------------------------------------------------------------------ +r13187 | vlefevre | 2018-09-13 13:06:47 +0000 (Thu, 13 Sep 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tdiv_ui.c + +[tests/tdiv_ui.c] fixed corner_cases() test +(merged changeset r13162 from the trunk) +------------------------------------------------------------------------ +r13010 | vlefevre | 2018-08-22 13:52:40 +0000 (Wed, 22 Aug 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tversion.c + +[tests/tversion.c] Portability corrections related to the use of the +preprocessor / code robustness. +(merged changeset r13003 from the trunk) +------------------------------------------------------------------------ +r12999 | vlefevre | 2018-08-21 13:18:23 +0000 (Tue, 21 Aug 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tsub1sp.c + +[tests/tsub1sp.c] Added a test by merging r12997 from the trunk, and +modified the comment to say that the bug is only in the trunk. +------------------------------------------------------------------------ +r12994 | vlefevre | 2018-08-20 07:44:49 +0000 (Mon, 20 Aug 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/mpfr-impl.h + +[src/mpfr-impl.h] Added a cast to mp_bitcnt_t in order to fix potential +integer overflow in MPFR_MPZ_SIZEINBASE2. +(merged changeset r12988 from the trunk) +------------------------------------------------------------------------ +r12993 | vlefevre | 2018-08-20 07:40:42 +0000 (Mon, 20 Aug 2018) | 4 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tcan_round.c + +[tests/tcan_round.c] Added missing casts for printf (error messages). +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) +------------------------------------------------------------------------ +r12992 | vlefevre | 2018-08-20 06:47:44 +0000 (Mon, 20 Aug 2018) | 22 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/mpfr-longlong.h + M /branches/4.0/tools/mpfrlint + +[tools/mpfrlint] Check that __GMP_DECLSPEC is not used by MPFR. +[src/mpfr-longlong.h] Replaced __GMP_DECLSPEC by __MPFR_DECLSPEC. + +Otherwise, with Windows DLL, __GMP_DECLSPEC is replaced by +__declspec(dllimport), which is wrong when building MPFR and +yields warning LNK4217 such as: + + eint.obj : warning LNK4217: locally defined symbol mpfr_clz_tab + imported in function mpfr_eint + +due to + + extern const unsigned char __GMP_DECLSPEC __clz_tab[129]; + +(note that mpfr_clz_tab is defined with "#define __clz_tab mpfr_clz_tab" +only without the GMP build). + +See: + https://sympa.inria.fr/sympa/arc/mpfr/2018-08/msg00000.html + https://sympa.inria.fr/sympa/arc/mpfr/2018-08/msg00001.html + +(merged changesets r12975-12977 from the trunk) +------------------------------------------------------------------------ +r12969 | vlefevre | 2018-07-31 09:01:08 +0000 (Tue, 31 Jul 2018) | 3 lines +Changed paths: + M /branches/4.0/tests/tversion.c + +[tests/tversion.c] Updated comment about missing output from the +first printf with i586-mingw32msvc-gcc -D__USE_MINGW_ANSI_STDIO +and run under Wine (issue not reproducible). +------------------------------------------------------------------------ +r12968 | vlefevre | 2018-07-30 16:31:52 +0000 (Mon, 30 Jul 2018) | 2 lines +Changed paths: + M /branches/4.0/tests/tversion.c + +[tests/tversion.c] Try to detect missing output from the first printf +with i586-mingw32msvc-gcc -D__USE_MINGW_ANSI_STDIO and run under Wine. +------------------------------------------------------------------------ +r12967 | vlefevre | 2018-07-30 13:43:03 +0000 (Mon, 30 Jul 2018) | 5 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/acinclude.m4 + M /branches/4.0/configure.ac + M /branches/4.0/src/vasprintf.c + M /branches/4.0/tests + M /branches/4.0/tests/tsprintf.c + +[acinclude.m4,configure.ac] Check the support of the group flag for + 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) +------------------------------------------------------------------------ +r12966 | vlefevre | 2018-07-30 13:34:14 +0000 (Mon, 30 Jul 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/vasprintf.c + +[src/vasprintf.c] Bug fix: in case of some errors (via "goto error;"), +va_end wasn't called, yielding undefined behavior. +(reverse-merged r12965; merged changesets r12955,12957 from the trunk) +------------------------------------------------------------------------ +r12965 | vlefevre | 2018-07-30 09:32:15 +0000 (Mon, 30 Jul 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/vasprintf.c + +[src/vasprintf.c] Fixed "store to null pointer" and free of bad pointer +in case of error. +(merged part of changeset r12957 from the trunk) +------------------------------------------------------------------------ +r12950 | vlefevre | 2018-07-23 08:17:05 +0000 (Mon, 23 Jul 2018) | 8 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/erf.c + M /branches/4.0/tests + M /branches/4.0/tests/terf.c + +[src/erf.c] In the computation of an error bound, replaced some + 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) +------------------------------------------------------------------------ +r12938 | vlefevre | 2018-07-19 00:01:28 +0000 (Thu, 19 Jul 2018) | 11 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/acinclude.m4 + M /branches/4.0/configure.ac + M /branches/4.0/doc/README.dev + M /branches/4.0/src/buildopt.c + M /branches/4.0/src/free_cache.c + M /branches/4.0/src/mpfr-impl.h + M /branches/4.0/src/mpfr-thread.h + M /branches/4.0/tests + M /branches/4.0/tests/tconst_pi.c + M /branches/4.0/tests/tversion.c + +Shared caches: fix and minor changes. + * Fixed detection and use of C11 thread support: the C11 header is + , not . + * 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) +------------------------------------------------------------------------ +r12936 | vlefevre | 2018-07-18 23:17:03 +0000 (Wed, 18 Jul 2018) | 4 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tconst_pi.c + +[tests/tconst_pi.c] Removed an incorrect assertion, as the #else would +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) +------------------------------------------------------------------------ +r12923 | vlefevre | 2018-07-13 10:31:07 +0000 (Fri, 13 Jul 2018) | 4 lines +Changed paths: + M /branches/4.0/acinclude.m4 + +[acinclude.m4] Fixed the __float128 detection for NetBSD: Optimization +made the "undefined reference" error disappear, so that __float128 was +misdetected as being supported. Also updated the message. +Note: this change is similar to the r12921-12922 ones in the trunk. +------------------------------------------------------------------------ +r12918 | vlefevre | 2018-07-12 15:05:07 +0000 (Thu, 12 Jul 2018) | 1 line +Changed paths: + M /branches/4.0/NEWS + +[NEWS] Update for GNU MPFR 4.0.2. +------------------------------------------------------------------------ +r12917 | vlefevre | 2018-07-12 15:04:17 +0000 (Thu, 12 Jul 2018) | 6 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/doc/mpfr.texi + +[doc/mpfr.texi] In Section "Nomenclature and Types": + * rewrote the paragraph defining "floating-point number", + avoiding ambiguities; + * removed all the @noindent, whose purpose is unclear; + * defined regular numbers and exponents. +(merged changesets r12906-12908 from the trunk) +------------------------------------------------------------------------ +r12916 | vlefevre | 2018-07-12 14:32:51 +0000 (Thu, 12 Jul 2018) | 7 lines +Changed paths: + M /branches/4.0/acinclude.m4 + +[acinclude.m4] For the __float128 detection, changed AC_COMPILE_IFELSE +to AC_LINK_IFELSE since an error may occur only at link time, such as +under NetBSD: + https://mail-index.netbsd.org/pkgsrc-users/2018/02/02/msg026220.html + https://mail-index.netbsd.org/pkgsrc-users/2018/02/05/msg026238.html +Note: this change is similar to the r12915 one in the trunk, except +that we do not try to detect _Float128 in the 4.0 branch. +------------------------------------------------------------------------ +r12914 | vlefevre | 2018-07-12 12:32:16 +0000 (Thu, 12 Jul 2018) | 5 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/Makefile.am + +[src/Makefile.am] Corrected check-exported-symbols to avoid a failure +when the default .SHELLFLAGS value is '-ec' (POSIX) instead of '-c' +(GNU Make, which is not in POSIX-conforming mode by default). +Bug found on FreeBSD 11.1 (Compile Farm @ HouseGordon.com). +(merged changeset r12913 from the trunk) +------------------------------------------------------------------------ +r12909 | vlefevre | 2018-07-10 11:51:56 +0000 (Tue, 10 Jul 2018) | 22 lines +Changed paths: + M /branches/4.0/src/vasprintf.c + +[src/vasprintf.c] Fixed several bugs in buffer_sandwich, which could +yield memory corruption with non-default memory allocators and other +undefined behavior; check the return value when this function is called. + +Details: + * check integer overflow on the size computations; + * computation of q and r without tests; + * fixed the case where r > len (e.g. len = 1 and tz = 1); + * in the loop, increase the str pointer only when needed, otherwise + str could be beyond of the end of the string of the digits, which + is undefined behavior. + +The first consequence of the r > len issue was an incorrect generated +string. Moreover, since the generated string was shorter than expected, +mpfr_free_str would provide an incorrect buffer size to the "free" +function of the current GMP memory allocator. By default, this size is +ignored, but it may matter if the memory allocators have been changed +with the mp_set_memory_functions GMP function, in which case a possible +consequence could be memory corruption. + +Note: This corresponds to r12869 from the trunk. Other changes in the +trunk (dead code removal...) have not been applied. +------------------------------------------------------------------------ +r12904 | vlefevre | 2018-07-06 14:36:05 +0000 (Fri, 06 Jul 2018) | 2 lines +Changed paths: + M /branches/4.0/tests/tprintf.c + M /branches/4.0/tests/tsprintf.c + +[tests/{tprintf.c,tsprintf.c}] Merged the latest tests from the trunk +(r12562:12903). +------------------------------------------------------------------------ +r12897 | vlefevre | 2018-07-06 13:27:41 +0000 (Fri, 06 Jul 2018) | 1 line +Changed paths: + M /branches/4.0/doc/mpfr.texi + +[doc/mpfr.texi] Updated the month. +------------------------------------------------------------------------ +r12890 | vlefevre | 2018-07-06 07:21:18 +0000 (Fri, 06 Jul 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/AUTHORS + M /branches/4.0/doc/mpfr.texi + +[AUTHORS,doc/mpfr.texi] Typo in Fredrik's name. +(merged changesets r12888-12889 from the trunk) +------------------------------------------------------------------------ +r12872 | vlefevre | 2018-07-04 12:04:26 +0000 (Wed, 04 Jul 2018) | 5 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/doc/README.dev + M /branches/4.0/tests + M /branches/4.0/tests/tprintf.c + M /branches/4.0/tests/tsprintf.c + +Added MPFR_CHECK_LOCALES environment variable for the tests (to be +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) +------------------------------------------------------------------------ +r12793 | vlefevre | 2018-06-20 12:17:11 +0000 (Wed, 20 Jun 2018) | 2 lines +Changed paths: + M /branches/4.0/tests/tget_set_d64.c + +[tests/tget_set_d64.c] Tests on powers of 10: test negative numbers too. +(merged part of changeset r12792 from the trunk) +------------------------------------------------------------------------ +r12786 | vlefevre | 2018-06-19 13:10:42 +0000 (Tue, 19 Jun 2018) | 5 lines +Changed paths: + M /branches/4.0/src/set_d64.c + M /branches/4.0/tests/tget_set_d64.c + +[src/set_d64.c] Fixed ternary value, which was always 0. This is done by + 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). +------------------------------------------------------------------------ +r12785 | vlefevre | 2018-06-19 12:55:53 +0000 (Tue, 19 Jun 2018) | 5 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tstckintc.c + +[tests/tstckintc.c] Avoid false warnings with -Wcast-align=strict from +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) +------------------------------------------------------------------------ +r12760 | vlefevre | 2018-06-06 11:05:33 +0000 (Wed, 06 Jun 2018) | 6 lines +Changed paths: + M /branches/4.0 + A /branches/4.0/codespell.exclude (from /trunk/codespell.exclude:12754) + M /branches/4.0/codespell.ignore + M /branches/4.0/tools/mpfrlint + +codespell: simplified exceptions. + * Added codespell.exclude file. + * codespell.ignore: removed some words (particular cases). + * tools/mpfrlint: use the codespell.exclude exclude file, and for + the doc directory, replaced -S by an explicit list of files. +(merged changesets r12486,12497,12753-12754 from the trunk) +------------------------------------------------------------------------ +r12750 | vlefevre | 2018-06-02 22:22:50 +0000 (Sat, 02 Jun 2018) | 4 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/invert_limb.h + +[src/invert_limb.h] fixed two typos reported by Marco Bodrato. +Note that with the current MPFR code, these typos did not have +any consequence. +(merged changeset r12749 from the trunk) +------------------------------------------------------------------------ +r12743 | vlefevre | 2018-05-31 14:47:16 +0000 (Thu, 31 May 2018) | 1 line +Changed paths: + M /branches/4.0/doc/mpfr.texi + +[doc/mpfr.texi] Updated the month. +------------------------------------------------------------------------ +r12741 | vlefevre | 2018-05-31 14:41:37 +0000 (Thu, 31 May 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/AUTHORS + M /branches/4.0/INSTALL + M /branches/4.0/doc/algorithms.tex + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/examples/sample.c + M /branches/4.0/mpfr.pc.in + M /branches/4.0/tests + M /branches/4.0/tests/tests.c + M /branches/4.0/tools/cfarm.sh + M /branches/4.0/tools/update-version + +Updated mpfr.org URL's to use https (except in ChangeLog and NEWS). +(marked changeset r12740 as merged from the trunk) +------------------------------------------------------------------------ +r12736 | vlefevre | 2018-05-30 17:45:00 +0000 (Wed, 30 May 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tools/announce-text + +[tools/announce-text] http → https (for mpfr.org). +(merged changeset r12734 from the trunk) +------------------------------------------------------------------------ +r12735 | vlefevre | 2018-05-30 17:44:10 +0000 (Wed, 30 May 2018) | 6 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/doc/FAQ.html + M /branches/4.0/doc/faq.xsl + M /branches/4.0/doc/update-faq + +[doc] Changes due to the https support by mpfr.org. + * faq.xsl: for the visual.css, use a local URL since libxml2 does not + support https. + * update-faq: download visual.css from mpfr.org first. + * FAQ.html: update with update-faq. +(merged changesets r12731-12733 from the trunk) +------------------------------------------------------------------------ +r12680 | vlefevre | 2018-04-26 15:33:52 +0000 (Thu, 26 Apr 2018) | 8 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/inp_str.c + M /branches/4.0/src/out_str.c + +[src/{inp_str.c,out_str.c}] For mpfr_inp_str and mpfr_out_str, when +the stream was a null pointer, it was replaced by stdin and stdout, +respectively. No longer do that, since: + * This behavior was useless, not documented, and not consistent + with other I/O functions. + * Just in case a null pointer for the stream has a special meaning + with some C implementation, MPFR was not behaving as documented. +(merged changesets r12520-12521 from the trunk) +------------------------------------------------------------------------ +r12679 | vlefevre | 2018-04-26 15:17:30 +0000 (Thu, 26 Apr 2018) | 6 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/gmp_op.c + M /branches/4.0/tests + M /branches/4.0/tests/tgmpop.c + +[src/gmp_op.c] Fixed a bug in mpfr_cmp_q on NaN rational: the NaN flag + 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) +------------------------------------------------------------------------ +r12675 | vlefevre | 2018-04-26 13:13:57 +0000 (Thu, 26 Apr 2018) | 1 line +Changed paths: + M /branches/4.0/tests + M /branches/4.0/tests/tcan_round.c + M /branches/4.0/tests/tconst_pi.c + M /branches/4.0/tests/tfpif.c + M /branches/4.0/tests/tgrandom.c + M /branches/4.0/tests/tpow.c + M /branches/4.0/tests/ttan.c + +Merged recent tests from the trunk (r12500-12555,12558,12561). +------------------------------------------------------------------------ +r12674 | vlefevre | 2018-04-26 12:59:37 +0000 (Thu, 26 Apr 2018) | 5 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/Makefile.am + +[tests/Makefile.am] Update of the "check" rule: + * 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) +------------------------------------------------------------------------ +r12664 | vlefevre | 2018-04-25 15:06:34 +0000 (Wed, 25 Apr 2018) | 4 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/gmp_op.c + M /branches/4.0/tests + M /branches/4.0/tests/tgmpop.c + +[src/gmp_op.c] Fixed bug in mpfr_cmp_q when the denominator of the + mpq_t argument is 0. +[tests/tgmpop.c] Added tests. +(merged changesets r12499,12502 from the trunk) +------------------------------------------------------------------------ +r12663 | vlefevre | 2018-04-25 15:00:21 +0000 (Wed, 25 Apr 2018) | 1 line +Changed paths: + M /branches/4.0/doc/mpfr.texi + +[doc/mpfr.texi] Updated the month. +------------------------------------------------------------------------ +r12662 | vlefevre | 2018-04-25 14:45:45 +0000 (Wed, 25 Apr 2018) | 1 line +Changed paths: + M /branches/4.0/tests + M /branches/4.0/tests/tdiv_ui.c + M /branches/4.0/tests/tfma.c + M /branches/4.0/tests/tget_str.c + +Merged recent tests from the trunk (r12435-12453). +------------------------------------------------------------------------ +r12642 | vlefevre | 2018-04-19 15:51:55 +0000 (Thu, 19 Apr 2018) | 13 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/src/get_str.c + M /branches/4.0/tests + M /branches/4.0/tests/tget_str.c + +Fixed an issue with mpfr_get_str: The number 1 of significant digits +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) +------------------------------------------------------------------------ +r12632 | vlefevre | 2018-04-19 13:33:00 +0000 (Thu, 19 Apr 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tget_flt.c + +[tests/tget_flt.c] Correction about the use of mpfr_signbit, in case +the implementation would change. +(merged changeset r12631 from the trunk) +------------------------------------------------------------------------ +r12630 | vlefevre | 2018-04-19 13:28:19 +0000 (Thu, 19 Apr 2018) | 1 line +Changed paths: + M /branches/4.0/tests + M /branches/4.0/tests/tbuildopt.c + M /branches/4.0/tests/tfma.c + M /branches/4.0/tests/tget_flt.c + M /branches/4.0/tests/tget_q.c + M /branches/4.0/tests/tget_set_d64.c + M /branches/4.0/tests/tset_z_exp.c + +Merged recent tests from the trunk (r12393-12424). +------------------------------------------------------------------------ +r12629 | vlefevre | 2018-04-19 13:17:34 +0000 (Thu, 19 Apr 2018) | 4 lines +Changed paths: + M /branches/4.0/src/sqr.c + M /branches/4.0/tests + M /branches/4.0/tests/tsqr.c + +[src/sqr.c] Fixed a bug in mpfr_sqr_1n in a rare case near underflow. +[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) +------------------------------------------------------------------------ +r12624 | vlefevre | 2018-04-19 12:24:18 +0000 (Thu, 19 Apr 2018) | 4 lines +Changed paths: + M /branches/4.0/src/fma.c + M /branches/4.0/tests/tfma.c + +[src/fma.c] Fixed various bugs related to internal overflows/underflows. +[tests/tfma.c] Added tests. +(merged changesets r12393-12405,12583-12623 on these files from the +trunk) +------------------------------------------------------------------------ +r12581 | vlefevre | 2018-04-11 15:17:16 +0000 (Wed, 11 Apr 2018) | 8 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/terf.c + M /branches/4.0/tests/tpow.c + M /branches/4.0/tests/tpow_z.c + +[tests] Removed some useless #include's, in particular all the +unconditional #include 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, is not required by freestanding implementations, +so that it may be better to avoid it if possible. +(merged changeset r12488 from the trunk) +------------------------------------------------------------------------ +r12580 | vlefevre | 2018-04-11 14:03:03 +0000 (Wed, 11 Apr 2018) | 3 lines +Changed paths: + M /branches/4.0/tests + M /branches/4.0/tests/tmul.c + +[tests] Merged the test from r12348, and replaced MUL_FFT_THRESHOLD +by its default value 8448 (since the definition of MUL_FFT_THRESHOLD +has not been moved in the 4.0 branch). +------------------------------------------------------------------------ +r12579 | vlefevre | 2018-04-11 13:54:39 +0000 (Wed, 11 Apr 2018) | 1 line +Changed paths: + M /branches/4.0/tests + M /branches/4.0/tests/tagm.c + M /branches/4.0/tests/tai.c + M /branches/4.0/tests/tdiv.c + M /branches/4.0/tests/tgmpop.c + M /branches/4.0/tests/tmul.c + M /branches/4.0/tests/tmul_2exp.c + M /branches/4.0/tests/tsqrt.c + M /branches/4.0/tests/tsub.c + M /branches/4.0/tests/tzeta.c + +Merged recent tests from the trunk (r12288-12347). +------------------------------------------------------------------------ +r12578 | vlefevre | 2018-04-11 13:16:15 +0000 (Wed, 11 Apr 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/mul.c + M /branches/4.0/tests + M /branches/4.0/tests/tset_ld.c + M /branches/4.0/tests/tsub1sp.c + +Fixed type errors with -D_MPFR_PREC_FORMAT=2 in CFLAGS and the +--enable-assert=full configure option (signaled by GCC's -Wformat). +(merged changesets r12301-12302 from the trunk) +------------------------------------------------------------------------ +r12577 | vlefevre | 2018-04-11 13:06:53 +0000 (Wed, 11 Apr 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests + M /branches/4.0/tests/tversion.c + +[tests/tversion.c] Output the sizes of long and intmax_t, and +"Generic ABI code" info (MPFR_GENERIC_ABI). +(merged changesets r12447,12575 from the trunk) +------------------------------------------------------------------------ +r12576 | vlefevre | 2018-04-11 13:02:27 +0000 (Wed, 11 Apr 2018) | 4 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/sub1sp.c + +[src/sub1sp.c] fixed bug in mpfr_sub1sp1n (corner case when a=c). +This fixes the failures from r12288. +(merged changeset r12285 from the trunk; note that the merge for +the tests directory had already been done via r12288) +------------------------------------------------------------------------ +r12480 | vlefevre | 2018-03-14 10:33:01 +0000 (Wed, 14 Mar 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/src/mpfr-impl.h + +[src/mpfr-impl.h] Typo in a comment. +(merged changeset r12421 from the trunk) +------------------------------------------------------------------------ +r12475 | vlefevre | 2018-03-09 23:12:04 +0000 (Fri, 09 Mar 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/TODO + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/src/atan.c + M /branches/4.0/src/cache.c + M /branches/4.0/src/fpif.c + M /branches/4.0/src/get_flt.c + M /branches/4.0/src/mpfr.h + M /branches/4.0/src/sum.c + M /branches/4.0/tests + M /branches/4.0/tests/terandom_chisq.c + M /branches/4.0/tests/tnrandom_chisq.c + +Fixed spelling mistakes found by codespell 1.12.0. +(merged changeset r12474 from the trunk) +------------------------------------------------------------------------ +r12470 | vlefevre | 2018-03-08 02:42:59 +0000 (Thu, 08 Mar 2018) | 6 lines +Changed paths: + M /branches/4.0 + A /branches/4.0/codespell.ignore (from /trunk/codespell.ignore:12469) + M /branches/4.0/doc/README.dev + M /branches/4.0/src/li2.c + M /branches/4.0/src/mpfr-gmp.h + M /branches/4.0/src/mpfr-thread.h + M /branches/4.0/src/vasprintf.c + M /branches/4.0/tests + M /branches/4.0/tests/tgmpop.c + M /branches/4.0/tests/tset_ld.c + M /branches/4.0/tools/mpfrlint + +Added codespell.ignore file with simple words to ignore with codespell +("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) +------------------------------------------------------------------------ +r12465 | vlefevre | 2018-03-05 14:43:39 +0000 (Mon, 05 Mar 2018) | 1 line +Changed paths: + M /branches/4.0/doc/mpfr.texi + +[doc/mpfr.texi] Updated the month. +------------------------------------------------------------------------ +r12463 | vlefevre | 2018-03-05 10:46:53 +0000 (Mon, 05 Mar 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/doc/mpfr.texi + +[doc/mpfr.texi] Typographic corrections for mpfr_subnormalize. +(merged changeset r12462 from the trunk) +------------------------------------------------------------------------ +r12431 | vlefevre | 2018-02-23 17:00:13 +0000 (Fri, 23 Feb 2018) | 2 lines +Changed paths: + M /branches/4.0/src/get_sj.c + +[src/get_sj.c] And now that the incorrect assertions have been removed, +the condition sh >= 0 needs to be fixed to sh > 0... +------------------------------------------------------------------------ +r12428 | vlefevre | 2018-02-23 16:24:21 +0000 (Fri, 23 Feb 2018) | 2 lines +Changed paths: + M /branches/4.0/src/get_sj.c + +[src/get_sj.c] Removed unnecessary condition sh < GMP_NUMB_BITS, which +is incorrect with some C implementations. It came from r7047. +------------------------------------------------------------------------ +r12288 | vlefevre | 2018-02-17 10:50:29 +0000 (Sat, 17 Feb 2018) | 3 lines +Changed paths: + M /branches/4.0/tests + M /branches/4.0/tests/tadd1sp.c + M /branches/4.0/tests/tfmma.c + M /branches/4.0/tests/tmul_2exp.c + M /branches/4.0/tests/tsub.c + M /branches/4.0/tests/tsub1sp.c + +Merged the latest tests from the trunk (r12258-12287). +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". +------------------------------------------------------------------------ +r12258 | vlefevre | 2018-02-16 02:29:27 +0000 (Fri, 16 Feb 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests/tsub.c + +[tests/tsub.c] Added bug20180216 test currently failing in the trunk +in r12257. +(merged changesets r12256-12257 from the trunk) +------------------------------------------------------------------------ +r12247 | vlefevre | 2018-02-15 14:31:18 +0000 (Thu, 15 Feb 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests/tsub.c + +[tests/tsub.c] Added bug20180215 test currently failing in the trunk +in r12243. +(merged changeset r12246 from the trunk) +------------------------------------------------------------------------ +r12224 | vlefevre | 2018-02-13 12:17:25 +0000 (Tue, 13 Feb 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests/tadd.c + +[tests/tadd.c] Added 2 tests that were failing in the trunk in r12220. +(merged changeset r12221 from the trunk) +------------------------------------------------------------------------ +r12216 | vlefevre | 2018-02-08 02:11:23 +0000 (Thu, 08 Feb 2018) | 5 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/tests/tfits.c + M /branches/4.0/tests/tfprintf.c + M /branches/4.0/tests/tget_set_d64.c + M /branches/4.0/tests/tget_sj.c + M /branches/4.0/tests/tprintf.c + M /branches/4.0/tests/tset_float128.c + M /branches/4.0/tests/tset_ld.c + M /branches/4.0/tests/tset_sj.c + M /branches/4.0/tests/tsprintf.c + M /branches/4.0/tests/tversion.c + +[tests] + * 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) +------------------------------------------------------------------------ +r12213 | vlefevre | 2018-02-07 23:39:15 +0000 (Wed, 07 Feb 2018) | 2 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/INSTALL + +[INSTALL] Updated GMP URL. +(merged changeset r12212 from the trunk) +------------------------------------------------------------------------ +r12211 | vlefevre | 2018-02-07 23:34:18 +0000 (Wed, 07 Feb 2018) | 1 line +Changed paths: + M /branches/4.0/NEWS + +[NEWS] Update for GNU MPFR 4.0.2. +------------------------------------------------------------------------ +r12209 | vlefevre | 2018-02-07 23:31:36 +0000 (Wed, 07 Feb 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/tools/mpfrlint + +[doc/mpfr.texi] Corrected minimal GMP version. +[tools/mpfrlint] Updated test to detect minimal GMP version mismatch. +(merged changeset r12208 from the trunk) +------------------------------------------------------------------------ +r12207 | vlefevre | 2018-02-07 23:22:44 +0000 (Wed, 07 Feb 2018) | 3 lines +Changed paths: + M /branches/4.0 + M /branches/4.0/INSTALL + M /branches/4.0/tools/mpfrlint + +[INSTALL] Corrected minimal GMP version (thanks to David Edelsohn). +[tools/mpfrlint] Added a test to detect minimal GMP version mismatch. +(merged changeset r12206 from the trunk) +------------------------------------------------------------------------ +r12203 | vlefevre | 2018-02-07 16:18:16 +0000 (Wed, 07 Feb 2018) | 1 line +Changed paths: + M /branches/4.0/INSTALL + M /branches/4.0/VERSION + M /branches/4.0/configure.ac + M /branches/4.0/doc/mpfr.texi + M /branches/4.0/src/mpfr.h + M /branches/4.0/src/version.c + +Updated version to 4.0.2-dev. +------------------------------------------------------------------------ +r12201 | vlefevre | 2018-02-07 12:52:40 +0000 (Wed, 07 Feb 2018) | 1 line +Changed paths: + M /branches/4.0/ChangeLog + +ChangeLog update with "TZ=UTC svn log -rHEAD:0 -v" (in UTF-8 locales). +------------------------------------------------------------------------ r12200 | vlefevre | 2018-02-07 12:50:31 +0000 (Wed, 07 Feb 2018) | 1 line Changed paths: M /branches/4.0/VERSION @@ -3729,7 +5933,7 @@ [configure.ac] Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH is defined, avoiding the following issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859732 - http://lists.gnu.org/archive/html/libtool/2017-05/msg00000.html + https://lists.gnu.org/archive/html/libtool/2017-05/msg00000.html (merged changeset r11587 from the 3.1 branch) ------------------------------------------------------------------------ r11586 | vlefevre | 2017-07-10 11:53:17 +0000 (Mon, 10 Jul 2017) | 1 line @@ -10090,7 +12294,7 @@ M /trunk/src/get_ld.c M /trunk/src/set_ld.c -[src/cmp_ld.c] include float.h so that MPFR_LDBL_MANT_DIG is correcly defined +[src/cmp_ld.c] include float.h so that MPFR_LDBL_MANT_DIG is correctly defined [src/get_ld.c,src/set_ld.c] added comment ------------------------------------------------------------------------ @@ -17645,7 +19849,7 @@ A /trunk/libtool-tcc-rpath.patch Added libtool-tcc-rpath.patch from - http://lists.gnu.org/archive/html/libtool-patches/2015-05/msg00000.html + https://lists.gnu.org/archive/html/libtool-patches/2015-05/msg00000.html so that tcc can be used with libtool 2.4.3 to 2.4.6. In doc/README.dev, documented how to use this patch (before a release). ------------------------------------------------------------------------ @@ -19676,8 +21880,8 @@ M /trunk/doc/README.dev [doc/README.dev] Completed the note about GCC's sanitizer. See - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44786 (sanitizer) - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60275 (no recover) + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44786 (sanitizer) + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60275 (no recover) ------------------------------------------------------------------------ r9043 | vlefevre | 2014-04-25 08:30:38 +0000 (Fri, 25 Apr 2014) | 1 line Changed paths: @@ -22820,7 +25024,7 @@ [src/mpfr-sassert.h] Get rid of annoying warnings typedef 'MPFR_ASSERT_xxx' locally defined but not used with GCC 4.8+ (better than the non-portable solution r8618). Thanks to -Jonathan Wakely: http://gcc.gnu.org/ml/gcc-help/2013-07/msg00142.html +Jonathan Wakely: https://gcc.gnu.org/ml/gcc-help/2013-07/msg00142.html ------------------------------------------------------------------------ r8624 | zimmerma | 2013-07-22 12:06:18 +0000 (Mon, 22 Jul 2013) | 4 lines Changed paths: @@ -23881,7 +26085,7 @@ M /trunk/tune/tuneup.c Use copyright year ranges, following - http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices + https://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices ------------------------------------------------------------------------ r8537 | vlefevre | 2013-05-30 13:51:01 +0000 (Thu, 30 May 2013) | 1 line Changed paths: @@ -31033,7 +33237,7 @@ Changed paths: M /trunk/tests/trint.c -Previous extented coverage test in trint.c now self generate tests in and compare values +Previous extended coverage test in trint.c now self generate tests in and compare values ------------------------------------------------------------------------ r7524 | demengeo | 2011-03-04 14:14:13 +0000 (Fri, 04 Mar 2011) | 1 line Changed paths: @@ -39152,7 +41356,7 @@ M /trunk/tests/Makefile.am Makefile.am, tests/Makefile.am: patch from Ralf Wildenhues. -http://lists.gnu.org/archive/html/bug-automake/2009-09/msg00033.html +https://lists.gnu.org/archive/html/bug-automake/2009-09/msg00033.html ------------------------------------------------------------------------ r6475 | vlefevre | 2009-09-18 15:00:09 +0000 (Fri, 18 Sep 2009) | 1 line Changed paths: @@ -41803,7 +44007,7 @@ Changed paths: M /trunk/mpfr.h -Add protoype for mpfr_min_prec in mpfr.h. +Add prototype for mpfr_min_prec in mpfr.h. ------------------------------------------------------------------------ r6103 | lfousse | 2009-03-15 20:34:33 +0000 (Sun, 15 Mar 2009) | 2 lines @@ -44652,7 +46856,7 @@ M /trunk/INSTALL INSTALL: TLS on darwin may work, but I don't know anything more. -See thread . +See thread . ------------------------------------------------------------------------ r5702 | vlefevre | 2008-12-08 16:02:29 +0000 (Mon, 08 Dec 2008) | 1 line Changed paths: @@ -44987,7 +47191,7 @@ configure.in: replaced $(...) quoting style by "`...`" since the former is not supported everywhere (and indeed is not used by the autotools): -http://swox.com/list-archives/gmp-bugs/2008-October/001185.html +https://gmplib.org/list-archives/gmp-bugs/2008-October/001185.html ------------------------------------------------------------------------ r5658 | vlefevre | 2008-10-29 01:21:29 +0000 (Wed, 29 Oct 2008) | 2 lines Changed paths: @@ -49364,7 +51568,7 @@ M /trunk/tests/tprintf.c M /trunk/vasprintf.c -exponent continuity with one hexadecimal digit ouput +exponent continuity with one hexadecimal digit output ------------------------------------------------------------------------ r5104 | thevenyp | 2007-12-17 14:41:58 +0000 (Mon, 17 Dec 2007) | 2 lines @@ -58515,7 +60719,7 @@ M /trunk/zeta_ui.c Updated the copyright notices according to the new GNU rules on: - http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices + https://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices i.e. added 2006 to every MPFR file. Note: the copyright notices (currently 336) should match the regexp Copyright.* 2006 Free Software @@ -60854,7 +63058,7 @@ M /trunk/extract.c M /trunk/strtofr.c -Fix warnings due to comparaison between signed and unsigned. +Fix warnings due to comparison between signed and unsigned. Reinclude string.h for strtofr. ------------------------------------------------------------------------ @@ -61092,7 +63296,7 @@ M /trunk/COPYING M /trunk/COPYING.LIB -Forget thoses two. Update from FSF site. +Forget those two. Update from FSF site. ------------------------------------------------------------------------ r3607 | pelissip | 2005-06-02 16:16:17 +0000 (Thu, 02 Jun 2005) | 2 lines @@ -62268,7 +64472,7 @@ Changed paths: M /trunk/tests/reuse.c -Add new funcions in reuse test. +Add new functions in reuse test. ------------------------------------------------------------------------ r3503 | zimmerma | 2005-04-30 11:03:47 +0000 (Sat, 30 Apr 2005) | 2 lines @@ -63656,7 +65860,7 @@ M /trunk/tanh.c M /trunk/zeta.c -Log input and ouput of functions. +Log input and output of functions. ------------------------------------------------------------------------ r3314 | pelissip | 2005-02-15 10:06:39 +0000 (Tue, 15 Feb 2005) | 2 lines @@ -63926,7 +66130,7 @@ As a consequence some tests using AC_RUN_IFELSE may fail due to ugly things like LD_LIBRARY_PATH no set or wrong selection of libgmp. So they just produce a warning, not a fatal error. -TODO: Check if we can avoid thoses problems... +TODO: Check if we can avoid those problems... ------------------------------------------------------------------------ r3283 | pelissip | 2005-02-08 15:49:12 +0000 (Tue, 08 Feb 2005) | 3 lines @@ -65135,7 +67339,7 @@ Changed paths: M /trunk/mpfr.h -Remove thread attribut until I found a good way to use it. +Remove thread attribute until I found a good way to use it. ------------------------------------------------------------------------ r3140 | pelissip | 2004-12-15 10:49:11 +0000 (Wed, 15 Dec 2004) | 2 lines @@ -65284,7 +67488,7 @@ Changed paths: M /trunk/mpfr.h -Add support for new attribut sentinel in incoming GCC 4.0 +Add support for new attribute sentinel in incoming GCC 4.0 ------------------------------------------------------------------------ r3122 | pelissip | 2004-12-09 13:23:25 +0000 (Thu, 09 Dec 2004) | 2 lines @@ -65305,7 +67509,7 @@ Optimize mpfr_set4. Inline rounding in mpfr_set4 and mpfr_cache -mpfr_set4 dosn't return MPFR_EVEN_INEX (It was undocumented before). +mpfr_set4 doesn't return MPFR_EVEN_INEX (It was undocumented before). Fix problems with tests (Avoid mixing MPFR_EVEN_INEX and 1). Add MPFR_RNDRAW_EVEN for rounding with MPFR_EVEN_INEX inexact support @@ -66214,7 +68418,7 @@ M /trunk/mpfr.texi Update documentation and NEWS to reflect new functions -and functionnality. +and functionality. ------------------------------------------------------------------------ r3008 | pelissip | 2004-09-29 12:28:17 +0000 (Wed, 29 Sep 2004) | 2 lines @@ -66306,7 +68510,7 @@ Changed paths: M /trunk/div.c -Replace variable 'near' to 'the_real_near' since MSVC incorreclty +Replace variable 'near' to 'the_real_near' since MSVC incorrectly recognize "far" and "near" as obsolete keywords (100% incorrect, and clearly MSVC fault but it doesn't cost many things to change the name). @@ -69508,7 +71712,7 @@ Changed paths: M /trunk/isinteger.c -+ Simplify the signular code. ++ Simplify the singular code. + Fix potential type errors. (Used mpfr_prec_t instead of mpfr_uexp_t). ------------------------------------------------------------------------ @@ -69983,7 +72187,7 @@ M /trunk/tests/tsub1sp.c + Add a new test in case of underflow. -+ Fix bug in case of underflow for sub1 / sub1sp (mpfr_powerof2 could be called with inalid numbers). ++ Fix bug in case of underflow for sub1 / sub1sp (mpfr_powerof2 could be called with invalid numbers). ------------------------------------------------------------------------ r2570 | pelissip | 2003-12-09 14:58:26 +0000 (Tue, 09 Dec 2003) | 3 lines @@ -70084,7 +72288,7 @@ M /trunk/mpfr-impl.h M /trunk/sub1.c -Optmize a few add1.c/sub1.c by using MPFR_LIKELY / MPFR_UNLIKELY. +Optimize a few add1.c/sub1.c by using MPFR_LIKELY / MPFR_UNLIKELY. ------------------------------------------------------------------------ r2563 | pelissip | 2003-11-21 16:26:19 +0000 (Fri, 21 Nov 2003) | 2 lines @@ -70109,7 +72313,7 @@ M /trunk/sub1.c M /trunk/zeta.c -Remove some warnings and potential errors (Comparaison between signed and unsigned). +Remove some warnings and potential errors (Comparison between signed and unsigned). ------------------------------------------------------------------------ r2562 | pelissip | 2003-11-21 15:27:35 +0000 (Fri, 21 Nov 2003) | 4 lines @@ -77456,7 +79660,7 @@ M /trunk/tests/tui_div.c M /trunk/tests/tui_sub.c -- use mpfr_test_init to initialize harware floats +- use mpfr_test_init to initialize hardware floats - use #ifdef HAVE_INFS when using DBL_NAN, ... - fixed some problems with wrongly converted f-p values (esp. under IRIX) @@ -78541,7 +80745,7 @@ Changed paths: M /trunk/acosh.c -chnage the return values +change the return values ------------------------------------------------------------------------ r1683 | daney | 2002-02-06 15:34:15 +0000 (Wed, 06 Feb 2002) | 2 lines @@ -78795,7 +80999,7 @@ Changed paths: M /trunk/fma.c -Change indendation + replace "" -> <> in header +Change indentation + replace "" -> <> in header ------------------------------------------------------------------------ r1655 | vlefevre | 2002-01-17 21:45:41 +0000 (Thu, 17 Jan 2002) | 2 lines @@ -80980,7 +83184,7 @@ Changed paths: M /trunk/fma.c -mixed version beetwen DD and Pau => (gestion des flag inexacte dirige) +mixed version between DD and Pau => (gestion des flag inexacte dirige) ------------------------------------------------------------------------ r1431 | daney | 2001-10-26 15:28:31 +0000 (Fri, 26 Oct 2001) | 2 lines @@ -82434,7 +84638,7 @@ Changed paths: M /trunk/set_d.c -implemeted inexact flag in mpfr_set_d +implemented inexact flag in mpfr_set_d ------------------------------------------------------------------------ r1234 | zimmerma | 2001-10-12 12:17:24 +0000 (Fri, 12 Oct 2001) | 2 lines @@ -89843,7 +92047,7 @@ Changed paths: M /trunk/sqrt3.c -The word added when the exponent is odd was sometimes unitialized. +The word added when the exponent is odd was sometimes uninitialized. ------------------------------------------------------------------------ r320 | hanrot | 1999-07-06 09:39:42 +0000 (Tue, 06 Jul 1999) | 2 lines diff -Nru mpfr4-4.0.1/compile mpfr4-4.0.2/compile --- mpfr4-4.0.1/compile 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/compile 2019-01-31 20:43:20.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -255,7 +255,8 @@ echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru mpfr4-4.0.1/config.guess mpfr4-4.0.2/config.guess --- mpfr4-4.0.1/config.guess 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/config.guess 2019-01-31 20:43:20.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2017 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2017-11-07' +timestamp='2018-02-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -107,9 +107,9 @@ dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; + ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; @@ -132,14 +132,14 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +149,20 @@ LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -169,30 +176,30 @@ # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -208,10 +215,10 @@ ;; esac # Determine ABI tags. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -219,52 +226,55 @@ # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}${abi}" + echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) - echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) - echo ${UNAME_MACHINE}-unknown-sortix + echo "$UNAME_MACHINE"-unknown-sortix exit ;; *:Redox:*:*) - echo ${UNAME_MACHINE}-unknown-redox + echo "$UNAME_MACHINE"-unknown-redox exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -316,7 +326,7 @@ # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -325,10 +335,10 @@ echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -340,7 +350,7 @@ echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -367,19 +377,19 @@ sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. @@ -392,13 +402,13 @@ SUN_ARCH=x86_64 fi fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -407,25 +417,25 @@ ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -436,44 +446,44 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -494,11 +504,11 @@ exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -524,17 +534,17 @@ AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -551,7 +561,7 @@ echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -563,14 +573,14 @@ if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -581,7 +591,7 @@ exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -595,7 +605,7 @@ exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -604,9 +614,9 @@ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix @@ -615,7 +625,7 @@ echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -630,28 +640,28 @@ echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in + case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in + case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -684,13 +694,13 @@ exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = hppa2.0w ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -709,15 +719,15 @@ HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -742,7 +752,7 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; @@ -763,9 +773,9 @@ exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -790,109 +800,109 @@ echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -906,63 +916,63 @@ esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -976,70 +986,74 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-${LIBC} + echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} + echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} + echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} + echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1053,34 +1067,34 @@ # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1090,12 +1104,12 @@ *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1105,9 +1119,9 @@ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1127,9 +1141,9 @@ exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1149,9 +1163,9 @@ test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1160,28 +1174,28 @@ test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1192,7 +1206,7 @@ *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1212,23 +1226,23 @@ exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1247,39 +1261,39 @@ echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux${UNAME_RELEASE} + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build + eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ @@ -1307,7 +1321,7 @@ # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` @@ -1315,22 +1329,25 @@ UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk${UNAME_RELEASE} + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1339,7 +1356,7 @@ echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 @@ -1350,7 +1367,7 @@ else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1371,14 +1388,14 @@ echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1387,16 +1404,16 @@ echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs @@ -1405,7 +1422,7 @@ echo "$0: unable to guess system type" >&2 -case "${UNAME_MACHINE}:${UNAME_SYSTEM}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 </dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 diff -Nru mpfr4-4.0.1/config.sub mpfr4-4.0.2/config.sub --- mpfr4-4.0.1/config.sub 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/config.sub 2019-01-31 20:43:20.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2017 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2017-11-23' +timestamp='2018-02-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -94,7 +94,7 @@ *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -112,7 +112,7 @@ # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ @@ -120,16 +120,16 @@ kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac @@ -178,44 +178,44 @@ ;; -sco6) os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 @@ -227,7 +227,7 @@ os=-lynxos ;; -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -psos*) os=-psos @@ -296,7 +296,7 @@ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ + | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pru \ | pyramid \ @@ -333,7 +333,7 @@ basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown @@ -362,7 +362,7 @@ ;; # Object if more than one company name word. *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. @@ -457,7 +457,7 @@ # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) - basic_machine=i386-unknown + basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -491,7 +491,7 @@ basic_machine=x86_64-pc ;; amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl @@ -536,7 +536,7 @@ os=-linux ;; blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) @@ -544,13 +544,13 @@ os=-cnk ;; c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray @@ -648,7 +648,7 @@ os=$os"spe" ;; e500v[12]-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=$os"spe" ;; ebmon29k) @@ -740,9 +740,6 @@ hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; - hppa-next) - os=-nextstep3 - ;; hppaosf) basic_machine=hppa1.1-hp os=-osf @@ -755,26 +752,26 @@ basic_machine=i370-ibm ;; i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; - i386-vsta | vsta) + vsta) basic_machine=i386-unknown os=-vsta ;; @@ -793,19 +790,16 @@ os=-sysv ;; leon-*|leon[3-9]-*) - basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; - m88k-omron*) - basic_machine=m88k-omron - ;; magnum | m3230) basic_machine=mips-mips os=-sysv @@ -837,10 +831,10 @@ os=-mint ;; mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k @@ -859,7 +853,7 @@ os=-msdos ;; ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc @@ -946,6 +940,9 @@ nsr-tandem) basic_machine=nsr-tandem ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; nsx-tandem) basic_machine=nsx-tandem ;; @@ -981,7 +978,7 @@ os=-linux ;; parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) @@ -997,7 +994,7 @@ basic_machine=i386-pc ;; pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc @@ -1012,16 +1009,16 @@ basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould @@ -1031,23 +1028,23 @@ ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm @@ -1101,17 +1098,10 @@ sequent) basic_machine=i386-sequent ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; sh5el) basic_machine=sh5le-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) + simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -1130,7 +1120,7 @@ os=-sysv4 ;; strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun @@ -1244,9 +1234,6 @@ basic_machine=a29k-wrs os=-vxworks ;; - wasm32) - basic_machine=wasm32-unknown - ;; w65*) basic_machine=w65-wdc os=-none @@ -1266,20 +1253,12 @@ basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; none) basic_machine=none-none os=-none @@ -1308,10 +1287,6 @@ vax) basic_machine=vax-dec ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; pdp11) basic_machine=pdp11-dec ;; @@ -1321,9 +1296,6 @@ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; cydra) basic_machine=cydra-cydrome ;; @@ -1343,7 +1315,7 @@ # Make sure to match an already-canonicalized machine name. ;; *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac @@ -1351,10 +1323,10 @@ # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1377,15 +1349,16 @@ -solaris) os=-solaris2 ;; - -svr4*) - os=-sysv4 - ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. @@ -1398,7 +1371,7 @@ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ @@ -1409,14 +1382,15 @@ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1433,12 +1407,12 @@ -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc @@ -1447,10 +1421,10 @@ os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition @@ -1461,12 +1435,6 @@ -wince*) os=-wince ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; -utek*) os=-bsd ;; @@ -1513,7 +1481,7 @@ -oss*) os=-sysv3 ;; - -svr4) + -svr4*) os=-sysv4 ;; -svr3) @@ -1528,18 +1496,9 @@ -ose*) os=-ose ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; - -aros*) - os=-aros - ;; -zvmoe) os=-zvmoe ;; @@ -1568,7 +1527,7 @@ *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1664,9 +1623,6 @@ *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; @@ -1721,9 +1677,6 @@ i370-*) os=-mvs ;; - *-next) - os=-nextstep3 - ;; *-gould) os=-sysv ;; @@ -1833,11 +1786,11 @@ vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$basic_machine$os" exit # Local variables: diff -Nru mpfr4-4.0.1/configure mpfr4-4.0.2/configure --- mpfr4-4.0.1/configure 2018-02-07 12:57:46.000000000 +0000 +++ mpfr4-4.0.2/configure 2019-01-31 20:43:19.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for MPFR 4.0.1. +# Generated by GNU Autoconf 2.69 for MPFR 4.0.2. # # -# Copyright 1999-2018 Free Software Foundation, Inc. +# Copyright 1999-2019 Free Software Foundation, Inc. # Contributed by the AriC and Caramba projects, INRIA. # # This file is part of the GNU MPFR Library. @@ -20,7 +20,7 @@ # # You should have received a copy of the GNU Lesser General Public License # along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -# http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +# https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # # @@ -609,8 +609,8 @@ # Identity of this package. PACKAGE_NAME='MPFR' PACKAGE_TARNAME='mpfr' -PACKAGE_VERSION='4.0.1' -PACKAGE_STRING='MPFR 4.0.1' +PACKAGE_VERSION='4.0.2' +PACKAGE_STRING='MPFR 4.0.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -658,11 +658,11 @@ LIBMPFR_LDFLAGS MPFR_LDFLAGS TUNE_LIBS +ALLOCA PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC ax_pthread_config -ALLOCA MPFR_LIBQUADMATH MPFR_LIBM LT_SYS_LIBRARY_PATH @@ -693,7 +693,6 @@ AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -782,7 +781,8 @@ PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -1376,7 +1376,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures MPFR 4.0.1 to adapt to many kinds of systems. +\`configure' configures MPFR 4.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1447,7 +1447,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of MPFR 4.0.1:";; + short | recursive ) echo "Configuration of MPFR 4.0.2:";; esac cat <<\_ACEOF @@ -1595,7 +1595,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -MPFR configure 4.0.1 +MPFR configure 4.0.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1603,7 +1603,7 @@ gives unlimited permission to copy, distribute and modify it. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -1620,7 +1620,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. _ACEOF @@ -2027,8 +2027,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } +static long int longval (void) { return $2; } +static unsigned long int ulongval (void) { return $2; } #include #include int @@ -2276,7 +2276,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by MPFR $as_me 4.0.1, which was +It was created by MPFR $as_me 4.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2625,7 +2625,7 @@ -am__api_version='1.15' +am__api_version='1.16' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -3140,7 +3140,7 @@ # Define the identity of the package. PACKAGE='mpfr' - VERSION='4.0.1' + VERSION='4.0.2' # Some tools Automake needs. @@ -3161,8 +3161,8 @@ # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -3213,7 +3213,7 @@ Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -3755,9 +3755,9 @@ # Check whether --enable-shared-cache was given. if test "${enable_shared_cache+set}" = set; then : enableval=$enable_shared_cache; case $enableval in - yes) mpfr_want_shared_cache=yes + yes) -$as_echo "#define WANT_SHARED_CACHE 1" >>confdefs.h +$as_echo "#define MPFR_WANT_SHARED_CACHE 1" >>confdefs.h ;; no) ;; *) as_fn_error $? "bad value for --enable-shared-cache: yes or no" "$LINENO" 5 ;; @@ -3807,6 +3807,32 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether configure options are compatible" >&5 +$as_echo_n "checking whether configure options are compatible... " >&6; } +if test "$enable_logging" = yes; then + if test "$enable_thread_safe" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "enable either logging or thread-safe, not both" "$LINENO" 5 + fi + if test "$enable_shared_cache" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "shared cache does not work with logging support" "$LINENO" 5 + fi + enable_thread_safe=no +fi +if test "$enable_shared_cache" = yes; then + if test "$enable_thread_safe" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "shared cache needs thread-safe support" "$LINENO" 5 + fi + enable_thread_safe=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + @@ -3835,11 +3861,9 @@ # Get CFLAGS echo "#include \"gmp.h\"" > conftest.c echo "MPFR_OPTION __GMP_CFLAGS" >> conftest.c - unset rmpedantic - test "$enable_logging" = yes && rmpedantic='s/[ "]-pedantic[ "]/ /g;' $cpp $CPPFLAGS conftest.c 2> /dev/null > conftest.txt test $? -ne 0 && continue - GMP_CFLAGS=`$EGREP MPFR_OPTION conftest.txt | $SED -e "$rmpedantic"'s/MPFR_OPTION //g;s/ *" *//g'` + GMP_CFLAGS=`$EGREP MPFR_OPTION conftest.txt | $SED -e 's/[ "]-pedantic[ "]/ /g;s/MPFR_OPTION //g;s/ *" *//g'` break done rm -f conftest* @@ -4724,45 +4748,45 @@ ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -7194,11 +7218,8 @@ test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -13466,7 +13487,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - CFLAGS="-Wmissing-prototypes $CFLAGS" + CFLAGS="-Wmissing-prototypes -Wc++-compat $CFLAGS" else @@ -14143,1301 +14164,1358 @@ -ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" -if test "x$ac_cv_header_limits_h" = xyes; then : - -else - as_fn_error $? "limits.h not found" "$LINENO" 5 -fi - - -ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" -if test "x$ac_cv_header_float_h" = xyes; then : - -else - as_fn_error $? "float.h not found" "$LINENO" 5 -fi - - -ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = xyes; then : - -else - as_fn_error $? "string.h not found" "$LINENO" 5 -fi +if test "$enable_shared_cache" = yes; then -for ac_header in locale.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" -if test "x$ac_cv_header_locale_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LOCALE_H 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C11 thread support" >&5 +$as_echo_n "checking for ISO C11 thread support... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi +#include +#include + mtx_t lock; + once_flag once = ONCE_FLAG_INIT; + thrd_t thd_idx; + int x = 0; + void once_call (void) { x = 1; } -done +int +main (void) +{ + int err; + err = mtx_init(&lock, mtx_plain); + assert(err == thrd_success); + err = mtx_lock(&lock); + assert(err == thrd_success); + err = mtx_unlock(&lock); + assert(err == thrd_success); + mtx_destroy(&lock); + once_call(&once, once_call); + return x == 1 ? 0 : -1; -for ac_header in wchar.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" -if test "x$ac_cv_header_wchar_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WCHAR_H 1 + ; + return 0; +} _ACEOF - -fi - -done - - -ac_fn_c_check_header_mongrel "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" -if test "x$ac_cv_header_stdarg_h" = xyes; then : - -$as_echo "#define HAVE_STDARG 1" >>confdefs.h - -else - ac_fn_c_check_header_mongrel "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" -if test "x$ac_cv_header_varargs_h" = xyes; then : - +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + mpfr_c11_thread_ok=yes else - as_fn_error $? "stdarg.h or varargs.h not found" "$LINENO" 5 -fi - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$mpfr_c11_thread_ok" = "yes"; then - -for ac_header in sys/time.h sys/fpu.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +$as_echo "#define MPFR_HAVE_C11_LOCK 1" >>confdefs.h fi -done - -ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include -" -if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then : + if test "$mpfr_c11_thread_ok" != yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1 -_ACEOF -fi -ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include -" -if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1 -_ACEOF +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi +ax_pthread_ok=no +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on Tru64 or Sequent). +# It gets checked for in the link test anyway. -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${ac_cv_working_alloca_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + if test "x$PTHREAD_CC" != "x"; then : + CC="$PTHREAD_CC" +fi + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 +$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_join (); int main (void) { -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; +return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_working_alloca_h=yes -else - ac_cv_working_alloca_h=no + ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = "xno"; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). -fi +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if ${ac_cv_func_alloca_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (size_t); -# endif -# endif -# endif -# endif -#endif +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" -int -main (void) -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_alloca_works=yes -else - ac_cv_func_alloca_works=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: -if test $ac_cv_func_alloca_works = yes; then +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h +case $host_os in -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. + freebsd*) -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -$as_echo "#define C_ALLOCA 1" >>confdefs.h + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + hpux*) -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if ${ac_cv_os_cray+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif + +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no + $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 +$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} fi rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + ;; -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF + solaris*) - break -fi + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). - done -fi + ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" + ;; +esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if ${ac_cv_c_stack_direction+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_c_stack_direction=0 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction (int *addr, int depth) -{ - int dir, dummy = 0; - if (! addr) - addr = &dummy; - *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; - dir = depth ? find_stack_direction (addr, depth - 1) : 0; - return dir + dummy; -} +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) -int -main (int argc, char **argv) -{ - return find_stack_direction (0, argc + !argv + 20) < 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_stack_direction=1 -else - ac_cv_c_stack_direction=-1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if test "x$GCC" = "xyes"; then : + ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + *) + ax_pthread_check_macro="--" + ;; +esac +if test "x$ax_pthread_check_macro" = "x--"; then : + ax_pthread_check_cond=0 +else + ax_pthread_check_cond="!defined($ax_pthread_check_macro)" fi +# Are we compiling with Clang? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to copy va_list" >&5 -$as_echo_n "checking how to copy va_list... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 +$as_echo_n "checking whether $CC is Clang... " >&6; } +if ${ax_cv_PTHREAD_CLANG+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif -#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : + ax_cv_PTHREAD_CLANG=yes +fi +rm -f conftest* -int -main (void) -{ + fi - va_list ap1, ap2; - va_copy(ap1, ap2); +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 +$as_echo "$ax_cv_PTHREAD_CLANG" >&6; } +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : +ax_pthread_clang_warning=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: va_copy" >&5 -$as_echo "va_copy" >&6; } - $as_echo "#define HAVE_VA_COPY 1" >>confdefs.h +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way +if test "x$ax_pthread_clang" = "xyes"; then -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + # Clang takes -pthread; it has never supported any other flag -#include + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) -int -main (void) -{ + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) - va_list ap1, ap2; - __va_copy(ap1, ap2); + PTHREAD_CFLAGS="-pthread" + PTHREAD_LIBS= - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - $as_echo "#define HAVE___VA_COPY 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: __va_copy" >&5 -$as_echo "__va_copy" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: memcpy" >&5 -$as_echo "memcpy" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + ax_pthread_ok=yes -for ac_func in memmove memset setlocale strtol gettimeofday signal -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 +$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } +if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + if test "x$ax_pthread_try" = "xunknown"; then : + break fi -done + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void){return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_link="$ax_pthread_2step_ac_link" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void){return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + if test "x$ax_pthread_try" = "x"; then : + ax_pthread_try=no +fi + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigaction and its associated structure" >&5 -$as_echo_n "checking for sigaction and its associated structure... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 +$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } -#include -static int f (int (*func)(int, const struct sigaction *, struct sigaction *)) -{ return 0; } + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac -int -main (void) -{ +fi # $ax_pthread_clang = yes - return f(sigaction); +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : + case $ax_pthread_try_flag in + none) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +$as_echo_n "checking whether pthreads work without any flags... " >&6; } + ;; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + -mt,pthread) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 +$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } + PTHREAD_CFLAGS="-mt" + PTHREAD_LIBS="-lpthread" + ;; -$as_echo "#define HAVE_SIGACTION 1" >>confdefs.h + -*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 +$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ax_pthread_config+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ax_pthread_config="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" +fi +fi +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +$as_echo "$ax_pthread_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -ac_fn_c_check_type "$LINENO" "long long int" "ac_cv_type_long_long_int" "$ac_includes_default" -if test "x$ac_cv_type_long_long_int" = xyes; then : -$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h + if test "x$ax_pthread_config" = "xno"; then : + continue fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 +$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac -ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" -if test "x$ac_cv_type_intmax_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INTMAX_T 1 -_ACEOF - - -fi + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" -if test "$ac_cv_type_intmax_t" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working INTMAX_MAX" >&5 -$as_echo_n "checking for working INTMAX_MAX... " >&6; } -if ${mpfr_cv_have_intmax_max+:} false; then : - $as_echo_n "(cached) " >&6 -else + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$srcdir/src" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include "mpfr-intmax.h" +#include +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; } int main (void) { -intmax_t x = INTMAX_MAX; (void) x; - +pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */ ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - mpfr_cv_have_intmax_max=yes -else - mpfr_cv_have_intmax_max=no +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$saved_CPPFLAGS" +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = "xyes"; then : + break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpfr_cv_have_intmax_max" >&5 -$as_echo "$mpfr_cv_have_intmax_max" >&6; } - if test "$mpfr_cv_have_intmax_max" = "yes"; then -$as_echo "#define MPFR_HAVE_INTMAX_MAX 1" >>confdefs.h + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working printf length modifier for intmax_t" >&5 -$as_echo_n "checking for working printf length modifier for intmax_t... " >&6; } -if ${mpfr_cv_printf_maxlm+:} false; then : +# Various other checks: +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +$as_echo_n "checking for joinable pthread attribute... " >&6; } +if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : $as_echo_n "(cached) " >&6 else - - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$srcdir/src" - for modifier in j ll l - do - if test "$cross_compiling" = yes; then : - mpfr_cv_printf_maxlm=j; break - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -#include "mpfr-intmax.h" - +#include int main (void) { - - char s[64]; - sprintf (s, "%${modifier}d %${modifier}u", - (intmax_t) -17, (uintmax_t) 42); - return strcmp (s, "-17 42") != 0; - +int attr = $ax_pthread_attr; return attr /* ; */ ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - mpfr_cv_printf_maxlm=${modifier}; break -else - mpfr_cv_printf_maxlm=none -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break fi - - done - CPPFLAGS="$saved_CPPFLAGS" +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpfr_cv_printf_maxlm" >&5 -$as_echo "$mpfr_cv_printf_maxlm" >&6; } - if test "$mpfr_cv_printf_maxlm" != "none"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 +$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } + if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : cat >>confdefs.h <<_ACEOF -#define MPFR_PRINTF_MAXLM "$mpfr_cv_printf_maxlm" +#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR _ACEOF - fi -fi - -ac_fn_c_check_type "$LINENO" "union fpc_csr" "ac_cv_type_union_fpc_csr" " -#if HAVE_SYS_FPU_H -# include -#endif - -" -if test "x$ac_cv_type_union_fpc_csr" = xyes; then : - -$as_echo "#define HAVE_FPC_CSR 1" >>confdefs.h + ax_pthread_joinable_attr_defined=yes fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Noreturn" >&5 -$as_echo_n "checking for _Noreturn... " >&6; } -if ${mpfr_cv_have_noreturn+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 +$as_echo_n "checking whether more special flags are required for pthreads... " >&6; } +if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -_Noreturn void foo(int); -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - mpfr_cv_have_noreturn=yes -else - mpfr_cv_have_noreturn=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpfr_cv_have_noreturn" >&5 -$as_echo "$mpfr_cv_have_noreturn" >&6; } -if test "$mpfr_cv_have_noreturn" = "yes"; then - -$as_echo "#define MPFR_HAVE_NORETURN 1" >>confdefs.h - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 +$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } + if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"; then : + PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5 -$as_echo_n "checking for __builtin_unreachable... " >&6; } -if ${mpfr_cv_have_builtin_unreachable+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int x; +#include int main (void) { -if (x) __builtin_unreachable(); - +int i = PTHREAD_PRIO_INHERIT; + return i; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - mpfr_cv_have_builtin_unreachable=yes + ax_cv_PTHREAD_PRIO_INHERIT=yes else - mpfr_cv_have_builtin_unreachable=no + ax_cv_PTHREAD_PRIO_INHERIT=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpfr_cv_have_builtin_unreachable" >&5 -$as_echo "$mpfr_cv_have_builtin_unreachable" >&6; } -if test "$mpfr_cv_have_builtin_unreachable" = "yes"; then - -$as_echo "#define MPFR_HAVE_BUILTIN_UNREACHABLE 1" >>confdefs.h - -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : +$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for constructor and destructor attributes" >&5 -$as_echo_n "checking for constructor and destructor attributes... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + ax_pthread_prio_inherit_defined=yes -#include -int x = 0; -__attribute__((constructor)) static void -call_f(void) { x = 1742; } -__attribute__((destructor)) static void -call_g(void) { x = 1448; } +fi -int -main (void) -{ + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" - return (x == 1742) ? 0 : 1; + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then + case $host_os in + aix*) + case "x/$CC" in #( + x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : + #handle absolute path differently from PATH based program lookup + case "x$CC" in #( + x/*) : + if as_fn_executable_p ${CC}_r; then : + PTHREAD_CC="${CC}_r" +fi ;; #( + *) : + for ac_prog in ${CC}_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PTHREAD_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - mpfr_have_constructor_destructor_attributes=yes +fi +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +$as_echo "$PTHREAD_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -if test "$mpfr_have_constructor_destructor_attributes" = "yes"; then -$as_echo "#define MPFR_HAVE_CONSTRUCTOR_ATTR 1" >>confdefs.h + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + ;; +esac ;; #( + *) : + ;; +esac + ;; + esac + fi fi +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test "x$ax_pthread_ok" = "xyes"; then +$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h + : +else + ax_pthread_ok=no +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on Tru64 or Sequent). -# It gets checked for in the link test anyway. -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then - ax_pthread_save_CC="$CC" - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - if test "x$PTHREAD_CC" != "x"; then : - CC="$PTHREAD_CC" -fi - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 -$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$ax_pthread_ok" = yes; then + CC="$PTHREAD_CC" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$LIBS $PTHREAD_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_t" >&5 +$as_echo_n "checking for pthread_rwlock_t... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (); +#include + int main (void) { -return pthread_join (); + +pthread_rwlock_t lock; (void) lock; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = "xno"; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - CC="$ax_pthread_save_CC" - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + mpfr_pthread_ok=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + mpfr_pthread_ok=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + mpfr_pthread_ok=no + fi + fi -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared cache can be supported" >&5 +$as_echo_n "checking if shared cache can be supported... " >&6; } + if test "$mpfr_c11_thread_ok" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with ISO C11 threads" >&5 +$as_echo "yes, with ISO C11 threads" >&6; } + elif test "$mpfr_pthread_ok" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with pthread" >&5 +$as_echo "yes, with pthread" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "shared cache needs C11 threads or pthread support" "$LINENO" 5 + fi -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. +fi -ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: +ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes; then : -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 -# (Note: HP C rejects this with "bad form for `-t' option") -# -pthreads: Solaris/gcc (Note: HP C also rejects) -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads and -# -D_REENTRANT too), HP C (must be checked before -lpthread, which -# is present but should not be used directly; and before -mthreads, -# because the compiler interprets this as "-mt" + "-hreads") -# -mthreads: Mingw32/gcc, Lynx/gcc -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) +else + as_fn_error $? "limits.h not found" "$LINENO" 5 +fi -case $host_os in - freebsd*) +ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" +if test "x$ac_cv_header_float_h" = xyes; then : - # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) - # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +else + as_fn_error $? "float.h not found" "$LINENO" 5 +fi - ax_pthread_flags="-kthread lthread $ax_pthread_flags" - ;; - hpux*) +ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes; then : - # From the cc(1) man page: "[-mt] Sets various -D flags to enable - # multi-threading and also sets -lpthread." +else + as_fn_error $? "string.h not found" "$LINENO" 5 +fi - ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" - ;; - openedition*) - # IBM z/OS requires a feature-test macro to be defined in order to - # enable POSIX threads at all, so give the user a hint if this is - # not set. (We don't define these ourselves, as they can affect - # other portions of the system API in unpredictable ways.) +for ac_header in locale.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" +if test "x$ac_cv_header_locale_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LOCALE_H 1 +_ACEOF - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi + +done -# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) - AX_PTHREAD_ZOS_MISSING -# endif +for ac_header in wchar.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" +if test "x$ac_cv_header_wchar_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WCHAR_H 1 _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 -$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} + fi -rm -f conftest* - ;; +done - solaris*) - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (N.B.: The stubs are missing - # pthread_cleanup_push, or rather a function called by this macro, - # so we could check for that, but who knows whether they'll stub - # that too in a future libc.) So we'll check first for the - # standard Solaris way of linking pthreads (-mt -lpthread). +ac_fn_c_check_header_mongrel "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" +if test "x$ac_cv_header_stdarg_h" = xyes; then : - ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" - ;; -esac +$as_echo "#define HAVE_STDARG 1" >>confdefs.h -# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) +else + ac_fn_c_check_header_mongrel "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" +if test "x$ac_cv_header_varargs_h" = xyes; then : -if test "x$GCC" = "xyes"; then : - ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" +else + as_fn_error $? "stdarg.h or varargs.h not found" "$LINENO" 5 fi -# The presence of a feature test macro requesting re-entrant function -# definitions is, on some systems, a strong hint that pthreads support is -# correctly enabled - -case $host_os in - darwin* | hpux* | linux* | osf* | solaris*) - ax_pthread_check_macro="_REENTRANT" - ;; - - aix*) - ax_pthread_check_macro="_THREAD_SAFE" - ;; - *) - ax_pthread_check_macro="--" - ;; -esac -if test "x$ax_pthread_check_macro" = "x--"; then : - ax_pthread_check_cond=0 -else - ax_pthread_check_cond="!defined($ax_pthread_check_macro)" fi -# Are we compiling with Clang? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 -$as_echo_n "checking whether $CC is Clang... " >&6; } -if ${ax_cv_PTHREAD_CLANG+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_PTHREAD_CLANG=no - # Note that Autoconf sets GCC=yes for Clang as well as GCC - if test "x$GCC" = "xyes"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ -# if defined(__clang__) && defined(__llvm__) - AX_PTHREAD_CC_IS_CLANG -# endif +for ac_header in sys/time.h sys/fpu.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : - ax_cv_PTHREAD_CLANG=yes -fi -rm -f conftest* - - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 -$as_echo "$ax_cv_PTHREAD_CLANG" >&6; } -ax_pthread_clang="$ax_cv_PTHREAD_CLANG" -ax_pthread_clang_warning=no +done -# Clang needs special handling, because older versions handle the -pthread -# option in a rather... idiosyncratic way -if test "x$ax_pthread_clang" = "xyes"; then +ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include +" +if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then : - # Clang takes -pthread; it has never supported any other flag +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1 +_ACEOF - # (Note 1: This will need to be revisited if a system that Clang - # supports has POSIX threads in a separate library. This tends not - # to be the way of modern systems, but it's conceivable.) - # (Note 2: On some systems, notably Darwin, -pthread is not needed - # to get POSIX threads support; the API is always present and - # active. We could reasonably leave PTHREAD_CFLAGS empty. But - # -pthread does define _REENTRANT, and while the Darwin headers - # ignore this macro, third-party headers might not.) +fi +ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include +" +if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then : - PTHREAD_CFLAGS="-pthread" - PTHREAD_LIBS= +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1 +_ACEOF - ax_pthread_ok=yes - # However, older versions of Clang make a point of warning the user - # that, in an invocation where only linking and no compilation is - # taking place, the -pthread option has no effect ("argument unused - # during compilation"). They expect -pthread to be passed in only - # when source code is being compiled. - # - # Problem is, this is at odds with the way Automake and most other - # C build frameworks function, which is that the same flags used in - # compilation (CFLAGS) are also used in linking. Many systems - # supported by AX_PTHREAD require exactly this for POSIX threads - # support, and in fact it is often not straightforward to specify a - # flag that is used only in the compilation phase and not in - # linking. Such a scenario is extremely rare in practice. - # - # Even though use of the -pthread flag in linking would only print - # a warning, this can be a nuisance for well-run software projects - # that build with -Werror. So if the active version of Clang has - # this misfeature, we search for an option to squash it. +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 -$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } -if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown - # Create an alternate version of $ac_link that compiles and - # links in two steps (.c -> .o, .o -> exe) instead of one - # (.c -> exe), because the warning occurs only in the second - # step - ax_pthread_save_ac_link="$ac_link" - ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' - ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` - ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" - ax_pthread_save_CFLAGS="$CFLAGS" - for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do - if test "x$ax_pthread_try" = "xunknown"; then : - break -fi - CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" - ac_link="$ax_pthread_save_ac_link" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int main(void){return 0;} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_link="$ax_pthread_2step_ac_link" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int main(void){return 0;} +#include +int +main (void) +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} _ACEOF if ac_fn_c_try_link "$LINENO"; then : - break + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +void *alloca (size_t); +# endif +# endif +# endif +# endif +#endif + +int +main (void) +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes +else + ac_cv_func_alloca_works=no +fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - done - ac_link="$ax_pthread_save_ac_link" - CFLAGS="$ax_pthread_save_CFLAGS" - if test "x$ax_pthread_try" = "x"; then : - ax_pthread_try=no fi - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 -$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } - case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in - no | unknown) ;; - *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; - esac +if test $ac_cv_func_alloca_works = yes; then -fi # $ax_pthread_clang = yes +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h -if test "x$ax_pthread_ok" = "xno"; then -for ax_pthread_try_flag in $ax_pthread_flags; do +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. - case $ax_pthread_try_flag in - none) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -$as_echo_n "checking whether pthreads work without any flags... " >&6; } - ;; +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - -mt,pthread) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 -$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } - PTHREAD_CFLAGS="-mt" - PTHREAD_LIBS="-lpthread" - ;; +$as_echo "#define C_ALLOCA 1" >>confdefs.h - -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 -$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } - PTHREAD_CFLAGS="$ax_pthread_try_flag" - ;; - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ax_pthread_config+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ax_pthread_config"; then - ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ax_pthread_config="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + ac_cv_os_cray=no +fi +rm -f conftest* - test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done fi -ax_pthread_config=$ac_cv_prog_ax_pthread_config -if test -n "$ax_pthread_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 -$as_echo "$ax_pthread_config" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} + +int +main (int argc, char **argv) +{ + return find_stack_direction (0, argc + !argv + 20) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 +else + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + - if test "x$ax_pthread_config" = "xno"; then : - continue fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 -$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } - PTHREAD_LIBS="-l$ax_pthread_try_flag" - ;; - esac - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to copy va_list" >&5 +$as_echo_n "checking how to copy va_list... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. +#include - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +int +main (void) +{ + + va_list ap1, ap2; + va_copy(ap1, ap2); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: va_copy" >&5 +$as_echo "va_copy" >&6; } + $as_echo "#define HAVE_VA_COPY 1" >>confdefs.h + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -# if $ax_pthread_check_cond -# error "$ax_pthread_check_macro must be defined" -# endif - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; } + +#include + int main (void) { -pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */ + + va_list ap1, ap2; + __va_copy(ap1, ap2); + ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes + $as_echo "#define HAVE___VA_COPY 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: __va_copy" >&5 +$as_echo "__va_copy" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: memcpy" >&5 +$as_echo "memcpy" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" +for ac_func in memmove memset setlocale strtol gettimeofday signal +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = "xyes"; then : - break fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" done -fi -# Various other checks: -if test "x$ax_pthread_ok" = "xyes"; then - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -$as_echo_n "checking for joinable pthread attribute... " >&6; } -if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_PTHREAD_JOINABLE_ATTR=unknown - for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigaction and its associated structure" >&5 +$as_echo_n "checking for sigaction and its associated structure... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#include +static int f (int (*func)(int, const struct sigaction *, struct sigaction *)) +{ return 0; } + int main (void) { -int attr = $ax_pthread_attr; return attr /* ; */ + + return f(sigaction); + ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_SIGACTION 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - done + +ac_fn_c_check_type "$LINENO" "long long int" "ac_cv_type_long_long_int" "$ac_includes_default" +if test "x$ac_cv_type_long_long_int" = xyes; then : + +$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 -$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } - if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ - test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ - test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : + + +ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" +if test "x$ac_cv_type_intmax_t" = xyes; then : cat >>confdefs.h <<_ACEOF -#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR +#define HAVE_INTMAX_T 1 _ACEOF - ax_pthread_joinable_attr_defined=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 -$as_echo_n "checking whether more special flags are required for pthreads... " >&6; } -if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : +if test "$ac_cv_type_intmax_t" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working INTMAX_MAX" >&5 +$as_echo_n "checking for working INTMAX_MAX... " >&6; } +if ${mpfr_cv_have_intmax_max+:} false; then : $as_echo_n "(cached) " >&6 else - ax_cv_PTHREAD_SPECIAL_FLAGS=no - case $host_os in - solaris*) - ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" - ;; - esac + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$srcdir/src" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "mpfr-intmax.h" +int +main (void) +{ +intmax_t x = INTMAX_MAX; (void) x; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + mpfr_cv_have_intmax_max=yes +else + mpfr_cv_have_intmax_max=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 -$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } - if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ - test "x$ax_pthread_special_flags_added" != "xyes"; then : - PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" - ax_pthread_special_flags_added=yes +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="$saved_CPPFLAGS" + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpfr_cv_have_intmax_max" >&5 +$as_echo "$mpfr_cv_have_intmax_max" >&6; } + if test "$mpfr_cv_have_intmax_max" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 -$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } -if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : +$as_echo "#define MPFR_HAVE_INTMAX_MAX 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working printf length modifier for intmax_t" >&5 +$as_echo_n "checking for working printf length modifier for intmax_t... " >&6; } +if ${mpfr_cv_printf_maxlm+:} false; then : $as_echo_n "(cached) " >&6 else + + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$srcdir/src" + for modifier in j ll l + do + if test "$cross_compiling" = yes; then : + mpfr_cv_printf_maxlm=j; break + +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#include +#include +#include "mpfr-intmax.h" + int main (void) { -int i = PTHREAD_PRIO_INHERIT; + + char s[64]; + sprintf (s, "%${modifier}d %${modifier}u", + (intmax_t) -17, (uintmax_t) 42); + return strcmp (s, "-17 42") != 0; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_PTHREAD_PRIO_INHERIT=yes +if ac_fn_c_try_run "$LINENO"; then : + mpfr_cv_printf_maxlm=${modifier}; break else - ax_cv_PTHREAD_PRIO_INHERIT=no + mpfr_cv_printf_maxlm=none fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + done + CPPFLAGS="$saved_CPPFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpfr_cv_printf_maxlm" >&5 +$as_echo "$mpfr_cv_printf_maxlm" >&6; } + if test "$mpfr_cv_printf_maxlm" != "none"; then + +cat >>confdefs.h <<_ACEOF +#define MPFR_PRINTF_MAXLM "$mpfr_cv_printf_maxlm" +_ACEOF + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 -$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } - if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ - test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : -$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h +ac_fn_c_check_type "$LINENO" "union fpc_csr" "ac_cv_type_union_fpc_csr" " +#if HAVE_SYS_FPU_H +# include +#endif - ax_pthread_prio_inherit_defined=yes +" +if test "x$ac_cv_type_union_fpc_csr" = xyes; then : + +$as_echo "#define HAVE_FPC_CSR 1" >>confdefs.h fi - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - # More AIX lossage: compile with *_r variant - if test "x$GCC" != "xyes"; then - case $host_os in - aix*) - case "x/$CC" in #( - x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : - #handle absolute path differently from PATH based program lookup - case "x$CC" in #( - x/*) : - if as_fn_executable_p ${CC}_r; then : - PTHREAD_CC="${CC}_r" -fi ;; #( - *) : - for ac_prog in ${CC}_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PTHREAD_CC+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Noreturn" >&5 +$as_echo_n "checking for _Noreturn... " >&6; } +if ${mpfr_cv_have_noreturn+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PTHREAD_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -$as_echo "$PTHREAD_CC" >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +_Noreturn void foo(int); +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + mpfr_cv_have_noreturn=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + mpfr_cv_have_noreturn=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - test -n "$PTHREAD_CC" && break -done -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - ;; -esac ;; #( - *) : - ;; -esac - ;; - esac - fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpfr_cv_have_noreturn" >&5 +$as_echo "$mpfr_cv_have_noreturn" >&6; } +if test "$mpfr_cv_have_noreturn" = "yes"; then -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - - - +$as_echo "#define MPFR_HAVE_NORETURN 1" >>confdefs.h +fi -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "x$ax_pthread_ok" = "xyes"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5 +$as_echo_n "checking for __builtin_unreachable... " >&6; } +if ${mpfr_cv_have_builtin_unreachable+:} false; then : + $as_echo_n "(cached) " >&6 +else -$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int x; +int +main (void) +{ +if (x) __builtin_unreachable(); - : + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + mpfr_cv_have_builtin_unreachable=yes else - ax_pthread_ok=no + mpfr_cv_have_builtin_unreachable=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpfr_cv_have_builtin_unreachable" >&5 +$as_echo "$mpfr_cv_have_builtin_unreachable" >&6; } +if test "$mpfr_cv_have_builtin_unreachable" = "yes"; then +$as_echo "#define MPFR_HAVE_BUILTIN_UNREACHABLE 1" >>confdefs.h +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C11 thread support" >&5 -$as_echo_n "checking for ISO C11 thread support... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for constructor and destructor attributes" >&5 +$as_echo_n "checking for constructor and destructor attributes... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include - mtx_t lock; - once_flag once = ONCE_FLAG_INIT; - thrd_t thd_idx; - int x = 0; - void once_call (void) { x = 1; } +#include +int x = 0; +__attribute__((constructor)) static void +call_f(void) { x = 1742; } +__attribute__((destructor)) static void +call_g(void) { x = 1448; } int main (void) { - int err; - err = mtx_init(&lock, mtx_plain); - assert(err == thrd_success); - err = mtx_lock(&lock); - assert(err == thrd_success); - err = mtx_unlock(&lock); - assert(err == thrd_success); - mtx_destroy(&lock); - once_call(&once, once_call); - return x == 1 ? 0 : -1; + return (x == 1742) ? 0 : 1; ; return 0; @@ -15446,7 +15524,7 @@ if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - mpfr_c11_thread_ok=yes + mpfr_have_constructor_destructor_attributes=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -15455,9 +15533,9 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test "$mpfr_c11_thread_ok" = "yes"; then +if test "$mpfr_have_constructor_destructor_attributes" = "yes"; then -$as_echo "#define MPFR_HAVE_C11_LOCK 1" >>confdefs.h +$as_echo "#define MPFR_HAVE_CONSTRUCTOR_ATTR 1" >>confdefs.h fi @@ -16066,11 +16144,13 @@ /* "before" is 16 bytes to ensure there's no padding between it and "x". We're not expecting any "long double" bigger than 16 bytes or with alignment requirements stricter than 16 bytes. */ -struct { +typedef struct { char before[16]; long double x; char after[8]; -} foo = { +} foo_t; + +foo_t foo = { { '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\001', '\043', '\105', '\147', '\211', '\253', '\315', '\357' }, -123456789.0, @@ -16436,14 +16516,6 @@ esac -if test "$enable_logging" = yes; then - if test "$enable_thread_safe" = yes; then - as_fn_error $? "enable either \`Logging' or \`thread-safe', not both" "$LINENO" 5 - else - enable_thread_safe=no - fi -fi - if test "$enable_thread_safe" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS support using C11" >&5 $as_echo_n "checking for TLS support using C11... " >&6; } @@ -16646,20 +16718,23 @@ fi if test "$enable_float128" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler knows __float128 with C99 constants" >&5 -$as_echo_n "checking if compiler knows __float128 with C99 constants... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if __float128 with hex constants is supported" >&5 +$as_echo_n "checking if __float128 with hex constants is supported... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -__float128 x = 0x1.fp+16383q; + int main (void) { +volatile __float128 x = 0x1.fp+16383q; +return x == 0; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -16673,7 +16748,8 @@ Please use another compiler or build MPFR without --enable-float128." "$LINENO" 5 fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Static Assertion support" >&5 @@ -16781,33 +16857,6 @@ fi -if test "$mpfr_want_shared_cache" = yes ;then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared cache is supported" >&5 -$as_echo_n "checking if shared cache is supported... " >&6; } - if test "$enable_logging" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "shared cache does not work with logging support." "$LINENO" 5 - elif test "$enable_thread_safe" != yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "shared cache needs thread attribute." "$LINENO" 5 - elif test "$ax_pthread_ok" != yes && "$mpfr_c11_thread_ok" != yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "shared cache needs pthread/C11 library." "$LINENO" 5 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - if test "$ax_pthread_ok" = yes ; then - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$LIBS $PTHREAD_LIBS" - fi - fi - -fi - # (Based on GMP 5.1) @@ -17637,6 +17686,47 @@ + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmp_printf supports the ' group flag" >&5 +$as_echo_n "checking if gmp_printf supports the ' group flag... " >&6; } +if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test" >&5 +$as_echo "cannot test" >&6; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ + + char s[256]; + + if (gmp_sprintf (s, "%'d", 17) == -1) return 1; + return (strcmp (s, "17") != 0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define PRINTF_GROUPFLAG 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -18371,7 +18461,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by MPFR $as_me 4.0.1, which was +This file was extended by MPFR $as_me 4.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18428,7 +18518,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -MPFR config.status 4.0.1 +MPFR config.status 4.0.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -18536,7 +18626,7 @@ # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -19274,29 +19364,35 @@ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -19314,53 +19410,48 @@ q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)$/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; "libtool":C) diff -Nru mpfr4-4.0.1/configure.ac mpfr4-4.0.2/configure.ac --- mpfr4-4.0.1/configure.ac 2018-02-07 12:50:31.000000000 +0000 +++ mpfr4-4.0.2/configure.ac 2019-01-31 20:29:48.000000000 +0000 @@ -4,7 +4,7 @@ dnl be indented! AC_COPYRIGHT([ -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -21,12 +21,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ]) dnl Add check-news when it checks for more than 15 lines -AC_INIT([MPFR],[4.0.1]) +AC_INIT([MPFR],[4.0.2]) dnl Older Automake versions than 1.13 may still be supported, but no longer dnl tested, and many things have changed in 1.13. Moreover the INSTALL file @@ -167,8 +167,8 @@ for all MPFR constants. It usually makes MPFR dependent on PTHREAD [[default=no]]], [ case $enableval in - yes) mpfr_want_shared_cache=yes - AC_DEFINE([WANT_SHARED_CACHE],1,[Want shared cache]) ;; + yes) + AC_DEFINE([MPFR_WANT_SHARED_CACHE],1,[Want shared cache]) ;; no) ;; *) AC_MSG_ERROR([bad value for --enable-shared-cache: yes or no]) ;; esac]) @@ -204,6 +204,30 @@ *) AC_MSG_ERROR([bad value for --enable-tune-for-coverage]) ;; esac]) +dnl First, detect incompatibilities between the above configure options. +AC_MSG_CHECKING([whether configure options are compatible]) +if test "$enable_logging" = yes; then + if test "$enable_thread_safe" = yes; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([enable either logging or thread-safe, not both]) + fi +dnl The following test is done only to output a specific error message, +dnl as there would otherwise be an error due to enable_thread_safe=no. + if test "$enable_shared_cache" = yes; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([shared cache does not work with logging support]) + fi + enable_thread_safe=no +fi +if test "$enable_shared_cache" = yes; then + if test "$enable_thread_safe" = no; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([shared cache needs thread-safe support]) + fi + enable_thread_safe=yes +fi +AC_MSG_RESULT([yes]) + dnl dnl Setup CC and CFLAGS @@ -246,11 +270,9 @@ # Get CFLAGS echo "#include \"gmp.h\"" > conftest.c echo "MPFR_OPTION __GMP_CFLAGS" >> conftest.c - unset rmpedantic - [test "$enable_logging" = yes && rmpedantic='s/[ "]-pedantic[ "]/ /g;'] $cpp $CPPFLAGS conftest.c 2> /dev/null > conftest.txt test $? -ne 0 && continue - GMP_CFLAGS=`$EGREP MPFR_OPTION conftest.txt | $SED -e "$rmpedantic"'s/MPFR_OPTION //g;s/ *" *//g'` + [GMP_CFLAGS=`$EGREP MPFR_OPTION conftest.txt | $SED -e 's/[ "]-pedantic[ "]/ /g;s/MPFR_OPTION //g;s/ *" *//g'`] break done rm -f conftest* @@ -435,8 +457,13 @@ CFLAGS="-fp_port -mieee-fp -wd1572 -wd265 -wd186 -wd239 $CFLAGS" ],[AC_MSG_RESULT(no)]) -dnl If compiler is gcc, then use some specific flags. -dnl But don't touch user other flags. +dnl If CFLAGS has not been set explicitly and the compiler is GCC, then +dnl use some specific flags. But don't touch user other flags. +dnl Note: This is done even when CFLAGS has been set from GMP's CFLAGS +dnl (__GMP_CFLAGS macro in gmp.h) above. The consequence is that this +dnl might yield a compilation failure if the -Werror option appears in +dnl __GMP_CFLAGS. But in this case, since -Werror is not used by default, +dnl one may expect that the user would also set CFLAGS for MPFR. if test "$test_CFLAGS" != set && test -n "$GCC"; then CFLAGS="-Wpointer-arith $CFLAGS" AC_MSG_CHECKING(whether the selected language is C++) @@ -447,7 +474,7 @@ #endif ]], [[]])],[ AC_MSG_RESULT(no) - CFLAGS="-Wmissing-prototypes $CFLAGS" + CFLAGS="-Wmissing-prototypes -Wc++-compat $CFLAGS" ],[ AC_MSG_RESULT(yes) CFLAGS="-Wmissing-declarations -Wno-sign-compare $CFLAGS" @@ -708,7 +735,8 @@ [AC_MSG_RESULT(yes) MPFR_CHECK_GMP MPFR_CHECK_DBL2INT_BUG - MPFR_CHECK_PRINTF_SPEC], + MPFR_CHECK_PRINTF_SPEC + MPFR_CHECK_PRINTF_GROUPFLAG], [AC_MSG_RESULT(no) AC_MSG_WARN([==========================================================]) AC_MSG_WARN(['gmp.h' and 'libgmp' seem to have different versions or]) diff -Nru mpfr4-4.0.1/COPYING mpfr4-4.0.2/COPYING --- mpfr4-4.0.1/COPYING 2016-05-22 22:27:26.000000000 +0000 +++ mpfr4-4.0.2/COPYING 2019-01-07 15:17:51.000000000 +0000 @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -645,7 +645,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -664,11 +664,11 @@ You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. diff -Nru mpfr4-4.0.1/COPYING.LESSER mpfr4-4.0.2/COPYING.LESSER --- mpfr4-4.0.1/COPYING.LESSER 2016-05-22 22:27:26.000000000 +0000 +++ mpfr4-4.0.2/COPYING.LESSER 2019-01-07 15:17:51.000000000 +0000 @@ -1,7 +1,7 @@ - GNU LESSER GENERAL PUBLIC LICENSE + GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -10,7 +10,7 @@ the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. - 0. Additional Definitions. + 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU @@ -111,7 +111,7 @@ a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked - Version. + Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the diff -Nru mpfr4-4.0.1/debian/changelog mpfr4-4.0.2/debian/changelog --- mpfr4-4.0.1/debian/changelog 2018-02-07 18:00:38.000000000 +0000 +++ mpfr4-4.0.2/debian/changelog 2019-10-30 22:21:00.000000000 +0000 @@ -1,3 +1,29 @@ +mpfr4 (4.0.2-1~18.04) bionic; urgency=medium + + * Backport. + + -- DNS Wed, 30 Oct 2019 23:21:00 +0100 + +mpfr4 (4.0.2-1) unstable; urgency=medium + + * mpfr 4.0.2 release. + + -- Matthias Klose Fri, 01 Feb 2019 08:05:19 +0100 + +mpfr4 (4.0.2~rc1-1) unstable; urgency=medium + + * mpfr 4.0.2 release candidate. + * Bump standards version. + + -- Matthias Klose Wed, 09 Jan 2019 10:56:17 +0100 + +mpfr4 (4.0.1-2) unstable; urgency=medium + + * Bump standards version. + * Install the mpfr pkgconfig file. Closes: #915695. + + -- Matthias Klose Thu, 06 Dec 2018 16:11:12 +0100 + mpfr4 (4.0.1-1) unstable; urgency=medium * mpfr 4.0.1 release. diff -Nru mpfr4-4.0.1/debian/control mpfr4-4.0.2/debian/control --- mpfr4-4.0.1/debian/control 2018-02-07 17:33:01.000000000 +0000 +++ mpfr4-4.0.2/debian/control 2019-01-09 09:57:06.000000000 +0000 @@ -6,7 +6,7 @@ Maintainer: Debian GCC Maintainers Uploaders: Matthias Klose Homepage: http://www.mpfr.org/ -Standards-Version: 4.1.3 +Standards-Version: 4.3.0 Package: libmpfr6 Section: libs diff -Nru mpfr4-4.0.1/debian/libmpfr-dev.install mpfr4-4.0.2/debian/libmpfr-dev.install --- mpfr4-4.0.1/debian/libmpfr-dev.install 2013-10-21 05:18:28.000000000 +0000 +++ mpfr4-4.0.2/debian/libmpfr-dev.install 2018-12-06 15:15:00.000000000 +0000 @@ -1,3 +1,4 @@ usr/lib/*/libmpfr.so usr/lib/*/libmpfr.a +usr/lib/*/pkgconfig/mpfr.pc usr/include/*.h usr/include/ diff -Nru mpfr4-4.0.1/depcomp mpfr4-4.0.2/depcomp --- mpfr4-4.0.1/depcomp 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/depcomp 2019-01-31 20:43:20.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -783,7 +783,7 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru mpfr4-4.0.1/doc/check-typography mpfr4-4.0.2/doc/check-typography --- mpfr4-4.0.1/doc/check-typography 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/doc/check-typography 2019-01-01 21:02:47.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2016-2018 Free Software Foundation, Inc. +# Copyright 2016-2019 Free Software Foundation, Inc. # This script is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff -Nru mpfr4-4.0.1/doc/FAQ.html mpfr4-4.0.2/doc/FAQ.html --- mpfr4-4.0.1/doc/FAQ.html 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/doc/FAQ.html 2019-01-07 13:53:20.000000000 +0000 @@ -2,7 +2,7 @@ @@ -78,6 +78,8 @@ margin-left: 2em; } +.highlight { background: #dddddd } + .nowrap { white-space: nowrap } /* @@ -118,7 +120,7 @@ bugs page.

The latest version of this FAQ is available at -http://www.mpfr.org/faq.html. +https://www.mpfr.org/faq.html. Please look at this version if possible.

    @@ -351,7 +353,7 @@ TOMS paper and/or the library web page -http://www.mpfr.org. If your publication +https://www.mpfr.org. If your publication is related to a particular release of MPFR, for example if you report timings, please also indicate the release number for future reference.

    diff -Nru mpfr4-4.0.1/doc/fdl.texi mpfr4-4.0.2/doc/fdl.texi --- mpfr4-4.0.1/doc/fdl.texi 2016-05-22 22:27:26.000000000 +0000 +++ mpfr4-4.0.2/doc/fdl.texi 2019-01-07 13:53:20.000000000 +0000 @@ -395,7 +395,7 @@ of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See -@uref{http://www.gnu.org/copyleft/}. +@uref{https://www.gnu.org/copyleft/}. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this diff -Nru mpfr4-4.0.1/doc/Makefile.am mpfr4-4.0.2/doc/Makefile.am --- mpfr4-4.0.1/doc/Makefile.am 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/doc/Makefile.am 2019-01-01 21:02:47.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Free Software Foundation, Inc. +# Copyright 2010-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff -Nru mpfr4-4.0.1/doc/Makefile.in mpfr4-4.0.2/doc/Makefile.in --- mpfr4-4.0.1/doc/Makefile.in 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/doc/Makefile.in 2019-01-31 20:43:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright 2010-2018 Free Software Foundation, Inc. +# Copyright 2010-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -356,8 +356,8 @@ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -543,7 +543,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ diff -Nru mpfr4-4.0.1/doc/mpfr.info mpfr4-4.0.2/doc/mpfr.info --- mpfr4-4.0.1/doc/mpfr.info 2018-02-07 12:58:03.000000000 +0000 +++ mpfr4-4.0.2/doc/mpfr.info 2019-01-31 20:43:30.000000000 +0000 @@ -1,9 +1,9 @@ This is mpfr.info, produced by makeinfo version 6.5 from mpfr.texi. This manual documents how to install and use the Multiple Precision -Floating-Point Reliable Library, version 4.0.1. +Floating-Point Reliable Library, version 4.0.2. - Copyright 1991, 1993-2018 Free Software Foundation, Inc. + Copyright 1991, 1993-2019 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or @@ -23,9 +23,9 @@ ******** This manual documents how to install and use the Multiple Precision -Floating-Point Reliable Library, version 4.0.1. +Floating-Point Reliable Library, version 4.0.2. - Copyright 1991, 1993-2018 Free Software Foundation, Inc. + Copyright 1991, 1993-2019 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or @@ -181,7 +181,7 @@ Here are the steps needed to install the library on Unix systems (more details are provided in the ‘INSTALL’ file): - 1. To build MPFR, you first have to install GNU MP (version 4.1 or + 1. To build MPFR, you first have to install GNU MP (version 5.0.0 or higher) on your computer. You need a C compiler, preferably GCC, but any reasonable compiler should work. And you need the standard Unix ‘make’ command, plus some other standard Unix utility @@ -279,17 +279,17 @@ reporting a bug, in particular section “In case of problem”. Some problems are due to bad configuration on the user side (not specific to MPFR). Problems are also mentioned in the FAQ -. +. Please report problems to the MPFR mailing-list ‘mpfr@inria.fr’. -*Note Reporting Bugs::. Some bug fixes are available on the MPFR 4.0.1 -web page . +*Note Reporting Bugs::. Some bug fixes are available on the MPFR 4.0.2 +web page . 2.4 Getting the Latest Version of MPFR ====================================== The latest version of MPFR is available from - or . + or .  File: mpfr.info, Node: Reporting Bugs, Next: MPFR Basics, Prev: Installing MPFR, Up: Top @@ -298,10 +298,10 @@ **************** If you think you have found a bug in the MPFR library, first have a look -on the MPFR 4.0.1 web page and the FAQ -: perhaps this bug is already known, in -which case you may find there a workaround for it. You might also look -in the archives of the MPFR mailing-list: +on the MPFR 4.0.2 web page and the +FAQ : perhaps this bug is already known, +in which case you may find there a workaround for it. You might also +look in the archives of the MPFR mailing-list: . Otherwise, please investigate and report it. We have made this library available to you, and it is not to ask too much from you, to ask you to report the bugs that you @@ -435,22 +435,27 @@ 4.2 Nomenclature and Types ========================== -A “floating-point number”, or “float” for short, is an arbitrary -precision significand (also called mantissa) with a limited precision -exponent. The C data type for such objects is ‘mpfr_t’ (internally -defined as a one-element array of a structure, and ‘mpfr_ptr’ is the C -data type representing a pointer to this structure). A floating-point -number can have three special values: Not-a-Number (NaN) or plus or -minus Infinity. NaN represents an uninitialized object, the result of -an invalid operation (like 0 divided by 0), or a value that cannot be -determined (like +Infinity minus +Infinity). Moreover, like in the IEEE -754 standard, zero is signed, i.e., there are both +0 and −0; the -behavior is the same as in the IEEE 754 standard and it is generalized -to the other functions supported by MPFR. Unless documented otherwise, -the sign bit of a NaN is unspecified. +A “floating-point number”, or “float” for short, is an object +representing a radix-2 floating-point number consisting of a sign, an +arbitrary-precision normalized significand (also called mantissa), and +an exponent (an integer in some given range); these are called “regular +numbers”. Like in the IEEE 754 standard, a floating-point number can +also have three kinds of special values: a signed zero, a signed +infinity, and Not-a-Number (NaN). NaN can represent the default value +of a floating-point object and the result of some operations for which +no other results would make sense, such as 0 divided by 0 or +Infinity +minus +Infinity; unless documented otherwise, the sign bit of a NaN is +unspecified. Note that contrary to IEEE 754, MPFR has a single kind of +NaN and does not have subnormals. Other than that, the behavior is very +similar to IEEE 754, but there may be some differences. + + The C data type for such objects is ‘mpfr_t’, internally defined as a +one-element array of a structure (so that when passed as an argument to +a function, it is the pointer that is actually passed), and ‘mpfr_ptr’ +is the C data type representing a pointer to this structure. -The “precision” is the number of bits used to represent the significand -of a floating-point number; the corresponding C data type is + The “precision” is the number of bits used to represent the +significand of a floating-point number; the corresponding C data type is ‘mpfr_prec_t’. The precision can be any integer between ‘MPFR_PREC_MIN’ and ‘MPFR_PREC_MAX’. In the current implementation, ‘MPFR_PREC_MIN’ is equal to 1. @@ -463,10 +468,16 @@ may abort, crash or have undefined behavior (depending on your C implementation). -The “rounding mode” specifies the way to round the result of a + An “exponent” is a component of a regular floating-point number. Its +C data type is ‘mpfr_exp_t’. Valid exponents are restricted to a subset +of this type, and the exponent range can be changed globally as +described in *note Exception Related Functions::. Special values do not +have an exponent. + + The “rounding mode” specifies the way to round the result of a floating-point operation, in case the exact result can not be -represented exactly in the destination significand; the corresponding C -data type is ‘mpfr_rnd_t’. +represented exactly in the destination; the corresponding C data type is +‘mpfr_rnd_t’. MPFR has a global (or per-thread) flag for each supported exception and provides operations on flags (*note Exceptions::). This C data type @@ -1319,12 +1330,20 @@ -- Function: char * mpfr_get_str (char *STR, mpfr_exp_t *EXPPTR, int B, size_t N, mpfr_t OP, mpfr_rnd_t RND) - Convert OP to a string of digits in base B, with rounding in the - direction RND, where N is either zero (see below) or the number of - significant digits output in the string; in the latter case, N must - be greater or equal to 2. The base may vary from 2 to 62; - otherwise the function does nothing and immediately returns a null - pointer. + Convert OP to a string of digits in base abs(B), with rounding in + the direction RND, where N is either zero (see below) or the number + of significant digits output in the string. The argument B may + vary from 2 to 62 or from −2 to −36; otherwise the function does + nothing and immediately returns a null pointer. + + For B in the range 2 to 36, digits and lower-case letters are used; + for −2 to −36, digits and upper-case letters are used; for 37 to + 62, digits, upper-case letters, and lower-case letters, in that + significance order, are used. Warning! This implies that for B > + 10, the successor of the digit 9 depends on B. This choice has + been done for compatibility with GMP’s ‘mpf_get_str’ function. + Users who wish a more consistent behavior should write a simple + wrapper. If the input is NaN, then the returned string is ‘@NaN@’ and the NaN flag is set. If the input is +Inf (resp. −Inf), then the @@ -1764,9 +1783,9 @@ Set ROP to the arc-cosine, arc-sine or arc-tangent of OP, rounded in the direction RND. Note that since ‘acos(-1)’ returns the floating-point number closest to Pi according to the given rounding - mode, this number might not be in the output range 0 <= ROP < \pi - of the arc-cosine function; still, the result lies in the image of - the output range by the rounding function. The same holds for + mode, this number might not be in the output range 0 <= ROP < Pi of + the arc-cosine function; still, the result lies in the image of the + output range by the rounding function. The same holds for ‘asin(-1)’, ‘asin(1)’, ‘atan(-Inf)’, ‘atan(+Inf)’ or for ‘atan(op)’ with large OP and small precision of ROP. @@ -1981,7 +2000,7 @@ ‘mpfr_free_cache2’. -- Function: void mpfr_free_cache (void) - Free all caches and pools used by MPFR internally (thoses local to + Free all caches and pools used by MPFR internally (those local to the current thread and those shared by all threads). You should call this function before terminating a thread, even if you did not call ‘mpfr_const_*’ functions directly (they could have been called @@ -2875,7 +2894,7 @@ is outside the subnormal exponent range of the emulated floating-point system, this function just propagates the *note ternary value:: T; otherwise, it rounds X to precision - ‘EXP(x)-emin+1’ according to rounding mode RND and previous ternary + ‘EXP(X)-emin+1’ according to rounding mode RND and previous ternary value T, avoiding double rounding problems. More precisely in the subnormal domain, denoting by E the value of ‘emin’, X is rounded in fixed-point arithmetic to an integer multiple of two to the @@ -2883,10 +2902,10 @@ when T is zero is rounded to two to the power E with rounding to nearest. - ‘PREC(x)’ is not modified by this function. RND and T must be the + ‘PREC(X)’ is not modified by this function. RND and T must be the rounding mode and the returned ternary value used when computing X (as in ‘mpfr_check_range’). The subnormal exponent range is from - ‘emin’ to ‘emin+PREC(x)-1’. If the result cannot be represented in + ‘emin’ to ‘emin+PREC(X)-1’. If the result cannot be represented in the current exponent range of MPFR (due to a too small ‘emax’), the behavior is undefined. Note that unlike most functions, the result is compared to the exact one, not the input value X, i.e., the @@ -3739,7 +3758,7 @@ 2012 was partly supported by the ERC grant ANTICS of Andreas Enge. The MPFR-MPC workshop in January 2013 was partly supported by the ERC grant ANTICS, the GDR IM and the Caramel project-team, during which Mickaël -Gastineau contributed the MPFRbench program, and Fredrik Johannsson a +Gastineau contributed the MPFRbench program, and Fredrik Johansson a faster version of ‘mpfr_const_euler’.  @@ -4169,7 +4188,7 @@ the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See - . + . Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered @@ -4238,6 +4257,8 @@ * Custom interface: Custom Interface. (line 3) * Exception related functions: Exception Related Functions. (line 3) +* Exponent: Nomenclature and Types. + (line 39) * Float arithmetic functions: Basic Arithmetic Functions. (line 3) * Float comparisons functions: Comparison Functions. (line 3) @@ -4254,7 +4275,7 @@ * GNU Free Documentation License <1>: GNU Free Documentation License. (line 6) * Group of flags: Nomenclature and Types. - (line 39) + (line 50) * I/O functions: Input and Output Functions. (line 3) * I/O functions <1>: Formatted Output Functions. @@ -4289,15 +4310,17 @@ * Output functions <1>: Formatted Output Functions. (line 3) * Precision: Nomenclature and Types. - (line 20) + (line 25) * Precision <1>: MPFR Interface. (line 17) +* Regular number: Nomenclature and Types. + (line 6) * Remainder related functions: Integer and Remainder Related Functions. (line 3) * Reporting bugs: Reporting Bugs. (line 6) * Rounding mode related functions: Rounding-Related Functions. (line 3) * Rounding Modes: Nomenclature and Types. - (line 34) + (line 45) * Special functions: Special Functions. (line 3) * stdarg.h: Headers and Libraries. (line 19) @@ -4469,23 +4492,25 @@ * mpfr_exp10: Special Functions. (line 36) * mpfr_exp2: Special Functions. (line 35) * mpfr_expm1: Special Functions. (line 40) +* mpfr_exp_t: Nomenclature and Types. + (line 39) * mpfr_fac_ui: Special Functions. (line 136) * mpfr_fits_intmax_p: Conversion Functions. - (line 168) + (line 176) * mpfr_fits_sint_p: Conversion Functions. - (line 164) + (line 172) * mpfr_fits_slong_p: Conversion Functions. - (line 162) + (line 170) * mpfr_fits_sshort_p: Conversion Functions. - (line 166) + (line 174) * mpfr_fits_uintmax_p: Conversion Functions. - (line 167) + (line 175) * mpfr_fits_uint_p: Conversion Functions. - (line 163) + (line 171) * mpfr_fits_ulong_p: Conversion Functions. - (line 161) + (line 169) * mpfr_fits_ushort_p: Conversion Functions. - (line 165) + (line 173) * mpfr_flags_clear: Exception Related Functions. (line 190) * mpfr_flags_restore: Exception Related Functions. @@ -4495,7 +4520,7 @@ * mpfr_flags_set: Exception Related Functions. (line 193) * mpfr_flags_t: Nomenclature and Types. - (line 39) + (line 50) * mpfr_flags_test: Exception Related Functions. (line 196) * mpfr_floor: Integer and Remainder Related Functions. @@ -4520,7 +4545,7 @@ * mpfr_free_cache2: Special Functions. (line 295) * mpfr_free_pool: Special Functions. (line 309) * mpfr_free_str: Conversion Functions. - (line 156) + (line 164) * mpfr_frexp: Conversion Functions. (line 49) * mpfr_gamma: Special Functions. (line 155) @@ -4697,11 +4722,13 @@ * mpfr_prec_round: Rounding-Related Functions. (line 13) * mpfr_prec_t: Nomenclature and Types. - (line 20) + (line 25) * mpfr_printf: Formatted Output Functions. (line 168) * mpfr_print_rnd_mode: Rounding-Related Functions. (line 88) +* mpfr_ptr: Nomenclature and Types. + (line 6) * mpfr_rec_sqrt: Basic Arithmetic Functions. (line 107) * mpfr_regular_p: Comparison Functions. @@ -4725,7 +4752,7 @@ * mpfr_rint_trunc: Integer and Remainder Related Functions. (line 59) * mpfr_rnd_t: Nomenclature and Types. - (line 34) + (line 45) * mpfr_root: Basic Arithmetic Functions. (line 128) * mpfr_rootn_ui: Basic Arithmetic Functions. @@ -4912,46 +4939,46 @@ Node: Copying2042 Node: Introduction to MPFR3805 Node: Installing MPFR6208 -Node: Reporting Bugs11654 -Node: MPFR Basics13684 -Node: Headers and Libraries14044 -Node: Nomenclature and Types17640 -Node: MPFR Variable Conventions19899 -Node: Rounding Modes21441 -Ref: ternary value24166 -Node: Floating-Point Values on Special Numbers26152 -Node: Exceptions29412 -Node: Memory Handling33240 -Node: Getting the Best Efficiency Out of MPFR37040 -Node: MPFR Interface37952 -Node: Initialization Functions40238 -Node: Assignment Functions47553 -Node: Combined Initialization and Assignment Functions57499 -Node: Conversion Functions58800 -Node: Basic Arithmetic Functions69381 -Node: Comparison Functions80277 -Node: Special Functions83765 -Node: Input and Output Functions101974 -Node: Formatted Output Functions106751 -Node: Integer and Remainder Related Functions116956 -Node: Rounding-Related Functions124484 -Node: Miscellaneous Functions131001 -Node: Exception Related Functions141493 -Node: Compatibility with MPF151733 -Node: Custom Interface154679 -Node: Internals159310 -Node: API Compatibility160854 -Node: Type and Macro Changes162802 -Node: Added Functions165985 -Node: Changed Functions170499 -Node: Removed Functions177095 -Node: Other Changes177825 -Node: MPFR and the IEEE 754 Standard179526 -Node: Contributors182143 -Node: References185200 -Node: GNU Free Documentation License187084 -Node: Concept Index209677 -Node: Function and Type Index216049 +Node: Reporting Bugs11659 +Node: MPFR Basics13691 +Node: Headers and Libraries14051 +Node: Nomenclature and Types17647 +Node: MPFR Variable Conventions20511 +Node: Rounding Modes22053 +Ref: ternary value24778 +Node: Floating-Point Values on Special Numbers26764 +Node: Exceptions30024 +Node: Memory Handling33852 +Node: Getting the Best Efficiency Out of MPFR37652 +Node: MPFR Interface38564 +Node: Initialization Functions40850 +Node: Assignment Functions48165 +Node: Combined Initialization and Assignment Functions58111 +Node: Conversion Functions59412 +Node: Basic Arithmetic Functions70483 +Node: Comparison Functions81379 +Node: Special Functions84867 +Node: Input and Output Functions103074 +Node: Formatted Output Functions107851 +Node: Integer and Remainder Related Functions118056 +Node: Rounding-Related Functions125584 +Node: Miscellaneous Functions132101 +Node: Exception Related Functions142593 +Node: Compatibility with MPF152833 +Node: Custom Interface155779 +Node: Internals160410 +Node: API Compatibility161954 +Node: Type and Macro Changes163902 +Node: Added Functions167085 +Node: Changed Functions171599 +Node: Removed Functions178195 +Node: Other Changes178925 +Node: MPFR and the IEEE 754 Standard180626 +Node: Contributors183243 +Node: References186299 +Node: GNU Free Documentation License188183 +Node: Concept Index210777 +Node: Function and Type Index217425  End Tag Table diff -Nru mpfr4-4.0.1/doc/mpfr.texi mpfr4-4.0.2/doc/mpfr.texi --- mpfr4-4.0.1/doc/mpfr.texi 2018-02-07 12:50:31.000000000 +0000 +++ mpfr4-4.0.2/doc/mpfr.texi 2019-01-31 20:29:48.000000000 +0000 @@ -2,8 +2,8 @@ @c %**start of header @setfilename mpfr.info @documentencoding UTF-8 -@set VERSION 4.0.1 -@set UPDATED-MONTH February 2018 +@set VERSION 4.0.2 +@set UPDATED-MONTH January 2019 @settitle GNU MPFR @value{VERSION} @synindex tp fn @iftex @@ -23,7 +23,7 @@ This manual documents how to install and use the Multiple Precision Floating-Point Reliable Library, version @value{VERSION}. -Copyright 1991, 1993-2018 Free Software Foundation, Inc. +Copyright 1991, 1993-2019 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later @@ -361,8 +361,8 @@ @enumerate @item -To build MPFR, you first have to install GNU MP -(version 4.1 or higher) on your computer. +To build MPFR, you first have to install GNU MP (version 5.0.0 or higher) +on your computer. You need a C compiler, preferably GCC, but any reasonable compiler should work. And you need the standard Unix @samp{make} command, plus some other standard Unix utility commands. @@ -472,19 +472,19 @@ before reporting a bug, in particular section ``In case of problem''. Some problems are due to bad configuration on the user side (not specific to MPFR)@. Problems are also mentioned in the FAQ -@url{http://www.mpfr.org/faq.html}. +@url{https://www.mpfr.org/faq.html}. @comment Warning! Do not split "MPFR ... @url{...}" across several lines @comment as this needs to be updated with update-version. Please report problems to the MPFR mailing-list @samp{mpfr@@inria.fr}. @xref{Reporting Bugs}. Some bug fixes are available on the -MPFR 4.0.1 web page @url{http://www.mpfr.org/mpfr-4.0.1/}. +MPFR 4.0.2 web page @url{https://www.mpfr.org/mpfr-4.0.2/}. @section Getting the Latest Version of MPFR The latest version of MPFR is available from -@url{https://ftp.gnu.org/gnu/mpfr/} or @url{http://www.mpfr.org/}. +@url{https://ftp.gnu.org/gnu/mpfr/} or @url{https://www.mpfr.org/}. @node Reporting Bugs, MPFR Basics, Installing MPFR, Top @comment node-name, next, previous, up @@ -494,8 +494,8 @@ @comment Warning! Do not split "MPFR ... @url{...}" across several lines @comment as this needs to be updated with update-version. If you think you have found a bug in the MPFR library, first have a look -on the MPFR 4.0.1 web page @url{http://www.mpfr.org/mpfr-4.0.1/} and the -FAQ @url{http://www.mpfr.org/faq.html}: +on the MPFR 4.0.2 web page @url{https://www.mpfr.org/mpfr-4.0.2/} and the +FAQ @url{https://www.mpfr.org/faq.html}: perhaps this bug is already known, in which case you may find there a workaround for it. You might also look in the archives of the MPFR mailing-list: @@ -654,30 +654,31 @@ @section Nomenclature and Types @cindex Floating-point number +@cindex Regular number @tindex @code{mpfr_t} -@noindent -A @dfn{floating-point number}, or @dfn{float} for short, is an arbitrary -precision significand (also called mantissa) with a limited precision -exponent. The C data type -for such objects is @code{mpfr_t} (internally defined as a one-element -array of a structure, and @code{mpfr_ptr} is the C data type representing -a pointer to this structure). A floating-point number can have -three special values: Not-a-Number (NaN) or plus or minus Infinity. NaN -represents an uninitialized object, the result of an invalid operation -(like 0 divided by 0), or a value that cannot be determined (like -+Infinity minus +Infinity). Moreover, like in the IEEE 754 standard, -zero is signed, i.e., there are both +0 and @minus{}0; the behavior -is the same as in the IEEE 754 standard and it is generalized to -the other functions supported by MPFR@. Unless documented otherwise, -the sign bit of a NaN is unspecified. -@c VL: re-added how mpfr_t is defined, due to some questions from users -@c in the past (the fact that the result was returned in an argument -@c seemed strange); also, mpfr_ptr needs to be defined here, as it is -@c used in the API. +@tindex @code{mpfr_ptr} +A @dfn{floating-point number}, or @dfn{float} for short, is an object +representing a radix-2 floating-point number consisting of a sign, +an arbitrary-precision normalized significand (also called mantissa), +and an exponent (an integer in some given range); these are called +@dfn{regular numbers}. Like in the IEEE 754 standard, a floating-point +number can also have three kinds of special values: a signed zero, a +signed infinity, and Not-a-Number (NaN)@. NaN can represent the default +value of a floating-point object and the result of some operations for +which no other results would make sense, such as 0 divided by 0 or ++Infinity minus +Infinity; unless documented otherwise, the sign bit of +a NaN is unspecified. Note that contrary to IEEE 754, MPFR has a single +kind of NaN and does not have subnormals. Other than that, the behavior +is very similar to IEEE 754, but there may be some differences. + +The C data type for such objects is @code{mpfr_t}, internally defined +as a one-element array of a structure (so that when passed as an +argument to a function, it is the pointer that is actually passed), +and @code{mpfr_ptr} is the C data type representing a pointer to this +structure. @cindex Precision @tindex @code{mpfr_prec_t} -@noindent The @dfn{precision} is the number of bits used to represent the significand of a floating-point number; the corresponding C data type is @code{mpfr_prec_t}. @@ -693,12 +694,19 @@ may abort, crash or have undefined behavior (depending on your C implementation). +@cindex Exponent +@tindex @code{mpfr_exp_t} +An @dfn{exponent} is a component of a regular floating-point number. +Its C data type is @code{mpfr_exp_t}. Valid exponents are restricted +to a subset of this type, and the exponent range can be changed globally +as described in @ref{Exception Related Functions}. Special values do not +have an exponent. + @cindex Rounding Modes @tindex @code{mpfr_rnd_t} -@noindent The @dfn{rounding mode} specifies the way to round the result of a floating-point operation, in case the exact result can not be represented -exactly in the destination significand; +exactly in the destination; the corresponding C data type is @code{mpfr_rnd_t}. @cindex Group of flags @@ -1653,12 +1661,21 @@ @end deftypefun @deftypefun {char *} mpfr_get_str (char *@var{str}, mpfr_exp_t *@var{expptr}, int @var{b}, size_t @var{n}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd}) -Convert @var{op} to a string of digits in base @var{b}, with rounding in -the direction @var{rnd}, where @var{n} is either zero (see below) or the -number of significant digits output in the string; in the latter case, -@var{n} must be greater or equal to 2. The base may vary from 2 to 62; +Convert @var{op} to a string of digits in base @GMPabs{@var{b}}, with +rounding in the direction @var{rnd}, where @var{n} is either zero +(see below) or the number of significant digits output in the string. +The argument @var{b} may vary from 2 to 62 or from @minus{}2 to @minus{}36; otherwise the function does nothing and immediately returns a null pointer. +For @var{b} in the range 2 to 36, digits and lower-case letters are used; +for @minus{}2 to @minus{}36, digits and upper-case letters are used; for +37 to 62, digits, upper-case letters, and lower-case letters, in that +significance order, are used. Warning! This implies that for +@math{@var{b} > 10}, the successor of the digit 9 depends on @var{b}. +This choice has been done for compatibility with GMP's @code{mpf_get_str} +function. Users who wish a more consistent behavior should write a simple +wrapper. + If the input is NaN, then the returned string is @samp{@@NaN@@} and the NaN flag is set. If the input is +Inf (resp.@: @minus{}Inf), then the returned string is @samp{@@Inf@@} (resp.@: @samp{-@@Inf@@}). @@ -1699,8 +1716,7 @@ but in some very rare cases, it might be @math{m+1} (the smallest case for bases up to 62 is when @var{p} equals 186564318007 for bases 7 and 49). -@c In the source src/get_str.c, this is due to the approximate mpfr_ceil_mul, -@c but also m = 1 is changed to 2. +@c In the source src/get_str.c, this is due to the approximate mpfr_ceil_mul. If @var{str} is a null pointer, space for the significand is allocated using the allocation function (@pxref{Memory Handling}) and a pointer to the string @@ -2105,7 +2121,7 @@ rounded in the direction @var{rnd}. Note that since @code{acos(-1)} returns the floating-point number closest to @m{\pi,Pi} according to the given rounding mode, this number might not be -in the output range @math{0 @le{} @var{rop} < \pi} +in the output range @m{0 @le{} @var{rop} < \pi,0 @le{} @var{rop} < Pi} of the arc-cosine function; still, the result lies in the image of the output range by the rounding function. @@ -2376,7 +2392,7 @@ @end deftypefun @deftypefun void mpfr_free_cache (void) -Free all caches and pools used by MPFR internally (thoses local to the +Free all caches and pools used by MPFR internally (those local to the current thread and those shared by all threads). You should call this function before terminating a thread, even if you did not call @code{mpfr_const_*} functions directly (they could have been called @@ -3408,20 +3424,20 @@ if @var{x} is outside the subnormal exponent range of the emulated floating-point system, this function just propagates the @ref{ternary value} @var{t}; otherwise, it rounds @var{x} to precision -@code{EXP(x)-emin+1} according to rounding mode @var{rnd} and previous +@code{EXP(@var{x})-emin+1} according to rounding mode @var{rnd} and previous ternary value @var{t}, avoiding double rounding problems. -More precisely in the subnormal domain, denoting by @var{e} the value of +More precisely in the subnormal domain, denoting by @m{e,@var{e}} the value of @code{emin}, @var{x} is rounded in fixed-point arithmetic to an integer multiple of @m{2^{e-1}, two to the power @var{e}@minus{}1}; as a consequence, @m{1.5 \times 2^{e-1}, 1.5 multiplied by two to the power @var{e}@minus{}1} when @var{t} is zero is rounded to @m{2^e, two to the power @var{e}} with rounding to nearest. -@code{PREC(x)} is not modified by this function. +@code{PREC(@var{x})} is not modified by this function. @var{rnd} and @var{t} must be the rounding mode and the returned ternary value used when computing @var{x} (as in @code{mpfr_check_range}). -The subnormal exponent range is from @code{emin} to @code{emin+PREC(x)-1}. +The subnormal exponent range is from @code{emin} to @code{emin+PREC(@var{x})-1}. If the result cannot be represented in the current exponent range of MPFR (due to a too small @code{emax}), the behavior is undefined. Note that unlike most functions, the result is compared to the exact one, @@ -4365,7 +4381,7 @@ The MPFR-MPC workshop in January 2013 was partly supported by the ERC grant ANTICS, the GDR IM and the Caramel project-team, during which Mickaël Gastineau contributed the MPFRbench program, and -Fredrik Johannsson a faster version of @code{mpfr_const_euler}. +Fredrik Johansson a faster version of @code{mpfr_const_euler}. @node References, GNU Free Documentation License, Contributors, Top @comment node-name, next, previous, up diff -Nru mpfr4-4.0.1/doc/README.dev mpfr4-4.0.2/doc/README.dev --- mpfr4-4.0.1/doc/README.dev 2018-02-07 12:02:41.000000000 +0000 +++ mpfr4-4.0.2/doc/README.dev 2019-01-07 14:06:05.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright 2002-2018 Free Software Foundation, Inc. +Copyright 2002-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. @@ -25,7 +25,7 @@ To compile source code obtained from the Subversion repository, you need some GNU development utilities: aclocal, autoheader, automake, autoconf 2.60 (at least), libtoolize, and the AX_PTHREAD macro from - + (for the latter, under Debian/Ubuntu it suffices to install the autoconf-archive package). As some files like "configure" are not part of the Subversion @@ -114,7 +114,7 @@ The latest rules for GNU software can be found here: - http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices + https://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices =========================================================================== @@ -194,7 +194,7 @@ may miss some incompatibilities. Update the FAQ.html file with update-faq (and check it) in the doc directory. - [*] http://lvc.github.io/abi-compliance-checker/ + [*] https://lvc.github.io/abi-compliance-checker/ 4) Update the ChangeLog file with "TZ=UTC svn log -rHEAD:0 -v" in UTF-8 locales, e.g. "LC_ALL=en_US.UTF8 TZ=UTC svn log -rHEAD:0 -v". @@ -250,7 +250,7 @@ Also test --enable-gmp-internals with it. Try different compilers, e.g., icc, opencc (x86_64 machines), - tcc , llvm-gcc, clang. + tcc , llvm-gcc, clang. On 64-bit PowerPC, test against GMP built with the different ABI's: 32, mode32 and mode64 (in particular mode32, where long's have @@ -312,7 +312,7 @@ but this needs: * GCC 4.9+ * a patched autoconf: - http://lists.gnu.org/archive/html/autoconf-patches/2014-01/msg00003.html + https://lists.gnu.org/archive/html/autoconf-patches/2014-01/msg00003.html Check that there are no abnormal regressions in the timings (both for 100, 1000, 10000 digits, http://mpfr.org/mpfr-current/timings.html, @@ -329,7 +329,7 @@ Also test with different environment variables set (GMP_CHECK_RANDOMIZE, MPFR_CHECK_LIBC_PRINTF, MPFR_CHECK_LARGEMEM, - MPFR_SUSPICIOUS_OVERFLOW). + MPFR_SUSPICIOUS_OVERFLOW, MPFR_CHECK_LOCALES). Check there is no branch misprediction due to wrong MPFR_LIKELY or MPFR_UNLIKELY statements. For that test, configure with @@ -382,7 +382,7 @@ (see svn history such as [4] for examples), as the manual already contains the new URL's. - [1] http://www.gnu.org/prep/maintain/html_node/Announcements.html + [1] https://www.gnu.org/prep/maintain/html_node/Announcements.html [2] http://siteadmin.gforge.inria.fr/FAQ.html [3] See https://lists.gnu.org/mailman/listinfo/platform-testers and https://lists.gnu.org/archive/html/platform-testers/2011-09/msg00000.html @@ -427,6 +427,9 @@ + MPFR_HAVE_INTMAX_MAX: Define if the INTMAX_MAX macro works correctly (if 'intmax_t' is supported). ++ MPFR_HAVE_C11_LOCK: Define if C11 threads are supported. ++ HAVE_PTHREAD: Define if pthread is available. + Format of long double. + HAVE_LDOUBLE_IS_DOUBLE: IEEE double. + HAVE_LDOUBLE_IEEE_EXT_BIG: IEEE extended, big endian. @@ -470,6 +473,12 @@ + MPFR_USE_C11_THREAD_SAFE: Define to implement TLS in the C11 way. ++ MPFR_WANT_SHARED_CACHE: + Define to have caches shared by all threads. ++ MPFR_THREAD_LOCK_METHOD: + When MPFR_WANT_SHARED_CACHE is defined, this macro + gives the thread locking method (string). + + MPFR_HAVE_NORETURN: Define if the _Noreturn function specifier is supported. + MPFR_HAVE_BUILTIN_UNREACHABLE: @@ -540,6 +549,11 @@ the C library itself on some machines, and they do not affect MPFR. ++ MPFR_CHECK_LOCALES: Fail in case a locale cannot be set. Developers + can set this variable on their machines to make + sure that needed locales are properly installed + and tested. + + MPFR_DEBUG_BADCASES: For debugging (see tests.c, function bad_cases). + MPFR_SUSPICIOUS_OVERFLOW: @@ -567,7 +581,7 @@ =========================================================================== The GNU Coding standards can be read at: - http://www.gnu.org/prep/standards_toc.html + https://www.gnu.org/prep/standards_toc.html ISO C Names and corresponding headers: http://www.schweikhardt.net/identifiers.html Language C: @@ -605,13 +619,13 @@ Check C++ reserved keywords, e.g. from - http://en.cppreference.com/w/cpp/keyword + https://en.cppreference.com/w/cpp/keyword or more generally: https://www.google.com/search?q=%22C%2B%2B%22+reserved+keywords -Quoted from : +Quoted from : Avoid the use of identifiers or idioms that would prevent code compiling with a C++ compiler. Identifiers such as new or class, @@ -623,8 +637,8 @@ must be white space between them, otherwise this is parsed as a user-defined string literal in C++11: - http://en.cppreference.com/w/cpp/language/user_literal - http://stackoverflow.com/a/6402166/3782797 + https://en.cppreference.com/w/cpp/language/user_literal + https://stackoverflow.com/a/6402166/3782797 ===================================================================== @@ -651,7 +665,7 @@ Some references: * https://en.wikipedia.org/wiki/Type_punning#Use_of_union -* http://stackoverflow.com/questions/346622/opinions-on-type-punning-in-c +* https://stackoverflow.com/questions/346622/opinions-on-type-punning-in-c "Opinions on type-punning in C++?" =========================================================================== @@ -698,7 +712,7 @@ has used this form since 2004-01-26 (in headers.m4). References: - http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=62ac9bbfebe879581dabeed78c6ac66b907dd51d + https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=62ac9bbfebe879581dabeed78c6ac66b907dd51d https://sympa.inria.fr/sympa/arc/mpfr/2010-08/msg00015.html =========================================================================== @@ -978,7 +992,7 @@ #undef MPFR_EXP_THRESHOLD #define MPFR_EXP_THRESHOLD mpfr_exp_threshold /* Include the test function to threshold directly in the test - program. It will overide the mpfr_exp coming from libmpfr.a */ + program. It will override the mpfr_exp coming from libmpfr.a */ #include "exp.c" /* Define the speed function related to mpfr_exp */ static double speed_mpfr_exp (struct speed_params *s) { @@ -1009,7 +1023,7 @@ =========================================================================== Bit Twiddling Hacks - Sean Eron Anderson maintain a list of tricks to get -efficient code on . +efficient code on . WARNING: some of those tricks may not take into account possible overflows, and may not be portable. @@ -1185,7 +1199,7 @@ When using GNU extensions (based on the value of the __GNUC_* macros), check whether they work with ICC. The following paper can give useful information: "Intel® Compilers for Linux*: Compatibility with GNU Compilers" at -. +. To detect compilers, see @@ -1228,7 +1242,7 @@ /* Test file for mpfr_func. -Copyright 2018 Free Software Foundation, Inc. +Copyright 2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -1245,7 +1259,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -1311,7 +1325,7 @@ LOG_COMPILER=wine make check More information about the parallel test harness: -http://www.gnu.org/software/automake/manual/automake.html#Parallel-Test-Harness +https://www.gnu.org/software/automake/manual/automake.html#Parallel-Test-Harness --------------------------------------------------------------------- diff -Nru mpfr4-4.0.1/doc/texinfo.tex mpfr4-4.0.2/doc/texinfo.tex --- mpfr4-4.0.1/doc/texinfo.tex 2018-01-09 12:34:03.000000000 +0000 +++ mpfr4-4.0.2/doc/texinfo.tex 2019-01-07 13:57:16.000000000 +0000 @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2018-01-09.11} +\def\texinfoversion{2018-02-12.17} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -182,7 +182,7 @@ % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script - ap-pen-dix bit-map bit-maps + auto-ma-ti-cal-ly ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces diff -Nru mpfr4-4.0.1/examples/can_round.c mpfr4-4.0.2/examples/can_round.c --- mpfr4-4.0.1/examples/can_round.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/examples/can_round.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* Example illustrating how to use mpfr_can_round. */ /* -Copyright 2016-2018 Free Software Foundation, Inc. +Copyright 2016-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/examples/divworst.c mpfr4-4.0.2/examples/divworst.c --- mpfr4-4.0.1/examples/divworst.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/examples/divworst.c 2019-01-07 13:53:20.000000000 +0000 @@ -13,7 +13,7 @@ */ /* -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/examples/rndo-add.c mpfr4-4.0.2/examples/rndo-add.c --- mpfr4-4.0.1/examples/rndo-add.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/examples/rndo-add.c 2019-01-07 13:53:20.000000000 +0000 @@ -8,7 +8,7 @@ */ /* -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -25,7 +25,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/examples/sample.c mpfr4-4.0.2/examples/sample.c --- mpfr4-4.0.1/examples/sample.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/examples/sample.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,9 +1,9 @@ /* This is the example given and commented on the MPFR web site: - * http://www.mpfr.org/sample.html + * https://www.mpfr.org/sample.html */ /* -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -20,7 +20,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/examples/version.c mpfr4-4.0.2/examples/version.c --- mpfr4-4.0.1/examples/version.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/examples/version.c 2019-01-07 13:53:20.000000000 +0000 @@ -3,7 +3,7 @@ */ /* -Copyright 2010-2018 Free Software Foundation, Inc. +Copyright 2010-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -20,7 +20,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/INSTALL mpfr4-4.0.2/INSTALL --- mpfr4-4.0.1/INSTALL 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/INSTALL 2019-01-30 09:26:44.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. @@ -28,8 +28,8 @@ problems are due to bad configuration on the user side (not specific to MPFR). -0. You first need to install GMP. See . - MPFR requires GMP version 4.1 or later. +0. You first need to install GMP. See . + MPFR requires GMP version 5.0.0 or later. 1. Extract the files from the archive. @@ -37,17 +37,17 @@ not been done yet and if patches are available. You can check on the release page: - http://www.mpfr.org/mpfr-4.0.1/ + https://www.mpfr.org/mpfr-4.0.2/ which may have additional information. The patches can be applied with commands like: - wget http://www.mpfr.org/mpfr-4.0.1/allpatches + wget https://www.mpfr.org/mpfr-4.0.2/allpatches patch -N -Z -p1 < allpatches or - curl http://www.mpfr.org/mpfr-4.0.1/allpatches | patch -N -Z -p1 + curl https://www.mpfr.org/mpfr-4.0.2/allpatches | patch -N -Z -p1 (Those instructions are for the GNU patch command, for example /usr/bin/gpatch on Solaris.) @@ -238,13 +238,19 @@ [1] http://permalink.gmane.org/gmane.comp.gnu.libtool.patches/10111 -Note: By default, the configure script tries to set CC/CFLAGS to GMP's -ones (this feature needs GMP 4.3.0 or later, or the --with-gmp-build -option). However this is not guaranteed to work as the configure script -does some compiler tests earlier, and the change may be too late. Also, -the values obtained from GMP may be incorrect if GMP has been built -on a different machine. In such a case, the user may need to specify -CC/CFLAGS as explained below. +Note: By default, the configure script tries to set CC / CFLAGS to GMP's +ones from gmp.h (__GMP_CC / __GMP_CFLAGS) in order to ensure that MPFR is +built with the same ABI as GMP. The reason is that when GMP is built, it +may set CC / CFLAGS to select an ABI that is not the default one in order +to have a better performance. The -pedantic option in GMP's CFLAGS, when +present (which is the case by default), is removed, because the MPFR +build system uses some C extensions (when this script detects that they +are supported) and -pedantic yields too many useless warnings. However, +this setting from GMP is not guaranteed to work as the configure script +does some compiler tests earlier, and a conflict may arise. Also, the +values obtained from GMP may be incorrect for the MPFR build if GMP has +been built on a different machine; in such a case, the user may need to +specify CC / CFLAGS, as explained below. Moreover, even without --with-gmp-build and --enable-gmp-internals, MPFR might use some GMP internals by mistake. This would be a bug, @@ -361,9 +367,9 @@ Several documents may help you to solve the problem: * this INSTALL file, in particular information given below; * the FAQ (either the FAQ.html file distributed with MPFR, or the - on-line version , which may be more + on-line version , which may be more up-to-date); - * the MPFR web page for this version , + * the MPFR web page for this version , which lists bugs found in this version and provides some patches. If the "configure" fails, please check that the C compiler and its diff -Nru mpfr4-4.0.1/install-sh mpfr4-4.0.2/install-sh --- mpfr4-4.0.1/install-sh 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/install-sh 2019-01-31 20:43:20.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2014-09-12.12; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -271,15 +271,18 @@ fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,6 +291,11 @@ fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then @@ -324,14 +332,16 @@ # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) - # $RANDOM is not portable (e.g. dash); use it when possible to - # lower collision chance + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - # As "mkdir -p" follows symlinks and we work in /tmp possibly; so - # create the $tmpdir first (and fail if unsuccessful) to make sure - # that nobody tries to guess the $tmpdir name. + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 @@ -434,8 +444,8 @@ else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 @@ -500,9 +510,9 @@ done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru mpfr4-4.0.1/ltmain.sh mpfr4-4.0.2/ltmain.sh --- mpfr4-4.0.1/ltmain.sh 2018-02-07 12:57:38.000000000 +0000 +++ mpfr4-4.0.2/ltmain.sh 2019-01-31 20:43:15.000000000 +0000 @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-2+local1" +VERSION="2.4.6 Debian-2.4.6-9+local1" package_revision=2.4.6 @@ -1370,7 +1370,7 @@ #! /bin/sh # Set a version string for this script. -scriptversion=2014-01-07.03; # UTC +scriptversion=2015-10-07.11; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1530,6 +1530,8 @@ { $debug_cmd + _G_rc_run_hooks=false + case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1538,16 +1540,16 @@ eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi done - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1557,10 +1559,16 @@ ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# 'eval'. Like this: +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1578,11 @@ # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote_for_eval ${1+"$@"} +# # my_options_prep_result=$func_quote_for_eval_result +# false # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1591,37 @@ # { # $debug_cmd # +# args_changed=false +# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# if $args_changed; then +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# fi +# +# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1611,16 +1633,32 @@ # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result +# false # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1668,28 @@ { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_rc_options=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote_for_eval ${1+"$@"} + func_options_result=$func_quote_for_eval_result + fi + + $_G_rc_options } @@ -1649,9 +1698,9 @@ # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete +# needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning. +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). func_hookable func_options_prep func_options_prep () { @@ -1661,10 +1710,14 @@ opt_verbose=false opt_warning_types= - func_run_hooks func_options_prep ${1+"$@"} + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + $_G_rc_options_prep } @@ -1678,18 +1731,20 @@ func_parse_options_result= + _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1704,7 +1759,10 @@ ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1815,25 @@ shift ;; - --) break ;; + --) _G_rc_parse_options=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + $_G_match_parse_options && _G_rc_parse_options=: done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_parse_options } @@ -1778,16 +1846,21 @@ { $debug_cmd + _G_rc_validate_options=false + # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - func_run_hooks func_validate_options ${1+"$@"} + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result + $_G_rc_validate_options } @@ -2068,7 +2141,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-2+local1 + version: $progname $scriptversion Debian-2.4.6-9+local1 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2270,6 +2343,8 @@ nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2368,18 @@ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2391,12 @@ { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2471,22 @@ func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -7275,10 +7367,11 @@ # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*) + -specs=*|-fsanitize=*|-fuse-ld=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" diff -Nru mpfr4-4.0.1/m4/libtool.m4 mpfr4-4.0.2/m4/libtool.m4 --- mpfr4-4.0.1/m4/libtool.m4 2018-02-07 12:57:38.000000000 +0000 +++ mpfr4-4.0.2/m4/libtool.m4 2019-01-31 20:43:15.000000000 +0000 @@ -4063,7 +4063,8 @@ if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -6440,7 +6441,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6815,7 +6816,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6880,7 +6881,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7219,7 +7220,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7303,7 +7304,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7314,7 +7315,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' diff -Nru mpfr4-4.0.1/Makefile.am mpfr4-4.0.2/Makefile.am --- mpfr4-4.0.1/Makefile.am 2018-01-25 14:46:21.000000000 +0000 +++ mpfr4-4.0.2/Makefile.am 2019-01-01 21:02:47.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright 2000-2018 Free Software Foundation, Inc. +# Copyright 2000-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff -Nru mpfr4-4.0.1/Makefile.in mpfr4-4.0.2/Makefile.in --- mpfr4-4.0.1/Makefile.in 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/Makefile.in 2019-01-31 20:43:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright 2000-2018 Free Software Foundation, Inc. +# Copyright 2000-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -177,7 +177,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck + cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -419,8 +419,8 @@ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -594,7 +594,10 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ diff -Nru mpfr4-4.0.1/missing mpfr4-4.0.2/missing --- mpfr4-4.0.1/missing 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/missing 2019-01-31 20:43:20.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru mpfr4-4.0.1/mpfr.pc.in mpfr4-4.0.2/mpfr.pc.in --- mpfr4-4.0.1/mpfr.pc.in 2016-04-21 08:37:29.000000000 +0000 +++ mpfr4-4.0.2/mpfr.pc.in 2018-05-31 14:41:37.000000000 +0000 @@ -4,7 +4,7 @@ includedir=@includedir@ Name: mpfr -URL: http://www.mpfr.org/ +URL: https://www.mpfr.org/ Description: C library for multiple-precision floating-point computations Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lmpfr -lgmp diff -Nru mpfr4-4.0.1/NEWS mpfr4-4.0.2/NEWS --- mpfr4-4.0.1/NEWS 2018-02-01 14:28:02.000000000 +0000 +++ mpfr4-4.0.2/NEWS 2019-01-31 20:33:50.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -15,11 +15,20 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ############################################################################## +Changes from version 4.0.1 to version 4.0.2: +- Corrected minimal GMP version in the INSTALL file and the MPFR manual. +- Option -pedantic is now always removed from __GMP_CFLAGS (see INSTALL). +- Shared caches: cleanup; really detect lock failures (abort in this case). +- Improved MPFR manual. In particular, corrected/completed the + mpfr_get_str description in order to follow the historical behavior + and GMP's mpf_get_str function. +- Bug fixes (see ChangeLog file). + Changes from version 4.0.0 to version 4.0.1: - Improved MPFR manual. - Improved __GMP_CC and __GMP_CFLAGS retrieval (in particular for MS Windows). diff -Nru mpfr4-4.0.1/README mpfr4-4.0.2/README --- mpfr4-4.0.1/README 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/README 2019-01-07 13:53:20.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ############################################################################## diff -Nru mpfr4-4.0.1/src/abort_prec_max.c mpfr4-4.0.2/src/abort_prec_max.c --- mpfr4-4.0.1/src/abort_prec_max.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/abort_prec_max.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_abort_prec_max -- Abort due to maximal precision overflow. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/acos.c mpfr4-4.0.2/src/acos.c --- mpfr4-4.0.1/src/acos.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/acos.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_acos -- arc-cosinus of a floating-point number -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/acosh.c mpfr4-4.0.2/src/acosh.c --- mpfr4-4.0.1/src/acosh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/acosh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_acosh -- inverse hyperbolic cosine -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/add1.c mpfr4-4.0.2/src/add1.c --- mpfr4-4.0.1/src/add1.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/add1.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_add1 -- internal function to perform a "real" addition -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/add1sp.c mpfr4-4.0.2/src/add1sp.c --- mpfr4-4.0.1/src/add1sp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/add1sp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_add1sp -- internal function to perform a "real" addition All the op must have the same precision -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/add.c mpfr4-4.0.2/src/add.c --- mpfr4-4.0.1/src/add.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/add.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_add -- add two floating-point numbers -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/add_d.c mpfr4-4.0.2/src/add_d.c --- mpfr4-4.0.1/src/add_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/add_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_add_d -- add a multiple precision floating-point number to a machine double precision float -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/add_ui.c mpfr4-4.0.2/src/add_ui.c --- mpfr4-4.0.1/src/add_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/add_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_add_ui -- add a floating-point number with a machine integer -Copyright 2000-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/agm.c mpfr4-4.0.2/src/agm.c --- mpfr4-4.0.1/src/agm.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/agm.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_agm -- arithmetic-geometric mean of two floating-point numbers -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/ai.c mpfr4-4.0.2/src/ai.c --- mpfr4-4.0.1/src/ai.c 2018-01-10 16:48:57.000000000 +0000 +++ mpfr4-4.0.2/src/ai.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_ai -- Airy function Ai -Copyright 2010-2018 Free Software Foundation, Inc. +Copyright 2010-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/amd/amdfam10/mparam.h mpfr4-4.0.2/src/amd/amdfam10/mparam.h --- mpfr4-4.0.1/src/amd/amdfam10/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/amd/amdfam10/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2011-07-31, gcc 4.6.1 */ @@ -91,7 +91,7 @@ 824,832,832,832,832,832,832,825,832,832,832,824,832,832,832,828, \ 822,824,831,829,832,827,832,832,832,831,832,829,829,832,824,832, \ 830,832,832,832,832,832,830,832,832,832,832,828,855,832,830,830 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,0,-1,-1,-1,-1,-1,-1,7,8,9,8,9,9, \ 11,11,11,13,13,14,15,16,17,17,19,19,16,19,17,19, \ @@ -157,7 +157,7 @@ 696,695,695,696,696,728,696,696,695,696,696,696,696,696,696,696, \ 727,696,696,696,696,695,696,728,727,696,695,727,696,726,727,726, \ 727,728,728,727,694,727,728,728,728,727,727,728,727,728,727,728 \ - + #define MPFR_DIVHIGH_TAB \ 0,1,2,3,4,5,6,7,8,9,10,11,10,13,14,15, \ 14,15,18,19,18,14,15,18,18,18,19,17,18,19,18,19, \ @@ -223,7 +223,7 @@ 560,496,576,512,512,512,512,512,512,576,576,512,512,576,512,512, \ 512,512,576,512,512,512,508,512,576,512,576,576,512,576,592,512, \ 568,512,576,568,576,576,576,512,576,576,592,576,592,512,608,576 \ - + #define MPFR_MUL_THRESHOLD 17 /* limbs */ #define MPFR_SQR_THRESHOLD 19 /* limbs */ #define MPFR_DIV_THRESHOLD 28 /* limbs */ diff -Nru mpfr4-4.0.1/src/amd/athlon/mparam.h mpfr4-4.0.2/src/amd/athlon/mparam.h --- mpfr4-4.0.1/src/amd/athlon/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/amd/athlon/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_MULHIGH_TAB \ diff -Nru mpfr4-4.0.1/src/amd/k8/mparam.h mpfr4-4.0.2/src/amd/k8/mparam.h --- mpfr4-4.0.1/src/amd/k8/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/amd/k8/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2011-07-31, gcc 4.3.2 */ @@ -91,7 +91,7 @@ 831,832,831,832,832,831,832,832,832,832,832,832,831,832,832,832, \ 831,832,832,832,832,832,831,832,832,832,832,832,831,832,831,832, \ 832,832,831,832,831,832,831,832,832,832,832,832,832,832,831,832 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,0,0,-1,-1,-1,-1,-1,7,7,8,9,9,11, \ 11,11,11,11,13,13,15,15,17,17,18,17,17,17,18,20, \ @@ -157,7 +157,7 @@ 727,584,728,632,728,560,727,728,728,560,584,560,560,727,728,728, \ 727,728,728,728,608,728,728,724,728,728,760,727,728,727,728,728, \ 728,759,728,696,728,728,728,728,728,727,759,760,727,760,760,727 \ - + #define MPFR_DIVHIGH_TAB \ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, \ 14,15,18,19,18,14,22,18,18,18,18,20,18,18,20,22, \ @@ -223,7 +223,7 @@ 560,496,512,512,512,496,512,512,512,576,512,512,512,512,512,512, \ 512,512,512,512,560,512,560,512,576,512,576,592,512,560,591,512, \ 592,512,576,512,576,592,592,624,592,576,560,512,592,576,592,592 \ - + #define MPFR_MUL_THRESHOLD 19 /* limbs */ #define MPFR_SQR_THRESHOLD 18 /* limbs */ #define MPFR_DIV_THRESHOLD 34 /* limbs */ diff -Nru mpfr4-4.0.1/src/arm/mparam.h mpfr4-4.0.2/src/arm/mparam.h --- mpfr4-4.0.1/src/arm/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/arm/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2010-10-15, gcc 4.4.4 */ @@ -220,7 +220,7 @@ 528,492,520,516,516,504,525,496,516,520,516,512,520,532,528,516, \ 516,524,512,508,520,528,516,532,532,516,533,516,528,504,528,516, \ 532,576,532,515,516,600,528,517,516,600,600,532,516,600,600,524 \ - + #define MPFR_MUL_THRESHOLD 16 /* limbs */ #define MPFR_SQR_THRESHOLD 31 /* limbs */ #define MPFR_EXP_2_THRESHOLD 469 /* bits */ diff -Nru mpfr4-4.0.1/src/asin.c mpfr4-4.0.2/src/asin.c --- mpfr4-4.0.1/src/asin.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/asin.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_asin -- arc-sinus of a floating-point number -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/asinh.c mpfr4-4.0.2/src/asinh.c --- mpfr4-4.0.1/src/asinh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/asinh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_asinh -- inverse hyperbolic sine -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/atan2.c mpfr4-4.0.2/src/atan2.c --- mpfr4-4.0.1/src/atan2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/atan2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_atan2 -- arc-tan 2 of a floating-point number -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/atan.c mpfr4-4.0.2/src/atan.c --- mpfr4-4.0.1/src/atan.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/atan.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_atan -- arc-tangent of a floating-point number -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -177,7 +177,7 @@ /* main loop */ n = 1UL << m; MPFR_ASSERTN (n != 0); /* no overflow */ - /* the ith term being X^i/(2i+1) with X=p/2^r, we can stop when + /* the i-th term being X^i/(2i+1) with X=p/2^r, we can stop when p^i/2^(r*i) < 2^(-precy), i.e. r*i > precy + log2(p^i) */ for (i = k = done = 0; (i < n) && (done == 0); i += 2, k ++) { @@ -209,7 +209,7 @@ } } } - else /* special case p=1: the ith term being X^i/(2i+1) with X=1/2^r, + else /* special case p=1: the i-th term being X^i/(2i+1) with X=1/2^r, we can stop when r*i > precy i.e. i > precy/r */ { n = 1UL << m; @@ -284,7 +284,7 @@ mpfr_exp_t exptol; mpfr_prec_t prec, realprec, est_lost, lost; unsigned long twopoweri, log2p, red; - int comparaison, inexact; + int comparison, inexact; int i, n0, oldn0; MPFR_GROUP_DECL (group); MPFR_SAVE_EXPO_DECL (expo); @@ -339,8 +339,8 @@ MPFR_SAVE_EXPO_MARK (expo); /* Other simple case arctan(-+1)=-+pi/4 */ - comparaison = mpfr_cmp_ui (xp, 1); - if (MPFR_UNLIKELY (comparaison == 0)) + comparison = mpfr_cmp_ui (xp, 1); + if (MPFR_UNLIKELY (comparison == 0)) { int neg = MPFR_IS_NEG (x); inexact = mpfr_const_pi (atan, MPFR_IS_POS (x) ? rnd_mode @@ -401,7 +401,7 @@ MPFR_SAVE_EXPO_MARK, but let's check that for maintainability. */ MPFR_ASSERTD (__gmpfr_emax <= 1 - __gmpfr_emin); - if (comparaison > 0) /* use atan(xp) = Pi/2 - atan(1/xp) */ + if (comparison > 0) /* use atan(xp) = Pi/2 - atan(1/xp) */ mpfr_ui_div (sk, 1, xp, MPFR_RNDN); else mpfr_set (sk, xp, MPFR_RNDN); @@ -418,7 +418,7 @@ mpfr_add_ui (tmp, tmp, 1, MPFR_RNDN); mpfr_sqrt (tmp, tmp, MPFR_RNDN); mpfr_sub_ui (tmp, tmp, 1, MPFR_RNDN); - if (red == 0 && comparaison > 0) + if (red == 0 && comparison > 0) /* use xp = 1/sk */ mpfr_mul (sk, tmp, xp, MPFR_RNDN); else @@ -488,7 +488,7 @@ /* argument reduction */ mpfr_mul_2exp (arctgt, arctgt, red, MPFR_RNDN); - if (comparaison > 0) + if (comparison > 0) { /* atan(x) = Pi/2-atan(1/x) for x > 0 */ mpfr_const_pi (tmp, MPFR_RNDN); mpfr_div_2ui (tmp, tmp, 1, MPFR_RNDN); diff -Nru mpfr4-4.0.1/src/atanh.c mpfr4-4.0.2/src/atanh.c --- mpfr4-4.0.1/src/atanh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/atanh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_atanh -- Inverse Hyperbolic Tangente -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/bernoulli.c mpfr4-4.0.2/src/bernoulli.c --- mpfr4-4.0.1/src/bernoulli.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/bernoulli.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* bernoulli -- internal function to compute Bernoulli numbers. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/beta.c mpfr4-4.0.2/src/beta.c --- mpfr4-4.0.1/src/beta.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/beta.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_beta -- beta function -Copyright 2017-2018 Free Software Foundation, Inc. +Copyright 2017-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H /* for MPFR_INT_CEIL_LOG2 */ diff -Nru mpfr4-4.0.1/src/buildopt.c mpfr4-4.0.2/src/buildopt.c --- mpfr4-4.0.1/src/buildopt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/buildopt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* buildopt.c -- functions giving information about options used during the mpfr library compilation -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" @@ -66,7 +66,7 @@ int mpfr_buildopt_sharedcache_p (void) { -#if defined (WANT_SHARED_CACHE) +#ifdef MPFR_WANT_SHARED_CACHE return 1; #else return 0; diff -Nru mpfr4-4.0.1/src/cache.c mpfr4-4.0.2/src/cache.c --- mpfr4-4.0.1/src/cache.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cache.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cache -- cache interface for multiple-precision constants in MPFR. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" @@ -144,7 +144,7 @@ mpfr_overflow (dest, rnd, sign); ); - /* Rather a likely, this is a 100% succes rate for + /* Rather a likely, this is a 100% success rate for all constants of MPFR */ if (MPFR_LIKELY (cache->inexact != 0)) { diff -Nru mpfr4-4.0.1/src/cbrt.c mpfr4-4.0.2/src/cbrt.c --- mpfr4-4.0.1/src/cbrt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cbrt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cbrt -- cube root function. -Copyright 2002-2018 Free Software Foundation, Inc. +Copyright 2002-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/check.c mpfr4-4.0.2/src/check.c --- mpfr4-4.0.1/src/check.c 2018-01-10 17:03:36.000000000 +0000 +++ mpfr4-4.0.2/src/check.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_check -- Check if a floating-point number has not been corrupted. -Copyright 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/clear.c mpfr4-4.0.2/src/clear.c --- mpfr4-4.0.1/src/clear.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/clear.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_clear -- free the memory space allocated for a floating-point number -Copyright 1999-2001, 2004-2018 Free Software Foundation, Inc. +Copyright 1999-2001, 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/clears.c mpfr4-4.0.2/src/clears.c --- mpfr4-4.0.1/src/clears.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/clears.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_clears -- free the memory space allocated for several floating-point numbers -Copyright 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff -Nru mpfr4-4.0.1/src/cmp2.c mpfr4-4.0.2/src/cmp2.c --- mpfr4-4.0.1/src/cmp2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cmp2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cmp2 -- exponent shift when subtracting two numbers. -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/cmp_abs.c mpfr4-4.0.2/src/cmp_abs.c --- mpfr4-4.0.1/src/cmp_abs.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cmp_abs.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cmpabs -- compare the absolute values of two FP numbers -Copyright 1999, 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/cmp.c mpfr4-4.0.2/src/cmp.c --- mpfr4-4.0.1/src/cmp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cmp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cmp -- compare two floating-point numbers -Copyright 1999, 2001, 2003-2018 Free Software Foundation, Inc. +Copyright 1999, 2001, 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/cmp_d.c mpfr4-4.0.2/src/cmp_d.c --- mpfr4-4.0.1/src/cmp_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cmp_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cmp_d -- compare a floating-point number with a double -Copyright 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/cmp_ld.c mpfr4-4.0.2/src/cmp_ld.c --- mpfr4-4.0.1/src/cmp_ld.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cmp_ld.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cmp_d -- compare a floating-point number with a long double -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* needed so that MPFR_LDBL_MANT_DIG is correctly defined */ diff -Nru mpfr4-4.0.1/src/cmp_si.c mpfr4-4.0.2/src/cmp_si.c --- mpfr4-4.0.1/src/cmp_si.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cmp_si.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_cmp_si_2exp -- compare a floating-point number with a signed machine integer multiplied by a power of 2 -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/cmp_ui.c mpfr4-4.0.2/src/cmp_ui.c --- mpfr4-4.0.1/src/cmp_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cmp_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_cmp_ui_2exp -- compare a floating-point number with an unsigned machine integer multiplied by a power of 2 -Copyright 1999, 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/comparisons.c mpfr4-4.0.2/src/comparisons.c --- mpfr4-4.0.1/src/comparisons.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/comparisons.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* comparison predicates -Copyright 2002-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2002-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/constant.c mpfr4-4.0.2/src/constant.c --- mpfr4-4.0.1/src/constant.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/constant.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* MPFR internal constant FP numbers -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/const_catalan.c mpfr4-4.0.2/src/const_catalan.c --- mpfr4-4.0.1/src/const_catalan.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/const_catalan.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_const_catalan -- compute Catalan's constant. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/const_euler.c mpfr4-4.0.2/src/const_euler.c --- mpfr4-4.0.1/src/const_euler.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/const_euler.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_const_euler -- Euler's constant -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by Fredrik Johansson. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* The approximation error bound uses Theorem 1 and Remark 2 in diff -Nru mpfr4-4.0.1/src/const_log2.c mpfr4-4.0.2/src/const_log2.c --- mpfr4-4.0.1/src/const_log2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/const_log2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_const_log2 -- compute natural logarithm of 2 -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/const_pi.c mpfr4-4.0.2/src/const_pi.c --- mpfr4-4.0.1/src/const_pi.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/const_pi.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_const_pi -- compute Pi -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/copysign.c mpfr4-4.0.2/src/copysign.c --- mpfr4-4.0.1/src/copysign.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/copysign.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_copysign -- Produce a value with the magnitude of x and sign bit of y -Copyright 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/cos.c mpfr4-4.0.2/src/cos.c --- mpfr4-4.0.1/src/cos.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cos.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cos -- cosine of a floating-point number -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/cosh.c mpfr4-4.0.2/src/cosh.c --- mpfr4-4.0.1/src/cosh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cosh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cosh -- hyperbolic cosine -Copyright 2001-2002, 2004-2018 Free Software Foundation, Inc. +Copyright 2001-2002, 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/cot.c mpfr4-4.0.2/src/cot.c --- mpfr4-4.0.1/src/cot.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/cot.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cot - cotangent function. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* the cotangent is defined by cot(x) = 1/tan(x) = cos(x)/sin(x). diff -Nru mpfr4-4.0.1/src/coth.c mpfr4-4.0.2/src/coth.c --- mpfr4-4.0.1/src/coth.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/coth.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_coth - Hyperbolic cotangent function. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* the hyperbolic cotangent is defined by coth(x) = 1/tanh(x) diff -Nru mpfr4-4.0.1/src/csc.c mpfr4-4.0.2/src/csc.c --- mpfr4-4.0.1/src/csc.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/csc.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_csc - cosecant function. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* the cosecant is defined by csc(x) = 1/sin(x). diff -Nru mpfr4-4.0.1/src/csch.c mpfr4-4.0.2/src/csch.c --- mpfr4-4.0.1/src/csch.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/csch.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_csch - Hyperbolic cosecant function. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* the hyperbolic cosecant is defined by csch(x) = 1/sinh(x). diff -Nru mpfr4-4.0.1/src/d_div.c mpfr4-4.0.2/src/d_div.c --- mpfr4-4.0.1/src/d_div.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/d_div.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_d_div -- divide a machine double precision float by a multiple precision floating-point number -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/digamma.c mpfr4-4.0.2/src/digamma.c --- mpfr4-4.0.1/src/digamma.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/digamma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_digamma -- digamma function of a floating-point number -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/dim.c mpfr4-4.0.2/src/dim.c --- mpfr4-4.0.1/src/dim.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/dim.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_dim -- positive difference -Copyright 2001-2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/div_2exp.c mpfr4-4.0.2/src/div_2exp.c --- mpfr4-4.0.1/src/div_2exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/div_2exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_div_2exp -- divide a floating-point number by a power of two -Copyright 1999, 2001, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/div_2si.c mpfr4-4.0.2/src/div_2si.c --- mpfr4-4.0.1/src/div_2si.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/div_2si.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_div_2si -- divide a floating-point number by a power of two -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/div_2ui.c mpfr4-4.0.2/src/div_2ui.c --- mpfr4-4.0.1/src/div_2ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/div_2ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_div_2ui -- divide a floating-point number by a power of two -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/div.c mpfr4-4.0.2/src/div.c --- mpfr4-4.0.1/src/div.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/div.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_div -- divide two floating-point numbers -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* References: diff -Nru mpfr4-4.0.1/src/div_d.c mpfr4-4.0.2/src/div_d.c --- mpfr4-4.0.1/src/div_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/div_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_div_d -- divide a multiple precision floating-point number by a machine double precision float -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/div_ui.c mpfr4-4.0.2/src/div_ui.c --- mpfr4-4.0.1/src/div_ui.c 2018-01-31 16:21:15.000000000 +0000 +++ mpfr4-4.0.2/src/div_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_div_ui -- divide a floating-point number by a machine integer -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/d_sub.c mpfr4-4.0.2/src/d_sub.c --- mpfr4-4.0.1/src/d_sub.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/d_sub.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_d_sub -- subtract a multiple precision floating-point number from a machine double precision float -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/dump.c mpfr4-4.0.2/src/dump.c --- mpfr4-4.0.1/src/dump.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/dump.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_dump, mpfr_fdump -- dump a float (for the tests and debugging purpose) -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/eint.c mpfr4-4.0.2/src/eint.c --- mpfr4-4.0.1/src/eint.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/eint.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_eint, mpfr_eint1 -- the exponential integral -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/eq.c mpfr4-4.0.2/src/eq.c --- mpfr4-4.0.1/src/eq.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/eq.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_eq -- Compare two floats up to a specified bit #. -Copyright 1999, 2001, 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001, 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/erandom.c mpfr4-4.0.2/src/erandom.c --- mpfr4-4.0.1/src/erandom.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/erandom.c 2019-01-07 13:53:20.000000000 +0000 @@ -2,7 +2,7 @@ mean 1 and round it to the precision of rop according to the given rounding mode. -Copyright 2013-2018 Free Software Foundation, Inc. +Copyright 2013-2019 Free Software Foundation, Inc. Contributed by Charles Karney , SRI International. This file is part of the GNU MPFR Library. @@ -19,7 +19,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* diff -Nru mpfr4-4.0.1/src/erf.c mpfr4-4.0.2/src/erf.c --- mpfr4-4.0.1/src/erf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/erf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_erf -- error function of a floating-point number -Copyright 2001, 2003-2018 Free Software Foundation, Inc. +Copyright 2001, 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -186,10 +186,8 @@ { mpfr_prec_t n, m; mpfr_exp_t nuk, sigmak; - double tauk; mpfr_t y, s, t, u; unsigned int k; - int log2tauk; int inex; MPFR_GROUP_DECL (group); MPFR_ZIV_DECL (loop); @@ -204,10 +202,14 @@ MPFR_ZIV_INIT (loop, m); for (;;) { + mpfr_t tauk; + mpfr_exp_t log2tauk; + mpfr_mul (y, x, x, MPFR_RNDU); /* err <= 1 ulp */ mpfr_set_ui (s, 1, MPFR_RNDN); mpfr_set_ui (t, 1, MPFR_RNDN); - tauk = 0.0; + mpfr_init2 (tauk, 53); + mpfr_set_ui (tauk, 0, MPFR_RNDU); for (k = 1; ; k++) { @@ -222,12 +224,13 @@ sigmak -= MPFR_GET_EXP(s); nuk = MPFR_GET_EXP(u) - MPFR_GET_EXP(s); - if ((nuk < - (mpfr_exp_t) m) && ((double) k >= xf2)) + if ((nuk < - (mpfr_exp_t) m) && (k >= xf2)) break; /* tauk <- 1/2 + tauk * 2^sigmak + (1+8k)*2^nuk */ - tauk = 0.5 + mul_2exp (tauk, sigmak) - + mul_2exp (1.0 + 8.0 * (double) k, nuk); + mpfr_mul_2si (tauk, tauk, sigmak, MPFR_RNDU); + mpfr_add_d (tauk, tauk, 0.5 + mul_2exp (1.0 + 8.0 * (double) k, nuk), + MPFR_RNDU); } mpfr_mul (s, x, s, MPFR_RNDU); @@ -236,8 +239,14 @@ mpfr_const_pi (t, MPFR_RNDZ); mpfr_sqrt (t, t, MPFR_RNDZ); mpfr_div (s, s, t, MPFR_RNDN); - tauk = 4.0 * tauk + 11.0; /* final ulp-error on s */ - log2tauk = __gmpfr_ceil_log2 (tauk); + /* tauk = 4 * tauk + 11: final ulp-error on s */ + mpfr_mul_2ui (tauk, tauk, 2, MPFR_RNDU); + mpfr_add_ui (tauk, tauk, 11, MPFR_RNDU); + /* In practice, one should not get an infinity, as it would require + a huge precision and a lot of time, but just in case... */ + MPFR_ASSERTN (!MPFR_IS_INF (tauk)); + log2tauk = MPFR_GET_EXP (tauk); + mpfr_clear (tauk); if (MPFR_LIKELY (MPFR_CAN_ROUND (s, m - log2tauk, n, rnd_mode))) break; diff -Nru mpfr4-4.0.1/src/erfc.c mpfr4-4.0.2/src/erfc.c --- mpfr4-4.0.1/src/erfc.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/erfc.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_erfc -- The Complementary Error Function of a floating-point number -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/exceptions.c mpfr4-4.0.2/src/exceptions.c --- mpfr4-4.0.1/src/exceptions.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/exceptions.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Exception flags and utilities. Constructors and destructors (debug). -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/exp10.c mpfr4-4.0.2/src/exp10.c --- mpfr4-4.0.1/src/exp10.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/exp10.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_exp10 -- power of 10 function 10^y -Copyright 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/exp_2.c mpfr4-4.0.2/src/exp_2.c --- mpfr4-4.0.1/src/exp_2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/exp_2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_exp_2 -- exponential of a floating-point number using algorithms in O(n^(1/2)*M(n)) and O(n^(1/3)*M(n)) -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H /* for count_leading_zeros */ diff -Nru mpfr4-4.0.1/src/exp2.c mpfr4-4.0.2/src/exp2.c --- mpfr4-4.0.1/src/exp2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/exp2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_exp2 -- power of 2 function 2^y -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/exp3.c mpfr4-4.0.2/src/exp3.c --- mpfr4-4.0.1/src/exp3.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/exp3.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_exp -- exponential of a floating-point number -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H /* for MPFR_MPZ_SIZEINBASE2 */ diff -Nru mpfr4-4.0.1/src/exp.c mpfr4-4.0.2/src/exp.c --- mpfr4-4.0.1/src/exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_exp -- exponential of a floating-point number -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/expm1.c mpfr4-4.0.2/src/expm1.c --- mpfr4-4.0.1/src/expm1.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/expm1.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_expm1 -- Compute exp(x)-1 -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/extract.c mpfr4-4.0.2/src/extract.c --- mpfr4-4.0.1/src/extract.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/extract.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_extract -- bit-extraction function for the binary splitting algorithm -Copyright 2000-2002, 2004-2018 Free Software Foundation, Inc. +Copyright 2000-2002, 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/factorial.c mpfr4-4.0.2/src/factorial.c --- mpfr4-4.0.1/src/factorial.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/factorial.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fac_ui -- factorial of a nonnegative integer -Copyright 2001, 2004-2018 Free Software Foundation, Inc. +Copyright 2001, 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/fits_intmax.c mpfr4-4.0.2/src/fits_intmax.c --- mpfr4-4.0.1/src/fits_intmax.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fits_intmax.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fits_intmax_p -- test whether an mpfr fits an intmax_t. -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff -Nru mpfr4-4.0.1/src/fits_s.h mpfr4-4.0.2/src/fits_s.h --- mpfr4-4.0.1/src/fits_s.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fits_s.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fits_*_p -- test whether an mpfr fits a C signed type. -Copyright 2003-2018 Free Software Foundation, Inc. +Copyright 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/fits_sint.c mpfr4-4.0.2/src/fits_sint.c --- mpfr4-4.0.1/src/fits_sint.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fits_sint.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fits_sint_p -- test whether an mpfr fits an int. -Copyright 2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define FUNCTION mpfr_fits_sint_p diff -Nru mpfr4-4.0.1/src/fits_slong.c mpfr4-4.0.2/src/fits_slong.c --- mpfr4-4.0.1/src/fits_slong.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fits_slong.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fits_slong_p -- test whether an mpfr fits a long. -Copyright 2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define FUNCTION mpfr_fits_slong_p diff -Nru mpfr4-4.0.1/src/fits_sshort.c mpfr4-4.0.2/src/fits_sshort.c --- mpfr4-4.0.1/src/fits_sshort.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fits_sshort.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fits_sshort_p -- test whether an mpfr fits a short. -Copyright 2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define FUNCTION mpfr_fits_sshort_p diff -Nru mpfr4-4.0.1/src/fits_u.h mpfr4-4.0.2/src/fits_u.h --- mpfr4-4.0.1/src/fits_u.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fits_u.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fits_*_p -- test whether an mpfr fits a C unsigned type. -Copyright 2003-2018 Free Software Foundation, Inc. +Copyright 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/fits_uint.c mpfr4-4.0.2/src/fits_uint.c --- mpfr4-4.0.1/src/fits_uint.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fits_uint.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fits_uint_p -- test whether an mpfr fits an unsigned int. -Copyright 2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define FUNCTION mpfr_fits_uint_p diff -Nru mpfr4-4.0.1/src/fits_uintmax.c mpfr4-4.0.2/src/fits_uintmax.c --- mpfr4-4.0.1/src/fits_uintmax.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fits_uintmax.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fits_uintmax_p -- test whether an mpfr fits an uintmax_t. -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff -Nru mpfr4-4.0.1/src/fits_ulong.c mpfr4-4.0.2/src/fits_ulong.c --- mpfr4-4.0.1/src/fits_ulong.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fits_ulong.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fits_ulong_p -- test whether an mpfr fits an unsigned long. -Copyright 2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define FUNCTION mpfr_fits_ulong_p diff -Nru mpfr4-4.0.1/src/fits_ushort.c mpfr4-4.0.2/src/fits_ushort.c --- mpfr4-4.0.1/src/fits_ushort.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fits_ushort.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fits_ushort_p -- test whether an mpfr fits an unsigned short. -Copyright 2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define FUNCTION mpfr_fits_ushort_p diff -Nru mpfr4-4.0.1/src/fma.c mpfr4-4.0.2/src/fma.c --- mpfr4-4.0.1/src/fma.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fma -- Floating multiply-add -Copyright 2001-2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -225,194 +225,73 @@ if (MPFR_IS_INF (u)) /* overflow */ { + int sign_u = MPFR_SIGN (u); + MPFR_LOG_MSG (("Overflow on x*y\n", 0)); + MPFR_GROUP_CLEAR (group); /* we no longer need u */ /* Let's eliminate the obvious case where x*y and z have the same sign. No possible cancellation -> real overflow. Also, we know that |z| < 2^emax. If E(x) + E(y) >= emax+3, - then |x*y| >= 2^(emax+1), and |x*y + z| >= 2^emax. This case + then |x*y| >= 2^(emax+1), and |x*y + z| > 2^emax. This case is also an overflow. */ - if (MPFR_SIGN (u) == MPFR_SIGN (z) || e >= __gmpfr_emax + 3) + if (sign_u == MPFR_SIGN (z) || e >= __gmpfr_emax + 3) { - MPFR_GROUP_CLEAR (group); MPFR_SAVE_EXPO_FREE (expo); - return mpfr_overflow (s, rnd_mode, MPFR_SIGN (z)); + return mpfr_overflow (s, rnd_mode, sign_u); } - - /* E(x) + E(y) <= emax+2, therefore |x*y| < 2^(emax+2), and - (x/4)*y does not overflow (let's recall that the result - is exact with an unbounded exponent range). It does not - underflow either, because x*y overflows and the exponent - range is large enough. */ - inexact = mpfr_div_2ui (u, x, 2, MPFR_RNDN); - MPFR_ASSERTN (inexact == 0); - inexact = mpfr_mul (u, u, y, MPFR_RNDN); - MPFR_ASSERTN (inexact == 0); - - /* Now, we need to add z/4... But it may underflow! */ - { - mpfr_t zo4; - mpfr_srcptr zz; - MPFR_BLOCK_DECL (flags); - - if (MPFR_GET_EXP (u) > MPFR_GET_EXP (z) && - MPFR_GET_EXP (u) - MPFR_GET_EXP (z) > MPFR_PREC (u)) - { - /* |z| < ulp(u)/2, therefore one can use z instead of z/4. */ - zz = z; - } - else - { - mpfr_init2 (zo4, MPFR_PREC (z)); - if (mpfr_div_2ui (zo4, z, 2, MPFR_RNDZ)) - { - /* The division by 4 underflowed! */ - MPFR_ASSERTN (0); /* TODO... */ - } - zz = zo4; - } - - /* Let's recall that u = x*y/4 and zz = z/4 (or z if the - following addition would give the same result). */ - MPFR_BLOCK (flags, inexact = mpfr_add (s, u, zz, rnd_mode)); - /* u and zz have different signs, so that an overflow - is not possible. But an underflow is theoretically - possible! */ - if (MPFR_UNDERFLOW (flags)) - { - MPFR_ASSERTN (zz != z); - MPFR_ASSERTN (0); /* TODO... */ - mpfr_clears (zo4, u, (mpfr_ptr) 0); - } - else - { - int inex2; - - if (zz != z) - mpfr_clear (zo4); - MPFR_GROUP_CLEAR (group); - MPFR_ASSERTN (! MPFR_OVERFLOW (flags)); - inex2 = mpfr_mul_2ui (s, s, 2, rnd_mode); - if (inex2) /* overflow */ - { - inexact = inex2; - MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); - } - goto end; - } - } } - else /* underflow: one has |xy| < 2^(emin-1). */ + else /* underflow: one has |x*y| < 2^(emin-1). */ { - unsigned long scale = 0; - mpfr_t scaled_z; - mpfr_srcptr new_z; - mpfr_exp_t diffexp; - mpfr_prec_t pzs; - int xy_underflows; - MPFR_LOG_MSG (("Underflow on x*y\n", 0)); - /* Let's scale z so that ulp(z) > 2^emin and ulp(s) > 2^emin - (the + 1 on MPFR_PREC (s) is necessary because the exponent - of the result can be EXP(z) - 1). */ - diffexp = MPFR_GET_EXP (z) - __gmpfr_emin; - pzs = MAX (MPFR_PREC (z), MPFR_PREC (s) + 1); - MPFR_LOG_MSG (("diffexp=%" MPFR_EXP_FSPEC "d pzs=%Pd\n", - diffexp, pzs)); - if (diffexp <= pzs) - { - mpfr_uexp_t uscale; - mpfr_t scaled_v; - MPFR_BLOCK_DECL (flags); - - uscale = (mpfr_uexp_t) pzs - diffexp + 1; - MPFR_ASSERTN (uscale > 0); - MPFR_ASSERTN (uscale <= ULONG_MAX); - scale = uscale; - mpfr_init2 (scaled_z, MPFR_PREC (z)); - inexact = mpfr_mul_2ui (scaled_z, z, scale, MPFR_RNDN); - MPFR_ASSERTN (inexact == 0); /* TODO: overflow case */ - new_z = scaled_z; - /* Now we need to recompute u = xy * 2^scale. */ - MPFR_BLOCK (flags, - if (MPFR_GET_EXP (x) < MPFR_GET_EXP (y)) - { - mpfr_init2 (scaled_v, precx); - mpfr_mul_2ui (scaled_v, x, scale, MPFR_RNDN); - mpfr_mul (u, scaled_v, y, MPFR_RNDN); - } - else - { - mpfr_init2 (scaled_v, precy); - mpfr_mul_2ui (scaled_v, y, scale, MPFR_RNDN); - mpfr_mul (u, x, scaled_v, MPFR_RNDN); - }); - mpfr_clear (scaled_v); - MPFR_ASSERTN (! MPFR_OVERFLOW (flags)); - xy_underflows = MPFR_UNDERFLOW (flags); - } - else - { - new_z = z; - xy_underflows = 1; - } - - MPFR_LOG_MSG (("scale=%lu xy_underflows=%d\n", - scale, xy_underflows)); - - if (xy_underflows) + /* Easy cases: when 2^(emin-1) <= 1/2 * min(ulp(z),ulp(s)), + one can replace x*y by sign(x*y) * 2^(emin-1). Note that + this is even true in case of equality for MPFR_RNDN thanks + to the even-rounding rule. + The + 1 on MPFR_PREC (s) is necessary because the exponent + of the result can be EXP(z) - 1. */ + if (MPFR_GET_EXP (z) - __gmpfr_emin >= + MAX (MPFR_PREC (z), MPFR_PREC (s) + 1)) { - /* Let's replace xy by sign(xy) * 2^(emin-1). */ MPFR_PREC (u) = MPFR_PREC_MIN; mpfr_setmin (u, __gmpfr_emin); MPFR_SET_SIGN (u, MPFR_MULT_SIGN (MPFR_SIGN (x), MPFR_SIGN (y))); + mpfr_clear_flags (); + goto add; } - { - MPFR_BLOCK_DECL (flags); - - MPFR_BLOCK (flags, inexact = mpfr_add (s, u, new_z, rnd_mode)); - MPFR_LOG_MSG (("inexact=%d\n", inexact)); - MPFR_GROUP_CLEAR (group); - if (scale != 0) - { - int inex2; - - mpfr_clear (scaled_z); - /* Here an overflow is theoretically possible, in which case - the result may be wrong, hence the assert. An underflow - is not possible, but let's check that anyway. */ - MPFR_ASSERTN (! MPFR_OVERFLOW (flags)); /* TODO... */ - MPFR_ASSERTN (! MPFR_UNDERFLOW (flags)); /* not possible */ - if (rnd_mode == MPFR_RNDN && - MPFR_GET_EXP (s) == __gmpfr_emin - 1 + scale && - mpfr_powerof2_raw (s)) - { - MPFR_LOG_MSG (("Double rounding\n", 0)); - rnd_mode = (MPFR_IS_NEG (s) ? inexact <= 0 : inexact >= 0) - ? MPFR_RNDZ : MPFR_RNDA; - } - inex2 = mpfr_div_2ui (s, s, scale, rnd_mode); - MPFR_LOG_MSG (("inex2=%d\n", inex2)); - if (inex2) /* underflow */ - inexact = inex2; - } - } - - /* FIXME/TODO: I'm not sure that the following is correct. - Check for possible spurious exceptions due to intermediate - computations. */ - MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); - goto end; + MPFR_GROUP_CLEAR (group); /* we no longer need u */ } + + /* Let's use UBF to resolve the overflow/underflow issues. */ + { + mpfr_ubf_t uu; + mp_size_t un; + mpfr_limb_ptr up; + MPFR_TMP_DECL(marker); + + MPFR_LOG_MSG (("Use UBF\n", 0)); + + MPFR_TMP_MARK (marker); + un = MPFR_LIMB_SIZE (x) + MPFR_LIMB_SIZE (y); + MPFR_TMP_INIT (up, uu, (mpfr_prec_t) un * GMP_NUMB_BITS, un); + mpfr_ubf_mul_exact (uu, x, y); + mpfr_clear_flags (); + inexact = mpfr_add (s, (mpfr_srcptr) uu, z, rnd_mode); + MPFR_UBF_CLEAR_EXP (uu); + MPFR_TMP_FREE (marker); + } + } + else + { + add: + inexact = mpfr_add (s, u, z, rnd_mode); + MPFR_GROUP_CLEAR (group); } - inexact = mpfr_add (s, u, z, rnd_mode); - MPFR_GROUP_CLEAR (group); MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); - end: MPFR_SAVE_EXPO_FREE (expo); return mpfr_check_range (s, inexact, rnd_mode); } diff -Nru mpfr4-4.0.1/src/fmma.c mpfr4-4.0.2/src/fmma.c --- mpfr4-4.0.1/src/fmma.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fmma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fmma, mpfr_fmms -- Compute a*b +/- c*d -Copyright 2014-2018 Free Software Foundation, Inc. +Copyright 2014-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/fms.c mpfr4-4.0.2/src/fms.c --- mpfr4-4.0.1/src/fms.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fms.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_fms -- Floating multiply-subtract -Copyright 2001-2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/fpif.c mpfr4-4.0.2/src/fpif.c --- mpfr4-4.0.1/src/fpif.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/fpif.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_fpif -- Binary export & import of MPFR numbers (floating-point interchange format) -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by Olivier Demengeon. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" @@ -522,7 +522,7 @@ /* External Function */ /* - * fh : IN : file hander + * fh : IN : file handler * x : IN : MPFR number to put in the file * return 0 if successful */ @@ -587,7 +587,7 @@ /* * x : IN/OUT : MPFR number extracted from the file, its precision is reset to * be able to hold the number - * fh : IN : file hander + * fh : IN : file handler * Return 0 if the import was successful. */ int diff -Nru mpfr4-4.0.1/src/frac.c mpfr4-4.0.2/src/frac.c --- mpfr4-4.0.1/src/frac.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/frac.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_frac -- Fractional part of a floating-point number. -Copyright 2002-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2002-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/free_cache.c mpfr4-4.0.2/src/free_cache.c --- mpfr4-4.0.1/src/free_cache.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/free_cache.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_free_cache... - Free cache/pool memory used by MPFR. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" @@ -63,13 +63,13 @@ if ((unsigned int) way & MPFR_FREE_LOCAL_CACHE) { mpfr_free_local_cache (); -#if !defined (WANT_SHARED_CACHE) +#if !defined(MPFR_WANT_SHARED_CACHE) mpfr_free_const_caches (); #endif } if ((unsigned int) way & MPFR_FREE_GLOBAL_CACHE) { -#if defined (WANT_SHARED_CACHE) +#if defined(MPFR_WANT_SHARED_CACHE) mpfr_free_const_caches (); #endif } diff -Nru mpfr4-4.0.1/src/frexp.c mpfr4-4.0.2/src/frexp.c --- mpfr4-4.0.1/src/frexp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/frexp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_frexp -- convert to integral and fractional parts -Copyright 2011-2018 Free Software Foundation, Inc. +Copyright 2011-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/gamma.c mpfr4-4.0.2/src/gamma.c --- mpfr4-4.0.1/src/gamma.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/gamma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_gamma -- gamma function -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/gamma_inc.c mpfr4-4.0.2/src/gamma_inc.c --- mpfr4-4.0.1/src/gamma_inc.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/gamma_inc.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_gamma_inc -- incomplete gamma function -Copyright 2016-2018 Free Software Foundation, Inc. +Copyright 2016-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/gammaonethird.c mpfr4-4.0.2/src/gammaonethird.c --- mpfr4-4.0.1/src/gammaonethird.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/gammaonethird.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Functions for evaluating Gamma(1/3) and Gamma(2/3). Used by mpfr_ai. -Copyright 2010-2018 Free Software Foundation, Inc. +Copyright 2010-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/generic/coverage/mparam.h mpfr4-4.0.2/src/generic/coverage/mparam.h --- mpfr4-4.0.1/src/generic/coverage/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/generic/coverage/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* mparam tuned for coverage test */ @@ -89,7 +89,7 @@ 784,784,784,784,783,784,784,784,784,784,784,784,784,784,784,784, \ 784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,783, \ 736,784,784,784,784,784,783,784,784,831,784,832,832,832,832,832 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,0,-1,-1,-1,-1,-1,7,7,7,8,9,10,11, \ 11,11,11,11,12,13,13,15,15,15,15,15,17,17,19,19, \ @@ -155,7 +155,7 @@ 696,696,695,696,696,696,696,696,695,695,696,695,696,695,696,695, \ 696,695,696,695,696,695,696,695,696,696,696,696,696,695,696,696, \ 695,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696 \ - + #define MPFR_DIVHIGH_TAB \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /*0-15*/ \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /*16-31*/ \ diff -Nru mpfr4-4.0.1/src/generic/mparam.h mpfr4-4.0.2/src/generic/mparam.h --- mpfr4-4.0.1/src/generic/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/generic/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef MPFR_MULHIGH_TAB diff -Nru mpfr4-4.0.1/src/gen_inverse.h mpfr4-4.0.2/src/gen_inverse.h --- mpfr4-4.0.1/src/gen_inverse.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/gen_inverse.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* generic inverse of a function. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/get_d64.c mpfr4-4.0.2/src/get_d64.c --- mpfr4-4.0.1/src/get_d64.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_d64.c 2019-01-07 13:53:20.000000000 +0000 @@ -5,7 +5,7 @@ https://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html, and TR 24732 . -Copyright 2006-2018 Free Software Foundation, Inc. +Copyright 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -22,7 +22,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/get_d.c mpfr4-4.0.2/src/get_d.c --- mpfr4-4.0.1/src/get_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_get_d, mpfr_get_d_2exp -- convert a multiple precision floating-point number to a machine double precision float -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/src/get_exp.c mpfr4-4.0.2/src/get_exp.c --- mpfr4-4.0.1/src/get_exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_get_exp - get the exponent of a floating-point number -Copyright 2002-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2002-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/get_f.c mpfr4-4.0.2/src/get_f.c --- mpfr4-4.0.1/src/get_f.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_f.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_get_f -- convert a MPFR number to a GNU MPF number -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_MPF_INTERNALS diff -Nru mpfr4-4.0.1/src/get_float128.c mpfr4-4.0.2/src/get_float128.c --- mpfr4-4.0.1/src/get_float128.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_float128.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_get_float128 -- convert a multiple precision floating-point number to a __float128 number -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/get_flt.c mpfr4-4.0.2/src/get_flt.c --- mpfr4-4.0.1/src/get_flt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_flt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_get_flt -- convert a mpfr_t to a machine single precision float -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* for FLT_MIN */ @@ -120,7 +120,7 @@ if (negative) dd = -dd; - /* convert (exacly) to float */ + /* convert (exactly) to float */ d = (float) dd; } diff -Nru mpfr4-4.0.1/src/get_ld.c mpfr4-4.0.2/src/get_ld.c --- mpfr4-4.0.1/src/get_ld.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_ld.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_get_ld, mpfr_get_ld_2exp -- convert a multiple precision floating-point number to a machine long double -Copyright 2002-2018 Free Software Foundation, Inc. +Copyright 2002-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* needed so that MPFR_LDBL_MANT_DIG is correctly defined */ diff -Nru mpfr4-4.0.1/src/get_patches.c mpfr4-4.0.2/src/get_patches.c --- mpfr4-4.0.1/src/get_patches.c 2018-02-07 12:58:03.000000000 +0000 +++ mpfr4-4.0.2/src/get_patches.c 2019-01-31 20:43:30.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_get_patches -- Patches that have been applied -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/get_q.c mpfr4-4.0.2/src/get_q.c --- mpfr4-4.0.1/src/get_q.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_q.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_get_q -- get a multiple-precision rational from a floating-point number -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/get_si.c mpfr4-4.0.2/src/get_si.c --- mpfr4-4.0.1/src/get_si.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_si.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_get_si -- convert a floating-point number to a signed long. -Copyright 2003-2018 Free Software Foundation, Inc. +Copyright 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/get_sj.c mpfr4-4.0.2/src/get_sj.c --- mpfr4-4.0.1/src/get_sj.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_sj.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_get_sj -- convert a MPFR number to a huge machine signed integer -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H @@ -90,7 +90,7 @@ (even though xp[n] == 0 in such a case). This can happen if sizeof(mp_limb_t) < sizeof(intmax_t) and |x| is small enough because of the trailing bits due to its normalization. */ - for (n = MPFR_LIMB_SIZE (x) - 1; n >= 0 && sh >= 0; n--) + for (n = MPFR_LIMB_SIZE (x) - 1; n >= 0 && sh > 0; n--) { sh -= GMP_NUMB_BITS; /* Note the concerning the casts below: @@ -100,7 +100,7 @@ for the case sizeof(intmax_t) == sizeof(mp_limb_t), as mp_limb_t is unsigned, therefore not representable as an intmax_t when the MSB is 1 (this is the case here). */ - MPFR_ASSERTD (sh < GMP_NUMB_BITS && -sh < GMP_NUMB_BITS); + MPFR_ASSERTD (-sh < GMP_NUMB_BITS); r += (sh >= 0 ? (intmax_t) xp[n] << sh : (intmax_t) (xp[n] >> (-sh))); @@ -109,10 +109,10 @@ else { /* See the comments for the case x positive. */ - for (n = MPFR_LIMB_SIZE (x) - 1; n >= 0 && sh >= 0; n--) + for (n = MPFR_LIMB_SIZE (x) - 1; n >= 0 && sh > 0; n--) { sh -= GMP_NUMB_BITS; - MPFR_ASSERTD (sh < GMP_NUMB_BITS && -sh < GMP_NUMB_BITS); + MPFR_ASSERTD (-sh < GMP_NUMB_BITS); r -= (sh >= 0 ? (intmax_t) xp[n] << sh : (intmax_t) (xp[n] >> (-sh))); diff -Nru mpfr4-4.0.1/src/get_str.c mpfr4-4.0.2/src/get_str.c --- mpfr4-4.0.1/src/get_str.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_str.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_get_str -- output a floating-point number to a string -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -2233,6 +2233,7 @@ exponent in e. x is rounded with direction rnd, m is the number of digits of the mantissa, |b| is the given base (2 <= b <= 62 or -36 <= b <= -2). + This follows GMP's mpf_get_str specification. Return value: if s=NULL, allocates a string to store the mantissa, with @@ -2325,15 +2326,12 @@ */ m = 1 + mpfr_ceil_mul (IS_POW2(b) ? MPFR_PREC(x) - 1 : MPFR_PREC(x), b, 1); - if (m < 2) - m = 2; } MPFR_LOG_MSG (("m=%zu\n", m)); - /* The code below for non-power-of-two bases works for m=1; - this is important for the internal use of mpfr_get_str. */ - MPFR_ASSERTN (m >= 2 || (!IS_POW2(b) && m >= 1)); + /* The code below works for m=1, both for power-of-two and non-power-of-two + bases; this is important for the internal use of mpfr_get_str. */ /* x is a floating-point number */ @@ -2376,6 +2374,8 @@ /* the first digit will contain only r bits */ prec = (m - 1) * pow2 + r; /* total number of bits */ + /* if m=1 then 1 <= prec <= pow2, and since prec=1 is now valid in MPFR, + the power-of-two code also works for m=1 */ n = MPFR_PREC2LIMBS (prec); MPFR_TMP_MARK (marker); diff -Nru mpfr4-4.0.1/src/get_ui.c mpfr4-4.0.2/src/get_ui.c --- mpfr4-4.0.1/src/get_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_get_ui -- convert a floating-point number to an unsigned long. -Copyright 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/get_uj.c mpfr4-4.0.2/src/get_uj.c --- mpfr4-4.0.1/src/get_uj.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_uj.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_get_uj -- convert a MPFR number to a huge machine unsigned integer -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff -Nru mpfr4-4.0.1/src/get_z.c mpfr4-4.0.2/src/get_z.c --- mpfr4-4.0.1/src/get_z.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_z.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_get_z -- get a multiple-precision integer from a floating-point number -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/get_z_exp.c mpfr4-4.0.2/src/get_z_exp.c --- mpfr4-4.0.1/src/get_z_exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/get_z_exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_get_z_2exp -- get a multiple-precision integer and an exponent from a floating-point number -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/gmp_op.c mpfr4-4.0.2/src/gmp_op.c --- mpfr4-4.0.1/src/gmp_op.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/gmp_op.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Implementations of operations between mpfr and mpz/mpq data -Copyright 2001, 2003-2018 Free Software Foundation, Inc. +Copyright 2001, 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -452,11 +452,15 @@ mpfr_prec_t p; MPFR_SAVE_EXPO_DECL (expo); - if (MPFR_UNLIKELY (mpq_denref (q) == 0)) + if (MPFR_UNLIKELY (mpz_sgn (mpq_denref (q)) == 0)) { /* q is an infinity or NaN */ - mpfr_init2 (t, 2); + mpfr_flags_t old_flags; + + mpfr_init2 (t, MPFR_PREC_MIN); + old_flags = __gmpfr_flags; mpfr_set_q (t, q, MPFR_RNDN); + __gmpfr_flags = old_flags; res = mpfr_cmp (x, t); mpfr_clear (t); return res; diff -Nru mpfr4-4.0.1/src/grandom.c mpfr4-4.0.2/src/grandom.c --- mpfr4-4.0.1/src/grandom.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/grandom.c 2019-01-07 13:53:20.000000000 +0000 @@ -3,7 +3,7 @@ distribution and round it to the precision of rop1, rop2 according to the given rounding mode. -Copyright 2011-2018 Free Software Foundation, Inc. +Copyright 2011-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -20,7 +20,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/hppa/mparam.h mpfr4-4.0.2/src/hppa/mparam.h --- mpfr4-4.0.1/src/hppa/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/hppa/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2011-07-31, gcc 4.3.2 */ @@ -88,7 +88,7 @@ 832,832,832,832,832,832,832,831,832,831,832,831,832,831,832,831, \ 832,831,832,832,832,831,832,831,832,831,832,831,832,831,832,831, \ 832,832,832,831,832,832,832,832,832,831,832,832,832,832,832,832 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,0,0,0,0,0,0,0,0,7,0,8,9,9, \ 10,10,11,11,12,13,14,13,14,15,16,15,16,17,18,17, \ @@ -154,7 +154,7 @@ 592,591,592,591,592,615,616,519,520,615,520,519,520,615,616,615, \ 616,615,528,615,616,615,528,527,528,615,528,623,624,623,536,552, \ 552,551,552,551,552,551,552,551,552,551,552,551,552,551,552,551 \ - + #define MPFR_DIVHIGH_TAB \ 0,1,2,3,4,5,6,7,6,7,10,11,10,11,12,13, \ 10,11,11,11,12,12,14,15,14,14,16,16,16,16,18,17, \ @@ -220,7 +220,7 @@ 512,508,512,508,512,512,512,512,512,512,512,512,512,512,512,512, \ 512,512,512,512,512,512,512,512,512,564,562,564,560,512,564,564, \ 562,564,560,564,564,564,560,564,564,564,564,564,564,564,564,562 \ - + #define MPFR_MUL_THRESHOLD 6 /* limbs */ #define MPFR_SQR_THRESHOLD 8 /* limbs */ #define MPFR_DIV_THRESHOLD 23 /* limbs */ diff -Nru mpfr4-4.0.1/src/hypot.c mpfr4-4.0.2/src/hypot.c --- mpfr4-4.0.1/src/hypot.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/hypot.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_hypot -- Euclidean distance -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/ia64/mparam.h mpfr4-4.0.2/src/ia64/mparam.h --- mpfr4-4.0.1/src/ia64/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/ia64/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2011-07-31, gcc 4.4.5 */ @@ -88,7 +88,7 @@ 784,784,784,784,784,783,784,831,784,784,784,784,784,784,784,831, \ 832,784,832,831,784,831,832,831,832,784,784,831,832,783,784,831, \ 832,784,832,831,832,784,856,856,856,856,856,856,856,856,856,856 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,0,0,0,-1,-1,-1,6,-1,8,8,8,10,10, \ 10,12,11,11,12,12,14,14,14,14,16,15,16,16,18,19, \ @@ -154,7 +154,7 @@ 616,616,600,600,616,616,600,600,600,616,600,599,600,600,600,599, \ 600,616,616,599,616,616,616,599,616,616,616,599,616,616,600,599, \ 616,616,600,616,616,616,632,648,664,648,616,648,600,600,632,664 \ - + #define MPFR_DIVHIGH_TAB \ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,13, \ 16,17,18,19,18,21,22,23,22,25,17,17,20,23,25,22, \ @@ -220,7 +220,7 @@ 560,528,576,512,528,513,512,528,528,576,576,496,528,576,576,511, \ 512,504,576,576,560,512,576,504,576,576,576,576,564,576,564,576, \ 576,562,576,576,576,576,576,560,576,576,564,528,532,576,576,576 \ - + #define MPFR_MUL_THRESHOLD 26 /* limbs */ #define MPFR_SQR_THRESHOLD 19 /* limbs */ #define MPFR_DIV_THRESHOLD 44 /* limbs */ diff -Nru mpfr4-4.0.1/src/ieee_floats.h mpfr4-4.0.2/src/ieee_floats.h --- mpfr4-4.0.1/src/ieee_floats.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/ieee_floats.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* auxiliary data to generate special IEEE floats (NaN, +Inf, -Inf) -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* "double" NaN and infinities are written as explicit bytes to be sure of diff -Nru mpfr4-4.0.1/src/init2.c mpfr4-4.0.2/src/init2.c --- mpfr4-4.0.1/src/init2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/init2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_init2 -- initialize a floating-point number with given precision -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/init.c mpfr4-4.0.2/src/init.c --- mpfr4-4.0.1/src/init.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/init.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_init -- initialize a floating-point number -Copyright 1999, 2001-2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/inits2.c mpfr4-4.0.2/src/inits2.c --- mpfr4-4.0.1/src/inits2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/inits2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_inits2 -- initialize several floating-point numbers with given precision -Copyright 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff -Nru mpfr4-4.0.1/src/inits.c mpfr4-4.0.2/src/inits.c --- mpfr4-4.0.1/src/inits.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/inits.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_inits -- initialize several floating-point numbers -Copyright 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff -Nru mpfr4-4.0.1/src/inp_str.c mpfr4-4.0.2/src/inp_str.c --- mpfr4-4.0.1/src/inp_str.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/inp_str.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_inp_str -- input a number in base BASE from stdio stream STREAM and store the result in ROP -Copyright 1999, 2001-2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include @@ -37,9 +37,6 @@ int retval; size_t nread; - if (stream == NULL) - stream = stdin; - alloc_size = 100; str = (unsigned char *) mpfr_allocate_func (alloc_size); str_size = 0; diff -Nru mpfr4-4.0.1/src/int_ceil_log2.c mpfr4-4.0.2/src/int_ceil_log2.c --- mpfr4-4.0.1/src/int_ceil_log2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/int_ceil_log2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* __gmpfr_int_ceil_log2 -- Integer ceil of log2(x) -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H /* for count_leading_zeros */ diff -Nru mpfr4-4.0.1/src/invert_limb.h mpfr4-4.0.2/src/invert_limb.h --- mpfr4-4.0.1/src/invert_limb.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/invert_limb.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* __gmpfr_invert_limb -- implement GMP's invert_limb (which is not in GMP API) -Copyright 2016-2018 Free Software Foundation, Inc. +Copyright 2016-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -123,7 +123,7 @@ _e = - _v2 * _d63 + ((_v2 & -_d0) >> 1); \ umul_hi (_h, _v2, _e); \ _v3 = (_v2 << 31) + (_h >> 1); \ - umul_ppmm (_h, _l, _v3, d); \ + umul_ppmm (_h, _l, _v3, _d); \ /* v3 is too small iff (h+d)*2^64+l+d < 2^128 */ \ add_ssaaaa(_h, _l, _h, _l, _d, _d); \ MPFR_ASSERTD(_h == MPFR_LIMB_ZERO || -_h == MPFR_LIMB_ONE); \ @@ -223,7 +223,7 @@ _e = - _v1 * _d31 + ((_v1 & - _d0) >> 1); \ umul_ppmm (_h, _l, _v1, _e); \ _v2 = (_v1 << 15) + (_h >> 1); \ - umul_ppmm (_h, _l, _v2, d); \ + umul_ppmm (_h, _l, _v2, _d); \ /* v2 is too small iff (h+d)*2^32+l+d < 2^64 */ \ add_ssaaaa(_h, _l, _h, _l, _d, _d); \ MPFR_ASSERTD(_h == MPFR_LIMB_ZERO || -_h == MPFR_LIMB_ONE); \ diff -Nru mpfr4-4.0.1/src/invsqrt_limb.h mpfr4-4.0.2/src/invsqrt_limb.h --- mpfr4-4.0.1/src/invsqrt_limb.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/invsqrt_limb.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* __gmpfr_invsqrt_limb_approx -- reciprocal approximate square root of a limb -Copyright 2017-2018 Free Software Foundation, Inc. +Copyright 2017-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/isinf.c mpfr4-4.0.2/src/isinf.c --- mpfr4-4.0.1/src/isinf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/isinf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_inf_p -- check for infinities -Copyright 2000-2001, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2001, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/isinteger.c mpfr4-4.0.2/src/isinteger.c --- mpfr4-4.0.1/src/isinteger.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/isinteger.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_integer_p -- test if a mpfr variable is integer. -Copyright 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/isnan.c mpfr4-4.0.2/src/isnan.c --- mpfr4-4.0.1/src/isnan.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/isnan.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_nan_p -- check for NaN -Copyright 2000-2001, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2001, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/isnum.c mpfr4-4.0.2/src/isnum.c --- mpfr4-4.0.1/src/isnum.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/isnum.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_number_p -- check for ordinary numbers -Copyright 2000-2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/isqrt.c mpfr4-4.0.2/src/isqrt.c --- mpfr4-4.0.1/src/isqrt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/isqrt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* __gmpfr_isqrt && __gmpfr_cuberoot -- Integer square root and cube root -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/isregular.c mpfr4-4.0.2/src/isregular.c --- mpfr4-4.0.1/src/isregular.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/isregular.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_regular_p -- check for regular number (neither NaN, Inf or zero) -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/iszero.c mpfr4-4.0.2/src/iszero.c --- mpfr4-4.0.1/src/iszero.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/iszero.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_zero_p -- check for zero -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/jn.c mpfr4-4.0.2/src/jn.c --- mpfr4-4.0.1/src/jn.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/jn.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_j0, mpfr_j1, mpfr_jn -- Bessel functions of 1st kind, integer order. http://www.opengroup.org/onlinepubs/009695399/functions/j0.html -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/jyn_asympt.c mpfr4-4.0.2/src/jyn_asympt.c --- mpfr4-4.0.1/src/jyn_asympt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/jyn_asympt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_jn_asympt, mpfr_yn_asympt -- shared code for mpfr_jn and mpfr_yn -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef MPFR_JN diff -Nru mpfr4-4.0.1/src/li2.c mpfr4-4.0.2/src/li2.c --- mpfr4-4.0.1/src/li2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/li2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_li2 -- Dilogarithm. -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -40,8 +40,8 @@ MPFR_ZIV_DECL (loop); /* The series converges for |z| < 2 pi, but in mpfr_li2 the argument is - reduced so that 0 < z <= log(2). Here is additionnal check that z is - (nearly) correct */ + reduced so that 0 < z <= log(2). Here is an additional check that z + is (nearly) correct. */ MPFR_ASSERTD (MPFR_IS_STRICTPOS (z)); MPFR_ASSERTD (mpfr_cmp_ui_2exp (z, 89, -7) <= 0); /* z <= 0.6953125 */ diff -Nru mpfr4-4.0.1/src/lngamma.c mpfr4-4.0.2/src/lngamma.c --- mpfr4-4.0.1/src/lngamma.c 2018-01-10 16:58:10.000000000 +0000 +++ mpfr4-4.0.2/src/lngamma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_lngamma -- lngamma function -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/log10.c mpfr4-4.0.2/src/log10.c --- mpfr4-4.0.1/src/log10.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/log10.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_log10 -- logarithm in base 10. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/log1p.c mpfr4-4.0.2/src/log1p.c --- mpfr4-4.0.1/src/log1p.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/log1p.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_log1p -- Compute log(1+x) -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/log2.c mpfr4-4.0.2/src/log2.c --- mpfr4-4.0.1/src/log2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/log2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_log2 -- log base 2 -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/log.c mpfr4-4.0.2/src/log.c --- mpfr4-4.0.1/src/log.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/log.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_log -- natural logarithm of a floating-point number -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/logging.c mpfr4-4.0.2/src/logging.c --- mpfr4-4.0.1/src/logging.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/logging.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* MPFR Logging functions. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/log_ui.c mpfr4-4.0.2/src/log_ui.c --- mpfr4-4.0.1/src/log_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/log_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_log_ui -- compute natural logarithm of an unsigned long -Copyright 2014-2018 Free Software Foundation, Inc. +Copyright 2014-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/Makefile.am mpfr4-4.0.2/src/Makefile.am --- mpfr4-4.0.1/src/Makefile.am 2018-01-25 14:46:21.000000000 +0000 +++ mpfr4-4.0.2/src/Makefile.am 2019-01-31 15:59:16.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright 2000-2018 Free Software Foundation, Inc. +# Copyright 2000-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -81,7 +81,7 @@ # 3.0.x 4:x:0 # 3.1.x 5:x:1 # 4.0.x 6:x:0 -libmpfr_la_LDFLAGS = $(MPFR_LDFLAGS) $(LIBMPFR_LDFLAGS) -version-info 6:1:0 +libmpfr_la_LDFLAGS = $(MPFR_LDFLAGS) $(LIBMPFR_LDFLAGS) -version-info 6:2:0 # Important note: If for some reason, srcdir is read-only at build time # (and you use objdir != srcdir), then you need to rebuild get_patches.c @@ -134,12 +134,12 @@ # For instance, with r11968, and # ./configure --with-gmp-build=... CC=tcc # the symbol __gmpn_clz_tab is defined, which is wrong. -# Note: the "grep -v '@plt$$'" below is for tcc. +# Note: the "$(GREP) -v '@plt$$'" below is for tcc. check-exported-symbols: $(LTLIBRARIES) if [ -f "$(LIBMPFRSO)" ]; then \ gsymbols=`$(NM) -gP "$(LIBMPFRSO)" | perl -ne \ '/^(__gmp[a-z]?_[_0-9A-Za-z]*) +[A-TV-Z]/ and print " $$1"' | \ - grep -v '@plt$$'`; \ + { $(GREP) -v '@plt$$' || true ; }`; \ if [ -n "$$gsymbols" ]; then \ echo "MPFR defines symbols with a GMP reserved prefix:$$gsymbols"; \ exit 1; \ diff -Nru mpfr4-4.0.1/src/Makefile.in mpfr4-4.0.2/src/Makefile.in --- mpfr4-4.0.1/src/Makefile.in 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/src/Makefile.in 2019-01-31 20:43:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright 2000-2018 Free Software Foundation, Inc. +# Copyright 2000-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -207,7 +207,120 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/abort_prec_max.Plo \ + ./$(DEPDIR)/acos.Plo ./$(DEPDIR)/acosh.Plo ./$(DEPDIR)/add.Plo \ + ./$(DEPDIR)/add1.Plo ./$(DEPDIR)/add1sp.Plo \ + ./$(DEPDIR)/add_d.Plo ./$(DEPDIR)/add_ui.Plo \ + ./$(DEPDIR)/agm.Plo ./$(DEPDIR)/ai.Plo ./$(DEPDIR)/asin.Plo \ + ./$(DEPDIR)/asinh.Plo ./$(DEPDIR)/atan.Plo \ + ./$(DEPDIR)/atan2.Plo ./$(DEPDIR)/atanh.Plo \ + ./$(DEPDIR)/bernoulli.Plo ./$(DEPDIR)/beta.Plo \ + ./$(DEPDIR)/buildopt.Plo ./$(DEPDIR)/cache.Plo \ + ./$(DEPDIR)/cbrt.Plo ./$(DEPDIR)/check.Plo \ + ./$(DEPDIR)/clear.Plo ./$(DEPDIR)/clears.Plo \ + ./$(DEPDIR)/cmp.Plo ./$(DEPDIR)/cmp2.Plo \ + ./$(DEPDIR)/cmp_abs.Plo ./$(DEPDIR)/cmp_d.Plo \ + ./$(DEPDIR)/cmp_ld.Plo ./$(DEPDIR)/cmp_si.Plo \ + ./$(DEPDIR)/cmp_ui.Plo ./$(DEPDIR)/comparisons.Plo \ + ./$(DEPDIR)/const_catalan.Plo ./$(DEPDIR)/const_euler.Plo \ + ./$(DEPDIR)/const_log2.Plo ./$(DEPDIR)/const_pi.Plo \ + ./$(DEPDIR)/constant.Plo ./$(DEPDIR)/copysign.Plo \ + ./$(DEPDIR)/cos.Plo ./$(DEPDIR)/cosh.Plo ./$(DEPDIR)/cot.Plo \ + ./$(DEPDIR)/coth.Plo ./$(DEPDIR)/csc.Plo ./$(DEPDIR)/csch.Plo \ + ./$(DEPDIR)/d_div.Plo ./$(DEPDIR)/d_sub.Plo \ + ./$(DEPDIR)/digamma.Plo ./$(DEPDIR)/dim.Plo \ + ./$(DEPDIR)/div.Plo ./$(DEPDIR)/div_2exp.Plo \ + ./$(DEPDIR)/div_2si.Plo ./$(DEPDIR)/div_2ui.Plo \ + ./$(DEPDIR)/div_d.Plo ./$(DEPDIR)/div_ui.Plo \ + ./$(DEPDIR)/dump.Plo ./$(DEPDIR)/eint.Plo ./$(DEPDIR)/eq.Plo \ + ./$(DEPDIR)/erandom.Plo ./$(DEPDIR)/erf.Plo \ + ./$(DEPDIR)/erfc.Plo ./$(DEPDIR)/exceptions.Plo \ + ./$(DEPDIR)/exp.Plo ./$(DEPDIR)/exp10.Plo ./$(DEPDIR)/exp2.Plo \ + ./$(DEPDIR)/exp3.Plo ./$(DEPDIR)/exp_2.Plo \ + ./$(DEPDIR)/expm1.Plo ./$(DEPDIR)/extract.Plo \ + ./$(DEPDIR)/factorial.Plo ./$(DEPDIR)/fits_intmax.Plo \ + ./$(DEPDIR)/fits_sint.Plo ./$(DEPDIR)/fits_slong.Plo \ + ./$(DEPDIR)/fits_sshort.Plo ./$(DEPDIR)/fits_uint.Plo \ + ./$(DEPDIR)/fits_uintmax.Plo ./$(DEPDIR)/fits_ulong.Plo \ + ./$(DEPDIR)/fits_ushort.Plo ./$(DEPDIR)/fma.Plo \ + ./$(DEPDIR)/fmma.Plo ./$(DEPDIR)/fms.Plo ./$(DEPDIR)/fpif.Plo \ + ./$(DEPDIR)/frac.Plo ./$(DEPDIR)/free_cache.Plo \ + ./$(DEPDIR)/frexp.Plo ./$(DEPDIR)/gamma.Plo \ + ./$(DEPDIR)/gamma_inc.Plo ./$(DEPDIR)/gammaonethird.Plo \ + ./$(DEPDIR)/get_d.Plo ./$(DEPDIR)/get_d64.Plo \ + ./$(DEPDIR)/get_exp.Plo ./$(DEPDIR)/get_f.Plo \ + ./$(DEPDIR)/get_float128.Plo ./$(DEPDIR)/get_flt.Plo \ + ./$(DEPDIR)/get_ld.Plo ./$(DEPDIR)/get_patches.Plo \ + ./$(DEPDIR)/get_q.Plo ./$(DEPDIR)/get_si.Plo \ + ./$(DEPDIR)/get_sj.Plo ./$(DEPDIR)/get_str.Plo \ + ./$(DEPDIR)/get_ui.Plo ./$(DEPDIR)/get_uj.Plo \ + ./$(DEPDIR)/get_z.Plo ./$(DEPDIR)/get_z_exp.Plo \ + ./$(DEPDIR)/gmp_op.Plo ./$(DEPDIR)/grandom.Plo \ + ./$(DEPDIR)/hypot.Plo ./$(DEPDIR)/init.Plo \ + ./$(DEPDIR)/init2.Plo ./$(DEPDIR)/inits.Plo \ + ./$(DEPDIR)/inits2.Plo ./$(DEPDIR)/inp_str.Plo \ + ./$(DEPDIR)/int_ceil_log2.Plo ./$(DEPDIR)/isinf.Plo \ + ./$(DEPDIR)/isinteger.Plo ./$(DEPDIR)/isnan.Plo \ + ./$(DEPDIR)/isnum.Plo ./$(DEPDIR)/isqrt.Plo \ + ./$(DEPDIR)/isregular.Plo ./$(DEPDIR)/iszero.Plo \ + ./$(DEPDIR)/jn.Plo ./$(DEPDIR)/li2.Plo ./$(DEPDIR)/lngamma.Plo \ + ./$(DEPDIR)/log.Plo ./$(DEPDIR)/log10.Plo \ + ./$(DEPDIR)/log1p.Plo ./$(DEPDIR)/log2.Plo \ + ./$(DEPDIR)/log_ui.Plo ./$(DEPDIR)/logging.Plo \ + ./$(DEPDIR)/min_prec.Plo ./$(DEPDIR)/minmax.Plo \ + ./$(DEPDIR)/modf.Plo ./$(DEPDIR)/mp_clz_tab.Plo \ + ./$(DEPDIR)/mpfr-gmp.Plo ./$(DEPDIR)/mpfr-mini-gmp.Plo \ + ./$(DEPDIR)/mpn_exp.Plo ./$(DEPDIR)/mul.Plo \ + ./$(DEPDIR)/mul_2exp.Plo ./$(DEPDIR)/mul_2si.Plo \ + ./$(DEPDIR)/mul_2ui.Plo ./$(DEPDIR)/mul_d.Plo \ + ./$(DEPDIR)/mul_ui.Plo ./$(DEPDIR)/mulders.Plo \ + ./$(DEPDIR)/neg.Plo ./$(DEPDIR)/next.Plo \ + ./$(DEPDIR)/nrandom.Plo ./$(DEPDIR)/odd_p.Plo \ + ./$(DEPDIR)/out_str.Plo ./$(DEPDIR)/pool.Plo \ + ./$(DEPDIR)/pow.Plo ./$(DEPDIR)/pow_si.Plo \ + ./$(DEPDIR)/pow_ui.Plo ./$(DEPDIR)/pow_z.Plo \ + ./$(DEPDIR)/powerof2.Plo ./$(DEPDIR)/print_raw.Plo \ + ./$(DEPDIR)/print_rnd_mode.Plo ./$(DEPDIR)/printf.Plo \ + ./$(DEPDIR)/random_deviate.Plo ./$(DEPDIR)/rec_sqrt.Plo \ + ./$(DEPDIR)/reldiff.Plo ./$(DEPDIR)/rem1.Plo \ + ./$(DEPDIR)/rint.Plo ./$(DEPDIR)/rndna.Plo \ + ./$(DEPDIR)/root.Plo ./$(DEPDIR)/round_near_x.Plo \ + ./$(DEPDIR)/round_p.Plo ./$(DEPDIR)/round_prec.Plo \ + ./$(DEPDIR)/scale2.Plo ./$(DEPDIR)/sec.Plo \ + ./$(DEPDIR)/sech.Plo ./$(DEPDIR)/set.Plo ./$(DEPDIR)/set_d.Plo \ + ./$(DEPDIR)/set_d64.Plo ./$(DEPDIR)/set_dfl_prec.Plo \ + ./$(DEPDIR)/set_exp.Plo ./$(DEPDIR)/set_f.Plo \ + ./$(DEPDIR)/set_float128.Plo ./$(DEPDIR)/set_flt.Plo \ + ./$(DEPDIR)/set_inf.Plo ./$(DEPDIR)/set_ld.Plo \ + ./$(DEPDIR)/set_nan.Plo ./$(DEPDIR)/set_prc_raw.Plo \ + ./$(DEPDIR)/set_prec.Plo ./$(DEPDIR)/set_q.Plo \ + ./$(DEPDIR)/set_rnd.Plo ./$(DEPDIR)/set_si.Plo \ + ./$(DEPDIR)/set_si_2exp.Plo ./$(DEPDIR)/set_sj.Plo \ + ./$(DEPDIR)/set_str.Plo ./$(DEPDIR)/set_str_raw.Plo \ + ./$(DEPDIR)/set_ui.Plo ./$(DEPDIR)/set_ui_2exp.Plo \ + ./$(DEPDIR)/set_uj.Plo ./$(DEPDIR)/set_z.Plo \ + ./$(DEPDIR)/set_z_exp.Plo ./$(DEPDIR)/set_zero.Plo \ + ./$(DEPDIR)/setmax.Plo ./$(DEPDIR)/setmin.Plo \ + ./$(DEPDIR)/setsign.Plo ./$(DEPDIR)/sgn.Plo \ + ./$(DEPDIR)/si_op.Plo ./$(DEPDIR)/signbit.Plo \ + ./$(DEPDIR)/sin.Plo ./$(DEPDIR)/sin_cos.Plo \ + ./$(DEPDIR)/sinh.Plo ./$(DEPDIR)/sinh_cosh.Plo \ + ./$(DEPDIR)/sqr.Plo ./$(DEPDIR)/sqrt.Plo \ + ./$(DEPDIR)/sqrt_ui.Plo ./$(DEPDIR)/stack_interface.Plo \ + ./$(DEPDIR)/strtofr.Plo ./$(DEPDIR)/sub.Plo \ + ./$(DEPDIR)/sub1.Plo ./$(DEPDIR)/sub1sp.Plo \ + ./$(DEPDIR)/sub_d.Plo ./$(DEPDIR)/sub_ui.Plo \ + ./$(DEPDIR)/subnormal.Plo ./$(DEPDIR)/sum.Plo \ + ./$(DEPDIR)/swap.Plo ./$(DEPDIR)/tan.Plo ./$(DEPDIR)/tanh.Plo \ + ./$(DEPDIR)/ubf.Plo ./$(DEPDIR)/uceil_exp2.Plo \ + ./$(DEPDIR)/uceil_log2.Plo ./$(DEPDIR)/ufloor_log2.Plo \ + ./$(DEPDIR)/ui_div.Plo ./$(DEPDIR)/ui_pow.Plo \ + ./$(DEPDIR)/ui_pow_ui.Plo ./$(DEPDIR)/ui_sub.Plo \ + ./$(DEPDIR)/urandom.Plo ./$(DEPDIR)/urandomb.Plo \ + ./$(DEPDIR)/vasprintf.Plo ./$(DEPDIR)/version.Plo \ + ./$(DEPDIR)/volatile.Plo ./$(DEPDIR)/yn.Plo \ + ./$(DEPDIR)/zeta.Plo ./$(DEPDIR)/zeta_ui.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -454,7 +567,7 @@ # 3.0.x 4:x:0 # 3.1.x 5:x:1 # 4.0.x 6:x:0 -libmpfr_la_LDFLAGS = $(MPFR_LDFLAGS) $(LIBMPFR_LDFLAGS) -version-info 6:1:0 +libmpfr_la_LDFLAGS = $(MPFR_LDFLAGS) $(LIBMPFR_LDFLAGS) -version-info 6:2:0 # Do not add get_patches.c to CLEANFILES so that this file doesn't # need to be (re)built as long as no patches are applied. Anyway the @@ -494,8 +607,8 @@ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -553,241 +666,247 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abort_prec_max.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acos.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acosh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add1.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add1sp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_d.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ai.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asinh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atan.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atan2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atanh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bernoulli.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/beta.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildopt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cbrt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clear.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clears.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_abs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_d.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_ld.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_si.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comparisons.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/const_catalan.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/const_euler.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/const_log2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/const_pi.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copysign.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cos.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cosh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cot.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csch.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d_div.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d_sub.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digamma.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dim.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div_2exp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div_2si.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div_2ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div_d.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dump.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eq.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erandom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erfc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exceptions.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp10.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp_2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expm1.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/factorial.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_intmax.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_sint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_slong.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_sshort.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_uint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_uintmax.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_ulong.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_ushort.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fma.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmma.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fms.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpif.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frac.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/free_cache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma_inc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gammaonethird.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_d.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_d64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_exp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_f.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_float128.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_flt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_ld.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_patches.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_q.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_si.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_sj.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_str.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_uj.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_z.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_z_exp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmp_op.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grandom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hypot.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inits.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inits2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp_str.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/int_ceil_log2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isinf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isinteger.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnum.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isqrt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isregular.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iszero.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/li2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lngamma.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log10.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log1p.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/min_prec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minmax.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mp_clz_tab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfr-gmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfr-mini-gmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpn_exp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_2exp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_2si.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_2ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_d.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mulders.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/next.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrandom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odd_p.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/out_str.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pool.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_si.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_z.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/powerof2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_raw.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_rnd_mode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random_deviate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rec_sqrt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reldiff.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rem1.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rndna.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/root.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round_near_x.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round_p.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round_prec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scale2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sech.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_d.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_d64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_dfl_prec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_exp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_f.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_float128.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_flt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_inf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ld.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_nan.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_prc_raw.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_prec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_q.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_rnd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_si.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_si_2exp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_sj.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_str.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_str_raw.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ui_2exp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_uj.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_z.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_z_exp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_zero.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmax.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setsign.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/si_op.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sin_cos.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinh_cosh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqrt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqrt_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack_interface.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtofr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub1.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub1sp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub_d.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subnormal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tan.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tanh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ubf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uceil_exp2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uceil_log2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ufloor_log2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_div.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_pow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_pow_ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_sub.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urandom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urandomb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/volatile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zeta.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zeta_ui.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abort_prec_max.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acos.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acosh.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add1.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add1sp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_d.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agm.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ai.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asin.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asinh.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atan.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atan2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atanh.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bernoulli.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/beta.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildopt.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cbrt.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clear.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clears.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_abs.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_d.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_ld.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_si.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comparisons.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/const_catalan.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/const_euler.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/const_log2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/const_pi.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constant.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copysign.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cos.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cosh.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cot.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coth.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csch.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d_div.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d_sub.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digamma.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dim.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div_2exp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div_2si.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div_2ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div_d.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dump.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eint.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eq.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erandom.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erfc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exceptions.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp10.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp3.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp_2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expm1.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/factorial.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_intmax.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_sint.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_slong.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_sshort.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_uint.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_uintmax.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_ulong.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fits_ushort.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fma.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmma.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fms.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpif.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frac.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/free_cache.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma_inc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gammaonethird.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_d.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_d64.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_exp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_f.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_float128.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_flt.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_ld.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_patches.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_q.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_si.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_sj.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_str.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_uj.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_z.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_z_exp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmp_op.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grandom.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hypot.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inits.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inits2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp_str.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/int_ceil_log2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isinf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isinteger.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnum.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isqrt.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isregular.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iszero.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jn.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/li2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lngamma.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log10.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log1p.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/min_prec.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minmax.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mp_clz_tab.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfr-gmp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfr-mini-gmp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpn_exp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_2exp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_2si.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_2ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_d.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mulders.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neg.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/next.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrandom.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odd_p.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/out_str.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pool.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_si.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_z.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/powerof2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_raw.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_rnd_mode.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random_deviate.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rec_sqrt.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reldiff.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rem1.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rint.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rndna.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/root.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round_near_x.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round_p.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round_prec.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scale2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sec.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sech.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_d.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_d64.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_dfl_prec.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_exp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_f.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_float128.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_flt.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_inf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ld.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_nan.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_prc_raw.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_prec.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_q.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_rnd.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_si.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_si_2exp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_sj.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_str.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_str_raw.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ui_2exp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_uj.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_z.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_z_exp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_zero.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmax.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmin.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setsign.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgn.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/si_op.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbit.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sin.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sin_cos.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinh.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinh_cosh.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqr.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqrt.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqrt_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack_interface.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtofr.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub1.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub1sp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub_d.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subnormal.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tan.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tanh.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ubf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uceil_exp2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uceil_log2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ufloor_log2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_div.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_pow.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_pow_ui.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_sub.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urandom.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urandomb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/volatile.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yn.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zeta.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zeta_ui.Plo@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -889,7 +1008,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -966,7 +1088,241 @@ mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/abort_prec_max.Plo + -rm -f ./$(DEPDIR)/acos.Plo + -rm -f ./$(DEPDIR)/acosh.Plo + -rm -f ./$(DEPDIR)/add.Plo + -rm -f ./$(DEPDIR)/add1.Plo + -rm -f ./$(DEPDIR)/add1sp.Plo + -rm -f ./$(DEPDIR)/add_d.Plo + -rm -f ./$(DEPDIR)/add_ui.Plo + -rm -f ./$(DEPDIR)/agm.Plo + -rm -f ./$(DEPDIR)/ai.Plo + -rm -f ./$(DEPDIR)/asin.Plo + -rm -f ./$(DEPDIR)/asinh.Plo + -rm -f ./$(DEPDIR)/atan.Plo + -rm -f ./$(DEPDIR)/atan2.Plo + -rm -f ./$(DEPDIR)/atanh.Plo + -rm -f ./$(DEPDIR)/bernoulli.Plo + -rm -f ./$(DEPDIR)/beta.Plo + -rm -f ./$(DEPDIR)/buildopt.Plo + -rm -f ./$(DEPDIR)/cache.Plo + -rm -f ./$(DEPDIR)/cbrt.Plo + -rm -f ./$(DEPDIR)/check.Plo + -rm -f ./$(DEPDIR)/clear.Plo + -rm -f ./$(DEPDIR)/clears.Plo + -rm -f ./$(DEPDIR)/cmp.Plo + -rm -f ./$(DEPDIR)/cmp2.Plo + -rm -f ./$(DEPDIR)/cmp_abs.Plo + -rm -f ./$(DEPDIR)/cmp_d.Plo + -rm -f ./$(DEPDIR)/cmp_ld.Plo + -rm -f ./$(DEPDIR)/cmp_si.Plo + -rm -f ./$(DEPDIR)/cmp_ui.Plo + -rm -f ./$(DEPDIR)/comparisons.Plo + -rm -f ./$(DEPDIR)/const_catalan.Plo + -rm -f ./$(DEPDIR)/const_euler.Plo + -rm -f ./$(DEPDIR)/const_log2.Plo + -rm -f ./$(DEPDIR)/const_pi.Plo + -rm -f ./$(DEPDIR)/constant.Plo + -rm -f ./$(DEPDIR)/copysign.Plo + -rm -f ./$(DEPDIR)/cos.Plo + -rm -f ./$(DEPDIR)/cosh.Plo + -rm -f ./$(DEPDIR)/cot.Plo + -rm -f ./$(DEPDIR)/coth.Plo + -rm -f ./$(DEPDIR)/csc.Plo + -rm -f ./$(DEPDIR)/csch.Plo + -rm -f ./$(DEPDIR)/d_div.Plo + -rm -f ./$(DEPDIR)/d_sub.Plo + -rm -f ./$(DEPDIR)/digamma.Plo + -rm -f ./$(DEPDIR)/dim.Plo + -rm -f ./$(DEPDIR)/div.Plo + -rm -f ./$(DEPDIR)/div_2exp.Plo + -rm -f ./$(DEPDIR)/div_2si.Plo + -rm -f ./$(DEPDIR)/div_2ui.Plo + -rm -f ./$(DEPDIR)/div_d.Plo + -rm -f ./$(DEPDIR)/div_ui.Plo + -rm -f ./$(DEPDIR)/dump.Plo + -rm -f ./$(DEPDIR)/eint.Plo + -rm -f ./$(DEPDIR)/eq.Plo + -rm -f ./$(DEPDIR)/erandom.Plo + -rm -f ./$(DEPDIR)/erf.Plo + -rm -f ./$(DEPDIR)/erfc.Plo + -rm -f ./$(DEPDIR)/exceptions.Plo + -rm -f ./$(DEPDIR)/exp.Plo + -rm -f ./$(DEPDIR)/exp10.Plo + -rm -f ./$(DEPDIR)/exp2.Plo + -rm -f ./$(DEPDIR)/exp3.Plo + -rm -f ./$(DEPDIR)/exp_2.Plo + -rm -f ./$(DEPDIR)/expm1.Plo + -rm -f ./$(DEPDIR)/extract.Plo + -rm -f ./$(DEPDIR)/factorial.Plo + -rm -f ./$(DEPDIR)/fits_intmax.Plo + -rm -f ./$(DEPDIR)/fits_sint.Plo + -rm -f ./$(DEPDIR)/fits_slong.Plo + -rm -f ./$(DEPDIR)/fits_sshort.Plo + -rm -f ./$(DEPDIR)/fits_uint.Plo + -rm -f ./$(DEPDIR)/fits_uintmax.Plo + -rm -f ./$(DEPDIR)/fits_ulong.Plo + -rm -f ./$(DEPDIR)/fits_ushort.Plo + -rm -f ./$(DEPDIR)/fma.Plo + -rm -f ./$(DEPDIR)/fmma.Plo + -rm -f ./$(DEPDIR)/fms.Plo + -rm -f ./$(DEPDIR)/fpif.Plo + -rm -f ./$(DEPDIR)/frac.Plo + -rm -f ./$(DEPDIR)/free_cache.Plo + -rm -f ./$(DEPDIR)/frexp.Plo + -rm -f ./$(DEPDIR)/gamma.Plo + -rm -f ./$(DEPDIR)/gamma_inc.Plo + -rm -f ./$(DEPDIR)/gammaonethird.Plo + -rm -f ./$(DEPDIR)/get_d.Plo + -rm -f ./$(DEPDIR)/get_d64.Plo + -rm -f ./$(DEPDIR)/get_exp.Plo + -rm -f ./$(DEPDIR)/get_f.Plo + -rm -f ./$(DEPDIR)/get_float128.Plo + -rm -f ./$(DEPDIR)/get_flt.Plo + -rm -f ./$(DEPDIR)/get_ld.Plo + -rm -f ./$(DEPDIR)/get_patches.Plo + -rm -f ./$(DEPDIR)/get_q.Plo + -rm -f ./$(DEPDIR)/get_si.Plo + -rm -f ./$(DEPDIR)/get_sj.Plo + -rm -f ./$(DEPDIR)/get_str.Plo + -rm -f ./$(DEPDIR)/get_ui.Plo + -rm -f ./$(DEPDIR)/get_uj.Plo + -rm -f ./$(DEPDIR)/get_z.Plo + -rm -f ./$(DEPDIR)/get_z_exp.Plo + -rm -f ./$(DEPDIR)/gmp_op.Plo + -rm -f ./$(DEPDIR)/grandom.Plo + -rm -f ./$(DEPDIR)/hypot.Plo + -rm -f ./$(DEPDIR)/init.Plo + -rm -f ./$(DEPDIR)/init2.Plo + -rm -f ./$(DEPDIR)/inits.Plo + -rm -f ./$(DEPDIR)/inits2.Plo + -rm -f ./$(DEPDIR)/inp_str.Plo + -rm -f ./$(DEPDIR)/int_ceil_log2.Plo + -rm -f ./$(DEPDIR)/isinf.Plo + -rm -f ./$(DEPDIR)/isinteger.Plo + -rm -f ./$(DEPDIR)/isnan.Plo + -rm -f ./$(DEPDIR)/isnum.Plo + -rm -f ./$(DEPDIR)/isqrt.Plo + -rm -f ./$(DEPDIR)/isregular.Plo + -rm -f ./$(DEPDIR)/iszero.Plo + -rm -f ./$(DEPDIR)/jn.Plo + -rm -f ./$(DEPDIR)/li2.Plo + -rm -f ./$(DEPDIR)/lngamma.Plo + -rm -f ./$(DEPDIR)/log.Plo + -rm -f ./$(DEPDIR)/log10.Plo + -rm -f ./$(DEPDIR)/log1p.Plo + -rm -f ./$(DEPDIR)/log2.Plo + -rm -f ./$(DEPDIR)/log_ui.Plo + -rm -f ./$(DEPDIR)/logging.Plo + -rm -f ./$(DEPDIR)/min_prec.Plo + -rm -f ./$(DEPDIR)/minmax.Plo + -rm -f ./$(DEPDIR)/modf.Plo + -rm -f ./$(DEPDIR)/mp_clz_tab.Plo + -rm -f ./$(DEPDIR)/mpfr-gmp.Plo + -rm -f ./$(DEPDIR)/mpfr-mini-gmp.Plo + -rm -f ./$(DEPDIR)/mpn_exp.Plo + -rm -f ./$(DEPDIR)/mul.Plo + -rm -f ./$(DEPDIR)/mul_2exp.Plo + -rm -f ./$(DEPDIR)/mul_2si.Plo + -rm -f ./$(DEPDIR)/mul_2ui.Plo + -rm -f ./$(DEPDIR)/mul_d.Plo + -rm -f ./$(DEPDIR)/mul_ui.Plo + -rm -f ./$(DEPDIR)/mulders.Plo + -rm -f ./$(DEPDIR)/neg.Plo + -rm -f ./$(DEPDIR)/next.Plo + -rm -f ./$(DEPDIR)/nrandom.Plo + -rm -f ./$(DEPDIR)/odd_p.Plo + -rm -f ./$(DEPDIR)/out_str.Plo + -rm -f ./$(DEPDIR)/pool.Plo + -rm -f ./$(DEPDIR)/pow.Plo + -rm -f ./$(DEPDIR)/pow_si.Plo + -rm -f ./$(DEPDIR)/pow_ui.Plo + -rm -f ./$(DEPDIR)/pow_z.Plo + -rm -f ./$(DEPDIR)/powerof2.Plo + -rm -f ./$(DEPDIR)/print_raw.Plo + -rm -f ./$(DEPDIR)/print_rnd_mode.Plo + -rm -f ./$(DEPDIR)/printf.Plo + -rm -f ./$(DEPDIR)/random_deviate.Plo + -rm -f ./$(DEPDIR)/rec_sqrt.Plo + -rm -f ./$(DEPDIR)/reldiff.Plo + -rm -f ./$(DEPDIR)/rem1.Plo + -rm -f ./$(DEPDIR)/rint.Plo + -rm -f ./$(DEPDIR)/rndna.Plo + -rm -f ./$(DEPDIR)/root.Plo + -rm -f ./$(DEPDIR)/round_near_x.Plo + -rm -f ./$(DEPDIR)/round_p.Plo + -rm -f ./$(DEPDIR)/round_prec.Plo + -rm -f ./$(DEPDIR)/scale2.Plo + -rm -f ./$(DEPDIR)/sec.Plo + -rm -f ./$(DEPDIR)/sech.Plo + -rm -f ./$(DEPDIR)/set.Plo + -rm -f ./$(DEPDIR)/set_d.Plo + -rm -f ./$(DEPDIR)/set_d64.Plo + -rm -f ./$(DEPDIR)/set_dfl_prec.Plo + -rm -f ./$(DEPDIR)/set_exp.Plo + -rm -f ./$(DEPDIR)/set_f.Plo + -rm -f ./$(DEPDIR)/set_float128.Plo + -rm -f ./$(DEPDIR)/set_flt.Plo + -rm -f ./$(DEPDIR)/set_inf.Plo + -rm -f ./$(DEPDIR)/set_ld.Plo + -rm -f ./$(DEPDIR)/set_nan.Plo + -rm -f ./$(DEPDIR)/set_prc_raw.Plo + -rm -f ./$(DEPDIR)/set_prec.Plo + -rm -f ./$(DEPDIR)/set_q.Plo + -rm -f ./$(DEPDIR)/set_rnd.Plo + -rm -f ./$(DEPDIR)/set_si.Plo + -rm -f ./$(DEPDIR)/set_si_2exp.Plo + -rm -f ./$(DEPDIR)/set_sj.Plo + -rm -f ./$(DEPDIR)/set_str.Plo + -rm -f ./$(DEPDIR)/set_str_raw.Plo + -rm -f ./$(DEPDIR)/set_ui.Plo + -rm -f ./$(DEPDIR)/set_ui_2exp.Plo + -rm -f ./$(DEPDIR)/set_uj.Plo + -rm -f ./$(DEPDIR)/set_z.Plo + -rm -f ./$(DEPDIR)/set_z_exp.Plo + -rm -f ./$(DEPDIR)/set_zero.Plo + -rm -f ./$(DEPDIR)/setmax.Plo + -rm -f ./$(DEPDIR)/setmin.Plo + -rm -f ./$(DEPDIR)/setsign.Plo + -rm -f ./$(DEPDIR)/sgn.Plo + -rm -f ./$(DEPDIR)/si_op.Plo + -rm -f ./$(DEPDIR)/signbit.Plo + -rm -f ./$(DEPDIR)/sin.Plo + -rm -f ./$(DEPDIR)/sin_cos.Plo + -rm -f ./$(DEPDIR)/sinh.Plo + -rm -f ./$(DEPDIR)/sinh_cosh.Plo + -rm -f ./$(DEPDIR)/sqr.Plo + -rm -f ./$(DEPDIR)/sqrt.Plo + -rm -f ./$(DEPDIR)/sqrt_ui.Plo + -rm -f ./$(DEPDIR)/stack_interface.Plo + -rm -f ./$(DEPDIR)/strtofr.Plo + -rm -f ./$(DEPDIR)/sub.Plo + -rm -f ./$(DEPDIR)/sub1.Plo + -rm -f ./$(DEPDIR)/sub1sp.Plo + -rm -f ./$(DEPDIR)/sub_d.Plo + -rm -f ./$(DEPDIR)/sub_ui.Plo + -rm -f ./$(DEPDIR)/subnormal.Plo + -rm -f ./$(DEPDIR)/sum.Plo + -rm -f ./$(DEPDIR)/swap.Plo + -rm -f ./$(DEPDIR)/tan.Plo + -rm -f ./$(DEPDIR)/tanh.Plo + -rm -f ./$(DEPDIR)/ubf.Plo + -rm -f ./$(DEPDIR)/uceil_exp2.Plo + -rm -f ./$(DEPDIR)/uceil_log2.Plo + -rm -f ./$(DEPDIR)/ufloor_log2.Plo + -rm -f ./$(DEPDIR)/ui_div.Plo + -rm -f ./$(DEPDIR)/ui_pow.Plo + -rm -f ./$(DEPDIR)/ui_pow_ui.Plo + -rm -f ./$(DEPDIR)/ui_sub.Plo + -rm -f ./$(DEPDIR)/urandom.Plo + -rm -f ./$(DEPDIR)/urandomb.Plo + -rm -f ./$(DEPDIR)/vasprintf.Plo + -rm -f ./$(DEPDIR)/version.Plo + -rm -f ./$(DEPDIR)/volatile.Plo + -rm -f ./$(DEPDIR)/yn.Plo + -rm -f ./$(DEPDIR)/zeta.Plo + -rm -f ./$(DEPDIR)/zeta_ui.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -1012,7 +1368,241 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/abort_prec_max.Plo + -rm -f ./$(DEPDIR)/acos.Plo + -rm -f ./$(DEPDIR)/acosh.Plo + -rm -f ./$(DEPDIR)/add.Plo + -rm -f ./$(DEPDIR)/add1.Plo + -rm -f ./$(DEPDIR)/add1sp.Plo + -rm -f ./$(DEPDIR)/add_d.Plo + -rm -f ./$(DEPDIR)/add_ui.Plo + -rm -f ./$(DEPDIR)/agm.Plo + -rm -f ./$(DEPDIR)/ai.Plo + -rm -f ./$(DEPDIR)/asin.Plo + -rm -f ./$(DEPDIR)/asinh.Plo + -rm -f ./$(DEPDIR)/atan.Plo + -rm -f ./$(DEPDIR)/atan2.Plo + -rm -f ./$(DEPDIR)/atanh.Plo + -rm -f ./$(DEPDIR)/bernoulli.Plo + -rm -f ./$(DEPDIR)/beta.Plo + -rm -f ./$(DEPDIR)/buildopt.Plo + -rm -f ./$(DEPDIR)/cache.Plo + -rm -f ./$(DEPDIR)/cbrt.Plo + -rm -f ./$(DEPDIR)/check.Plo + -rm -f ./$(DEPDIR)/clear.Plo + -rm -f ./$(DEPDIR)/clears.Plo + -rm -f ./$(DEPDIR)/cmp.Plo + -rm -f ./$(DEPDIR)/cmp2.Plo + -rm -f ./$(DEPDIR)/cmp_abs.Plo + -rm -f ./$(DEPDIR)/cmp_d.Plo + -rm -f ./$(DEPDIR)/cmp_ld.Plo + -rm -f ./$(DEPDIR)/cmp_si.Plo + -rm -f ./$(DEPDIR)/cmp_ui.Plo + -rm -f ./$(DEPDIR)/comparisons.Plo + -rm -f ./$(DEPDIR)/const_catalan.Plo + -rm -f ./$(DEPDIR)/const_euler.Plo + -rm -f ./$(DEPDIR)/const_log2.Plo + -rm -f ./$(DEPDIR)/const_pi.Plo + -rm -f ./$(DEPDIR)/constant.Plo + -rm -f ./$(DEPDIR)/copysign.Plo + -rm -f ./$(DEPDIR)/cos.Plo + -rm -f ./$(DEPDIR)/cosh.Plo + -rm -f ./$(DEPDIR)/cot.Plo + -rm -f ./$(DEPDIR)/coth.Plo + -rm -f ./$(DEPDIR)/csc.Plo + -rm -f ./$(DEPDIR)/csch.Plo + -rm -f ./$(DEPDIR)/d_div.Plo + -rm -f ./$(DEPDIR)/d_sub.Plo + -rm -f ./$(DEPDIR)/digamma.Plo + -rm -f ./$(DEPDIR)/dim.Plo + -rm -f ./$(DEPDIR)/div.Plo + -rm -f ./$(DEPDIR)/div_2exp.Plo + -rm -f ./$(DEPDIR)/div_2si.Plo + -rm -f ./$(DEPDIR)/div_2ui.Plo + -rm -f ./$(DEPDIR)/div_d.Plo + -rm -f ./$(DEPDIR)/div_ui.Plo + -rm -f ./$(DEPDIR)/dump.Plo + -rm -f ./$(DEPDIR)/eint.Plo + -rm -f ./$(DEPDIR)/eq.Plo + -rm -f ./$(DEPDIR)/erandom.Plo + -rm -f ./$(DEPDIR)/erf.Plo + -rm -f ./$(DEPDIR)/erfc.Plo + -rm -f ./$(DEPDIR)/exceptions.Plo + -rm -f ./$(DEPDIR)/exp.Plo + -rm -f ./$(DEPDIR)/exp10.Plo + -rm -f ./$(DEPDIR)/exp2.Plo + -rm -f ./$(DEPDIR)/exp3.Plo + -rm -f ./$(DEPDIR)/exp_2.Plo + -rm -f ./$(DEPDIR)/expm1.Plo + -rm -f ./$(DEPDIR)/extract.Plo + -rm -f ./$(DEPDIR)/factorial.Plo + -rm -f ./$(DEPDIR)/fits_intmax.Plo + -rm -f ./$(DEPDIR)/fits_sint.Plo + -rm -f ./$(DEPDIR)/fits_slong.Plo + -rm -f ./$(DEPDIR)/fits_sshort.Plo + -rm -f ./$(DEPDIR)/fits_uint.Plo + -rm -f ./$(DEPDIR)/fits_uintmax.Plo + -rm -f ./$(DEPDIR)/fits_ulong.Plo + -rm -f ./$(DEPDIR)/fits_ushort.Plo + -rm -f ./$(DEPDIR)/fma.Plo + -rm -f ./$(DEPDIR)/fmma.Plo + -rm -f ./$(DEPDIR)/fms.Plo + -rm -f ./$(DEPDIR)/fpif.Plo + -rm -f ./$(DEPDIR)/frac.Plo + -rm -f ./$(DEPDIR)/free_cache.Plo + -rm -f ./$(DEPDIR)/frexp.Plo + -rm -f ./$(DEPDIR)/gamma.Plo + -rm -f ./$(DEPDIR)/gamma_inc.Plo + -rm -f ./$(DEPDIR)/gammaonethird.Plo + -rm -f ./$(DEPDIR)/get_d.Plo + -rm -f ./$(DEPDIR)/get_d64.Plo + -rm -f ./$(DEPDIR)/get_exp.Plo + -rm -f ./$(DEPDIR)/get_f.Plo + -rm -f ./$(DEPDIR)/get_float128.Plo + -rm -f ./$(DEPDIR)/get_flt.Plo + -rm -f ./$(DEPDIR)/get_ld.Plo + -rm -f ./$(DEPDIR)/get_patches.Plo + -rm -f ./$(DEPDIR)/get_q.Plo + -rm -f ./$(DEPDIR)/get_si.Plo + -rm -f ./$(DEPDIR)/get_sj.Plo + -rm -f ./$(DEPDIR)/get_str.Plo + -rm -f ./$(DEPDIR)/get_ui.Plo + -rm -f ./$(DEPDIR)/get_uj.Plo + -rm -f ./$(DEPDIR)/get_z.Plo + -rm -f ./$(DEPDIR)/get_z_exp.Plo + -rm -f ./$(DEPDIR)/gmp_op.Plo + -rm -f ./$(DEPDIR)/grandom.Plo + -rm -f ./$(DEPDIR)/hypot.Plo + -rm -f ./$(DEPDIR)/init.Plo + -rm -f ./$(DEPDIR)/init2.Plo + -rm -f ./$(DEPDIR)/inits.Plo + -rm -f ./$(DEPDIR)/inits2.Plo + -rm -f ./$(DEPDIR)/inp_str.Plo + -rm -f ./$(DEPDIR)/int_ceil_log2.Plo + -rm -f ./$(DEPDIR)/isinf.Plo + -rm -f ./$(DEPDIR)/isinteger.Plo + -rm -f ./$(DEPDIR)/isnan.Plo + -rm -f ./$(DEPDIR)/isnum.Plo + -rm -f ./$(DEPDIR)/isqrt.Plo + -rm -f ./$(DEPDIR)/isregular.Plo + -rm -f ./$(DEPDIR)/iszero.Plo + -rm -f ./$(DEPDIR)/jn.Plo + -rm -f ./$(DEPDIR)/li2.Plo + -rm -f ./$(DEPDIR)/lngamma.Plo + -rm -f ./$(DEPDIR)/log.Plo + -rm -f ./$(DEPDIR)/log10.Plo + -rm -f ./$(DEPDIR)/log1p.Plo + -rm -f ./$(DEPDIR)/log2.Plo + -rm -f ./$(DEPDIR)/log_ui.Plo + -rm -f ./$(DEPDIR)/logging.Plo + -rm -f ./$(DEPDIR)/min_prec.Plo + -rm -f ./$(DEPDIR)/minmax.Plo + -rm -f ./$(DEPDIR)/modf.Plo + -rm -f ./$(DEPDIR)/mp_clz_tab.Plo + -rm -f ./$(DEPDIR)/mpfr-gmp.Plo + -rm -f ./$(DEPDIR)/mpfr-mini-gmp.Plo + -rm -f ./$(DEPDIR)/mpn_exp.Plo + -rm -f ./$(DEPDIR)/mul.Plo + -rm -f ./$(DEPDIR)/mul_2exp.Plo + -rm -f ./$(DEPDIR)/mul_2si.Plo + -rm -f ./$(DEPDIR)/mul_2ui.Plo + -rm -f ./$(DEPDIR)/mul_d.Plo + -rm -f ./$(DEPDIR)/mul_ui.Plo + -rm -f ./$(DEPDIR)/mulders.Plo + -rm -f ./$(DEPDIR)/neg.Plo + -rm -f ./$(DEPDIR)/next.Plo + -rm -f ./$(DEPDIR)/nrandom.Plo + -rm -f ./$(DEPDIR)/odd_p.Plo + -rm -f ./$(DEPDIR)/out_str.Plo + -rm -f ./$(DEPDIR)/pool.Plo + -rm -f ./$(DEPDIR)/pow.Plo + -rm -f ./$(DEPDIR)/pow_si.Plo + -rm -f ./$(DEPDIR)/pow_ui.Plo + -rm -f ./$(DEPDIR)/pow_z.Plo + -rm -f ./$(DEPDIR)/powerof2.Plo + -rm -f ./$(DEPDIR)/print_raw.Plo + -rm -f ./$(DEPDIR)/print_rnd_mode.Plo + -rm -f ./$(DEPDIR)/printf.Plo + -rm -f ./$(DEPDIR)/random_deviate.Plo + -rm -f ./$(DEPDIR)/rec_sqrt.Plo + -rm -f ./$(DEPDIR)/reldiff.Plo + -rm -f ./$(DEPDIR)/rem1.Plo + -rm -f ./$(DEPDIR)/rint.Plo + -rm -f ./$(DEPDIR)/rndna.Plo + -rm -f ./$(DEPDIR)/root.Plo + -rm -f ./$(DEPDIR)/round_near_x.Plo + -rm -f ./$(DEPDIR)/round_p.Plo + -rm -f ./$(DEPDIR)/round_prec.Plo + -rm -f ./$(DEPDIR)/scale2.Plo + -rm -f ./$(DEPDIR)/sec.Plo + -rm -f ./$(DEPDIR)/sech.Plo + -rm -f ./$(DEPDIR)/set.Plo + -rm -f ./$(DEPDIR)/set_d.Plo + -rm -f ./$(DEPDIR)/set_d64.Plo + -rm -f ./$(DEPDIR)/set_dfl_prec.Plo + -rm -f ./$(DEPDIR)/set_exp.Plo + -rm -f ./$(DEPDIR)/set_f.Plo + -rm -f ./$(DEPDIR)/set_float128.Plo + -rm -f ./$(DEPDIR)/set_flt.Plo + -rm -f ./$(DEPDIR)/set_inf.Plo + -rm -f ./$(DEPDIR)/set_ld.Plo + -rm -f ./$(DEPDIR)/set_nan.Plo + -rm -f ./$(DEPDIR)/set_prc_raw.Plo + -rm -f ./$(DEPDIR)/set_prec.Plo + -rm -f ./$(DEPDIR)/set_q.Plo + -rm -f ./$(DEPDIR)/set_rnd.Plo + -rm -f ./$(DEPDIR)/set_si.Plo + -rm -f ./$(DEPDIR)/set_si_2exp.Plo + -rm -f ./$(DEPDIR)/set_sj.Plo + -rm -f ./$(DEPDIR)/set_str.Plo + -rm -f ./$(DEPDIR)/set_str_raw.Plo + -rm -f ./$(DEPDIR)/set_ui.Plo + -rm -f ./$(DEPDIR)/set_ui_2exp.Plo + -rm -f ./$(DEPDIR)/set_uj.Plo + -rm -f ./$(DEPDIR)/set_z.Plo + -rm -f ./$(DEPDIR)/set_z_exp.Plo + -rm -f ./$(DEPDIR)/set_zero.Plo + -rm -f ./$(DEPDIR)/setmax.Plo + -rm -f ./$(DEPDIR)/setmin.Plo + -rm -f ./$(DEPDIR)/setsign.Plo + -rm -f ./$(DEPDIR)/sgn.Plo + -rm -f ./$(DEPDIR)/si_op.Plo + -rm -f ./$(DEPDIR)/signbit.Plo + -rm -f ./$(DEPDIR)/sin.Plo + -rm -f ./$(DEPDIR)/sin_cos.Plo + -rm -f ./$(DEPDIR)/sinh.Plo + -rm -f ./$(DEPDIR)/sinh_cosh.Plo + -rm -f ./$(DEPDIR)/sqr.Plo + -rm -f ./$(DEPDIR)/sqrt.Plo + -rm -f ./$(DEPDIR)/sqrt_ui.Plo + -rm -f ./$(DEPDIR)/stack_interface.Plo + -rm -f ./$(DEPDIR)/strtofr.Plo + -rm -f ./$(DEPDIR)/sub.Plo + -rm -f ./$(DEPDIR)/sub1.Plo + -rm -f ./$(DEPDIR)/sub1sp.Plo + -rm -f ./$(DEPDIR)/sub_d.Plo + -rm -f ./$(DEPDIR)/sub_ui.Plo + -rm -f ./$(DEPDIR)/subnormal.Plo + -rm -f ./$(DEPDIR)/sum.Plo + -rm -f ./$(DEPDIR)/swap.Plo + -rm -f ./$(DEPDIR)/tan.Plo + -rm -f ./$(DEPDIR)/tanh.Plo + -rm -f ./$(DEPDIR)/ubf.Plo + -rm -f ./$(DEPDIR)/uceil_exp2.Plo + -rm -f ./$(DEPDIR)/uceil_log2.Plo + -rm -f ./$(DEPDIR)/ufloor_log2.Plo + -rm -f ./$(DEPDIR)/ui_div.Plo + -rm -f ./$(DEPDIR)/ui_pow.Plo + -rm -f ./$(DEPDIR)/ui_pow_ui.Plo + -rm -f ./$(DEPDIR)/ui_sub.Plo + -rm -f ./$(DEPDIR)/urandom.Plo + -rm -f ./$(DEPDIR)/urandomb.Plo + -rm -f ./$(DEPDIR)/vasprintf.Plo + -rm -f ./$(DEPDIR)/version.Plo + -rm -f ./$(DEPDIR)/volatile.Plo + -rm -f ./$(DEPDIR)/yn.Plo + -rm -f ./$(DEPDIR)/zeta.Plo + -rm -f ./$(DEPDIR)/zeta_ui.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -1033,9 +1623,9 @@ .MAKE: all check install install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -1087,12 +1677,12 @@ # For instance, with r11968, and # ./configure --with-gmp-build=... CC=tcc # the symbol __gmpn_clz_tab is defined, which is wrong. -# Note: the "grep -v '@plt$$'" below is for tcc. +# Note: the "$(GREP) -v '@plt$$'" below is for tcc. check-exported-symbols: $(LTLIBRARIES) if [ -f "$(LIBMPFRSO)" ]; then \ gsymbols=`$(NM) -gP "$(LIBMPFRSO)" | perl -ne \ '/^(__gmp[a-z]?_[_0-9A-Za-z]*) +[A-TV-Z]/ and print " $$1"' | \ - grep -v '@plt$$'`; \ + { $(GREP) -v '@plt$$' || true ; }`; \ if [ -n "$$gsymbols" ]; then \ echo "MPFR defines symbols with a GMP reserved prefix:$$gsymbols"; \ exit 1; \ diff -Nru mpfr4-4.0.1/src/minmax.c mpfr4-4.0.2/src/minmax.c --- mpfr4-4.0.1/src/minmax.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/minmax.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_min -- min and max of x, y -Copyright 2001, 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001, 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/min_prec.c mpfr4-4.0.2/src/min_prec.c --- mpfr4-4.0.1/src/min_prec.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/min_prec.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_min_prec -- minimal size in bits to hold the mantissa -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/mips/mparam.h mpfr4-4.0.2/src/mips/mparam.h --- mpfr4-4.0.1/src/mips/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mips/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2012-03-05, gcc 4.4.6 @@ -89,7 +89,7 @@ 832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832, \ 832,832,831,832,832,832,832,832,832,832,832,832,832,832,832,832, \ 832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,0,0,0,0,0,6,6,7,7,8,8,9,9, \ 10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17, \ @@ -155,7 +155,7 @@ 504,504,504,536,536,536,536,536,536,536,536,536,536,536,536,536, \ 536,536,536,536,536,536,536,536,536,536,535,536,536,536,536,536, \ 536,536,536,536,568,568,568,568,552,568,568,568,568,568,568,536 \ - + #define MPFR_DIVHIGH_TAB \ 0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0, /*0-15*/ \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /*16-31*/ \ @@ -221,7 +221,7 @@ 512,510,510,512,512,511,512,512,512,512,512,512,512,512,549,512, /*976-991*/ \ 512,512,545,512,512,512,510,512,512,512,512,512,512,512,510,512, /*992-1007*/ \ 512,512,551,510,545,512,550,512,552,545,511,557,545,512,544,551 /*1008-1023*/ \ - + #define MPFR_MUL_THRESHOLD 6 /* limbs */ #define MPFR_SQR_THRESHOLD 9 /* limbs */ #define MPFR_DIV_THRESHOLD 6 /* limbs */ diff -Nru mpfr4-4.0.1/src/modf.c mpfr4-4.0.2/src/modf.c --- mpfr4-4.0.1/src/modf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/modf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_modf -- Integral and fractional part. -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/mparam_h.in mpfr4-4.0.2/src/mparam_h.in --- mpfr4-4.0.1/src/mparam_h.in 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mparam_h.in 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __MPFR_IMPL_H__ diff -Nru mpfr4-4.0.1/src/mp_clz_tab.c mpfr4-4.0.2/src/mp_clz_tab.c --- mpfr4-4.0.1/src/mp_clz_tab.c 2018-01-19 00:27:24.000000000 +0000 +++ mpfr4-4.0.2/src/mp_clz_tab.c 2019-01-07 13:53:20.000000000 +0000 @@ -3,7 +3,7 @@ THE CONTENTS OF THIS FILE ARE FOR INTERNAL USE AND MAY CHANGE INCOMPATIBLY OR DISAPPEAR IN A FUTURE GNU MPFR RELEASE. -Copyright 1991, 1993-1994, 1996-1997, 2000-2001, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1991, 1993-1994, 1996-1997, 2000-2001, 2004, 2006-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. It has been copied and adapted from the GNU MP Library. @@ -20,7 +20,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/mpf2mpfr.h mpfr4-4.0.2/src/mpf2mpfr.h --- mpfr4-4.0.1/src/mpf2mpfr.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mpf2mpfr.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpf2mpfr.h -- Compatibility include file with mpf. -Copyright 1999-2002, 2004-2018 Free Software Foundation, Inc. +Copyright 1999-2002, 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __MPFR_FROM_MPF__ diff -Nru mpfr4-4.0.1/src/mpfr-cvers.h mpfr4-4.0.2/src/mpfr-cvers.h --- mpfr4-4.0.1/src/mpfr-cvers.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr-cvers.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Utilities for MPFR developers, not exported. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __MPFR_CVERS_H__ diff -Nru mpfr4-4.0.1/src/mpfr-gmp.c mpfr4-4.0.2/src/mpfr-gmp.c --- mpfr4-4.0.1/src/mpfr-gmp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr-gmp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_gmp -- Limited gmp-impl emulator Modified version of the GMP files. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/mpfr-gmp.h mpfr4-4.0.2/src/mpfr-gmp.h --- mpfr4-4.0.1/src/mpfr-gmp.h 2018-01-19 00:27:24.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr-gmp.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Uniform Interface to GMP. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __GMPFR_GMP_H__ @@ -310,7 +310,7 @@ size_t); __MPFR_DECLSPEC void mpfr_tmp_free (struct tmp_marker *); -/* Can be overriden at configure time. Useful for checking buffer overflow. */ +/* Can be overridden at configure time. Useful for checking buffer overflow. */ #ifndef MPFR_ALLOCA_MAX # define MPFR_ALLOCA_MAX 16384 #endif diff -Nru mpfr4-4.0.1/src/mpfr.h mpfr4-4.0.2/src/mpfr.h --- mpfr4-4.0.1/src/mpfr.h 2018-02-07 12:50:31.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr.h 2019-01-31 20:29:48.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr.h -- Include file for mpfr. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __MPFR_H @@ -26,8 +26,8 @@ /* Define MPFR version number */ #define MPFR_VERSION_MAJOR 4 #define MPFR_VERSION_MINOR 0 -#define MPFR_VERSION_PATCHLEVEL 1 -#define MPFR_VERSION_STRING "4.0.1" +#define MPFR_VERSION_PATCHLEVEL 2 +#define MPFR_VERSION_STRING "4.0.2" /* User macros: MPFR_USE_FILE: Define it to make MPFR define functions dealing @@ -1019,7 +1019,7 @@ /* Check if / is included or if the user - explicitly wants intmax_t. Automatical detection is done by + explicitly wants intmax_t. Automatic detection is done by checking: - INTMAX_C and UINTMAX_C, but not if the compiler is a C++ one (as suggested by Patrick Pelissier) because the test does not diff -Nru mpfr4-4.0.1/src/mpfr-impl.h mpfr4-4.0.2/src/mpfr-impl.h --- mpfr4-4.0.1/src/mpfr-impl.h 2018-01-31 16:21:15.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr-impl.h 2019-01-27 18:30:16.000000000 +0000 @@ -1,6 +1,6 @@ /* Utilities for MPFR developers, not exported. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __MPFR_IMPL_H__ @@ -83,7 +83,7 @@ /* For the definition of MPFR_THREAD_ATTR. GCC/ICC detection macros are no longer used, as they sometimes gave incorrect information about the support of thread-local variables. A configure check is now done. */ -#if defined (WANT_SHARED_CACHE) +#if defined(MPFR_WANT_SHARED_CACHE) # define MPFR_NEED_THREAD_LOCK 1 #endif #include "mpfr-thread.h" @@ -207,12 +207,16 @@ extern "C" { #endif -#if defined(WANT_SHARED_CACHE) +#if defined(MPFR_WANT_SHARED_CACHE) # define MPFR_CACHE_ATTR #else # define MPFR_CACHE_ATTR MPFR_THREAD_ATTR #endif +/* Note: The following structure and types depend on the MPFR build options + (including compiler options), due to the various locking methods affecting + MPFR_DEFERRED_INIT_SLAVE_DECL and MPFR_LOCK_DECL. But since this is only + internal, that's OK. */ struct __gmpfr_cache_s { mpfr_t x; int inexact; @@ -766,7 +770,7 @@ # endif #endif -/* Some special case for IEEE_EXT Litle Endian */ +/* Some special case for IEEE_EXT Little Endian */ #if HAVE_LDOUBLE_IEEE_EXT_LITTLE typedef union { @@ -864,6 +868,12 @@ nonnegative. */ #define MPFR_UEXP(X) (MPFR_ASSERTD ((X) >= 0), (mpfr_uexp_t) (X)) +/* Define mpfr_eexp_t, mpfr_ueexp_t and MPFR_EXP_FSPEC. + Warning! MPFR_EXP_FSPEC is the length modifier associated with + these types mpfr_eexp_t / mpfr_ueexp_t, not with mpfr_exp_t. + (Should we change that, or is this safer to detect bugs, e.g. + in the context of an expression with computations with long?) +*/ #if _MPFR_EXP_FORMAT <= 3 typedef long mpfr_eexp_t; typedef unsigned long mpfr_ueexp_t; @@ -1415,15 +1425,15 @@ #define mpfr_get_d1(x) mpfr_get_d(x,__gmpfr_default_rounding_mode) /* Store in r the size in bits of the mpz_t z */ -#define MPFR_MPZ_SIZEINBASE2(r, z) \ - do { \ - int _cnt; \ - mp_size_t _size; \ - MPFR_ASSERTD (mpz_sgn (z) != 0); \ - _size = ABSIZ(z); \ - MPFR_ASSERTD (_size >= 1); \ - count_leading_zeros (_cnt, PTR(z)[_size-1]); \ - (r) = _size * GMP_NUMB_BITS - _cnt; \ +#define MPFR_MPZ_SIZEINBASE2(r, z) \ + do { \ + int _cnt; \ + mp_size_t _size; \ + MPFR_ASSERTD (mpz_sgn (z) != 0); \ + _size = ABSIZ(z); \ + MPFR_ASSERTD (_size >= 1); \ + count_leading_zeros (_cnt, PTR(z)[_size-1]); \ + (r) = (mp_bitcnt_t) _size * GMP_NUMB_BITS - _cnt; \ } while (0) /* MPFR_LCONV_DPTS can also be forced to 0 or 1 by the user. */ diff -Nru mpfr4-4.0.1/src/mpfr-intmax.h mpfr4-4.0.2/src/mpfr-intmax.h --- mpfr4-4.0.1/src/mpfr-intmax.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr-intmax.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* MPFR internal header related to intmax_t. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __MPFR_INTMAX_H__ diff -Nru mpfr4-4.0.1/src/mpfr-longlong.h mpfr4-4.0.2/src/mpfr-longlong.h --- mpfr4-4.0.1/src/mpfr-longlong.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr-longlong.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* longlong.h -- definitions for mixed size 32/64 bit arithmetic. -Copyright 1991-1994, 1996, 1997, 1999-2005, 2007-2009, 2011-2018 Free Software Foundation, Inc. +Copyright 1991-1994, 1996, 1997, 1999-2005, 2007-2009, 2011-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library and has been copied from GNU MP 6.1.0 (the FIXME's come from GNU MP), except the parts marked @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* You have to define the following before including this file: @@ -410,23 +410,25 @@ #define COUNT_LEADING_ZEROS_0 32 #endif /* __a29k__ */ +/* MPFR: changed "J" constraint to "Cal" constraint + (https://sympa.inria.fr/sympa/arc/mpfr/2018-10/msg00010.html) */ #if defined (__arc__) #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("add.f\t%1, %4, %5\n\tadc\t%0, %2, %3" \ : "=r" (sh), \ "=&r" (sl) \ : "r" ((USItype) (ah)), \ - "rIJ" ((USItype) (bh)), \ + "rICal" ((USItype) (bh)), \ "%r" ((USItype) (al)), \ - "rIJ" ((USItype) (bl))) + "rICal" ((USItype) (bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ __asm__ ("sub.f\t%1, %4, %5\n\tsbc\t%0, %2, %3" \ : "=r" (sh), \ "=&r" (sl) \ : "r" ((USItype) (ah)), \ - "rIJ" ((USItype) (bh)), \ + "rICal" ((USItype) (bh)), \ "r" ((USItype) (al)), \ - "rIJ" ((USItype) (bl))) + "rICal" ((USItype) (bl))) #endif #if defined (__arm__) && (defined (__thumb2__) || !defined (__thumb__)) \ @@ -2103,7 +2105,7 @@ (q) = __MPN(udiv_w_sdiv) (&__r, nh, nl, d); \ (r) = __r; \ } while (0) -__GMP_DECLSPEC UWtype __MPN(udiv_w_sdiv) (UWtype *, UWtype, UWtype, UWtype); +__MPFR_DECLSPEC UWtype __MPN(udiv_w_sdiv) (UWtype *, UWtype, UWtype, UWtype); #endif /* If udiv_qrnnd was not defined for this processor, use __udiv_qrnnd_c. */ @@ -2147,7 +2149,7 @@ #endif #ifdef COUNT_LEADING_ZEROS_NEED_CLZ_TAB -extern const unsigned char __GMP_DECLSPEC __clz_tab[129]; +extern const unsigned char __MPFR_DECLSPEC __clz_tab[129]; #endif #if !defined (count_trailing_zeros) diff -Nru mpfr4-4.0.1/src/mpfr-mini-gmp.c mpfr4-4.0.2/src/mpfr-mini-gmp.c --- mpfr4-4.0.1/src/mpfr-mini-gmp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr-mini-gmp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr-mini-gmp.c -- Interface functions for mini-gmp. -Copyright 2014-2018 Free Software Foundation, Inc. +Copyright 2014-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* The following include will do 2 things: include the config.h diff -Nru mpfr4-4.0.1/src/mpfr-mini-gmp.h mpfr4-4.0.2/src/mpfr-mini-gmp.h --- mpfr4-4.0.1/src/mpfr-mini-gmp.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr-mini-gmp.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr-mini-gmp.h -- Interface header for mini-gmp. -Copyright 2014-2018 Free Software Foundation, Inc. +Copyright 2014-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* for size_t */ diff -Nru mpfr4-4.0.1/src/mpfr-sassert.h mpfr4-4.0.2/src/mpfr-sassert.h --- mpfr4-4.0.1/src/mpfr-sassert.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr-sassert.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* MPFR internal header related to Static Assertions -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __MPFR_STATIC_ASSERT_H__ diff -Nru mpfr4-4.0.1/src/mpfr-thread.h mpfr4-4.0.2/src/mpfr-thread.h --- mpfr4-4.0.1/src/mpfr-thread.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mpfr-thread.h 2019-01-27 18:30:16.000000000 +0000 @@ -1,6 +1,6 @@ /* MPFR internal header related to thread-local variables. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __MPFR_THREAD_H__ @@ -53,45 +53,32 @@ /* ISO C11 version */ /**************************************************************************/ /**************************************************************************/ -#if defined (MPFR_HAVE_C11_LOCK) -/* NOTE: This version has not been completly tested */ -#include - -#define MPFR_LOCK_DECL(_lock) \ - mtx_t _lock; -#define MPFR_LOCK_INIT(_lock) do { \ - int error_code = mtx_init(&(_lock), mtx_plain); \ - MPFR_ASSERTD( error_code == thrd_success); \ - } while (0) - -#define MPFR_LOCK_CLEAR(_lock) do { \ - mtx_destroy(&(_lock)); \ - } while (0) +#if defined (MPFR_HAVE_C11_LOCK) +/* NOTE: This version has not been completely tested */ -#define MPFR_LOCK_READ(_lock) do { \ - int error_code = mtx_lock(&(_lock)); \ - MPFR_ASSERTD(error_code == thrd_success); \ - } while (0) +#define MPFR_THREAD_LOCK_METHOD "C11" -#define MPFR_UNLOCK_READ(_lock) do { \ - int error_code = mtx_unlock(&(_lock)); \ - MPFR_ASSERTD(error_code == thrd_success); \ - } while (0) +#include -#define MPFR_LOCK_WRITE(_lock) do { \ - int error_code = mtx_lock(&(_lock)); \ - MPFR_ASSERTD(error_code == thrd_success); \ - } while (0) +#define MPFR_LOCK_DECL(_lock) \ + mtx_t _lock; -#define MPFR_UNLOCK_WRITE(_lock) do { \ - int error_code = mtx_unlock(&(_lock)); \ - MPFR_ASSERTD(error_code == thrd_success); \ +#define MPFR_LOCK_C(E) \ + do { \ + if ((E) != thrd_success) \ + abort (); \ } while (0) -#define MPFR_LOCK_READ2WRITE(_lock) +#define MPFR_LOCK_INIT(_lock) MPFR_LOCK_C(mtx_init(&(_lock), mtx_plain)) +#define MPFR_LOCK_CLEAR(_lock) do { mtx_destroy(&(_lock)); } while (0) +#define MPFR_LOCK_READ(_lock) MPFR_LOCK_C(mtx_lock(&(_lock))) +#define MPFR_UNLOCK_READ(_lock) MPFR_LOCK_C(mtx_unlock(&(_lock))) +#define MPFR_LOCK_WRITE(_lock) MPFR_LOCK_C(mtx_lock(&(_lock))) +#define MPFR_UNLOCK_WRITE(_lock) MPFR_LOCK_C(mtx_unlock(&(_lock))) -#define MPFR_LOCK_WRITE2READ(_lock) +#define MPFR_LOCK_READ2WRITE(_lock) do {} while (0) +#define MPFR_LOCK_WRITE2READ(_lock) do {} while (0) #define MPFR_ONCE_DECL(_once) \ once_flag _once; @@ -110,40 +97,32 @@ /* POSIX version */ /**************************************************************************/ /**************************************************************************/ + #elif defined (HAVE_PTHREAD) -# include -#define MPFR_LOCK_DECL(_lock) \ - pthread_rwlock_t _lock; +#define MPFR_THREAD_LOCK_METHOD "pthread" -#define MPFR_LOCK_INIT(_lock) do { \ - int error_code = pthread_rwlock_init(&(_lock), NULL); \ - MPFR_ASSERTD( error_code == 0); \ - } while (0) +#include -#define MPFR_LOCK_CLEAR(_lock) do { \ - pthread_rwlock_destroy(&(_lock)); \ - } while (0) +#define MPFR_LOCK_DECL(_lock) \ + pthread_rwlock_t _lock; -#define MPFR_LOCK_READ(_lock) do { \ - int error_code = pthread_rwlock_rdlock(&(_lock)); \ - MPFR_ASSERTD(error_code == 0); \ +#define MPFR_LOCK_C(E) \ + do { \ + if ((E) != 0) \ + abort (); \ } while (0) -#define MPFR_UNLOCK_READ(_lock) do { \ - int error_code = pthread_rwlock_unlock(&(_lock)); \ - MPFR_ASSERTD(error_code == 0); \ - } while (0) +#define MPFR_LOCK_INIT(_lock) MPFR_LOCK_C(pthread_rwlock_init(&(_lock), NULL)) -#define MPFR_LOCK_WRITE(_lock) do { \ - int error_code = pthread_rwlock_wrlock(&(_lock)); \ - MPFR_ASSERTD(error_code == 0); \ +#define MPFR_LOCK_CLEAR(_lock) do { \ + pthread_rwlock_destroy(&(_lock)); \ } while (0) -#define MPFR_UNLOCK_WRITE(_lock) do { \ - int error_code = pthread_rwlock_unlock(&(_lock)); \ - MPFR_ASSERTD(error_code == 0); \ - } while (0) +#define MPFR_LOCK_READ(_lock) MPFR_LOCK_C(pthread_rwlock_rdlock(&(_lock))) +#define MPFR_UNLOCK_READ(_lock) MPFR_LOCK_C(pthread_rwlock_unlock(&(_lock))) +#define MPFR_LOCK_WRITE(_lock) MPFR_LOCK_C(pthread_rwlock_wrlock(&(_lock))) +#define MPFR_UNLOCK_WRITE(_lock) MPFR_LOCK_C(pthread_rwlock_unlock(&(_lock))) #define MPFR_LOCK_READ2WRITE(_lock) do { \ MPFR_UNLOCK_READ(_lock); \ @@ -160,10 +139,8 @@ #define MPFR_ONCE_INIT_VALUE PTHREAD_ONCE_INIT -#define MPFR_ONCE_CALL(_once, _func) do { \ - int error_code = pthread_once (&(_once), (_func)); \ - MPFR_ASSERTD (error_code == 0); \ - } while (0) +#define MPFR_ONCE_CALL(_once, _func) \ + MPFR_LOCK_C(pthread_once (&(_once), (_func))) #define MPFR_NEED_DEFERRED_INIT 1 diff -Nru mpfr4-4.0.1/src/mpn_exp.c mpfr4-4.0.2/src/mpn_exp.c --- mpfr4-4.0.1/src/mpn_exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mpn_exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_mpn_exp -- auxiliary function for mpfr_get_str and mpfr_set_str -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/mul_2exp.c mpfr4-4.0.2/src/mul_2exp.c --- mpfr4-4.0.1/src/mul_2exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mul_2exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_mul_2exp -- multiply a floating-point number by a power of two -Copyright 1999, 2001, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/mul_2si.c mpfr4-4.0.2/src/mul_2si.c --- mpfr4-4.0.1/src/mul_2si.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mul_2si.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_mul_2si -- multiply a floating-point number by a power of two -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/mul_2ui.c mpfr4-4.0.2/src/mul_2ui.c --- mpfr4-4.0.1/src/mul_2ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mul_2ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_mul_2ui -- multiply a floating-point number by a power of two -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/mul.c mpfr4-4.0.2/src/mul.c --- mpfr4-4.0.1/src/mul.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mul.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_mul -- multiply two floating-point numbers -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -180,10 +180,17 @@ } else if (! mpfr_equal_p (ta, a) || ! SAME_SIGN (inexact1, inexact2)) { + /* We do not have MPFR_PREC_FSPEC, so let's use mpfr_eexp_t and + MPFR_EXP_FSPEC since mpfr_prec_t values are guaranteed to be + representable in mpfr_exp_t, thus in mpfr_eexp_t. */ fprintf (stderr, "mpfr_mul return different values for %s\n" - "Prec_a = %lu, Prec_b = %lu, Prec_c = %lu\nb = ", + "Prec_a = %" MPFR_EXP_FSPEC "d, " + "Prec_b = %" MPFR_EXP_FSPEC "d, " + "Prec_c = %" MPFR_EXP_FSPEC "d\nb = ", mpfr_print_rnd_mode (rnd_mode), - MPFR_PREC (a), MPFR_PREC (b), MPFR_PREC (c)); + (mpfr_eexp_t) MPFR_PREC (a), + (mpfr_eexp_t) MPFR_PREC (b), + (mpfr_eexp_t) MPFR_PREC (c)); mpfr_fdump (stderr, b); fprintf (stderr, "c = "); mpfr_fdump (stderr, c); diff -Nru mpfr4-4.0.1/src/mul_d.c mpfr4-4.0.2/src/mul_d.c --- mpfr4-4.0.1/src/mul_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mul_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_mul_d -- multiply a multiple precision floating-point number by a machine double precision float -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/mulders.c mpfr4-4.0.2/src/mulders.c --- mpfr4-4.0.1/src/mulders.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mulders.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Mulders' short product, square and division. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* References: diff -Nru mpfr4-4.0.1/src/mul_ui.c mpfr4-4.0.2/src/mul_ui.c --- mpfr4-4.0.1/src/mul_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/mul_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_mul_ui -- multiply a floating-point number by a machine integer -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/neg.c mpfr4-4.0.2/src/neg.c --- mpfr4-4.0.1/src/neg.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/neg.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_neg -- change the sign of a floating-point number -Copyright 1999-2001, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2001, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/next.c mpfr4-4.0.2/src/next.c --- mpfr4-4.0.1/src/next.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/next.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_nextabove, mpfr_nextbelow, mpfr_nexttoward -- next representable floating-point number -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Note concerning the exceptions: In case of NaN result, the NaN flag is diff -Nru mpfr4-4.0.1/src/nrandom.c mpfr4-4.0.2/src/nrandom.c --- mpfr4-4.0.1/src/nrandom.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/nrandom.c 2019-01-07 13:53:20.000000000 +0000 @@ -2,7 +2,7 @@ and variance 1 and round it to the precision of rop according to the given rounding mode. -Copyright 2013-2018 Free Software Foundation, Inc. +Copyright 2013-2019 Free Software Foundation, Inc. Contributed by Charles Karney , SRI International. This file is part of the GNU MPFR Library. @@ -19,7 +19,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* diff -Nru mpfr4-4.0.1/src/odd_p.c mpfr4-4.0.2/src/odd_p.c --- mpfr4-4.0.1/src/odd_p.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/odd_p.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_odd_p -- check for odd integers -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/out_str.c mpfr4-4.0.2/src/out_str.c --- mpfr4-4.0.1/src/out_str.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/out_str.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_out_str -- output a floating-point number to a stream -Copyright 1999, 2001-2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" @@ -43,10 +43,6 @@ MPFR_ASSERTN (base >= 2 && base <= 62); - /* when stream=NULL, output to stdout */ - if (stream == NULL) - stream = stdout; - if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op))) { if (MPFR_IS_NAN (op)) diff -Nru mpfr4-4.0.1/src/pool.c mpfr4-4.0.2/src/pool.c --- mpfr4-4.0.1/src/pool.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/pool.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpz_t pool -Copyright 2014-2018 Free Software Foundation, Inc. +Copyright 2014-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_POOL_DONT_REDEFINE diff -Nru mpfr4-4.0.1/src/pow.c mpfr4-4.0.2/src/pow.c --- mpfr4-4.0.1/src/pow.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/pow.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_pow -- power function x^y -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/powerof2.c mpfr4-4.0.2/src/powerof2.c --- mpfr4-4.0.1/src/powerof2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/powerof2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_powerof2_raw -- test whether a floating-point number is a power of 2 -Copyright 2002-2018 Free Software Foundation, Inc. +Copyright 2002-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/powerpc32/mparam.h mpfr4-4.0.2/src/powerpc32/mparam.h --- mpfr4-4.0.1/src/powerpc32/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/powerpc32/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2010-10-22, gcc 4.2.4, gmp 5.0.1 */ diff -Nru mpfr4-4.0.1/src/powerpc64/mparam.h mpfr4-4.0.2/src/powerpc64/mparam.h --- mpfr4-4.0.1/src/powerpc64/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/powerpc64/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2011-07-31, gcc 4.3.2 */ @@ -88,7 +88,7 @@ 832,832,831,832,832,832,832,831,832,830,832,832,832,832,832,832, \ 832,832,832,832,832,832,832,831,832,832,832,832,832,832,832,832, \ 832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,0,0,0,0,0,0,0,0,0,0,0,10,9, \ 10,10,12,12,12,12,14,13,14,14,15,15,16,16,17,17, \ @@ -154,7 +154,7 @@ 568,568,592,592,592,592,568,592,568,568,592,568,568,592,568,592, \ 568,568,592,592,544,568,592,592,592,592,592,568,592,592,592,592, \ 592,592,591,592,592,592,592,592,592,592,592,568,592,592,592,568 \ - + #define MPFR_DIVHIGH_TAB \ 0,1,2,3,4,5,6,7,6,9,8,9,10,8,12,13, \ 10,10,11,12,13,14,14,13,15,14,15,17,17,18,19,20, \ @@ -220,7 +220,7 @@ 512,513,576,512,512,513,514,512,512,576,576,512,513,576,513,515, \ 552,552,576,512,512,512,564,513,564,576,576,576,564,576,564,576, \ 564,512,576,564,564,576,576,564,564,576,564,576,564,576,551,576 \ - + #define MPFR_MUL_THRESHOLD 1 /* limbs */ #define MPFR_SQR_THRESHOLD 5 /* limbs */ #define MPFR_DIV_THRESHOLD 17 /* limbs */ diff -Nru mpfr4-4.0.1/src/pow_si.c mpfr4-4.0.2/src/pow_si.c --- mpfr4-4.0.1/src/pow_si.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/pow_si.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_pow_si -- power function x^y with y a signed int -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/pow_ui.c mpfr4-4.0.2/src/pow_ui.c --- mpfr4-4.0.1/src/pow_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/pow_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_pow_ui-- compute the power of a floating-point by a machine integer -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/pow_z.c mpfr4-4.0.2/src/pow_z.c --- mpfr4-4.0.1/src/pow_z.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/pow_z.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_pow_z -- power function x^z with z a MPZ -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/printf.c mpfr4-4.0.2/src/printf.c --- mpfr4-4.0.1/src/printf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/printf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Formatted output functions (printf functions family). -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff -Nru mpfr4-4.0.1/src/print_raw.c mpfr4-4.0.2/src/print_raw.c --- mpfr4-4.0.1/src/print_raw.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/print_raw.c 2019-01-07 13:53:20.000000000 +0000 @@ -2,7 +2,7 @@ of a significand of floating-point number (for the tests and debugging purpose) -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -19,7 +19,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/print_rnd_mode.c mpfr4-4.0.2/src/print_rnd_mode.c --- mpfr4-4.0.1/src/print_rnd_mode.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/print_rnd_mode.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_print_rnd_mode -- convert a given rounding mode to a string -Copyright 1999, 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/random_deviate.c mpfr4-4.0.2/src/random_deviate.c --- mpfr4-4.0.1/src/random_deviate.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/random_deviate.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* random_deviate routines for mpfr_erandom and mpfr_nrandom. -Copyright 2013-2018 Free Software Foundation, Inc. +Copyright 2013-2019 Free Software Foundation, Inc. Contributed by Charles Karney , SRI International. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* diff -Nru mpfr4-4.0.1/src/random_deviate.h mpfr4-4.0.2/src/random_deviate.h --- mpfr4-4.0.1/src/random_deviate.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/random_deviate.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Declarations of random_deviate routines for mpfr_erandom and mpfr_nrandom. -Copyright 2013-2018 Free Software Foundation, Inc. +Copyright 2013-2019 Free Software Foundation, Inc. Contributed by Charles Karney , SRI International. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #if !defined(MPFR_RANDOM_DEVIATE_H) diff -Nru mpfr4-4.0.1/src/rec_sqrt.c mpfr4-4.0.2/src/rec_sqrt.c --- mpfr4-4.0.1/src/rec_sqrt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/rec_sqrt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_rec_sqrt -- inverse square root -Copyright 2008-2018 Free Software Foundation, Inc. +Copyright 2008-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H /* for umul_ppmm */ diff -Nru mpfr4-4.0.1/src/reldiff.c mpfr4-4.0.2/src/reldiff.c --- mpfr4-4.0.1/src/reldiff.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/reldiff.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_reldiff -- compute relative difference of two floating-point numbers. -Copyright 2000-2001, 2004-2018 Free Software Foundation, Inc. +Copyright 2000-2001, 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/rem1.c mpfr4-4.0.2/src/rem1.c --- mpfr4-4.0.1/src/rem1.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/rem1.c 2019-01-07 13:53:20.000000000 +0000 @@ -2,7 +2,7 @@ mpfr_fmod -- compute the floating-point remainder of x/y mpfr_remquo and mpfr_remainder -- argument reduction functions -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -19,7 +19,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ # include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/rint.c mpfr4-4.0.2/src/rint.c --- mpfr4-4.0.1/src/rint.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/rint.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_rint -- Round to an integer. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/rndna.c mpfr4-4.0.2/src/rndna.c --- mpfr4-4.0.1/src/rndna.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/rndna.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_round_nearest_away -- round to nearest away -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/root.c mpfr4-4.0.2/src/root.c --- mpfr4-4.0.1/src/root.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/root.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_root -- kth root. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/round_near_x.c mpfr4-4.0.2/src/round_near_x.c --- mpfr4-4.0.1/src/round_near_x.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/round_near_x.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_round_near_x -- Round a floating point number nears another one. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/round_p.c mpfr4-4.0.2/src/round_p.c --- mpfr4-4.0.1/src/round_p.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/round_p.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_round_p -- check if an approximation is roundable. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/round_prec.c mpfr4-4.0.2/src/round_prec.c --- mpfr4-4.0.1/src/round_prec.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/round_prec.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_round_raw_generic, mpfr_round_raw2, mpfr_round_raw, mpfr_prec_round, mpfr_can_round, mpfr_can_round_raw -- various rounding functions -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/round_raw_generic.c mpfr4-4.0.2/src/round_raw_generic.c --- mpfr4-4.0.1/src/round_raw_generic.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/round_raw_generic.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_round_raw_generic -- Generic rounding function -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef flag diff -Nru mpfr4-4.0.1/src/scale2.c mpfr4-4.0.2/src/scale2.c --- mpfr4-4.0.1/src/scale2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/scale2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_scale2 -- multiply a double float by 2^exp -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* for DBL_EPSILON */ diff -Nru mpfr4-4.0.1/src/sec.c mpfr4-4.0.2/src/sec.c --- mpfr4-4.0.1/src/sec.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sec.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sec - secant function = 1/cos. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define FUNCTION mpfr_sec diff -Nru mpfr4-4.0.1/src/sech.c mpfr4-4.0.2/src/sech.c --- mpfr4-4.0.1/src/sech.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sech.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sech - Hyperbolic secant function = 1/cosh. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* The hyperbolic secant function is defined by sech(x)=1/cosh(x): diff -Nru mpfr4-4.0.1/src/set.c mpfr4-4.0.2/src/set.c --- mpfr4-4.0.1/src/set.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set -- copy of a floating-point number -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" @@ -80,15 +80,20 @@ return mpfr_set4 (a, b, rnd_mode, MPFR_SIGN_POS); } -/* Round (u, inex) into s with rounding mode rnd, where inex is the ternary - value associated to u with the *same* rounding mode. +/* Round (u, inex) into s with rounding mode rnd_mode, where inex is + the ternary value associated with u, which has been obtained using + the *same* rounding mode rnd_mode. Assumes PREC(u) = 2*PREC(s). - The main algorithm is the following: - rnd=RNDZ: inex2 = mpfr_set (s, u, rnd_mode); return inex2 | inex; - (a negative value, if any, is preserved in inex2 | inex) - rnd=RNDA: idem - rnd=RNDN: inex2 = mpfr_set (s, u, rnd_mode); - if (inex2) return inex2; else return inex; */ + The generic algorithm is the following: + 1. inex2 = mpfr_set (s, u, rnd_mode); + 2. if (inex2 != 0) return inex2; else return inex; + except in the double-rounding case: in MPFR_RNDN, when u is in the + middle of two consecutive PREC(s)-bit numbers, if inex and inex2 + are both > 0 (resp. both < 0), we correct s to nextbelow(s) (resp. + nextabove(s)), and return the opposite of inex. + Note: this function can be called with rnd_mode == MPFR_RNDF, in + which case, the rounding direction and the returned ternary value + are unspecified. */ int mpfr_set_1_2 (mpfr_ptr s, mpfr_srcptr u, mpfr_rnd_t rnd_mode, int inex) { @@ -106,9 +111,9 @@ return inex; } - MPFR_ASSERTD(MPFR_PREC(u) == 2 * MPFR_PREC(s)); + MPFR_ASSERTD(MPFR_PREC(u) == 2 * p); - if (MPFR_PREC(s) < GMP_NUMB_BITS) + if (p < GMP_NUMB_BITS) { mask = MPFR_LIMB_MASK(sh); @@ -194,6 +199,19 @@ /* general case PREC(s) >= GMP_NUMB_BITS */ inex2 = mpfr_set (s, u, rnd_mode); - return (rnd_mode != MPFR_RNDN) ? inex | inex2 - : (inex2) ? inex2 : inex; + /* Check the double-rounding case, i.e. with u = middle of two + consecutive PREC(s)-bit numbers, which is equivalent to u being + exactly representable on PREC(s) + 1 bits but not on PREC(s) bits. + Moreover, since PREC(u) = 2*PREC(s), u and s cannot be identical + (as pointers), thus u was not changed. */ + if (rnd_mode == MPFR_RNDN && inex * inex2 > 0 && + mpfr_min_prec (u) == p + 1) + { + if (inex > 0) + mpfr_nextbelow (s); + else + mpfr_nextabove (s); + return -inex; + } + return inex2 != 0 ? inex2 : inex; } diff -Nru mpfr4-4.0.1/src/set_d64.c mpfr4-4.0.2/src/set_d64.c --- mpfr4-4.0.1/src/set_d64.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_d64.c 2019-01-07 13:53:20.000000000 +0000 @@ -5,7 +5,7 @@ https://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html, and TR 24732 . -Copyright 2006-2018 Free Software Foundation, Inc. +Copyright 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -22,7 +22,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -425,7 +425,7 @@ 1 character for terminating \0. */ decimal64_to_string (s, d); - return mpfr_set_str (r, s, 10, rnd_mode); + return mpfr_strtofr (r, s, NULL, 10, rnd_mode); } #endif /* MPFR_WANT_DECIMAL_FLOATS */ diff -Nru mpfr4-4.0.1/src/set_d.c mpfr4-4.0.2/src/set_d.c --- mpfr4-4.0.1/src/set_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_set_d -- convert a machine double precision float to a multiple precision floating-point number -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* For DOUBLE_ISINF and DOUBLE_ISNAN */ diff -Nru mpfr4-4.0.1/src/set_dfl_prec.c mpfr4-4.0.2/src/set_dfl_prec.c --- mpfr4-4.0.1/src/set_dfl_prec.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_dfl_prec.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_default_prec, mpfr_get_default_prec -- set/get default precision -Copyright 1999-2001, 2004-2018 Free Software Foundation, Inc. +Copyright 1999-2001, 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_exp.c mpfr4-4.0.2/src/set_exp.c --- mpfr4-4.0.1/src/set_exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_exp - set the exponent of a floating-point number -Copyright 2002-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2002-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_f.c mpfr4-4.0.2/src/set_f.c --- mpfr4-4.0.1/src/set_f.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_f.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_f -- set a MPFR number from a GNU MPF number -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/set_float128.c mpfr4-4.0.2/src/set_float128.c --- mpfr4-4.0.1/src/set_float128.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_float128.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_set_float128 -- convert a machine __float128 number to a multiple precision floating-point number -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* for DBL_MAX */ diff -Nru mpfr4-4.0.1/src/set_flt.c mpfr4-4.0.2/src/set_flt.c --- mpfr4-4.0.1/src/set_flt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_flt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_flt -- convert a machine single precision float to mpfr_t -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_inf.c mpfr4-4.0.2/src/set_inf.c --- mpfr4-4.0.1/src/set_inf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_inf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_inf -- set a number to plus or minus infinity. -Copyright 2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_ld.c mpfr4-4.0.2/src/set_ld.c --- mpfr4-4.0.1/src/set_ld.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_ld.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_set_ld -- convert a machine long double to a multiple precision floating-point number -Copyright 2002-2018 Free Software Foundation, Inc. +Copyright 2002-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* needed so that MPFR_LDBL_MANT_DIG is correctly defined */ diff -Nru mpfr4-4.0.1/src/setmax.c mpfr4-4.0.2/src/setmax.c --- mpfr4-4.0.1/src/setmax.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/setmax.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_setmax -- maximum representable floating-point number (raw version) -Copyright 2002-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2002-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/setmin.c mpfr4-4.0.2/src/setmin.c --- mpfr4-4.0.1/src/setmin.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/setmin.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_setmin -- minimum representable floating-point number (raw version) -Copyright 2002-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2002-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_nan.c mpfr4-4.0.2/src/set_nan.c --- mpfr4-4.0.1/src/set_nan.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_nan.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_nan -- set a number to NaN. -Copyright 2002, 2006-2018 Free Software Foundation, Inc. +Copyright 2002, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/set_prc_raw.c mpfr4-4.0.2/src/set_prc_raw.c --- mpfr4-4.0.1/src/set_prc_raw.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_prc_raw.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_prec_raw -- reset the precision of a floating-point number -Copyright 2000-2001, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2001, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_prec.c mpfr4-4.0.2/src/set_prec.c --- mpfr4-4.0.1/src/set_prec.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_prec.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_prec -- reset the precision of a floating-point number -Copyright 1999, 2001-2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_q.c mpfr4-4.0.2/src/set_q.c --- mpfr4-4.0.1/src/set_q.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_q.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_q -- set a floating-point number from a multiple-precision rational -Copyright 2000-2002, 2004-2018 Free Software Foundation, Inc. +Copyright 2000-2002, 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/set_rnd.c mpfr4-4.0.2/src/set_rnd.c --- mpfr4-4.0.1/src/set_rnd.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_rnd.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_set_default_rounding_mode -- set the default rounding mode mpfr_get_default_rounding_mode -- get the default rounding mode -Copyright 1999, 2001, 2004-2018 Free Software Foundation, Inc. +Copyright 1999, 2001, 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_si_2exp.c mpfr4-4.0.2/src/set_si_2exp.c --- mpfr4-4.0.1/src/set_si_2exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_si_2exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_set_si_2exp -- set a MPFR number from a machine signed integer with a shift -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/set_si.c mpfr4-4.0.2/src/set_si.c --- mpfr4-4.0.1/src/set_si.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_si.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_si -- set a MPFR number from a machine signed integer -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/setsign.c mpfr4-4.0.2/src/setsign.c --- mpfr4-4.0.1/src/setsign.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/setsign.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_setsign -- Produce a value with the magnitude of x and sign bit s -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_sj.c mpfr4-4.0.2/src/set_sj.c --- mpfr4-4.0.1/src/set_sj.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_sj.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_sj -- set a MPFR number from a huge machine signed integer -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff -Nru mpfr4-4.0.1/src/set_str.c mpfr4-4.0.2/src/set_str.c --- mpfr4-4.0.1/src/set_str.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_str.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_str -- set a floating-point number from a string -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_str_raw.c mpfr4-4.0.2/src/set_str_raw.c --- mpfr4-4.0.1/src/set_str_raw.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_str_raw.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_str_binary -- set a floating-point number from a binary string -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_ui_2exp.c mpfr4-4.0.2/src/set_ui_2exp.c --- mpfr4-4.0.1/src/set_ui_2exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_ui_2exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_set_ui_2exp -- set a MPFR number from a machine unsigned integer with a shift -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/set_ui.c mpfr4-4.0.2/src/set_ui.c --- mpfr4-4.0.1/src/set_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_ui -- set a MPFR number from a machine unsigned integer -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_uj.c mpfr4-4.0.2/src/set_uj.c --- mpfr4-4.0.1/src/set_uj.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_uj.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_uj -- set a MPFR number from a huge machine unsigned integer -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H diff -Nru mpfr4-4.0.1/src/set_z.c mpfr4-4.0.2/src/set_z.c --- mpfr4-4.0.1/src/set_z.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_z.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_z -- set a floating-point number from a multiple-precision integer -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_zero.c mpfr4-4.0.2/src/set_zero.c --- mpfr4-4.0.1/src/set_zero.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_zero.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_zero -- set a number to plus or minus zero. -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/set_z_exp.c mpfr4-4.0.2/src/set_z_exp.c --- mpfr4-4.0.1/src/set_z_exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/set_z_exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_set_z_2exp -- set a floating-point number from a multiple-precision integer and an exponent -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/sgn.c mpfr4-4.0.2/src/sgn.c --- mpfr4-4.0.1/src/sgn.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sgn.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sgn -- Sign of a floating point number. -Copyright 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/signbit.c mpfr4-4.0.2/src/signbit.c --- mpfr4-4.0.1/src/signbit.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/signbit.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_signbit -- Signbit of a MPFR number -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/sin.c mpfr4-4.0.2/src/sin.c --- mpfr4-4.0.1/src/sin.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sin.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sin -- sine of a floating-point number -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/sin_cos.c mpfr4-4.0.2/src/sin_cos.c --- mpfr4-4.0.1/src/sin_cos.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sin_cos.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sin_cos -- sine and cosine of a floating-point number -Copyright 2002-2018 Free Software Foundation, Inc. +Copyright 2002-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/sinh.c mpfr4-4.0.2/src/sinh.c --- mpfr4-4.0.1/src/sinh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sinh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sinh -- hyperbolic sine -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/sinh_cosh.c mpfr4-4.0.2/src/sinh_cosh.c --- mpfr4-4.0.1/src/sinh_cosh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sinh_cosh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sinh_cosh -- hyperbolic sine and cosine -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/si_op.c mpfr4-4.0.2/src/si_op.c --- mpfr4-4.0.1/src/si_op.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/si_op.c 2019-01-07 13:53:20.000000000 +0000 @@ -5,7 +5,7 @@ mpfr_div_si -- divide a floating-point number by a machine integer mpfr_si_div -- divide a machine number by a floating-point number -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -22,7 +22,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/sparc64/mparam.h mpfr4-4.0.2/src/sparc64/mparam.h --- mpfr4-4.0.1/src/sparc64/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sparc64/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2011-07-31, gcc 3.3.5 */ @@ -88,7 +88,7 @@ 791,792,792,792,791,792,792,792,791,792,792,792,791,792,791,791, \ 791,791,791,792,792,791,792,792,791,792,792,792,791,792,792,792, \ 792,791,792,792,791,792,792,856,792,792,792,856,792,791,792,856 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,0,0,-1,5,5,7,7,9,7,9,8,9,10, \ 11,10,11,11,13,12,13,13,17,14,16,16,16,16,17,18, \ @@ -154,7 +154,7 @@ 536,536,552,552,536,552,552,520,567,544,552,552,552,568,567,567, \ 568,568,567,567,568,568,535,584,568,512,568,567,512,568,567,568, \ 576,568,567,584,568,600,584,584,600,568,597,592,591,600,599,599 \ - + #define MPFR_DIVHIGH_TAB \ 0,1,2,3,4,5,6,7,6,7,8,9,10,11,12,13, \ 10,10,11,11,13,12,13,13,14,14,15,15,18,17,19,19, \ @@ -220,7 +220,7 @@ 542,542,542,542,544,544,544,560,542,542,575,543,544,544,544,542, \ 544,575,575,544,544,544,544,544,561,561,543,559,544,560,560,560, \ 608,587,573,575,575,608,583,585,560,575,585,575,588,573,608,577 \ - + #define MPFR_MUL_THRESHOLD 13 /* limbs */ #define MPFR_SQR_THRESHOLD 11 /* limbs */ #define MPFR_DIV_THRESHOLD 19 /* limbs */ diff -Nru mpfr4-4.0.1/src/sqr.c mpfr4-4.0.2/src/sqr.c --- mpfr4-4.0.1/src/sqr.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sqr.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sqr -- Floating-point square -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -161,15 +161,18 @@ if (MPFR_UNLIKELY(ax < __gmpfr_emin)) { /* As seen in mpfr_mul_1, we cannot have a0 = 111...111 here if there - was not exponent decrease (ax--) above. - In the case of an exponent decrease, it is not possible for - GMP_NUMB_BITS=32 since the largest b0 such that b0^2 < 2^(2*32-1) - is b0=3037000499, but its square has only 30 leading ones. - For GMP_NUMB_BITS=64 it is possible: the largest b0 is - 13043817825332782212, and its square has 64 leading ones. */ - if ((ax == __gmpfr_emin - 1) && (ap[0] == ~MPFR_LIMB_HIGHBIT) && - ((rnd_mode == MPFR_RNDN && rb) || - (MPFR_IS_LIKE_RNDA(rnd_mode, MPFR_IS_NEG (a)) && (rb | sb)))) + was not an exponent decrease (ax--) above. + In the case of an exponent decrease: + - For GMP_NUMB_BITS=32, a0 = 111...111 is not possible since the + largest b0 such that b0^2 < 2^(2*32-1) is b0=3037000499, but + its square has only 30 leading ones. + - For GMP_NUMB_BITS=64, a0 = 111...111 is possible: the largest b0 + is 13043817825332782212, and its square has 64 leading ones; but + since the next bit is rb=0, for RNDN, we always have an underflow. + For the test below, note that a is positive. + */ + if (ax == __gmpfr_emin - 1 && ap[0] == MPFR_LIMB_MAX && + MPFR_IS_LIKE_RNDA (rnd_mode, 0)) goto rounding; /* no underflow */ /* For RNDN, mpfr_underflow always rounds away, thus for |a| <= 2^(emin-2) we have to change to RNDZ. This corresponds to: diff -Nru mpfr4-4.0.1/src/sqrt.c mpfr4-4.0.2/src/sqrt.c --- mpfr4-4.0.1/src/sqrt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sqrt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sqrt -- square root of a floating-point number -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/sqrt_ui.c mpfr4-4.0.2/src/sqrt_ui.c --- mpfr4-4.0.1/src/sqrt_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sqrt_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sqrt_ui -- square root of a machine integer -Copyright 2000-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/stack_interface.c mpfr4-4.0.2/src/stack_interface.c --- mpfr4-4.0.1/src/stack_interface.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/stack_interface.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_stack -- initialize a floating-point number with given allocation area -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/strtofr.c mpfr4-4.0.2/src/strtofr.c --- mpfr4-4.0.1/src/strtofr.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/strtofr.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_strtofr -- set a floating-point number from a string -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* For isspace */ @@ -36,79 +36,80 @@ allocated for the mantissa field. */ size_t prec; /* length of mant (zero for +/-0) */ size_t alloc; /* allocation size of mantissa */ - mpfr_exp_t exp_base; /* number of digits before the point */ - mpfr_exp_t exp_bin; /* exponent in case base=2 or 16, and the pxxx - format is used (i.e., exponent is given in - base 10) */ + mpfr_exp_t exp_base; /* number of digits before the point, + exponent + except in case of binary exponent (exp_bin) */ + mpfr_exp_t exp_bin; /* binary exponent of the pxxx format for + base = 2 or 16 */ }; /* This table has been generated by the following program. For 2 <= b <= MPFR_MAX_BASE, RedInvLog2Table[b-2][0] / RedInvLog2Table[b-2][1] - is an upper approximation of log(2)/log(b). + is an upper approximation to log(2)/log(b), no larger than 1. + Note: these numbers must fit on 16 bits, thus unsigned int is OK. */ -static const unsigned long RedInvLog2Table[MPFR_MAX_BASE-1][2] = { - {1UL, 1UL}, - {53UL, 84UL}, - {1UL, 2UL}, - {4004UL, 9297UL}, - {53UL, 137UL}, - {2393UL, 6718UL}, - {1UL, 3UL}, - {665UL, 2108UL}, - {4004UL, 13301UL}, - {949UL, 3283UL}, - {53UL, 190UL}, - {5231UL, 19357UL}, - {2393UL, 9111UL}, - {247UL, 965UL}, - {1UL, 4UL}, - {4036UL, 16497UL}, - {665UL, 2773UL}, - {5187UL, 22034UL}, - {4004UL, 17305UL}, - {51UL, 224UL}, - {949UL, 4232UL}, - {3077UL, 13919UL}, - {53UL, 243UL}, - {73UL, 339UL}, - {5231UL, 24588UL}, - {665UL, 3162UL}, - {2393UL, 11504UL}, - {4943UL, 24013UL}, - {247UL, 1212UL}, - {3515UL, 17414UL}, - {1UL, 5UL}, - {4415UL, 22271UL}, - {4036UL, 20533UL}, - {263UL, 1349UL}, - {665UL, 3438UL}, - {1079UL, 5621UL}, - {5187UL, 27221UL}, - {2288UL, 12093UL}, - {4004UL, 21309UL}, - {179UL, 959UL}, - {51UL, 275UL}, - {495UL, 2686UL}, - {949UL, 5181UL}, - {3621UL, 19886UL}, - {3077UL, 16996UL}, - {229UL, 1272UL}, - {53UL, 296UL}, - {109UL, 612UL}, - {73UL, 412UL}, - {1505UL, 8537UL}, - {5231UL, 29819UL}, - {283UL, 1621UL}, - {665UL, 3827UL}, - {32UL, 185UL}, - {2393UL, 13897UL}, - {1879UL, 10960UL}, - {4943UL, 28956UL}, - {409UL, 2406UL}, - {247UL, 1459UL}, - {231UL, 1370UL}, - {3515UL, 20929UL} }; +static const unsigned int RedInvLog2Table[MPFR_MAX_BASE-1][2] = { + {1, 1}, + {53, 84}, + {1, 2}, + {4004, 9297}, + {53, 137}, + {2393, 6718}, + {1, 3}, + {665, 2108}, + {4004, 13301}, + {949, 3283}, + {53, 190}, + {5231, 19357}, + {2393, 9111}, + {247, 965}, + {1, 4}, + {4036, 16497}, + {665, 2773}, + {5187, 22034}, + {4004, 17305}, + {51, 224}, + {949, 4232}, + {3077, 13919}, + {53, 243}, + {73, 339}, + {5231, 24588}, + {665, 3162}, + {2393, 11504}, + {4943, 24013}, + {247, 1212}, + {3515, 17414}, + {1, 5}, + {4415, 22271}, + {4036, 20533}, + {263, 1349}, + {665, 3438}, + {1079, 5621}, + {5187, 27221}, + {2288, 12093}, + {4004, 21309}, + {179, 959}, + {51, 275}, + {495, 2686}, + {949, 5181}, + {3621, 19886}, + {3077, 16996}, + {229, 1272}, + {53, 296}, + {109, 612}, + {73, 412}, + {1505, 8537}, + {5231, 29819}, + {283, 1621}, + {665, 3827}, + {32, 185}, + {2393, 13897}, + {1879, 10960}, + {4943, 28956}, + {409, 2406}, + {247, 1459}, + {231, 1370}, + {3515, 20929} }; #if 0 #define N 8 int main () @@ -377,6 +378,13 @@ res = 1; MPFR_ASSERTD (pstr->exp_base >= 0); + /* FIXME: In the code below (both cases), if the exponent from the + string is large, it will be replaced by MPFR_EXP_MIN or MPFR_EXP_MAX, + i.e. it will have a different value. This may not change the result + in most cases, but there is no guarantee on very long strings when + mpfr_exp_t is a 32-bit type, as the exponent could be brought back + to the current exponent range. */ + /* an optional exponent (e or E, p or P, @) */ if ( (*str == '@' || (base <= 10 && (*str == 'e' || *str == 'E'))) && (!isspace((unsigned char) str[1])) ) @@ -445,112 +453,174 @@ static int parsed_string_to_mpfr (mpfr_t x, struct parsed_string *pstr, mpfr_rnd_t rnd) { - mpfr_prec_t prec; + mpfr_prec_t precx, prec, ysize_bits, pstr_size; mpfr_exp_t exp; - mpfr_exp_t ysize_bits; - mp_limb_t *y, *result; + mp_limb_t *result; int count, exact; - size_t pstr_size; - mp_size_t ysize, real_ysize; + mp_size_t ysize, real_ysize, diff_ysize; int res, err; + const int extra_limbs = GMP_NUMB_BITS >= 12 ? 1 : 2; /* see below */ MPFR_ZIV_DECL (loop); MPFR_TMP_DECL (marker); /* initialize the working precision */ - prec = MPFR_PREC (x) + MPFR_INT_CEIL_LOG2 (MPFR_PREC (x)); + precx = MPFR_GET_PREC (x); + prec = precx + MPFR_INT_CEIL_LOG2 (precx); - /* compute the value y of the leading characters as long as rounding is not - possible */ + /* Compute the value y of the leading characters as long as rounding is not + possible. + Note: We have some integer overflow checking using MPFR_EXP_MIN and + MPFR_EXP_MAX in this loop. Thanks to the large margin between these + extremal values of the mpfr_exp_t type and the valid minimum/maximum + exponents, such integer overflows would correspond to real underflow + or overflow on the result (possibly except in huge precisions, which + are disregarded here; anyway, in practice, such issues could occur + only with 32-bit precision and exponent types). Such checks could be + extended to real early underflow/overflow checking, in order to avoid + useless computations in such cases; in such a case, be careful that + the approximation errors need to be taken into account. */ MPFR_TMP_MARK(marker); MPFR_ZIV_INIT (loop, prec); for (;;) { - /* Set y to the value of the ~prec most significant bits of pstr->mant - (as long as we guarantee correct rounding, we don't need to get - exactly prec bits). */ + mp_limb_t *y0, *y; + + /* y will be regarded as a number with precision prec. */ ysize = MPFR_PREC2LIMBS (prec); /* prec bits corresponds to ysize limbs */ - ysize_bits = ysize * GMP_NUMB_BITS; - /* and to ysize_bits >= prec > MPFR_PREC (x) bits */ - /* we need to allocate one more limb to work around bug + ysize_bits = (mpfr_prec_t) ysize * GMP_NUMB_BITS; + MPFR_ASSERTD (ysize_bits >= prec); + /* and to ysize_bits >= prec > precx bits. */ + /* We need to allocate one more limb as specified by mpn_set_str + (a limb may be written in rp[rn]). Note that the manual of GMP + up to 5.1.3 was incorrect on this point. + See the following discussion: https://gmplib.org/list-archives/gmp-bugs/2013-December/003267.html */ - y = MPFR_TMP_LIMBS_ALLOC (2 * ysize + 2); - y += ysize; /* y has (ysize+2) allocated limbs */ + y0 = MPFR_TMP_LIMBS_ALLOC (2 * ysize + extra_limbs + 1); + y = y0 + ysize; /* y has (ysize + extra_limbs + 1) allocated limbs */ - /* pstr_size is the number of characters we read in pstr->mant - to have at least ysize full limbs. + /* pstr_size is the number of bytes we want to read from pstr->mant + to fill at least ysize full limbs with mpn_set_str. We must have base^(pstr_size-1) >= (2^(GMP_NUMB_BITS))^ysize (in the worst case, the first digit is one and all others are zero). i.e., pstr_size >= 1 + ysize*GMP_NUMB_BITS/log2(base) Since ysize ~ prec/GMP_NUMB_BITS and prec < Umax/2 => ysize*GMP_NUMB_BITS can not overflow. We compute pstr_size = 1 + ceil(ysize_bits * Num / Den) - where Num/Den >= 1/log2(base) - It is not exactly ceil(1/log2(base)) but could be one more (base 2) + where 1/log2(base) <= Num/Den <= 1 + It is not exactly ceil(1/log2(base)) but could be one more (base 2). Quite ugly since it tries to avoid overflow: let Num = RedInvLog2Table[pstr->base-2][0] and Den = RedInvLog2Table[pstr->base-2][1], and ysize_bits = a*Den+b, then ysize_bits * Num/Den = a*Num + (b * Num)/Den, thus ceil(ysize_bits * Num/Den) = a*Num + floor(b * Num + Den - 1)/Den + + Note: denoting m = pstr_size and n = ysize_bits, assuming we have + m = 1 + ceil(n/log2(b)), i.e., b^(m-1) >= 2^n > b^(m-2), then + b^(m-1)/2^n < b, and since we consider m characters of the input, + the corresponding part is less than b^m < b^2*2^n. + This implies that if b^2 < 2^GMP_NUMB_BITS, which for b <= 62 holds + for GMP_NUMB_BITS >= 12, we have real_ysize <= ysize+1 below + (this also implies that for GMP_NUMB_BITS >= 13, the number of bits + of y[real_ysize-1] below is less than GMP_NUMB_BITS, thus + count < GMP_NUMB_BITS). + Warning: for GMP_NUMB_BITS=8, we can have real_ysize = ysize + 2! + Hence the allocation above for ysize + extra_limbs limbs. */ { - unsigned long Num = RedInvLog2Table[pstr->base-2][0]; - unsigned long Den = RedInvLog2Table[pstr->base-2][1]; - pstr_size = ((ysize_bits / Den) * Num) - + (((ysize_bits % Den) * Num + Den - 1) / Den) + unsigned int Num = RedInvLog2Table[pstr->base-2][0]; + unsigned int Den = RedInvLog2Table[pstr->base-2][1]; + MPFR_ASSERTD (Num <= Den && Den <= 65535); /* thus no overflow */ + pstr_size = (ysize_bits / Den) * Num + + ((unsigned long) (ysize_bits % Den) * Num + Den - 1) / Den + 1; } - /* since pstr_size corresponds to at least ysize_bits full bits, - and ysize_bits > prec, the weight of the neglected part of - pstr->mant (if any) is < ulp(y) < ulp(x) */ - - /* if the number of wanted characters is more than what we have in - pstr->mant, round it down */ - if (pstr_size >= pstr->prec) + /* Since pstr_size corresponds to at least ysize_bits bits, + and ysize_bits >= prec, the weight of the neglected part of + pstr->mant (if any) is < ulp(y) < ulp(x). */ + + /* If the number of wanted bytes is more than what is available + in pstr->mant, i.e. pstr->prec, reduce it to pstr->prec. */ + if (pstr_size > pstr->prec) pstr_size = pstr->prec; - MPFR_ASSERTD (pstr_size == (mpfr_exp_t) pstr_size); - /* convert str into binary: note that pstr->mant is big endian, - thus no offset is needed */ + /* Convert str (potentially truncated to pstr_size) into binary. + Note that pstr->mant is big endian, thus no offset is needed. */ real_ysize = mpn_set_str (y, pstr->mant, pstr_size, pstr->base); - MPFR_ASSERTD (real_ysize <= ysize+1); - /* normalize y: warning we can even get ysize+1 limbs! */ + /* See above for the explanation of the following assertion. */ + MPFR_ASSERTD (real_ysize <= ysize + extra_limbs); + + /* The Boolean "exact" will attempt to track exactness of the result: + If it is true, then this means that the result is exact, allowing + termination, even though the rounding test may not succeed. + Conversely, if the result is exact, then "exact" will not + necessarily be true at the end of the Ziv loop, but we will need + to make sure that at some point, "exact" will be true in order to + guarantee termination. FIXME: check that. */ + /* First, consider the part of the input string that has been ignored. + Note that the trailing zeros have been removed in parse_string, so + that if something has been ignored, it must be non-zero. */ + exact = pstr_size == pstr->prec; + + /* Normalize y and set the initial value of its exponent exp, which + is 0 when y is not shifted. + Since pstr->mant was normalized, mpn_set_str guarantees that + the most significant limb is non-zero. */ MPFR_ASSERTD (y[real_ysize - 1] != 0); /* mpn_set_str guarantees this */ count_leading_zeros (count, y[real_ysize - 1]); - /* exact means that the number of limbs of the output of mpn_set_str - is less or equal to ysize */ - exact = real_ysize <= ysize; - if (exact) /* shift y to the left in that case y should be exact */ + diff_ysize = ysize - real_ysize; + MPFR_LOG_MSG (("diff_ysize = %ld\n", (long) diff_ysize)); + if (diff_ysize >= 0) { - /* we have enough limbs to store {y, real_ysize} */ - /* shift {y, num_limb} for count bits to the left */ + /* We have enough limbs to store {y, real_ysize} exactly + in {y, ysize}, so that we can do a left shift, without + losing any information ("exact" will not change). */ if (count != 0) - mpn_lshift (y + ysize - real_ysize, y, real_ysize, count); - if (real_ysize != ysize) + mpn_lshift (y + diff_ysize, y, real_ysize, count); + if (diff_ysize > 0) { if (count == 0) - mpn_copyd (y + ysize - real_ysize, y, real_ysize); - MPN_ZERO (y, ysize - real_ysize); + mpn_copyd (y + diff_ysize, y, real_ysize); + MPN_ZERO (y, diff_ysize); } - /* for each bit shift decrease exponent of y */ - /* (This should not overflow) */ - exp = - ((ysize - real_ysize) * GMP_NUMB_BITS + count); + /* exp = negation of the total shift count, avoiding overflows. */ + exp = - ((mpfr_exp_t) diff_ysize * GMP_NUMB_BITS + count); } - else /* shift y to the right, by doing this we might lose some - bits from the result of mpn_set_str (in addition to the - characters neglected from pstr->mant) */ + else { - /* shift {y, num_limb} for (GMP_NUMB_BITS - count) bits - to the right. FIXME: can we prove that count cannot be zero here, - since mpn_rshift does not accept a shift of GMP_NUMB_BITS? */ - MPFR_ASSERTD (count != 0); - exact = mpn_rshift (y, y, real_ysize, GMP_NUMB_BITS - count) == - MPFR_LIMB_ZERO; - /* for each bit shift increase exponent of y */ - exp = GMP_NUMB_BITS - count; + /* Shift {y, real_ysize} for (GMP_NUMB_BITS - count) bits to the + right, and put the ysize most significant limbs into {y, ysize}. + We have either real_ysize = ysize + 1 or real_ysize = ysize + 2 + (only possible with extra_limbs == 2). */ + MPFR_ASSERTD (diff_ysize == -1 || + (extra_limbs == 2 && diff_ysize == -2)); + if (count != 0) + { + /* Before doing the shift, consider the limb that will entirely + be lost if real_ysize = ysize + 2. */ + exact = exact && (diff_ysize == -1 || y[0] == MPFR_LIMB_ZERO); + /* mpn_rshift allows overlap, provided destination <= source */ + /* FIXME: The bits lost due to mpn_rshift are not taken + into account in the error analysis below! */ + if (mpn_rshift (y, y - (diff_ysize + 1), real_ysize, + GMP_NUMB_BITS - count) != MPFR_LIMB_ZERO) + exact = 0; /* some non-zero bits have been shifted out */ + } + else + { + /* the case real_ysize = ysize + 2 with count = 0 cannot happen + even with GMP_NUMB_BITS = 8 since 62^2 < 256^2/2 */ + MPFR_ASSERTD (diff_ysize == -1); + exact = exact && y[0] == MPFR_LIMB_ZERO; + /* copy {y+real_ysize-ysize, ysize} to {y, ysize} */ + mpn_copyi (y, y + 1, real_ysize - 1); + } + /* exp = shift count */ + /* TODO: add some explanations about what exp means exactly. */ + exp = GMP_NUMB_BITS * (- diff_ysize) - count; } /* compute base^(exp_base - pstr_size) on n limbs */ @@ -560,6 +630,8 @@ int pow2; mpfr_exp_t tmp; + MPFR_LOG_MSG (("case 1 (base = power of 2)\n", 0)); + count_leading_zeros (pow2, (mp_limb_t) pstr->base); pow2 = GMP_NUMB_BITS - pow2 - 1; /* base = 2^pow2 */ MPFR_ASSERTD (0 < pow2 && pow2 <= 5); @@ -596,10 +668,12 @@ mp_limb_t *z; mpfr_exp_t exp_z; + MPFR_LOG_MSG (("case 2 (exp_base > pstr_size)\n", 0)); + result = MPFR_TMP_LIMBS_ALLOC (2 * ysize + 1); /* z = base^(exp_base-sptr_size) using space allocated at y-ysize */ - z = y - ysize; + z = y0; /* NOTE: exp_base-pstr_size can't overflow since pstr_size > 0 */ err = mpfr_mpn_exp (z, &exp_z, pstr->base, pstr->exp_base - pstr_size, ysize); @@ -646,8 +720,7 @@ /* if the low ysize limbs of {result, 2*ysize} are all zero, then the result is still "exact" (if it was before) */ - exact = exact && (mpn_scan1 (result, 0) - >= (unsigned long) ysize_bits); + exact = exact && (mpn_scan1 (result, 0) >= ysize_bits); result += ysize; } /* case exp_base < pstr_size */ @@ -656,11 +729,12 @@ mp_limb_t *z; mpfr_exp_t exp_z; + MPFR_LOG_MSG (("case 3 (exp_base < pstr_size)\n", 0)); + result = MPFR_TMP_LIMBS_ALLOC (3 * ysize + 1); - /* set y to y * K^ysize */ - y = y - ysize; /* we have allocated ysize limbs at y - ysize */ - MPN_ZERO (y, ysize); + /* y0 = y * K^ysize */ + MPN_ZERO (y0, ysize); /* pstr_size - pstr->exp_base can overflow */ MPFR_SADD_OVERFLOW (exp_z, (mpfr_exp_t) pstr_size, -pstr->exp_base, @@ -668,33 +742,35 @@ MPFR_EXP_MIN, MPFR_EXP_MAX, goto underflow, goto overflow); - /* (z, exp_z) = base^(exp_base-pstr_size) */ + /* (z, exp_z) = base^(pstr_size - exp_base) */ z = result + 2*ysize + 1; err = mpfr_mpn_exp (z, &exp_z, pstr->base, exp_z, ysize); - /* Since we want y/z rounded toward zero, we must get an upper - bound of z. If err >= 0, the error on z is bounded by 2^err. */ - if (err >= 0) - { - mp_limb_t cy; - unsigned long h = err / GMP_NUMB_BITS; - unsigned long l = err - h * GMP_NUMB_BITS; - - if (h >= ysize) /* not enough precision in z */ - goto next_loop; - cy = mpn_add_1 (z, z, ysize - h, MPFR_LIMB_ONE << l); - if (cy != 0) /* the code below requires z on ysize limbs */ - goto next_loop; - } - exact = exact && (err == -1); + + /* Now {z, ysize} * 2^(exp_z_out - ysize_bits) is an approximation + to base^exp_z_in (denoted b^e below), rounded toward zero, with: + * if err = -1, the result is exact; + * if err = -2, an overflow occurred in the computation of exp_z; + * otherwise the error is bounded by 2^err ulps. + Thus the exact value of b^e is between z and z + 2^err, where + z is {z, ysize} properly scaled by a power of 2. Then the error + will be: + y/b^e - trunc(y/z) = eps1 + eps2 + with + eps1 = y/b^e - y/z <= 0 + eps2 = y/z - trunc(y/z) >= 0 + thus the errors will (partly) compensate, giving a bound + max(|eps1|,|eps2|). + In addition, there is a 3rd error eps3 since y might be the + conversion of only a part of the character string, and/or y + might be truncated by the mpn_rshift call above: + eps3 = exact_y/b^e - y/b^e >= 0. + */ if (err == -2) goto underflow; /* FIXME: Sure? */ - if (err == -1) - err = 0; - - /* compute y / z */ - /* result will be put into result + n, and remainder into result */ - mpn_tdiv_qr (result + ysize, result, (mp_size_t) 0, y, - 2 * ysize, z, ysize); + else if (err == -1) + err = 0; /* see the note below */ + else + exact = 0; /* exp -= exp_z + ysize_bits with overflow checking and check that we can add/subtract 2 to exp without overflow */ @@ -706,7 +782,59 @@ mpfr_exp_t, mpfr_uexp_t, MPFR_EXP_MIN+2, MPFR_EXP_MAX-2, goto overflow, goto underflow); - err += 2; + + /* Compute the integer division y/z rounded toward zero. + The quotient will be put at result + ysize (size: ysize + 1), + and the remainder at result (size: ysize). + Both the dividend {y, 2*ysize} and the divisor {z, ysize} are + normalized, i.e., the most significant bit of their most + significant limb is 1. */ + MPFR_ASSERTD (MPFR_LIMB_MSB (y0[2 * ysize - 1]) != 0); + MPFR_ASSERTD (MPFR_LIMB_MSB (z[ysize - 1]) != 0); + mpn_tdiv_qr (result + ysize, result, (mp_size_t) 0, y0, + 2 * ysize, z, ysize); + + /* The truncation error of the mpn_tdiv_qr call (eps2 above) is at + most 1 ulp. Idem for the error eps3, which has the same sign, + thus eps2 + eps3 <= 2 ulps. + FIXME: For eps3, this is not obvious and should be explained. + For the error eps1 coming from the approximation to b^e, + we have (still up to a power-of-2 normalization): + y/z - y/b^e = y * (b^e-z) / (z * b^e) <= y * 2^err / (z * b^e). + We have to convert that error in terms of ulp(trunc(y/z)). + We first have ulp(trunc(y/z)) = ulp(y/z). + + FIXME: There must be some discussion about the exponents, + because up to a power of 2, 1/2 <= |y/z| < 1 and + 1 <= |y/z| < 2 are equivalent and give no information. + Moreover 1/2 <= b^e < 1 has not been explained and may + hide mistakes since one may have 1/2 <= z < 1 < b^e. + + Since both y and z are normalized, the quotient + {result+ysize, ysize+1} has exactly ysize limbs, plus maybe one + bit (this corresponds to the MPFR_ASSERTD below): + * if the quotient has exactly ysize limbs, then 1/2 <= |y/z| < 1 + (up to a power of 2) and since 1/2 <= b^e < 1, the error is at + most 2^(err+1) ulps; + * if the quotient has one extra bit, then 1 <= |y/z| < 2 + (up to a power of 2) and since 1/2 <= b^e < 1, the error is at + most 2^(err+2) ulps; but since we will shift the result right + below by one bit, the final error will be at most 2^(err+1) ulps + too. + + Thus the error is: + * at most 2^(err+1) ulps for eps1 + * at most 2 ulps for eps2 + eps3, which is of opposite sign + and we can bound the error by 2^(err+1) ulps in all cases. + + Note: If eps1 was 0, the error would be bounded by 2 ulps, + thus replacing err = -1 by err = 0 above was the right thing + to do, since 2^(0+1) = 2. + */ + MPFR_ASSERTD (result[2 * ysize] <= 1); + + err += 1; /* see above for the explanation of the +1 term */ + /* if the remainder of the division is zero, then the result is still "exact" if it was before */ exact = exact && (mpn_popcount (result, ysize) == 0); @@ -726,17 +854,15 @@ /* case exp_base = pstr_size: no multiplication or division needed */ else { + MPFR_LOG_MSG (("case 4 (exp_base = pstr_size)\n", 0)); + /* base^(exp-pr) = 1 nothing to compute */ result = y; err = 0; } - /* If result is exact, we still have to consider the neglected part - of the input string. For a directed rounding, in that case we could - still correctly round, since the neglected part is less than - one ulp, but that would make the code more complex, and give a - speedup for rare cases only. */ - exact = exact && (pstr_size == pstr->prec); + MPFR_LOG_MSG (("exact = %d, err = %d, precx = %Pu\n", + exact, err, precx)); /* at this point, result is an approximation rounded toward zero of the pstr_size most significant digits of pstr->mant, with @@ -744,24 +870,22 @@ /* test if rounding is possible, and if so exit the loop. Note: we also need to be able to determine the correct ternary value, - thus we use the MPFR_PREC(x) + (rnd == MPFR_RNDN) trick. + thus we use the precx + (rnd == MPFR_RNDN) trick. For example if result = xxx...xxx111...111 and rnd = RNDN, then we know the correct rounding is xxx...xx(x+1), but we cannot know the correct ternary value. */ if (exact || mpfr_round_p (result, ysize, ysize_bits - err - 1, - MPFR_PREC(x) + (rnd == MPFR_RNDN))) + precx + (rnd == MPFR_RNDN))) break; - next_loop: /* update the prec for next loop */ MPFR_ZIV_NEXT (loop, prec); } /* loop */ MPFR_ZIV_FREE (loop); /* round y */ - if (mpfr_round_raw (MPFR_MANT (x), result, - ysize_bits, - pstr->negative, MPFR_PREC(x), rnd, &res )) + if (mpfr_round_raw (MPFR_MANT (x), result, ysize_bits, + pstr->negative, precx, rnd, &res)) { /* overflow when rounding y */ MPFR_MANT (x)[MPFR_LIMB_SIZE (x) - 1] = MPFR_LIMB_HIGHBIT; @@ -769,12 +893,11 @@ exp ++; } - if (res == 0) /* fix ternary value */ - { - exact = exact && (pstr_size == pstr->prec); - if (!exact) - res = (pstr->negative) ? 1 : -1; - } + /* Note: if exact <> 0, then the approximation {result, ysize} is exact, + thus no double-rounding can occur: + (a) either the ternary value res is non-zero, and it is the correct + ternary value that we should return + (b) or the ternary value res is zero, and we should return 0. */ /* Set sign of x before exp since check_range needs a valid sign */ (pstr->negative) ? MPFR_SET_NEG (x) : MPFR_SET_POS (x); diff -Nru mpfr4-4.0.1/src/sub1.c mpfr4-4.0.2/src/sub1.c --- mpfr4-4.0.1/src/sub1.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sub1.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sub1 -- internal function to perform a "real" subtraction -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/sub1sp.c mpfr4-4.0.2/src/sub1sp.c --- mpfr4-4.0.1/src/sub1sp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sub1sp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_sub1sp -- internal function to perform a "real" subtraction All the op must have the same precision -Copyright 2003-2018 Free Software Foundation, Inc. +Copyright 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -375,13 +375,15 @@ } else /* cases (a), (c), (d) and (e) */ { - ap[0] = -MPFR_LIMB_ONE; /* rb=1 in case (e) and case (c) */ rb = d > GMP_NUMB_BITS + 1 || (d == GMP_NUMB_BITS + 1 && cp[0] == MPFR_LIMB_HIGHBIT); /* sb = 1 in case (d) and (e) */ sb = d > GMP_NUMB_BITS + 1 || (d == GMP_NUMB_BITS + 1 && cp[0] > MPFR_LIMB_HIGHBIT); + /* Warning: only set ap[0] last, otherwise in case ap=cp, + the above comparisons involving cp[0] would be wrong */ + ap[0] = -MPFR_LIMB_ONE; } } } diff -Nru mpfr4-4.0.1/src/sub.c mpfr4-4.0.2/src/sub.c --- mpfr4-4.0.1/src/sub.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sub.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sub -- subtract two floating-point numbers -Copyright 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/sub_d.c mpfr4-4.0.2/src/sub_d.c --- mpfr4-4.0.1/src/sub_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sub_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_sub_d -- subtract a machine double precision float from a multiple precision floating-point number -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/subnormal.c mpfr4-4.0.2/src/subnormal.c --- mpfr4-4.0.1/src/subnormal.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/subnormal.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_subnormalize -- Subnormalize a floating point number emulating sub-normal numbers. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/sub_ui.c mpfr4-4.0.2/src/sub_ui.c --- mpfr4-4.0.1/src/sub_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sub_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_sub_ui -- subtract a floating-point number and a machine integer -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/sum.c mpfr4-4.0.2/src/sum.c --- mpfr4-4.0.1/src/sum.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/sum.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Sum -- efficiently sum a list of floating-point numbers -Copyright 2014-2018 Free Software Foundation, Inc. +Copyright 2014-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H @@ -67,7 +67,7 @@ arbitrary precision fixed precision correct rounding just reproducible rounding integer operations floating-point operations - sequencial parallel (& sequential) + sequential parallel (& sequential) */ #ifdef MPFR_COV_CHECK diff -Nru mpfr4-4.0.1/src/swap.c mpfr4-4.0.2/src/swap.c --- mpfr4-4.0.1/src/swap.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/swap.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_swap (U, V) -- Swap U and V. -Copyright 2000-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/tan.c mpfr4-4.0.2/src/tan.c --- mpfr4-4.0.1/src/tan.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/tan.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_tan -- tangent of a floating-point number -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/tanh.c mpfr4-4.0.2/src/tanh.c --- mpfr4-4.0.1/src/tanh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/tanh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_tanh -- hyperbolic tangent -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/ubf.c mpfr4-4.0.2/src/ubf.c --- mpfr4-4.0.1/src/ubf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/ubf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Functions to work with unbounded floats (limited low-level interface). -Copyright 2016-2018 Free Software Foundation, Inc. +Copyright 2016-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/uceil_exp2.c mpfr4-4.0.2/src/uceil_exp2.c --- mpfr4-4.0.1/src/uceil_exp2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/uceil_exp2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* __gmpfr_ceil_exp2 - returns y >= 2^d -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/uceil_log2.c mpfr4-4.0.2/src/uceil_log2.c --- mpfr4-4.0.1/src/uceil_log2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/uceil_log2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* __gmpfr_ceil_log2 - returns ceil(log(d)/log(2)) -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/ufloor_log2.c mpfr4-4.0.2/src/ufloor_log2.c --- mpfr4-4.0.1/src/ufloor_log2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/ufloor_log2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* __gmpfr_floor_log2 - returns floor(log(d)/log(2)) -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/ui_div.c mpfr4-4.0.2/src/ui_div.c --- mpfr4-4.0.1/src/ui_div.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/ui_div.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_ui_div -- divide a machine integer by a floating-point number -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/ui_pow.c mpfr4-4.0.2/src/ui_pow.c --- mpfr4-4.0.1/src/ui_pow.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/ui_pow.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_ui_pow -- power of n function n^x -Copyright 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/ui_pow_ui.c mpfr4-4.0.2/src/ui_pow_ui.c --- mpfr4-4.0.1/src/ui_pow_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/ui_pow_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_ui_pow_ui -- compute the power between two machine integers -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/ui_sub.c mpfr4-4.0.2/src/ui_sub.c --- mpfr4-4.0.1/src/ui_sub.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/ui_sub.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_ui_sub -- subtract a floating-point number from an integer -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/urandomb.c mpfr4-4.0.2/src/urandomb.c --- mpfr4-4.0.1/src/urandomb.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/urandomb.c 2019-01-07 13:53:20.000000000 +0000 @@ -3,7 +3,7 @@ using STATE as the random state previously initialized by a call to gmp_randinit_lc_2exp_size(). -Copyright 2000-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -20,7 +20,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/urandom.c mpfr4-4.0.2/src/urandom.c --- mpfr4-4.0.1/src/urandom.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/urandom.c 2019-01-07 13:53:20.000000000 +0000 @@ -2,7 +2,7 @@ real number between 0 and 1 (exclusive) and round it to the precision of rop according to the given rounding mode. -Copyright 2000-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -19,7 +19,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/src/vasprintf.c mpfr4-4.0.2/src/vasprintf.c --- mpfr4-4.0.1/src/vasprintf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/vasprintf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_vasnprintf_aux -- helper function for the formatted output functions (printf functions family). -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* If the number of output characters is larger than INT_MAX, the @@ -33,11 +33,22 @@ So, for the time being, we return a negative value and set the erange flag, and set errno to EOVERFLOW in POSIX system. */ -/* Note: Due to limitations from the C standard and GMP, if - size_t < unsigned int (which is allowed by the C standard but unlikely - to occur on any platform), the behavior is undefined for output that - would reach SIZE_MAX = (size_t) -1 (if the result cannot be delivered, - there should be an assertion failure, but this could not be tested). */ +/* Notes about limitations on some platforms: + + Due to limitations from the C standard and GMP, if size_t < unsigned int + (which is allowed by the C standard but unlikely to occur on any + platform), the behavior is undefined for output that would reach + SIZE_MAX = (size_t) -1 (if the result cannot be delivered, there should + be an assertion failure, but this could not be tested). + + The stdarg(3) Linux man page 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. + However, the only requirement from ISO C is that both macros must be + invoked in the same function (MPFR uses va_copy instead of va_start, + but the requirement is the same). Here, MPFR just follows ISO C. +*/ #ifdef HAVE_CONFIG_H # include "config.h" @@ -248,6 +259,8 @@ } } +/* Note: additional flags should be added to the MPFR_PREC_ARG code + for gmp_asprintf (when supported). */ static const char * parse_flags (const char *format, struct printf_spec *specinfo) { @@ -683,20 +696,31 @@ else { const size_t step = 3; - const size_t size = len + tz; - const size_t r = size % step == 0 ? step : size % step; - const size_t q = size % step == 0 ? size / step - 1 : size / step; - const size_t fullsize = size + q; - size_t i; + size_t size, q, r, fullsize; + + /* check that len + tz does not overflow */ + if (len > (size_t) -1 - tz) + return 1; + size = len + tz; /* number of digits */ MPFR_ASSERTD (size > 0); + q = (size - 1) / step; /* number of separators C */ + r = ((size - 1) % step) + 1; /* number of digits in the leftmost block */ + + /* check that size + q does not overflow */ + if (size > (size_t) -1 - q) + return 1; + + fullsize = size + q; /* number of digits and separators */ + if (buffer_incr_len (b, fullsize)) return 1; if (b->size != 0) { char *oldcurr; + size_t i; MPFR_ASSERTD (*b->curr == '\0'); MPFR_ASSERTN (b->size < ((size_t) -1) - fullsize); @@ -705,11 +729,21 @@ MPFR_DBGRES (oldcurr = b->curr); - /* first R significant digits */ - memcpy (b->curr, str, r); + /* first r significant digits (leftmost block) */ + if (r <= len) + { + memcpy (b->curr, str, r); + str += r; + len -= r; + } + else + { + MPFR_ASSERTD (r > len); + memcpy (b->curr, str, len); + memset (b->curr + len, '0', r - len); + len = 0; + } b->curr += r; - str += r; - len -= r; /* blocks of thousands. Warning: STR might end in the middle of a block */ for (i = 0; i < q; ++i) @@ -722,6 +756,7 @@ { memcpy (b->curr, str, step); len -= step; + str += step; } else /* last digits in STR, fill up thousand block with zeros */ @@ -736,7 +771,6 @@ memset (b->curr, '0', step); b->curr += step; - str += step; } MPFR_ASSERTD (b->curr - oldcurr == fullsize); @@ -1920,8 +1954,14 @@ /* integral part (may also be "nan" or "inf") */ MPFR_ASSERTN (np.ip_ptr != NULL); /* never empty */ if (MPFR_UNLIKELY (np.thousands_sep)) - buffer_sandwich (buf, np.ip_ptr, np.ip_size, np.ip_trailing_zeros, - np.thousands_sep); + { + if (buffer_sandwich (buf, np.ip_ptr, np.ip_size, np.ip_trailing_zeros, + np.thousands_sep)) + { + buf->len = -1; + goto clear_and_exit; + } + } else { buffer_cat (buf, np.ip_ptr, np.ip_size); @@ -1978,7 +2018,7 @@ struct string_buffer buf; int nbchar; - /* informations on the conversion specification filled by the parser */ + /* information on the conversion specification filled by the parser */ struct printf_spec spec; /* flag raised when previous part of fmt need to be processed by gmp_vsnprintf */ @@ -2182,7 +2222,7 @@ /* output mpfr_prec_t variable */ { char *s; - char format[MPFR_PREC_FORMAT_SIZE + 6]; /* see examples below */ + char format[MPFR_PREC_FORMAT_SIZE + 12]; /* e.g. "%0#+ -'*.*ld\0" */ size_t length; mpfr_prec_t prec; @@ -2194,14 +2234,14 @@ start = fmt; /* construct format string, like "%*.*hd" "%*.*d" or "%*.*ld" */ - format[0] = '%'; - format[1] = '*'; - format[2] = '.'; - format[3] = '*'; - format[4] = '\0'; - strcat (format, MPFR_PREC_FORMAT_TYPE); - format[4 + MPFR_PREC_FORMAT_SIZE] = spec.spec; - format[5 + MPFR_PREC_FORMAT_SIZE] = '\0'; + sprintf (format, "%%%s%s%s%s%s%s*.*" MPFR_PREC_FORMAT_TYPE "%c", + spec.pad == '0' ? "0" : "", + spec.alt ? "#" : "", + spec.showsign ? "+" : "", + spec.space ? " " : "", + spec.left ? "-" : "", + spec.group ? "'" : "", + spec.spec); length = gmp_asprintf (&s, format, spec.width, spec.prec, prec); MPFR_ASSERTN (length >= 0); /* guaranteed by GMP 6 */ buffer_cat (&buf, s, length); @@ -2246,44 +2286,42 @@ va_end (ap2); - if (buf.len > INT_MAX) /* overflow */ - buf.len = -1; + if (buf.len == -1 || buf.len > INT_MAX) /* overflow */ + goto overflow; - if (buf.len != -1) - { - nbchar = buf.len; - MPFR_ASSERTD (nbchar >= 0); + nbchar = buf.len; + MPFR_ASSERTD (nbchar >= 0); - if (ptr != NULL) /* implement mpfr_vasprintf */ + if (ptr != NULL) /* implement mpfr_vasprintf */ + { + MPFR_ASSERTD (nbchar == strlen (buf.start)); + *ptr = (char *) mpfr_reallocate_func (buf.start, buf.size, nbchar + 1); + } + else if (size != 0) /* implement mpfr_vsnprintf */ + { + if (nbchar < size) { - MPFR_ASSERTD (nbchar == strlen (buf.start)); - *ptr = (char *) - mpfr_reallocate_func (buf.start, buf.size, nbchar + 1); + strncpy (Buf, buf.start, nbchar); + Buf[nbchar] = '\0'; } - else if (size > 0) /* implement mpfr_vsnprintf */ + else { - if (nbchar < size) - { - strncpy (Buf, buf.start, nbchar); - Buf[nbchar] = '\0'; - } - else - { - strncpy (Buf, buf.start, size - 1); - Buf[size-1] = '\0'; - } - mpfr_free_func (buf.start, buf.size); + strncpy (Buf, buf.start, size - 1); + Buf[size-1] = '\0'; } - - MPFR_SAVE_EXPO_FREE (expo); - return nbchar; /* return the number of characters that would have - been written had 'size' been sufficiently large, - not counting the terminating null character */ + mpfr_free_func (buf.start, buf.size); } + MPFR_SAVE_EXPO_FREE (expo); + return nbchar; /* return the number of characters that would have + been written had 'size' been sufficiently large, + not counting the terminating null character */ + error: + va_end (ap2); if (buf.len == -1) /* overflow */ { + overflow: MPFR_LOG_MSG (("Overflow\n", 0)); MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, MPFR_FLAGS_ERANGE); #ifdef EOVERFLOW @@ -2293,8 +2331,10 @@ } MPFR_SAVE_EXPO_FREE (expo); - *ptr = NULL; - mpfr_free_func (buf.start, buf.size); + if (ptr != NULL) /* implement mpfr_vasprintf */ + *ptr = NULL; + if (ptr != NULL || size != 0) + mpfr_free_func (buf.start, buf.size); return -1; } diff -Nru mpfr4-4.0.1/src/version.c mpfr4-4.0.2/src/version.c --- mpfr4-4.0.1/src/version.c 2018-02-07 12:50:31.000000000 +0000 +++ mpfr4-4.0.2/src/version.c 2019-01-31 20:29:48.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_get_version -- MPFR version -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" @@ -25,5 +25,5 @@ const char * mpfr_get_version (void) { - return "4.0.1"; + return "4.0.2"; } diff -Nru mpfr4-4.0.1/src/volatile.c mpfr4-4.0.2/src/volatile.c --- mpfr4-4.0.1/src/volatile.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/volatile.c 2019-01-07 13:53:20.000000000 +0000 @@ -4,7 +4,7 @@ CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN FUTURE MPFR RELEASES. -Copyright 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -21,7 +21,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-impl.h" diff -Nru mpfr4-4.0.1/src/x86/core2/mparam.h mpfr4-4.0.2/src/x86/core2/mparam.h --- mpfr4-4.0.1/src/x86/core2/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/x86/core2/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2011-07-31, gcc 4.3.2 */ @@ -89,7 +89,7 @@ 824,808,831,824,824,824,832,823,832,824,832,831,832,832,829,830, \ 831,832,832,832,831,831,832,832,830,832,832,832,832,831,831,832, \ 879,832,832,880,832,831,832,831,832,832,832,832,832,832,832,831 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,0,-1,-1,-1,-1,-1,-1,-1,8,8,8,9,9, \ 10,10,11,13,13,14,15,16,14,16,17,16,18,17,19,18, \ @@ -155,7 +155,7 @@ 696,696,696,696,696,694,695,696,696,695,696,694,727,696,696,688, \ 695,696,696,695,696,695,695,696,696,727,696,696,695,696,695,696, \ 696,695,696,695,696,696,696,728,728,696,720,728,728,728,726,728 \ - + #define MPFR_DIVHIGH_TAB \ 0,1,2,3,4,5,6,7,8,9,10,9,10,11,14,13, \ 14,11,16,17,13,14,15,16,16,14,16,16,16,19,20,18, \ @@ -221,7 +221,7 @@ 607,608,608,608,608,608,607,607,608,607,608,608,608,607,608,608, \ 608,608,609,609,608,608,609,608,608,608,606,606,608,608,609,607, \ 606,607,608,608,610,608,608,609,608,608,608,608,608,608,607,608 \ - + #define MPFR_MUL_THRESHOLD 15 /* limbs */ #define MPFR_SQR_THRESHOLD 18 /* limbs */ #define MPFR_DIV_THRESHOLD 22 /* limbs */ diff -Nru mpfr4-4.0.1/src/x86/mparam.h mpfr4-4.0.2/src/x86/mparam.h --- mpfr4-4.0.1/src/x86/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/x86/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2011-07-31, gcc 4.4.2 */ @@ -88,7 +88,7 @@ 784,784,784,784,784,784,784,784,784,784,784,832,784,784,784,784, \ 832,784,832,831,832,831,832,832,832,832,832,784,784,784,784,784, \ 832,784,832,784,832,832,832,832,832,832,832,832,832,832,832,832 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,-1,-1,-1,-1,5,6,6,7,7,8,8,9,9, \ 10,11,12,11,12,13,14,13,14,15,16,15,16,16,17,17, \ @@ -154,7 +154,7 @@ 584,584,584,584,584,584,584,568,568,568,568,616,568,568,616,568, \ 600,584,600,600,600,632,616,600,584,616,616,632,632,584,632,616, \ 616,616,616,616,616,632,632,616,616,632,632,616,616,632,616,616 \ - + #define MPFR_DIVHIGH_TAB \ 0,1,2,3,4,5,6,7,8,7,10,9,10,11,12,13, \ 14,15,16,17,18,16,14,16,16,19,19,18,20,19,20,18, \ @@ -220,7 +220,7 @@ 501,500,552,497,516,511,503,513,497,511,502,509,564,509,504,512, \ 503,504,512,504,504,500,512,512,512,511,512,504,557,504,564,564, \ 512,564,514,512,516,512,560,564,560,564,564,512,564,564,564,560 \ - + #define MPFR_MUL_THRESHOLD 15 /* limbs */ #define MPFR_SQR_THRESHOLD 14 /* limbs */ #define MPFR_DIV_THRESHOLD 27 /* limbs */ diff -Nru mpfr4-4.0.1/src/x86_64/core2/mparam.h mpfr4-4.0.2/src/x86_64/core2/mparam.h --- mpfr4-4.0.1/src/x86_64/core2/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/x86_64/core2/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2011-07-31, gcc 4.3.2 */ @@ -91,7 +91,7 @@ 736,736,736,736,736,736,736,736,736,736,736,736,736,736,735,736, \ 736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736, \ 824,824,832,832,832,832,824,832,832,832,832,832,824,831,832,832 \ - + #define MPFR_SQRHIGH_TAB \ -1,0,0,0,0,0,0,5,6,6,7,8,8,8,10,9, \ 10,11,11,11,12,13,13,13,14,16,16,17,17,17,17,17, \ @@ -157,7 +157,7 @@ 628,627,630,631,632,663,632,631,632,630,632,631,632,626,632,632, \ 632,663,631,631,632,632,632,664,632,632,600,632,632,600,632,632, \ 600,600,632,632,632,662,663,663,663,600,664,632,664,663,664,632 \ - + #define MPFR_DIVHIGH_TAB \ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,12,13, \ 14,15,16,13,14,14,14,15,15,17,17,17,19,19,19,19, \ @@ -223,7 +223,7 @@ 552,561,564,564,560,564,561,564,564,564,564,564,564,564,564,560, \ 561,560,564,564,560,564,564,552,564,564,564,552,564,564,564,564, \ 564,563,564,564,564,564,560,564,564,564,564,552,564,564,560,564 \ - + #define MPFR_MUL_THRESHOLD 7 /* limbs */ #define MPFR_SQR_THRESHOLD 12 /* limbs */ #define MPFR_DIV_THRESHOLD 20 /* limbs */ diff -Nru mpfr4-4.0.1/src/x86_64/pentium4/mparam.h mpfr4-4.0.2/src/x86_64/pentium4/mparam.h --- mpfr4-4.0.1/src/x86_64/pentium4/mparam.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/x86_64/pentium4/mparam.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Various Thresholds of MPFR, not exported. -*- mode: C -*- -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. This file is part of the GNU MPFR Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Generated by MPFR's tuneup.c, 2009-02-09, gcc 4.3 */ diff -Nru mpfr4-4.0.1/src/yn.c mpfr4-4.0.2/src/yn.c --- mpfr4-4.0.1/src/yn.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/yn.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_y0, mpfr_y1, mpfr_yn -- Bessel functions of 2nd kind, integer order. http://www.opengroup.org/onlinepubs/009695399/functions/y0.html -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/src/zeta.c mpfr4-4.0.2/src/zeta.c --- mpfr4-4.0.1/src/zeta.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/zeta.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_zeta -- compute the Riemann Zeta function -Copyright 2003-2018 Free Software Foundation, Inc. +Copyright 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* for DBL_MAX */ diff -Nru mpfr4-4.0.1/src/zeta_ui.c mpfr4-4.0.2/src/zeta_ui.c --- mpfr4-4.0.1/src/zeta_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/src/zeta_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_zeta_ui -- compute the Riemann Zeta function for integer argument. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/test-driver mpfr4-4.0.2/test-driver --- mpfr4-4.0.1/test-driver 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/test-driver 2019-01-31 20:43:20.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -140,9 +140,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru mpfr4-4.0.1/tests/cmp_str.c mpfr4-4.0.2/tests/cmp_str.c --- mpfr4-4.0.1/tests/cmp_str.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/cmp_str.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_cmp_str -- compare a floating-point number with a string. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/Makefile.am mpfr4-4.0.2/tests/Makefile.am --- mpfr4-4.0.1/tests/Makefile.am 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/Makefile.am 2019-01-07 16:11:57.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright 2000-2018 Free Software Foundation, Inc. +# Copyright 2000-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -46,7 +46,13 @@ # has been generated with Automake 1.13+); but this is done only when # no tests fail. check: - cat tversion.log 2> /dev/null || true + @if [ -d $(top_srcdir)/.svn ]; then \ + output=`svnversion $(top_srcdir) 2> /dev/null`; \ + if [ -n "$$output" ]; then \ + echo "[svnversion] $$output"; \ + fi; \ + fi + @grep -v '^PASS ' tversion.log 2> /dev/null || true AM_CPPFLAGS = -DSRCDIR='"$(srcdir)"' @@ -77,11 +83,20 @@ TESTS = $(check_PROGRAMS) +# Set DISPLAY='' as it is not needed and it can yield error messages when +# running the tests with LOG_COMPILER=wine (for builds with MinGW). See: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914822 +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914949 # $(VALGRIND) is still there to be able to use a wrapper such as valgrind # in case old Automake. With Automake 1.13+, where a parallel test harness # is generated, use LOG_COMPILER instead. For additional information, see: -# http://www.gnu.org/software/automake/manual/automake.html#Parallel-Test-Harness -TESTS_ENVIRONMENT = MPFR_QUIET=1 $(VALGRIND) +# https://www.gnu.org/software/automake/manual/automake.html#Parallel-Test-Harness +# +# Note: We do not use "env -u DISPLAY" as the -u option is a GNU extension +# and not supported by NetBSD. Setting DISPLAY='' is not equivalent, but +# it also avoids the bogus "Invalid MIT-MAGIC-COOKIE-1 key" error message +# that can make the parsing of the output fail. +TESTS_ENVIRONMENT = env DISPLAY='' MPFR_QUIET=1 $(VALGRIND) # The -no-install option prevents libtool from generating wrapper scripts # for the tests. diff -Nru mpfr4-4.0.1/tests/Makefile.in mpfr4-4.0.2/tests/Makefile.in --- mpfr4-4.0.1/tests/Makefile.in 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/tests/Makefile.in 2019-01-31 20:43:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright 2000-2018 Free Software Foundation, Inc. +# Copyright 2000-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -1089,7 +1089,94 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/cmp_str.Plo ./$(DEPDIR)/memory.Plo \ + ./$(DEPDIR)/mpf_compat.Po ./$(DEPDIR)/mpfr_compat.Po \ + ./$(DEPDIR)/random2.Plo ./$(DEPDIR)/reuse.Po \ + ./$(DEPDIR)/rnd_mode.Plo ./$(DEPDIR)/tabort_defalloc1.Po \ + ./$(DEPDIR)/tabort_defalloc2.Po ./$(DEPDIR)/tabort_prec_max.Po \ + ./$(DEPDIR)/tabs.Po ./$(DEPDIR)/tacos.Po ./$(DEPDIR)/tacosh.Po \ + ./$(DEPDIR)/tadd.Po ./$(DEPDIR)/tadd1sp.Po \ + ./$(DEPDIR)/tadd_d.Po ./$(DEPDIR)/tadd_ui.Po \ + ./$(DEPDIR)/tagm.Po ./$(DEPDIR)/tai.Po \ + ./$(DEPDIR)/talloc-cache.Po ./$(DEPDIR)/talloc.Po \ + ./$(DEPDIR)/tasin.Po ./$(DEPDIR)/tasinh.Po \ + ./$(DEPDIR)/tassert.Po ./$(DEPDIR)/tatan.Po \ + ./$(DEPDIR)/tatanh.Po ./$(DEPDIR)/taway.Po \ + ./$(DEPDIR)/tbeta.Po ./$(DEPDIR)/tbuildopt.Po \ + ./$(DEPDIR)/tcan_round.Po ./$(DEPDIR)/tcbrt.Po \ + ./$(DEPDIR)/tcheck.Po ./$(DEPDIR)/tcmp.Po ./$(DEPDIR)/tcmp2.Po \ + ./$(DEPDIR)/tcmp_d.Po ./$(DEPDIR)/tcmp_ld.Po \ + ./$(DEPDIR)/tcmp_ui.Po ./$(DEPDIR)/tcmpabs.Po \ + ./$(DEPDIR)/tcomparisons.Po ./$(DEPDIR)/tconst_catalan.Po \ + ./$(DEPDIR)/tconst_euler.Po ./$(DEPDIR)/tconst_log2.Po \ + ./$(DEPDIR)/tconst_pi.Po ./$(DEPDIR)/tcopysign.Po \ + ./$(DEPDIR)/tcos.Po ./$(DEPDIR)/tcosh.Po ./$(DEPDIR)/tcot.Po \ + ./$(DEPDIR)/tcoth.Po ./$(DEPDIR)/tcsc.Po ./$(DEPDIR)/tcsch.Po \ + ./$(DEPDIR)/td_div.Po ./$(DEPDIR)/td_sub.Po \ + ./$(DEPDIR)/tdigamma.Po ./$(DEPDIR)/tdim.Po \ + ./$(DEPDIR)/tdiv.Po ./$(DEPDIR)/tdiv_d.Po \ + ./$(DEPDIR)/tdiv_ui.Po ./$(DEPDIR)/teint.Po ./$(DEPDIR)/teq.Po \ + ./$(DEPDIR)/terandom.Po ./$(DEPDIR)/terandom_chisq.Po \ + ./$(DEPDIR)/terf.Po ./$(DEPDIR)/tests.Plo \ + ./$(DEPDIR)/texceptions.Po ./$(DEPDIR)/texp.Po \ + ./$(DEPDIR)/texp10.Po ./$(DEPDIR)/texp2.Po \ + ./$(DEPDIR)/texpm1.Po ./$(DEPDIR)/tfactorial.Po \ + ./$(DEPDIR)/tfits.Po ./$(DEPDIR)/tfma.Po ./$(DEPDIR)/tfmma.Po \ + ./$(DEPDIR)/tfmod.Po ./$(DEPDIR)/tfms.Po ./$(DEPDIR)/tfpif.Po \ + ./$(DEPDIR)/tfprintf.Po ./$(DEPDIR)/tfrac.Po \ + ./$(DEPDIR)/tfrexp.Po ./$(DEPDIR)/tgamma.Po \ + ./$(DEPDIR)/tgamma_inc.Po ./$(DEPDIR)/tget_d.Po \ + ./$(DEPDIR)/tget_d_2exp.Po ./$(DEPDIR)/tget_f.Po \ + ./$(DEPDIR)/tget_flt.Po ./$(DEPDIR)/tget_ld_2exp.Po \ + ./$(DEPDIR)/tget_q.Po ./$(DEPDIR)/tget_set_d64.Po \ + ./$(DEPDIR)/tget_sj.Po ./$(DEPDIR)/tget_str.Po \ + ./$(DEPDIR)/tget_z.Po ./$(DEPDIR)/tgmpop.Po \ + ./$(DEPDIR)/tgrandom.Po ./$(DEPDIR)/thyperbolic.Po \ + ./$(DEPDIR)/thypot.Po ./$(DEPDIR)/tinits.Po \ + ./$(DEPDIR)/tinp_str.Po ./$(DEPDIR)/tinternals.Po \ + ./$(DEPDIR)/tisnan.Po ./$(DEPDIR)/tisqrt.Po ./$(DEPDIR)/tj0.Po \ + ./$(DEPDIR)/tj1.Po ./$(DEPDIR)/tjn.Po ./$(DEPDIR)/tl2b.Po \ + ./$(DEPDIR)/tlgamma.Po ./$(DEPDIR)/tli2.Po \ + ./$(DEPDIR)/tlngamma.Po ./$(DEPDIR)/tlog.Po \ + ./$(DEPDIR)/tlog10.Po ./$(DEPDIR)/tlog1p.Po \ + ./$(DEPDIR)/tlog2.Po ./$(DEPDIR)/tlog_ui.Po \ + ./$(DEPDIR)/tmin_prec.Po ./$(DEPDIR)/tminmax.Po \ + ./$(DEPDIR)/tmodf.Po ./$(DEPDIR)/tmul.Po \ + ./$(DEPDIR)/tmul_2exp.Po ./$(DEPDIR)/tmul_d.Po \ + ./$(DEPDIR)/tmul_ui.Po ./$(DEPDIR)/tnext.Po \ + ./$(DEPDIR)/tnrandom.Po ./$(DEPDIR)/tnrandom_chisq.Po \ + ./$(DEPDIR)/tout_str.Po ./$(DEPDIR)/toutimpl.Po \ + ./$(DEPDIR)/tpow.Po ./$(DEPDIR)/tpow3.Po \ + ./$(DEPDIR)/tpow_all.Po ./$(DEPDIR)/tpow_z.Po \ + ./$(DEPDIR)/tprintf.Po ./$(DEPDIR)/trandom.Po \ + ./$(DEPDIR)/trandom_deviate.Po ./$(DEPDIR)/trec_sqrt.Po \ + ./$(DEPDIR)/tremquo.Po ./$(DEPDIR)/trint.Po \ + ./$(DEPDIR)/trndna.Po ./$(DEPDIR)/troot.Po \ + ./$(DEPDIR)/trootn_ui.Po ./$(DEPDIR)/tround_prec.Po \ + ./$(DEPDIR)/tsec.Po ./$(DEPDIR)/tsech.Po ./$(DEPDIR)/tset.Po \ + ./$(DEPDIR)/tset_d.Po ./$(DEPDIR)/tset_exp.Po \ + ./$(DEPDIR)/tset_f.Po ./$(DEPDIR)/tset_float128.Po \ + ./$(DEPDIR)/tset_ld.Po ./$(DEPDIR)/tset_q.Po \ + ./$(DEPDIR)/tset_si.Po ./$(DEPDIR)/tset_sj.Po \ + ./$(DEPDIR)/tset_str.Po ./$(DEPDIR)/tset_z.Po \ + ./$(DEPDIR)/tset_z_exp.Po ./$(DEPDIR)/tsgn.Po \ + ./$(DEPDIR)/tsi_op.Po ./$(DEPDIR)/tsin.Po \ + ./$(DEPDIR)/tsin_cos.Po ./$(DEPDIR)/tsinh.Po \ + ./$(DEPDIR)/tsinh_cosh.Po ./$(DEPDIR)/tsprintf.Po \ + ./$(DEPDIR)/tsqr.Po ./$(DEPDIR)/tsqrt.Po \ + ./$(DEPDIR)/tsqrt_ui.Po ./$(DEPDIR)/tstckintc.Po \ + ./$(DEPDIR)/tstdint.Po ./$(DEPDIR)/tstrtofr.Po \ + ./$(DEPDIR)/tsub.Po ./$(DEPDIR)/tsub1sp.Po \ + ./$(DEPDIR)/tsub_d.Po ./$(DEPDIR)/tsub_ui.Po \ + ./$(DEPDIR)/tsubnormal.Po ./$(DEPDIR)/tsum.Po \ + ./$(DEPDIR)/tswap.Po ./$(DEPDIR)/ttan.Po ./$(DEPDIR)/ttanh.Po \ + ./$(DEPDIR)/ttrunc.Po ./$(DEPDIR)/tui_div.Po \ + ./$(DEPDIR)/tui_pow.Po ./$(DEPDIR)/tui_sub.Po \ + ./$(DEPDIR)/turandom.Po ./$(DEPDIR)/tvalist.Po \ + ./$(DEPDIR)/tversion.Po ./$(DEPDIR)/ty0.Po ./$(DEPDIR)/ty1.Po \ + ./$(DEPDIR)/tyn.Po ./$(DEPDIR)/tzeta.Po \ + ./$(DEPDIR)/tzeta_ui.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -1555,11 +1642,20 @@ libfrtests_la_SOURCES = mpfr-test.h memory.c rnd_mode.c tests.c cmp_str.c random2.c TESTS = $(check_PROGRAMS) +# Set DISPLAY='' as it is not needed and it can yield error messages when +# running the tests with LOG_COMPILER=wine (for builds with MinGW). See: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914822 +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914949 # $(VALGRIND) is still there to be able to use a wrapper such as valgrind # in case old Automake. With Automake 1.13+, where a parallel test harness # is generated, use LOG_COMPILER instead. For additional information, see: -# http://www.gnu.org/software/automake/manual/automake.html#Parallel-Test-Harness -TESTS_ENVIRONMENT = MPFR_QUIET=1 $(VALGRIND) +# https://www.gnu.org/software/automake/manual/automake.html#Parallel-Test-Harness +# +# Note: We do not use "env -u DISPLAY" as the -u option is a GNU extension +# and not supported by NetBSD. Setting DISPLAY='' is not equivalent, but +# it also avoids the bogus "Invalid MIT-MAGIC-COOKIE-1 key" error message +# that can make the parsing of the output fail. +TESTS_ENVIRONMENT = env DISPLAY='' MPFR_QUIET=1 $(VALGRIND) # The -no-install option prevents libtool from generating wrapper scripts # for the tests. @@ -1604,8 +1700,8 @@ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -1617,6 +1713,15 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + clean-checkLTLIBRARIES: -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) @list='$(check_LTLIBRARIES)'; \ @@ -1631,15 +1736,6 @@ libfrtests.la: $(libfrtests_la_OBJECTS) $(libfrtests_la_DEPENDENCIES) $(EXTRA_libfrtests_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libfrtests_la_OBJECTS) $(libfrtests_la_LIBADD) $(LIBS) -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - mpf_compat$(EXEEXT): $(mpf_compat_OBJECTS) $(mpf_compat_DEPENDENCIES) $(EXTRA_mpf_compat_DEPENDENCIES) @rm -f mpf_compat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mpf_compat_OBJECTS) $(mpf_compat_LDADD) $(LIBS) @@ -2366,191 +2462,197 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_str.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpf_compat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfr_compat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reuse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rnd_mode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabort_defalloc1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabort_defalloc2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabort_prec_max.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tacos.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tacosh.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd1sp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd_d.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd_ui.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tagm.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tai.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/talloc-cache.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/talloc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tasin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tasinh.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tassert.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tatan.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tatanh.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taway.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tbeta.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tbuildopt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcan_round.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcbrt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcheck.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp_d.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp_ld.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp_ui.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmpabs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcomparisons.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tconst_catalan.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tconst_euler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tconst_log2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tconst_pi.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcopysign.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcos.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcosh.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcot.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcoth.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcsc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcsch.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/td_div.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/td_sub.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdigamma.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdim.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv_d.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv_ui.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/teint.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/teq.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terandom.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terandom_chisq.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texceptions.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texp10.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texp2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texpm1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfactorial.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfits.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfma.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfmma.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfmod.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfms.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfpif.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfprintf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfrac.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfrexp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tgamma.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tgamma_inc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_d.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_d_2exp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_f.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_flt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_ld_2exp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_q.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_set_d64.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_sj.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_str.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_z.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tgmpop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tgrandom.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thyperbolic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thypot.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinits.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinp_str.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinternals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tisnan.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tisqrt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tj0.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tj1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tjn.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tl2b.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlgamma.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tli2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlngamma.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog10.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog1p.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog_ui.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmin_prec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tminmax.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmodf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_2exp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_d.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_ui.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tnext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tnrandom.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tnrandom_chisq.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tout_str.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toutimpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow3.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow_all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow_z.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tprintf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trandom.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trandom_deviate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trec_sqrt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tremquo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trint.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trndna.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/troot.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trootn_ui.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tround_prec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsech.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_d.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_exp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_f.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_float128.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_ld.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_q.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_si.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_sj.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_str.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_z.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_z_exp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsgn.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsi_op.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsin_cos.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsinh.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsinh_cosh.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsprintf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsqr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsqrt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsqrt_ui.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstckintc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstdint.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstrtofr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub1sp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub_d.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub_ui.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsubnormal.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsum.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tswap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttan.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttanh.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttrunc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tui_div.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tui_pow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tui_sub.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/turandom.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvalist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tversion.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ty0.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ty1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tyn.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tzeta.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tzeta_ui.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmp_str.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpf_compat.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfr_compat.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reuse.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rnd_mode.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabort_defalloc1.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabort_defalloc2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabort_prec_max.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabs.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tacos.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tacosh.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd1sp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd_d.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd_ui.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tagm.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tai.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/talloc-cache.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/talloc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tasin.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tasinh.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tassert.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tatan.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tatanh.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taway.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tbeta.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tbuildopt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcan_round.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcbrt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcheck.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp_d.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp_ld.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp_ui.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmpabs.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcomparisons.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tconst_catalan.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tconst_euler.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tconst_log2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tconst_pi.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcopysign.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcos.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcosh.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcot.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcoth.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcsc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcsch.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/td_div.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/td_sub.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdigamma.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdim.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv_d.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv_ui.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/teint.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/teq.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terandom.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terandom_chisq.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texceptions.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texp10.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texp2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texpm1.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfactorial.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfits.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfma.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfmma.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfmod.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfms.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfpif.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfprintf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfrac.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfrexp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tgamma.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tgamma_inc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_d.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_d_2exp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_f.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_flt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_ld_2exp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_q.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_set_d64.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_sj.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_str.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_z.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tgmpop.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tgrandom.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thyperbolic.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thypot.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinits.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinp_str.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinternals.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tisnan.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tisqrt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tj0.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tj1.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tjn.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tl2b.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlgamma.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tli2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlngamma.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog10.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog1p.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog_ui.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmin_prec.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tminmax.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmodf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_2exp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_d.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_ui.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tnext.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tnrandom.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tnrandom_chisq.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tout_str.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toutimpl.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow3.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow_all.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow_z.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tprintf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trandom.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trandom_deviate.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trec_sqrt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tremquo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trint.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trndna.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/troot.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trootn_ui.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tround_prec.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsec.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsech.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_d.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_exp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_f.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_float128.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_ld.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_q.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_si.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_sj.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_str.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_z.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset_z_exp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsgn.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsi_op.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsin.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsin_cos.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsinh.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsinh_cosh.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsprintf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsqr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsqrt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsqrt_ui.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstckintc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstdint.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstrtofr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub1sp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub_d.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub_ui.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsubnormal.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsum.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tswap.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttan.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttanh.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttrunc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tui_div.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tui_pow.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tui_sub.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/turandom.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvalist.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tversion.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ty0.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ty1.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tyn.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tzeta.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tzeta_ui.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -2751,7 +2853,7 @@ fi; \ $$success || exit 1 -check-TESTS: +check-TESTS: $(check_PROGRAMS) $(check_LTLIBRARIES) @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @@ -2761,7 +2863,7 @@ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; -recheck: all $(check_LTLIBRARIES) $(check_PROGRAMS) +recheck: all $(check_PROGRAMS) $(check_LTLIBRARIES) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ @@ -4047,7 +4149,10 @@ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -4078,7 +4183,7 @@ fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_LTLIBRARIES) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile @@ -4123,7 +4228,191 @@ clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/cmp_str.Plo + -rm -f ./$(DEPDIR)/memory.Plo + -rm -f ./$(DEPDIR)/mpf_compat.Po + -rm -f ./$(DEPDIR)/mpfr_compat.Po + -rm -f ./$(DEPDIR)/random2.Plo + -rm -f ./$(DEPDIR)/reuse.Po + -rm -f ./$(DEPDIR)/rnd_mode.Plo + -rm -f ./$(DEPDIR)/tabort_defalloc1.Po + -rm -f ./$(DEPDIR)/tabort_defalloc2.Po + -rm -f ./$(DEPDIR)/tabort_prec_max.Po + -rm -f ./$(DEPDIR)/tabs.Po + -rm -f ./$(DEPDIR)/tacos.Po + -rm -f ./$(DEPDIR)/tacosh.Po + -rm -f ./$(DEPDIR)/tadd.Po + -rm -f ./$(DEPDIR)/tadd1sp.Po + -rm -f ./$(DEPDIR)/tadd_d.Po + -rm -f ./$(DEPDIR)/tadd_ui.Po + -rm -f ./$(DEPDIR)/tagm.Po + -rm -f ./$(DEPDIR)/tai.Po + -rm -f ./$(DEPDIR)/talloc-cache.Po + -rm -f ./$(DEPDIR)/talloc.Po + -rm -f ./$(DEPDIR)/tasin.Po + -rm -f ./$(DEPDIR)/tasinh.Po + -rm -f ./$(DEPDIR)/tassert.Po + -rm -f ./$(DEPDIR)/tatan.Po + -rm -f ./$(DEPDIR)/tatanh.Po + -rm -f ./$(DEPDIR)/taway.Po + -rm -f ./$(DEPDIR)/tbeta.Po + -rm -f ./$(DEPDIR)/tbuildopt.Po + -rm -f ./$(DEPDIR)/tcan_round.Po + -rm -f ./$(DEPDIR)/tcbrt.Po + -rm -f ./$(DEPDIR)/tcheck.Po + -rm -f ./$(DEPDIR)/tcmp.Po + -rm -f ./$(DEPDIR)/tcmp2.Po + -rm -f ./$(DEPDIR)/tcmp_d.Po + -rm -f ./$(DEPDIR)/tcmp_ld.Po + -rm -f ./$(DEPDIR)/tcmp_ui.Po + -rm -f ./$(DEPDIR)/tcmpabs.Po + -rm -f ./$(DEPDIR)/tcomparisons.Po + -rm -f ./$(DEPDIR)/tconst_catalan.Po + -rm -f ./$(DEPDIR)/tconst_euler.Po + -rm -f ./$(DEPDIR)/tconst_log2.Po + -rm -f ./$(DEPDIR)/tconst_pi.Po + -rm -f ./$(DEPDIR)/tcopysign.Po + -rm -f ./$(DEPDIR)/tcos.Po + -rm -f ./$(DEPDIR)/tcosh.Po + -rm -f ./$(DEPDIR)/tcot.Po + -rm -f ./$(DEPDIR)/tcoth.Po + -rm -f ./$(DEPDIR)/tcsc.Po + -rm -f ./$(DEPDIR)/tcsch.Po + -rm -f ./$(DEPDIR)/td_div.Po + -rm -f ./$(DEPDIR)/td_sub.Po + -rm -f ./$(DEPDIR)/tdigamma.Po + -rm -f ./$(DEPDIR)/tdim.Po + -rm -f ./$(DEPDIR)/tdiv.Po + -rm -f ./$(DEPDIR)/tdiv_d.Po + -rm -f ./$(DEPDIR)/tdiv_ui.Po + -rm -f ./$(DEPDIR)/teint.Po + -rm -f ./$(DEPDIR)/teq.Po + -rm -f ./$(DEPDIR)/terandom.Po + -rm -f ./$(DEPDIR)/terandom_chisq.Po + -rm -f ./$(DEPDIR)/terf.Po + -rm -f ./$(DEPDIR)/tests.Plo + -rm -f ./$(DEPDIR)/texceptions.Po + -rm -f ./$(DEPDIR)/texp.Po + -rm -f ./$(DEPDIR)/texp10.Po + -rm -f ./$(DEPDIR)/texp2.Po + -rm -f ./$(DEPDIR)/texpm1.Po + -rm -f ./$(DEPDIR)/tfactorial.Po + -rm -f ./$(DEPDIR)/tfits.Po + -rm -f ./$(DEPDIR)/tfma.Po + -rm -f ./$(DEPDIR)/tfmma.Po + -rm -f ./$(DEPDIR)/tfmod.Po + -rm -f ./$(DEPDIR)/tfms.Po + -rm -f ./$(DEPDIR)/tfpif.Po + -rm -f ./$(DEPDIR)/tfprintf.Po + -rm -f ./$(DEPDIR)/tfrac.Po + -rm -f ./$(DEPDIR)/tfrexp.Po + -rm -f ./$(DEPDIR)/tgamma.Po + -rm -f ./$(DEPDIR)/tgamma_inc.Po + -rm -f ./$(DEPDIR)/tget_d.Po + -rm -f ./$(DEPDIR)/tget_d_2exp.Po + -rm -f ./$(DEPDIR)/tget_f.Po + -rm -f ./$(DEPDIR)/tget_flt.Po + -rm -f ./$(DEPDIR)/tget_ld_2exp.Po + -rm -f ./$(DEPDIR)/tget_q.Po + -rm -f ./$(DEPDIR)/tget_set_d64.Po + -rm -f ./$(DEPDIR)/tget_sj.Po + -rm -f ./$(DEPDIR)/tget_str.Po + -rm -f ./$(DEPDIR)/tget_z.Po + -rm -f ./$(DEPDIR)/tgmpop.Po + -rm -f ./$(DEPDIR)/tgrandom.Po + -rm -f ./$(DEPDIR)/thyperbolic.Po + -rm -f ./$(DEPDIR)/thypot.Po + -rm -f ./$(DEPDIR)/tinits.Po + -rm -f ./$(DEPDIR)/tinp_str.Po + -rm -f ./$(DEPDIR)/tinternals.Po + -rm -f ./$(DEPDIR)/tisnan.Po + -rm -f ./$(DEPDIR)/tisqrt.Po + -rm -f ./$(DEPDIR)/tj0.Po + -rm -f ./$(DEPDIR)/tj1.Po + -rm -f ./$(DEPDIR)/tjn.Po + -rm -f ./$(DEPDIR)/tl2b.Po + -rm -f ./$(DEPDIR)/tlgamma.Po + -rm -f ./$(DEPDIR)/tli2.Po + -rm -f ./$(DEPDIR)/tlngamma.Po + -rm -f ./$(DEPDIR)/tlog.Po + -rm -f ./$(DEPDIR)/tlog10.Po + -rm -f ./$(DEPDIR)/tlog1p.Po + -rm -f ./$(DEPDIR)/tlog2.Po + -rm -f ./$(DEPDIR)/tlog_ui.Po + -rm -f ./$(DEPDIR)/tmin_prec.Po + -rm -f ./$(DEPDIR)/tminmax.Po + -rm -f ./$(DEPDIR)/tmodf.Po + -rm -f ./$(DEPDIR)/tmul.Po + -rm -f ./$(DEPDIR)/tmul_2exp.Po + -rm -f ./$(DEPDIR)/tmul_d.Po + -rm -f ./$(DEPDIR)/tmul_ui.Po + -rm -f ./$(DEPDIR)/tnext.Po + -rm -f ./$(DEPDIR)/tnrandom.Po + -rm -f ./$(DEPDIR)/tnrandom_chisq.Po + -rm -f ./$(DEPDIR)/tout_str.Po + -rm -f ./$(DEPDIR)/toutimpl.Po + -rm -f ./$(DEPDIR)/tpow.Po + -rm -f ./$(DEPDIR)/tpow3.Po + -rm -f ./$(DEPDIR)/tpow_all.Po + -rm -f ./$(DEPDIR)/tpow_z.Po + -rm -f ./$(DEPDIR)/tprintf.Po + -rm -f ./$(DEPDIR)/trandom.Po + -rm -f ./$(DEPDIR)/trandom_deviate.Po + -rm -f ./$(DEPDIR)/trec_sqrt.Po + -rm -f ./$(DEPDIR)/tremquo.Po + -rm -f ./$(DEPDIR)/trint.Po + -rm -f ./$(DEPDIR)/trndna.Po + -rm -f ./$(DEPDIR)/troot.Po + -rm -f ./$(DEPDIR)/trootn_ui.Po + -rm -f ./$(DEPDIR)/tround_prec.Po + -rm -f ./$(DEPDIR)/tsec.Po + -rm -f ./$(DEPDIR)/tsech.Po + -rm -f ./$(DEPDIR)/tset.Po + -rm -f ./$(DEPDIR)/tset_d.Po + -rm -f ./$(DEPDIR)/tset_exp.Po + -rm -f ./$(DEPDIR)/tset_f.Po + -rm -f ./$(DEPDIR)/tset_float128.Po + -rm -f ./$(DEPDIR)/tset_ld.Po + -rm -f ./$(DEPDIR)/tset_q.Po + -rm -f ./$(DEPDIR)/tset_si.Po + -rm -f ./$(DEPDIR)/tset_sj.Po + -rm -f ./$(DEPDIR)/tset_str.Po + -rm -f ./$(DEPDIR)/tset_z.Po + -rm -f ./$(DEPDIR)/tset_z_exp.Po + -rm -f ./$(DEPDIR)/tsgn.Po + -rm -f ./$(DEPDIR)/tsi_op.Po + -rm -f ./$(DEPDIR)/tsin.Po + -rm -f ./$(DEPDIR)/tsin_cos.Po + -rm -f ./$(DEPDIR)/tsinh.Po + -rm -f ./$(DEPDIR)/tsinh_cosh.Po + -rm -f ./$(DEPDIR)/tsprintf.Po + -rm -f ./$(DEPDIR)/tsqr.Po + -rm -f ./$(DEPDIR)/tsqrt.Po + -rm -f ./$(DEPDIR)/tsqrt_ui.Po + -rm -f ./$(DEPDIR)/tstckintc.Po + -rm -f ./$(DEPDIR)/tstdint.Po + -rm -f ./$(DEPDIR)/tstrtofr.Po + -rm -f ./$(DEPDIR)/tsub.Po + -rm -f ./$(DEPDIR)/tsub1sp.Po + -rm -f ./$(DEPDIR)/tsub_d.Po + -rm -f ./$(DEPDIR)/tsub_ui.Po + -rm -f ./$(DEPDIR)/tsubnormal.Po + -rm -f ./$(DEPDIR)/tsum.Po + -rm -f ./$(DEPDIR)/tswap.Po + -rm -f ./$(DEPDIR)/ttan.Po + -rm -f ./$(DEPDIR)/ttanh.Po + -rm -f ./$(DEPDIR)/ttrunc.Po + -rm -f ./$(DEPDIR)/tui_div.Po + -rm -f ./$(DEPDIR)/tui_pow.Po + -rm -f ./$(DEPDIR)/tui_sub.Po + -rm -f ./$(DEPDIR)/turandom.Po + -rm -f ./$(DEPDIR)/tvalist.Po + -rm -f ./$(DEPDIR)/tversion.Po + -rm -f ./$(DEPDIR)/ty0.Po + -rm -f ./$(DEPDIR)/ty1.Po + -rm -f ./$(DEPDIR)/tyn.Po + -rm -f ./$(DEPDIR)/tzeta.Po + -rm -f ./$(DEPDIR)/tzeta_ui.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -4169,7 +4458,191 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/cmp_str.Plo + -rm -f ./$(DEPDIR)/memory.Plo + -rm -f ./$(DEPDIR)/mpf_compat.Po + -rm -f ./$(DEPDIR)/mpfr_compat.Po + -rm -f ./$(DEPDIR)/random2.Plo + -rm -f ./$(DEPDIR)/reuse.Po + -rm -f ./$(DEPDIR)/rnd_mode.Plo + -rm -f ./$(DEPDIR)/tabort_defalloc1.Po + -rm -f ./$(DEPDIR)/tabort_defalloc2.Po + -rm -f ./$(DEPDIR)/tabort_prec_max.Po + -rm -f ./$(DEPDIR)/tabs.Po + -rm -f ./$(DEPDIR)/tacos.Po + -rm -f ./$(DEPDIR)/tacosh.Po + -rm -f ./$(DEPDIR)/tadd.Po + -rm -f ./$(DEPDIR)/tadd1sp.Po + -rm -f ./$(DEPDIR)/tadd_d.Po + -rm -f ./$(DEPDIR)/tadd_ui.Po + -rm -f ./$(DEPDIR)/tagm.Po + -rm -f ./$(DEPDIR)/tai.Po + -rm -f ./$(DEPDIR)/talloc-cache.Po + -rm -f ./$(DEPDIR)/talloc.Po + -rm -f ./$(DEPDIR)/tasin.Po + -rm -f ./$(DEPDIR)/tasinh.Po + -rm -f ./$(DEPDIR)/tassert.Po + -rm -f ./$(DEPDIR)/tatan.Po + -rm -f ./$(DEPDIR)/tatanh.Po + -rm -f ./$(DEPDIR)/taway.Po + -rm -f ./$(DEPDIR)/tbeta.Po + -rm -f ./$(DEPDIR)/tbuildopt.Po + -rm -f ./$(DEPDIR)/tcan_round.Po + -rm -f ./$(DEPDIR)/tcbrt.Po + -rm -f ./$(DEPDIR)/tcheck.Po + -rm -f ./$(DEPDIR)/tcmp.Po + -rm -f ./$(DEPDIR)/tcmp2.Po + -rm -f ./$(DEPDIR)/tcmp_d.Po + -rm -f ./$(DEPDIR)/tcmp_ld.Po + -rm -f ./$(DEPDIR)/tcmp_ui.Po + -rm -f ./$(DEPDIR)/tcmpabs.Po + -rm -f ./$(DEPDIR)/tcomparisons.Po + -rm -f ./$(DEPDIR)/tconst_catalan.Po + -rm -f ./$(DEPDIR)/tconst_euler.Po + -rm -f ./$(DEPDIR)/tconst_log2.Po + -rm -f ./$(DEPDIR)/tconst_pi.Po + -rm -f ./$(DEPDIR)/tcopysign.Po + -rm -f ./$(DEPDIR)/tcos.Po + -rm -f ./$(DEPDIR)/tcosh.Po + -rm -f ./$(DEPDIR)/tcot.Po + -rm -f ./$(DEPDIR)/tcoth.Po + -rm -f ./$(DEPDIR)/tcsc.Po + -rm -f ./$(DEPDIR)/tcsch.Po + -rm -f ./$(DEPDIR)/td_div.Po + -rm -f ./$(DEPDIR)/td_sub.Po + -rm -f ./$(DEPDIR)/tdigamma.Po + -rm -f ./$(DEPDIR)/tdim.Po + -rm -f ./$(DEPDIR)/tdiv.Po + -rm -f ./$(DEPDIR)/tdiv_d.Po + -rm -f ./$(DEPDIR)/tdiv_ui.Po + -rm -f ./$(DEPDIR)/teint.Po + -rm -f ./$(DEPDIR)/teq.Po + -rm -f ./$(DEPDIR)/terandom.Po + -rm -f ./$(DEPDIR)/terandom_chisq.Po + -rm -f ./$(DEPDIR)/terf.Po + -rm -f ./$(DEPDIR)/tests.Plo + -rm -f ./$(DEPDIR)/texceptions.Po + -rm -f ./$(DEPDIR)/texp.Po + -rm -f ./$(DEPDIR)/texp10.Po + -rm -f ./$(DEPDIR)/texp2.Po + -rm -f ./$(DEPDIR)/texpm1.Po + -rm -f ./$(DEPDIR)/tfactorial.Po + -rm -f ./$(DEPDIR)/tfits.Po + -rm -f ./$(DEPDIR)/tfma.Po + -rm -f ./$(DEPDIR)/tfmma.Po + -rm -f ./$(DEPDIR)/tfmod.Po + -rm -f ./$(DEPDIR)/tfms.Po + -rm -f ./$(DEPDIR)/tfpif.Po + -rm -f ./$(DEPDIR)/tfprintf.Po + -rm -f ./$(DEPDIR)/tfrac.Po + -rm -f ./$(DEPDIR)/tfrexp.Po + -rm -f ./$(DEPDIR)/tgamma.Po + -rm -f ./$(DEPDIR)/tgamma_inc.Po + -rm -f ./$(DEPDIR)/tget_d.Po + -rm -f ./$(DEPDIR)/tget_d_2exp.Po + -rm -f ./$(DEPDIR)/tget_f.Po + -rm -f ./$(DEPDIR)/tget_flt.Po + -rm -f ./$(DEPDIR)/tget_ld_2exp.Po + -rm -f ./$(DEPDIR)/tget_q.Po + -rm -f ./$(DEPDIR)/tget_set_d64.Po + -rm -f ./$(DEPDIR)/tget_sj.Po + -rm -f ./$(DEPDIR)/tget_str.Po + -rm -f ./$(DEPDIR)/tget_z.Po + -rm -f ./$(DEPDIR)/tgmpop.Po + -rm -f ./$(DEPDIR)/tgrandom.Po + -rm -f ./$(DEPDIR)/thyperbolic.Po + -rm -f ./$(DEPDIR)/thypot.Po + -rm -f ./$(DEPDIR)/tinits.Po + -rm -f ./$(DEPDIR)/tinp_str.Po + -rm -f ./$(DEPDIR)/tinternals.Po + -rm -f ./$(DEPDIR)/tisnan.Po + -rm -f ./$(DEPDIR)/tisqrt.Po + -rm -f ./$(DEPDIR)/tj0.Po + -rm -f ./$(DEPDIR)/tj1.Po + -rm -f ./$(DEPDIR)/tjn.Po + -rm -f ./$(DEPDIR)/tl2b.Po + -rm -f ./$(DEPDIR)/tlgamma.Po + -rm -f ./$(DEPDIR)/tli2.Po + -rm -f ./$(DEPDIR)/tlngamma.Po + -rm -f ./$(DEPDIR)/tlog.Po + -rm -f ./$(DEPDIR)/tlog10.Po + -rm -f ./$(DEPDIR)/tlog1p.Po + -rm -f ./$(DEPDIR)/tlog2.Po + -rm -f ./$(DEPDIR)/tlog_ui.Po + -rm -f ./$(DEPDIR)/tmin_prec.Po + -rm -f ./$(DEPDIR)/tminmax.Po + -rm -f ./$(DEPDIR)/tmodf.Po + -rm -f ./$(DEPDIR)/tmul.Po + -rm -f ./$(DEPDIR)/tmul_2exp.Po + -rm -f ./$(DEPDIR)/tmul_d.Po + -rm -f ./$(DEPDIR)/tmul_ui.Po + -rm -f ./$(DEPDIR)/tnext.Po + -rm -f ./$(DEPDIR)/tnrandom.Po + -rm -f ./$(DEPDIR)/tnrandom_chisq.Po + -rm -f ./$(DEPDIR)/tout_str.Po + -rm -f ./$(DEPDIR)/toutimpl.Po + -rm -f ./$(DEPDIR)/tpow.Po + -rm -f ./$(DEPDIR)/tpow3.Po + -rm -f ./$(DEPDIR)/tpow_all.Po + -rm -f ./$(DEPDIR)/tpow_z.Po + -rm -f ./$(DEPDIR)/tprintf.Po + -rm -f ./$(DEPDIR)/trandom.Po + -rm -f ./$(DEPDIR)/trandom_deviate.Po + -rm -f ./$(DEPDIR)/trec_sqrt.Po + -rm -f ./$(DEPDIR)/tremquo.Po + -rm -f ./$(DEPDIR)/trint.Po + -rm -f ./$(DEPDIR)/trndna.Po + -rm -f ./$(DEPDIR)/troot.Po + -rm -f ./$(DEPDIR)/trootn_ui.Po + -rm -f ./$(DEPDIR)/tround_prec.Po + -rm -f ./$(DEPDIR)/tsec.Po + -rm -f ./$(DEPDIR)/tsech.Po + -rm -f ./$(DEPDIR)/tset.Po + -rm -f ./$(DEPDIR)/tset_d.Po + -rm -f ./$(DEPDIR)/tset_exp.Po + -rm -f ./$(DEPDIR)/tset_f.Po + -rm -f ./$(DEPDIR)/tset_float128.Po + -rm -f ./$(DEPDIR)/tset_ld.Po + -rm -f ./$(DEPDIR)/tset_q.Po + -rm -f ./$(DEPDIR)/tset_si.Po + -rm -f ./$(DEPDIR)/tset_sj.Po + -rm -f ./$(DEPDIR)/tset_str.Po + -rm -f ./$(DEPDIR)/tset_z.Po + -rm -f ./$(DEPDIR)/tset_z_exp.Po + -rm -f ./$(DEPDIR)/tsgn.Po + -rm -f ./$(DEPDIR)/tsi_op.Po + -rm -f ./$(DEPDIR)/tsin.Po + -rm -f ./$(DEPDIR)/tsin_cos.Po + -rm -f ./$(DEPDIR)/tsinh.Po + -rm -f ./$(DEPDIR)/tsinh_cosh.Po + -rm -f ./$(DEPDIR)/tsprintf.Po + -rm -f ./$(DEPDIR)/tsqr.Po + -rm -f ./$(DEPDIR)/tsqrt.Po + -rm -f ./$(DEPDIR)/tsqrt_ui.Po + -rm -f ./$(DEPDIR)/tstckintc.Po + -rm -f ./$(DEPDIR)/tstdint.Po + -rm -f ./$(DEPDIR)/tstrtofr.Po + -rm -f ./$(DEPDIR)/tsub.Po + -rm -f ./$(DEPDIR)/tsub1sp.Po + -rm -f ./$(DEPDIR)/tsub_d.Po + -rm -f ./$(DEPDIR)/tsub_ui.Po + -rm -f ./$(DEPDIR)/tsubnormal.Po + -rm -f ./$(DEPDIR)/tsum.Po + -rm -f ./$(DEPDIR)/tswap.Po + -rm -f ./$(DEPDIR)/ttan.Po + -rm -f ./$(DEPDIR)/ttanh.Po + -rm -f ./$(DEPDIR)/ttrunc.Po + -rm -f ./$(DEPDIR)/tui_div.Po + -rm -f ./$(DEPDIR)/tui_pow.Po + -rm -f ./$(DEPDIR)/tui_sub.Po + -rm -f ./$(DEPDIR)/turandom.Po + -rm -f ./$(DEPDIR)/tvalist.Po + -rm -f ./$(DEPDIR)/tversion.Po + -rm -f ./$(DEPDIR)/ty0.Po + -rm -f ./$(DEPDIR)/ty1.Po + -rm -f ./$(DEPDIR)/tyn.Po + -rm -f ./$(DEPDIR)/tzeta.Po + -rm -f ./$(DEPDIR)/tzeta_ui.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -4190,20 +4663,20 @@ .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \ - clean-libtool cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am recheck tags tags-am uninstall \ - uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkLTLIBRARIES clean-checkPROGRAMS \ + clean-generic clean-libtool cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am .PRECIOUS: Makefile @@ -4218,7 +4691,13 @@ # has been generated with Automake 1.13+); but this is done only when # no tests fail. check: - cat tversion.log 2> /dev/null || true + @if [ -d $(top_srcdir)/.svn ]; then \ + output=`svnversion $(top_srcdir) 2> /dev/null`; \ + if [ -n "$$output" ]; then \ + echo "[svnversion] $$output"; \ + fi; \ + fi + @grep -v '^PASS ' tversion.log 2> /dev/null || true $(top_builddir)/src/libmpfr.la: cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libmpfr.la diff -Nru mpfr4-4.0.1/tests/memory.c mpfr4-4.0.2/tests/memory.c --- mpfr4-4.0.1/tests/memory.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/memory.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Memory allocation used during tests. -Copyright 2001-2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Note: this file comes from GMP's tests/memory.c */ diff -Nru mpfr4-4.0.1/tests/mpf_compat.c mpfr4-4.0.2/tests/mpf_compat.c --- mpfr4-4.0.1/tests/mpf_compat.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/mpf_compat.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test compatibility mpf-mpfr. -Copyright 2003, 2005-2018 Free Software Foundation, Inc. +Copyright 2003, 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/mpf_compat.h mpfr4-4.0.2/tests/mpf_compat.h --- mpfr4-4.0.1/tests/mpf_compat.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/mpf_compat.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test compatibility mpf-mpfr. -Copyright 2003-2018 Free Software Foundation, Inc. +Copyright 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef MPFR diff -Nru mpfr4-4.0.1/tests/mpfr_compat.c mpfr4-4.0.2/tests/mpfr_compat.c --- mpfr4-4.0.1/tests/mpfr_compat.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/mpfr_compat.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test compatibility mpf-mpfr. -Copyright 2003, 2005-2018 Free Software Foundation, Inc. +Copyright 2003, 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/mpfr-test.h mpfr4-4.0.2/tests/mpfr-test.h --- mpfr4-4.0.1/tests/mpfr-test.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/mpfr-test.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* auxiliary functions for MPFR tests. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __MPFR_TEST_H__ diff -Nru mpfr4-4.0.1/tests/random2.c mpfr4-4.0.2/tests/random2.c --- mpfr4-4.0.1/tests/random2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/random2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* mpfr_random2 -- Generate a positive random mpfr_t of specified size, with long runs of consecutive ones and zeros in the binary representation. -Copyright 1999, 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/reuse.c mpfr4-4.0.2/tests/reuse.c --- mpfr4-4.0.1/tests/reuse.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/reuse.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for in-place operations. -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/rnd_mode.c mpfr4-4.0.2/tests/rnd_mode.c --- mpfr4-4.0.1/tests/rnd_mode.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/rnd_mode.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_set_machine_rnd_mode -- set the rounding mode for machine floats -Copyright 1999, 2001-2002, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2002, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tabort_defalloc1.c mpfr4-4.0.2/tests/tabort_defalloc1.c --- mpfr4-4.0.1/tests/tabort_defalloc1.c 2018-02-02 10:14:04.000000000 +0000 +++ mpfr4-4.0.2/tests/tabort_defalloc1.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tabort_defalloc1 -- Test for abort due to reaching out of memory -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/tests/tabort_defalloc2.c mpfr4-4.0.2/tests/tabort_defalloc2.c --- mpfr4-4.0.1/tests/tabort_defalloc2.c 2018-02-02 10:14:04.000000000 +0000 +++ mpfr4-4.0.2/tests/tabort_defalloc2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tabort_defalloc2 -- Test for abort due to reaching out of memory -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/tests/tabort_prec_max.c mpfr4-4.0.2/tests/tabort_prec_max.c --- mpfr4-4.0.1/tests/tabort_prec_max.c 2018-02-02 10:14:04.000000000 +0000 +++ mpfr4-4.0.2/tests/tabort_prec_max.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tabort_prec_max -- Test for abort termination due to reaching prec max -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/tests/tabs.c mpfr4-4.0.2/tests/tabs.c --- mpfr4-4.0.1/tests/tabs.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tabs.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_abs. -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tacos.c mpfr4-4.0.2/tests/tacos.c --- mpfr4-4.0.1/tests/tacos.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tacos.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_acos. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tacosh.c mpfr4-4.0.2/tests/tacosh.c --- mpfr4-4.0.1/tests/tacosh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tacosh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_acosh. -Copyright 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tadd1sp.c mpfr4-4.0.2/tests/tadd1sp.c --- mpfr4-4.0.1/tests/tadd1sp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tadd1sp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_add1sp. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -72,6 +72,152 @@ mpfr_clear (c); } +/* Check corner case b = 1, c = 2^(-p) for MPFR_PREC_MIN <= p <= pmax. + With RNDN, result is 1, except for p=1, where it is 2. */ +static void +test_corner_1 (mpfr_prec_t pmax) +{ + mpfr_prec_t p; + + for (p = MPFR_PREC_MIN; p <= pmax; p++) + { + mpfr_t a, b, c; + int inex; + mpfr_init2 (a, p); + mpfr_init2 (b, p); + mpfr_init2 (c, p); + mpfr_set_ui (b, 1, MPFR_RNDN); + mpfr_set_ui_2exp (c, 1, -p, MPFR_RNDN); + inex = mpfr_add (a, b, c, MPFR_RNDN); + if (p == 1) /* special case, since 2^(p-1) is odd */ + { + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 2) == 0); + } + else + { + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + } + mpfr_clear (a); + mpfr_clear (b); + mpfr_clear (c); + } +} + +static void +coverage (void) +{ + mpfr_t a, b, c; + int inex; + mpfr_exp_t emax; + + /* coverage test in mpfr_add1sp1n: case round away, where add_one_ulp + gives a carry, and the new exponent is below emax */ + mpfr_init2 (a, GMP_NUMB_BITS); + mpfr_init2 (b, GMP_NUMB_BITS); + mpfr_init2 (c, GMP_NUMB_BITS); + mpfr_set_ui (b, 1, MPFR_RNDN); + mpfr_nextbelow (b); /* b = 1 - 2^(-p) */ + mpfr_set_ui_2exp (c, 1, -GMP_NUMB_BITS-1, MPFR_RNDN); + /* c = 2^(-p-1) thus b+c = 1 - 2^(-p-1) should be rounded to 1 */ + inex = mpfr_add (a, b, c, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + + /* coverage test in mpfr_add1sp2: case GMP_NUMB_BITS <= d < 2*GMP_NUMB_BITS + and a1 = 0 */ + mpfr_set_prec (a, GMP_NUMB_BITS + 2); + mpfr_set_prec (b, GMP_NUMB_BITS + 2); + mpfr_set_prec (c, GMP_NUMB_BITS + 2); + mpfr_set_ui (b, 1, MPFR_RNDN); + mpfr_nextbelow (b); /* b = 1 - 2^(-p) with p = GMP_NUMB_BITS+2 */ + mpfr_set_ui_2exp (c, 1, -GMP_NUMB_BITS-1, MPFR_RNDN); + mpfr_nextbelow (c); /* c = 2^(1-p) - 2^(1-2p) */ + /* a = 1 + 2^(-p) - 2^(1-2p) should be rounded to 1 with RNDN */ + inex = mpfr_add (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + + /* coverage test in mpfr_add1sp2: case round away, where add_one_ulp + gives a carry, and the new exponent is below emax */ + mpfr_set_prec (a, GMP_NUMB_BITS + 1); + mpfr_set_prec (b, GMP_NUMB_BITS + 1); + mpfr_set_prec (c, GMP_NUMB_BITS + 1); + mpfr_set_ui (b, 1, MPFR_RNDN); + mpfr_nextbelow (b); /* b = 1 - 2^(-p) */ + mpfr_set_ui_2exp (c, 1, -GMP_NUMB_BITS-2, MPFR_RNDN); + /* c = 2^(-p-1) */ + inex = mpfr_add (a, b, c, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + + /* coverage test in mpfr_add1sp3: case GMP_NUMB_BITS <= d < 2*GMP_NUMB_BITS + and a2 == 0 */ + mpfr_set_prec (a, 2 * GMP_NUMB_BITS + 2); + mpfr_set_prec (b, 2 * GMP_NUMB_BITS + 2); + mpfr_set_prec (c, 2 * GMP_NUMB_BITS + 2); + mpfr_set_ui (b, 1, MPFR_RNDN); + mpfr_nextbelow (b); /* b = 1 - 2^(-p) with p = 2*GMP_NUMB_BITS+2 */ + mpfr_set_ui_2exp (c, 1, -2*GMP_NUMB_BITS-1, MPFR_RNDN); + mpfr_nextbelow (c); /* c = 2^(1-p) - 2^(1-2p) */ + /* a = 1 + 2^(-p) - 2^(1-2p) should be rounded to 1 with RNDN */ + inex = mpfr_add (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + + /* coverage test in mpfr_add1sp3: case bx > emax */ + emax = mpfr_get_emax (); + mpfr_set_emax (1); + mpfr_set_prec (a, 2 * GMP_NUMB_BITS + 1); + mpfr_set_prec (b, 2 * GMP_NUMB_BITS + 1); + mpfr_set_prec (c, 2 * GMP_NUMB_BITS + 1); + mpfr_set_ui_2exp (b, 1, mpfr_get_emax () - 1, MPFR_RNDN); + mpfr_nextbelow (b); + mpfr_mul_2exp (b, b, 1, MPFR_RNDN); + /* now b is the largest number < +Inf */ + mpfr_div_2exp (c, b, GMP_NUMB_BITS - 1, MPFR_RNDN); + /* we are in the case d < GMP_NUMB_BITS of mpfr_add1sp3 */ + inex = mpfr_add (a, b, b, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (a) && mpfr_sgn (a) > 0); + mpfr_set_emax (emax); + + /* coverage test in mpfr_add1sp3: case round away, where add_one_ulp gives + a carry, no overflow */ + mpfr_set_prec (a, 2 * GMP_NUMB_BITS + 1); + mpfr_set_prec (b, 2 * GMP_NUMB_BITS + 1); + mpfr_set_prec (c, 2 * GMP_NUMB_BITS + 1); + mpfr_set_ui (b, 1, MPFR_RNDN); + mpfr_nextbelow (b); /* b = 1 - 2^(-p) */ + mpfr_set_ui_2exp (c, 1, -2 * GMP_NUMB_BITS - 2, MPFR_RNDN); + /* c = 2^(-p-1) */ + inex = mpfr_add (a, b, c, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + + /* coverage test in mpfr_add1sp3: case round away, where add_one_ulp gives + a carry, with overflow */ + emax = mpfr_get_emax (); + mpfr_set_emax (1); + mpfr_set_prec (a, 2 * GMP_NUMB_BITS + 1); + mpfr_set_prec (b, 2 * GMP_NUMB_BITS + 1); + mpfr_set_prec (c, 2 * GMP_NUMB_BITS + 1); + mpfr_set_ui_2exp (b, 1, mpfr_get_emax () - 1, MPFR_RNDN); + mpfr_nextbelow (b); + mpfr_mul_2exp (b, b, 1, MPFR_RNDN); + /* now b is the largest number < +Inf */ + mpfr_set_ui_2exp (c, 1, mpfr_get_emin () - 1, MPFR_RNDN); + inex = mpfr_add (a, b, c, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (a) && mpfr_sgn (a) > 0); + mpfr_set_emax (emax); + + mpfr_clear (a); + mpfr_clear (b); + mpfr_clear (c); +} + int main (void) { @@ -79,6 +225,8 @@ tests_start_mpfr (); + coverage (); + test_corner_1 (1024); bug20171217 (); check_special (); for(p = MPFR_PREC_MIN; p < 200 ; p++) diff -Nru mpfr4-4.0.1/tests/tadd.c mpfr4-4.0.2/tests/tadd.c --- mpfr4-4.0.1/tests/tadd.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tadd.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_add and mpfr_sub. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define N 30000 @@ -1083,6 +1083,14 @@ "1e0",128, "100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e0",256, MPFR_RNDN); + check2b("0.10000000000000000011101111111110110110001100010110100011010000110101101101010010000110110011100110001101110010111011011110010101e1",128, + "0.11110011001100100001111011100010010100011011011111111110101001101001101011100101011110101111111100010010100010100111110110011001e-63",128, + "0.10000000000000000011101111111110110110001100010110100011010001000100111010000100001110100001101111011111100000111011011000111100e1",128, + MPFR_RNDN); + check2b("0.101000111001110100111100000010110010011101001011101001001101101000010100010000011100110110110011011000001110110101100111010110011101000111010011110001010001110110110011111011011100101011111100e-2",192, + "0.101101100000111110011110000110001000110110010010110000111101110010111010100110000000000110010100010001000001011011101010111010101011010110011011011110110111001000111001101000010101111010010010e-130",192, + "0.101000111001110100111100000010110010011101001011101001001101101000010100010000011100110110110011011000001110110101100111010110101000011111100011011000110011011001000001100000001000111011011001e-2",192, + MPFR_RNDN); /* Checking double precision (53 bits) */ check53("-8.22183238641455905806e-19", "7.42227178769761587878e-19",MPFR_RNDD, diff -Nru mpfr4-4.0.1/tests/tadd_d.c mpfr4-4.0.2/tests/tadd_d.c --- mpfr4-4.0.1/tests/tadd_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tadd_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_add_d -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tadd_ui.c mpfr4-4.0.2/tests/tadd_ui.c --- mpfr4-4.0.1/tests/tadd_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tadd_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_add_ui -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tagm.c mpfr4-4.0.2/tests/tagm.c --- mpfr4-4.0.1/tests/tagm.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tagm.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_agm. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -354,7 +354,6 @@ tests_start_mpfr (); check_special (); - check_large (); check_eq (); check4 ("2.0", "1.0", MPFR_RNDN, "1.456791031046906869", -1); diff -Nru mpfr4-4.0.1/tests/tai.c mpfr4-4.0.2/tests/tai.c --- mpfr4-4.0.1/tests/tai.c 2018-01-10 16:48:57.000000000 +0000 +++ mpfr4-4.0.2/tests/tai.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_ai. -Copyright 2010-2018 Free Software Foundation, Inc. +Copyright 2010-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -133,11 +133,105 @@ mpfr_clear (z); } +/* exercise mpfr_ai near m*2^e, for precision p */ +static void +test_near_m2e (long m, mpfr_exp_t e, mpfr_prec_t pmax) +{ + mpfr_t x, xx, y, yy; + mpfr_prec_t p; + int inex; + + mpfr_clear_flags (); + + /* first determine the smallest precision for which m*2^e is exact */ + for (p = MPFR_PREC_MIN; p <= pmax; p++) + { + mpfr_init2 (x, p); + inex = mpfr_set_si_2exp (x, m, e, MPFR_RNDN); + mpfr_clear (x); + if (inex == 0) + break; + } + + mpfr_init2 (x, p); + inex = mpfr_set_si_2exp (x, m, e, MPFR_RNDN); + MPFR_ASSERTN(inex == 0); + + for (; p <= pmax; p++) + { + mpfr_init2 (y, p); + mpfr_init2 (xx, p); + mpfr_init2 (yy, p); + mpfr_prec_round (x, p, MPFR_RNDN); + mpfr_ai (y, x, MPFR_RNDN); + while (1) + { + mpfr_set (xx, x, MPFR_RNDN); + mpfr_nextbelow (xx); + mpfr_ai (yy, xx, MPFR_RNDN); + if (mpfr_cmpabs (yy, y) >= 0) + break; + else + { + mpfr_set (x, xx, MPFR_RNDN); + mpfr_set (y, yy, MPFR_RNDN); + } + } + while (1) + { + mpfr_set (xx, x, MPFR_RNDN); + mpfr_nextabove (xx); + mpfr_ai (yy, xx, MPFR_RNDN); + if (mpfr_cmpabs (yy, y) >= 0) + break; + else + { + mpfr_set (x, xx, MPFR_RNDN); + mpfr_set (y, yy, MPFR_RNDN); + } + } + mpfr_clear (y); + mpfr_clear (xx); + mpfr_clear (yy); + } + + mpfr_clear (x); + + /* Since some tests don't really check that the result is not NaN... */ + MPFR_ASSERTN (! mpfr_nanflag_p ()); +} + +/* example provided by Sylvain Chevillard, which exercises the case + wprec < err + 1, and thus correct_bits = 0, in src/ai.c */ +static void +coverage (void) +{ + mpfr_t x, y; + int inex; + + mpfr_init2 (x, 800); + mpfr_init2 (y, 20); + mpfr_set_str (x, "-2.3381074104597670384891972524467354406385401456723878524838544372136680027002836477821640417313293202847600938532659527752254668583598667448688987168197275409731526749911127480659996456283534915503672", 10, MPFR_RNDN); + inex = mpfr_ai (y, x, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (y, 593131, -682) == 0); + + mpfr_clear (x); + mpfr_clear (y); +} + int main (int argc, char *argv[]) { tests_start_mpfr (); + coverage (); + test_near_m2e (-5, -1, 100); /* exercise near -2.5 */ + test_near_m2e (-4, 0, 100); /* exercise near -4 */ + test_near_m2e (-11, -1, 100); /* exercise near -5.5 */ + test_near_m2e (-27, -2, 100); /* exercise near -6.75 */ + test_near_m2e (-31, -2, 100); /* exercise near -7.75 */ + test_near_m2e (-15, -1, 100); /* exercise near -7.5 */ bug20180107 (); check_large (); check_zero (); diff -Nru mpfr4-4.0.1/tests/talloc.c mpfr4-4.0.2/tests/talloc.c --- mpfr4-4.0.1/tests/talloc.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/talloc.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* talloc -- test file concerning memory allocation -Copyright 2015-2018 Free Software Foundation, Inc. +Copyright 2015-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/talloc-cache.c mpfr4-4.0.2/tests/talloc-cache.c --- mpfr4-4.0.1/tests/talloc-cache.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/talloc-cache.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* talloc-cache -- test file concerning memory allocation and cache -Copyright 2016-2018 Free Software Foundation, Inc. +Copyright 2016-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tasin.c mpfr4-4.0.2/tests/tasin.c --- mpfr4-4.0.1/tests/tasin.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tasin.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_asin. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tasinh.c mpfr4-4.0.2/tests/tasinh.c --- mpfr4-4.0.1/tests/tasinh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tasinh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_asinh. -Copyright 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tassert.c mpfr4-4.0.2/tests/tassert.c --- mpfr4-4.0.1/tests/tassert.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tassert.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tassert -- Test for assertions. -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/tests/tatan.c mpfr4-4.0.2/tests/tatan.c --- mpfr4-4.0.1/tests/tatan.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tatan.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_atan. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tatanh.c mpfr4-4.0.2/tests/tatanh.c --- mpfr4-4.0.1/tests/tatanh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tatanh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_atanh. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/taway.c mpfr4-4.0.2/tests/taway.c --- mpfr4-4.0.1/tests/taway.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/taway.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for round away. -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tbeta.c mpfr4-4.0.2/tests/tbeta.c --- mpfr4-4.0.1/tests/tbeta.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tbeta.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for the beta function -Copyright 2017-2018 Free Software Foundation, Inc. +Copyright 2017-2019 Free Software Foundation, Inc. Contributed by ChemicalDevelopment. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tbuildopt.c mpfr4-4.0.2/tests/tbuildopt.c --- mpfr4-4.0.1/tests/tbuildopt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tbuildopt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* tbuildopt.c -- test file for mpfr_buildopt_tls_p and mpfr_buildopt_decimal_p. -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -60,6 +60,24 @@ } static void +check_float128_p (void) +{ +#ifdef MPFR_WANT_FLOAT128 + if (!mpfr_buildopt_float128_p()) + { + printf ("Error: mpfr_buildopt_float128_p should return true\n"); + exit (1); + } +#else + if (mpfr_buildopt_float128_p()) + { + printf ("Error: mpfr_buildopt_float128_p should return false\n"); + exit (1); + } +#endif +} + +static void check_gmpinternals_p (void) { #if defined(MPFR_HAVE_GMP_IMPL) || defined(WANT_GMP_INTERNALS) @@ -84,7 +102,12 @@ check_tls_p(); check_decimal_p(); + check_float128_p(); check_gmpinternals_p(); + { + const char *s = mpfr_buildopt_tune_case (); + (void) strlen (s); + } tests_end_mpfr (); return 0; diff -Nru mpfr4-4.0.1/tests/tcan_round.c mpfr4-4.0.2/tests/tcan_round.c --- mpfr4-4.0.1/tests/tcan_round.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcan_round.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_can_round and mpfr_round_p. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -88,9 +88,54 @@ MPFR_RNDN, MPFR_RNDZ, p); if (r1 != r2) { - printf ("mpfr_round_p(%d) != mpfr_can_round(%d)!\n" + printf ("mpfr_round_p(%d) != mpfr_can_round(%d,RNDZ)!\n" "bn = %ld, err0 = %ld, prec = %lu\nbp = ", - r1, r2, n, (long) err, (unsigned long) p); + r1, r2, (long) n, (long) err, (unsigned long) p); +#ifndef MPFR_USE_MINI_GMP + gmp_printf ("%NX\n", buf, n); +#endif + exit (1); + } + /* Same with RNDF: with rnd1=RNDN, rnd2=RNDF is converted to RNDN. */ + r1 = mpfr_can_round_raw (buf, n, MPFR_SIGN_POS, err, + MPFR_RNDN, MPFR_RNDN, p); + r2 = mpfr_can_round_raw (buf, n, MPFR_SIGN_POS, err, + MPFR_RNDN, MPFR_RNDF, p); + if (r1 != r2) + { + printf ("mpfr_can_round(%d,RNDN) != mpfr_can_round(%d,RNDF)!\n" + "bn = %ld, err0 = %ld, prec = %lu\nbp = ", + r1, r2, (long) n, (long) err, (unsigned long) p); +#ifndef MPFR_USE_MINI_GMP + gmp_printf ("%NX\n", buf, n); +#endif + exit (1); + } + /* Same with RNDF: with rnd1=RNDZ, rnd2=RNDF is converted to RNDA. */ + r1 = mpfr_can_round_raw (buf, n, MPFR_SIGN_POS, err, + MPFR_RNDZ, MPFR_RNDA, p); + r2 = mpfr_can_round_raw (buf, n, MPFR_SIGN_POS, err, + MPFR_RNDZ, MPFR_RNDF, p); + if (r1 != r2) + { + printf ("mpfr_can_round(%d,RNDA) != mpfr_can_round(%d,RNDF)!\n" + "bn = %ld, err0 = %ld, prec = %lu\nbp = ", + r1, r2, (long) n, (long) err, (unsigned long) p); +#ifndef MPFR_USE_MINI_GMP + gmp_printf ("%NX\n", buf, n); +#endif + exit (1); + } + /* Same with RNDF: with rnd1=RNDA, rnd2=RNDF is converted to RNDZ. */ + r1 = mpfr_can_round_raw (buf, n, MPFR_SIGN_POS, err, + MPFR_RNDA, MPFR_RNDZ, p); + r2 = mpfr_can_round_raw (buf, n, MPFR_SIGN_POS, err, + MPFR_RNDA, MPFR_RNDF, p); + if (r1 != r2) + { + printf ("mpfr_can_round(%d,RNDZ) != mpfr_can_round(%d,RNDF)!\n" + "bn = %ld, err0 = %ld, prec = %lu\nbp = ", + r1, r2, (long) n, (long) err, (unsigned long) p); #ifndef MPFR_USE_MINI_GMP gmp_printf ("%NX\n", buf, n); #endif @@ -231,6 +276,36 @@ mpfr_clears (x, xinf, xsup, yinf, ysup, (mpfr_ptr) 0); } +/* test of RNDNA (nearest with ties to away) */ +static void +test_rndna (void) +{ + mpfr_t x; + int inex; + + mpfr_init2 (x, 10); + mpfr_set_str_binary (x, "1111111101"); /* 1021 */ + inex = mpfr_prec_round (x, 9, MPFR_RNDNA); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (x, 1022) == 0); + mpfr_set_prec (x, 10); + mpfr_set_str_binary (x, "1111111101"); /* 1021 */ + inex = mpfr_prec_round (x, 9, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_cmp_ui (x, 1020) == 0); + mpfr_set_prec (x, 10); + mpfr_set_str_binary (x, "1111111011"); /* 1019 */ + inex = mpfr_prec_round (x, 9, MPFR_RNDNA); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (x, 1020) == 0); + mpfr_set_prec (x, 10); + mpfr_set_str_binary (x, "1111111011"); /* 1019 */ + inex = mpfr_prec_round (x, 9, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (x, 1020) == 0); + mpfr_clear (x); +} + int main (void) { @@ -241,6 +316,7 @@ tests_start_mpfr (); + test_rndna (); test_simple (); /* checks that rounds to nearest sets the last diff -Nru mpfr4-4.0.1/tests/tcbrt.c mpfr4-4.0.2/tests/tcbrt.c --- mpfr4-4.0.1/tests/tcbrt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcbrt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_cbrt. -Copyright 2002-2018 Free Software Foundation, Inc. +Copyright 2002-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcheck.c mpfr4-4.0.2/tests/tcheck.c --- mpfr4-4.0.1/tests/tcheck.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcheck.c 2019-01-13 15:39:13.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_check. -Copyright 2003-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2003-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -69,7 +69,7 @@ max--; } if (max == 0) - PRINT_ERROR ("can't reach overflow"); + PRINT_ERROR ("for overflow"); mpfr_set_ui (a, 2137, MPFR_RNDN); /* Corrupt a and check for it */ MPFR_SIGN (a) = 2; diff -Nru mpfr4-4.0.1/tests/tcmp2.c mpfr4-4.0.2/tests/tcmp2.c --- mpfr4-4.0.1/tests/tcmp2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcmp2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_cmp2. -Copyright 1999-2003, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcmpabs.c mpfr4-4.0.2/tests/tcmpabs.c --- mpfr4-4.0.1/tests/tcmpabs.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcmpabs.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_cmpabs. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcmp.c mpfr4-4.0.2/tests/tcmp.c --- mpfr4-4.0.1/tests/tcmp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcmp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_cmp. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcmp_d.c mpfr4-4.0.2/tests/tcmp_d.c --- mpfr4-4.0.1/tests/tcmp_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcmp_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_cmp_d. -Copyright 1999, 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcmp_ld.c mpfr4-4.0.2/tests/tcmp_ld.c --- mpfr4-4.0.1/tests/tcmp_ld.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcmp_ld.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_cmp_ld. -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tcmp_ui.c mpfr4-4.0.2/tests/tcmp_ui.c --- mpfr4-4.0.1/tests/tcmp_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcmp_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_cmp_ui and mpfr_cmp_si. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef TCMP_UI_CHECK_NAN diff -Nru mpfr4-4.0.1/tests/tcomparisons.c mpfr4-4.0.2/tests/tcomparisons.c --- mpfr4-4.0.1/tests/tcomparisons.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcomparisons.c 2019-01-07 13:53:20.000000000 +0000 @@ -2,7 +2,7 @@ mpfr_lessequal_p, mpfr_lessgreater_p, mpfr_equal_p, mpfr_unordered_p functions. -Copyright 2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -19,7 +19,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tconst_catalan.c mpfr4-4.0.2/tests/tconst_catalan.c --- mpfr4-4.0.1/tests/tconst_catalan.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tconst_catalan.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_const_catalan. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tconst_euler.c mpfr4-4.0.2/tests/tconst_euler.c --- mpfr4-4.0.1/tests/tconst_euler.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tconst_euler.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_const_euler. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tconst_log2.c mpfr4-4.0.2/tests/tconst_log2.c --- mpfr4-4.0.1/tests/tconst_log2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tconst_log2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_const_log2. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tconst_pi.c mpfr4-4.0.2/tests/tconst_pi.c --- mpfr4-4.0.1/tests/tconst_pi.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tconst_pi.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_const_pi. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,12 +17,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" -#if defined (WANT_SHARED_CACHE) && defined(HAVE_PTHREAD) +#if defined(MPFR_WANT_SHARED_CACHE) && defined(HAVE_PTHREAD) # include @@ -81,9 +81,11 @@ # define RUN_PTHREAD_TEST() \ (MPFR_ASSERTN(mpfr_buildopt_sharedcache_p() == 1), run_pthread_test()) + #else -# define RUN_PTHREAD_TEST() \ - (MPFR_ASSERTN(mpfr_buildopt_sharedcache_p() == 0)) + +# define RUN_PTHREAD_TEST() ((void) 0) + #endif /* tconst_pi [prec] [rnd] [0 = no print] */ @@ -245,7 +247,16 @@ RUN_PTHREAD_TEST(); + /* the following is just to test mpfr_free_cache2 with MPFR_FREE_LOCAL_CACHE, + it should not hurt, since the call to mpfr_free_cache in tests_end_mpfr + will do nothing */ + mpfr_free_cache2 (MPFR_FREE_LOCAL_CACHE); + tests_end_mpfr (); + /* another test of mpfr_free_cache2 with MPFR_FREE_LOCAL_CACHE, to check + that we can call it when the caches are already freed */ + mpfr_free_cache2 (MPFR_FREE_LOCAL_CACHE); + return 0; } diff -Nru mpfr4-4.0.1/tests/tcopysign.c mpfr4-4.0.2/tests/tcopysign.c --- mpfr4-4.0.1/tests/tcopysign.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcopysign.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_copysign, mpfr_setsign and mpfr_signbit. -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcos.c mpfr4-4.0.2/tests/tcos.c --- mpfr4-4.0.1/tests/tcos.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcos.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_cos. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcosh.c mpfr4-4.0.2/tests/tcosh.c --- mpfr4-4.0.1/tests/tcosh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcosh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_cosh. -Copyright 2001-2002, 2004-2018 Free Software Foundation, Inc. +Copyright 2001-2002, 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcot.c mpfr4-4.0.2/tests/tcot.c --- mpfr4-4.0.1/tests/tcot.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcot.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_cot. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcoth.c mpfr4-4.0.2/tests/tcoth.c --- mpfr4-4.0.1/tests/tcoth.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcoth.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_coth. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcsc.c mpfr4-4.0.2/tests/tcsc.c --- mpfr4-4.0.1/tests/tcsc.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcsc.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_csc. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tcsch.c mpfr4-4.0.2/tests/tcsch.c --- mpfr4-4.0.1/tests/tcsch.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tcsch.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_csch. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/td_div.c mpfr4-4.0.2/tests/td_div.c --- mpfr4-4.0.1/tests/td_div.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/td_div.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_d_div -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tdigamma.c mpfr4-4.0.2/tests/tdigamma.c --- mpfr4-4.0.1/tests/tdigamma.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tdigamma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* test file for digamma function -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tdim.c mpfr4-4.0.2/tests/tdim.c --- mpfr4-4.0.1/tests/tdim.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tdim.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_dim. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tdiv.c mpfr4-4.0.2/tests/tdiv.c --- mpfr4-4.0.1/tests/tdiv.c 2018-01-31 09:57:51.000000000 +0000 +++ mpfr4-4.0.2/tests/tdiv.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_div (and some mpfr_div_ui, etc. tests). -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -1128,9 +1128,13 @@ mpfr_init2 (q0, GMP_NUMB_BITS); /* generate a random divisor of p bits */ - mpfr_urandomb (d, RANDS); - /* generate a random quotient of GMP_NUMB_BITS bits */ - mpfr_urandomb (q0, RANDS); + do + mpfr_urandomb (d, RANDS); + while (mpfr_zero_p (d)); + /* generate a random non-zero quotient of GMP_NUMB_BITS bits */ + do + mpfr_urandomb (q0, RANDS); + while (mpfr_zero_p (q0)); /* zero-pad the quotient to p bits */ inex = mpfr_prec_round (q0, p, MPFR_RNDN); MPFR_ASSERTN(inex == 0); @@ -1152,7 +1156,16 @@ MPFR_ASSERTN(inex == 0); mpfr_nextabove (n); mpfr_div (q, n, d, MPFR_RNDN); - MPFR_ASSERTN(mpfr_cmp (q, q0) == 0); + if (! mpfr_equal_p (q, q0)) + { + printf ("Error in test_20151023 for p=%ld, rnd=RNDN, i=%d\n", + (long) p, i); + printf ("n="); mpfr_dump (n); + printf ("d="); mpfr_dump (d); + printf ("expected q0="); mpfr_dump (q0); + printf ("got q="); mpfr_dump (q); + exit (1); + } inex = mpfr_mul (n, d, q0, MPFR_RNDN); MPFR_ASSERTN(inex == 0); @@ -1597,11 +1610,133 @@ } /* j */ } +static void +coverage (mpfr_prec_t pmax) +{ + mpfr_prec_t p; + + for (p = MPFR_PREC_MIN; p <= pmax; p++) + { + int inex; + mpfr_t q, u, v; + + mpfr_init2 (q, p); + mpfr_init2 (u, p); + mpfr_init2 (v, p); + + /* exercise case qx < emin */ + mpfr_set_ui_2exp (u, 1, mpfr_get_emin (), MPFR_RNDN); + mpfr_set_ui (v, 4, MPFR_RNDN); + + mpfr_clear_flags (); + /* u/v = 2^(emin-2), should be rounded to +0 for RNDN */ + inex = mpfr_div (q, u, v, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (q) && mpfr_signbit (q) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + mpfr_clear_flags (); + /* u/v = 2^(emin-2), should be rounded to 2^(emin-1) for RNDU */ + inex = mpfr_div (q, u, v, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (q, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + mpfr_clear_flags (); + /* u/v = 2^(emin-2), should be rounded to +0 for RNDZ */ + inex = mpfr_div (q, u, v, MPFR_RNDZ); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (q) && mpfr_signbit (q) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + if (p == 1) + goto end_of_loop; + + mpfr_set_ui_2exp (u, 1, mpfr_get_emin (), MPFR_RNDN); + mpfr_nextbelow (u); /* u = (1-2^(-p))*2^emin */ + mpfr_set_ui (v, 2, MPFR_RNDN); + + mpfr_clear_flags (); + /* u/v = (1-2^(-p))*2^(emin-1), will round to 2^(emin-1) for RNDN */ + inex = mpfr_div (q, u, v, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (q, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + mpfr_clear_flags (); + /* u/v should round to 2^(emin-1) for RNDU */ + inex = mpfr_div (q, u, v, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (q, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + mpfr_clear_flags (); + /* u/v should round to +0 for RNDZ */ + inex = mpfr_div (q, u, v, MPFR_RNDZ); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (q) && mpfr_signbit (q) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + end_of_loop: + mpfr_clear (q); + mpfr_clear (u); + mpfr_clear (v); + } +} + +/* coverage for case usize >= n + n in Mulders' algorithm */ +static void +coverage2 (void) +{ + mpfr_prec_t p; + mpfr_t q, u, v, t, w; + int inex, inex2; + + p = MPFR_DIV_THRESHOLD * GMP_NUMB_BITS; + mpfr_init2 (q, p); + mpfr_init2 (u, 2 * p + 3 * GMP_NUMB_BITS); + mpfr_init2 (v, p); + do mpfr_urandomb (u, RANDS); while (mpfr_zero_p (u)); + do mpfr_urandomb (v, RANDS); while (mpfr_zero_p (v)); + inex = mpfr_div (q, u, v, MPFR_RNDN); + mpfr_init2 (t, mpfr_get_prec (u)); + mpfr_init2 (w, mpfr_get_prec (u)); + inex2 = mpfr_mul (t, q, v, MPFR_RNDN); + MPFR_ASSERTN(inex2 == 0); + if (inex == 0) /* check q*v = u */ + MPFR_ASSERTN(mpfr_equal_p (u, t)); + else + { + if (inex > 0) + mpfr_nextbelow (q); + else + mpfr_nextabove (q); + inex2 = mpfr_mul (w, q, v, MPFR_RNDN); + MPFR_ASSERTN(inex2 == 0); + inex2 = mpfr_sub (t, t, u, MPFR_RNDN); + MPFR_ASSERTN(inex2 == 0); + inex2 = mpfr_sub (w, w, u, MPFR_RNDN); + MPFR_ASSERTN(inex2 == 0); + MPFR_ASSERTN(mpfr_cmpabs (t, w) <= 0); + if (mpfr_cmpabs (t, w) == 0) /* even rule: significand of q should now + be odd */ + MPFR_ASSERTN(mpfr_min_prec (q) == mpfr_get_prec (q)); + } + + mpfr_clear (q); + mpfr_clear (u); + mpfr_clear (v); + mpfr_clear (t); + mpfr_clear (w); +} + int main (int argc, char *argv[]) { tests_start_mpfr (); + coverage (1024); + coverage2 (); bug20180126 (); bug20171218 (); testall_rndf (9); diff -Nru mpfr4-4.0.1/tests/tdiv_d.c mpfr4-4.0.2/tests/tdiv_d.c --- mpfr4-4.0.1/tests/tdiv_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tdiv_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_div_d -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tdiv_ui.c mpfr4-4.0.2/tests/tdiv_ui.c --- mpfr4-4.0.1/tests/tdiv_ui.c 2018-02-02 13:17:33.000000000 +0000 +++ mpfr4-4.0.2/tests/tdiv_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_div_ui. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include @@ -313,6 +313,7 @@ /* This test expects that a limb fits in an unsigned long. One failing case from function bug20180126() in tdiv.c, for GMP_NUMB_BITS == 64. */ +#if ULONG_MAX > 4294967295 if (GMP_NUMB_BITS == 64 && MPFR_LIMB_MAX <= ULONG_MAX) { mpfr_init2 (x, 133); @@ -345,6 +346,7 @@ mpfr_clear (y); mpfr_clear (z); } +#endif } /* check corner cases where the round bit is located in the upper bit of r */ @@ -366,7 +368,9 @@ mpfr_init2 (t, 2 * GMP_NUMB_BITS); for (i = 0; i < n; i++) { - u = randlimb (); + do + u = randlimb (); + while (u == 0); do v = randlimb (); while (v <= MPFR_LIMB_HIGHBIT); diff -Nru mpfr4-4.0.1/tests/td_sub.c mpfr4-4.0.2/tests/td_sub.c --- mpfr4-4.0.1/tests/td_sub.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/td_sub.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_d_sub -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/teint.c mpfr4-4.0.2/tests/teint.c --- mpfr4-4.0.1/tests/teint.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/teint.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_eint. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/teq.c mpfr4-4.0.2/tests/teq.c --- mpfr4-4.0.1/tests/teq.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/teq.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_eq. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/terandom.c mpfr4-4.0.2/tests/terandom.c --- mpfr4-4.0.1/tests/terandom.c 2018-02-02 12:32:02.000000000 +0000 +++ mpfr4-4.0.2/tests/terandom.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_erandom -Copyright 2011-2018 Free Software Foundation, Inc. +Copyright 2011-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/terandom_chisq.c mpfr4-4.0.2/tests/terandom_chisq.c --- mpfr4-4.0.1/tests/terandom_chisq.c 2018-02-02 12:32:02.000000000 +0000 +++ mpfr4-4.0.2/tests/terandom_chisq.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Chi-squared test for mpfr_erandom -Copyright 2011-2018 Free Software Foundation, Inc. +Copyright 2011-2019 Free Software Foundation, Inc. Contributed by Charles Karney , SRI International. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -167,7 +167,7 @@ } /* Return a sequential number for a positive low-precision x. x is altered by - * this fuction. low precision means prec = 2, 3, or 4. High values of + * this function. low precision means prec = 2, 3, or 4. High values of * precision will result in integer overflow. */ static long sequential (mpfr_t x) diff -Nru mpfr4-4.0.1/tests/terf.c mpfr4-4.0.2/tests/terf.c --- mpfr4-4.0.1/tests/terf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/terf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_erf and mpfr_erfc. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,11 +17,9 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include - #include "mpfr-test.h" #define TEST_FUNCTION mpfr_erf @@ -638,6 +636,20 @@ mpfr_set_emax (emax); } +/* Similar to a bug reported by Naoki Shibata: + https://sympa.inria.fr/sympa/arc/mpfr/2018-07/msg00028.html +*/ +static void +bug20180723 (void) +{ + mpfr_t x; + + mpfr_init2 (x, 256); + mpfr_set_ui (x, 28, MPFR_RNDN); + mpfr_erfc (x, x, MPFR_RNDN); + mpfr_clear (x); +} + int main (int argc, char *argv[]) { @@ -648,9 +660,10 @@ large_arg (); test_erfc (); reduced_expo_range (); + bug20180723 (); - test_generic_erf (MPFR_PREC_MIN, 100, 15); - test_generic_erfc (MPFR_PREC_MIN, 100, 15); + test_generic_erf (MPFR_PREC_MIN, 300, 150); + test_generic_erfc (MPFR_PREC_MIN, 300, 150); data_check ("data/erf", mpfr_erf, "mpfr_erf"); data_check ("data/erfc", mpfr_erfc, "mpfr_erfc"); diff -Nru mpfr4-4.0.1/tests/tests.c mpfr4-4.0.2/tests/tests.c --- mpfr4-4.0.1/tests/tests.c 2018-02-02 10:57:17.000000000 +0000 +++ mpfr4-4.0.2/tests/tests.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Miscellaneous support for test programs. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H @@ -226,7 +226,7 @@ " generated by libtool 2.4.6 may be incorrect: the build directory\n" " may not appear first in the run path; set $LD_LIBRARY_PATH to\n" " /path/to/builddir/src/.libs for the tests as a workaround.\n" - " * Then look at http://www.mpfr.org/mpfr-current/ for any update.\n" + " * Then look at https://www.mpfr.org/mpfr-current/ for any update.\n" " * Try again on a completely clean source (some errors might come\n" " from a previous build or previous source changes).\n" " * If the error still occurs, you can try to change the value of\n" diff -Nru mpfr4-4.0.1/tests/texceptions.c mpfr4-4.0.2/tests/texceptions.c --- mpfr4-4.0.1/tests/texceptions.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/texceptions.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for features related to exceptions. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/texp10.c mpfr4-4.0.2/tests/texp10.c --- mpfr4-4.0.1/tests/texp10.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/texp10.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_exp10. -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/texp2.c mpfr4-4.0.2/tests/texp2.c --- mpfr4-4.0.1/tests/texp2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/texp2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_exp2. -Copyright 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/texp.c mpfr4-4.0.2/tests/texp.c --- mpfr4-4.0.1/tests/texp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/texp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_exp. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/texpm1.c mpfr4-4.0.2/tests/texpm1.c --- mpfr4-4.0.1/tests/texpm1.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/texpm1.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_expm1. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tfactorial.c mpfr4-4.0.2/tests/tfactorial.c --- mpfr4-4.0.1/tests/tfactorial.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tfactorial.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_factorial. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tfits.c mpfr4-4.0.2/tests/tfits.c --- mpfr4-4.0.1/tests/tfits.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tfits.c 2019-01-07 13:53:20.000000000 +0000 @@ -2,7 +2,7 @@ mpfr_fits_sint_p, mpfr_fits_slong_p, mpfr_fits_sshort_p, mpfr_fits_uint_p, mpfr_fits_ulong_p, mpfr_fits_ushort_p -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -19,9 +19,10 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* Needed due to the inclusion of mpfr-intmax.h */ #ifdef HAVE_CONFIG_H # include "config.h" #endif diff -Nru mpfr4-4.0.1/tests/tfma.c mpfr4-4.0.2/tests/tfma.c --- mpfr4-4.0.1/tests/tfma.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tfma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_fma. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -196,6 +196,238 @@ } static void +test_overflow3 (void) +{ + mpfr_t x, y, z, r; + int inex; + mpfr_prec_t p = 8; + mpfr_flags_t ex_flags = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT, flags; + int i, j, k; + unsigned int neg; + + mpfr_inits2 (p, x, y, z, (mpfr_ptr) 0); + for (i = 0; i < 2; i++) + { + mpfr_init2 (r, 2 * p + i); + mpfr_set_ui_2exp (x, 1, mpfr_get_emax () - 1, MPFR_RNDN); + mpfr_set_ui (y, 2, MPFR_RNDN); /* y = 2 */ + for (j = 1; j <= 2; j++) + for (k = 0; k <= 1; k++) + { + mpfr_set_si_2exp (z, -1, mpfr_get_emax () - mpfr_get_prec (r) - j, + MPFR_RNDN); + if (k) + mpfr_nextabove (z); + for (neg = 0; neg <= 3; neg++) + { + mpfr_clear_flags (); + /* (The following applies for neg = 0 or 2, all the signs + need to be reversed for neg = 1 or 3.) + We have x*y = 2^emax and + z = - 2^(emax-2p-i-j) * (1-k*2^(-p)), thus + x*y+z = 2^emax - 2^(emax-2p-i-j) + k*2^(emax-3p-i-j) + should overflow. Indeed it is >= the midpoint of + 2^emax - 2^(emax-2p-i) and 2^emax, the midpoint + being obtained for j = 1 and k = 0. */ + inex = mpfr_fma (r, x, y, z, MPFR_RNDN); + flags = __gmpfr_flags; + if (! mpfr_inf_p (r) || flags != ex_flags || + ((neg & 1) == 0 ? + (inex <= 0 || MPFR_IS_NEG (r)) : + (inex >= 0 || MPFR_IS_POS (r)))) + { + printf ("Error in test_overflow3 for " + "i=%d j=%d k=%d neg=%u\n", i, j, k, neg); + printf ("Expected %c@Inf@\n with inex %c 0 and flags:", + (neg & 1) == 0 ? '+' : '-', + (neg & 1) == 0 ? '>' : '<'); + flags_out (ex_flags); + printf ("Got "); + mpfr_dump (r); + printf (" with inex = %d and flags:", inex); + flags_out (flags); + exit (1); + } + if (neg == 0 || neg == 2) + mpfr_neg (x, x, MPFR_RNDN); + if (neg == 1 || neg == 3) + mpfr_neg (y, y, MPFR_RNDN); + mpfr_neg (z, z, MPFR_RNDN); + } /* neg */ + } /* k */ + mpfr_clear (r); + } /* i */ + mpfr_clears (x, y, z, (mpfr_ptr) 0); +} + +static void +test_overflow4 (void) +{ + mpfr_t x, y, z, r1, r2; + mpfr_exp_t emax, e; + mpfr_prec_t px; + mpfr_flags_t flags1, flags2; + int inex1, inex2; + int ei, i, j; + int below; + unsigned int neg; + + emax = mpfr_get_emax (); + + mpfr_init2 (y, MPFR_PREC_MIN); + mpfr_set_ui (y, 2, MPFR_RNDN); /* y = 2 */ + + mpfr_init2 (z, 8); + + for (px = 17; px < 256; px *= 2) + { + mpfr_init2 (x, px); + mpfr_inits2 (px - 8, r1, r2, (mpfr_ptr) 0); + for (ei = 0; ei <= 1; ei++) + { + e = ei ? emax : 0; + mpfr_set_ui_2exp (x, 1, e - 1, MPFR_RNDN); + mpfr_nextabove (x); /* x = 2^(e - 1) + 2^(e - px) */ + /* x*y = 2^e + 2^(e - px + 1), which internally overflows + when e = emax. */ + for (i = -4; i <= 4; i++) + for (j = 2; j <= 3; j++) + { + mpfr_set_si_2exp (z, -j, e - px + i, MPFR_RNDN); + /* If |z| <= 2^(e - px + 1), then x*y + z >= 2^e and + RZ(x*y + z) = 2^e with an unbounded exponent range. + If |z| > 2^(e - px + 1), then RZ(x*y + z) is the + predecessor of 2^e (since |z| < ulp(r)/2); this + occurs when i > 0 and when i = 0 and j > 2 */ + mpfr_set_ui_2exp (r1, 1, e - 1, MPFR_RNDN); + below = i > 0 || (i == 0 && j > 2); + if (below) + mpfr_nextbelow (r1); + mpfr_clear_flags (); + inex1 = mpfr_mul_2ui (r1, r1, 1, MPFR_RNDZ); + if (below || e < emax) + { + inex1 = i == 0 && j == 2 ? 0 : -1; + flags1 = inex1 ? MPFR_FLAGS_INEXACT : 0; + } + else + { + MPFR_ASSERTN (inex1 < 0); + flags1 = MPFR_FLAGS_INEXACT | MPFR_FLAGS_OVERFLOW; + MPFR_ASSERTN (flags1 == __gmpfr_flags); + } + for (neg = 0; neg <= 3; neg++) + { + mpfr_clear_flags (); + inex2 = mpfr_fma (r2, x, y, z, MPFR_RNDZ); + flags2 = __gmpfr_flags; + if (! (mpfr_equal_p (r1, r2) && + SAME_SIGN (inex1, inex2) && + flags1 == flags2)) + { + printf ("Error in test_overflow4 for " + "px=%d ei=%d i=%d j=%d neg=%u\n", + (int) px, ei, i, j, neg); + printf ("Expected "); + mpfr_dump (r1); + printf ("with inex = %d and flags:", inex1); + flags_out (flags1); + printf ("Got "); + mpfr_dump (r2); + printf ("with inex = %d and flags:", inex2); + flags_out (flags2); + exit (1); + } + if (neg == 0 || neg == 2) + mpfr_neg (x, x, MPFR_RNDN); + if (neg == 1 || neg == 3) + mpfr_neg (y, y, MPFR_RNDN); + mpfr_neg (z, z, MPFR_RNDN); + mpfr_neg (r1, r1, MPFR_RNDN); + inex1 = - inex1; + } + } + } + mpfr_clears (x, r1, r2, (mpfr_ptr) 0); + } + + mpfr_clears (y, z, (mpfr_ptr) 0); +} + +static void +test_overflow5 (void) +{ + mpfr_t x, y, z, r1, r2; + mpfr_exp_t emax; + int inex1, inex2; + int i, rnd; + unsigned int neg, negr; + + emax = mpfr_get_emax (); + + mpfr_init2 (x, 123); + mpfr_init2 (y, 45); + mpfr_init2 (z, 67); + mpfr_inits2 (89, r1, r2, (mpfr_ptr) 0); + + mpfr_set_ui_2exp (x, 1, emax - 1, MPFR_RNDN); + + for (i = 3; i <= 17; i++) + { + mpfr_set_ui (y, i, MPFR_RNDN); + mpfr_set_ui_2exp (z, 1, emax - 1, MPFR_RNDN); + for (neg = 0; neg < 8; neg++) + { + mpfr_setsign (x, x, neg & 1, MPFR_RNDN); + mpfr_setsign (y, y, neg & 2, MPFR_RNDN); + mpfr_setsign (z, z, neg & 4, MPFR_RNDN); + + /* |x*y + z| = (i +/- 1) * 2^(emax - 1) >= 2^emax (overflow) + and x*y + z has the same sign as x*y. */ + negr = (neg ^ (neg >> 1)) & 1; + + RND_LOOP (rnd) + { + mpfr_set_inf (r1, 1); + if (MPFR_IS_LIKE_RNDZ ((mpfr_rnd_t) rnd, negr)) + { + mpfr_nextbelow (r1); + inex1 = -1; + } + else + inex1 = 1; + + if (negr) + { + mpfr_neg (r1, r1, MPFR_RNDN); + inex1 = - inex1; + } + + mpfr_clear_flags (); + inex2 = mpfr_fma (r2, x, y, z, (mpfr_rnd_t) rnd); + MPFR_ASSERTN (__gmpfr_flags == + (MPFR_FLAGS_INEXACT | MPFR_FLAGS_OVERFLOW)); + + if (! (mpfr_equal_p (r1, r2) && SAME_SIGN (inex1, inex2))) + { + printf ("Error in test_overflow5 for i=%d neg=%u %s\n", + i, neg, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); + printf ("Expected "); + mpfr_dump (r1); + printf ("with inex = %d\n", inex1); + printf ("Got "); + mpfr_dump (r2); + printf ("with inex = %d\n", inex2); + exit (1); + } + } /* rnd */ + } /* neg */ + } /* i */ + + mpfr_clears (x, y, z, r1, r2, (mpfr_ptr) 0); +} + +static void test_underflow1 (void) { mpfr_t x, y, z, r; @@ -281,59 +513,128 @@ static void test_underflow2 (void) { - mpfr_t x, y, z, r; - int b, i, inex, same, err = 0; + mpfr_t x, y, z, r1, r2; + int e, b, i, prec = 32, pz, inex; + unsigned int neg; - mpfr_inits2 (32, x, y, z, r, (mpfr_ptr) 0); + mpfr_init2 (x, MPFR_PREC_MIN); + mpfr_inits2 (prec, y, z, r1, r2, (mpfr_ptr) 0); - mpfr_set_si_2exp (z, 1, mpfr_get_emin (), MPFR_RNDN); /* z = 2^emin */ - mpfr_set_si_2exp (x, 1, mpfr_get_emin (), MPFR_RNDN); /* x = 2^emin */ + mpfr_set_si_2exp (x, 1, mpfr_get_emin () - 1, MPFR_RNDN); + /* x = 2^(emin-1) */ - for (b = 0; b <= 1; b++) + for (e = -1; e <= prec + 2; e++) { - for (i = 15; i <= 17; i++) + mpfr_set (z, x, MPFR_RNDN); + /* z = x = 2^(emin+e) */ + for (b = 0; b <= 1; b++) { - mpfr_set_si_2exp (y, i, -4 - MPFR_PREC (z), MPFR_RNDN); - /* z = 1.000...00b - * xy = 01111 - * or 10000 - * or 10001 - */ - mpfr_clear_flags (); - inex = mpfr_fma (r, x, y, z, MPFR_RNDN); -#define STRTU2 "Error in test_underflow2 (b = %d, i = %d)\n " - if (__gmpfr_flags != MPFR_FLAGS_INEXACT) + for (pz = prec - 4 * (b == 0); pz <= prec + 4; pz++) { - printf (STRTU2 "flags = %u instead of %u\n", b, i, - (unsigned int) __gmpfr_flags, - (unsigned int) MPFR_FLAGS_INEXACT); - err = 1; - } - same = i == 15 || (i == 16 && b == 0); - if (same ? (inex >= 0) : (inex <= 0)) - { - printf (STRTU2 "incorrect ternary value (%d instead of %c 0)\n", - b, i, inex, same ? '<' : '>'); - err = 1; - } - mpfr_set (y, z, MPFR_RNDN); - if (!same) - mpfr_nextabove (y); - if (! mpfr_equal_p (r, y)) - { - printf (STRTU2 "expected ", b, i); - mpfr_dump (y); - printf (" got "); - mpfr_dump (r); - err = 1; - } - } - mpfr_nextabove (z); - } + inex = mpfr_prec_round (z, pz, MPFR_RNDZ); + MPFR_ASSERTN (inex == 0); + for (i = 15; i <= 17; i++) + { + mpfr_flags_t flags1, flags2; + int inex1, inex2; - if (err) - exit (1); - mpfr_clears (x, y, z, r, (mpfr_ptr) 0); + mpfr_set_si_2exp (y, i, -4 - prec, MPFR_RNDN); + + /* <--- r ---> + * z = 1.000...00b with b = 0 or 1 + * xy = 01111 (i = 15) + * or 10000 (i = 16) + * or 10001 (i = 17) + * + * x, y, and z will be modified to test the different sign + * combinations. In the case b = 0 (i.e. |z| is a power of + * 2) and x*y has a different sign from z, then y will be + * divided by 2, so that i = 16 corresponds to a midpoint. + */ + + for (neg = 0; neg < 8; neg++) + { + int xyneg, prev_binade; + + mpfr_setsign (x, x, neg & 1, MPFR_RNDN); + mpfr_setsign (y, y, neg & 2, MPFR_RNDN); + mpfr_setsign (z, z, neg & 4, MPFR_RNDN); + + xyneg = (neg ^ (neg >> 1)) & 1; /* true iff x*y < 0 */ + + /* If a change of binade occurs by adding x*y to z + exactly, then take into account the fact that the + midpoint has a different exponent. */ + prev_binade = b == 0 && (xyneg ^ MPFR_IS_NEG (z)); + if (prev_binade) + mpfr_div_2ui (y, y, 1, MPFR_RNDN); + + mpfr_set (r1, z, MPFR_RNDN); + flags1 = MPFR_FLAGS_INEXACT; + + if (e == -1 && i == 17 && b == 0 && + (xyneg ^ (neg >> 2)) != 0) + { + /* Special underflow case. */ + flags1 |= MPFR_FLAGS_UNDERFLOW; + inex1 = xyneg ? 1 : -1; + } + else if (i == 15 || (i == 16 && b == 0)) + { + /* round toward z */ + inex1 = xyneg ? 1 : -1; + } + else if (xyneg) + { + /* round away from z, with x*y < 0 */ + mpfr_nextbelow (r1); + inex1 = -1; + } + else + { + /* round away from z, with x*y > 0 */ + mpfr_nextabove (r1); + inex1 = 1; + } + + mpfr_clear_flags (); + inex2 = mpfr_fma (r2, x, y, z, MPFR_RNDN); + flags2 = __gmpfr_flags; + + if (! (mpfr_equal_p (r1, r2) && + SAME_SIGN (inex1, inex2) && + flags1 == flags2)) + { + printf ("Error in test_underflow2 for " + "e=%d b=%d pz=%d i=%d neg=%u\n", + e, b, pz, i, neg); + printf ("Expected "); + mpfr_dump (r1); + printf ("with inex = %d and flags:", inex1); + flags_out (flags1); + printf ("Got "); + mpfr_dump (r2); + printf ("with inex = %d and flags:", inex2); + flags_out (flags2); + exit (1); + } + + /* Restore y. */ + if (prev_binade) + mpfr_mul_2ui (y, y, 1, MPFR_RNDN); + } /* neg */ + } /* i */ + } /* pz */ + + inex = mpfr_prec_round (z, prec, MPFR_RNDZ); + MPFR_ASSERTN (inex == 0); + MPFR_SET_POS (z); + mpfr_nextabove (z); + } /* b */ + mpfr_mul_2ui (x, x, 1, MPFR_RNDN); + } /* e */ + + mpfr_clears (x, y, z, r1, r2, (mpfr_ptr) 0); } static void @@ -397,6 +698,185 @@ mpfr_clears (x, y, z, t1, t2, (mpfr_ptr) 0); } +/* Test s = x*y + z with PREC(z) > PREC(s) + 1, x*y underflows, where + z + x*y and z + sign(x*y) * 2^(emin-1) do not give the same result. + x = 2^emin + y = 2^(-8) + z = 2^emin * (2^PREC(s) + k - 2^(-1)) + with k = 3 for MPFR_RNDN and k = 2 for the directed rounding modes. + Also test the opposite versions with neg != 0. +*/ +static void +test_underflow4 (void) +{ + mpfr_t x, y, z, s1, s2; + mpfr_prec_t ps = 32; + int inex, rnd; + + mpfr_inits2 (MPFR_PREC_MIN, x, y, (mpfr_ptr) 0); + mpfr_inits2 (ps, s1, s2, (mpfr_ptr) 0); + mpfr_init2 (z, ps + 2); + + inex = mpfr_set_si_2exp (x, 1, mpfr_get_emin (), MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + inex = mpfr_set_si_2exp (y, 1, -8, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + + RND_LOOP_NO_RNDF (rnd) + { + mpfr_flags_t flags1, flags2; + int inex1, inex2; + unsigned int neg; + + inex = mpfr_set_si_2exp (z, 1 << 1, ps, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + inex = mpfr_sub_ui (z, z, 1, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + inex = mpfr_div_2ui (z, z, 1, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + inex = mpfr_add_ui (z, z, rnd == MPFR_RNDN ? 3 : 2, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + inex = mpfr_mul (z, z, x, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + + for (neg = 0; neg <= 3; neg++) + { + inex1 = mpfr_set (s1, z, (mpfr_rnd_t) rnd); + flags1 = MPFR_FLAGS_INEXACT; + + mpfr_clear_flags (); + inex2 = mpfr_fma (s2, x, y, z, (mpfr_rnd_t) rnd); + flags2 = __gmpfr_flags; + + if (! (mpfr_equal_p (s1, s2) && + SAME_SIGN (inex1, inex2) && + flags1 == flags2)) + { + printf ("Error in test_underflow4 for neg=%u %s\n", + neg, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); + printf ("Expected "); + mpfr_dump (s1); + printf (" with inex ~ %d, flags =", inex1); + flags_out (flags1); + printf ("Got "); + mpfr_dump (s2); + printf (" with inex ~ %d, flags =", inex2); + flags_out (flags2); + exit (1); + } + + if (neg == 0 || neg == 2) + mpfr_neg (x, x, MPFR_RNDN); + if (neg == 1 || neg == 3) + mpfr_neg (y, y, MPFR_RNDN); + mpfr_neg (z, z, MPFR_RNDN); + } + } + + mpfr_clears (x, y, z, s1, s2, (mpfr_ptr) 0); +} + +/* Test s = x*y + z on: + x = +/- 2^emin + y = +/- 2^(-3) + z = +/- 2^(emin + PREC(s)) and MPFR numbers close to this value. + with PREC(z) from PREC(s) - 2 to PREC(s) + 8. +*/ +static void +test_underflow5 (void) +{ + mpfr_t w, x, y, z, s1, s2, t; + mpfr_exp_t emin; + mpfr_prec_t ps = 32; + int inex, i, j, rnd; + unsigned int neg; + + mpfr_inits2 (MPFR_PREC_MIN, w, x, y, (mpfr_ptr) 0); + mpfr_inits2 (ps, s1, s2, (mpfr_ptr) 0); + mpfr_init2 (t, ps + 9); + + emin = mpfr_get_emin (); + + inex = mpfr_set_si_2exp (w, 1, emin, MPFR_RNDN); /* w = 2^emin */ + MPFR_ASSERTN (inex == 0); + inex = mpfr_set_si (x, 1, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + inex = mpfr_set_si_2exp (y, 1, -3, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + + for (i = -2; i <= 8; i++) + { + mpfr_init2 (z, ps + i); + inex = mpfr_set_si_2exp (z, 1, ps, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + + for (j = 1; j <= 32; j++) + mpfr_nextbelow (z); + + for (j = -32; j <= 32; j++) + { + for (neg = 0; neg < 8; neg++) + { + mpfr_setsign (x, x, neg & 1, MPFR_RNDN); + mpfr_setsign (y, y, neg & 2, MPFR_RNDN); + mpfr_setsign (z, z, neg & 4, MPFR_RNDN); + + inex = mpfr_fma (t, x, y, z, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + + inex = mpfr_mul (x, x, w, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + inex = mpfr_mul (z, z, w, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + + RND_LOOP_NO_RNDF (rnd) + { + mpfr_flags_t flags1, flags2; + int inex1, inex2; + + mpfr_clear_flags (); + inex1 = mpfr_mul (s1, w, t, (mpfr_rnd_t) rnd); + flags1 = __gmpfr_flags; + + mpfr_clear_flags (); + inex2 = mpfr_fma (s2, x, y, z, (mpfr_rnd_t) rnd); + flags2 = __gmpfr_flags; + + if (! (mpfr_equal_p (s1, s2) && + SAME_SIGN (inex1, inex2) && + flags1 == flags2)) + { + printf ("Error in test_underflow5 on " + "i=%d j=%d neg=%u %s\n", i, j, neg, + mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); + printf ("Expected "); + mpfr_dump (s1); + printf (" with inex ~ %d, flags =", inex1); + flags_out (flags1); + printf ("Got "); + mpfr_dump (s2); + printf (" with inex ~ %d, flags =", inex2); + flags_out (flags2); + exit (1); + } + } /* rnd */ + + inex = mpfr_div (x, x, w, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + inex = mpfr_div (z, z, w, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + } /* neg */ + + MPFR_SET_POS (z); /* restore the value before the loop on neg */ + mpfr_nextabove (z); + } /* j */ + + mpfr_clear (z); + } /* i */ + + mpfr_clears (w, x, y, s1, s2, t, (mpfr_ptr) 0); +} + static void bug20101018 (void) { @@ -528,14 +1008,62 @@ mpfr_clear (u); } +/* coverage test for mpfr_set_1_2, case prec < GMP_NUMB_BITS, + inex > 0, rb <> 0, sb = 0 */ +static void +coverage (void) +{ + mpfr_t x, y, z, s; + int inex; + mpfr_exp_t emax; + + mpfr_inits2 (GMP_NUMB_BITS - 1, x, y, z, s, (mpfr_ptr) 0); + + /* set x to 2^(GMP_NUMB_BITS/2) + 1, y to 2^(GMP_NUMB_BITS/2) - 1 */ + MPFR_ASSERTN((GMP_NUMB_BITS % 2) == 0); + mpfr_set_ui_2exp (x, 1, GMP_NUMB_BITS / 2, MPFR_RNDN); + mpfr_sub_ui (y, x, 1, MPFR_RNDN); + mpfr_add_ui (x, x, 1, MPFR_RNDN); + /* we have x*y = 2^GMP_NUMB_BITS - 1, thus has exponent GMP_NUMB_BITS */ + /* set z to 2^(1-GMP_NUMB_BITS), with exponent 2-GMP_NUMB_BITS */ + mpfr_set_ui_2exp (z, 1, 1 - GMP_NUMB_BITS, MPFR_RNDN); + inex = mpfr_fms (s, x, y, z, MPFR_RNDN); + /* s should be 2^GMP_NUMB_BITS-2 */ + MPFR_ASSERTN(inex < 0); + inex = mpfr_add_ui (s, s, 2, MPFR_RNDN); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (s, 1, GMP_NUMB_BITS) == 0); + + /* same example, but with overflow */ + emax = mpfr_get_emax (); + mpfr_set_emax (GMP_NUMB_BITS + 1); + mpfr_set_ui_2exp (z, 1, mpfr_get_emax () - 1, MPFR_RNDZ); + mpfr_clear_flags (); + inex = mpfr_fma (s, x, y, z, MPFR_RNDN); + /* x*y = 2^GMP_NUMB_BITS - 1, z = 2^GMP_NUMB_BITS, thus + x*y+z = 2^(GMP_NUMB_BITS+1) - 1 should round to 2^(GMP_NUMB_BITS+1), + thus give an overflow */ + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (s) && mpfr_sgn (s) > 0); + MPFR_ASSERTN(mpfr_overflow_p ()); + mpfr_set_emax (emax); + + mpfr_clear (x); + mpfr_clear (y); + mpfr_clear (z); + mpfr_clear (s); +} + int main (int argc, char *argv[]) { mpfr_t x, y, z, s; mpfr_exp_t emin, emax; + int i; tests_start_mpfr (); + coverage (); + emin = mpfr_get_emin (); emax = mpfr_get_emax (); @@ -823,21 +1351,39 @@ test_exact (); - test_overflow1 (); - test_overflow2 (); - test_underflow1 (); - test_underflow2 (); - test_underflow3 (1); - - set_emin (MPFR_EMIN_MIN); - set_emax (MPFR_EMAX_MAX); - test_overflow1 (); - test_overflow2 (); - test_underflow1 (); - test_underflow2 (); - test_underflow3 (2); - set_emin (emin); - set_emax (emax); + for (i = 0; i <= 2; i++) + { + if (i == 0) + { + /* corresponds to the generic code + mpfr_check_range */ + set_emin (-1024); + set_emax (1024); + } + else if (i == 1) + { + set_emin (MPFR_EMIN_MIN); + set_emax (MPFR_EMAX_MAX); + } + else + { + MPFR_ASSERTN (i == 2); + if (emin == MPFR_EMIN_MIN && emax == MPFR_EMAX_MAX) + break; + set_emin (emin); + set_emax (emax); + } + + test_overflow1 (); + test_overflow2 (); + test_overflow3 (); + test_overflow4 (); + test_overflow5 (); + test_underflow1 (); + test_underflow2 (); + test_underflow3 (i); + test_underflow4 (); + test_underflow5 (); + } tests_end_mpfr (); return 0; diff -Nru mpfr4-4.0.1/tests/tfmma.c mpfr4-4.0.2/tests/tfmma.c --- mpfr4-4.0.1/tests/tfmma.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tfmma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_fmma and mpfr_fmms. -Copyright 2016-2018 Free Software Foundation, Inc. +Copyright 2016-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -443,6 +443,15 @@ mpfr_set_prec (x, 564); mpfr_set_prec (y, 564); mpfr_set_prec (z, 2256); + mpfr_set_str_binary (x, "1e-536870913"); + mpfr_set_str_binary (y, "-1e-536870913"); + mpfr_fmma (z, x, y, x, y, MPFR_RNDN); + /* we should get -0 as result */ + MPFR_ASSERTN(mpfr_zero_p (z) && mpfr_signbit (z)); + + mpfr_set_prec (x, 564); + mpfr_set_prec (y, 564); + mpfr_set_prec (z, 2256); mpfr_set_str_binary (x, "1.10010000111100110011001101111111101000111001011000110100110010000101000100010001000000111100010000101001011011111001111000110101111100101111001100001100011101100100011110000000011000010110111100111000100101010001011111010111011001110010001011101111001011001110110000010000011100010001010001011100100110111110101001001111001011101111110011101110101010110100010010111011111100010101111100011110111001011111101110101101101110100101111010000101011110100000000110111101000001100001000100010110100111010011011010110011100111010000101110010101111001011100110101100001100e-737194993"); mpfr_set_str_binary (y, "-1.00101000100001001101011110100010110011101010011011010111100110101011111100000100101000111010111101100100110010001110011011100100110110000001011001000111101111101111110101100110111000000011000001101001010100010010001110001000011010000100111001001100101111111100010101110101001101101101111010100011011110001000010000010100011000011000010110101100000111111110111001100100100001101011111011100101110111000100101010110100010011101010110010100110100111000000100111101101101000000011110000100110100100011000010011110010001010000110100011111101101101110001110001101101010e-737194903"); mpfr_fmma (z, x, y, x, y, MPFR_RNDN); @@ -465,10 +474,75 @@ /* imaginary part is a*d+b*c = x*x+y*y */ mpfr_fmma (z, x, x, y, y, MPFR_RNDN); MPFR_ASSERTN(mpfr_cmp_ui (z, 1) == 0); + mpfr_fmma (z, y, y, x, x, MPFR_RNDN); + MPFR_ASSERTN(mpfr_cmp_ui (z, 1) == 0); mpfr_clears (x, y, z, (mpfr_ptr) 0); } +/* Test double-rounding cases in mpfr_set_1_2, which is called when + all the precisions are the same. With set.c before r13347, this + triggers errors for neg=0. */ +static void +double_rounding (void) +{ + int p; + + for (p = 4; p < 4 * GMP_NUMB_BITS; p++) + { + mpfr_t a, b, c, d, z1, z2; + int neg; + + mpfr_inits2 (p, a, b, c, d, z1, z2, (mpfr_ptr) 0); + /* Choose a, b, c, d such that a*b = 2^p and c*d = 1 + epsilon */ + mpfr_set_ui (a, 2, MPFR_RNDN); + mpfr_set_ui_2exp (b, 1, p - 1, MPFR_RNDN); + mpfr_set_ui (c, 1, MPFR_RNDN); + mpfr_nextabove (c); + /* c = 1 + ulp(1) = 1 + 2 * ulp(1/2) */ + + for (neg = 0; neg <= 1; neg++) + { + int inex1, inex2; + + /* Set d = 1 - (1 + neg) * ulp(1/2), thus + * c*d = 1 + (1 - neg) * ulp(1/2) - 2 * (1 + neg) * ulp(1/2)^2, + * so that a*b + c*d rounds to 2^p + 1 and epsilon has the + * same sign as (-1)^neg. + */ + mpfr_set_ui (d, 1, MPFR_RNDN); + mpfr_nextbelow (d); + mpfr_set_ui_2exp (z1, 1, p, MPFR_RNDN); + if (neg) + { + mpfr_nextbelow (d); + inex1 = -1; + } + else + { + mpfr_nextabove (z1); + inex1 = 1; + } + + inex2 = mpfr_fmma (z2, a, b, c, d, MPFR_RNDN); + if (!(mpfr_equal_p (z1, z2) && SAME_SIGN (inex1, inex2))) + { + printf ("Error in double_rounding for precision %d, neg=%d\n", + p, neg); + printf ("Expected "); + mpfr_dump (z1); + printf ("with inex = %d\n", inex1); + printf ("Got "); + mpfr_dump (z2); + printf ("with inex = %d\n", inex2); + exit (1); + } + } + + mpfr_clears (a, b, c, d, z1, z2, (mpfr_ptr) 0); + } +} + int main (int argc, char *argv[]) { @@ -480,6 +554,7 @@ overflow_tests (); half_plus_half (); bug20170405 (); + double_rounding (); tests_end_mpfr (); return 0; diff -Nru mpfr4-4.0.1/tests/tfmod.c mpfr4-4.0.2/tests/tfmod.c --- mpfr4-4.0.1/tests/tfmod.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tfmod.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tfmod -- test file for mpfr_fmod -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tfms.c mpfr4-4.0.2/tests/tfms.c --- mpfr4-4.0.1/tests/tfms.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tfms.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_fms. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tfpif.c mpfr4-4.0.2/tests/tfpif.c --- mpfr4-4.0.1/tests/tfpif.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tfpif.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_fpif. -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by Olivier Demengeon. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -193,6 +193,8 @@ remove (filenameCompressed); } +#define BAD 10 + static void check_bad (void) { @@ -200,9 +202,16 @@ int status; FILE *fh; mpfr_t x; - unsigned char badData[6][2] = - { { 7, 0 }, { 16, 0 }, { 23, 118 }, { 23, 95 }, { 23, 127 }, { 23, 47 } }; - int badDataSize[6] = { 1, 1, 2, 2, 2, 2 }; + unsigned char badData[BAD][10] = + { { 7 }, { 16 }, { 23, 118 }, { 23, 95 }, { 23, 127 }, { 23, 47 }, + { 7, 0, 0, 0, 0, 0, 0, 0, 128, 119 }, /* +0 in a huge precision */ + /* precision 8-7=1, exponent on 98-94=4 bytes */ + { 8, 98, 255, 255, 255, 127 }, + /* precision 8-7=1, exponent on 102-94=8 bytes */ + { 8, 102, 255, 255, 255, 255, 255, 255, 255, 127 }, + { 8, 94 } + }; + int badDataSize[BAD] = { 1, 1, 2, 2, 2, 2, 10, 6, 10, 2 }; int i; mpfr_init2 (x, 2); @@ -237,8 +246,19 @@ exit(1); } - for (i = 0; i < 6; i++) + for (i = 0; i < BAD; i++) { + mpfr_exp_t emax; + /* For i == 6, mpfr_prec_t needs at least a 65-bit precision + (64 value bits + 1 sign bit) to avoid a failure. */ + if (i == 6 && MPFR_PREC_BITS > 64) + break; + /* For i=9, we use a reduced exponent range */ + if (i == 9) + { + emax = mpfr_get_emax (); + mpfr_set_emax (46); + } rewind (fh); status = fwrite (&badData[i][0], badDataSize[i], 1, fh); if (status != 1) @@ -273,6 +293,14 @@ case 5: printf (" no limb data\n"); break; + case 6: + printf (" too large precision\n"); + break; + case 7: + case 8: + case 9: + printf (" too large exponent\n"); + break; default: printf ("Test fatal error, unknown case\n"); break; @@ -281,6 +309,8 @@ remove (filenameCompressed); exit(1); } + if (i == 9) + mpfr_set_emax (emax); } fclose (fh); diff -Nru mpfr4-4.0.1/tests/tfprintf.c mpfr4-4.0.2/tests/tfprintf.c --- mpfr4-4.0.1/tests/tfprintf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tfprintf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tfprintf.c -- test file for mpfr_fprintf and mpfr_vfprintf -Copyright 2008-2018 Free Software Foundation, Inc. +Copyright 2008-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,10 +17,10 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Include config.h before using ANY configure macros if needed. */ +/* Needed due to the tests on HAVE_STDARG and MPFR_USE_MINI_GMP */ #ifdef HAVE_CONFIG_H # include "config.h" #endif diff -Nru mpfr4-4.0.1/tests/tfrac.c mpfr4-4.0.2/tests/tfrac.c --- mpfr4-4.0.1/tests/tfrac.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tfrac.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_frac. -Copyright 2002-2018 Free Software Foundation, Inc. +Copyright 2002-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tfrexp.c mpfr4-4.0.2/tests/tfrexp.c --- mpfr4-4.0.1/tests/tfrexp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tfrexp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_frexp. -Copyright 2011-2018 Free Software Foundation, Inc. +Copyright 2011-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tgamma.c mpfr4-4.0.2/tests/tgamma.c --- mpfr4-4.0.1/tests/tgamma.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tgamma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for gamma function -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tgamma_inc.c mpfr4-4.0.2/tests/tgamma_inc.c --- mpfr4-4.0.1/tests/tgamma_inc.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tgamma_inc.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_gamma_inc -Copyright 2016-2018 Free Software Foundation, Inc. +Copyright 2016-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tgeneric.c mpfr4-4.0.2/tests/tgeneric.c --- mpfr4-4.0.1/tests/tgeneric.c 2018-01-10 16:38:44.000000000 +0000 +++ mpfr4-4.0.2/tests/tgeneric.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* Generic test file for functions with one or two arguments (the second being either mpfr_t or double or unsigned long). -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Define TWO_ARGS for two-argument functions like mpfr_pow. diff -Nru mpfr4-4.0.1/tests/tgeneric_ui.c mpfr4-4.0.2/tests/tgeneric_ui.c --- mpfr4-4.0.1/tests/tgeneric_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tgeneric_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Generic test file for functions with one mpfr_t argument and an integer. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* define INTEGER_TYPE to what we want */ diff -Nru mpfr4-4.0.1/tests/tget_d_2exp.c mpfr4-4.0.2/tests/tget_d_2exp.c --- mpfr4-4.0.1/tests/tget_d_2exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tget_d_2exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test mpfr_get_d_2exp. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tget_d.c mpfr4-4.0.2/tests/tget_d.c --- mpfr4-4.0.1/tests/tget_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tget_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_get_d -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tget_f.c mpfr4-4.0.2/tests/tget_f.c --- mpfr4-4.0.1/tests/tget_f.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tget_f.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_get_f. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_MPF_INTERNALS diff -Nru mpfr4-4.0.1/tests/tget_flt.c mpfr4-4.0.2/tests/tget_flt.c --- mpfr4-4.0.1/tests/tget_flt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tget_flt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_get_flt and mpfr_set_flt -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,13 +17,35 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* for FLT_MIN */ #include "mpfr-test.h" +/* return non-zero iff f == g, and if both are zero check the sign */ +static int +equal_flt (float f, float g) +{ + if (f != 0.0) + return f == g; + else if (g != 0) + return 0; + else /* f = g = 0: check they have the same sign */ + { + int sf, sg; + mpfr_t z; + mpfr_init2 (z, MPFR_PREC_MIN); + mpfr_set_flt (z, f, MPFR_RNDN); + sf = mpfr_signbit (z); + mpfr_set_flt (z, g, MPFR_RNDN); + sg = mpfr_signbit (z); + mpfr_clear (z); + return !sf == !sg; + } +} + int main (void) { @@ -187,160 +209,232 @@ } #ifdef HAVE_DENORMS_FLT - mpfr_set_si_2exp (x, 1, -150, MPFR_RNDN); - g = 0.0; - f = mpfr_get_flt (x, MPFR_RNDN); - if (f != g) + for (i = 0; i < 2; i++) { - printf ("Error for mpfr_get_flt(2^(-150),RNDN)\n"); - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); + mpfr_set_si_2exp (x, 1, -150, MPFR_RNDN); + g = 0.0; + if (i == 1) + { + mpfr_neg (x, x, MPFR_RNDN); + g = -g; + } + f = mpfr_get_flt (x, MPFR_RNDN); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-150),RNDN)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + f = mpfr_get_flt (x, MPFR_RNDZ); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-150),RNDZ)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + f = mpfr_get_flt (x, (i == 0) ? MPFR_RNDD : MPFR_RNDU); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-150),%s)\n", + (i == 0) ? "RNDD" : "RNDU"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + g = FLT_MIN * FLT_EPSILON; + if (i == 1) + g = -g; + f = mpfr_get_flt (x, (i == 0) ? MPFR_RNDU : MPFR_RNDD); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-150),%s)\n", + (i == 0) ? "RNDU" : "RNDD"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + f = mpfr_get_flt (x, MPFR_RNDA); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-150),RNDA)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + + mpfr_set_si_2exp (x, 1, -151, MPFR_RNDN); + g = 0.0; + if (i == 1) + { + mpfr_neg (x, x, MPFR_RNDN); + g = -g; + } + f = mpfr_get_flt (x, MPFR_RNDN); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-151),RNDN)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + f = mpfr_get_flt (x, MPFR_RNDZ); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-151),RNDZ)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + f = mpfr_get_flt (x, (i == 0) ? MPFR_RNDD : MPFR_RNDU); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-151),%s)\n", + (i == 0) ? "RNDD" : "RNDU"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + g = FLT_MIN * FLT_EPSILON; + if (i == 1) + g = -g; + f = mpfr_get_flt (x, (i == 0) ? MPFR_RNDU : MPFR_RNDD); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-151),%s)\n", + (i == 0) ? "RNDU" : "RNDD"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + f = mpfr_get_flt (x, MPFR_RNDA); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-151),RNDA)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + + mpfr_set_si_2exp (x, 1, -149, MPFR_RNDN); + g = FLT_MIN * FLT_EPSILON; + if (i == 1) + { + mpfr_neg (x, x, MPFR_RNDN); + g = -g; + } + f = mpfr_get_flt (x, MPFR_RNDN); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-149),RNDN)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + f = mpfr_get_flt (x, MPFR_RNDZ); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-149),RNDZ)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + f = mpfr_get_flt (x, MPFR_RNDD); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-149),RNDD)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + f = mpfr_get_flt (x, MPFR_RNDU); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-149),RNDU)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } + f = mpfr_get_flt (x, MPFR_RNDA); + if (!equal_flt (f, g)) + { + printf ("Error for mpfr_get_flt(2^(-149),RNDA)\n"); + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } } +#endif /* HAVE_DENORMS_FLT */ + + mpfr_set_si_2exp (x, 1, 128, MPFR_RNDN); + g = FLT_MAX; f = mpfr_get_flt (x, MPFR_RNDZ); if (f != g) { - printf ("Error for mpfr_get_flt(2^(-150),RNDZ)\n"); + printf ("Error for mpfr_get_flt(2^128,RNDZ)\n"); printf ("expected %.8e, got %.8e\n", g, f); exit (1); } f = mpfr_get_flt (x, MPFR_RNDD); if (f != g) { - printf ("Error for mpfr_get_flt(2^(-150),RNDD)\n"); - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } - g = FLT_MIN * FLT_EPSILON; - f = mpfr_get_flt (x, MPFR_RNDU); - if (f != g) - { - printf ("Error for mpfr_get_flt(2^(-150),RNDU)\n"); - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } - f = mpfr_get_flt (x, MPFR_RNDA); - if (f != g) - { - printf ("Error for mpfr_get_flt(2^(-150),RNDA)\n"); + printf ("Error for mpfr_get_flt(2^128,RNDD)\n"); printf ("expected %.8e, got %.8e\n", g, f); exit (1); } - mpfr_set_si_2exp (x, 1, -151, MPFR_RNDN); - g = 0.0; - f = mpfr_get_flt (x, MPFR_RNDN); - if (f != g) - { - printf ("Error for mpfr_get_flt(2^(-151),RNDN)\n"); - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } + /* same for negative x */ + mpfr_set_si_2exp (x, -1, 128, MPFR_RNDN); + g = -FLT_MAX; f = mpfr_get_flt (x, MPFR_RNDZ); if (f != g) { - printf ("Error for mpfr_get_flt(2^(-151),RNDZ)\n"); - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } - f = mpfr_get_flt (x, MPFR_RNDD); - if (f != g) - { - printf ("Error for mpfr_get_flt(2^(-151),RNDD)\n"); + printf ("Error for mpfr_get_flt(-2^128,RNDZ)\n"); printf ("expected %.8e, got %.8e\n", g, f); exit (1); } - g = FLT_MIN * FLT_EPSILON; f = mpfr_get_flt (x, MPFR_RNDU); if (f != g) { - printf ("Error for mpfr_get_flt(2^(-151),RNDU)\n"); - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } - f = mpfr_get_flt (x, MPFR_RNDA); - if (f != g) - { - printf ("Error for mpfr_get_flt(2^(-151),RNDA)\n"); + printf ("Error for mpfr_get_flt(-2^128,RNDD)\n"); printf ("expected %.8e, got %.8e\n", g, f); exit (1); } - mpfr_set_si_2exp (x, 1, -149, MPFR_RNDN); - g = FLT_MIN * FLT_EPSILON; - f = mpfr_get_flt (x, MPFR_RNDN); - if (f != g) - { - printf ("Error for mpfr_get_flt(2^(-149),RNDN)\n"); - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } - f = mpfr_get_flt (x, MPFR_RNDZ); - if (f != g) - { - printf ("Error for mpfr_get_flt(2^(-149),RNDZ)\n"); - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } - f = mpfr_get_flt (x, MPFR_RNDD); +#if !defined(MPFR_ERRDIVZERO) + mpfr_set_si_2exp (x, 1, 128, MPFR_RNDN); + f = mpfr_get_flt (x, MPFR_RNDN); /* 2^128 rounds to itself with extended + exponent range, we should get +Inf */ + g = infp; if (f != g) { - printf ("Error for mpfr_get_flt(2^(-149),RNDD)\n"); + printf ("Error for mpfr_get_flt(2^128,RNDN)\n"); printf ("expected %.8e, got %.8e\n", g, f); exit (1); } f = mpfr_get_flt (x, MPFR_RNDU); if (f != g) { - printf ("Error for mpfr_get_flt(2^(-149),RNDU)\n"); + printf ("Error for mpfr_get_flt(2^128,RNDU)\n"); printf ("expected %.8e, got %.8e\n", g, f); exit (1); } f = mpfr_get_flt (x, MPFR_RNDA); if (f != g) { - printf ("Error for mpfr_get_flt(2^(-149),RNDA)\n"); + printf ("Error for mpfr_get_flt(2^128,RNDA)\n"); printf ("expected %.8e, got %.8e\n", g, f); exit (1); } -#endif /* HAVE_DENORMS_FLT */ - mpfr_set_si_2exp (x, 1, 128, MPFR_RNDN); - g = FLT_MAX; - f = mpfr_get_flt (x, MPFR_RNDZ); - if (f != g) - { - printf ("Error for mpfr_get_flt(2^128,RNDZ)\n"); - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } - f = mpfr_get_flt (x, MPFR_RNDD); - if (f != g) - { - printf ("Error for mpfr_get_flt(2^128,RNDD)\n"); - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } -#if !defined(MPFR_ERRDIVZERO) - f = mpfr_get_flt (x, MPFR_RNDN); /* 2^128 rounds to itself with extended + /* same for negative x */ + mpfr_set_si_2exp (x, -1, 128, MPFR_RNDN); + f = mpfr_get_flt (x, MPFR_RNDN); /* -2^128 rounds to itself with extended exponent range, we should get +Inf */ - g = infp; + g = -infp; if (f != g) { - printf ("Error for mpfr_get_flt(2^128,RNDN)\n"); + printf ("Error for mpfr_get_flt(-2^128,RNDN)\n"); printf ("expected %.8e, got %.8e\n", g, f); exit (1); } - f = mpfr_get_flt (x, MPFR_RNDU); + f = mpfr_get_flt (x, MPFR_RNDD); if (f != g) { - printf ("Error for mpfr_get_flt(2^128,RNDU)\n"); + printf ("Error for mpfr_get_flt(-2^128,RNDD)\n"); printf ("expected %.8e, got %.8e\n", g, f); exit (1); } f = mpfr_get_flt (x, MPFR_RNDA); if (f != g) { - printf ("Error for mpfr_get_flt(2^128,RNDA)\n"); + printf ("Error for mpfr_get_flt(-2^128,RNDA)\n"); printf ("expected %.8e, got %.8e\n", g, f); exit (1); } diff -Nru mpfr4-4.0.1/tests/tget_ld_2exp.c mpfr4-4.0.2/tests/tget_ld_2exp.c --- mpfr4-4.0.1/tests/tget_ld_2exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tget_ld_2exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test mpfr_get_ld_2exp. -Copyright 2006-2018 Free Software Foundation, Inc. +Copyright 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tget_q.c mpfr4-4.0.2/tests/tget_q.c --- mpfr4-4.0.1/tests/tget_q.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tget_q.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_get_q. -Copyright 2017-2018 Free Software Foundation, Inc. +Copyright 2017-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -132,11 +132,35 @@ mpz_clear (z); } +static void +coverage (void) +{ + mpfr_t x; + mpq_t q; + mpz_t z; + + mpfr_init2 (x, 5); + mpq_init (q); + mpz_init (z); + + mpfr_set_ui_2exp (x, 17, 100, MPFR_RNDN); + mpfr_get_q (q, x); + MPFR_ASSERTN(mpz_cmp_ui (mpq_denref (q), 1) == 0); + mpz_set_ui (z, 17); + mpz_mul_2exp (z, z, 100); + MPFR_ASSERTN(mpz_cmp (mpq_numref (q), z) == 0); + + mpfr_clear (x); + mpq_clear (q); + mpz_clear (z); +} + int main (void) { tests_start_mpfr (); + coverage (); special (); random_tests (); diff -Nru mpfr4-4.0.1/tests/tget_set_d64.c mpfr4-4.0.2/tests/tget_set_d64.c --- mpfr4-4.0.1/tests/tget_set_d64.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tget_set_d64.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_get_decimal64 and mpfr_set_decimal64. -Copyright 2006-2018 Free Software Foundation, Inc. +Copyright 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,9 +17,10 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* Needed due to the test on MPFR_WANT_DECIMAL_FLOATS */ #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -75,7 +76,7 @@ mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN); \ printf (" approx.\n = "); \ mpfr_dump (x); \ - err = 1; \ + exit (1); \ } \ while (0) @@ -84,7 +85,6 @@ { mpfr_t x, y; _Decimal64 d; - int err = 0; mpfr_init2 (x, 123); mpfr_init2 (y, 123); @@ -180,6 +180,47 @@ if (! mpfr_equal_p (x, y)) PRINT_ERR_MISC ("1E-398"); + /* exercise case e < -1323, i.e., x < 0.5*2^(-1323) */ + mpfr_set_ui_2exp (x, 1, -1324, MPFR_RNDN); + mpfr_nextbelow (x); + d = mpfr_get_decimal64 (x, MPFR_RNDZ); + /* d should equal +0 */ + mpfr_set_decimal64 (x, d, MPFR_RNDN); + MPFR_ASSERTN(mpfr_zero_p (x) && mpfr_signbit (x) == 0); + /* check RNDA */ + mpfr_set_ui_2exp (x, 1, -1324, MPFR_RNDN); + mpfr_nextbelow (x); + d = mpfr_get_decimal64 (x, MPFR_RNDA); + /* d should equal 1E-398 */ + mpfr_set_decimal64 (x, d, MPFR_RNDN); + mpfr_set_str (y, "1E-398", 10, MPFR_RNDN); + MPFR_ASSERTN(mpfr_equal_p (x, y)); + /* check negative number */ + mpfr_set_ui_2exp (x, 1, -1324, MPFR_RNDN); + mpfr_nextbelow (x); + mpfr_neg (x, x, MPFR_RNDN); + d = mpfr_get_decimal64 (x, MPFR_RNDZ); + /* d should equal -0 */ + mpfr_set_decimal64 (x, d, MPFR_RNDN); + MPFR_ASSERTN(mpfr_zero_p (x) && mpfr_signbit (x) == 1); + + /* exercise case e10 < -397 */ + mpfr_set_ui_2exp (x, 1, -1323, MPFR_RNDN); + d = mpfr_get_decimal64 (x, MPFR_RNDZ); + mpfr_set_decimal64 (x, d, MPFR_RNDN); + MPFR_ASSERTN(mpfr_zero_p (x) && mpfr_signbit (x) == 0); + mpfr_set_ui_2exp (x, 1, -1323, MPFR_RNDN); + d = mpfr_get_decimal64 (x, MPFR_RNDU); + mpfr_set_str (y, "1E-398", 10, MPFR_RNDN); + mpfr_set_decimal64 (x, d, MPFR_RNDN); + MPFR_ASSERTN(mpfr_equal_p (x, y)); + mpfr_set_ui_2exp (x, 1, -1323, MPFR_RNDN); + /* 2^(-1323) = 5.46154776930125e-399 thus should be rounded to 1E-398 */ + d = mpfr_get_decimal64 (x, MPFR_RNDN); + mpfr_set_str (y, "1E-398", 10, MPFR_RNDN); + mpfr_set_decimal64 (x, d, MPFR_RNDN); + MPFR_ASSERTN(mpfr_equal_p (x, y)); + /* subnormal number with exponent change when we round back from 16 digits to 1 digit */ mpfr_set_str (x, "9.9E-398", 10, MPFR_RNDN); @@ -206,7 +247,7 @@ printf ("Error in check_misc for DEC64_MAX.\n"); printf (" mpfr_get_decimal64() returned: "); print_decimal64 (d); - err = 1; + exit (1); } mpfr_set_str (x, "-9.999999999999999E384", 10, MPFR_RNDZ); @@ -224,7 +265,7 @@ printf ("Error in check_misc for -DEC64_MAX.\n"); printf (" mpfr_get_decimal64() returned: "); print_decimal64 (d); - err = 1; + exit (1); } mpfr_set_prec (x, 53); @@ -239,9 +280,6 @@ mpfr_clear (x); mpfr_clear (y); - - if (err) - exit (1); } static void @@ -381,6 +419,66 @@ mpfr_clear (x); } +static void +powers_of_10 (void) +{ + mpfr_t x1, x2; + _Decimal64 d[2]; + int i, rnd; + unsigned int neg; + + mpfr_inits2 (200, x1, x2, (mpfr_ptr) 0); + for (i = 0, d[0] = 1, d[1] = 1; i < 150; i++, d[0] *= 10, d[1] /= 10) + for (neg = 0; neg <= 3; neg++) + RND_LOOP_NO_RNDF (rnd) + { + int inex1, inex2; + mpfr_flags_t flags1, flags2; + mpfr_rnd_t rx1; + _Decimal64 dd; + + inex1 = mpfr_set_si (x1, (neg >> 1) ? -i : i, MPFR_RNDN); + MPFR_ASSERTN (inex1 == 0); + + rx1 = (neg & 1) ? + MPFR_INVERT_RND ((mpfr_rnd_t) rnd) : (mpfr_rnd_t) rnd; + mpfr_clear_flags (); + inex1 = mpfr_exp10 (x1, x1, rx1); + flags1 = __gmpfr_flags; + + dd = d[neg >> 1]; + + if (neg & 1) + { + MPFR_SET_NEG (x1); + inex1 = -inex1; + dd = -dd; + } + + mpfr_clear_flags (); + inex2 = mpfr_set_decimal64 (x2, dd, (mpfr_rnd_t) rnd); + flags2 = __gmpfr_flags; + + if (!(mpfr_equal_p (x1, x2) && + SAME_SIGN (inex1, inex2) && + flags1 == flags2)) + { + printf ("Error in powers_of_10 for i=%d, neg=%d, %s\n", + i, neg, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); + printf ("Expected "); + mpfr_dump (x1); + printf ("with inex = %d and flags =", inex1); + flags_out (flags1); + printf ("Got "); + mpfr_dump (x2); + printf ("with inex = %d and flags =", inex2); + flags_out (flags2); + exit (1); + } + } + mpfr_clears (x1, x2, (mpfr_ptr) 0); +} + int main (void) { @@ -401,6 +499,7 @@ check_overflow (); #endif check_tiny (); + powers_of_10 (); tests_end_mpfr (); return 0; diff -Nru mpfr4-4.0.1/tests/tget_sj.c mpfr4-4.0.2/tests/tget_sj.c --- mpfr4-4.0.1/tests/tget_sj.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tget_sj.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_get_sj and mpfr_get_uj. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,9 +17,10 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* Needed due to the inclusion of mpfr-intmax.h */ #ifdef HAVE_CONFIG_H # include "config.h" #endif diff -Nru mpfr4-4.0.1/tests/tget_str.c mpfr4-4.0.2/tests/tget_str.c --- mpfr4-4.0.1/tests/tget_str.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tget_str.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_get_str. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -1267,6 +1267,50 @@ #define ITER 1000 +static void +coverage (void) +{ + mpfr_t x; + char s[42]; + mpfr_exp_t e; + int b = 3; + size_t m = 40; + + mpfr_init2 (x, 128); + + /* exercise corner case in mpfr_get_str_aux: exact case (e < 0), where r + rounds to a power of 2, and f is a multiple of GMP_NUMB_BITS */ + mpfr_set_ui_2exp (x, 1, 64, MPFR_RNDU); + mpfr_nextbelow (x); + /* x = 2^64 - 2^(-64) */ + mpfr_get_str (s, &e, b, m, x, MPFR_RNDU); + /* s is the base-3 string for 6148914691236517206 (in base 10) */ + MPFR_ASSERTN(strcmp (s, "1111222002212212010121102012021021021200") == 0); + MPFR_ASSERTN(e == 41); + + /* exercise corner case in mpfr_get_str: input is m=0, then it is changed + to m=1 */ + mpfr_set_prec (x, 1); + mpfr_set_ui (x, 1, MPFR_RNDN); + mpfr_get_str (s, &e, 2, 0, x, MPFR_RNDN); + MPFR_ASSERTN(strcmp (s, "1") == 0); + MPFR_ASSERTN(e == 1); + mpfr_get_str (s, &e, 2, 1, x, MPFR_RNDN); + MPFR_ASSERTN(strcmp (s, "1") == 0); + MPFR_ASSERTN(e == 1); + + /* exercise corner case in mpfr_get_str: case m < g, exact <> 0, + nx > 2 * n, and low nx-2n limbs from xp not identically zero */ + mpfr_set_prec (x, 129); + mpfr_set_str_binary (x, "0.100100111110110111100010100011011111101010110000011001000111111101100110101110110000110011E8"); + mpfr_nextabove (x); + mpfr_get_str (s, &e, 10, 2, x, MPFR_RNDZ); + MPFR_ASSERTN(strcmp (s, "14") == 0); + MPFR_ASSERTN(e == 3); + + mpfr_clear (x); +} + int main (int argc, char *argv[]) { @@ -1281,6 +1325,7 @@ tests_start_mpfr (); + coverage (); check_small (); check_special (2, 2); diff -Nru mpfr4-4.0.1/tests/tget_z.c mpfr4-4.0.2/tests/tget_z.c --- mpfr4-4.0.1/tests/tget_z.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tget_z.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpz_set_fr / mpfr_get_z. -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tgmpop.c mpfr4-4.0.2/tests/tgmpop.c --- mpfr4-4.0.1/tests/tgmpop.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tgmpop.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* Test file for mpfr_add_[q,z], mpfr_sub_[q,z], mpfr_div_[q,z], mpfr_mul_[q,z], mpfr_cmp_[f,q,z] -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -68,7 +68,7 @@ mpz_set_str (mpq_denref (q), "5721", 10); mpfr_set_str_binary (x, "11111111101001011011100101100011011110010011100010000100001E-44"); mpfr_add_q (y, x, q, MPFR_RNDN); - CHECK_FOR ("cancelation in add_q", mpfr_cmp_ui_2exp (y, 256783, -64) == 0); + CHECK_FOR ("cancellation in add_q", mpfr_cmp_ui_2exp (y, 256783, -64) == 0); mpfr_set_prec (x, 19); mpfr_set_str_binary (x, "0.1011110101110011100E0"); @@ -78,7 +78,7 @@ mpfr_add_q (y, x, q, MPFR_RNDD); mpfr_set_prec (x, 29); mpfr_set_str_binary (x, "11111111101001110011010001001E-14"); - CHECK_FOR ("cancelation in add_q", mpfr_cmp (x,y) == 0); + CHECK_FOR ("cancellation in add_q", mpfr_cmp (x,y) == 0); /* Inf */ mpfr_set_inf (x, 1); @@ -307,16 +307,39 @@ mpfr_init2 (z, MPFR_PREC_MIN); mpq_init (y); - /* check the erange flag when x is NaN */ + /* Check the flags when x is NaN: the erange flags must be set, and + only this one. */ mpfr_set_nan (x); mpq_set_ui (y, 17, 1); - mpfr_clear_erangeflag (); + mpfr_clear_flags (); res1 = mpfr_cmp_q (x, y); - if (res1 != 0 || mpfr_erangeflag_p () == 0) + if (res1 != 0 || __gmpfr_flags != MPFR_FLAGS_ERANGE) { printf ("Error for mpfr_cmp_q (NaN, 17)\n"); printf ("Return value: expected 0, got %d\n", res1); - printf ("Erange flag: expected set, got %d\n", mpfr_erangeflag_p ()); + printf ("Expected flags:"); + flags_out (MPFR_FLAGS_ERANGE); + printf ("Got flags: "); + flags_out (__gmpfr_flags); + exit (1); + } + + /* Check the flags when y is NaN: the erange flags must be set, and + only this one. */ + mpfr_set_ui (x, 42, MPFR_RNDN); + /* A NaN rational is represented by 0/0 (MPFR extension). */ + mpz_set_ui (mpq_numref (y), 0); + mpz_set_ui (mpq_denref (y), 0); + mpfr_clear_flags (); + res1 = mpfr_cmp_q (x, y); + if (res1 != 0 || __gmpfr_flags != MPFR_FLAGS_ERANGE) + { + printf ("Error for mpfr_cmp_q (42, NaN)\n"); + printf ("Return value: expected 0, got %d\n", res1); + printf ("Expected flags:"); + flags_out (MPFR_FLAGS_ERANGE); + printf ("Got flags: "); + flags_out (__gmpfr_flags); exit (1); } @@ -341,6 +364,55 @@ } } } + + /* check for y = 1/0 */ + mpz_set_ui (mpq_numref (y), 1); + mpz_set_ui (mpq_denref (y), 0); + mpfr_set_ui (x, 1, MPFR_RNDN); + MPFR_ASSERTN(mpfr_cmp_q (x, y) < 0); + mpfr_set_inf (x, -1); + MPFR_ASSERTN(mpfr_cmp_q (x, y) < 0); + mpfr_set_inf (x, +1); + MPFR_ASSERTN(mpfr_cmp_q (x, y) == 0); + mpfr_set_nan (x); + mpfr_clear_erangeflag (); + MPFR_ASSERTN(mpfr_cmp_q (x, y) == 0); + MPFR_ASSERTN(mpfr_erangeflag_p ()); + + /* check for y = -1/0 */ + mpz_set_si (mpq_numref (y), -1); + mpz_set_ui (mpq_denref (y), 0); + mpfr_set_ui (x, 1, MPFR_RNDN); + MPFR_ASSERTN(mpfr_cmp_q (x, y) > 0); + mpfr_set_inf (x, -1); + MPFR_ASSERTN(mpfr_cmp_q (x, y) == 0); + mpfr_set_inf (x, +1); + MPFR_ASSERTN(mpfr_cmp_q (x, y) > 0); + mpfr_set_nan (x); + mpfr_clear_erangeflag (); + MPFR_ASSERTN(mpfr_cmp_q (x, y) == 0); + MPFR_ASSERTN(mpfr_erangeflag_p ()); + + /* check for y = 0/0 */ + mpz_set_ui (mpq_numref (y), 0); + mpz_set_ui (mpq_denref (y), 0); + mpfr_set_ui (x, 1, MPFR_RNDN); + mpfr_clear_erangeflag (); + MPFR_ASSERTN(mpfr_cmp_q (x, y) == 0); + MPFR_ASSERTN(mpfr_erangeflag_p ()); + mpfr_set_inf (x, -1); + mpfr_clear_erangeflag (); + MPFR_ASSERTN(mpfr_cmp_q (x, y) == 0); + MPFR_ASSERTN(mpfr_erangeflag_p ()); + mpfr_set_inf (x, +1); + mpfr_clear_erangeflag (); + MPFR_ASSERTN(mpfr_cmp_q (x, y) == 0); + MPFR_ASSERTN(mpfr_erangeflag_p ()); + mpfr_set_nan (x); + mpfr_clear_erangeflag (); + MPFR_ASSERTN(mpfr_cmp_q (x, y) == 0); + MPFR_ASSERTN(mpfr_erangeflag_p ()); + mpq_clear (y); mpfr_clear (x); mpfr_clear (z); @@ -1216,11 +1288,50 @@ mpfr_clear (cmp); } +static void +coverage (void) +{ + mpfr_exp_t emax, emin; + mpz_t z; + mpfr_t x; + int cmp; + + mpz_init (z); + mpfr_init2 (x, 5); + + /* coverage for mpfr_cmp_z in case of overflow */ + emax = mpfr_get_emax (); + mpfr_set_emax (63); + mpz_set_str (z, "9223372036854775808", 10); /* 2^63 */ + mpfr_set_ui_2exp (x, 1, mpfr_get_emax (), MPFR_RNDZ); + /* x = (1-2^(-p))*2^emax */ + mpfr_clear_flags (); + cmp = mpfr_cmp_z (x, z); + MPFR_ASSERTN(cmp < 0); + MPFR_ASSERTN(!mpfr_overflow_p ()); + mpfr_set_emax (emax); + + /* coverage for mpfr_cmp_z in case of underflow */ + mpz_set_str (z, "18446744073709551615", 10); /* 2^64-1 */ + emin = mpfr_get_emin (); + mpfr_set_emin (65); /* xmin = 2^64 */ + mpfr_set_ui_2exp (x, 1, 64, MPFR_RNDN); + mpfr_clear_flags (); + cmp = mpfr_cmp_z (x, z); + MPFR_ASSERTN(cmp > 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + mpfr_set_emin (emin); + + mpfr_clear (x); + mpz_clear (z); +} + int main (int argc, char *argv[]) { tests_start_mpfr (); + coverage (); special (); test_specialz (mpfr_add_z, mpz_add, "add"); diff -Nru mpfr4-4.0.1/tests/tgrandom.c mpfr4-4.0.2/tests/tgrandom.c --- mpfr4-4.0.1/tests/tgrandom.c 2018-02-02 12:32:02.000000000 +0000 +++ mpfr4-4.0.2/tests/tgrandom.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_grandom -Copyright 2011-2018 Free Software Foundation, Inc. +Copyright 2011-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define _MPFR_NO_DEPRECATED_GRANDOM @@ -114,6 +114,7 @@ { long nbtests; int verbose; + int i; tests_start_mpfr (); @@ -130,6 +131,9 @@ test_grandom (nbtests, 420, MPFR_RNDN, verbose); test_special (2); test_special (42000); + /* the following should exercise the case "Extend by 32 bits" in grandom.c */ + for (i = 0; i < 10000; i++) + test_special (1); tests_end_mpfr (); return 0; diff -Nru mpfr4-4.0.1/tests/thyperbolic.c mpfr4-4.0.2/tests/thyperbolic.c --- mpfr4-4.0.1/tests/thyperbolic.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/thyperbolic.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for hyperbolic function : mpfr_cosh, mpfr_sinh, mpfr_tanh, mpfr_acosh, mpfr_asinh, mpfr_atanh. -Copyright 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/thypot.c mpfr4-4.0.2/tests/thypot.c --- mpfr4-4.0.1/tests/thypot.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/thypot.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_hypot. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tinits.c mpfr4-4.0.2/tests/tinits.c --- mpfr4-4.0.1/tests/tinits.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tinits.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_init2, mpfr_inits, mpfr_inits2 and mpfr_clears. -Copyright 2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tinp_str.c mpfr4-4.0.2/tests/tinp_str.c --- mpfr4-4.0.1/tests/tinp_str.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tinp_str.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_inp_str. -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tinternals.c mpfr4-4.0.2/tests/tinternals.c --- mpfr4-4.0.1/tests/tinternals.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tinternals.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tinternals -- Test for internals. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_LONGLONG_H diff -Nru mpfr4-4.0.1/tests/tisnan.c mpfr4-4.0.2/tests/tisnan.c --- mpfr4-4.0.1/tests/tisnan.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tisnan.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* Test file for mpfr_nan_p, mpfr_inf_p, mpfr_number_p, mpfr_zero_p and mpfr_regular_p. -Copyright 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tisqrt.c mpfr4-4.0.2/tests/tisqrt.c --- mpfr4-4.0.1/tests/tisqrt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tisqrt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for __gmpfr_isqrt and __gmpfr_cuberoot internal functions. -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tj0.c mpfr4-4.0.2/tests/tj0.c --- mpfr4-4.0.1/tests/tj0.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tj0.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tj0 -- test file for the Bessel function of first kind (order 0) -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tj1.c mpfr4-4.0.2/tests/tj1.c --- mpfr4-4.0.1/tests/tj1.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tj1.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tj1 -- test file for the Bessel function of first kind (order 1) -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tjn.c mpfr4-4.0.2/tests/tjn.c --- mpfr4-4.0.1/tests/tjn.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tjn.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tjn -- test file for the Bessel function of first kind -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tl2b.c mpfr4-4.0.2/tests/tl2b.c --- mpfr4-4.0.1/tests/tl2b.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tl2b.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for l2b constants. -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Execute this program with an argument to generate code that initializes diff -Nru mpfr4-4.0.1/tests/tlgamma.c mpfr4-4.0.2/tests/tlgamma.c --- mpfr4-4.0.1/tests/tlgamma.c 2018-01-10 16:58:10.000000000 +0000 +++ mpfr4-4.0.2/tests/tlgamma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_tlgamma -- test file for lgamma function -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tli2.c mpfr4-4.0.2/tests/tli2.c --- mpfr4-4.0.1/tests/tli2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tli2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_tli2 -- test file for dilogarithm function -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tlngamma.c mpfr4-4.0.2/tests/tlngamma.c --- mpfr4-4.0.1/tests/tlngamma.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tlngamma.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfr_tlngamma -- test file for lngamma function -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tlog10.c mpfr4-4.0.2/tests/tlog10.c --- mpfr4-4.0.1/tests/tlog10.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tlog10.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_log10. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tlog1p.c mpfr4-4.0.2/tests/tlog1p.c --- mpfr4-4.0.1/tests/tlog1p.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tlog1p.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_log1p. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tlog2.c mpfr4-4.0.2/tests/tlog2.c --- mpfr4-4.0.1/tests/tlog2.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tlog2.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_log2. -Copyright 2001-2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tlog.c mpfr4-4.0.2/tests/tlog.c --- mpfr4-4.0.1/tests/tlog.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tlog.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_log. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tlog_ui.c mpfr4-4.0.2/tests/tlog_ui.c --- mpfr4-4.0.1/tests/tlog_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tlog_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_log_ui. -Copyright 2016-2018 Free Software Foundation, Inc. +Copyright 2016-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tminmax.c mpfr4-4.0.2/tests/tminmax.c --- mpfr4-4.0.1/tests/tminmax.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tminmax.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_min & mpfr_max. -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tmin_prec.c mpfr4-4.0.2/tests/tmin_prec.c --- mpfr4-4.0.1/tests/tmin_prec.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tmin_prec.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_min_prec. -Copyright 2009-2018 Free Software Foundation, Inc. +Copyright 2009-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tmodf.c mpfr4-4.0.2/tests/tmodf.c --- mpfr4-4.0.1/tests/tmodf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tmodf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_modf. -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tmul_2exp.c mpfr4-4.0.2/tests/tmul_2exp.c --- mpfr4-4.0.1/tests/tmul_2exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tmul_2exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_{mul,div}_2{ui,si}. -Copyright 1999, 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -101,10 +101,8 @@ printf ("MPFR_EMIN_MIN"); else if (e == emin) printf ("default emin"); - else if (e >= LONG_MIN) - printf ("%ld", (long) e); else - printf ("LONG_MAX"); + printf ("%" MPFR_EXP_FSPEC "d", (mpfr_eexp_t) e); printf (") for mpfr_mul_2si\n"); printf ("Expected inex > 0, flags = %u,\n y = ", (unsigned int) MPFR_FLAGS_INEXACT); @@ -192,10 +188,8 @@ printf ("MPFR_EMAX_MAX"); else if (e == emax) printf ("default emax"); - else if (e <= LONG_MAX) - printf ("%ld", (long) e); else - printf (">LONG_MAX"); + printf ("%" MPFR_EXP_FSPEC "d", (mpfr_eexp_t) e); printf (") for mpfr_div_2si\n"); printf ("Expected inex > 0, flags = %u,\n y = ", (unsigned int) MPFR_FLAGS_INEXACT); @@ -217,10 +211,8 @@ printf ("MPFR_EMAX_MAX"); else if (e == emax) printf ("default emax"); - else if (e <= LONG_MAX) - printf ("%ld", (long) e); else - printf (">LONG_MAX"); + printf ("%" MPFR_EXP_FSPEC "d", (mpfr_eexp_t) e); printf (") for mpfr_div_2ui\n"); printf ("Expected inex > 0, flags = %u,\n y = ", (unsigned int) MPFR_FLAGS_INEXACT); @@ -238,10 +230,24 @@ static void large0 (void) { - large (256); - if (mpfr_get_emax () != MPFR_EMAX_MAX) - large (mpfr_get_emax ()); - large (MPFR_EMAX_MAX); + mpfr_exp_t emin; + + emin = mpfr_get_emin (); + + while (1) + { + large (256); + if (mpfr_get_emax () != MPFR_EMAX_MAX) + large (mpfr_get_emax ()); + large (MPFR_EMAX_MAX); + if (mpfr_get_emin () == MPFR_EMIN_MIN) + break; + /* Redo the test with __gmpfr_emin set to MPFR_EMIN_MIN, which can + be useful to trigger integer overflows as in div_2ui.c r12272. */ + set_emin (MPFR_EMIN_MIN); + } + + set_emin (emin); } /* Cases where the function overflows on n = 0 when rounding is like @@ -314,6 +320,21 @@ set_emax (old_emax); } +static void +coverage_div_2ui (void) +{ + mpfr_t x, y; + + mpfr_init2 (x, 2); + mpfr_init2 (y, 2); + mpfr_set_ui_2exp (x, 1, mpfr_get_emax () - 1, MPFR_RNDN); + mpfr_div_2ui (y, x, (unsigned long) LONG_MAX + 1, MPFR_RNDN); + MPFR_ASSERTN(mpfr_zero_p (y)); + MPFR_ASSERTN(mpfr_signbit (y) == 0); + mpfr_clear (x); + mpfr_clear (y); +} + int main (int argc, char *argv[]) { @@ -323,6 +344,7 @@ tests_start_mpfr (); + coverage_div_2ui (); mpfr_inits2 (53, w, z, (mpfr_ptr) 0); for (i = 0; i < 3; i++) diff -Nru mpfr4-4.0.1/tests/tmul.c mpfr4-4.0.2/tests/tmul.c --- mpfr4-4.0.1/tests/tmul.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tmul.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_mul. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -267,10 +267,11 @@ } static void -check_max(void) +check_max (void) { mpfr_t xx, yy, zz; mpfr_exp_t emin; + int inex; mpfr_init2(xx, 4); mpfr_init2(yy, 4); @@ -333,6 +334,20 @@ MPFR_ASSERTN(mpfr_cmp (zz, yy) == 0); set_emin (emin); + /* coverage test for mulders.c, case n > 8448 (MUL_FFT_THRESHOLD default) */ + mpfr_set_prec (xx, (8448 + 1) * GMP_NUMB_BITS); + mpfr_set_prec (yy, (8448 + 1) * GMP_NUMB_BITS); + mpfr_set_prec (zz, (8448 + 1) * GMP_NUMB_BITS); + mpfr_set_ui (xx, 1, MPFR_RNDN); + mpfr_nextbelow (xx); + mpfr_set_ui (yy, 1, MPFR_RNDN); + mpfr_nextabove (yy); + /* xx = 1 - 2^(-p), yy = 1 + 2^(1-p), where p = PREC(x), + thus xx * yy should be rounded to 1 */ + inex = mpfr_mul (zz, xx, yy, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_cmp_ui (zz, 1) == 0); + mpfr_clear(xx); mpfr_clear(yy); mpfr_clear(zz); @@ -1087,11 +1102,175 @@ mpfr_set_emin (emin); } +static void +coverage (mpfr_prec_t pmax) +{ + mpfr_t a, b, c; + mpfr_prec_t p; + int inex; + + for (p = MPFR_PREC_MIN; p <= pmax; p++) + { + mpfr_init2 (a, p); + mpfr_init2 (b, p); + mpfr_init2 (c, p); + + /* exercise case b*c = 2^(emin-2), which is just in the middle + between 0 and the smallest positive number 0.5*2^emin */ + mpfr_set_ui_2exp (b, 1, mpfr_get_emin (), MPFR_RNDN); + mpfr_set_ui_2exp (c, 1, -2, MPFR_RNDN); + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (a) && mpfr_signbit (a) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + if (p == 1) + goto end_of_loop; + + /* case b*c > 2^(emin-2): b = (1-2^(-p))*2^emin, + c = 0.25*(1+2^(1-p)), thus b*c = (1+2^(-p)-2^(1-2p))*2^(emin-2) + should be rounded to 2^(emin-1) for RNDN */ + mpfr_nextbelow (b); + mpfr_nextabove (c); + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (a, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + /* b = (1-2^(1-p))*2^emin, c = 0.25*(1+2^(1-p)), + thus b*c = (1-2^(2-2p))*2^(emin-2) should be rounded to 0 */ + mpfr_nextbelow (b); + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (a) && mpfr_signbit (a) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + /* special case where b*c is in [nextbelow(0.5*2^emin),0.5*2^emin[ */ + if ((p % 2) == 0) + { + /* the middle of the interval [nextbelow(0.5*2^emin),0.5*2^emin[ + is (1-2^(-p-1))*2^(emin-1) + = (1-2^(-p/2))*(1+2^(-p/2))*2^(emin-1) */ + mpfr_set_si_2exp (b, -1, -p/2, MPFR_RNDN); + mpfr_add_ui (b, b, 1, MPFR_RNDN); + mpfr_set_si_2exp (c, 1, -p/2, MPFR_RNDN); + mpfr_add_ui (c, c, 1, MPFR_RNDN); + MPFR_ASSERTN(mpfr_get_emin () < 0); + mpfr_mul_2si (b, b, (mpfr_get_emin () - 1) / 2, MPFR_RNDN); + mpfr_mul_2si (c, c, (mpfr_get_emin () - 2) / 2, MPFR_RNDN); + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (a, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (a, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDD); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (a) && mpfr_signbit (a) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + } + else /* p is odd: + b = (1-2^(-(p+1)/2))*2^... + c = (1+2^(-(p+1)/2))*2^... */ + { + mpfr_set_si_2exp (b, -1, -(p+1)/2, MPFR_RNDN); + mpfr_add_ui (b, b, 1, MPFR_RNDN); + mpfr_set_si_2exp (c, 1, -(p+1)/2, MPFR_RNDN); + mpfr_add_ui (c, c, 1, MPFR_RNDN); + MPFR_ASSERTN(mpfr_get_emin () < 0); + mpfr_mul_2si (b, b, (mpfr_get_emin () - 1) / 2, MPFR_RNDN); + mpfr_mul_2si (c, c, (mpfr_get_emin () - 2) / 2, MPFR_RNDN); + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (a, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (a, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDD); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (a) && mpfr_signbit (a) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + } + + if (p <= 2) /* for p=2, 1+2^(-ceil((p+1)/2)) = 1 + 2^(-2) is not + exactly representable */ + goto end_of_loop; + + /* b = 1-2^(-ceil((p+1)/2)) + c = 1+2^(-ceil((p+1)/2)) + For p odd, b*c = 1-2^(p+1) should round to 1; + for p even, b*c = 1-2^(p+2) should round to 1 too. */ + mpfr_set_si_2exp (b, -1, -(p+2)/2, MPFR_RNDN); + mpfr_add_ui (b, b, 1, MPFR_RNDN); + mpfr_set_si_2exp (c, 1, -(p+2)/2, MPFR_RNDN); + mpfr_add_ui (c, c, 1, MPFR_RNDN); + inex = mpfr_mul (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + /* For RNDU, b*c should round to 1 */ + inex = mpfr_mul (a, b, c, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + /* For RNDD, b*c should round to 1-2^(-p) */ + inex = mpfr_mul (a, b, c, MPFR_RNDD); + MPFR_ASSERTN(inex < 0); + mpfr_nextabove (a); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + + /* same as above, but near emax, to exercise the case where a carry + produces an overflow */ + mpfr_set_si_2exp (b, -1, -(p+2)/2, MPFR_RNDN); + mpfr_add_ui (b, b, 1, MPFR_RNDN); + mpfr_mul_2si (b, b, mpfr_get_emax (), MPFR_RNDN); + mpfr_set_si_2exp (c, 1, -(p+2)/2, MPFR_RNDN); + mpfr_add_ui (c, c, 1, MPFR_RNDN); + /* b*c should round to 2^emax */ + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (a) && mpfr_sgn (a) > 0); + MPFR_ASSERTN(mpfr_overflow_p ()); + /* idem for RNDU */ + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (a) && mpfr_sgn (a) > 0); + MPFR_ASSERTN(mpfr_overflow_p ()); + /* For RNDD, b*c should round to (1-2^(-p))*2^emax */ + mpfr_clear_flags (); + inex = mpfr_mul (a, b, c, MPFR_RNDD); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(!mpfr_inf_p (a)); + MPFR_ASSERTN(!mpfr_overflow_p ()); + mpfr_nextabove (a); + MPFR_ASSERTN(mpfr_inf_p (a) && mpfr_sgn (a) > 0); + + end_of_loop: + mpfr_clear (a); + mpfr_clear (b); + mpfr_clear (c); + } +} + int main (int argc, char *argv[]) { tests_start_mpfr (); + coverage (1024); testall_rndf (9); check_nans (); check_exact (); diff -Nru mpfr4-4.0.1/tests/tmul_d.c mpfr4-4.0.2/tests/tmul_d.c --- mpfr4-4.0.1/tests/tmul_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tmul_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_mul_d -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tmul_ui.c mpfr4-4.0.2/tests/tmul_ui.c --- mpfr4-4.0.1/tests/tmul_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tmul_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_mul_ui. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tnext.c mpfr4-4.0.2/tests/tnext.c --- mpfr4-4.0.1/tests/tnext.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tnext.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_nextabove, mpfr_nextbelow, mpfr_nexttoward. -Copyright 2003-2018 Free Software Foundation, Inc. +Copyright 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tnrandom.c mpfr4-4.0.2/tests/tnrandom.c --- mpfr4-4.0.1/tests/tnrandom.c 2018-02-02 12:32:02.000000000 +0000 +++ mpfr4-4.0.2/tests/tnrandom.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_nrandom -Copyright 2011-2018 Free Software Foundation, Inc. +Copyright 2011-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tnrandom_chisq.c mpfr4-4.0.2/tests/tnrandom_chisq.c --- mpfr4-4.0.1/tests/tnrandom_chisq.c 2018-02-02 12:32:02.000000000 +0000 +++ mpfr4-4.0.2/tests/tnrandom_chisq.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Chi-squared test for mpfr_nrandom -Copyright 2011-2018 Free Software Foundation, Inc. +Copyright 2011-2019 Free Software Foundation, Inc. Contributed by Charles Karney , SRI International. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -163,7 +163,7 @@ } /* Return a sequential number for a positive low-precision x. x is altered by - * this fuction. low precision means prec = 2, 3, or 4. High values of + * this function. low precision means prec = 2, 3, or 4. High values of * precision will result in integer overflow. */ static long sequential (mpfr_t x) diff -Nru mpfr4-4.0.1/tests/toutimpl.c mpfr4-4.0.2/tests/toutimpl.c --- mpfr4-4.0.1/tests/toutimpl.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/toutimpl.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* Test file for internal debugging-out functions: mpfr_print_rnd_mode, mpfr_dump, mpfr_print_mant_binary. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tout_str.c mpfr4-4.0.2/tests/tout_str.c --- mpfr4-4.0.1/tests/tout_str.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tout_str.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_out_str. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tpow3.c mpfr4-4.0.2/tests/tpow3.c --- mpfr4-4.0.1/tests/tpow3.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tpow3.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_pow. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tpow_all.c mpfr4-4.0.2/tests/tpow_all.c --- mpfr4-4.0.1/tests/tpow_all.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tpow_all.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for the various power functions -Copyright 2008-2018 Free Software Foundation, Inc. +Copyright 2008-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Note: some tests of the other tpow* test files could be moved there. diff -Nru mpfr4-4.0.1/tests/tpow.c mpfr4-4.0.2/tests/tpow.c --- mpfr4-4.0.1/tests/tpow.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tpow.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_pow, mpfr_pow_ui and mpfr_pow_si. -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,12 +17,9 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include - #define _MPFR_NO_DEPRECATED_ROOT #include "mpfr-test.h" @@ -1602,6 +1599,121 @@ mpfr_clears (x, y, z1, z2, (mpfr_ptr) 0); } +static void +coverage (void) +{ + mpfr_t x, y, z, t, u; + mpfr_exp_t emin; + int inex; + int i; + + /* check a corner case with prec(z)=1 */ + mpfr_init2 (x, 2); + mpfr_init2 (y, 8); + mpfr_init2 (z, 1); + mpfr_set_ui_2exp (x, 3, -2, MPFR_RNDN); /* x = 3/4 */ + emin = mpfr_get_emin (); + mpfr_set_emin (-40); + mpfr_set_ui_2exp (y, 199, -1, MPFR_RNDN); /* y = 99.5 */ + /* x^y ~ 0.81*2^-41 */ + mpfr_clear_underflow (); + inex = mpfr_pow (z, x, y, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (z, 1, -41) == 0); + /* there should be no underflow, since with unbounded exponent range, + and a precision of 1 bit, x^y is rounded to 1.0*2^-41 */ + MPFR_ASSERTN(!mpfr_underflow_p ()); + mpfr_set_ui_2exp (y, 201, -1, MPFR_RNDN); /* y = 100.5 */ + /* x^y ~ 0.61*2^-41 */ + mpfr_clear_underflow (); + inex = mpfr_pow (z, x, y, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (z, 1, -41) == 0); + /* there should be an underflow, since with unbounded exponent range, + and a precision of 1 bit, x^y is rounded to 0.5*2^-41 */ + MPFR_ASSERTN(mpfr_underflow_p ()); + mpfr_set_ui_2exp (y, 203, -1, MPFR_RNDN); /* y = 101.5 */ + /* x^y ~ 0.46*2^-41 */ + mpfr_clear_underflow (); + inex = mpfr_pow (z, x, y, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (z) && mpfr_signbit (z) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + mpfr_clears (x, y, z, (mpfr_ptr) 0); + mpfr_set_emin (emin); + + /* test for x = -2, y an odd integer with EXP(y) > i */ + mpfr_inits2 (10, t, u, (mpfr_ptr) 0); + mpfr_set_ui_2exp (t, 1, 1UL << 8, MPFR_RNDN); + for (i = 8; i <= 300; i++) + { + mpfr_flags_t flags, flags_u; + int inex_u; + + mpfr_mul_si (u, t, -2, MPFR_RNDN); /* u = (-2)^(2^i + 1) */ + mpfr_init2 (x, 10); + mpfr_init2 (y, i+1); + mpfr_init2 (z, 10); + mpfr_set_si (x, -2, MPFR_RNDN); + mpfr_set_ui_2exp (y, 1, i, MPFR_RNDN); + mpfr_nextabove (y); /* y = 2^i + 1 */ + if (MPFR_IS_INF (u)) + { + inex_u = -1; + flags_u = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT; + } + else + { + inex_u = 0; + flags_u = 0; + } + mpfr_clear_flags (); + inex = mpfr_pow (z, x, y, MPFR_RNDN); + flags = __gmpfr_flags; + if (mpfr_cmp0 (z, u) != 0 || + ! SAME_SIGN (inex, inex_u) || + flags != flags_u) + { + printf ("Error in coverage for (-2)^(2^%d + 1):\n", i); + printf ("Expected "); + mpfr_dump (u); + printf (" with inex = %d and flags:", inex_u); + flags_out (flags_u); + printf ("Got "); + mpfr_dump (z); + printf (" with inex = %d and flags:", inex); + flags_out (flags); + exit (1); + } + mpfr_sqr (t, t, MPFR_RNDN); + mpfr_clears (x, y, z, (mpfr_ptr) 0); + } + mpfr_clears (t, u, (mpfr_ptr) 0); + +#if _MPFR_EXP_FORMAT >= 3 && _MPFR_PREC_FORMAT == 3 && MPFR_PREC_BITS == 64 + /* thus an unsigned long has at least 64 bits and x will be finite */ + { + mpfr_exp_t emax; + + emax = mpfr_get_emax (); + mpfr_set_emax ((1UL << 62) - 1); + /* emax = 4611686018427387903 on a 64-bit machine */ + mpfr_init2 (x, 65); + mpfr_init2 (y, 65); + mpfr_init2 (z, 64); + mpfr_set_ui_2exp (x, 512, 3074457345618258593UL, MPFR_RNDN); + mpfr_nextbelow (x); + mpfr_set_str_binary (y, "1.1"); /* y = 3/2 */ + mpfr_nextabove (y); + inex = mpfr_pow (z, x, y, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (z)); + mpfr_clears (x, y, z, (mpfr_ptr) 0); + mpfr_set_emax (emax); + } +#endif +} + int main (int argc, char **argv) { @@ -1609,6 +1721,7 @@ tests_start_mpfr (); + coverage (); bug20071127 (); special (); particular_cases (); diff -Nru mpfr4-4.0.1/tests/tpow_z.c mpfr4-4.0.2/tests/tpow_z.c --- mpfr4-4.0.1/tests/tpow_z.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tpow_z.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_pow_z -- power function x^z with z a MPZ -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,12 +17,9 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include - #include "mpfr-test.h" #define PRINT_ERROR(str) \ diff -Nru mpfr4-4.0.1/tests/tprintf.c mpfr4-4.0.2/tests/tprintf.c --- mpfr4-4.0.1/tests/tprintf.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tprintf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tprintf.c -- test file for mpfr_printf and mpfr_vprintf -Copyright 2008-2018 Free Software Foundation, Inc. +Copyright 2008-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,10 +17,10 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Include config.h before using ANY configure macros if needed. */ +/* Needed due to the tests on HAVE_STDARG and MPFR_USE_MINI_GMP */ #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -31,6 +31,10 @@ #include #include +#ifdef HAVE_LOCALE_H +#include +#endif + #include "mpfr-intmax.h" #include "mpfr-test.h" #define STDOUT_FILENO 1 @@ -474,30 +478,41 @@ mpfr_clear (x); } -#ifdef HAVE_LOCALE_H - -#include - -const char * const tab_locale[] = { - "en_US", - "en_US.iso88591", - "en_US.iso885915", - "en_US.utf8" -}; +#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) static void test_locale (void) { + const char * const tab_locale[] = { + "en_US", + "en_US.iso88591", + "en_US.iso885915", + "en_US.utf8" + }; int i; - char *s = NULL; mpfr_t x; int count; + char v[] = "99999999999999999999999.5"; - for(i = 0; i < numberof(tab_locale) && s == NULL; i++) - s = setlocale (LC_ALL, tab_locale[i]); + for (i = 0; i < numberof(tab_locale); i++) + { + char *s; - if (s == NULL || MPFR_THOUSANDS_SEPARATOR != ',') - return; + s = setlocale (LC_ALL, tab_locale[i]); + + if (s != NULL && MPFR_THOUSANDS_SEPARATOR == ',') + break; + } + + if (i == numberof(tab_locale)) + { + if (getenv ("MPFR_CHECK_LOCALES") == NULL) + return; + + fprintf (stderr, "Cannot find a locale with ',' thousands separator.\n" + "Please install one of the en_US based locales.\n"); + exit (1); + } mpfr_init2 (x, 113); mpfr_set_ui (x, 10000, MPFR_RNDN); @@ -507,6 +522,50 @@ count = mpfr_printf ("(2) 10000=%'Rf \n", x); check_length (10001, count, 25, d); + mpfr_set_ui (x, 1000, MPFR_RNDN); + count = mpfr_printf ("(3) 1000=%'Rf \n", x); + check_length (10002, count, 23, d); + + for (i = 1; i <= sizeof (v) - 3; i++) + { + mpfr_set_str (x, v + sizeof (v) - 3 - i, 10, MPFR_RNDN); + count = mpfr_printf ("(4) 10^i=%'.0Rf \n", x); + check_length (10002 + i, count, 12 + i + i/3, d); + } + +#define N0 20 + + for (i = 1; i <= N0; i++) + { + char s[N0+4]; + int j, rnd; + + s[0] = '1'; + for (j = 1; j <= i; j++) + s[j] = '0'; + s[i+1] = '\0'; + + mpfr_set_str (x, s, 10, MPFR_RNDN); + + RND_LOOP (rnd) + { + count = mpfr_printf ("(5) 10^i=%'.0R*f \n", (mpfr_rnd_t) rnd, x); + check_length (11000 + 10 * i + rnd, count, 12 + i + i/3, d); + } + + strcat (s + (i + 1), ".5"); + count = mpfr_printf ("(5) 10^i=%'.0Rf \n", x); + check_length (11000 + 10 * i + 9, count, 12 + i + i/3, d); + } + + mpfr_set_str (x, "1000", 10, MPFR_RNDN); + count = mpfr_printf ("%'012.3Rg\n", x); + check_length (12000, count, 13, d); + count = mpfr_printf ("%'012.4Rg\n", x); + check_length (12001, count, 13, d); + count = mpfr_printf ("%'013.4Rg\n", x); + check_length (12002, count, 14, d); + mpfr_clear (x); } @@ -515,7 +574,11 @@ static void test_locale (void) { - /* Nothing */ + if (getenv ("MPFR_CHECK_LOCALES") != NULL) + { + fprintf (stderr, "Cannot test locales.\n"); + exit (1); + } } #endif diff -Nru mpfr4-4.0.1/tests/trandom.c mpfr4-4.0.2/tests/trandom.c --- mpfr4-4.0.1/tests/trandom.c 2018-02-02 12:32:02.000000000 +0000 +++ mpfr4-4.0.2/tests/trandom.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_urandomb -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/trandom_deviate.c mpfr4-4.0.2/tests/trandom_deviate.c --- mpfr4-4.0.1/tests/trandom_deviate.c 2018-02-02 12:32:02.000000000 +0000 +++ mpfr4-4.0.2/tests/trandom_deviate.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_random_deviate -Copyright 2011-2018 Free Software Foundation, Inc. +Copyright 2011-2019 Free Software Foundation, Inc. Contributed by Charles Karney , SRI International. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/trec_sqrt.c mpfr4-4.0.2/tests/trec_sqrt.c --- mpfr4-4.0.1/tests/trec_sqrt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/trec_sqrt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_rec_sqrt. -Copyright 2008-2018 Free Software Foundation, Inc. +Copyright 2008-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tremquo.c mpfr4-4.0.2/tests/tremquo.c --- mpfr4-4.0.1/tests/tremquo.c 2018-02-02 10:57:17.000000000 +0000 +++ mpfr4-4.0.2/tests/tremquo.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tremquo -- test file for mpfr_remquo, mpfr_remainder and mpfr_fmodquo. -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/trint.c mpfr4-4.0.2/tests/trint.c --- mpfr4-4.0.1/tests/trint.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/trint.c 2019-01-25 02:00:06.000000000 +0000 @@ -1,7 +1,7 @@ /* Test file for mpfr_rint, mpfr_trunc, mpfr_floor, mpfr_ceil, mpfr_round, mpfr_rint_trunc, mpfr_rint_floor, mpfr_rint_ceil, mpfr_rint_round. -Copyright 2002-2018 Free Software Foundation, Inc. +Copyright 2002-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -337,12 +337,12 @@ mpfr_clear (yy); } -#define TEST_FCT(F) test_fct (&F, &mpfr_##F, #F, r) +#define TEST_FCT(F) test_fct (&F, &mpfr_##F, #F, (mpfr_rnd_t) r) static void test_against_libc (void) { - mpfr_rnd_t r = MPFR_RNDN; + int r = MPFR_RNDN; (void) r; /* avoid a warning by using r */ #if HAVE_ROUND @@ -359,8 +359,8 @@ #endif #if HAVE_NEARBYINT for (r = 0; r < MPFR_RND_MAX ; r++) - if (mpfr_set_machine_rnd_mode (r) == 0) - test_fct (&nearbyint, &mpfr_rint, "rint", r); + if (mpfr_set_machine_rnd_mode ((mpfr_rnd_t) r) == 0) + test_fct (&nearbyint, &mpfr_rint, "rint", (mpfr_rnd_t) r); #endif } diff -Nru mpfr4-4.0.1/tests/trndna.c mpfr4-4.0.2/tests/trndna.c --- mpfr4-4.0.1/tests/trndna.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/trndna.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_round_nearest_away. -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/troot.c mpfr4-4.0.2/tests/troot.c --- mpfr4-4.0.1/tests/troot.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/troot.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_root (also used for mpfr_rootn_ui). -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef TF diff -Nru mpfr4-4.0.1/tests/trootn_ui.c mpfr4-4.0.2/tests/trootn_ui.c --- mpfr4-4.0.1/tests/trootn_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/trootn_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_rootn_ui. -Copyright 2017-2018 Free Software Foundation, Inc. +Copyright 2017-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define TF mpfr_rootn_ui diff -Nru mpfr4-4.0.1/tests/tround_prec.c mpfr4-4.0.2/tests/tround_prec.c --- mpfr4-4.0.1/tests/tround_prec.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tround_prec.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_prec_round. -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tsec.c mpfr4-4.0.2/tests/tsec.c --- mpfr4-4.0.1/tests/tsec.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsec.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sec. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tsech.c mpfr4-4.0.2/tests/tsech.c --- mpfr4-4.0.1/tests/tsech.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsech.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sech. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tset.c mpfr4-4.0.2/tests/tset.c --- mpfr4-4.0.1/tests/tset.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tset.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -256,6 +256,93 @@ mpfr_clear (y); } +static void +test_set_1_2 (void) +{ + mpfr_t u, v, zz, z; + int inex; + + /* (8,16)-bit test */ + mpfr_inits2 (16, u, v, zz, (mpfr_ptr) 0); + mpfr_init2 (z, 8); + mpfr_set_str_binary (u, "0.1100001100011010E-1"); + mpfr_set_str_binary (v, "0.1100010101110010E0"); + /* u + v = 1.0010011011111111 */ + inex = mpfr_add (zz, u, v, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + mpfr_set_str_binary (u, "1.001001110000000"); + MPFR_ASSERTN(mpfr_equal_p (zz, u)); + inex = mpfr_set_1_2 (z, zz, MPFR_RNDN, inex); + /* we should have z = 1.0010011 and inex < 0 */ + MPFR_ASSERTN(inex < 0); + mpfr_set_str_binary (u, "1.0010011"); + MPFR_ASSERTN(mpfr_equal_p (z, u)); + mpfr_clears (u, v, zz, z, (mpfr_ptr) 0); + + /* (16,32)-bit test: + * take for v a random 32-bit number in [1/2,1), here 2859611790/2^32 + * take for z a random 16-bit number in [1,2), less than 2*v, + with last bit 0, here we take z = 40900/2^15 + * take u = z-v-1/2^16-1/2^32 */ + mpfr_inits2 (32, u, v, zz, (mpfr_ptr) 0); + mpfr_init2 (z, 16); + mpfr_set_str_binary (u, "0.10010101000101001100100101110001"); + mpfr_set_str_binary (v, "0.10101010011100100011011010001110"); + /* u + v = 1.00111111100001101111111111111111 */ + inex = mpfr_add (zz, u, v, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + mpfr_set_str_binary (u, "1.0011111110000111"); + MPFR_ASSERTN(mpfr_equal_p (zz, u)); + inex = mpfr_set_1_2 (z, zz, MPFR_RNDN, inex); + /* we should have z = 1.001111111000011 and inex < 0 */ + MPFR_ASSERTN(inex < 0); + mpfr_set_str_binary (u, "1.001111111000011"); + MPFR_ASSERTN(mpfr_equal_p (z, u)); + mpfr_clears (u, v, zz, z, (mpfr_ptr) 0); + + /* (32,64)-bit test: + * take for v a random 64-bit number in [1/2,1), + here v = 13687985014345662879/2^64 + * take for z a random 32-bit number in [1,2), less than 2*v, + with last bit 0, here we take z = 2871078774/2^31 + * take u = z-v-1/2^32-1/2^64 */ + mpfr_inits2 (64, u, v, zz, (mpfr_ptr) 0); + mpfr_init2 (z, 32); + mpfr_set_str_binary (u, "0.10011000010011001110000100010001110010010000111001111110011"); + mpfr_set_str_binary (v, "0.1011110111110101011111011101100100110110111100011000000110011111"); + /* u + v = 1.0101011001000010010111101110101011111111111111111111111111111111 */ + inex = mpfr_add (zz, u, v, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + mpfr_set_str_binary (u, "1.01010110010000100101111011101011"); + MPFR_ASSERTN(mpfr_equal_p (zz, u)); + inex = mpfr_set_1_2 (z, zz, MPFR_RNDN, inex); + /* we should have z = 1.0101011001000010010111101110101 and inex < 0 */ + MPFR_ASSERTN(inex < 0); + mpfr_set_str_binary (u, "1.0101011001000010010111101110101"); + MPFR_ASSERTN(mpfr_equal_p (z, u)); + mpfr_clears (u, v, zz, z, (mpfr_ptr) 0); + + /* (64,128)-bit test: + * take for v a random 128-bit number in [1/2,1), + here v = 322263811942091240216761391118876232409/2^128 + * take for z a random 64-bit number in [1,2), less than 2*v, + with last bit 0, here we take z = 16440347967874738276/2^63 + * take u = z-v-1/2^64-1/2^128 */ + mpfr_inits2 (128, u, v, zz, (mpfr_ptr) 0); + mpfr_init2 (z, 64); + mpfr_set_str_binary (u, "0.1101010111011101111100100001011111111000010011011001000101111010110101101101011011100110101001010001101011011110101101010010011"); + mpfr_set_str_binary (v, "0.11110010011100011100000010100110100010011010110010111111010011000010100100101001000110010101101011100101001000010100101011011001"); + inex = mpfr_add (zz, u, v, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + mpfr_set_str_binary (u, "1.1100100001001111101100101011111010000001111110100101000011000111"); + MPFR_ASSERTN(mpfr_equal_p (zz, u)); + inex = mpfr_set_1_2 (z, zz, MPFR_RNDN, inex); + MPFR_ASSERTN(inex < 0); + mpfr_set_str_binary (u, "1.1100100001001111101100101011111010000001111110100101000011000110"); + MPFR_ASSERTN(mpfr_equal_p (z, u)); + mpfr_clears (u, v, zz, z, (mpfr_ptr) 0); +} + #define TEST_FUNCTION mpfr_set #include "tgeneric.c" @@ -268,6 +355,8 @@ tests_start_mpfr (); + test_set_1_2 (); + /* Default : no error */ error = 0; diff -Nru mpfr4-4.0.1/tests/tset_d.c mpfr4-4.0.2/tests/tset_d.c --- mpfr4-4.0.1/tests/tset_d.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set_d and mpfr_get_d. -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tset_exp.c mpfr4-4.0.2/tests/tset_exp.c --- mpfr4-4.0.1/tests/tset_exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_get_exp and mpfr_set_exp. -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tset_f.c mpfr4-4.0.2/tests/tset_f.c --- mpfr4-4.0.1/tests/tset_f.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_f.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set_f. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tset_float128.c mpfr4-4.0.2/tests/tset_float128.c --- mpfr4-4.0.1/tests/tset_float128.c 2018-02-02 10:57:17.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_float128.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set_float128 and mpfr_get_float128. -Copyright 2012-2018 Free Software Foundation, Inc. +Copyright 2012-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,17 +17,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* Needed due to the test on MPFR_WANT_FLOAT128 */ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#ifdef WITH_FPU_CONTROL -#include -#endif - #ifdef MPFR_WANT_FLOAT128 #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tset_ld.c mpfr4-4.0.2/tests/tset_ld.c --- mpfr4-4.0.1/tests/tset_ld.c 2018-02-02 12:32:02.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_ld.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set_ld and mpfr_get_ld. -Copyright 2002-2018 Free Software Foundation, Inc. +Copyright 2002-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,13 +17,10 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include -#ifdef WITH_FPU_CONTROL -#include -#endif #include "mpfr-test.h" @@ -84,7 +81,7 @@ d = -d; } /* now d >= 0 */ - /* Use 2 differents tests for Inf, to avoid potential bugs + /* Use 2 different tests for Inf, to avoid potential bugs in implementations. */ if (Isnan_ld (d - d) || (d > 1 && d * 0.5 == d)) { @@ -213,7 +210,7 @@ printf (" x = "); mpfr_dump (x); printf (" MPFR_LDBL_MANT_DIG=%u\n", MPFR_LDBL_MANT_DIG); - printf (" prec=%lu\n", prec); + printf (" prec=%ld\n", (long) prec); print_binary (d, 2); exit (1); } diff -Nru mpfr4-4.0.1/tests/tset_q.c mpfr4-4.0.2/tests/tset_q.c --- mpfr4-4.0.1/tests/tset_q.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_q.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set_q. -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tset_si.c mpfr4-4.0.2/tests/tset_si.c --- mpfr4-4.0.1/tests/tset_si.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_si.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set_si, mpfr_set_ui, mpfr_get_si and mpfr_get_ui. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tset_sj.c mpfr4-4.0.2/tests/tset_sj.c --- mpfr4-4.0.1/tests/tset_sj.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_sj.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* Test file for mpfr_set_sj, mpfr_set_uj, mpfr_set_sj_2exp and mpfr_set_uj_2exp. -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,14 +18,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* Needed due to the inclusion of mpfr-intmax.h */ #ifdef HAVE_CONFIG_H # include "config.h" #endif - #include "mpfr-intmax.h" #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tset_str.c mpfr4-4.0.2/tests/tset_str.c --- mpfr4-4.0.1/tests/tset_str.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_str.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set_str. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -93,6 +93,22 @@ mpfr_clear (x); } +static void +bug20180908 (void) +{ + mpfr_t x, y; + const char s[] = "ssq4"; + + mpfr_init2 (x, 12); + mpfr_init2 (y, 12); + mpfr_set_str_binary (x, "0.100010111010E24"); + /* x = 9150464 = [4, 52, 54, 54] in base 55 */ + mpfr_set_str (y, s, 55, MPFR_RNDN); + MPFR_ASSERTN (mpfr_equal_p (x, y)); + mpfr_clear (x); + mpfr_clear (y); +} + int main (int argc, char *argv[]) { @@ -844,6 +860,7 @@ check_underflow (); bug20081028 (); + bug20180908 (); tests_end_mpfr (); return 0; diff -Nru mpfr4-4.0.1/tests/tset_z.c mpfr4-4.0.2/tests/tset_z.c --- mpfr4-4.0.1/tests/tset_z.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_z.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set_z. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tset_z_exp.c mpfr4-4.0.2/tests/tset_z_exp.c --- mpfr4-4.0.1/tests/tset_z_exp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tset_z_exp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set_z_2exp. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -58,6 +58,14 @@ exit (1); } } + + /* coverage test for huge exponent */ + mpz_setbit (y, GMP_NUMB_BITS); + mpfr_clear_flags (); + inexact = mpfr_set_z_2exp (x, y, mpfr_get_emax_max(), MPFR_RNDN); + MPFR_ASSERTN(inexact > 0); + MPFR_ASSERTN(mpfr_inf_p (x) && mpfr_sgn (x) > 0); + MPFR_ASSERTN(mpfr_overflow_p ()); mpfr_clear(x); mpz_clear(y); } diff -Nru mpfr4-4.0.1/tests/tsgn.c mpfr4-4.0.2/tests/tsgn.c --- mpfr4-4.0.1/tests/tsgn.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsgn.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tsgn -- Test for the sign of a floating point number. -Copyright 2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_TESTS_TSGN 1 diff -Nru mpfr4-4.0.1/tests/tsin.c mpfr4-4.0.2/tests/tsin.c --- mpfr4-4.0.1/tests/tsin.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsin.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sin. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tsin_cos.c mpfr4-4.0.2/tests/tsin_cos.c --- mpfr4-4.0.1/tests/tsin_cos.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsin_cos.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sin_cos. -Copyright 2000-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tsinh.c mpfr4-4.0.2/tests/tsinh.c --- mpfr4-4.0.1/tests/tsinh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsinh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sinh. -Copyright 2001-2002, 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2002, 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tsinh_cosh.c mpfr4-4.0.2/tests/tsinh_cosh.c --- mpfr4-4.0.1/tests/tsinh_cosh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsinh_cosh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sinh_cosh. -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tsi_op.c mpfr4-4.0.2/tests/tsi_op.c --- mpfr4-4.0.1/tests/tsi_op.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsi_op.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* Test file for mpfr_add_si, mpfr_sub_si, mpfr_si_sub, mpfr_mul_si, mpfr_div_si, mpfr_si_div -Copyright 2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tsprintf.c mpfr4-4.0.2/tests/tsprintf.c --- mpfr4-4.0.1/tests/tsprintf.c 2018-01-10 10:15:30.000000000 +0000 +++ mpfr4-4.0.2/tests/tsprintf.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,7 +1,7 @@ /* tsprintf.c -- test file for mpfr_sprintf, mpfr_vsprintf, mpfr_snprintf, and mpfr_vsnprintf -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -18,10 +18,10 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Include config.h before using ANY configure macros if needed. */ +/* Needed due to the tests on HAVE_STDARG and MPFR_USE_MINI_GMP */ #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -232,6 +232,22 @@ /* specifier 'P' for precision */ check_vsprintf ("128", "%Pu", p); check_vsprintf ("00128", "%.5Pu", p); + check_vsprintf (" 128", "%5Pu", p); + check_vsprintf ("000128", "%06Pu", p); + check_vsprintf ("128 :", "%-7Pu:", p); + check_vsprintf ("000128:", "%-2.6Pd:", p); + check_vsprintf (" 000128:", "%8.6Pd:", p); + check_vsprintf ("000128 :", "%-8.6Pd:", p); + check_vsprintf ("+128:", "%+d:", p); + check_vsprintf (" 128:", "% d:", p); + check_vsprintf ("80:", "% x:", p); + check_vsprintf ("0x80:", "% #x:", p); + check_vsprintf ("0x80:", "%0#+ -x:", p); + check_vsprintf ("0200:", "%0#+ -o:", p); + check_vsprintf ("+0000128 :", "%0+ *.*Pd:", -9, 7, p); + check_vsprintf ("+12345 :", "%0+ -*.*Pd:", -9, -3, (mpfr_prec_t) 12345); + /* Do not add a test like "%05.1Pd" as MS Windows is buggy: when + a precision is given, the '0' flag must be ignored. */ /* special numbers */ mpfr_set_inf (x, 1); @@ -380,7 +396,7 @@ check_sprintf ("1.00 ", "%-#20.3RG", x); check_sprintf ("0.9999 ", "%-#20.4RG", x); - /* multiple of 10 */ + /* powers of 10 */ mpfr_set_str (x, "1e17", 10, MPFR_RNDN); check_sprintf ("1e+17", "%Re", x); check_sprintf ("1.000e+17", "%.3Re", x); @@ -402,7 +418,7 @@ check_sprintf ("1", "%.0RUf", x); check_sprintf ("1", "%.0RYf", x); - /* multiple of 10 with 'g' style */ + /* powers of 10 with 'g' style */ mpfr_set_str (x, "10", 10, MPFR_RNDN); check_sprintf ("10", "%Rg", x); check_sprintf ("1e+01", "%.0Rg", x); @@ -419,6 +435,12 @@ check_sprintf ("1e+03", "%.0Rg", x); check_sprintf ("1e+03", "%.3Rg", x); check_sprintf ("1000", "%.4Rg", x); + check_sprintf ("1e+03", "%.3Rg", x); + check_sprintf ("1000", "%.4Rg", x); + check_sprintf (" 1e+03", "%9.3Rg", x); + check_sprintf (" 1000", "%9.4Rg", x); + check_sprintf ("00001e+03", "%09.3Rg", x); + check_sprintf ("000001000", "%09.4Rg", x); mpfr_ui_div (x, 1, x, MPFR_RNDN); check_sprintf ("0.001", "%Rg", x); @@ -430,6 +452,10 @@ check_sprintf ("1e+05", "%.0Rg", x); check_sprintf ("1e+05", "%.5Rg", x); check_sprintf ("100000", "%.6Rg", x); + check_sprintf (" 1e+05", "%17.5Rg", x); + check_sprintf (" 100000", "%17.6Rg", x); + check_sprintf ("0000000000001e+05", "%017.5Rg", x); + check_sprintf ("00000000000100000", "%017.6Rg", x); mpfr_ui_div (x, 1, x, MPFR_RNDN); check_sprintf ("1e-05", "%Rg", x); @@ -857,6 +883,12 @@ "%.*Zi, %R*e, %Lf", 20, mpz, rnd, x, d); #endif + /* check invalid spec.spec */ + check_vsprintf ("%,", "%,"); + + /* check empty format */ + check_vsprintf ("%", "%"); + mpf_clear (mpf); mpq_clear (mpq); mpz_clear (mpz); @@ -864,12 +896,12 @@ return 0; } -#if MPFR_LCONV_DPTS +#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) && MPFR_LCONV_DPTS /* Check with locale "da_DK". On most platforms, decimal point is ',' and thousands separator is '.'; the test is not performed if this is not the case or if the locale doesn't exist. */ -static int +static void locale_da_DK (void) { mpfr_prec_t p = 128; @@ -878,7 +910,16 @@ if (setlocale (LC_ALL, "da_DK") == 0 || localeconv()->decimal_point[0] != ',' || localeconv()->thousands_sep[0] != '.') - return 0; + { + setlocale (LC_ALL, "C"); + + if (getenv ("MPFR_CHECK_LOCALES") == NULL) + return; + + fprintf (stderr, + "Cannot test the da_DK locale (not found or inconsistent).\n"); + exit (1); + } mpfr_init2 (x, p); @@ -917,10 +958,11 @@ check_sprintf ("100" S2 "0000", "%'.4Rf", x); mpfr_clear (x); - return 0; + + setlocale (LC_ALL, "C"); } -#endif /* MPFR_LCONV_DPTS */ +#endif /* ... && MPFR_LCONV_DPTS */ /* check concordance between mpfr_asprintf result with a regular mpfr float and with a regular double float */ @@ -1425,6 +1467,121 @@ exit (1); } +#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) + +/* The following tests should be equivalent to those from test_locale() + in tprintf.c (remove the \n at the end of the test strings). */ + +static void +test_locale (void) +{ + const char * const tab_locale[] = { + "en_US", + "en_US.iso88591", + "en_US.iso885915", + "en_US.utf8" + }; + int i; + mpfr_t x; + char v[] = "99999999999999999999999.5"; + + for (i = 0; i < numberof(tab_locale); i++) + { + char *s; + + s = setlocale (LC_ALL, tab_locale[i]); + + if (s != NULL && MPFR_THOUSANDS_SEPARATOR == ',') + break; + } + + if (i == numberof(tab_locale)) + { + if (getenv ("MPFR_CHECK_LOCALES") == NULL) + return; + + fprintf (stderr, "Cannot find a locale with ',' thousands separator.\n" + "Please install one of the en_US based locales.\n"); + exit (1); + } + + mpfr_init2 (x, 113); + mpfr_set_ui (x, 10000, MPFR_RNDN); + + check_sprintf ("(1) 10000=10,000 ", "(1) 10000=%'Rg ", x); + check_sprintf ("(2) 10000=10,000.000000 ", "(2) 10000=%'Rf ", x); + + mpfr_set_ui (x, 1000, MPFR_RNDN); + check_sprintf ("(3) 1000=1,000.000000 ", "(3) 1000=%'Rf ", x); + + for (i = 1; i <= sizeof (v) - 3; i++) + { + char buf[64]; + int j; + + strcpy (buf, "(4) 10^i=1"); + for (j = i; j > 0; j--) + strcat (buf, ",0" + (j % 3 != 0)); + strcat (buf, " "); + mpfr_set_str (x, v + sizeof (v) - 3 - i, 10, MPFR_RNDN); + check_sprintf (buf, "(4) 10^i=%'.0Rf ", x); + } + +#define N0 20 + + for (i = 1; i <= N0; i++) + { + char s[N0+4], buf[64]; + int j; + + s[0] = '1'; + for (j = 1; j <= i; j++) + s[j] = '0'; + s[i+1] = '\0'; + + strcpy (buf, "(5) 10^i=1"); + for (j = i; j > 0; j--) + strcat (buf, ",0" + (j % 3 != 0)); + strcat (buf, " "); + + mpfr_set_str (x, s, 10, MPFR_RNDN); + + check_sprintf (buf, "(5) 10^i=%'.0RNf ", x); + check_sprintf (buf, "(5) 10^i=%'.0RZf ", x); + check_sprintf (buf, "(5) 10^i=%'.0RUf ", x); + check_sprintf (buf, "(5) 10^i=%'.0RDf ", x); + check_sprintf (buf, "(5) 10^i=%'.0RYf ", x); + + strcat (s + (i + 1), ".5"); + check_sprintf (buf, "(5) 10^i=%'.0Rf ", x); + } + + mpfr_set_str (x, "1000", 10, MPFR_RNDN); + check_sprintf ("00000001e+03", "%'012.3Rg", x); + check_sprintf ("00000001,000", "%'012.4Rg", x); + check_sprintf ("000000001,000", "%'013.4Rg", x); + +#ifdef PRINTF_GROUPFLAG + check_vsprintf ("+01,234,567 :", "%0+ -'13.10Pd:", (mpfr_prec_t) 1234567); +#endif + + mpfr_clear (x); +} + +#else + +static void +test_locale (void) +{ + if (getenv ("MPFR_CHECK_LOCALES") != NULL) + { + fprintf (stderr, "Cannot test locales.\n"); + exit (1); + } +} + +#endif + int main (int argc, char **argv) { @@ -1446,12 +1603,14 @@ binary (); decimal (); -#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) -#if MPFR_LCONV_DPTS +#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) && MPFR_LCONV_DPTS locale_da_DK (); - /* Avoid a warning by doing the setlocale outside of this #if */ -#endif - setlocale (LC_ALL, "C"); +#else + if (getenv ("MPFR_CHECK_LOCALES") != NULL) + { + fprintf (stderr, "Cannot test locales.\n"); + exit (1); + } #endif } @@ -1462,6 +1621,7 @@ snprintf_size (); percent_n (); mixed (); + test_locale (); if (getenv ("MPFR_CHECK_LIBC_PRINTF")) { diff -Nru mpfr4-4.0.1/tests/tsqr.c mpfr4-4.0.2/tests/tsqr.c --- mpfr4-4.0.1/tests/tsqr.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsqr.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sqr. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -188,6 +188,156 @@ #endif } +static void +coverage (mpfr_prec_t pmax) +{ + mpfr_prec_t p; + + for (p = MPFR_PREC_MIN; p <= pmax; p++) + { + mpfr_t a, b, c; + int inex; + mpfr_exp_t emin; + + mpfr_init2 (a, p); + mpfr_init2 (b, p); + mpfr_init2 (c, p); + + /* exercise carry in most significant bits of a, with overflow */ + mpfr_set_ui_2exp (b, 1, mpfr_get_emax (), MPFR_RNDZ); + mpfr_sqrt (b, b, MPFR_RNDU); + mpfr_div_2exp (c, b, 1, MPFR_RNDN); + mpfr_sqr (c, c, MPFR_RNDN); + mpfr_clear_flags (); + inex = mpfr_sqr (a, b, MPFR_RNDN); + /* if EXP(c) > emax-2, there is overflow */ + if (mpfr_get_exp (c) > mpfr_get_emax () - 2) + { + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (a) && mpfr_sgn (a) > 0); + MPFR_ASSERTN(mpfr_overflow_p ()); + } + else /* no overflow */ + { + /* 2^p-1 is a square only for p=1 */ + MPFR_ASSERTN((p == 1 && inex == 0) || (p > 1 && inex < 0)); + MPFR_ASSERTN(!mpfr_overflow_p ()); + mpfr_set_ui_2exp (c, 1, mpfr_get_emax (), MPFR_RNDZ); + MPFR_ASSERTN(mpfr_equal_p (a, c)); + } + + /* same as above, with RNDU */ + mpfr_set_ui_2exp (b, 1, mpfr_get_emax (), MPFR_RNDZ); + mpfr_sqrt (b, b, MPFR_RNDU); + mpfr_div_2exp (c, b, 1, MPFR_RNDN); + mpfr_sqr (c, c, MPFR_RNDU); + mpfr_clear_flags (); + inex = mpfr_sqr (a, b, MPFR_RNDU); + /* if EXP(c) > emax-2, there is overflow */ + if (mpfr_get_exp (c) > mpfr_get_emax () - 2) + { + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (a) && mpfr_sgn (a) > 0); + MPFR_ASSERTN(mpfr_overflow_p ()); + } + else /* no overflow */ + { + /* 2^p-1 is a square only for p=1 */ + MPFR_ASSERTN((p == 1 && inex == 0) || (p > 1 && inex < 0)); + MPFR_ASSERTN(!mpfr_overflow_p ()); + mpfr_set_ui_2exp (c, 1, mpfr_get_emax (), MPFR_RNDZ); + MPFR_ASSERTN(mpfr_equal_p (a, c)); + } + + /* exercise trivial overflow */ + mpfr_set_ui_2exp (b, 1, mpfr_get_emax (), MPFR_RNDZ); + mpfr_sqrt (b, b, MPFR_RNDU); + mpfr_mul_2exp (b, b, 1, MPFR_RNDN); + mpfr_clear_flags (); + inex = mpfr_sqr (a, b, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (a) && mpfr_sgn (a) > 0); + MPFR_ASSERTN(mpfr_overflow_p ()); + + /* exercise trivial underflow */ + mpfr_set_ui_2exp (b, 1, mpfr_get_emin () - 1, MPFR_RNDZ); + mpfr_sqrt (b, b, MPFR_RNDU); + mpfr_div_2exp (b, b, 1, MPFR_RNDN); + mpfr_clear_flags (); + inex = mpfr_sqr (a, b, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (a) && mpfr_signbit (a) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + /* exercise square between 0.5*2^emin and its predecessor (emin even) */ + emin = mpfr_get_emin (); + mpfr_set_emin (emin + (emin & 1)); /* now emin is even */ + mpfr_set_ui_2exp (b, 1, mpfr_get_emin () - 1, MPFR_RNDN); + inex = mpfr_sqrt (b, b, MPFR_RNDZ); + MPFR_ASSERTN(inex != 0); /* sqrt(2) is not exact */ + mpfr_mul_2exp (c, b, 1, MPFR_RNDN); + mpfr_sqr (c, c, MPFR_RNDN); + mpfr_clear_flags (); + inex = mpfr_sqr (a, b, MPFR_RNDN); + if (mpfr_get_exp (c) < mpfr_get_emin () + 2) /* underflow */ + { + /* if c > 0.5*2^(emin+1), we should round to 0.5*2^emin */ + if (mpfr_cmp_ui_2exp (c, 1, mpfr_get_emin ()) > 0) + { + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (a, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + } + else /* we should round to 0 */ + { + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (a) && mpfr_signbit (a) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + } + } + else + { + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (a, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + } + mpfr_set_emin (emin); + + /* exercise exact square root 2^(emin-2) for emin even */ + emin = mpfr_get_emin (); + mpfr_set_emin (emin + (emin & 1)); /* now emin is even */ + mpfr_set_ui_2exp (b, 1, (mpfr_get_emin () - 2) / 2, MPFR_RNDN); + inex = mpfr_sqr (a, b, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (a) && mpfr_signbit (a) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + mpfr_set_emin (emin); + + /* same as above, for RNDU */ + emin = mpfr_get_emin (); + mpfr_set_emin (emin + (emin & 1)); /* now emin is even */ + mpfr_set_ui_2exp (b, 1, mpfr_get_emin () - 1, MPFR_RNDN); + inex = mpfr_sqrt (b, b, MPFR_RNDZ); + MPFR_ASSERTN(inex != 0); /* sqrt(2) is not exact */ + mpfr_mul_2exp (c, b, 1, MPFR_RNDN); + mpfr_sqr (c, c, MPFR_RNDU); + mpfr_clear_flags (); + inex = mpfr_sqr (a, b, MPFR_RNDU); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (a, 1, mpfr_get_emin () - 1) == 0); + /* we have underflow if c < 2^(emin+1) */ + if (mpfr_cmp_ui_2exp (c, 1, mpfr_get_emin () + 1) < 0) + MPFR_ASSERTN(mpfr_underflow_p ()); + else + MPFR_ASSERTN(!mpfr_underflow_p ()); + mpfr_set_emin (emin); + + mpfr_clear (a); + mpfr_clear (b); + mpfr_clear (c); + } +} + int main (void) { @@ -195,6 +345,7 @@ tests_start_mpfr (); + coverage (1024); check_mpn_sqr (); check_special (); test_underflow (); diff -Nru mpfr4-4.0.1/tests/tsqrt.c mpfr4-4.0.2/tests/tsqrt.c --- mpfr4-4.0.1/tests/tsqrt.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsqrt.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sqrt. -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -689,6 +689,231 @@ mpfr_clear (u); } +static void +check_overflow (void) +{ + mpfr_t r, u; + mpfr_prec_t p; + mpfr_exp_t emax; + int inex; + + emax = mpfr_get_emax (); + for (p = MPFR_PREC_MIN; p <= 1024; p++) + { + mpfr_init2 (r, p); + mpfr_init2 (u, p); + + mpfr_set_emax (-1); + mpfr_set_ui_2exp (u, 1, mpfr_get_emax () - 1, MPFR_RNDN); + mpfr_nextbelow (u); + mpfr_mul_2exp (u, u, 1, MPFR_RNDN); + /* now u = (1 - 2^(-p))*2^emax is the largest number < +Inf, + it square root is near 0.707 and has exponent 0 > emax */ + /* for RNDN, the result should be +Inf */ + inex = mpfr_sqrt (r, u, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (r) && mpfr_sgn (r) > 0); + /* for RNDA, the result should be +Inf */ + inex = mpfr_sqrt (r, u, MPFR_RNDA); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (r) && mpfr_sgn (r) > 0); + /* for RNDZ, the result should be u */ + inex = mpfr_sqrt (r, u, MPFR_RNDZ); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_equal_p (r, u)); + + mpfr_set_emax (0); + mpfr_set_ui_2exp (u, 1, mpfr_get_emax () - 1, MPFR_RNDN); + mpfr_nextbelow (u); + mpfr_mul_2exp (u, u, 1, MPFR_RNDN); + /* u = 1-2^(-p), its square root is > u, and should thus give +Inf when + rounding away */ + inex = mpfr_sqrt (r, u, MPFR_RNDA); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (r) && mpfr_sgn (r) > 0); + + mpfr_clear (r); + mpfr_clear (u); + } + mpfr_set_emax (emax); +} + +static void +check_underflow (void) +{ + mpfr_t r, u; + mpfr_prec_t p; + mpfr_exp_t emin; + int inex; + + emin = mpfr_get_emin (); + for (p = MPFR_PREC_MIN; p <= 1024; p++) + { + mpfr_init2 (r, p); + mpfr_init2 (u, p); + + mpfr_set_emin (2); + mpfr_set_ui_2exp (u, 1, mpfr_get_emin () - 1, MPFR_RNDN); /* u = 2 */ + /* for RNDN, since sqrt(2) is closer from 2 than 0, the result is 2 */ + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_equal_p (r, u)); + MPFR_ASSERTN(mpfr_underflow_p ()); + /* for RNDA, the result should be u, and there is underflow for p > 1, + since for p=1 we have 1 < sqrt(2) < 2, but for p >= 2, sqrt(2) should + be rounded to a number <= 1.5, which is representable */ + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDA); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_equal_p (r, u)); + MPFR_ASSERTN((p == 1 && !mpfr_underflow_p ()) || + (p != 1 && mpfr_underflow_p ())); + /* for RNDZ, the result should be +0 */ + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDZ); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (r) && mpfr_signbit (r) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + /* generate an input u such that sqrt(u) < 0.5*2^emin but there is no + underflow since sqrt(u) >= pred(0.5*2^emin), thus u >= 2^(2emin-2) */ + mpfr_set_ui_2exp (u, 1, 2 * mpfr_get_emin () - 2, MPFR_RNDN); + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDN); + MPFR_ASSERTN(inex == 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (r, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDA); + MPFR_ASSERTN(inex == 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (r, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDZ); + MPFR_ASSERTN(inex == 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (r, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + + /* next number */ + mpfr_set_ui_2exp (u, 1, 2 * mpfr_get_emin () - 2, MPFR_RNDN); + mpfr_nextabove (u); + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (r, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDA); + MPFR_ASSERTN(inex > 0); + mpfr_nextbelow (r); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (r, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDZ); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (r, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + + /* previous number */ + mpfr_set_ui_2exp (u, 1, 2 * mpfr_get_emin () - 2, MPFR_RNDN); + mpfr_nextbelow (u); + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (r, 1, mpfr_get_emin () - 1) == 0); + /* since sqrt(u) is just below the middle between 0.5*2^emin and + the previous number (with unbounded exponent range), there is + underflow */ + MPFR_ASSERTN(mpfr_underflow_p ()); + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDA); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (r, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(!mpfr_underflow_p ()); + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDZ); + MPFR_ASSERTN(inex < 0); + mpfr_nextabove (r); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (r, 1, mpfr_get_emin () - 1) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + mpfr_set_emin (3); + mpfr_set_ui_2exp (u, 1, mpfr_get_emin () - 1, MPFR_RNDN); /* u = 4 */ + /* sqrt(u) = 2 = 0.5^2^(emin-1) should be rounded to +0 */ + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (r) && mpfr_signbit (r) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + /* next number */ + mpfr_set_ui_2exp (u, 1, mpfr_get_emin () - 1, MPFR_RNDN); /* u = 4 */ + mpfr_nextabove (u); + /* sqrt(u) should be rounded to 4 */ + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (r, 4) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + mpfr_set_emin (4); + mpfr_set_ui_2exp (u, 1, mpfr_get_emin () - 1, MPFR_RNDN); /* u = 8 */ + /* sqrt(u) should be rounded to +0 */ + mpfr_clear_flags (); + inex = mpfr_sqrt (r, u, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_zero_p (r) && mpfr_signbit (r) == 0); + MPFR_ASSERTN(mpfr_underflow_p ()); + + mpfr_clear (r); + mpfr_clear (u); + } + mpfr_set_emin (emin); +} + +static void +coverage (void) +{ + mpfr_t r, t, u, v, w; + mpfr_prec_t p; + int inex; + + /* exercise even rule */ + for (p = MPFR_PREC_MIN; p <= 1024; p++) + { + mpfr_init2 (r, p); + mpfr_init2 (t, p + 1); + mpfr_init2 (u, 2 * p + 2); + mpfr_init2 (v, p); + mpfr_init2 (w, p); + do + mpfr_urandomb (v, RANDS); + while (mpfr_zero_p (v)); + mpfr_set (w, v, MPFR_RNDN); + mpfr_nextabove (w); /* w = nextabove(v) */ + mpfr_set (t, v, MPFR_RNDN); + mpfr_nextabove (t); + mpfr_mul (u, t, t, MPFR_RNDN); + inex = mpfr_sqrt (r, u, MPFR_RNDN); + if (mpfr_min_prec (v) < p) /* v is even */ + { + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_equal_p (r, v)); + } + else /* v is odd */ + { + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_equal_p (r, w)); + } + mpfr_clear (r); + mpfr_clear (t); + mpfr_clear (u); + mpfr_clear (v); + mpfr_clear (w); + } +} + #define TEST_FUNCTION test_sqrt #define TEST_RANDOM_POS 8 #include "tgeneric.c" @@ -701,6 +926,9 @@ tests_start_mpfr (); + coverage (); + check_underflow (); + check_overflow (); testall_rndf (16); for (p = MPFR_PREC_MIN; p <= 128; p++) { diff -Nru mpfr4-4.0.1/tests/tsqrt_ui.c mpfr4-4.0.2/tests/tsqrt_ui.c --- mpfr4-4.0.1/tests/tsqrt_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsqrt_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sqrt_ui. -Copyright 2000-2003, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2003, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tstckintc.c mpfr4-4.0.2/tests/tstckintc.c --- mpfr4-4.0.1/tests/tstckintc.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tstckintc.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_custom_* -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -32,6 +32,22 @@ #define ALIGNED(s) (((s) + sizeof (long) - 1) / sizeof (long) * sizeof (long)) +/* This code ensures alignment to "long". However, this might not be + sufficient on some platforms. GCC's -Wcast-align=strict option can + be useful, but this needs successive casts to help GCC, e.g. + + newx = (mpfr_ptr) (long *) (void *) old_stack; + + successively casts old_stack (of type char *) to + - void *: avoid a false positive for the following cast to long * + (as the code takes care of alignment to "long"); + - long *: this corresponds to the alignment checked by MPFR; coming + from void *, it will not trigger a warning (even if incorrect); + - mpfr_ptr: -Wcast-align=strict will emit a warning if mpfr_ptr has + an alignment requirement stronger than long *. In such a case, + the code will have to be fixed. +*/ + static void * new_st (size_t s) { @@ -94,12 +110,14 @@ void *mantissa = mpfr_custom_get_significand (x); size_t size_mantissa = mpfr_custom_get_size (mpfr_get_prec (x)); mpfr_ptr newx; + long *newx2; memmove (old_stack, x, sizeof (mpfr_t)); memmove (old_stack + ALIGNED (sizeof (mpfr_t)), mantissa, size_mantissa); - newx = (mpfr_ptr) old_stack; - mpfr_custom_move (newx, old_stack + ALIGNED (sizeof (mpfr_t))); - stack = old_stack + ALIGNED (sizeof (mpfr_t)) + ALIGNED (size_mantissa); + newx = (mpfr_ptr) (long *) (void *) old_stack; + newx2 = (long *) (void *) (old_stack + ALIGNED (sizeof (mpfr_t))); + mpfr_custom_move (newx, newx2); + stack = (char *) newx2 + ALIGNED (size_mantissa); return newx; } @@ -113,7 +131,7 @@ memmove (old_stack, x, sizeof (mpfr_t)); memmove (old_stack + ALIGNED (sizeof (mpfr_t)), mantissa, size_mantissa); - newx = (mpfr_ptr) old_stack; + newx = (mpfr_ptr) (long *) (void *) old_stack; (mpfr_custom_move) (newx, old_stack + ALIGNED (sizeof (mpfr_t))); stack = old_stack + ALIGNED (sizeof (mpfr_t)) + ALIGNED (size_mantissa); return newx; @@ -127,7 +145,7 @@ mpfr_ptr x, y; reset_stack (); - org = (long *) stack; + org = (long *) (void *) stack; x = new_mpfr (p); y = new_mpfr (p); @@ -277,7 +295,7 @@ long *a, *b, *c; reset_stack (); - org = (long *) stack; + org = (long *) (void *) stack; a = dummy_set_si (42); b = dummy_set_si (17); diff -Nru mpfr4-4.0.1/tests/tstdint.c mpfr4-4.0.2/tests/tstdint.c --- mpfr4-4.0.1/tests/tstdint.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tstdint.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for multiple mpfr.h inclusion and intmax_t related functions -Copyright 2010-2018 Free Software Foundation, Inc. +Copyright 2010-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #if HAVE_STDINT_H diff -Nru mpfr4-4.0.1/tests/tstrtofr.c mpfr4-4.0.2/tests/tstrtofr.c --- mpfr4-4.0.1/tests/tstrtofr.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tstrtofr.c 2019-01-08 13:30:18.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_set_str. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,11 +17,17 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" +/* The implicit \0 is useless, but we do not write num_to_text[62] otherwise + g++ complains. */ +static const char num_to_text36[] = "0123456789abcdefghijklmnopqrstuvwxyz"; +static const char num_to_text62[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz"; + static void check_special (void) { @@ -898,6 +904,20 @@ { printf ("Check overflow failed (2) with:\n s='%s'\n x=", s); mpfr_dump (x); +#if defined(__GNUC__) + printf ("This failure is triggered by GCC bug 86554:\n" + " https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86554\n" + " https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87276 " + "(about this test)\nWorkaround: disable code hoisting " + "with -fno-code-hoisting in CFLAGS.\n"); + /* Note: In Debian, this error is obtained with gcc-snapshot from + 20180908-1 to 20181127-1. With gcc-snapshot from 20181209-1 to + 20190102-1 (at least), the MPFR build no longer seems affected + in general, but using --with-gmp-build=... together with + --enable-assert still triggers this failure. This bug has been + fixed in the GCC trunk rev 267725, thus the future gcc-snapshot + versions should no longer have this bug. */ +#endif exit (1); } mpfr_strtofr (x, "123456789E170141183460469231731687303715884105728", @@ -938,6 +958,20 @@ mpfr_dump (x); exit (1); } + mpfr_strtofr (x, "1@2305843009213693951", &s, 16, MPFR_RNDN); + if (s[0] != 0 || !MPFR_IS_INF (x) || !MPFR_IS_POS (x)) + { + printf ("Check overflow failed (8) with:\n s=%s\n x=", s); + mpfr_dump (x); + exit (1); + } + mpfr_strtofr (x, "1@2305843009213693951", &s, 17, MPFR_RNDN); + if (s[0] != 0 || !MPFR_IS_INF (x) || !MPFR_IS_POS (x)) + { + printf ("Check overflow failed (9) with:\n s=%s\n x=", s); + mpfr_dump (x); + exit (1); + } /* Check underflow */ mpfr_strtofr (x, "123456789E-2147483646", &s, 0, MPFR_RNDN); @@ -969,6 +1003,13 @@ mpfr_dump (x); exit (1); } + mpfr_strtofr (x, "1@-2305843009213693952", &s, 16, MPFR_RNDN); + if (s[0] != 0 || !MPFR_IS_ZERO (x) || !MPFR_IS_POS (x) ) + { + printf ("Check underflow failed (8) with:\n s='%s'\n x=", s); + mpfr_dump (x); + exit (1); + } mpfr_clear (x); } @@ -1238,12 +1279,225 @@ int inex; emin = mpfr_get_emin (); - mpfr_set_emin (-1073); - mpfr_set_emin (emin); mpfr_init2 (z, 53); + mpfr_set_emin (-1073); + /* with emin = -1073, the smallest positive number is 0.5*2^emin = 2^(-1074), + thus str should be rounded to 2^(-1074) with inex > 0 */ + inex = mpfr_strtofr (z, str, NULL, 10, MPFR_RNDN); + MPFR_ASSERTN(inex > 0 && mpfr_cmp_ui_2exp (z, 1, -1074) == 0); + mpfr_set_emin (-1074); + /* with emin = -1074, str should be rounded to 2^(-1075) with inex < 0 */ inex = mpfr_strtofr (z, str, NULL, 10, MPFR_RNDN); MPFR_ASSERTN(inex < 0 && mpfr_cmp_ui_2exp (z, 1, -1075) == 0); mpfr_clear (z); + mpfr_set_emin (emin); +} + +/* r13299 fails with 8-bit limbs (micro-gmp/8). */ +static void +bug20181127 (void) +{ + char s[] = "9.Z6nrLVSMG1bDcCF2ONJdX@-183295525"; /* base 58 */ + mpfr_t x, y; + + mpfr_inits2 (6, x, y, (mpfr_ptr) 0); + mpfr_set_ui_2exp (x, 5, -1073741701, MPFR_RNDN); + mpfr_strtofr (y, s, NULL, 58, MPFR_RNDZ); + if (! mpfr_equal_p (x, y)) + { + printf ("Error in bug20181127 on %s (base 58)\n", s); + printf ("Expected x = "); + mpfr_dump (x); + printf ("Got y = "); + mpfr_dump (y); + printf ("*Note* In base 58, x ~= "); + mpfr_out_str (stdout, 58, 8, x, MPFR_RNDN); + printf ("\n"); + exit (1); + } + mpfr_clears (x, y, (mpfr_ptr) 0); +} + +static void +coverage (void) +{ +#if _MPFR_EXP_FORMAT >= 3 && _MPFR_PREC_FORMAT == 3 && MPFR_PREC_BITS == 64 + char str3[] = "1@-2112009130072406892"; + char str31[] = "1@-511170973314085831"; + mpfr_t x; + int inex; + mpfr_exp_t emin; + + /* exercise assertion cy == 0 around line 698 of strtofr.c */ + emin = mpfr_get_emin (); + mpfr_set_emin (mpfr_get_emin_min ()); + /* emin = -4611686018427387903 on a 64-bit machine */ + mpfr_init2 (x, 1); + inex = mpfr_strtofr (x, str3, NULL, 3, MPFR_RNDN); + /* 3^-2112009130072406892 is slightly larger than (2^64)^-52303988630398057 + thus we should get inex < 0 */ + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (x, 1, -52303988630398057 * 64) == 0); + inex = mpfr_strtofr (x, str31, NULL, 31, MPFR_RNDN); + /* 31^-511170973314085831 is slightly smaller than (2^64)^-39569396093273623 + thus we should get inex > 0 */ + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui_2exp (x, 1, -39569396093273623 * 64) == 0); + mpfr_clear (x); + mpfr_set_emin (emin); +#endif +} + +#define BSIZE 512 + +static void +random_tests (void) +{ + char s0[BSIZE], s1[BSIZE], s2[BSIZE+64]; + mpfr_t x0, x1, x2; + int prec, i; + + for (prec = MPFR_PREC_MIN; prec < 300; prec++) + { + mpfr_inits2 (prec, x0, x1, x2, (mpfr_ptr) 0); + + for (i = 0; i < 20; i++) + { + const char *num_to_text; + mpfr_exp_t e0, e1; + int base, j, k, neg; + int noteq = 0; + char d; + + /* We want the same exponent for x0 and its successor x1. + This is not possible for precision 1 in base 2. */ + do + base = 2 + (randlimb () % 61); + while (prec == 1 && base == 2); + + num_to_text = base <= 36 ? num_to_text36 : num_to_text62; + + do + { + /* Let's consider only positive numbers. We should test + negative numbers, but they should be built later, just + for the test itself. */ + tests_default_random (x0, 0, + mpfr_get_emin (), mpfr_get_emax (), 1); + mpfr_set (x1, x0, MPFR_RNDN); + mpfr_nextabove (x1); + mpfr_get_str (s0, &e0, base, BSIZE - 1, x0, MPFR_RNDU); + mpfr_get_str (s1, &e1, base, BSIZE - 1, x1, MPFR_RNDD); + } + while (! (mpfr_regular_p (x0) && mpfr_regular_p (x1) && e0 == e1)); + + /* 0 < x0 <= (s0,e) <= (s1,e) <= x1 with e = e0 = e1. + Let's build a string s2 randomly formed by: + - the common prefix of s0 and s1; + - some of the following digits of s0 (possibly none); + - the next digit of s0 + 1; + - some of the following digits of s1 (possibly none). + Then 0 < x0 <= (s0,e) < (s2,e) <= (s1,e) <= x1, and with + a very high probability that (s2,e) < (s1,e); noteq is + set to true in this case. + For instance, if: + s0 = 123456789 + s1 = 124012345 + one can have, e.g.: + s2 = 12345734 + s2 = 123556789 + s2 = 124 + s2 = 124012 + s2 is not taken completely randomly between s0 and s1, but it + will be built rather easily, and with the randomness of x0, + we should cover all cases, with s2 very close to s0, s2 very + close to s1, or not too close to either. */ + + neg = randlimb () & 1; + s2[0] = neg ? '-' : '+'; + s2[1] = '.'; + + for (j = 0; + MPFR_ASSERTN (s0[j] != 0 && s1[j] != 0), s0[j] == s1[j]; + j++) + s2[j+2] = s0[j]; + + /* k is the position of the first differing digit. */ + k = j; + + while (j < BSIZE - 2 && randlimb () % 8 != 0) + { + MPFR_ASSERTN (s0[j] != 0); + s2[j+2] = s0[j]; + j++; + } + + MPFR_ASSERTN (s0[j] != 0); + /* We will increment the next digit. Thus while s0[j] is the + maximum digit, go back until this is no longer the case + (the first digit after the common prefix cannot be the + maximum digit, so that we will stop early enough). */ + while ((d = s0[j]) == num_to_text[base - 1]) + j--; + noteq = j != k; + s2[j+2] = d = *(strchr (num_to_text, d) + 1); + if (d != s1[j]) + noteq = 1; + j++; + + while (j < BSIZE - 1 && randlimb () % 8 != 0) + { + MPFR_ASSERTN (s1[j] != 0); + s2[j+2] = s1[j]; + j++; + } + + sprintf (s2 + (j+2), "@%" MPFR_EXP_FSPEC "d", (mpfr_eexp_t) e0); + + while (noteq == 0 && j < BSIZE - 1) + { + if (s1[j] != '0') + noteq = 1; + j++; + } + + if (neg) + { + mpfr_neg (x0, x0, MPFR_RNDN); + mpfr_neg (x1, x1, MPFR_RNDN); + } + + if (noteq) + { + mpfr_strtofr (x2, s2, NULL, base, MPFR_RNDZ); + if (! mpfr_equal_p (x2, x0)) + { + printf ("Error in random_tests for prec=%d i=%d base=%d\n", + prec, i, base); + printf ("s0 = %s\ns1 = %s\ns2 = %s\n", s0, s1, s2); + printf ("x0 = "); + mpfr_dump (x0); + printf ("x2 = "); + mpfr_dump (x2); + exit (1); + } + } + + mpfr_strtofr (x2, s2, NULL, base, MPFR_RNDA); + if (! mpfr_equal_p (x2, x1)) + { + printf ("Error in random_tests for prec=%d i=%d base=%d\n", + prec, i, base); + printf ("s0 = %s\ns1 = %s\ns2 = %s\n", s0, s1, s2); + printf ("x1 = "); + mpfr_dump (x1); + printf ("x2 = "); + mpfr_dump (x2); + exit (1); + } + } + mpfr_clears (x0, x1, x2, (mpfr_ptr) 0); + } } int @@ -1251,6 +1505,7 @@ { tests_start_mpfr (); + coverage (); check_special(); check_reftable (); check_parse (); @@ -1262,6 +1517,8 @@ bug20120829 (); bug20161217 (); bug20170308 (); + bug20181127 (); + random_tests (); tests_end_mpfr (); return 0; diff -Nru mpfr4-4.0.1/tests/tsub1sp.c mpfr4-4.0.2/tests/tsub1sp.c --- mpfr4-4.0.1/tests/tsub1sp.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsub1sp.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sub1sp. -Copyright 2003-2018 Free Software Foundation, Inc. +Copyright 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -269,7 +269,8 @@ mpfr_div_2exp (d, d, e, MPFR_RNDN); /* b = 1 - 2^(-e) */ if (! mpfr_equal_p (a, d)) { - printf ("bug20171213_gen failed for p=%lu, e=%lu\n", p, e); + printf ("bug20171213_gen failed for p=%ld, e=%ld\n", + (long) p, (long) e); printf ("b="); mpfr_dump (b); printf ("c="); mpfr_dump (c); printf ("got a="); mpfr_dump (a); @@ -284,6 +285,111 @@ } } +static void +coverage (void) +{ + mpfr_t a, b, c, d, u; + int inex; + + /* coverage test in mpfr_sub1sp: case d=1, limb > MPFR_LIMB_HIGHBIT, RNDF + and also RNDZ */ + mpfr_init2 (a, 3 * GMP_NUMB_BITS); + mpfr_init2 (b, 3 * GMP_NUMB_BITS); + mpfr_init2 (c, 3 * GMP_NUMB_BITS); + mpfr_init2 (d, 3 * GMP_NUMB_BITS); + mpfr_init2 (u, 3 * GMP_NUMB_BITS); + mpfr_set_ui (b, 1, MPFR_RNDN); + mpfr_nextbelow (b); /* b = 1 - 2^(-p) */ + mpfr_set_prec (c, GMP_NUMB_BITS); + mpfr_set_ui_2exp (c, 1, -1, MPFR_RNDN); + mpfr_nextbelow (c); + mpfr_nextbelow (c); /* c = 1/2 - 2*2^(-GMP_NUMB_BITS-1) */ + mpfr_prec_round (c, 3 * GMP_NUMB_BITS, MPFR_RNDN); + mpfr_nextbelow (c); /* c = 1/2 - 2*2^(-GMP_NUMB_BITS-1) - 2^(-p-1) */ + /* b-c = c */ + mpfr_sub (a, b, c, MPFR_RNDF); + mpfr_sub (d, b, c, MPFR_RNDD); + mpfr_sub (u, b, c, MPFR_RNDU); + /* check a = d or u */ + MPFR_ASSERTN(mpfr_equal_p (a, d) || mpfr_equal_p (a, u)); + + /* coverage test in mpfr_sub1sp: case d=p, RNDN, sb = 0, significand of b + is even but b<>2^e, (case 1e) */ + mpfr_set_prec (a, 3 * GMP_NUMB_BITS); + mpfr_set_prec (b, 3 * GMP_NUMB_BITS); + mpfr_set_prec (c, 3 * GMP_NUMB_BITS); + mpfr_set_ui (b, 1, MPFR_RNDN); + mpfr_nextabove (b); + mpfr_nextabove (b); + mpfr_set_ui_2exp (c, 1, -3 * GMP_NUMB_BITS, MPFR_RNDN); + inex = mpfr_sub (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_equal_p (a, b)); + + mpfr_clear (a); + mpfr_clear (b); + mpfr_clear (c); + mpfr_clear (d); + mpfr_clear (u); +} + +/* bug in mpfr_sub1sp1n, made generic */ +static void +bug20180217 (mpfr_prec_t pmax) +{ + mpfr_t a, b, c; + int inex; + mpfr_prec_t p; + + for (p = MPFR_PREC_MIN; p <= pmax; p++) + { + mpfr_init2 (a, p); + mpfr_init2 (b, p); + mpfr_init2 (c, p); + mpfr_set_ui (b, 1, MPFR_RNDN); /* b = 1 */ + mpfr_set_ui_2exp (c, 1, -p-1, MPFR_RNDN); /* c = 2^(-p-1) */ + /* a - b = 1 - 2^(-p-1) and should be rounded to 1 (case 2f of + mpfr_sub1sp) */ + inex = mpfr_sub (a, b, c, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + /* check also when a=b */ + mpfr_set_ui (a, 1, MPFR_RNDN); + inex = mpfr_sub (a, a, c, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + /* and when a=c */ + mpfr_set_ui (b, 1, MPFR_RNDN); /* b = 1 */ + mpfr_set_ui_2exp (a, 1, -p-1, MPFR_RNDN); + inex = mpfr_sub (a, b, a, MPFR_RNDN); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_cmp_ui (a, 1) == 0); + mpfr_clear (a); + mpfr_clear (b); + mpfr_clear (c); + } +} + +/* bug in revision 12985 (trunk only) with tlog and + GMP_CHECK_RANDOMIZE=1534111552615050 */ +static void +bug20180813 (void) +{ + mpfr_t a, b, c; + + mpfr_init2 (a, 194); + mpfr_init2 (b, 194); + mpfr_init2 (c, 194); + mpfr_set_str_binary (b, "0.10000111101000100000010000100010110111011100110100000101100111000010101000110110010101011101101011110110001000111001000010110010111010010100011011010100001010001110000101000010101110100110001000E7"); + mpfr_set_str_binary (c, "0.10000000000000000100001111010001000000100001000101101110111001101000001011001110000101010001101100101010111011010111101100010001110010000101100101110100101000110110101000010100011100001010000101E24"); + mpfr_sub (a, b, c, MPFR_RNDN); + mpfr_set_str_binary (b, "-0.11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111E23"); + MPFR_ASSERTN(mpfr_equal_p (a, b)); + mpfr_clear (a); + mpfr_clear (b); + mpfr_clear (c); +} + int main (void) { @@ -291,6 +397,9 @@ tests_start_mpfr (); + bug20180813 (); + bug20180217 (1024); + coverage (); compare_sub_sub1sp (); test20170208 (); bug20170109 (); @@ -800,8 +909,8 @@ inexact = mpfr_sub (x, y, z, MPFR_RNDN); if (inexact >= 0 || (mpfr_cmp_ui (x, 0) != 0)) { - printf ("4*2^(emin-2) - 3*2^(emin-2) with RNDN failed for p=%lu\n", - p); + printf ("4*2^(emin-2) - 3*2^(emin-2) with RNDN failed for p=%ld\n", + (long) p); printf ("Expected inexact < 0 with x=0\n"); printf ("Got inexact=%d with x=", inexact); mpfr_dump (x); @@ -816,8 +925,8 @@ inexact = mpfr_sub (x, y, z, MPFR_RNDN); if (inexact >= 0 || (mpfr_cmp_ui (x, 0) != 0)) { - printf ("5*2^(emin-2) - 4*2^(emin-2) with RNDN failed for p=%lu\n", - p); + printf ("5*2^(emin-2) - 4*2^(emin-2) with RNDN failed for p=%ld\n", + (long) p); printf ("Expected inexact < 0 with x=0\n"); printf ("Got inexact=%d with x=", inexact); mpfr_dump (x); diff -Nru mpfr4-4.0.1/tests/tsub.c mpfr4-4.0.2/tests/tsub.c --- mpfr4-4.0.1/tests/tsub.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsub.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sub. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,17 +17,18 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" -#ifdef CHECK_EXTERNAL static int test_sub (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode) { +#ifdef CHECK_EXTERNAL int res; int ok = rnd_mode == MPFR_RNDN && mpfr_number_p (b) && mpfr_number_p (c); + if (ok) { mpfr_print_raw (b); @@ -42,10 +43,69 @@ printf ("\n"); } return res; -} -#else -#define test_sub mpfr_sub +#else /* reuse test */ + int inex; + + inex = mpfr_sub (a, b, c, rnd_mode); + + if (a != b && a != c && ! MPFR_IS_NAN (a)) + { + mpfr_t t; + int reuse_b, reuse_c, inex_r; + + reuse_b = MPFR_PREC (a) == MPFR_PREC (b); + reuse_c = MPFR_PREC (a) == MPFR_PREC (c); + + if (reuse_b || reuse_c) + mpfr_init2 (t, MPFR_PREC (a)); + + if (reuse_b) + { + mpfr_set (t, b, MPFR_RNDN); + inex_r = mpfr_sub (t, t, c, rnd_mode); + if (!(mpfr_equal_p (t, a) && SAME_SIGN (inex_r, inex))) + { + printf ("reuse of b error in b - c in %s for\n", + mpfr_print_rnd_mode (rnd_mode)); + printf ("b = "); + mpfr_dump (b); + printf ("c = "); + mpfr_dump (c); + printf ("Expected "); mpfr_dump (a); + printf (" with inex = %d\n", inex); + printf ("Got "); mpfr_dump (t); + printf (" with inex = %d\n", inex_r); + exit (1); + } + } + + if (reuse_c) + { + mpfr_set (t, c, MPFR_RNDN); + inex_r = mpfr_sub (t, b, t, rnd_mode); + if (!(mpfr_equal_p (t, a) && SAME_SIGN (inex_r, inex))) + { + printf ("reuse of c error in b - c in %s for\n", + mpfr_print_rnd_mode (rnd_mode)); + printf ("b = "); + mpfr_dump (b); + printf ("c = "); + mpfr_dump (c); + printf ("Expected "); mpfr_dump (a); + printf (" with inex = %d\n", inex); + printf ("Got "); mpfr_dump (t); + printf (" with inex = %d\n", inex_r); + exit (1); + } + } + + if (reuse_b || reuse_c) + mpfr_clear (t); + } + + return inex; #endif +} static void check_diverse (void) @@ -83,6 +143,19 @@ exit (1); } + /* yet another coverage test */ + mpfr_set_prec (x, 2); + mpfr_set_prec (y, 3); + mpfr_set_prec (z, 1); + mpfr_set_ui_2exp (y, 1, mpfr_get_emax (), MPFR_RNDZ); + /* y = (1 - 2^(-3))*2^emax */ + mpfr_set_ui_2exp (z, 1, mpfr_get_emax () - 4, MPFR_RNDZ); + /* z = 2^(emax - 4) */ + /* y - z = (1 - 2^(-3) - 2^(-4))*2^emax > (1-2^(-2))*2^emax */ + inexact = mpfr_sub (x, y, z, MPFR_RNDU); + MPFR_ASSERTN(inexact > 0); + MPFR_ASSERTN(mpfr_inf_p (x) && mpfr_sgn (x) > 0); + mpfr_set_prec (x, 288); mpfr_set_prec (y, 288); mpfr_set_prec (z, 288); @@ -940,6 +1013,152 @@ } } +static void +bug20180215 (void) +{ + mpfr_t x, y, z1, z2; + mpfr_rnd_t r[] = { MPFR_RNDN, MPFR_RNDU, MPFR_RNDA }; + int i, p; + + for (p = 3; p <= 3 + 4 * GMP_NUMB_BITS; p++) + { + mpfr_inits2 (p, x, y, z1, z2, (mpfr_ptr) 0); + mpfr_set_ui_2exp (x, 1, p - 1, MPFR_RNDN); + mpfr_nextabove (x); + mpfr_set_ui_2exp (y, 3, -1, MPFR_RNDN); + mpfr_set (z1, x, MPFR_RNDN); + mpfr_nextbelow (z1); + mpfr_nextbelow (z1); + for (i = 0; i < numberof (r); i++) + { + test_sub (z2, x, y, r[i]); + if (! mpfr_equal_p (z1, z2)) + { + printf ("Error in bug20180215 in precision %d, %s\n", + p, mpfr_print_rnd_mode (r[i])); + printf ("expected "); mpfr_dump (z1); + printf ("got "); mpfr_dump (z2); + exit (1); + } + } + mpfr_clears (x, y, z1, z2, (mpfr_ptr) 0); + } +} + +static void +bug20180216 (void) +{ + mpfr_t x, y, z1, z2; + int r, p, d, inex; + + for (p = 3; p <= 3 + 4 * GMP_NUMB_BITS; p++) + { + mpfr_inits2 (p, x, y, z1, z2, (mpfr_ptr) 0); + for (d = 1; d <= p-2; d++) + { + inex = mpfr_set_ui_2exp (z1, 1, d, MPFR_RNDN); /* z1 = 2^d */ + MPFR_ASSERTN (inex == 0); + inex = mpfr_add_ui (x, z1, 1, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + mpfr_nextabove (x); /* x = 2^d + 1 + epsilon */ + inex = mpfr_sub (y, x, z1, MPFR_RNDN); /* y = 1 + epsilon */ + MPFR_ASSERTN (inex == 0); + inex = mpfr_add (z2, y, z1, MPFR_RNDN); + MPFR_ASSERTN (inex == 0); + MPFR_ASSERTN (mpfr_equal_p (z2, x)); /* consistency check */ + RND_LOOP (r) + { + inex = test_sub (z2, x, y, (mpfr_rnd_t) r); + if (! mpfr_equal_p (z1, z2) || inex != 0) + { + printf ("Error in bug20180216 with p=%d, d=%d, %s\n", + p, d, mpfr_print_rnd_mode ((mpfr_rnd_t) r)); + printf ("expected "); mpfr_dump (z1); + printf (" with inex = 0\n"); + printf ("got "); mpfr_dump (z2); + printf (" with inex = %d\n", inex); + exit (1); + } + } + } + mpfr_clears (x, y, z1, z2, (mpfr_ptr) 0); + } +} + +/* Fails with r12281: "reuse of c error in b - c in MPFR_RNDN". */ +static void +bug20180217 (void) +{ + mpfr_t x, y, z1, z2; + int r, p, d, i, inex1, inex2; + + for (p = 3; p <= 3 + 4 * GMP_NUMB_BITS; p++) + { + mpfr_inits2 (p, x, y, z1, z2, (mpfr_ptr) 0); + for (d = p; d <= p+4; d++) + { + mpfr_set_ui (x, 1, MPFR_RNDN); + mpfr_set_ui_2exp (y, 1, -d, MPFR_RNDN); + for (i = 0; i < 3; i++) + { + RND_LOOP_NO_RNDF (r) + { + mpfr_set (z1, x, MPFR_RNDN); + if (d == p) + { + mpfr_nextbelow (z1); + if (i == 0) + inex1 = 0; + else if (r == MPFR_RNDD || r == MPFR_RNDZ || + (r == MPFR_RNDN && i > 1)) + { + mpfr_nextbelow (z1); + inex1 = -1; + } + else + inex1 = 1; + } + else if (r == MPFR_RNDD || r == MPFR_RNDZ || + (r == MPFR_RNDN && d == p+1 && i > 0)) + { + mpfr_nextbelow (z1); + inex1 = -1; + } + else + inex1 = 1; + inex2 = test_sub (z2, x, y, (mpfr_rnd_t) r); + if (!(mpfr_equal_p (z1, z2) && SAME_SIGN (inex1, inex2))) + { + printf ("Error in bug20180217 with " + "p=%d, d=%d, i=%d, %s\n", p, d, i, + mpfr_print_rnd_mode ((mpfr_rnd_t) r)); + printf ("x = "); + mpfr_dump (x); + printf ("y = "); + mpfr_dump (y); + printf ("Expected "); mpfr_dump (z1); + printf (" with inex = %d\n", inex1); + printf ("Got "); mpfr_dump (z2); + printf (" with inex = %d\n", inex2); + exit (1); + } + } + if (i == 0) + mpfr_nextabove (y); + else + { + if (p < 6) + break; + mpfr_nextbelow (y); + mpfr_mul_ui (y, y, 25, MPFR_RNDD); + mpfr_div_2ui (y, y, 4, MPFR_RNDN); + } + } + } + mpfr_clears (x, y, z1, z2, (mpfr_ptr) 0); + } +} + #define TEST_FUNCTION test_sub #define TWO_ARGS #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) @@ -962,6 +1181,9 @@ check_inexact (); check_max_almosteven (); bug_ddefour (); + bug20180215 (); + bug20180216 (); + bug20180217 (); for (p=2; p<200; p++) for (i=0; i<50; i++) check_two_sum (p); diff -Nru mpfr4-4.0.1/tests/tsub_d.c mpfr4-4.0.2/tests/tsub_d.c --- mpfr4-4.0.1/tests/tsub_d.c 2018-02-02 12:32:02.000000000 +0000 +++ mpfr4-4.0.2/tests/tsub_d.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sub_d -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tsubnormal.c mpfr4-4.0.2/tests/tsubnormal.c --- mpfr4-4.0.1/tests/tsubnormal.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsubnormal.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_subnormalize. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tsub_ui.c mpfr4-4.0.2/tests/tsub_ui.c --- mpfr4-4.0.1/tests/tsub_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsub_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_sub_ui -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/tsum.c mpfr4-4.0.2/tests/tsum.c --- mpfr4-4.0.1/tests/tsum.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tsum.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tsum -- test file for the list summation function -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tswap.c mpfr4-4.0.2/tests/tswap.c --- mpfr4-4.0.1/tests/tswap.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tswap.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_swap. -Copyright 2000-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2000-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/ttan.c mpfr4-4.0.2/tests/ttan.c --- mpfr4-4.0.1/tests/ttan.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/ttan.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_tan. -Copyright 2001-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 2001-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -111,6 +111,27 @@ mpfr_clear (z); } +static void +coverage (void) +{ + mpfr_t x, y; + int inex; + mpfr_exp_t emax; + + /* exercise mpfr_round_near_x when rounding gives an overflow */ + emax = mpfr_get_emax (); + mpfr_set_emax (-2); + mpfr_init2 (x, 2); + mpfr_init2 (y, 2); + mpfr_setmax (x, mpfr_get_emax ()); + inex = mpfr_tan (y, x, MPFR_RNDA); + MPFR_ASSERTN(inex > 0); + MPFR_ASSERTN(mpfr_inf_p (y) && mpfr_signbit (y) == 0); + mpfr_clear (x); + mpfr_clear (y); + mpfr_set_emax (emax); +} + int main (int argc, char *argv[]) { @@ -121,6 +142,7 @@ tests_start_mpfr (); + coverage (); bug20171218 (); check_nans (); diff -Nru mpfr4-4.0.1/tests/ttanh.c mpfr4-4.0.2/tests/ttanh.c --- mpfr4-4.0.1/tests/ttanh.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/ttanh.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_tanh. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/ttrunc.c mpfr4-4.0.2/tests/ttrunc.c --- mpfr4-4.0.1/tests/ttrunc.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/ttrunc.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_trunc, mpfr_ceil, mpfr_floor. -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tui_div.c mpfr4-4.0.2/tests/tui_div.c --- mpfr4-4.0.1/tests/tui_div.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tui_div.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_ui_div. -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tui_pow.c mpfr4-4.0.2/tests/tui_pow.c --- mpfr4-4.0.1/tests/tui_pow.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tui_pow.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_ui_pow and mpfr_ui_pow_ui. -Copyright 2001-2018 Free Software Foundation, Inc. +Copyright 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tui_sub.c mpfr4-4.0.2/tests/tui_sub.c --- mpfr4-4.0.1/tests/tui_sub.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tui_sub.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_ui_sub. -Copyright 2000-2018 Free Software Foundation, Inc. +Copyright 2000-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tests/turandom.c mpfr4-4.0.2/tests/turandom.c --- mpfr4-4.0.1/tests/turandom.c 2018-02-02 12:32:02.000000000 +0000 +++ mpfr4-4.0.2/tests/turandom.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_urandom -Copyright 1999-2004, 2006-2018 Free Software Foundation, Inc. +Copyright 1999-2004, 2006-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tvalist.c mpfr4-4.0.2/tests/tvalist.c --- mpfr4-4.0.1/tests/tvalist.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tvalist.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for multiple mpfr.h inclusion and va_list related functions -Copyright 2011-2018 Free Software Foundation, Inc. +Copyright 2011-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #if HAVE_STDARG diff -Nru mpfr4-4.0.1/tests/tversion.c mpfr4-4.0.2/tests/tversion.c --- mpfr4-4.0.1/tests/tversion.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tversion.c 2019-01-27 18:30:16.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_version. -Copyright 2004-2018 Free Software Foundation, Inc. +Copyright 2004-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,16 +17,30 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* Needed due to the inclusion of mpfr-intmax.h */ #ifdef HAVE_CONFIG_H # include "config.h" #endif +#include + #include "mpfr-intmax.h" #include "mpfr-test.h" +/* Warning about the usage of printf/puts below: + * + * - If a macro expansion is used, it must not appear in the first + * argument of printf (format string), as we do not know whether + * the expanded string contains a '%' character. + * + * - If a #if preprocessor directive is used in an argument, parentheses + * must be put around the function name, in case this function is also + * implemented as a macro (#if does not work in macro arguments). + */ + int main (void) { @@ -39,9 +53,21 @@ tests_start_mpfr (); + errno = 0; + /*********************** MPFR version and patches ************************/ - printf ("[tversion] MPFR %s\n", MPFR_VERSION_STRING); + /* The printf failure test was added because of an output issue under Wine, + * eventually not related to this output; this test is kept just in case... + * Details: + * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914822 + * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914949 + */ + if (printf ("[tversion] MPFR %s\n", MPFR_VERSION_STRING) < 0) + { + perror ("tversion (first printf)"); + err = 1; + } if (strcmp (mpfr_get_patches (), "") != 0) printf ("[tversion] MPFR patches: %s\n", mpfr_get_patches ()); @@ -79,7 +105,7 @@ src/mpfr-impl.h; they may have an influcence on how MPFR is compiled. */ #if defined(__STDC__) || defined(__STDC_VERSION__) - printf ("[tversion] C standard: __STDC__ = " + (puts) ("[tversion] C standard: __STDC__ = " #if defined(__STDC__) MAKE_STR(__STDC__) #else @@ -91,21 +117,21 @@ #else "undef" #endif - "\n"); + ); #endif #if defined(__GNUC__) - printf ("[tversion] __GNUC__ = " MAKE_STR(__GNUC__) ", __GNUC_MINOR__ = " + (puts) ("[tversion] __GNUC__ = " MAKE_STR(__GNUC__) ", __GNUC_MINOR__ = " #if defined(__GNUC_MINOR__) MAKE_STR(__GNUC_MINOR__) #else "undef" #endif - "\n"); + ); #endif #if defined(__ICC) || defined(__INTEL_COMPILER) - printf ("[tversion] Intel compiler: __ICC = " + (puts) ("[tversion] Intel compiler: __ICC = " #if defined(__ICC) MAKE_STR(__ICC) #else @@ -117,11 +143,11 @@ #else "undef" #endif - "\n"); + ); #endif #if defined(_WIN32) || defined(_MSC_VER) - printf ("[tversion] MS Windows: _WIN32 = " + (puts) ("[tversion] MS Windows: _WIN32 = " #if defined(_WIN32) MAKE_STR(_WIN32) #else @@ -133,17 +159,17 @@ #else "undef" #endif - "\n"); + ); #endif #if defined(__GLIBC__) - printf ("[tversion] __GLIBC__ = " MAKE_STR(__GLIBC__) ", __GLIBC_MINOR__ = " + (puts) ("[tversion] __GLIBC__ = " MAKE_STR(__GLIBC__) ", __GLIBC_MINOR__ = " #if defined(__GLIBC_MINOR__) MAKE_STR(__GLIBC_MINOR__) #else "undef" #endif - "\n"); + ); #endif /******************* GMP version and build information *******************/ @@ -179,7 +205,7 @@ and Unix is LP64). MPFR_WIN_THREAD_SAFE_DLL is directly set up from __GMP_LIBGMP_DLL; that is why it is output here. */ - printf ("[tversion] WinDLL: __GMP_LIBGMP_DLL = " + (puts) ("[tversion] WinDLL: __GMP_LIBGMP_DLL = " #if defined(__GMP_LIBGMP_DLL) MAKE_STR(__GMP_LIBGMP_DLL) #else @@ -191,7 +217,7 @@ #else "undef" #endif - "\n"); + ); /********************* MPFR configuration parameters *********************/ @@ -242,14 +268,40 @@ err = 1; } - printf ("[tversion] TLS = %s, float128 = %s, decimal = %s," - " GMP internals = %s\n", - mpfr_buildopt_tls_p () ? "yes" : "no", - mpfr_buildopt_float128_p () ? "yes" : "no", - mpfr_buildopt_decimal_p () ? "yes" : "no", - mpfr_buildopt_gmpinternals_p () ? "yes" : "no"); + if ( +#ifdef MPFR_WANT_SHARED_CACHE + ! +#endif + mpfr_buildopt_sharedcache_p ()) + { + printf ("ERROR! mpfr_buildopt_sharedcache_p() and macros" + " do not match!\n"); + err = 1; + } - printf ("[tversion] intmax_t = " + (printf) ("[tversion] TLS = %s, float128 = %s, decimal = %s," + " GMP internals = %s\n", + mpfr_buildopt_tls_p () ? "yes" : "no", + mpfr_buildopt_float128_p () ? "yes" : "no", + mpfr_buildopt_decimal_p () ? "yes (" +#ifdef DPD_FORMAT + "DPD" +#else + "BID" +#endif + ")" : "no", + mpfr_buildopt_gmpinternals_p () ? "yes" : "no"); + +#ifdef MPFR_THREAD_LOCK_METHOD +# define LOCK_METHOD " (lock method: " MPFR_THREAD_LOCK_METHOD ")" +#else +# define LOCK_METHOD "" +#endif + + (printf) ("[tversion] Shared cache = %s\n", + mpfr_buildopt_sharedcache_p () ? "yes" LOCK_METHOD : "no"); + + (puts) ("[tversion] intmax_t = " #if defined(_MPFR_H_HAVE_INTMAX_T) "yes" #else @@ -267,9 +319,9 @@ #else "no" #endif - "\n"); + ); - printf ("[tversion] gmp_printf: hhd = " + (puts) ("[tversion] gmp_printf: hhd = " #if defined(NPRINTF_HH) "no" #else @@ -303,15 +355,15 @@ #else "?" #endif - "\n"); + ); - printf ("[tversion] _mulx_u64 = " + (puts) ("[tversion] _mulx_u64 = " #if defined(HAVE_MULX_U64) - "yes" + "yes" #else - "no" + "no" #endif - "\n"); + ); if (strcmp (mpfr_buildopt_tune_case (), MPFR_TUNE_CASE) != 0) { @@ -325,6 +377,16 @@ /**************************** ABI information ****************************/ + (printf) ("[tversion] sizeof(long) = %ld" +#if defined(_MPFR_H_HAVE_INTMAX_T) + ", sizeof(intmax_t) = %ld" +#endif + "\n", (long) sizeof(long) +#if defined(_MPFR_H_HAVE_INTMAX_T) + , (long) sizeof(intmax_t) +#endif + ); + if (mp_bits_per_limb != GMP_NUMB_BITS) { printf ("ERROR! mp_bits_per_limb != GMP_NUMB_BITS (%ld vs %ld)\n", @@ -368,6 +430,14 @@ printf ("[tversion] Max exponent" RANGE, (mpfr_eexp_t) MPFR_EMIN_MIN, (mpfr_eexp_t) MPFR_EMAX_MAX); + (puts) ("[tversion] Generic ABI code: " +#if defined(MPFR_GENERIC_ABI) + "yes" +#else + "no" +#endif + ); + /************************** Runtime information **************************/ if (locale != NULL) @@ -382,6 +452,12 @@ /*************************************************************************/ + if (errno != 0) + { + perror ("tversion"); + err = 1; + } + tests_end_mpfr (); return err; diff -Nru mpfr4-4.0.1/tests/ty0.c mpfr4-4.0.2/tests/ty0.c --- mpfr4-4.0.1/tests/ty0.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/ty0.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* ty0 -- test file for the Bessel function of second kind (order 0) -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/ty1.c mpfr4-4.0.2/tests/ty1.c --- mpfr4-4.0.1/tests/ty1.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/ty1.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* ty1 -- test file for the Bessel function of second kind (order 1) -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tyn.c mpfr4-4.0.2/tests/tyn.c --- mpfr4-4.0.1/tests/tyn.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tyn.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tyn -- test file for the Bessel function of second kind -Copyright 2007-2018 Free Software Foundation, Inc. +Copyright 2007-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/tests/tzeta.c mpfr4-4.0.2/tests/tzeta.c --- mpfr4-4.0.1/tests/tzeta.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tzeta.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* tzeta -- test file for the Riemann Zeta function -Copyright 2003-2018 Free Software Foundation, Inc. +Copyright 2003-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" @@ -26,10 +26,13 @@ test1 (void) { mpfr_t x, y; + int inex; mpfr_init2 (x, 32); mpfr_init2 (y, 42); + mpfr_clear_flags (); + mpfr_set_str_binary (x, "1.1111111101000111011010010010100e-1"); mpfr_zeta (y, x, MPFR_RNDN); /* shouldn't crash */ @@ -91,18 +94,29 @@ mpfr_zeta (y, x, MPFR_RNDN); MPFR_ASSERTN(mpfr_cmp_ui_2exp (y, 3, -1) == 0); - mpfr_set_nan (x); - mpfr_zeta (y, x, MPFR_RNDN); - MPFR_ASSERTN(mpfr_nan_p (y)); + /* yet another coverage test (case beta <= 0.0) */ + mpfr_set_prec (x, 10); + mpfr_set_ui (x, 23, MPFR_RNDN); + mpfr_set_prec (y, 15); + inex = mpfr_zeta (y, x, MPFR_RNDN); + MPFR_ASSERTN(inex < 0); + MPFR_ASSERTN(mpfr_cmp_ui (y, 1) == 0); mpfr_set_inf (x, 1); mpfr_zeta (y, x, MPFR_RNDN); MPFR_ASSERTN(mpfr_cmp_ui (y, 1) == 0); + /* Since some tests don't really check that the result is not NaN... */ + MPFR_ASSERTN (! mpfr_nanflag_p ()); + mpfr_set_inf (x, -1); mpfr_zeta (y, x, MPFR_RNDN); MPFR_ASSERTN(mpfr_nan_p (y)); + mpfr_set_nan (x); + mpfr_zeta (y, x, MPFR_RNDN); + MPFR_ASSERTN(mpfr_nan_p (y)); + mpfr_clear (x); mpfr_clear (y); } diff -Nru mpfr4-4.0.1/tests/tzeta_ui.c mpfr4-4.0.2/tests/tzeta_ui.c --- mpfr4-4.0.1/tests/tzeta_ui.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tests/tzeta_ui.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_zeta_ui. -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "mpfr-test.h" diff -Nru mpfr4-4.0.1/TODO mpfr4-4.0.2/TODO --- mpfr4-4.0.1/TODO 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/TODO 2019-01-07 13:53:20.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright 1999-2018 Free Software Foundation, Inc. +Copyright 1999-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. Table of contents: @@ -59,7 +59,7 @@ - export mpfr_overflow and mpfr_underflow as public functions - many functions currently taking into account the precision of the *input* - variable to set the initial working precison (acosh, asinh, cosh, ...). + variable to set the initial working precision (acosh, asinh, cosh, ...). This is nonsense since the "average" working precision should only depend on the precision of the *output* variable (and maybe on the *value* of the input in case of cancellation). @@ -188,7 +188,7 @@ + arcu (5.3.10.15): arctan2(y,x) u / (2 pi); + rad_to_cycle, cycle_to_rad, cycle_to_cycle (5.3.11.{1..3}). - From GSL, missing special functions (if useful in MPFR): - (cf http://www.gnu.org/software/gsl/manual/gsl-ref.html#Special-Functions) + (cf https://www.gnu.org/software/gsl/manual/gsl-ref.html#Special-Functions) + The Airy functions Ai(x) and Bi(x) defined by the integral representations: * Ai(x) = (1/\pi) \int_0^\infty \cos((1/3) t^3 + xt) dt * Bi(x) = (1/\pi) \int_0^\infty (e^(-(1/3) t^3) + \sin((1/3) t^3 + xt)) dt diff -Nru mpfr4-4.0.1/tools/bench/benchtime.h mpfr4-4.0.2/tools/bench/benchtime.h --- mpfr4-4.0.1/tools/bench/benchtime.h 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tools/bench/benchtime.h 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* benchtime.h -- header file for MPFRbench -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ diff -Nru mpfr4-4.0.1/tools/bench/Makefile.am mpfr4-4.0.2/tools/bench/Makefile.am --- mpfr4-4.0.1/tools/bench/Makefile.am 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tools/bench/Makefile.am 2019-01-01 21:02:47.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright 2000-2018 Free Software Foundation, Inc. +# Copyright 2000-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff -Nru mpfr4-4.0.1/tools/bench/Makefile.in mpfr4-4.0.2/tools/bench/Makefile.in --- mpfr4-4.0.1/tools/bench/Makefile.in 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/tools/bench/Makefile.in 2019-01-31 20:43:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright 2000-2018 Free Software Foundation, Inc. +# Copyright 2000-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -134,7 +134,8 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/mpfrbench.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -338,8 +339,8 @@ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -361,7 +362,13 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfrbench.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfrbench.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -442,7 +449,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -511,7 +521,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/mpfrbench.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -557,7 +567,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/mpfrbench.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -578,18 +588,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libtool cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libtool cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am .PRECIOUS: Makefile diff -Nru mpfr4-4.0.1/tools/bench/mpfrbench.c mpfr4-4.0.2/tools/bench/mpfrbench.c --- mpfr4-4.0.1/tools/bench/mpfrbench.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tools/bench/mpfrbench.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* mpfrbench.c -- compute the timings for the MPFRbench benchmark -Copyright 1999, 2001-2018 Free Software Foundation, Inc. +Copyright 1999, 2001-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tools/ck-clz_tab mpfr4-4.0.2/tools/ck-clz_tab --- mpfr4-4.0.1/tools/ck-clz_tab 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tools/ck-clz_tab 2019-01-01 21:02:47.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2016-2018 Free Software Foundation, Inc. +# Copyright 2016-2019 Free Software Foundation, Inc. # This script is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff -Nru mpfr4-4.0.1/tools/ck-copyright-notice mpfr4-4.0.2/tools/ck-copyright-notice --- mpfr4-4.0.1/tools/ck-copyright-notice 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tools/ck-copyright-notice 2019-01-01 21:02:47.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008-2018 Free Software Foundation, Inc. +# Copyright 2008-2019 Free Software Foundation, Inc. # This script is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff -Nru mpfr4-4.0.1/tools/ck-news mpfr4-4.0.2/tools/ck-news --- mpfr4-4.0.1/tools/ck-news 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tools/ck-news 2019-01-01 21:02:47.000000000 +0000 @@ -3,7 +3,7 @@ # Note: this script must not be used to build MPFR due to the # dependency on perl, but this is OK for "make dist". -# Copyright 2016-2018 Free Software Foundation, Inc. +# Copyright 2016-2019 Free Software Foundation, Inc. # This script is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff -Nru mpfr4-4.0.1/tools/ck-version-info mpfr4-4.0.2/tools/ck-version-info --- mpfr4-4.0.1/tools/ck-version-info 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tools/ck-version-info 2019-01-01 21:02:47.000000000 +0000 @@ -3,7 +3,7 @@ # Note: this script must not be used to build MPFR due to the # dependency on perl, but this is OK for "make dist". -# Copyright 2010-2018 Free Software Foundation, Inc. +# Copyright 2010-2019 Free Software Foundation, Inc. # This script is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff -Nru mpfr4-4.0.1/tools/get_patches.sh mpfr4-4.0.2/tools/get_patches.sh --- mpfr4-4.0.1/tools/get_patches.sh 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tools/get_patches.sh 2019-01-07 13:53:20.000000000 +0000 @@ -3,7 +3,7 @@ cat < diff -Nru mpfr4-4.0.1/tune/Makefile.am mpfr4-4.0.2/tune/Makefile.am --- mpfr4-4.0.1/tune/Makefile.am 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tune/Makefile.am 2019-01-01 21:02:47.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Free Software Foundation, Inc. +# Copyright 2010-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff -Nru mpfr4-4.0.1/tune/Makefile.in mpfr4-4.0.2/tune/Makefile.in --- mpfr4-4.0.1/tune/Makefile.in 2018-02-07 12:57:47.000000000 +0000 +++ mpfr4-4.0.2/tune/Makefile.in 2019-01-31 20:43:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright 2010-2018 Free Software Foundation, Inc. +# Copyright 2010-2019 Free Software Foundation, Inc. # This Makefile.am is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -152,7 +152,9 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/bidimensional_sample.Po \ + ./$(DEPDIR)/speed.Po ./$(DEPDIR)/tuneup.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -363,8 +365,8 @@ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -394,9 +396,15 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bidimensional_sample.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speed.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tuneup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bidimensional_sample.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speed.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tuneup.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -477,7 +485,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -547,7 +558,9 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/bidimensional_sample.Po + -rm -f ./$(DEPDIR)/speed.Po + -rm -f ./$(DEPDIR)/tuneup.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -593,7 +606,9 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/bidimensional_sample.Po + -rm -f ./$(DEPDIR)/speed.Po + -rm -f ./$(DEPDIR)/tuneup.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -614,18 +629,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libtool cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libtool cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am .PRECIOUS: Makefile diff -Nru mpfr4-4.0.1/tune/speed.c mpfr4-4.0.2/tune/speed.c --- mpfr4-4.0.1/tune/speed.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tune/speed.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Tune various threshold of MPFR -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/tune/tuneup.c mpfr4-4.0.2/tune/tuneup.c --- mpfr4-4.0.1/tune/tuneup.c 2018-01-09 12:30:58.000000000 +0000 +++ mpfr4-4.0.2/tune/tuneup.c 2019-01-07 13:53:20.000000000 +0000 @@ -1,6 +1,6 @@ /* Tune various threshold of MPFR -Copyright 2005-2018 Free Software Foundation, Inc. +Copyright 2005-2019 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see -http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., +https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff -Nru mpfr4-4.0.1/VERSION mpfr4-4.0.2/VERSION --- mpfr4-4.0.1/VERSION 2018-02-07 12:50:31.000000000 +0000 +++ mpfr4-4.0.2/VERSION 2019-01-31 20:29:48.000000000 +0000 @@ -1 +1 @@ -4.0.1 +4.0.2