summaryrefslogtreecommitdiff
path: root/Build/source/libs/mpfr
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-03-07 13:18:57 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-03-07 13:18:57 +0000
commitf7fd80054d9fb1620b6c65db276325f35d86f7ee (patch)
treecc7052c8a052eb2e0981b9c47f9b3902afd51561 /Build/source/libs/mpfr
parentab4c67522df470475142ea5802c2951d0319ccac (diff)
mpfr 3.1.4
git-svn-id: svn://tug.org/texlive/trunk@39960 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/mpfr')
-rw-r--r--Build/source/libs/mpfr/ChangeLog5
-rw-r--r--Build/source/libs/mpfr/README4
-rwxr-xr-xBuild/source/libs/mpfr/configure20
-rw-r--r--Build/source/libs/mpfr/mpfr-PATCHES/ChangeLog10
-rw-r--r--Build/source/libs/mpfr/mpfr-PATCHES/TL-Changes2
-rw-r--r--Build/source/libs/mpfr/mpfr-PATCHES/patch-01-TL20
-rw-r--r--Build/source/libs/mpfr/mpfr-src/BUGS4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/ChangeLog1592
-rw-r--r--Build/source/libs/mpfr/mpfr-src/INSTALL159
-rw-r--r--Build/source/libs/mpfr/mpfr-src/Makefile.am7
-rw-r--r--Build/source/libs/mpfr/mpfr-src/NEWS9
-rw-r--r--Build/source/libs/mpfr/mpfr-src/README4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/TODO4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/VERSION2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/acinclude.m451
-rw-r--r--Build/source/libs/mpfr/mpfr-src/configure.ac41
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/Makefile.am4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/abort_prec_max.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/acos.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/acosh.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/add.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/add1.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/add1sp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/add_d.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/add_ui.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/agm.c9
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/ai.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/amd/amdfam10/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/amd/athlon/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/amd/k8/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/arm/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/asin.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/asinh.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/atan.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/atan2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/atanh.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/bernoulli.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/buildopt.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cache.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cbrt.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/check.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/clear.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/clears.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cmp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cmp2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cmp_abs.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cmp_d.c13
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c13
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cmp_si.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cmp_ui.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/comparisons.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/const_catalan.c12
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/const_euler.c12
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/const_log2.c16
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/const_pi.c16
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/constant.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/copysign.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cos.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cosh.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/cot.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/coth.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/csc.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/csch.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/d_div.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/d_sub.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/digamma.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/dim.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/div.c38
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/div_2exp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/div_2si.c9
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/div_2ui.c10
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/div_d.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/div_ui.c7
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/dump.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/eint.c6
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/eq.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/erf.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/erfc.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/exceptions.c16
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/exp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/exp10.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/exp2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/exp3.c6
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/exp_2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/expm1.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/extract.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/factorial.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_intmax.c14
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_s.h14
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_sint.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_slong.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_sshort.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_u.h14
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_uint.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_uintmax.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_ulong.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_ushort.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fma.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fms.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/frac.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/free_cache.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/frexp.c39
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/gamma.c9
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/gammaonethird.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/gen_inverse.h4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/generic/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_d.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_d64.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_exp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_f.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_flt.c7
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_ld.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_patches.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_si.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_sj.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_str.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_ui.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_uj.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_z.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_z_exp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/gmp_op.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/grandom.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/hppa/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/hypot.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/ia64/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/ieee_floats.h4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/init.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/init2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/inits.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/inits2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/inp_str.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/int_ceil_log2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/isinf.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/isinteger.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/isnan.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/isnum.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/isqrt.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/isregular.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/iszero.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/jn.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c10
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/li2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/lngamma.c17
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/log.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/log10.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/log1p.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/log2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/logging.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/min_prec.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/minmax.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/modf.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mp_clz_tab.c2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mparam_h.in2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mpfr-gmp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mpfr-gmp.h6
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mpfr-impl.h107
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mpfr-intmax.h4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mpfr-longlong.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mpfr-thread.h13
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mpfr.h8
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mpn_exp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mul.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mul_2exp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mul_2si.c9
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mul_2ui.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mul_d.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mul_ui.c7
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mulders.c11
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/neg.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/next.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/out_str.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/pow.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/pow_si.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/pow_ui.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/pow_z.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/powerof2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/powerpc32/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/powerpc64/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/print_raw.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/print_rnd_mode.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/printf.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/rec_sqrt.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/reldiff.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/rem1.c46
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/rint.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/root.c194
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/round_near_x.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/round_p.c11
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/round_prec.c100
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/round_raw_generic.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/scale2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sec.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sech.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_d.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_d64.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_dfl_prec.c13
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_exp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_f.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_flt.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_inf.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_ld.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_nan.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_prc_raw.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_prec.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_q.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_rnd.c14
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_si.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_si_2exp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_sj.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_str.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_str_raw.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_ui.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_ui_2exp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_uj.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_z.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_z_exp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_zero.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/setmax.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/setmin.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/setsign.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sgn.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/si_op.c16
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/signbit.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sin.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sin_cos.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sinh.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sinh_cosh.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sparc64/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sqr.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sqrt.c7
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sqrt_ui.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/stack_interface.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/strtofr.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sub.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sub1.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sub1sp.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sub_d.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sub_ui.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/subnormal.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/sum.c41
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/swap.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/tan.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/tanh.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/uceil_exp2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/uceil_log2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/ufloor_log2.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/ui_div.c7
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/ui_pow.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/ui_pow_ui.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/ui_sub.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/urandom.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/urandomb.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/vasprintf.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/version.c6
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/volatile.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/x86/core2/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/x86/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/x86_64/core2/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/x86_64/pentium4/mparam.h2
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/yn.c4
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/zeta.c35
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/zeta_ui.c4
-rw-r--r--Build/source/libs/mpfr/version.ac2
265 files changed, 2801 insertions, 887 deletions
diff --git a/Build/source/libs/mpfr/ChangeLog b/Build/source/libs/mpfr/ChangeLog
index a34b6f8beee..f259b6631ef 100644
--- a/Build/source/libs/mpfr/ChangeLog
+++ b/Build/source/libs/mpfr/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-07 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import mpfr-3.1.4.
+ * version.ac: Adjust.
+
2016-02-22 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* Makefile.am, configure.ac: New convention.
diff --git a/Build/source/libs/mpfr/README b/Build/source/libs/mpfr/README
index d648558cb50..cec7e17441d 100644
--- a/Build/source/libs/mpfr/README
+++ b/Build/source/libs/mpfr/README
@@ -2,10 +2,10 @@
========================================
This directory libs/mpfr/ uses a proxy Makefile.am to build the GNU MPFR
-library 'libmpfr' from the unmodified source tree in libs/mpfr/mpfr-x.y.z/,
+library 'libmpfr' from the unmodified source tree in libs/mpfr/mpfr-src/,
bypassing the original build system.
-As far as applicable, the tests in libs/mpfr/mpfr-x.y.z/configure have been
+As far as applicable, the tests in libs/mpfr/mpfr-src/configure have been
translated into equivalent test in libs/mpfr/configure.ac.
=============================
diff --git a/Build/source/libs/mpfr/configure b/Build/source/libs/mpfr/configure
index 3741edaf57e..dc944425062 100755
--- a/Build/source/libs/mpfr/configure
+++ b/Build/source/libs/mpfr/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for mpfr (TeX Live) 3.1.3.
+# Generated by GNU Autoconf 2.69 for mpfr (TeX Live) 3.1.4.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='mpfr (TeX Live)'
PACKAGE_TARNAME='mpfr--tex-live-'
-PACKAGE_VERSION='3.1.3'
-PACKAGE_STRING='mpfr (TeX Live) 3.1.3'
+PACKAGE_VERSION='3.1.4'
+PACKAGE_STRING='mpfr (TeX Live) 3.1.4'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1295,7 +1295,7 @@ if test "$ac_init_help" = "long"; then
# 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 (TeX Live) 3.1.3 to adapt to many kinds of systems.
+\`configure' configures mpfr (TeX Live) 3.1.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1365,7 +1365,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mpfr (TeX Live) 3.1.3:";;
+ short | recursive ) echo "Configuration of mpfr (TeX Live) 3.1.4:";;
esac
cat <<\_ACEOF
@@ -1469,7 +1469,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-mpfr (TeX Live) configure 3.1.3
+mpfr (TeX Live) configure 3.1.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1938,7 +1938,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by mpfr (TeX Live) $as_me 3.1.3, which was
+It was created by mpfr (TeX Live) $as_me 3.1.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3861,7 +3861,7 @@ fi
# Define the identity of the package.
PACKAGE='mpfr--tex-live-'
- VERSION='3.1.3'
+ VERSION='3.1.4'
cat >>confdefs.h <<_ACEOF
@@ -7607,7 +7607,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by mpfr (TeX Live) $as_me 3.1.3, which was
+This file was extended by mpfr (TeX Live) $as_me 3.1.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7677,7 +7677,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-mpfr (TeX Live) config.status 3.1.3
+mpfr (TeX Live) config.status 3.1.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/libs/mpfr/mpfr-PATCHES/ChangeLog b/Build/source/libs/mpfr/mpfr-PATCHES/ChangeLog
index b9cb224857a..f9c6aab6f19 100644
--- a/Build/source/libs/mpfr/mpfr-PATCHES/ChangeLog
+++ b/Build/source/libs/mpfr/mpfr-PATCHES/ChangeLog
@@ -1,9 +1,15 @@
- Imported mpfr-3.1.3 source tree from:
+2016-03-07 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Imported mpfr-3.1.4 source tree from:
http://ftp.gnu.org/gnu/mpfr/
+ * patch-01-TL: Adapted.
+
+2015-06-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+ Imported mpfr-3.1.3 source tree from:
+ http://ftp.gnu.org/gnu/mpfr/
* patch-01-TL: Adapted.
2014-05-23 Peter Breitenlohner <peb@mppmu.mpg.de>
* patch-01-TL (new): Modifications for the TeX Live build system.
-
diff --git a/Build/source/libs/mpfr/mpfr-PATCHES/TL-Changes b/Build/source/libs/mpfr/mpfr-PATCHES/TL-Changes
index 19f36a2f82c..8af892e8d3d 100644
--- a/Build/source/libs/mpfr/mpfr-PATCHES/TL-Changes
+++ b/Build/source/libs/mpfr/mpfr-PATCHES/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the mpfr-3.1.3/ tree as obtained from:
+Changes applied to the mpfr-3.1.4/ tree as obtained from:
http://ftp.gnu.org/gnu/mpfr/
Removed:
diff --git a/Build/source/libs/mpfr/mpfr-PATCHES/patch-01-TL b/Build/source/libs/mpfr/mpfr-PATCHES/patch-01-TL
index 398e3db9204..86dfa83985f 100644
--- a/Build/source/libs/mpfr/mpfr-PATCHES/patch-01-TL
+++ b/Build/source/libs/mpfr/mpfr-PATCHES/patch-01-TL
@@ -1,6 +1,6 @@
-diff -ur mpfr-3.1.3.orig/src/mparam_h.in mpfr-3.1.3/src/mparam_h.in
---- mpfr-3.1.3.orig/src/mparam_h.in 2015-06-19 21:55:10.000000000 +0200
-+++ mpfr-3.1.3/src/mparam_h.in 2015-06-20 12:11:28.000000000 +0200
+diff -ur mpfr-3.1.4.orig/src/mparam_h.in mpfr-3.1.4/src/mparam_h.in
+--- mpfr-3.1.4.orig/src/mparam_h.in Sun Mar 06 20:33:05 2016
++++ mpfr-3.1.4/src/mparam_h.in Mon Mar 07 21:52:59 2016
@@ -27,7 +27,9 @@
for example with gcc -dM -E -xc /dev/null
As of gcc 4.2, you can also use: -march=native or -mtune=native */
@@ -12,9 +12,9 @@ diff -ur mpfr-3.1.3.orig/src/mparam_h.in mpfr-3.1.3/src/mparam_h.in
#define MPFR_TUNE_CASE "src/x86_64/pentium4/mparam.h"
#include "x86_64/pentium4/mparam.h"
-diff -ur mpfr-3.1.3.orig/src/mpfr-impl.h mpfr-3.1.3/src/mpfr-impl.h
---- mpfr-3.1.3.orig/src/mpfr-impl.h 2015-06-19 21:55:09.000000000 +0200
-+++ mpfr-3.1.3/src/mpfr-impl.h 2015-06-20 12:14:04.000000000 +0200
+diff -ur mpfr-3.1.4.orig/src/mpfr-impl.h mpfr-3.1.4/src/mpfr-impl.h
+--- mpfr-3.1.4.orig/src/mpfr-impl.h Sun Mar 06 20:33:04 2016
++++ mpfr-3.1.4/src/mpfr-impl.h Mon Mar 07 21:55:06 2016
@@ -23,6 +23,11 @@
#ifndef __MPFR_IMPL_H__
#define __MPFR_IMPL_H__
@@ -27,16 +27,16 @@ diff -ur mpfr-3.1.3.orig/src/mpfr-impl.h mpfr-3.1.3/src/mpfr-impl.h
/* Let's include some standard headers unconditionally as they are
already needed by several source files or when some options are
enabled/disabled, and it is easy to forget them (some configure
-@@ -56,12 +61,6 @@
+@@ -55,12 +60,6 @@
+ /******************************************************
****************** Include files *********************
******************************************************/
-
+-
-/* Include 'config.h' before using ANY configure macros if needed
- NOTE: It isn't MPFR 'config.h', but GMP's one! */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
--
+
/* 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. */
diff --git a/Build/source/libs/mpfr/mpfr-src/BUGS b/Build/source/libs/mpfr/mpfr-src/BUGS
index 3e1536200cf..4bea948c2f1 100644
--- a/Build/source/libs/mpfr/mpfr-src/BUGS
+++ b/Build/source/libs/mpfr/mpfr-src/BUGS
@@ -1,5 +1,5 @@
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/ChangeLog b/Build/source/libs/mpfr/mpfr-src/ChangeLog
index 1a7ec5812ca..1bd01ba4262 100644
--- a/Build/source/libs/mpfr/mpfr-src/ChangeLog
+++ b/Build/source/libs/mpfr/mpfr-src/ChangeLog
@@ -1,4 +1,1596 @@
------------------------------------------------------------------------
+r10200 | vlefevre | 2016-03-06 11:20:09 +0000 (Sun, 06 Mar 2016) | 1 line
+Changed paths:
+ M /branches/3.1/doc/mpfr.texi
+
+[doc/mpfr.texi] Updated the month.
+------------------------------------------------------------------------
+r10199 | vlefevre | 2016-03-06 11:17:33 +0000 (Sun, 06 Mar 2016) | 1 line
+Changed paths:
+ M /branches/3.1/VERSION
+ M /branches/3.1/configure.ac
+ M /branches/3.1/doc/mpfr.texi
+ M /branches/3.1/src/mpfr.h
+ M /branches/3.1/src/version.c
+
+Updated version to 3.1.4.
+------------------------------------------------------------------------
+r10197 | vlefevre | 2016-03-04 14:08:33 +0000 (Fri, 04 Mar 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/INSTALL
+
+[INSTALL] Some improvement about MinGW and __USE_MINGW_ANSI_STDIO.
+(merged changeset r10196 from the trunk)
+------------------------------------------------------------------------
+r10184 | vlefevre | 2016-03-02 15:17:53 +0000 (Wed, 02 Mar 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tests/tversion.c
+
+[tests/tversion.c] Improved output of compiler information.
+(merge changesets r9695-9696,10170,10181-10182 from the trunk)
+------------------------------------------------------------------------
+r10176 | vlefevre | 2016-03-02 00:50:40 +0000 (Wed, 02 Mar 2016) | 3 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src
+ M /branches/3.1/src/get_flt.c
+
+[src/get_flt.c] FIXME: The code assumes the IEEE-754 binary32 format
+with subnormal support.
+(merged changeset r10175 from the trunk)
+------------------------------------------------------------------------
+r10174 | vlefevre | 2016-03-02 00:32:46 +0000 (Wed, 02 Mar 2016) | 3 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tests/tget_flt.c
+
+[tests/tget_flt.c] Do tests that may involve subnormals only
+if HAVE_DENORMS is defined.
+(merged changeset r10173 from the trunk)
+------------------------------------------------------------------------
+r10167 | vlefevre | 2016-03-01 15:44:58 +0000 (Tue, 01 Mar 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tests/tget_flt.c
+
+[tests/tget_flt.c] Use DOUBLE_ISNAN() instead of f == f.
+(merge changesets r10160,10163 from the trunk)
+------------------------------------------------------------------------
+r10166 | vlefevre | 2016-03-01 15:41:03 +0000 (Tue, 01 Mar 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/INSTALL
+
+[INSTALL] Updated "Notes on AIX/PowerPC".
+(merged changeset r10161 from the trunk)
+------------------------------------------------------------------------
+r10149 | zimmerma | 2016-02-29 20:29:40 +0000 (Mon, 29 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1/configure.ac
+ M /branches/3.1/src/mpfr-gmp.h
+
+reverted commit 10144 (wrongly applied to branch 3.1 instead of trunk)
+
+------------------------------------------------------------------------
+r10148 | vlefevre | 2016-02-29 18:07:10 +0000 (Mon, 29 Feb 2016) | 3 lines
+Changed paths:
+ M /branches/3.1/tools/mpfrlint
+
+[tools/mpfrlint] ASSERT and ASSERT_ALWAYS must not be used for
+assertion checking.
+(merge changesets r8123,8589,10147 from the trunk, only for mpfrlint)
+------------------------------------------------------------------------
+r10146 | vlefevre | 2016-02-29 17:47:01 +0000 (Mon, 29 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tests/tget_d.c
+ M /branches/3.1/tests/tget_d_2exp.c
+ M /branches/3.1/tests/tget_ld_2exp.c
+
+Replaced the remaining ASSERT_ALWAYS by MPFR_ASSERTN.
+(merged changeset r10145 from the trunk)
+------------------------------------------------------------------------
+r10144 | zimmerma | 2016-02-29 17:31:52 +0000 (Mon, 29 Feb 2016) | 4 lines
+Changed paths:
+ M /branches/3.1/configure.ac
+ M /branches/3.1/src/mpfr-gmp.h
+
+native detection of ieee_double_extract (work in progress),
+this will allow to have decimal-float support without gmp-build
+(and also faster set_d/get_d)
+
+------------------------------------------------------------------------
+r10143 | zimmerma | 2016-02-29 17:22:30 +0000 (Mon, 29 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1/tests/tget_set_d64.c
+
+fixed assert macros
+
+------------------------------------------------------------------------
+r10142 | zimmerma | 2016-02-29 16:06:17 +0000 (Mon, 29 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1/src/mpfr-gmp.h
+
+fixed typo
+
+------------------------------------------------------------------------
+r10139 | vlefevre | 2016-02-29 04:17:22 +0000 (Mon, 29 Feb 2016) | 1 line
+Changed paths:
+ M /branches/3.1/ChangeLog
+
+ChangeLog update with "TZ=UTC svn log -rHEAD:0 -v" (in UTF-8 locales).
+------------------------------------------------------------------------
+r10138 | vlefevre | 2016-02-29 04:07:54 +0000 (Mon, 29 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1/NEWS
+
+[NEWS] Added "MinGW (MS Windows): Added support for thread-safe DLL
+(shared library)." (fix in r10119,10130).
+------------------------------------------------------------------------
+r10136 | vlefevre | 2016-02-29 03:56:39 +0000 (Mon, 29 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1/INSTALL
+
+[INSTALL] Removed an obsolete sentence about MinGW and shared builds
+with TLS (the failures in the test suite were avoided in r10119,10130).
+------------------------------------------------------------------------
+r10133 | vlefevre | 2016-02-29 01:12:13 +0000 (Mon, 29 Feb 2016) | 6 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tests/tversion.c
+
+[tests/tversion.c]
+ * Output support status of modifiers in gmp_printf (a bit like r10123
+ and r10124 in the trunk, except that macros PRINTF_T and PRINTF_L
+ do not exist and their absence means here "yes").
+ * Output availability of intmax_t/uintmax_t based functions and
+ *printf functions (merged changeset r10127 from the trunk).
+------------------------------------------------------------------------
+r10131 | vlefevre | 2016-02-26 14:43:04 +0000 (Fri, 26 Feb 2016) | 5 lines
+Changed paths:
+ M /branches/3.1/acinclude.m4
+
+[acinclude.m4] Replaced a "main()" (from the merge of r8245) by
+"main (void)" (the other similar changes were done in r9418 for
+the 3.1 branch and r8728 in the trunk, which is why r8245 did not
+have this change). Useful to configure & build with -Werror (this
+needs a patched autoconf).
+------------------------------------------------------------------------
+r10130 | vlefevre | 2016-02-26 12:05:16 +0000 (Fri, 26 Feb 2016) | 6 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/acinclude.m4
+ M /branches/3.1/src
+ M /branches/3.1/src/const_catalan.c
+ M /branches/3.1/src/const_euler.c
+ M /branches/3.1/src/const_log2.c
+ M /branches/3.1/src/const_pi.c
+ M /branches/3.1/src/exceptions.c
+ M /branches/3.1/src/mpfr-impl.h
+ M /branches/3.1/src/mpfr-thread.h
+ M /branches/3.1/src/set_dfl_prec.c
+ M /branches/3.1/src/set_rnd.c
+
+Better threading support:
+ * Support for _Thread_local (C11).
+ * Support build as thread-safe DLL on Windows (mainly changes
+ from Stephan Tolksdorf).
+(merged changesets r7954,8245,9684,9778 from the trunk, with
+mpfr_flags_t replaced by unsigned int)
+------------------------------------------------------------------------
+r10129 | zimmerma | 2016-02-26 10:09:44 +0000 (Fri, 26 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1/INSTALL
+
+changed according to suggestion from Eli Zaretskii
+
+------------------------------------------------------------------------
+r10120 | vlefevre | 2016-02-25 01:43:51 +0000 (Thu, 25 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/INSTALL
+
+[INSTALL] Various updates for use with Windows applications.
+(merged changesets r9750-9751,9756-9757,9762-9767 from the trunk)
+------------------------------------------------------------------------
+r10119 | vlefevre | 2016-02-24 16:35:33 +0000 (Wed, 24 Feb 2016) | 7 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tests/memory.c
+ M /branches/3.1/tests/mpfr-test.h
+ M /branches/3.1/tests/tests.c
+ M /branches/3.1/tests/tgrandom.c
+ M /branches/3.1/tests/tset_str.c
+ M /branches/3.1/tests/tsum.c
+ M /branches/3.1/tools/mpfrlint
+
+In the tests, use tests_allocate and tests_free instead of
+(*__gmp_allocate_func) / malloc and (*__gmp_free_func) / free.
+Note: This follows the discussion at
+ https://sympa.inria.fr/sympa/arc/mpfr/2015-12/msg00055.html
+and should solve these problems under MS Windows (mingw32).
+(merged changesets r9891,10118 from the trunk, resolving conflicts
+to keep only the needed changes)
+------------------------------------------------------------------------
+r10117 | vlefevre | 2016-02-24 15:27:21 +0000 (Wed, 24 Feb 2016) | 1 line
+Changed paths:
+ M /branches/3.1/VERSION
+ M /branches/3.1/configure.ac
+ M /branches/3.1/doc/mpfr.texi
+ M /branches/3.1/src/mpfr.h
+ M /branches/3.1/src/version.c
+
+Updated version to 3.1.4-rc2.
+------------------------------------------------------------------------
+r10116 | vlefevre | 2016-02-24 15:22:37 +0000 (Wed, 24 Feb 2016) | 8 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/configure.ac
+
+[configure.ac] Try to link with GMP even when a DLL, since it seems
+to work now:
+ https://sympa.inria.fr/sympa/arc/mpfr/2013-05/msg00010.html
+ https://sympa.inria.fr/sympa/arc/mpfr/2015-12/msg00037.html
+Thus gmp_printf features (from the printf C function) are now tested,
+avoiding failures in the tests with thread-safe shared Windows builds
+using MinGW.
+(merged changeset r8524 from the trunk)
+------------------------------------------------------------------------
+r10107 | vlefevre | 2016-02-24 01:51:14 +0000 (Wed, 24 Feb 2016) | 1 line
+Changed paths:
+ M /branches/3.1/ChangeLog
+
+ChangeLog update with "TZ=UTC svn log -rHEAD:0 -v" (in UTF-8 locales).
+------------------------------------------------------------------------
+r10106 | vlefevre | 2016-02-24 01:40:56 +0000 (Wed, 24 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/doc/mpfr.texi
+
+[doc/mpfr.texi] Fixed a warning with "make info".
+(merged changeset r10105 from the trunk)
+------------------------------------------------------------------------
+r10104 | vlefevre | 2016-02-24 01:30:08 +0000 (Wed, 24 Feb 2016) | 1 line
+Changed paths:
+ M /branches/3.1/ChangeLog
+
+ChangeLog update with "TZ=UTC svn log -rHEAD:0 -v" (in UTF-8 locales).
+------------------------------------------------------------------------
+r10103 | vlefevre | 2016-02-24 01:27:46 +0000 (Wed, 24 Feb 2016) | 1 line
+Changed paths:
+ M /branches/3.1/NEWS
+
+[NEWS] Update for GNU MPFR 3.1.4.
+------------------------------------------------------------------------
+r10102 | vlefevre | 2016-02-24 01:25:32 +0000 (Wed, 24 Feb 2016) | 5 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/Makefile.am
+ A /branches/3.1/tools/ck-news (from /trunk/tools/ck-news:10101)
+
+Added tools/ck-news Perl script to check the NEWS file.
+In Makefile.am:
+ * run this script in dist-hook for "make dist";
+ * added this script to EXTRA_DIST as it is used in dist-hook.
+(merged changeset r10101 from the trunk)
+------------------------------------------------------------------------
+r10096 | vlefevre | 2016-02-23 22:17:20 +0000 (Tue, 23 Feb 2016) | 1 line
+Changed paths:
+ M /branches/3.1/ChangeLog
+
+ChangeLog update with "TZ=UTC svn log -rHEAD:0 -v" (in UTF-8 locales).
+------------------------------------------------------------------------
+r10095 | vlefevre | 2016-02-23 22:15:13 +0000 (Tue, 23 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1/VERSION
+ M /branches/3.1/configure.ac
+ M /branches/3.1/doc/mpfr.texi
+ M /branches/3.1/src/Makefile.am
+ M /branches/3.1/src/mpfr.h
+ M /branches/3.1/src/version.c
+
+Updated version to 3.1.4-rc1 and updated libmpfr_la_LDFLAGS in
+src/Makefile.am for the next release.
+------------------------------------------------------------------------
+r10094 | vlefevre | 2016-02-23 22:09:55 +0000 (Tue, 23 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tools/update-version
+
+[tools/update-version] Correction for new perl versions.
+(merged changeset r10093 from the trunk)
+------------------------------------------------------------------------
+r10090 | vlefevre | 2016-02-23 12:26:36 +0000 (Tue, 23 Feb 2016) | 8 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src
+ M /branches/3.1/src/cmp_d.c
+ M /branches/3.1/src/cmp_ld.c
+ M /branches/3.1/tests/tcmp_d.c
+ M /branches/3.1/tests/tcmp_ld.c
+
+[src/{cmp_d.c,cmp_ld.c}] Bug fixes: mpfr_cmp_d (resp. mpfr_cmp_ld) was
+setting the NaN flag when the double (resp. long double) was a NaN and
+could return an incorrect result (assertion failure in debug mode) in
+reduced exponent range.
+[tests/{tcmp_d.c,tcmp_ld.c}] Added a test in reduced exponent range.
+Full test of the flags for NaN.
+(merged changesets r10087-10089 from the trunk, with replacement of
+new features of the trunk)
+------------------------------------------------------------------------
+r10083 | vlefevre | 2016-02-22 14:46:51 +0000 (Mon, 22 Feb 2016) | 14 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src
+ M /branches/3.1/src/mpfr-impl.h
+ M /branches/3.1/src/sum.c
+ M /branches/3.1/tests/tsum.c
+
+[src/sum.c] Fixed bugs in mpfr_sum, which could return wrong results
+ when not all the numbers have the same precision. A side effect is
+ that this can make mpfr_sum much slower and/or take much more memory
+ in some of such cases with the same program; this is normal and
+ cannot easily be avoided with the current algorithm.
+ Note: The full rewrite currently in the trunk has not been merged
+ because this would not be a simple patch (and it is still incomplete
+ when a number is reused as the output).
+[src/mpfr-impl.h] Updated the prototype of mpfr_sum_sort.
+ Note: Since this function is used only internally and by the tests,
+ this does not break the ABI. However the old and new tsum tests are
+ source & binary incompatible.
+[tests/tsum.c] Updated the use of mpfr_sum_sort. Added a testcase.
+(merged changesets r8697,8699,8701,8851 from the trunk)
+------------------------------------------------------------------------
+r10078 | vlefevre | 2016-02-22 12:46:41 +0000 (Mon, 22 Feb 2016) | 5 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src
+ M /branches/3.1/src/agm.c
+ M /branches/3.1/tests/tagm.c
+
+[src/agm.c] Fixed bug in mpfr_agm in case the two FP inputs have
+ the same value but the result cannot be exactly represented in
+ the target precision: the ternary value was wrongly set to 0.
+[tests/tagm.c] Added testcase.
+(merged changesets r10060,10077 from the trunk)
+------------------------------------------------------------------------
+r10075 | vlefevre | 2016-02-19 17:03:45 +0000 (Fri, 19 Feb 2016) | 6 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src
+ M /branches/3.1/src/rem1.c
+ M /branches/3.1/tests/tfmod.c
+ M /branches/3.1/tests/tremquo.c
+
+[src/rem1.c] Fixed bug in the mpfr_rem1 internal function (used by
+mpfr_remainder, mpfr_remquo and mpfr_fmod): MPFR can take much memory
+or crash when using inputs with a huge difference in magnitude.
+[tests/{tfmod.c,tremquo.c}] Testcases.
+(merged changesets r10054,10056,10059,10061-10062,10064,10072-10074
+from the trunk)
+------------------------------------------------------------------------
+r10071 | vlefevre | 2016-02-19 16:08:41 +0000 (Fri, 19 Feb 2016) | 4 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src
+ M /branches/3.1/src/gamma.c
+ M /branches/3.1/tests/tgamma.c
+
+[src/gamma.c] Bug fix in case the argument is an integer fitting in an
+unsigned long: flags may be set while they shouldn't, and the result
+may be incorrect in a very reduced exponent range.
+(merged changesets r10043-10045 from the trunk)
+------------------------------------------------------------------------
+r10040 | vlefevre | 2016-02-15 12:57:57 +0000 (Mon, 15 Feb 2016) | 10 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src
+ M /branches/3.1/src/root.c
+ M /branches/3.1/tests/troot.c
+
+[src/root.c] Fixed root(x,k) for large very values of k: MPFR could
+crash or take much memory, and the function could return incorrect
+values. This is done by changing the algorithm for k > 100. This patch
+is rather safe as applications that only use small values of k (≤ 100)
+won't see any change, and for applications that may use large values
+of k, this change may be needed.
+[tests/troot.c] Added tests.
+(merged changesets r9921-9928,9930-9931,9965-9970,9973-9974,10036,10038
+from the trunk, with mpfr_flags_t replaced by unsigned int; for r9965,
+the merged was done only on the src directory)
+------------------------------------------------------------------------
+r10039 | vlefevre | 2016-02-15 12:34:15 +0000 (Mon, 15 Feb 2016) | 1 line
+Changed paths:
+ M /branches/3.1/src/mpfr-impl.h
+
+[src/mpfr-impl.h] Merged r9970 to simplify a future patch generation.
+------------------------------------------------------------------------
+r10035 | vlefevre | 2016-02-15 10:20:38 +0000 (Mon, 15 Feb 2016) | 7 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src/fits_intmax.c
+ M /branches/3.1/src/fits_s.h
+ M /branches/3.1/src/fits_u.h
+ M /branches/3.1/tests/tfits.c
+
+[src/{fits_intmax.c,fits_s.h,fits_u.h}] Fixed mpfr_fits_* functions: the
+flags could be modified, and an assertion failure could be triggered in
+debug mode (additional assertion checking) for non-integer numbers just
+above the positive limit.
+[tests/tfits.c] Many new tests.
+(merged changesets r9650,9653-9655,10030-10034 from the trunk, with
+mpfr_flags_t replaced by unsigned int)
+------------------------------------------------------------------------
+r10029 | vlefevre | 2016-02-12 14:19:46 +0000 (Fri, 12 Feb 2016) | 7 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src/div.c
+ M /branches/3.1/src/round_p.c
+ M /branches/3.1/src/round_prec.c
+ M /branches/3.1/tests/tcan_round.c
+
+Fixed bug in mpfr_can_round_raw, which affected mpfr_can_round: the
+result could be true instead of false in case of a change of binade
+(exponent decrease) on the approximation interval. At the same time,
+make sure that the number is normalized, and ditto for mpfr_round_p;
+otherwise the semantic is not clear. Thus mpfr_div, which could call
+mpfr_round_p with an unnormalized number, had to be fixed.
+(merged changesets r9881,9883-9890,9896-9904,9932,10027 from the trunk)
+------------------------------------------------------------------------
+r10026 | vlefevre | 2016-02-12 13:26:58 +0000 (Fri, 12 Feb 2016) | 3 lines
+Changed paths:
+ M /branches/3.1/src/exp3.c
+
+[src/exp3.c] Merged r9883 to simplify a future patch generation
+(fix of comment formatting, which shouldn't have been with the
+other r9883 changes).
+------------------------------------------------------------------------
+r10023 | vlefevre | 2016-02-12 12:30:17 +0000 (Fri, 12 Feb 2016) | 4 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src/div_ui.c
+ M /branches/3.1/src/mul_ui.c
+ M /branches/3.1/src/si_op.c
+ M /branches/3.1/src/ui_div.c
+
+Fixed bug in si operations (mpfr_add_si, mpfr_sub_si, mpfr_si_sub,
+mpfr_mul_si, mpfr_div_si, mpfr_si_div) when the integer is LONG_MIN,
+visible when using an UB sanitizer.
+(merged changesets r9998-9999,10003,10005 from the trunk)
+------------------------------------------------------------------------
+r10009 | vlefevre | 2016-02-09 09:59:52 +0000 (Tue, 09 Feb 2016) | 1 line
+Changed paths:
+ M /branches/3.1/src/eint.c
+
+[src/eint.c] Typo in a comment.
+------------------------------------------------------------------------
+r10002 | vlefevre | 2016-02-09 01:34:37 +0000 (Tue, 09 Feb 2016) | 4 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tests/tgeneric_ui.c
+
+[tests/tgeneric_ui.c] Added tests of the extreme integer values,
+so that tsi_op fails with a runtime error in si_op.c when using
+an UB sanitizer (bug fixed in r9999 in the trunk).
+(merged changeset r10001 from the trunk)
+------------------------------------------------------------------------
+r9987 | vlefevre | 2016-02-08 11:07:06 +0000 (Mon, 08 Feb 2016) | 1 line
+Changed paths:
+ M /branches/3.1/doc/mpfr.texi
+
+[doc/mpfr.texi] Updated the month.
+------------------------------------------------------------------------
+r9944 | vlefevre | 2016-02-04 15:15:38 +0000 (Thu, 04 Feb 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/doc/mpfr.texi
+
+[doc/mpfr.texi] Mention the Caramba project-team.
+(merged changeset r9942 from the trunk)
+------------------------------------------------------------------------
+r9943 | vlefevre | 2016-02-04 15:13:15 +0000 (Thu, 04 Feb 2016) | 4 lines
+Changed paths:
+ M /branches/3.1/BUGS
+ M /branches/3.1/INSTALL
+ M /branches/3.1/NEWS
+ M /branches/3.1/README
+ M /branches/3.1/TODO
+ M /branches/3.1/acinclude.m4
+ M /branches/3.1/configure.ac
+ M /branches/3.1/doc/FAQ.html
+ M /branches/3.1/doc/README.dev
+ M /branches/3.1/doc/faq.xsl
+ M /branches/3.1/examples/divworst.c
+ M /branches/3.1/examples/rndo-add.c
+ M /branches/3.1/examples/sample.c
+ M /branches/3.1/examples/version.c
+ M /branches/3.1/src/abort_prec_max.c
+ M /branches/3.1/src/acos.c
+ M /branches/3.1/src/acosh.c
+ M /branches/3.1/src/add.c
+ M /branches/3.1/src/add1.c
+ M /branches/3.1/src/add1sp.c
+ M /branches/3.1/src/add_d.c
+ M /branches/3.1/src/add_ui.c
+ M /branches/3.1/src/agm.c
+ M /branches/3.1/src/ai.c
+ M /branches/3.1/src/asin.c
+ M /branches/3.1/src/asinh.c
+ M /branches/3.1/src/atan.c
+ M /branches/3.1/src/atan2.c
+ M /branches/3.1/src/atanh.c
+ M /branches/3.1/src/bernoulli.c
+ M /branches/3.1/src/buildopt.c
+ M /branches/3.1/src/cache.c
+ M /branches/3.1/src/cbrt.c
+ M /branches/3.1/src/check.c
+ M /branches/3.1/src/clear.c
+ M /branches/3.1/src/clears.c
+ M /branches/3.1/src/cmp.c
+ M /branches/3.1/src/cmp2.c
+ M /branches/3.1/src/cmp_abs.c
+ M /branches/3.1/src/cmp_d.c
+ M /branches/3.1/src/cmp_ld.c
+ M /branches/3.1/src/cmp_si.c
+ M /branches/3.1/src/cmp_ui.c
+ M /branches/3.1/src/comparisons.c
+ M /branches/3.1/src/const_catalan.c
+ M /branches/3.1/src/const_euler.c
+ M /branches/3.1/src/const_log2.c
+ M /branches/3.1/src/const_pi.c
+ M /branches/3.1/src/constant.c
+ M /branches/3.1/src/copysign.c
+ M /branches/3.1/src/cos.c
+ M /branches/3.1/src/cosh.c
+ M /branches/3.1/src/cot.c
+ M /branches/3.1/src/coth.c
+ M /branches/3.1/src/csc.c
+ M /branches/3.1/src/csch.c
+ M /branches/3.1/src/d_div.c
+ M /branches/3.1/src/d_sub.c
+ M /branches/3.1/src/digamma.c
+ M /branches/3.1/src/dim.c
+ M /branches/3.1/src/div.c
+ M /branches/3.1/src/div_2exp.c
+ M /branches/3.1/src/div_2si.c
+ M /branches/3.1/src/div_2ui.c
+ M /branches/3.1/src/div_d.c
+ M /branches/3.1/src/div_ui.c
+ M /branches/3.1/src/dump.c
+ M /branches/3.1/src/eint.c
+ M /branches/3.1/src/eq.c
+ M /branches/3.1/src/erf.c
+ M /branches/3.1/src/erfc.c
+ M /branches/3.1/src/exceptions.c
+ M /branches/3.1/src/exp.c
+ M /branches/3.1/src/exp10.c
+ M /branches/3.1/src/exp2.c
+ M /branches/3.1/src/exp3.c
+ M /branches/3.1/src/exp_2.c
+ M /branches/3.1/src/expm1.c
+ M /branches/3.1/src/extract.c
+ M /branches/3.1/src/factorial.c
+ M /branches/3.1/src/fits_intmax.c
+ M /branches/3.1/src/fits_s.h
+ M /branches/3.1/src/fits_sint.c
+ M /branches/3.1/src/fits_slong.c
+ M /branches/3.1/src/fits_sshort.c
+ M /branches/3.1/src/fits_u.h
+ M /branches/3.1/src/fits_uint.c
+ M /branches/3.1/src/fits_uintmax.c
+ M /branches/3.1/src/fits_ulong.c
+ M /branches/3.1/src/fits_ushort.c
+ M /branches/3.1/src/fma.c
+ M /branches/3.1/src/fms.c
+ M /branches/3.1/src/frac.c
+ M /branches/3.1/src/free_cache.c
+ M /branches/3.1/src/frexp.c
+ M /branches/3.1/src/gamma.c
+ M /branches/3.1/src/gammaonethird.c
+ M /branches/3.1/src/gen_inverse.h
+ M /branches/3.1/src/get_d.c
+ M /branches/3.1/src/get_d64.c
+ M /branches/3.1/src/get_exp.c
+ M /branches/3.1/src/get_f.c
+ M /branches/3.1/src/get_flt.c
+ M /branches/3.1/src/get_ld.c
+ M /branches/3.1/src/get_si.c
+ M /branches/3.1/src/get_sj.c
+ M /branches/3.1/src/get_str.c
+ M /branches/3.1/src/get_ui.c
+ M /branches/3.1/src/get_uj.c
+ M /branches/3.1/src/get_z.c
+ M /branches/3.1/src/get_z_exp.c
+ M /branches/3.1/src/gmp_op.c
+ M /branches/3.1/src/grandom.c
+ M /branches/3.1/src/hypot.c
+ M /branches/3.1/src/ieee_floats.h
+ M /branches/3.1/src/init.c
+ M /branches/3.1/src/init2.c
+ M /branches/3.1/src/inits.c
+ M /branches/3.1/src/inits2.c
+ M /branches/3.1/src/inp_str.c
+ M /branches/3.1/src/int_ceil_log2.c
+ M /branches/3.1/src/isinf.c
+ M /branches/3.1/src/isinteger.c
+ M /branches/3.1/src/isnan.c
+ M /branches/3.1/src/isnum.c
+ M /branches/3.1/src/isqrt.c
+ M /branches/3.1/src/isregular.c
+ M /branches/3.1/src/iszero.c
+ M /branches/3.1/src/jn.c
+ M /branches/3.1/src/jyn_asympt.c
+ M /branches/3.1/src/li2.c
+ M /branches/3.1/src/lngamma.c
+ M /branches/3.1/src/log.c
+ M /branches/3.1/src/log10.c
+ M /branches/3.1/src/log1p.c
+ M /branches/3.1/src/log2.c
+ M /branches/3.1/src/logging.c
+ M /branches/3.1/src/min_prec.c
+ M /branches/3.1/src/minmax.c
+ M /branches/3.1/src/modf.c
+ M /branches/3.1/src/mpf2mpfr.h
+ M /branches/3.1/src/mpfr-gmp.c
+ M /branches/3.1/src/mpfr-gmp.h
+ M /branches/3.1/src/mpfr-impl.h
+ M /branches/3.1/src/mpfr-intmax.h
+ M /branches/3.1/src/mpfr-thread.h
+ M /branches/3.1/src/mpfr.h
+ M /branches/3.1/src/mpn_exp.c
+ M /branches/3.1/src/mul.c
+ M /branches/3.1/src/mul_2exp.c
+ M /branches/3.1/src/mul_2si.c
+ M /branches/3.1/src/mul_2ui.c
+ M /branches/3.1/src/mul_d.c
+ M /branches/3.1/src/mul_ui.c
+ M /branches/3.1/src/mulders.c
+ M /branches/3.1/src/neg.c
+ M /branches/3.1/src/next.c
+ M /branches/3.1/src/out_raw.c
+ M /branches/3.1/src/out_str.c
+ M /branches/3.1/src/pow.c
+ M /branches/3.1/src/pow_si.c
+ M /branches/3.1/src/pow_ui.c
+ M /branches/3.1/src/pow_z.c
+ M /branches/3.1/src/powerof2.c
+ M /branches/3.1/src/print_raw.c
+ M /branches/3.1/src/print_rnd_mode.c
+ M /branches/3.1/src/printf.c
+ M /branches/3.1/src/rec_sqrt.c
+ M /branches/3.1/src/reldiff.c
+ M /branches/3.1/src/rem1.c
+ M /branches/3.1/src/rint.c
+ M /branches/3.1/src/root.c
+ M /branches/3.1/src/round_near_x.c
+ M /branches/3.1/src/round_p.c
+ M /branches/3.1/src/round_prec.c
+ M /branches/3.1/src/round_raw_generic.c
+ M /branches/3.1/src/scale2.c
+ M /branches/3.1/src/sec.c
+ M /branches/3.1/src/sech.c
+ M /branches/3.1/src/set.c
+ M /branches/3.1/src/set_d.c
+ M /branches/3.1/src/set_d64.c
+ M /branches/3.1/src/set_dfl_prec.c
+ M /branches/3.1/src/set_exp.c
+ M /branches/3.1/src/set_f.c
+ M /branches/3.1/src/set_flt.c
+ M /branches/3.1/src/set_inf.c
+ M /branches/3.1/src/set_ld.c
+ M /branches/3.1/src/set_nan.c
+ M /branches/3.1/src/set_prc_raw.c
+ M /branches/3.1/src/set_prec.c
+ M /branches/3.1/src/set_q.c
+ M /branches/3.1/src/set_rnd.c
+ M /branches/3.1/src/set_si.c
+ M /branches/3.1/src/set_si_2exp.c
+ M /branches/3.1/src/set_sj.c
+ M /branches/3.1/src/set_str.c
+ M /branches/3.1/src/set_str_raw.c
+ M /branches/3.1/src/set_ui.c
+ M /branches/3.1/src/set_ui_2exp.c
+ M /branches/3.1/src/set_uj.c
+ M /branches/3.1/src/set_z.c
+ M /branches/3.1/src/set_z_exp.c
+ M /branches/3.1/src/set_zero.c
+ M /branches/3.1/src/setmax.c
+ M /branches/3.1/src/setmin.c
+ M /branches/3.1/src/setsign.c
+ M /branches/3.1/src/sgn.c
+ M /branches/3.1/src/si_op.c
+ M /branches/3.1/src/signbit.c
+ M /branches/3.1/src/sin.c
+ M /branches/3.1/src/sin_cos.c
+ M /branches/3.1/src/sinh.c
+ M /branches/3.1/src/sinh_cosh.c
+ M /branches/3.1/src/sqr.c
+ M /branches/3.1/src/sqrt.c
+ M /branches/3.1/src/sqrt_ui.c
+ M /branches/3.1/src/stack_interface.c
+ M /branches/3.1/src/strtofr.c
+ M /branches/3.1/src/sub.c
+ M /branches/3.1/src/sub1.c
+ M /branches/3.1/src/sub1sp.c
+ M /branches/3.1/src/sub_d.c
+ M /branches/3.1/src/sub_ui.c
+ M /branches/3.1/src/subnormal.c
+ M /branches/3.1/src/sum.c
+ M /branches/3.1/src/swap.c
+ M /branches/3.1/src/tan.c
+ M /branches/3.1/src/tanh.c
+ M /branches/3.1/src/uceil_exp2.c
+ M /branches/3.1/src/uceil_log2.c
+ M /branches/3.1/src/ufloor_log2.c
+ M /branches/3.1/src/ui_div.c
+ M /branches/3.1/src/ui_pow.c
+ M /branches/3.1/src/ui_pow_ui.c
+ M /branches/3.1/src/ui_sub.c
+ M /branches/3.1/src/urandom.c
+ M /branches/3.1/src/urandomb.c
+ M /branches/3.1/src/vasprintf.c
+ M /branches/3.1/src/version.c
+ M /branches/3.1/src/volatile.c
+ M /branches/3.1/src/yn.c
+ M /branches/3.1/src/zeta.c
+ M /branches/3.1/src/zeta_ui.c
+ M /branches/3.1/tests/cmp_str.c
+ M /branches/3.1/tests/data/digamma
+ M /branches/3.1/tests/data/li2
+ M /branches/3.1/tests/memory.c
+ M /branches/3.1/tests/mpf_compat.c
+ M /branches/3.1/tests/mpf_compat.h
+ M /branches/3.1/tests/mpfr-test.h
+ M /branches/3.1/tests/mpfr_compat.c
+ M /branches/3.1/tests/random2.c
+ M /branches/3.1/tests/reuse.c
+ M /branches/3.1/tests/rnd_mode.c
+ M /branches/3.1/tests/tabs.c
+ M /branches/3.1/tests/tacos.c
+ M /branches/3.1/tests/tacosh.c
+ M /branches/3.1/tests/tadd.c
+ M /branches/3.1/tests/tadd1sp.c
+ M /branches/3.1/tests/tadd_d.c
+ M /branches/3.1/tests/tadd_ui.c
+ M /branches/3.1/tests/tagm.c
+ M /branches/3.1/tests/tai.c
+ M /branches/3.1/tests/tasin.c
+ M /branches/3.1/tests/tasinh.c
+ M /branches/3.1/tests/tatan.c
+ M /branches/3.1/tests/tatanh.c
+ M /branches/3.1/tests/taway.c
+ M /branches/3.1/tests/tbuildopt.c
+ M /branches/3.1/tests/tcan_round.c
+ M /branches/3.1/tests/tcbrt.c
+ M /branches/3.1/tests/tcheck.c
+ M /branches/3.1/tests/tcmp.c
+ M /branches/3.1/tests/tcmp2.c
+ M /branches/3.1/tests/tcmp_d.c
+ M /branches/3.1/tests/tcmp_ld.c
+ M /branches/3.1/tests/tcmp_ui.c
+ M /branches/3.1/tests/tcmpabs.c
+ M /branches/3.1/tests/tcomparisons.c
+ M /branches/3.1/tests/tconst_catalan.c
+ M /branches/3.1/tests/tconst_euler.c
+ M /branches/3.1/tests/tconst_log2.c
+ M /branches/3.1/tests/tconst_pi.c
+ M /branches/3.1/tests/tcopysign.c
+ M /branches/3.1/tests/tcos.c
+ M /branches/3.1/tests/tcosh.c
+ M /branches/3.1/tests/tcot.c
+ M /branches/3.1/tests/tcoth.c
+ M /branches/3.1/tests/tcsc.c
+ M /branches/3.1/tests/tcsch.c
+ M /branches/3.1/tests/td_div.c
+ M /branches/3.1/tests/td_sub.c
+ M /branches/3.1/tests/tdigamma.c
+ M /branches/3.1/tests/tdim.c
+ M /branches/3.1/tests/tdiv.c
+ M /branches/3.1/tests/tdiv_d.c
+ M /branches/3.1/tests/tdiv_ui.c
+ M /branches/3.1/tests/teint.c
+ M /branches/3.1/tests/teq.c
+ M /branches/3.1/tests/terf.c
+ M /branches/3.1/tests/tests.c
+ M /branches/3.1/tests/texceptions.c
+ M /branches/3.1/tests/texp.c
+ M /branches/3.1/tests/texp10.c
+ M /branches/3.1/tests/texp2.c
+ M /branches/3.1/tests/texpm1.c
+ M /branches/3.1/tests/tfactorial.c
+ M /branches/3.1/tests/tfits.c
+ M /branches/3.1/tests/tfma.c
+ M /branches/3.1/tests/tfmod.c
+ M /branches/3.1/tests/tfms.c
+ M /branches/3.1/tests/tfprintf.c
+ M /branches/3.1/tests/tfrac.c
+ M /branches/3.1/tests/tfrexp.c
+ M /branches/3.1/tests/tgamma.c
+ M /branches/3.1/tests/tgeneric.c
+ M /branches/3.1/tests/tgeneric_ui.c
+ M /branches/3.1/tests/tget_d.c
+ M /branches/3.1/tests/tget_d_2exp.c
+ M /branches/3.1/tests/tget_f.c
+ M /branches/3.1/tests/tget_flt.c
+ M /branches/3.1/tests/tget_ld_2exp.c
+ M /branches/3.1/tests/tget_set_d64.c
+ M /branches/3.1/tests/tget_sj.c
+ M /branches/3.1/tests/tget_str.c
+ M /branches/3.1/tests/tget_z.c
+ M /branches/3.1/tests/tgmpop.c
+ M /branches/3.1/tests/tgrandom.c
+ M /branches/3.1/tests/thyperbolic.c
+ M /branches/3.1/tests/thypot.c
+ M /branches/3.1/tests/tinits.c
+ M /branches/3.1/tests/tinp_str.c
+ M /branches/3.1/tests/tinternals.c
+ M /branches/3.1/tests/tisnan.c
+ M /branches/3.1/tests/tisqrt.c
+ M /branches/3.1/tests/tj0.c
+ M /branches/3.1/tests/tj1.c
+ M /branches/3.1/tests/tjn.c
+ M /branches/3.1/tests/tl2b.c
+ M /branches/3.1/tests/tlgamma.c
+ M /branches/3.1/tests/tli2.c
+ M /branches/3.1/tests/tlngamma.c
+ M /branches/3.1/tests/tlog.c
+ M /branches/3.1/tests/tlog10.c
+ M /branches/3.1/tests/tlog1p.c
+ M /branches/3.1/tests/tlog2.c
+ M /branches/3.1/tests/tmin_prec.c
+ M /branches/3.1/tests/tminmax.c
+ M /branches/3.1/tests/tmodf.c
+ M /branches/3.1/tests/tmul.c
+ M /branches/3.1/tests/tmul_2exp.c
+ M /branches/3.1/tests/tmul_d.c
+ M /branches/3.1/tests/tmul_ui.c
+ M /branches/3.1/tests/tnext.c
+ M /branches/3.1/tests/tout_str.c
+ M /branches/3.1/tests/toutimpl.c
+ M /branches/3.1/tests/tpow.c
+ M /branches/3.1/tests/tpow3.c
+ M /branches/3.1/tests/tpow_all.c
+ M /branches/3.1/tests/tpow_z.c
+ M /branches/3.1/tests/tprintf.c
+ M /branches/3.1/tests/trandom.c
+ M /branches/3.1/tests/trec_sqrt.c
+ M /branches/3.1/tests/tremquo.c
+ M /branches/3.1/tests/trint.c
+ M /branches/3.1/tests/troot.c
+ M /branches/3.1/tests/tround_prec.c
+ M /branches/3.1/tests/tsec.c
+ M /branches/3.1/tests/tsech.c
+ M /branches/3.1/tests/tset.c
+ M /branches/3.1/tests/tset_d.c
+ M /branches/3.1/tests/tset_exp.c
+ M /branches/3.1/tests/tset_f.c
+ M /branches/3.1/tests/tset_ld.c
+ M /branches/3.1/tests/tset_q.c
+ M /branches/3.1/tests/tset_si.c
+ M /branches/3.1/tests/tset_sj.c
+ M /branches/3.1/tests/tset_str.c
+ M /branches/3.1/tests/tset_z.c
+ M /branches/3.1/tests/tset_z_exp.c
+ M /branches/3.1/tests/tsgn.c
+ M /branches/3.1/tests/tsi_op.c
+ M /branches/3.1/tests/tsin.c
+ M /branches/3.1/tests/tsin_cos.c
+ M /branches/3.1/tests/tsinh.c
+ M /branches/3.1/tests/tsinh_cosh.c
+ M /branches/3.1/tests/tsprintf.c
+ M /branches/3.1/tests/tsqr.c
+ M /branches/3.1/tests/tsqrt.c
+ M /branches/3.1/tests/tsqrt_ui.c
+ M /branches/3.1/tests/tstckintc.c
+ M /branches/3.1/tests/tstdint.c
+ M /branches/3.1/tests/tstrtofr.c
+ M /branches/3.1/tests/tsub.c
+ M /branches/3.1/tests/tsub1sp.c
+ M /branches/3.1/tests/tsub_d.c
+ M /branches/3.1/tests/tsub_ui.c
+ M /branches/3.1/tests/tsubnormal.c
+ M /branches/3.1/tests/tsum.c
+ M /branches/3.1/tests/tswap.c
+ M /branches/3.1/tests/ttan.c
+ M /branches/3.1/tests/ttanh.c
+ M /branches/3.1/tests/ttrunc.c
+ M /branches/3.1/tests/tui_div.c
+ M /branches/3.1/tests/tui_pow.c
+ M /branches/3.1/tests/tui_sub.c
+ M /branches/3.1/tests/turandom.c
+ M /branches/3.1/tests/tvalist.c
+ M /branches/3.1/tests/tversion.c
+ M /branches/3.1/tests/ty0.c
+ M /branches/3.1/tests/ty1.c
+ M /branches/3.1/tests/tyn.c
+ M /branches/3.1/tests/tzeta.c
+ M /branches/3.1/tests/tzeta_ui.c
+ M /branches/3.1/tools/get_patches.sh
+ M /branches/3.1/tune/bidimensional_sample.c
+ M /branches/3.1/tune/speed.c
+ M /branches/3.1/tune/tuneup.c
+
+Replaced
+ Contributed by the AriC and Caramel projects
+by
+ Contributed by the AriC and Caramba projects
+------------------------------------------------------------------------
+r9894 | vlefevre | 2016-01-29 14:27:41 +0000 (Fri, 29 Jan 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/configure.ac
+
+[configure.ac] Improved consistency in messages.
+(merged changeset r9893 from the trunk)
+------------------------------------------------------------------------
+r9862 | vlefevre | 2016-01-21 09:17:30 +0000 (Thu, 21 Jan 2016) | 4 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tests/tsqrt.c
+
+[tests/tsqrt.c] Improved testcase for the mpfr_sqrt bug fixed in r9860,
+with detailed comment: the precision of the result has to be a multiple
+of the number of bits per word and rounding has to be to nearest.
+(merged changeset r9861 from the trunk)
+------------------------------------------------------------------------
+r9860 | vlefevre | 2016-01-21 00:52:24 +0000 (Thu, 21 Jan 2016) | 3 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src/sqrt.c
+ M /branches/3.1/tests/tsqrt.c
+
+Fixed bug in mpfr_sqrt reported by Fredrik Johansson, occurring when
+the result has to be rounded up to a power of 2.
+(merged changesets r9857-9859 from the trunk)
+------------------------------------------------------------------------
+r9855 | vlefevre | 2016-01-20 15:29:28 +0000 (Wed, 20 Jan 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/doc/algorithms.tex
+ M /branches/3.1/src/zeta.c
+ M /branches/3.1/tests/tzeta.c
+
+Fixed bug for zeta(s) with s near an even negative integer.
+(merged changesets r9852-9854 from the trunk)
+------------------------------------------------------------------------
+r9849 | vlefevre | 2016-01-20 13:57:31 +0000 (Wed, 20 Jan 2016) | 9 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tests/tgeneric.c
+
+[tests/tgeneric.c] Improved the generic tests in order to trigger the
+mpfr_jn bug found by Fredrik Johansson (r9845) and potential similar
+bugs: For half cases, the precision of the inputs was modified to be
+smaller than the base precision (for the result). Here, this rule is
+changed so that if the base precision is small (< 16), then the
+precision of the inputs is chosen to be significantly *larger* than
+the base precision in general.
+Note: With this improvement, both tj0 and tj1 fail in r9844.
+(merged changeset r9848 from the trunk; conflict resolved)
+------------------------------------------------------------------------
+r9845 | vlefevre | 2016-01-20 09:25:16 +0000 (Wed, 20 Jan 2016) | 2 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/doc/algorithms.tex
+ M /branches/3.1/src/jyn_asympt.c
+ M /branches/3.1/tests/tj0.c
+
+Fixed bug found by Fredrik Johansson in the mpfr_jn family of functions.
+(merged changesets r9841-9842,9844 from the trunk)
+------------------------------------------------------------------------
+r9782 | vlefevre | 2016-01-01 02:28:53 +0000 (Fri, 01 Jan 2016) | 1 line
+Changed paths:
+ M /branches/3.1/doc/mpfr.texi
+
+[doc/mpfr.texi] Updated the month.
+------------------------------------------------------------------------
+r9781 | vlefevre | 2016-01-01 02:27:59 +0000 (Fri, 01 Jan 2016) | 5 lines
+Changed paths:
+ M /branches/3.1/BUGS
+ M /branches/3.1/INSTALL
+ M /branches/3.1/Makefile.am
+ M /branches/3.1/NEWS
+ M /branches/3.1/README
+ M /branches/3.1/TODO
+ M /branches/3.1/acinclude.m4
+ M /branches/3.1/configure.ac
+ M /branches/3.1/doc/FAQ.html
+ M /branches/3.1/doc/Makefile.am
+ M /branches/3.1/doc/README.dev
+ M /branches/3.1/doc/faq.xsl
+ M /branches/3.1/doc/mpfr.texi
+ M /branches/3.1/examples/divworst.c
+ M /branches/3.1/examples/rndo-add.c
+ M /branches/3.1/examples/sample.c
+ M /branches/3.1/examples/version.c
+ M /branches/3.1/src/Makefile.am
+ M /branches/3.1/src/abort_prec_max.c
+ M /branches/3.1/src/acos.c
+ M /branches/3.1/src/acosh.c
+ M /branches/3.1/src/add.c
+ M /branches/3.1/src/add1.c
+ M /branches/3.1/src/add1sp.c
+ M /branches/3.1/src/add_d.c
+ M /branches/3.1/src/add_ui.c
+ M /branches/3.1/src/agm.c
+ M /branches/3.1/src/ai.c
+ M /branches/3.1/src/amd/amdfam10/mparam.h
+ M /branches/3.1/src/amd/athlon/mparam.h
+ M /branches/3.1/src/amd/k8/mparam.h
+ M /branches/3.1/src/arm/mparam.h
+ M /branches/3.1/src/asin.c
+ M /branches/3.1/src/asinh.c
+ M /branches/3.1/src/atan.c
+ M /branches/3.1/src/atan2.c
+ M /branches/3.1/src/atanh.c
+ M /branches/3.1/src/bernoulli.c
+ M /branches/3.1/src/buildopt.c
+ M /branches/3.1/src/cache.c
+ M /branches/3.1/src/cbrt.c
+ M /branches/3.1/src/check.c
+ M /branches/3.1/src/clear.c
+ M /branches/3.1/src/clears.c
+ M /branches/3.1/src/cmp.c
+ M /branches/3.1/src/cmp2.c
+ M /branches/3.1/src/cmp_abs.c
+ M /branches/3.1/src/cmp_d.c
+ M /branches/3.1/src/cmp_ld.c
+ M /branches/3.1/src/cmp_si.c
+ M /branches/3.1/src/cmp_ui.c
+ M /branches/3.1/src/comparisons.c
+ M /branches/3.1/src/const_catalan.c
+ M /branches/3.1/src/const_euler.c
+ M /branches/3.1/src/const_log2.c
+ M /branches/3.1/src/const_pi.c
+ M /branches/3.1/src/constant.c
+ M /branches/3.1/src/copysign.c
+ M /branches/3.1/src/cos.c
+ M /branches/3.1/src/cosh.c
+ M /branches/3.1/src/cot.c
+ M /branches/3.1/src/coth.c
+ M /branches/3.1/src/csc.c
+ M /branches/3.1/src/csch.c
+ M /branches/3.1/src/d_div.c
+ M /branches/3.1/src/d_sub.c
+ M /branches/3.1/src/digamma.c
+ M /branches/3.1/src/dim.c
+ M /branches/3.1/src/div.c
+ M /branches/3.1/src/div_2exp.c
+ M /branches/3.1/src/div_2si.c
+ M /branches/3.1/src/div_2ui.c
+ M /branches/3.1/src/div_d.c
+ M /branches/3.1/src/div_ui.c
+ M /branches/3.1/src/dump.c
+ M /branches/3.1/src/eint.c
+ M /branches/3.1/src/eq.c
+ M /branches/3.1/src/erf.c
+ M /branches/3.1/src/erfc.c
+ M /branches/3.1/src/exceptions.c
+ M /branches/3.1/src/exp.c
+ M /branches/3.1/src/exp10.c
+ M /branches/3.1/src/exp2.c
+ M /branches/3.1/src/exp3.c
+ M /branches/3.1/src/exp_2.c
+ M /branches/3.1/src/expm1.c
+ M /branches/3.1/src/extract.c
+ M /branches/3.1/src/factorial.c
+ M /branches/3.1/src/fits_intmax.c
+ M /branches/3.1/src/fits_s.h
+ M /branches/3.1/src/fits_sint.c
+ M /branches/3.1/src/fits_slong.c
+ M /branches/3.1/src/fits_sshort.c
+ M /branches/3.1/src/fits_u.h
+ M /branches/3.1/src/fits_uint.c
+ M /branches/3.1/src/fits_uintmax.c
+ M /branches/3.1/src/fits_ulong.c
+ M /branches/3.1/src/fits_ushort.c
+ M /branches/3.1/src/fma.c
+ M /branches/3.1/src/fms.c
+ M /branches/3.1/src/frac.c
+ M /branches/3.1/src/free_cache.c
+ M /branches/3.1/src/frexp.c
+ M /branches/3.1/src/gamma.c
+ M /branches/3.1/src/gammaonethird.c
+ M /branches/3.1/src/gen_inverse.h
+ M /branches/3.1/src/generic/mparam.h
+ M /branches/3.1/src/get_d.c
+ M /branches/3.1/src/get_d64.c
+ M /branches/3.1/src/get_exp.c
+ M /branches/3.1/src/get_f.c
+ M /branches/3.1/src/get_flt.c
+ M /branches/3.1/src/get_ld.c
+ M /branches/3.1/src/get_si.c
+ M /branches/3.1/src/get_sj.c
+ M /branches/3.1/src/get_str.c
+ M /branches/3.1/src/get_ui.c
+ M /branches/3.1/src/get_uj.c
+ M /branches/3.1/src/get_z.c
+ M /branches/3.1/src/get_z_exp.c
+ M /branches/3.1/src/gmp_op.c
+ M /branches/3.1/src/grandom.c
+ M /branches/3.1/src/hppa/mparam.h
+ M /branches/3.1/src/hypot.c
+ M /branches/3.1/src/ia64/mparam.h
+ M /branches/3.1/src/ieee_floats.h
+ M /branches/3.1/src/init.c
+ M /branches/3.1/src/init2.c
+ M /branches/3.1/src/inits.c
+ M /branches/3.1/src/inits2.c
+ M /branches/3.1/src/inp_str.c
+ M /branches/3.1/src/int_ceil_log2.c
+ M /branches/3.1/src/isinf.c
+ M /branches/3.1/src/isinteger.c
+ M /branches/3.1/src/isnan.c
+ M /branches/3.1/src/isnum.c
+ M /branches/3.1/src/isqrt.c
+ M /branches/3.1/src/isregular.c
+ M /branches/3.1/src/iszero.c
+ M /branches/3.1/src/jn.c
+ M /branches/3.1/src/jyn_asympt.c
+ M /branches/3.1/src/li2.c
+ M /branches/3.1/src/lngamma.c
+ M /branches/3.1/src/log.c
+ M /branches/3.1/src/log10.c
+ M /branches/3.1/src/log1p.c
+ M /branches/3.1/src/log2.c
+ M /branches/3.1/src/logging.c
+ M /branches/3.1/src/min_prec.c
+ M /branches/3.1/src/minmax.c
+ M /branches/3.1/src/modf.c
+ M /branches/3.1/src/mp_clz_tab.c
+ M /branches/3.1/src/mparam_h.in
+ M /branches/3.1/src/mpf2mpfr.h
+ M /branches/3.1/src/mpfr-gmp.c
+ M /branches/3.1/src/mpfr-gmp.h
+ M /branches/3.1/src/mpfr-impl.h
+ M /branches/3.1/src/mpfr-intmax.h
+ M /branches/3.1/src/mpfr-longlong.h
+ M /branches/3.1/src/mpfr-thread.h
+ M /branches/3.1/src/mpfr.h
+ M /branches/3.1/src/mpn_exp.c
+ M /branches/3.1/src/mul.c
+ M /branches/3.1/src/mul_2exp.c
+ M /branches/3.1/src/mul_2si.c
+ M /branches/3.1/src/mul_2ui.c
+ M /branches/3.1/src/mul_d.c
+ M /branches/3.1/src/mul_ui.c
+ M /branches/3.1/src/mulders.c
+ M /branches/3.1/src/neg.c
+ M /branches/3.1/src/next.c
+ M /branches/3.1/src/out_raw.c
+ M /branches/3.1/src/out_str.c
+ M /branches/3.1/src/pow.c
+ M /branches/3.1/src/pow_si.c
+ M /branches/3.1/src/pow_ui.c
+ M /branches/3.1/src/pow_z.c
+ M /branches/3.1/src/powerof2.c
+ M /branches/3.1/src/powerpc32/mparam.h
+ M /branches/3.1/src/powerpc64/mparam.h
+ M /branches/3.1/src/print_raw.c
+ M /branches/3.1/src/print_rnd_mode.c
+ M /branches/3.1/src/printf.c
+ M /branches/3.1/src/rec_sqrt.c
+ M /branches/3.1/src/reldiff.c
+ M /branches/3.1/src/rem1.c
+ M /branches/3.1/src/rint.c
+ M /branches/3.1/src/root.c
+ M /branches/3.1/src/round_near_x.c
+ M /branches/3.1/src/round_p.c
+ M /branches/3.1/src/round_prec.c
+ M /branches/3.1/src/round_raw_generic.c
+ M /branches/3.1/src/scale2.c
+ M /branches/3.1/src/sec.c
+ M /branches/3.1/src/sech.c
+ M /branches/3.1/src/set.c
+ M /branches/3.1/src/set_d.c
+ M /branches/3.1/src/set_d64.c
+ M /branches/3.1/src/set_dfl_prec.c
+ M /branches/3.1/src/set_exp.c
+ M /branches/3.1/src/set_f.c
+ M /branches/3.1/src/set_flt.c
+ M /branches/3.1/src/set_inf.c
+ M /branches/3.1/src/set_ld.c
+ M /branches/3.1/src/set_nan.c
+ M /branches/3.1/src/set_prc_raw.c
+ M /branches/3.1/src/set_prec.c
+ M /branches/3.1/src/set_q.c
+ M /branches/3.1/src/set_rnd.c
+ M /branches/3.1/src/set_si.c
+ M /branches/3.1/src/set_si_2exp.c
+ M /branches/3.1/src/set_sj.c
+ M /branches/3.1/src/set_str.c
+ M /branches/3.1/src/set_str_raw.c
+ M /branches/3.1/src/set_ui.c
+ M /branches/3.1/src/set_ui_2exp.c
+ M /branches/3.1/src/set_uj.c
+ M /branches/3.1/src/set_z.c
+ M /branches/3.1/src/set_z_exp.c
+ M /branches/3.1/src/set_zero.c
+ M /branches/3.1/src/setmax.c
+ M /branches/3.1/src/setmin.c
+ M /branches/3.1/src/setsign.c
+ M /branches/3.1/src/sgn.c
+ M /branches/3.1/src/si_op.c
+ M /branches/3.1/src/signbit.c
+ M /branches/3.1/src/sin.c
+ M /branches/3.1/src/sin_cos.c
+ M /branches/3.1/src/sinh.c
+ M /branches/3.1/src/sinh_cosh.c
+ M /branches/3.1/src/sparc64/mparam.h
+ M /branches/3.1/src/sqr.c
+ M /branches/3.1/src/sqrt.c
+ M /branches/3.1/src/sqrt_ui.c
+ M /branches/3.1/src/stack_interface.c
+ M /branches/3.1/src/strtofr.c
+ M /branches/3.1/src/sub.c
+ M /branches/3.1/src/sub1.c
+ M /branches/3.1/src/sub1sp.c
+ M /branches/3.1/src/sub_d.c
+ M /branches/3.1/src/sub_ui.c
+ M /branches/3.1/src/subnormal.c
+ M /branches/3.1/src/sum.c
+ M /branches/3.1/src/swap.c
+ M /branches/3.1/src/tan.c
+ M /branches/3.1/src/tanh.c
+ M /branches/3.1/src/uceil_exp2.c
+ M /branches/3.1/src/uceil_log2.c
+ M /branches/3.1/src/ufloor_log2.c
+ M /branches/3.1/src/ui_div.c
+ M /branches/3.1/src/ui_pow.c
+ M /branches/3.1/src/ui_pow_ui.c
+ M /branches/3.1/src/ui_sub.c
+ M /branches/3.1/src/urandom.c
+ M /branches/3.1/src/urandomb.c
+ M /branches/3.1/src/vasprintf.c
+ M /branches/3.1/src/version.c
+ M /branches/3.1/src/volatile.c
+ M /branches/3.1/src/x86/core2/mparam.h
+ M /branches/3.1/src/x86/mparam.h
+ M /branches/3.1/src/x86_64/core2/mparam.h
+ M /branches/3.1/src/x86_64/pentium4/mparam.h
+ M /branches/3.1/src/yn.c
+ M /branches/3.1/src/zeta.c
+ M /branches/3.1/src/zeta_ui.c
+ M /branches/3.1/tests/Makefile.am
+ M /branches/3.1/tests/cmp_str.c
+ M /branches/3.1/tests/data/digamma
+ M /branches/3.1/tests/data/li2
+ M /branches/3.1/tests/memory.c
+ M /branches/3.1/tests/mpf_compat.c
+ M /branches/3.1/tests/mpf_compat.h
+ M /branches/3.1/tests/mpfr-test.h
+ M /branches/3.1/tests/mpfr_compat.c
+ M /branches/3.1/tests/random2.c
+ M /branches/3.1/tests/reuse.c
+ M /branches/3.1/tests/rnd_mode.c
+ M /branches/3.1/tests/tabs.c
+ M /branches/3.1/tests/tacos.c
+ M /branches/3.1/tests/tacosh.c
+ M /branches/3.1/tests/tadd.c
+ M /branches/3.1/tests/tadd1sp.c
+ M /branches/3.1/tests/tadd_d.c
+ M /branches/3.1/tests/tadd_ui.c
+ M /branches/3.1/tests/tagm.c
+ M /branches/3.1/tests/tai.c
+ M /branches/3.1/tests/tasin.c
+ M /branches/3.1/tests/tasinh.c
+ M /branches/3.1/tests/tatan.c
+ M /branches/3.1/tests/tatanh.c
+ M /branches/3.1/tests/taway.c
+ M /branches/3.1/tests/tbuildopt.c
+ M /branches/3.1/tests/tcan_round.c
+ M /branches/3.1/tests/tcbrt.c
+ M /branches/3.1/tests/tcheck.c
+ M /branches/3.1/tests/tcmp.c
+ M /branches/3.1/tests/tcmp2.c
+ M /branches/3.1/tests/tcmp_d.c
+ M /branches/3.1/tests/tcmp_ld.c
+ M /branches/3.1/tests/tcmp_ui.c
+ M /branches/3.1/tests/tcmpabs.c
+ M /branches/3.1/tests/tcomparisons.c
+ M /branches/3.1/tests/tconst_catalan.c
+ M /branches/3.1/tests/tconst_euler.c
+ M /branches/3.1/tests/tconst_log2.c
+ M /branches/3.1/tests/tconst_pi.c
+ M /branches/3.1/tests/tcopysign.c
+ M /branches/3.1/tests/tcos.c
+ M /branches/3.1/tests/tcosh.c
+ M /branches/3.1/tests/tcot.c
+ M /branches/3.1/tests/tcoth.c
+ M /branches/3.1/tests/tcsc.c
+ M /branches/3.1/tests/tcsch.c
+ M /branches/3.1/tests/td_div.c
+ M /branches/3.1/tests/td_sub.c
+ M /branches/3.1/tests/tdigamma.c
+ M /branches/3.1/tests/tdim.c
+ M /branches/3.1/tests/tdiv.c
+ M /branches/3.1/tests/tdiv_d.c
+ M /branches/3.1/tests/tdiv_ui.c
+ M /branches/3.1/tests/teint.c
+ M /branches/3.1/tests/teq.c
+ M /branches/3.1/tests/terf.c
+ M /branches/3.1/tests/tests.c
+ M /branches/3.1/tests/texceptions.c
+ M /branches/3.1/tests/texp.c
+ M /branches/3.1/tests/texp10.c
+ M /branches/3.1/tests/texp2.c
+ M /branches/3.1/tests/texpm1.c
+ M /branches/3.1/tests/tfactorial.c
+ M /branches/3.1/tests/tfits.c
+ M /branches/3.1/tests/tfma.c
+ M /branches/3.1/tests/tfmod.c
+ M /branches/3.1/tests/tfms.c
+ M /branches/3.1/tests/tfprintf.c
+ M /branches/3.1/tests/tfrac.c
+ M /branches/3.1/tests/tfrexp.c
+ M /branches/3.1/tests/tgamma.c
+ M /branches/3.1/tests/tgeneric.c
+ M /branches/3.1/tests/tgeneric_ui.c
+ M /branches/3.1/tests/tget_d.c
+ M /branches/3.1/tests/tget_d_2exp.c
+ M /branches/3.1/tests/tget_f.c
+ M /branches/3.1/tests/tget_flt.c
+ M /branches/3.1/tests/tget_ld_2exp.c
+ M /branches/3.1/tests/tget_set_d64.c
+ M /branches/3.1/tests/tget_sj.c
+ M /branches/3.1/tests/tget_str.c
+ M /branches/3.1/tests/tget_z.c
+ M /branches/3.1/tests/tgmpop.c
+ M /branches/3.1/tests/tgrandom.c
+ M /branches/3.1/tests/thyperbolic.c
+ M /branches/3.1/tests/thypot.c
+ M /branches/3.1/tests/tinits.c
+ M /branches/3.1/tests/tinp_str.c
+ M /branches/3.1/tests/tinternals.c
+ M /branches/3.1/tests/tisnan.c
+ M /branches/3.1/tests/tisqrt.c
+ M /branches/3.1/tests/tj0.c
+ M /branches/3.1/tests/tj1.c
+ M /branches/3.1/tests/tjn.c
+ M /branches/3.1/tests/tl2b.c
+ M /branches/3.1/tests/tlgamma.c
+ M /branches/3.1/tests/tli2.c
+ M /branches/3.1/tests/tlngamma.c
+ M /branches/3.1/tests/tlog.c
+ M /branches/3.1/tests/tlog10.c
+ M /branches/3.1/tests/tlog1p.c
+ M /branches/3.1/tests/tlog2.c
+ M /branches/3.1/tests/tmin_prec.c
+ M /branches/3.1/tests/tminmax.c
+ M /branches/3.1/tests/tmodf.c
+ M /branches/3.1/tests/tmul.c
+ M /branches/3.1/tests/tmul_2exp.c
+ M /branches/3.1/tests/tmul_d.c
+ M /branches/3.1/tests/tmul_ui.c
+ M /branches/3.1/tests/tnext.c
+ M /branches/3.1/tests/tout_str.c
+ M /branches/3.1/tests/toutimpl.c
+ M /branches/3.1/tests/tpow.c
+ M /branches/3.1/tests/tpow3.c
+ M /branches/3.1/tests/tpow_all.c
+ M /branches/3.1/tests/tpow_z.c
+ M /branches/3.1/tests/tprintf.c
+ M /branches/3.1/tests/trandom.c
+ M /branches/3.1/tests/trec_sqrt.c
+ M /branches/3.1/tests/tremquo.c
+ M /branches/3.1/tests/trint.c
+ M /branches/3.1/tests/troot.c
+ M /branches/3.1/tests/tround_prec.c
+ M /branches/3.1/tests/tsec.c
+ M /branches/3.1/tests/tsech.c
+ M /branches/3.1/tests/tset.c
+ M /branches/3.1/tests/tset_d.c
+ M /branches/3.1/tests/tset_exp.c
+ M /branches/3.1/tests/tset_f.c
+ M /branches/3.1/tests/tset_ld.c
+ M /branches/3.1/tests/tset_q.c
+ M /branches/3.1/tests/tset_si.c
+ M /branches/3.1/tests/tset_sj.c
+ M /branches/3.1/tests/tset_str.c
+ M /branches/3.1/tests/tset_z.c
+ M /branches/3.1/tests/tset_z_exp.c
+ M /branches/3.1/tests/tsgn.c
+ M /branches/3.1/tests/tsi_op.c
+ M /branches/3.1/tests/tsin.c
+ M /branches/3.1/tests/tsin_cos.c
+ M /branches/3.1/tests/tsinh.c
+ M /branches/3.1/tests/tsinh_cosh.c
+ M /branches/3.1/tests/tsprintf.c
+ M /branches/3.1/tests/tsqr.c
+ M /branches/3.1/tests/tsqrt.c
+ M /branches/3.1/tests/tsqrt_ui.c
+ M /branches/3.1/tests/tstckintc.c
+ M /branches/3.1/tests/tstdint.c
+ M /branches/3.1/tests/tstrtofr.c
+ M /branches/3.1/tests/tsub.c
+ M /branches/3.1/tests/tsub1sp.c
+ M /branches/3.1/tests/tsub_d.c
+ M /branches/3.1/tests/tsub_ui.c
+ M /branches/3.1/tests/tsubnormal.c
+ M /branches/3.1/tests/tsum.c
+ M /branches/3.1/tests/tswap.c
+ M /branches/3.1/tests/ttan.c
+ M /branches/3.1/tests/ttanh.c
+ M /branches/3.1/tests/ttrunc.c
+ M /branches/3.1/tests/tui_div.c
+ M /branches/3.1/tests/tui_pow.c
+ M /branches/3.1/tests/tui_sub.c
+ M /branches/3.1/tests/turandom.c
+ M /branches/3.1/tests/tvalist.c
+ M /branches/3.1/tests/tversion.c
+ M /branches/3.1/tests/ty0.c
+ M /branches/3.1/tests/ty1.c
+ M /branches/3.1/tests/tyn.c
+ M /branches/3.1/tests/tzeta.c
+ M /branches/3.1/tests/tzeta_ui.c
+ M /branches/3.1/tools/ck-copyright-notice
+ M /branches/3.1/tools/ck-mparam
+ M /branches/3.1/tools/ck-version-info
+ M /branches/3.1/tools/get_patches.sh
+ M /branches/3.1/tune/Makefile.am
+ M /branches/3.1/tune/bidimensional_sample.c
+ M /branches/3.1/tune/speed.c
+ M /branches/3.1/tune/tuneup.c
+
+Copyright notice update: added 2016 with
+ perl -pi -e 's/ (\d{4}-)?(2015)(?= Free Software)/
+ " ".($1||"$2-").($2+1)/e' **/*(^/)
+under zsh (the m4 and tools/mbench directories were not modified).
+Removed 2015 from the example in the doc/README.dev file.
+------------------------------------------------------------------------
+r9711 | vlefevre | 2015-10-29 13:39:59 +0000 (Thu, 29 Oct 2015) | 3 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src/mulders.c
+ M /branches/3.1/tests/tdiv.c
+
+Fixed bug in mulders.c (affecting mpfr_div) reported by Ricky Farr:
+<https://sympa.inria.fr/sympa/arc/mpfr/2015-10/msg00023.html>
+(merged changeset r9699 from the trunk; conflict resolved)
+------------------------------------------------------------------------
+r9698 | vlefevre | 2015-10-22 14:38:38 +0000 (Thu, 22 Oct 2015) | 3 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/autogen.sh
+
+[autogen.sh] Restore the INSTALL file also if the process receives
+a usual signal (SIGHUP, SIGINT, SIGQUIT or SIGTERM).
+(merged changeset r9697 from the trunk)
+------------------------------------------------------------------------
+r9664 | vlefevre | 2015-08-25 18:31:55 +0000 (Tue, 25 Aug 2015) | 3 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src/const_log2.c
+ M /branches/3.1/src/const_pi.c
+ M /branches/3.1/src/exceptions.c
+ M /branches/3.1/src/mpfr-impl.h
+ M /branches/3.1/src/set_dfl_prec.c
+ M /branches/3.1/src/set_rnd.c
+
+Fixed warnings from GCC's -Wold-style-declaration option:
+MPFR_THREAD_ATTR must be at beginning of declaration.
+(merged changeset r8725 from the trunk)
+------------------------------------------------------------------------
+r9644 | vlefevre | 2015-08-20 01:21:21 +0000 (Thu, 20 Aug 2015) | 2 lines
+Changed paths:
+ M /branches/3.1/configure.ac
+
+[configure.ac] Added test for usability of gmp.h at link time (needed
+because of a known incompatibility between GMP 4.1 and GCC 5).
+------------------------------------------------------------------------
+r9633 | vlefevre | 2015-07-20 22:20:21 +0000 (Mon, 20 Jul 2015) | 4 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/tests/tversion.c
+
+[tests/tversion.c]
+ * Output MPFR_VERSION_STRING.
+ * Check and output additional mpfr_buildopt_* info.
+(merged changesets r9630-9631 from the trunk)
+------------------------------------------------------------------------
+r9621 | vlefevre | 2015-07-17 00:33:35 +0000 (Fri, 17 Jul 2015) | 4 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src/frexp.c
+ M /branches/3.1/tests/tfrexp.c
+
+[src/frexp.c] Fixed a bug occurring when the current exponent range
+does not contain 0. Handle internal overflow.
+[tests/tfrexp.c] Added corresponding testcases.
+(merged changesets r9592,9594,9599-9600,9613,9617,9619 from the trunk)
+------------------------------------------------------------------------
+r9620 | vlefevre | 2015-07-17 00:26:03 +0000 (Fri, 17 Jul 2015) | 7 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src/div_2si.c
+ M /branches/3.1/src/div_2ui.c
+ M /branches/3.1/src/mul_2si.c
+ M /branches/3.1/tests/tmul_2exp.c
+
+[src/{div_2si.c,div_2ui.c,mul_2si.c}] Fixed some underflow cases in
+rounding to nearest when the exact result is -2^(emin-2), i.e. the
+middle of 0 and the minimum negative number in absolute value (the
+correction in r5517 was incorrect/incomplete).
+[tests/tmul_2exp.c] Extended the underflow() test to negative numbers,
+triggering the bug fixed here.
+(merged changesets r9614,9616 from the trunk)
+------------------------------------------------------------------------
+r9608 | vlefevre | 2015-07-02 01:17:21 +0000 (Thu, 02 Jul 2015) | 4 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/src/div_2si.c
+ M /branches/3.1/src/div_2ui.c
+ M /branches/3.1/src/mul_2si.c
+ M /branches/3.1/tests/tmul_2exp.c
+
+[src/{div_2si.c,div_2ui.c,mul_2si.c}] Fixed overflow case when n = 0.
+[tests/tmul_2exp.c] Added overflow tests (triggering the above bugs).
+(merged changesets r9593,9595-9598 from the trunk, with mpfr_flags_t
+replaced by unsigned int)
+------------------------------------------------------------------------
+r9607 | vlefevre | 2015-07-02 00:51:31 +0000 (Thu, 02 Jul 2015) | 1 line
+Changed paths:
+ M /branches/3.1/doc/mpfr.texi
+
+[doc/mpfr.texi] Updated the month.
+------------------------------------------------------------------------
+r9606 | vlefevre | 2015-07-02 00:50:57 +0000 (Thu, 02 Jul 2015) | 7 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/doc/mpfr.texi
+
+[doc/mpfr.texi] Replaced periods ending a sentence by "@." in the
+following cases: when the preceding character is a capital letter
+or a closing parenthesis following a capital letter (e.g. "NaN.",
+"MPFR.", "MPFR).", etc). This is needed to get correct spacing in
+the generated .info and PDF files with the next sentence of the
+paragraph (when there is one).
+(merged changeset r8643 from the trunk)
+------------------------------------------------------------------------
+r9605 | vlefevre | 2015-07-02 00:47:18 +0000 (Thu, 02 Jul 2015) | 10 lines
+Changed paths:
+ M /branches/3.1
+ M /branches/3.1/doc/mpfr.texi
+ M /branches/3.1/src/lngamma.c
+ M /branches/3.1/tests/tlngamma.c
+
+[doc/mpfr.texi] Completed specification:
+ * on special numbers (±0, ±Inf);
+ * of mpfr_lngamma and mpfr_lgamma on 1 and 2 (result is +0);
+ * general rules for special values and on mpfr_lngamma.
+[src/lngamma.c] Fixed mpfr_lngamma behavior on nonpositive integers
+ and -Inf.
+[tests/tlngamma.c] Update. Test the flags for some special values.
+See <https://sympa.inria.fr/sympa/arc/mpfr/2013-08/msg00008.html> about
+the behavior of mpfr_lngamma on zero and general rule for such limits.
+(merged changesets r8629,8632-8633,8841,8847 from the trunk)
+------------------------------------------------------------------------
+r9603 | vlefevre | 2015-07-02 00:15:21 +0000 (Thu, 02 Jul 2015) | 2 lines
+Changed paths:
+ M /branches/3.1/tools/mpfrlint
+
+[tools/mpfrlint] Check a Texinfo rule (Section "Ending a Sentence")
+with common words that end with a capital letter.
+------------------------------------------------------------------------
+r9587 | vlefevre | 2015-06-19 22:39:52 +0000 (Fri, 19 Jun 2015) | 1 line
+Changed paths:
+ M /branches/3.1/INSTALL
+ M /branches/3.1/VERSION
+ M /branches/3.1/configure.ac
+ M /branches/3.1/doc/mpfr.texi
+ M /branches/3.1/src/mpfr.h
+ M /branches/3.1/src/version.c
+
+Updated version to 3.1.4-dev.
+------------------------------------------------------------------------
+r9583 | vlefevre | 2015-06-19 19:51:51 +0000 (Fri, 19 Jun 2015) | 1 line
+Changed paths:
+ M /branches/3.1/ChangeLog
+
+ChangeLog update with "TZ=UTC svn log -rHEAD:0 -v" (in UTF-8 locales).
+------------------------------------------------------------------------
r9582 | vlefevre | 2015-06-19 19:50:16 +0000 (Fri, 19 Jun 2015) | 1 line
Changed paths:
M /branches/3.1/VERSION
diff --git a/Build/source/libs/mpfr/mpfr-src/INSTALL b/Build/source/libs/mpfr/mpfr-src/INSTALL
index 442ff3f9436..e42f55f18b2 100644
--- a/Build/source/libs/mpfr/mpfr-src/INSTALL
+++ b/Build/source/libs/mpfr/mpfr-src/INSTALL
@@ -1,5 +1,5 @@
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -37,17 +37,17 @@ MPFR).
not been done yet and if patches are available. You can check
on the release page:
- http://www.mpfr.org/mpfr-3.1.3/
+ http://www.mpfr.org/mpfr-3.1.4/
which may have additional information. The patches can be applied
with commands like:
- wget http://www.mpfr.org/mpfr-3.1.3/allpatches
+ wget http://www.mpfr.org/mpfr-3.1.4/allpatches
patch -N -Z -p1 < allpatches
or
- curl http://www.mpfr.org/mpfr-3.1.3/allpatches | patch -N -Z -p1
+ curl http://www.mpfr.org/mpfr-3.1.4/allpatches | patch -N -Z -p1
(Those instructions are for the GNU patch command, for example
/usr/bin/gpatch on Solaris.)
@@ -338,7 +338,7 @@ Several documents may help you to solve the problem:
* the FAQ (either the FAQ.html file distributed with MPFR, or the
on-line version <http://www.mpfr.org/faq.html>, which may be more
up-to-date);
- * the MPFR web page for this version <http://www.mpfr.org/mpfr-3.1.3/>,
+ * the MPFR web page for this version <http://www.mpfr.org/mpfr-3.1.4/>,
which lists bugs found in this version and provides some patches.
If the "configure" fails, please check that the C compiler and its
@@ -497,22 +497,20 @@ not use conversions with the long double type.
Notes on AIX/PowerPC
====================
-The following has been tested on AIX 5.3 (powerpc-ibm-aix5.3.0.0) with
-gcc 3.3.2 and GMP 4.2.1.
+The following has been tested on AIX 7.1.3 (gcc111.fsffrance.org)
+with gcc 4.8.1 and GMP 6.1.0.
If GMP was built with the 64-bit ABI, before building and testing MPFR,
you should set the OBJECT_MODE environment variable to 64, e.g., with:
export OBJECT_MODE=64
-(in a sh-compatible shell). But you should also provide a correct CFLAGS
-value to the "configure" script: using --with-gmp-build is not sufficient
-due to the early compiler tests, as gcc will not compile any program if
-OBJECT_MODE is 64 and the -maix64 option is not provided.
+(in a sh-compatible shell). Alternatively add the following to the configure
+line: AR="ar -X64" NM="nm -B -X64".
-MPFR for use with 32-bit Windows Applications (win32)
-=====================================================
+MPFR for use with Windows Applications
+======================================
There are several ways of building MPFR on Windows, the most appropriate
approach depending on how you intend to use the resulting libraries.
@@ -520,71 +518,24 @@ approach depending on how you intend to use the resulting libraries.
a. Using MinGW
==============
-1 - We advise to use MinGW (http://www.mingw.org/), which is simpler and
- less demanding than Cygwin. Contrary to Cygwin, it also provides native
- Windows code.
+1 - We advise to use MinGW (http://www.mingw.org/ for 32-bit, and
+ https://sourceforge.net/projects/mingw-w64/ for 32- and 64-bit),
+ which is simpler and less demanding than Cygwin. Contrary to Cygwin,
+ it also provides native Windows code.
2 - If you just want to make a binary with gcc, there is nothing to do:
GMP, MPFR and the program compile exactly as under Linux.
- But if you want to generate a library for MinGW from a Cygwin
- environment, you may need the -mno-cygwin gcc option (otherwise
- a typical error is _P_WAIT being undeclared).
-
-3 - If you want to make libraries work under another Windows compiler
- like Visual C / C++, since the unix-like *.a library files are compatible
- with Windows *.lib files, you can simply rename all *.a libraries to *.lib.
-
- With gmp-4.1.3, the only remaining problem seems to be the "alloca" calls
- in GMP. Configuring GMP and MPFR with --enable-alloca=malloc-reentrant
- should work (if you build MPFR with GMP internal files).
-
- Or you could add the library
- "$MINGWIN$/lib/gcc-lib/mingw32/$VERSION$/libgcc.a"
- to your project: it contains all the extra-functions needed by a program
- compiled by gcc (division of 64-bit integer, bcopy, alloca...).
- Of course, include it if and only if your compiler is not gcc.
-4 - On Windows32 / MinGW, if all the tests fail, try to run the test suite
- with "make check EXEEXT=".
-
-5 - To avoid using the Microsoft runtime (which might not be conform to ISO C),
+3 - To avoid using the Microsoft runtime (which might not be conform to ISO C),
you can use the MinGW runtime package (which is an integral part of MinGW).
For example, with MinGW versions 3.15 and later you can get an
ISO-compliant printf() if you compile your application with either
- '-ansi', '-posix' or '-D__USE_MINGW_ANSI_STDIO'. For example, you can
- compile and test MPFR with CC="gcc -D__USE_MINGW_ANSI_STDIO".
-
- For example under Win32, the following problem has been experienced with
- MPFR 2.4.0 RC1 and the MSVC runtime (msvcrt.dll):
-
- Error in mpfr_vsprintf (s, "%.*Zi, %R*e, %Lf%n", ...);
- expected: "00000010610209857723, -1.2345678875e+07, 0.032258"
- got: "00000010610209857723, -1.2345678875e+07, -0.000000"
- FAIL: tsprintf.exe
-
- This error is due to the MSVC runtime not supporting the L length modifier
- for formatted output (e.g. printf with %Lf). You can check this with the
- following program:
-
- #include <stdio.h>
- int main (void)
- {
- long double d = 1. / 31.;
- printf ("%Lf\n", d);
- return 0;
- }
-
- The expected output is 0.032258.
-
- Note: The L modifier has been standard for a long time (it was added
- in ISO C89).
-
- Note 2: this now works correctly with Visual C++ 2008 and 2010
- (tested on Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
- 15.00.21022.08 for 80x86, Microsoft (R) C/C++ Optimizing Compiler
- Version 15.00.21022.08 for x64, Microsoft (R) 32-bit C/C++ Optimizing
- Compiler Version 16.00.30319.01 for 80x86, Microsoft (R) C/C++ Optimizing
- Compiler Version 16.00.30319.01 for x64).
+ '-ansi', '-posix' or '-D__USE_MINGW_ANSI_STDIO'. In order to have the
+ MPFR formatted output functions based on ISO-compliant printf(), you
+ need to compile GMP (not MPFR) with CC="gcc -D__USE_MINGW_ANSI_STDIO"
+ (since the standard printf modifiers %Ld and %td are passed to GMP).
+ Building MPFR with -D__USE_MINGW_ANSI_STDIO is useless except for some
+ error messages in the test suite.
b. Using Cygwin
===============
@@ -599,62 +550,20 @@ In case of failure, you may need to pass LDFLAGS='-shared-libgcc' at the
end of the configure line due to a bug in GCC. Otherwise, if threading
support is not needed, you can configure MPFR with --disable-thread-safe.
-c. Using Visual C++ 2008/2010
-=============================
-
-Win32 versions of the MPFR library can be built using Microsoft Visual
-C++ 2008 or 2010 using the build projects available here:
-
-http://gladman.plushost.co.uk/oldsite/computing/gmp4win.php
-
-These build projects contain both win32 and x64 builds but the latter
-will give errors if your version of Visual C++ lacks the 64-bit
-compiler and tools. The 32-bit build projects should however work
-on Visual C++ 2008, Visual C++ Express 2008 (SP1), Visual C++ 2010
-and Visual C++ Express 2010.
-
-MPFR for use with 64-bit Windows Applications (x64)
-===================================================
-
-There are two ways of building MPFR for use with 64-bit Windows
-applications.
-
-a. Using MinGW64
-================
-
-The MinGW64 version of the GCC compiler is now available here:
-
-https://sourceforge.net/projects/mingw-w64/
-
-It can build both GMP and MPFR for 64-bit Windows applications.
-
-b. Using Visual C++ 2008/2010
-=============================
-
-x64 versions of the MPFR library can be built using Microsoft Visual
-C++ 2008 or 2010 using the build projects available here:
-
-http://gladman.plushost.co.uk/oldsite/computing/gmp4win.php
-
-These build projects contain both win32 and x64 builds but the latter
-can only be built if your version of Visual C++ contains the 64-bit
-compiler and tools. On Visual C++ 2008, the 64-bit tools are an
-option during installation so if you don't have them you will need
-to start the Visual Studio installer and add them to your IDE
-configuration. On Visual C++ 2010 they are installed by default.
+c. Using Microsoft Visual C++ and Intel C++ Compilers
+=====================================================
-As delivered, Visual C++ Express 2008 SP1 cannot build x64 projects
-but the Windows SDK can be added to it to allow this. The IDE then
-needs to be configured as described here:
+Static and dynamic MPFR libraries for the 32- and 64-bit versions of
+Windows can be built with Microsoft Visual Studio 2015 using the
+Microsoft Visual C++ compiler, see:
-http://msdn.microsoft.com/en-us/library/9yb4317s(VS.80).aspx
+ https://www.visualstudio.com/
-to allow x64 builds.
+The Intel C++ compiler provided as a part of Intel Parallel Studio XE
+can also be used:
-Visual C++ Express 2010 requires the Windows 7 SDK to be installed
-in order to build x64 projects. This SDK is available here:
+ https://software.intel.com/en-us/intel-parallel-studio-xe
-http://tinyurl.com/25zz8r6
+The relevant build projects are available here:
-In this case, once this SDK has been installed, Visual C++ Express 2010
-will build x64 projects without further changes.
+ https://github.com/BrianGladman
diff --git a/Build/source/libs/mpfr/mpfr-src/Makefile.am b/Build/source/libs/mpfr/mpfr-src/Makefile.am
index 349121ba816..b089d277fc4 100644
--- a/Build/source/libs/mpfr/mpfr-src/Makefile.am
+++ b/Build/source/libs/mpfr/mpfr-src/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
+# Copyright 2000-2016 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.
@@ -25,7 +25,8 @@ nobase_dist_doc_DATA = AUTHORS BUGS COPYING COPYING.LESSER NEWS TODO \
examples/version.c
EXTRA_DIST = PATCHES VERSION \
- tools/ck-copyright-notice tools/ck-version-info tools/get_patches.sh \
+ tools/ck-copyright-notice tools/ck-news tools/ck-version-info \
+ tools/get_patches.sh \
$(DATAFILES)
# Various checks for "make dist".
@@ -33,6 +34,8 @@ EXTRA_DIST = PATCHES VERSION \
# file doesn't end with "-dev", check that the -version-info value is
# up-to-date. Note: this is a heuristic, to detect some mistakes.
# * Check that copyright notices exist and appear to be correct.
+# * Check the NEWS file.
dist-hook:
cd $(srcdir) && tools/ck-version-info
cd $(srcdir) && tools/ck-copyright-notice
+ cd $(srcdir) && tools/ck-news
diff --git a/Build/source/libs/mpfr/mpfr-src/NEWS b/Build/source/libs/mpfr/mpfr-src/NEWS
index e5844075672..2a18db1806a 100644
--- a/Build/source/libs/mpfr/mpfr-src/NEWS
+++ b/Build/source/libs/mpfr/mpfr-src/NEWS
@@ -1,5 +1,5 @@
-Copyright 2000-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -20,6 +20,11 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
##############################################################################
+Changes from version 3.1.3 to version 3.1.4:
+- Improved MPFR manual.
+- Bug fixes (see <http://www.mpfr.org/mpfr-3.1.3/#fixed> and ChangeLog file).
+- MinGW (MS Windows): Added support for thread-safe DLL (shared library).
+
Changes from version 3.1.2 to version 3.1.3:
- Better support for Automake 1.13+ (now used to generate the tarball).
- Improved MPFR manual.
diff --git a/Build/source/libs/mpfr/mpfr-src/README b/Build/source/libs/mpfr/mpfr-src/README
index 2f55a8cce90..c38aafc0771 100644
--- a/Build/source/libs/mpfr/mpfr-src/README
+++ b/Build/source/libs/mpfr/mpfr-src/README
@@ -1,5 +1,5 @@
-Copyright 2000-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/TODO b/Build/source/libs/mpfr/mpfr-src/TODO
index 67305f9a6d0..8967349ce49 100644
--- a/Build/source/libs/mpfr/mpfr-src/TODO
+++ b/Build/source/libs/mpfr/mpfr-src/TODO
@@ -1,5 +1,5 @@
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/VERSION b/Build/source/libs/mpfr/mpfr-src/VERSION
index ff365e06b95..0aec50e6ede 100644
--- a/Build/source/libs/mpfr/mpfr-src/VERSION
+++ b/Build/source/libs/mpfr/mpfr-src/VERSION
@@ -1 +1 @@
-3.1.3
+3.1.4
diff --git a/Build/source/libs/mpfr/mpfr-src/acinclude.m4 b/Build/source/libs/mpfr/mpfr-src/acinclude.m4
index 9850db54fed..aaaefe715c7 100644
--- a/Build/source/libs/mpfr/mpfr-src/acinclude.m4
+++ b/Build/source/libs/mpfr/mpfr-src/acinclude.m4
@@ -1,7 +1,7 @@
dnl MPFR specific autoconf macros
-dnl Copyright 2000, 2002-2015 Free Software Foundation, Inc.
-dnl Contributed by the AriC and Caramel projects, INRIA.
+dnl Copyright 2000, 2002-2016 Free Software Foundation, Inc.
+dnl Contributed by the AriC and Caramba projects, INRIA.
dnl
dnl This file is part of the GNU MPFR Library.
dnl
@@ -401,11 +401,12 @@ dnl there is some ld configuration problem. One of the effects can
dnl be that thread-local variables always evaluate to 0. So, it is
dnl important to run the test below.
if test "$enable_thread_safe" != no; then
-AC_MSG_CHECKING(for TLS support)
+AC_MSG_CHECKING(for TLS support using C11)
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$srcdir/src"
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define MPFR_USE_THREAD_SAFE 1
+#define MPFR_USE_C11_THREAD_SAFE 1
#include "mpfr-thread.h"
MPFR_THREAD_ATTR int x = 17;
int main (void) {
@@ -414,20 +415,46 @@ int main (void) {
]])],
[AC_MSG_RESULT(yes)
AC_DEFINE([MPFR_USE_THREAD_SAFE],1,[Build MPFR as thread safe])
+ AC_DEFINE([MPFR_USE_C11_THREAD_SAFE],1,[Build MPFR as thread safe using C11])
+ tls_c11_support=yes
],
[AC_MSG_RESULT(no)
- if test "$enable_thread_safe" = yes; then
- AC_MSG_ERROR([please configure with --disable-thread-safe])
- fi
],
- [if test "$enable_thread_safe" = yes; then
- AC_MSG_RESULT([cannot test, assume yes])
- AC_DEFINE([MPFR_USE_THREAD_SAFE],1,[Build MPFR as thread safe])
- else
- AC_MSG_RESULT([cannot test, assume no])
- fi
+ [AC_MSG_RESULT([cannot test, assume no])
])
CPPFLAGS="$saved_CPPFLAGS"
+
+if test "$tls_c11_support" != "yes"
+then
+
+ AC_MSG_CHECKING(for TLS support)
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$srcdir/src"
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #define MPFR_USE_THREAD_SAFE 1
+ #include "mpfr-thread.h"
+ MPFR_THREAD_ATTR int x = 17;
+ int main (void) {
+ return x != 17;
+ }
+ ]])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE([MPFR_USE_THREAD_SAFE],1,[Build MPFR as thread safe])
+ ],
+ [AC_MSG_RESULT(no)
+ if test "$enable_thread_safe" = yes; then
+ AC_MSG_ERROR([please configure with --disable-thread-safe])
+ fi
+ ],
+ [if test "$enable_thread_safe" = yes; then
+ AC_MSG_RESULT([cannot test, assume yes])
+ AC_DEFINE([MPFR_USE_THREAD_SAFE],1,[Build MPFR as thread safe])
+ else
+ AC_MSG_RESULT([cannot test, assume no])
+ fi
+ ])
+ CPPFLAGS="$saved_CPPFLAGS"
+ fi
fi
])
dnl end of MPFR_CONFIGS
diff --git a/Build/source/libs/mpfr/mpfr-src/configure.ac b/Build/source/libs/mpfr/mpfr-src/configure.ac
index 50535c7964d..369a602205f 100644
--- a/Build/source/libs/mpfr/mpfr-src/configure.ac
+++ b/Build/source/libs/mpfr/mpfr-src/configure.ac
@@ -1,8 +1,8 @@
dnl Process this file with autoconf to produce a configure script.
AC_COPYRIGHT([
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -23,7 +23,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
])
dnl Add check-news when it checks for more than 15 lines
-AC_INIT([MPFR],[3.1.3])
+AC_INIT([MPFR],[3.1.4])
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
@@ -402,7 +402,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
dnl Configs for Windows DLLs.
dnl libtool requires "-no-undefined" for win32 dll
-dnl It also disables the tests involving the linking with LIBGMP if DLL
dnl
dnl "-Wl,output-def" is used to get a .def file for use by MS lib to make
dnl a .lib import library, described in the manual.
@@ -419,7 +418,6 @@ case $host in
if test "$enable_shared" = yes; then
MPFR_LDFLAGS="$MPFR_LDFLAGS -no-undefined"
LIBMPFR_LDFLAGS="$LIBMPFR_LDFLAGS -Wl,--output-def,.libs/libmpfr-4.dll.def"
- dont_link_with_gmp="yes"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "gmp.h"
#if !__GMP_LIBGMP_DLL
@@ -473,6 +471,23 @@ error
AC_MSG_ERROR([GMP 4.1.0 min required])
])
+dnl Check if gmp.h is usable at link time; this may detect errors such as
+dnl with GMP 4.1, which uses "extern __inline__" unconditionally with all
+dnl GCC versions, which breaks by default with GCC 5.
+dnl Note: No linking is done against the GMP library at this time, as we
+dnl do not use any GMP symbol. The goal of this test is to avoid obscure
+dnl errors with the following gmp.h tests.
+AC_MSG_CHECKING(usable gmp.h at link time)
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include "gmp.h"
+]],[[]])],[AC_MSG_RESULT(yes)],[
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([There is an incompatibility between gmp.h and the compiler.
+See 'config.log' for details.
+Such an incompatibility is known between GMP 4.1, which uses
+"extern __inline__" with all GCC versions, and GCC 5.])
+])
+
dnl Check if we can use internal header files of GMP (only --with-gmp-build)
if test "$use_gmp_build" = yes ; then
AC_MSG_CHECKING(for gmp internal files)
@@ -510,18 +525,9 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
AC_MSG_ERROR([GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent.
You probably need to change some of the GMP or MPFR compile options.
See 'config.log' for details (search for GMP_NUMB_BITS).])],
- [AC_MSG_RESULT([can't test])])
+ [AC_MSG_RESULT([cannot test])])
-dnl We really need to link using libtool. But it is impossible with the current
-dnl libtool.
-dnl The practical problems appear only under MS Windows since the library name
-dnl is libgmp-3 (due to libtool versionning). The best solution
-dnl is to believe it works under MS-Windows.
-if test "$dont_link_with_gmp" = yes ; then
-LIBS="-lgmp $LIBS"
-else
-
dnl Check if we can link with GMP
AC_CHECK_LIB(gmp, __gmpz_init, [LIBS="-lgmp $LIBS"],
[AC_MSG_ERROR(libgmp not found or uses a different ABI (including static vs shared).
@@ -576,7 +582,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
AC_MSG_WARN([LIBS="$LIBS"])
AC_MSG_WARN([Temporary LD_RUN_PATH was "$LD_RUN_PATH".])
AC_MSG_WARN([==========================================================])
- ],AC_MSG_RESULT([can not test])
+ ],AC_MSG_RESULT([cannot test])
)
LD_RUN_PATH="$saved_LD_RUN_PATH"
@@ -592,9 +598,6 @@ dnl (see above).
dnl Same for __gmpn_sbpi1_divappr_q.
AC_CHECK_FUNCS([__gmpn_rootrem __gmpn_sbpi1_divappr_q])
-dnl End of tests which need to link with GMP.
-fi
-
dnl Remove also many MACROS (AC_DEFINE) which are unused by MPFR
dnl and polluate (and slow down because libtool has to parse them) the build.
if test -f confdefs.h; then
diff --git a/Build/source/libs/mpfr/mpfr-src/src/Makefile.am b/Build/source/libs/mpfr/mpfr-src/src/Makefile.am
index fc0c3384040..fbd077710b0 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/Makefile.am
+++ b/Build/source/libs/mpfr/mpfr-src/src/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 2000-2015 Free Software Foundation, Inc.
+# Copyright 2000-2016 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.
@@ -75,7 +75,7 @@ libmpfr_la_LIBADD = @LIBOBJS@
# 2.4.x 3:x:2
# 3.0.x 4:x:0
# 3.1.x 5:x:1
-libmpfr_la_LDFLAGS = $(MPFR_LDFLAGS) $(LIBMPFR_LDFLAGS) -version-info 5:3:1
+libmpfr_la_LDFLAGS = $(MPFR_LDFLAGS) $(LIBMPFR_LDFLAGS) -version-info 5:4:1
# 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
diff --git a/Build/source/libs/mpfr/mpfr-src/src/abort_prec_max.c b/Build/source/libs/mpfr/mpfr-src/src/abort_prec_max.c
index 57cd1d20858..92eb80de35b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/abort_prec_max.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/abort_prec_max.c
@@ -1,7 +1,7 @@
/* mpfr_abort_prec_max -- Abort due to maximal precision overflow.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/acos.c b/Build/source/libs/mpfr/mpfr-src/src/acos.c
index 7b2bf9e93e2..9dc79eb8a9c 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/acos.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/acos.c
@@ -1,7 +1,7 @@
/* mpfr_acos -- arc-cosinus of a floating-point number
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/acosh.c b/Build/source/libs/mpfr/mpfr-src/src/acosh.c
index a0f96dc4ae3..0bfa102e818 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/acosh.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/acosh.c
@@ -1,7 +1,7 @@
/* mpfr_acosh -- inverse hyperbolic cosine
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/add.c b/Build/source/libs/mpfr/mpfr-src/src/add.c
index c70981d9dfd..a38546b35e9 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/add.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/add.c
@@ -1,7 +1,7 @@
/* mpfr_add -- add two floating-point numbers
-Copyright 1999-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/add1.c b/Build/source/libs/mpfr/mpfr-src/src/add1.c
index b7b3094acab..9c3f21327f8 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/add1.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/add1.c
@@ -1,7 +1,7 @@
/* mpfr_add1 -- internal function to perform a "real" addition
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/add1sp.c b/Build/source/libs/mpfr/mpfr-src/src/add1sp.c
index 1435e317096..c9c92f6cc73 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/add1sp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/add1sp.c
@@ -1,8 +1,8 @@
/* mpfr_add1sp -- internal function to perform a "real" addition
All the op must have the same precision
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/add_d.c b/Build/source/libs/mpfr/mpfr-src/src/add_d.c
index ee55aed2499..47a533a79d7 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/add_d.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/add_d.c
@@ -1,8 +1,8 @@
/* mpfr_add_d -- add a multiple precision floating-point number
to a machine double precision float
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/add_ui.c b/Build/source/libs/mpfr/mpfr-src/src/add_ui.c
index 51b996c82b6..49c6752a074 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/add_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/add_ui.c
@@ -1,7 +1,7 @@
/* mpfr_add_ui -- add a floating-point number with a machine integer
-Copyright 2000-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/agm.c b/Build/source/libs/mpfr/mpfr-src/src/agm.c
index 0177e32d5e1..cef4b2bc7a9 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/agm.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/agm.c
@@ -1,7 +1,7 @@
/* mpfr_agm -- arithmetic-geometric mean of two floating-point numbers
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -96,10 +96,7 @@ mpfr_agm (mpfr_ptr r, mpfr_srcptr op2, mpfr_srcptr op1, mpfr_rnd_t rnd_mode)
/* b (op2) and a (op1) are the 2 operands but we want b >= a */
compare = mpfr_cmp (op1, op2);
if (MPFR_UNLIKELY( compare == 0 ))
- {
- mpfr_set (r, op1, rnd_mode);
- MPFR_RET (0); /* exact */
- }
+ return mpfr_set (r, op1, rnd_mode);
else if (compare > 0)
{
mpfr_srcptr t = op1;
diff --git a/Build/source/libs/mpfr/mpfr-src/src/ai.c b/Build/source/libs/mpfr/mpfr-src/src/ai.c
index cbab7cfcbe0..313cf98e1b1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/ai.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/ai.c
@@ -1,7 +1,7 @@
/* mpfr_ai -- Airy function Ai
-Copyright 2010-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2010-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/amd/amdfam10/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/amd/amdfam10/mparam.h
index 4a3e407b225..43bc9164a94 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/amd/amdfam10/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/amd/amdfam10/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/amd/athlon/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/amd/athlon/mparam.h
index 38236c4ab24..39ef0992a55 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/amd/athlon/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/amd/athlon/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/amd/k8/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/amd/k8/mparam.h
index 1f818869c0d..bd54b7f95d1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/amd/k8/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/amd/k8/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/arm/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/arm/mparam.h
index 7b73c9a7d12..592ef1895c0 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/arm/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/arm/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/asin.c b/Build/source/libs/mpfr/mpfr-src/src/asin.c
index 6aae6812dec..9556d2000ec 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/asin.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/asin.c
@@ -1,7 +1,7 @@
/* mpfr_asin -- arc-sinus of a floating-point number
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/asinh.c b/Build/source/libs/mpfr/mpfr-src/src/asinh.c
index 276aa27d719..f3274bc7a82 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/asinh.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/asinh.c
@@ -1,7 +1,7 @@
/* mpfr_asinh -- inverse hyperbolic sine
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/atan.c b/Build/source/libs/mpfr/mpfr-src/src/atan.c
index 5fb1c8a4673..cd1875c6d1e 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/atan.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/atan.c
@@ -1,7 +1,7 @@
/* mpfr_atan -- arc-tangent of a floating-point number
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/atan2.c b/Build/source/libs/mpfr/mpfr-src/src/atan2.c
index 9b7b4c3315a..02b5654ab69 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/atan2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/atan2.c
@@ -1,7 +1,7 @@
/* mpfr_atan2 -- arc-tan 2 of a floating-point number
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/atanh.c b/Build/source/libs/mpfr/mpfr-src/src/atanh.c
index 4c440bdae63..0ad46ecac0a 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/atanh.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/atanh.c
@@ -1,7 +1,7 @@
/* mpfr_atanh -- Inverse Hyperbolic Tangente
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/bernoulli.c b/Build/source/libs/mpfr/mpfr-src/src/bernoulli.c
index 0bacbb00bf3..b175a65a472 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/bernoulli.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/bernoulli.c
@@ -1,7 +1,7 @@
/* bernoulli -- internal function to compute Bernoulli numbers.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/buildopt.c b/Build/source/libs/mpfr/mpfr-src/src/buildopt.c
index c44b97a3d36..d25c61e9ff2 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/buildopt.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/buildopt.c
@@ -1,8 +1,8 @@
/* buildopt.c -- functions giving information about options used during the
mpfr library compilation
-Copyright 2009-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2009-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cache.c b/Build/source/libs/mpfr/mpfr-src/src/cache.c
index 1ddddf3b86f..1324ccec20c 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cache.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cache.c
@@ -1,7 +1,7 @@
/* mpfr_cache -- cache interface for multiple-precision constants in MPFR.
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cbrt.c b/Build/source/libs/mpfr/mpfr-src/src/cbrt.c
index d6858bc92fa..6a72ba1961f 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cbrt.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cbrt.c
@@ -1,7 +1,7 @@
/* mpfr_cbrt -- cube root function.
-Copyright 2002-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/check.c b/Build/source/libs/mpfr/mpfr-src/src/check.c
index 10ab789a6e5..3dec303d064 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/check.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/check.c
@@ -1,7 +1,7 @@
/* mpfr_check -- Check if a floating-point number has not been corrupted.
-Copyright 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/clear.c b/Build/source/libs/mpfr/mpfr-src/src/clear.c
index 65282effbea..3b3d4671e3f 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/clear.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/clear.c
@@ -1,7 +1,7 @@
/* mpfr_clear -- free the memory space allocated for a floating-point number
-Copyright 1999-2001, 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2001, 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/clears.c b/Build/source/libs/mpfr/mpfr-src/src/clears.c
index dfa830b4d28..d608f573844 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/clears.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/clears.c
@@ -1,8 +1,8 @@
/* mpfr_clears -- free the memory space allocated for several
floating-point numbers
-Copyright 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cmp.c b/Build/source/libs/mpfr/mpfr-src/src/cmp.c
index 237313ccab8..e123453c50f 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cmp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cmp.c
@@ -1,7 +1,7 @@
/* mpfr_cmp -- compare two floating-point numbers
-Copyright 1999, 2001, 2003-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001, 2003-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cmp2.c b/Build/source/libs/mpfr/mpfr-src/src/cmp2.c
index 917247c0e21..79a5a37c49d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cmp2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cmp2.c
@@ -1,7 +1,7 @@
/* mpfr_cmp2 -- exponent shift when subtracting two numbers.
-Copyright 1999-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cmp_abs.c b/Build/source/libs/mpfr/mpfr-src/src/cmp_abs.c
index 62ce27ff1d1..0c9d2707598 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cmp_abs.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cmp_abs.c
@@ -1,7 +1,7 @@
/* mpfr_cmpabs -- compare the absolute values of two FP numbers
-Copyright 1999, 2001-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cmp_d.c b/Build/source/libs/mpfr/mpfr-src/src/cmp_d.c
index 70d687a4bd1..8fd45e9bb8e 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cmp_d.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cmp_d.c
@@ -1,7 +1,7 @@
/* mpfr_cmp_d -- compare a floating-point number with a double
-Copyright 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -27,12 +27,19 @@ mpfr_cmp_d (mpfr_srcptr b, double d)
{
mpfr_t tmp;
int res;
+ MPFR_SAVE_EXPO_DECL (expo);
+
+ MPFR_SAVE_EXPO_MARK (expo);
mpfr_init2 (tmp, IEEE_DBL_MANT_DIG);
res = mpfr_set_d (tmp, d, MPFR_RNDN);
MPFR_ASSERTD (res == 0);
+
+ mpfr_clear_flags ();
res = mpfr_cmp (b, tmp);
- mpfr_clear (tmp);
+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags);
+ mpfr_clear (tmp);
+ MPFR_SAVE_EXPO_FREE (expo);
return res;
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c b/Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c
index 4e9ec0b3bae..d0a65889159 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c
@@ -1,7 +1,7 @@
/* mpfr_cmp_d -- compare a floating-point number with a long double
-Copyright 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -27,12 +27,19 @@ mpfr_cmp_ld (mpfr_srcptr b, long double d)
{
mpfr_t tmp;
int res;
+ MPFR_SAVE_EXPO_DECL (expo);
+
+ MPFR_SAVE_EXPO_MARK (expo);
mpfr_init2 (tmp, MPFR_LDBL_MANT_DIG);
res = mpfr_set_ld (tmp, d, MPFR_RNDN);
MPFR_ASSERTD (res == 0);
+
+ mpfr_clear_flags ();
res = mpfr_cmp (b, tmp);
- mpfr_clear (tmp);
+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags);
+ mpfr_clear (tmp);
+ MPFR_SAVE_EXPO_FREE (expo);
return res;
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cmp_si.c b/Build/source/libs/mpfr/mpfr-src/src/cmp_si.c
index 1bd8e7b5a2a..86b93665d6d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cmp_si.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cmp_si.c
@@ -1,8 +1,8 @@
/* mpfr_cmp_si_2exp -- compare a floating-point number with a signed
machine integer multiplied by a power of 2
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cmp_ui.c b/Build/source/libs/mpfr/mpfr-src/src/cmp_ui.c
index e42b43e35a4..a186207c5cb 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cmp_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cmp_ui.c
@@ -1,8 +1,8 @@
/* 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-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/comparisons.c b/Build/source/libs/mpfr/mpfr-src/src/comparisons.c
index ca7fa90f460..3c06b879bd7 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/comparisons.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/comparisons.c
@@ -1,7 +1,7 @@
/* comparison predicates
-Copyright 2002-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/const_catalan.c b/Build/source/libs/mpfr/mpfr-src/src/const_catalan.c
index 0e4402d7643..41b6bd97d64 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/const_catalan.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/const_catalan.c
@@ -1,7 +1,7 @@
/* mpfr_const_catalan -- compute Catalan's constant.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -26,6 +26,14 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
/* Declare the cache */
MPFR_DECL_INIT_CACHE(__gmpfr_cache_const_catalan, mpfr_const_catalan_internal);
+#ifdef MPFR_WIN_THREAD_SAFE_DLL
+mpfr_cache_t *
+__gmpfr_cache_const_catalan_f()
+{
+ return &__gmpfr_cache_const_catalan;
+}
+#endif
+
/* Set User Interface */
#undef mpfr_const_catalan
int
diff --git a/Build/source/libs/mpfr/mpfr-src/src/const_euler.c b/Build/source/libs/mpfr/mpfr-src/src/const_euler.c
index 802561fbed4..e00dda53de6 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/const_euler.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/const_euler.c
@@ -1,7 +1,7 @@
/* mpfr_const_euler -- Euler's constant
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -26,6 +26,14 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
/* Declare the cache */
MPFR_DECL_INIT_CACHE(__gmpfr_cache_const_euler, mpfr_const_euler_internal);
+#ifdef MPFR_WIN_THREAD_SAFE_DLL
+mpfr_cache_t *
+__gmpfr_cache_const_euler_f()
+{
+ return &__gmpfr_cache_const_euler;
+}
+#endif
+
/* Set User Interface */
#undef mpfr_const_euler
int
diff --git a/Build/source/libs/mpfr/mpfr-src/src/const_log2.c b/Build/source/libs/mpfr/mpfr-src/src/const_log2.c
index 7c634e9d7cf..8496d2d58a3 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/const_log2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/const_log2.c
@@ -1,7 +1,7 @@
/* mpfr_const_log2 -- compute natural logarithm of 2
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -29,7 +29,17 @@ MPFR_DECL_INIT_CACHE(__gmpfr_cache_const_log2, mpfr_const_log2_internal);
#else
MPFR_DECL_INIT_CACHE(__gmpfr_normal_log2, mpfr_const_log2_internal);
MPFR_DECL_INIT_CACHE(__gmpfr_logging_log2, mpfr_const_log2_internal);
-mpfr_cache_ptr MPFR_THREAD_ATTR __gmpfr_cache_const_log2 = __gmpfr_normal_log2;
+MPFR_THREAD_ATTR mpfr_cache_ptr __gmpfr_cache_const_log2 = __gmpfr_normal_log2;
+#endif
+
+#ifdef MPFR_WIN_THREAD_SAFE_DLL
+# ifndef MPFR_USE_LOGGING
+mpfr_cache_t * __gmpfr_cache_const_log2_f() { return &__gmpfr_cache_const_log2; }
+# else
+mpfr_cache_t * __gmpfr_normal_log2_f() { return &__gmpfr_normal_log2; }
+mpfr_cache_t * __gmpfr_logging_log2_f() { return &__gmpfr_logging_log2; }
+mpfr_cache_ptr * __gmpfr_cache_const_log2_f() { return &__gmpfr_cache_const_log2; }
+# endif
#endif
/* Set User interface */
diff --git a/Build/source/libs/mpfr/mpfr-src/src/const_pi.c b/Build/source/libs/mpfr/mpfr-src/src/const_pi.c
index 0306d432aff..7c555c9eef3 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/const_pi.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/const_pi.c
@@ -1,7 +1,7 @@
/* mpfr_const_pi -- compute Pi
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -28,7 +28,17 @@ MPFR_DECL_INIT_CACHE(__gmpfr_cache_const_pi, mpfr_const_pi_internal);
#else
MPFR_DECL_INIT_CACHE(__gmpfr_normal_pi, mpfr_const_pi_internal);
MPFR_DECL_INIT_CACHE(__gmpfr_logging_pi, mpfr_const_pi_internal);
-mpfr_cache_ptr MPFR_THREAD_ATTR __gmpfr_cache_const_pi = __gmpfr_normal_pi;
+MPFR_THREAD_ATTR mpfr_cache_ptr __gmpfr_cache_const_pi = __gmpfr_normal_pi;
+#endif
+
+#ifdef MPFR_WIN_THREAD_SAFE_DLL
+# ifndef MPFR_USE_LOGGING
+mpfr_cache_t * __gmpfr_cache_const_pi_f() { return &__gmpfr_cache_const_pi; }
+# else
+mpfr_cache_t * __gmpfr_normal_pi_f() { return &__gmpfr_normal_pi; }
+mpfr_cache_t * __gmpfr_logging_pi_f() { return &__gmpfr_logging_pi; }
+mpfr_cache_ptr * __gmpfr_cache_const_pi_f() { return &__gmpfr_cache_const_pi; }
+# endif
#endif
/* Set User Interface */
diff --git a/Build/source/libs/mpfr/mpfr-src/src/constant.c b/Build/source/libs/mpfr/mpfr-src/src/constant.c
index 158496c2e4b..7ff8c04dafa 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/constant.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/constant.c
@@ -1,7 +1,7 @@
/* MPFR internal constant FP numbers
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/copysign.c b/Build/source/libs/mpfr/mpfr-src/src/copysign.c
index 96c18137531..010675ca4e1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/copysign.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/copysign.c
@@ -1,7 +1,7 @@
/* mpfr_copysign -- Produce a value with the magnitude of x and sign bit of y
-Copyright 2001-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cos.c b/Build/source/libs/mpfr/mpfr-src/src/cos.c
index c9eac10a2cb..b2b864345bc 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cos.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cos.c
@@ -1,7 +1,7 @@
/* mpfr_cos -- cosine of a floating-point number
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cosh.c b/Build/source/libs/mpfr/mpfr-src/src/cosh.c
index c07773474da..3d3ede4ebc7 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cosh.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cosh.c
@@ -1,7 +1,7 @@
/* mpfr_cosh -- hyperbolic cosine
-Copyright 2001-2002, 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2002, 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cot.c b/Build/source/libs/mpfr/mpfr-src/src/cot.c
index 8959966f2ac..44744f71a7d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/cot.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/cot.c
@@ -1,7 +1,7 @@
/* mpfr_cot - cotangent function.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/coth.c b/Build/source/libs/mpfr/mpfr-src/src/coth.c
index 94aadfebd05..94f664418d9 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/coth.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/coth.c
@@ -1,7 +1,7 @@
/* mpfr_coth - Hyperbolic cotangent function.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/csc.c b/Build/source/libs/mpfr/mpfr-src/src/csc.c
index 41703d46f13..d1cd63a329c 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/csc.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/csc.c
@@ -1,7 +1,7 @@
/* mpfr_csc - cosecant function.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/csch.c b/Build/source/libs/mpfr/mpfr-src/src/csch.c
index ab25a6764f1..dc46654e5b7 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/csch.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/csch.c
@@ -1,7 +1,7 @@
/* mpfr_csch - Hyperbolic cosecant function.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/d_div.c b/Build/source/libs/mpfr/mpfr-src/src/d_div.c
index cad7f102b38..c7f4d62c532 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/d_div.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/d_div.c
@@ -1,8 +1,8 @@
/* mpfr_d_div -- divide a machine double precision float
by a multiple precision floating-point number
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/d_sub.c b/Build/source/libs/mpfr/mpfr-src/src/d_sub.c
index c8b8ff59a13..bad6cf4970c 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/d_sub.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/d_sub.c
@@ -1,8 +1,8 @@
/* mpfr_d_sub -- subtract a multiple precision floating-point number
from a machine double precision float
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/digamma.c b/Build/source/libs/mpfr/mpfr-src/src/digamma.c
index 1c4e7df4606..99110e9331b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/digamma.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/digamma.c
@@ -1,7 +1,7 @@
/* mpfr_digamma -- digamma function of a floating-point number
-Copyright 2009-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2009-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/dim.c b/Build/source/libs/mpfr/mpfr-src/src/dim.c
index 8a25cbbbbf4..3212f10d5bf 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/dim.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/dim.c
@@ -1,7 +1,7 @@
/* mpfr_dim -- positive difference
-Copyright 2001-2002, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2002, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/div.c b/Build/source/libs/mpfr/mpfr-src/src/div.c
index 8b3aabe9ebb..5d7f2bd49b0 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/div.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/div.c
@@ -1,7 +1,7 @@
/* mpfr_div -- divide two floating-point numbers
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -310,24 +310,23 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mpfr_rnd_t rnd_mode)
qp = MPFR_TMP_LIMBS_ALLOC (n);
qh = mpfr_divhigh_n (qp, ap, bp, n);
+ MPFR_ASSERTD (qh == 0 || qh == 1);
/* in all cases, the error is at most (2n+2) ulps on qh*B^n+{qp,n},
cf algorithms.tex */
p = n * GMP_NUMB_BITS - MPFR_INT_CEIL_LOG2 (2 * n + 2);
- /* if qh is 1, then we need only PREC(q)-1 bits of {qp,n},
- if rnd=RNDN, we need to be able to round with a directed rounding
- and one more bit */
+ /* If rnd=RNDN, we need to be able to round with a directed rounding
+ and one more bit. */
+ if (qh == 1)
+ {
+ mpn_rshift (qp, qp, n, 1);
+ qp[n - 1] |= MPFR_LIMB_HIGHBIT;
+ }
if (MPFR_LIKELY (mpfr_round_p (qp, n, p,
- MPFR_PREC(q) + (rnd_mode == MPFR_RNDN) - qh)))
+ MPFR_PREC(q) + (rnd_mode == MPFR_RNDN))))
{
/* we can round correctly whatever the rounding mode */
- if (qh == 0)
- MPN_COPY (q0p, qp + 1, q0size);
- else
- {
- mpn_rshift (q0p, qp + 1, q0size, 1);
- q0p[q0size - 1] ^= MPFR_LIMB_HIGHBIT;
- }
+ MPN_COPY (q0p, qp + 1, q0size);
q0p[0] &= ~MPFR_LIMB_MASK(sh); /* put to zero low sh bits */
if (rnd_mode == MPFR_RNDN) /* round to nearest */
@@ -335,15 +334,10 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mpfr_rnd_t rnd_mode)
/* we know we can round, thus we are never in the even rule case:
if the round bit is 0, we truncate
if the round bit is 1, we add 1 */
- if (qh == 0)
- {
- if (sh > 0)
- round_bit = (qp[1] >> (sh - 1)) & 1;
- else
- round_bit = qp[0] >> (GMP_NUMB_BITS - 1);
- }
- else /* qh = 1 */
- round_bit = (qp[1] >> sh) & 1;
+ if (sh > 0)
+ round_bit = (qp[1] >> (sh - 1)) & 1;
+ else
+ round_bit = qp[0] >> (GMP_NUMB_BITS - 1);
if (round_bit == 0)
{
inex = -1;
diff --git a/Build/source/libs/mpfr/mpfr-src/src/div_2exp.c b/Build/source/libs/mpfr/mpfr-src/src/div_2exp.c
index 909e798883e..d28e84576f5 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/div_2exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/div_2exp.c
@@ -1,7 +1,7 @@
/* mpfr_div_2exp -- divide a floating-point number by a power of two
-Copyright 1999, 2001, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/div_2si.c b/Build/source/libs/mpfr/mpfr-src/src/div_2si.c
index c7da6a05849..b3c877543ab 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/div_2si.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/div_2si.c
@@ -1,7 +1,7 @@
/* mpfr_div_2si -- divide a floating-point number by a power of two
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -45,11 +45,12 @@ mpfr_div_2si (mpfr_ptr y, mpfr_srcptr x, long int n, mpfr_rnd_t rnd_mode)
if (rnd_mode == MPFR_RNDN &&
(__gmpfr_emin > MPFR_EMAX_MAX - (n - 1) ||
exp < __gmpfr_emin + (n - 1) ||
- (inexact >= 0 && mpfr_powerof2_raw (y))))
+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
+ mpfr_powerof2_raw (y))))
rnd_mode = MPFR_RNDZ;
return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
}
- else if (MPFR_UNLIKELY(n < 0 && (__gmpfr_emax < MPFR_EMIN_MIN - n ||
+ else if (MPFR_UNLIKELY(n <= 0 && (__gmpfr_emax < MPFR_EMIN_MIN - n ||
exp > __gmpfr_emax + n)) )
return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y));
diff --git a/Build/source/libs/mpfr/mpfr-src/src/div_2ui.c b/Build/source/libs/mpfr/mpfr-src/src/div_2ui.c
index 12df43bb760..71ce188c8d7 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/div_2ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/div_2ui.c
@@ -1,7 +1,7 @@
/* mpfr_div_2ui -- divide a floating-point number by a power of two
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -32,7 +32,7 @@ mpfr_div_2ui (mpfr_ptr y, mpfr_srcptr x, unsigned long n, mpfr_rnd_t rnd_mode)
rnd_mode),
("y[%Pu]=%.*Rg inexact=%d", mpfr_get_prec(y), mpfr_log_prec, y, inexact));
- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
+ if (MPFR_UNLIKELY (n == 0 || MPFR_IS_SINGULAR (x)))
return mpfr_set (y, x, rnd_mode);
else
{
@@ -44,7 +44,9 @@ mpfr_div_2ui (mpfr_ptr y, mpfr_srcptr x, unsigned long n, mpfr_rnd_t rnd_mode)
if (MPFR_UNLIKELY (n >= diffexp)) /* exp - n <= emin - 1 */
{
if (rnd_mode == MPFR_RNDN &&
- (n > diffexp || (inexact >= 0 && mpfr_powerof2_raw (y))))
+ (n > diffexp ||
+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
+ mpfr_powerof2_raw (y))))
rnd_mode = MPFR_RNDZ;
return mpfr_underflow (y, rnd_mode, MPFR_SIGN (y));
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/div_d.c b/Build/source/libs/mpfr/mpfr-src/src/div_d.c
index 4ee009e038b..4d299fd9938 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/div_d.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/div_d.c
@@ -1,8 +1,8 @@
/* mpfr_div_d -- divide a multiple precision floating-point number
by a machine double precision float
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/div_ui.c b/Build/source/libs/mpfr/mpfr-src/src/div_ui.c
index 322a1351388..35764f29f4c 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/div_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/div_ui.c
@@ -1,7 +1,7 @@
/* mpfr_div_{ui,si} -- divide a floating-point number by a machine integer
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -274,7 +274,8 @@ mpfr_div_si (mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode)
res = mpfr_div_ui (y, x, u, rnd_mode);
else
{
- res = -mpfr_div_ui (y, x, -u, MPFR_INVERT_RND (rnd_mode));
+ res = - mpfr_div_ui (y, x, - (unsigned long) u,
+ MPFR_INVERT_RND (rnd_mode));
MPFR_CHANGE_SIGN (y);
}
return res;
diff --git a/Build/source/libs/mpfr/mpfr-src/src/dump.c b/Build/source/libs/mpfr/mpfr-src/src/dump.c
index fb00f79b2bf..7b3c256e33a 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/dump.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/dump.c
@@ -1,7 +1,7 @@
/* mpfr_dump -- Dump a float to stdout.
-Copyright 1999, 2001, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/eint.c b/Build/source/libs/mpfr/mpfr-src/src/eint.c
index aaff14a83c0..a5dde78ebbb 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/eint.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/eint.c
@@ -1,7 +1,7 @@
/* mpfr_eint, mpfr_eint1 -- the exponential integral
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -206,7 +206,7 @@ mpfr_eint (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
{
- /* exp(NaN) = exp(-Inf) = NaN */
+ /* eint(NaN) = eint(-Inf) = NaN */
if (MPFR_IS_NAN (x) || (MPFR_IS_INF (x) && MPFR_IS_NEG(x)))
{
MPFR_SET_NAN (y);
diff --git a/Build/source/libs/mpfr/mpfr-src/src/eq.c b/Build/source/libs/mpfr/mpfr-src/src/eq.c
index c58110ca639..f97431bc6f1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/eq.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/eq.c
@@ -1,7 +1,7 @@
/* mpfr_eq -- Compare two floats up to a specified bit #.
-Copyright 1999, 2001, 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001, 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/erf.c b/Build/source/libs/mpfr/mpfr-src/src/erf.c
index 227eba71ec3..7bf7025098e 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/erf.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/erf.c
@@ -1,7 +1,7 @@
/* mpfr_erf -- error function of a floating-point number
-Copyright 2001, 2003-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001, 2003-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/erfc.c b/Build/source/libs/mpfr/mpfr-src/src/erfc.c
index 1f0b36d3b36..c65646cc47f 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/erfc.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/erfc.c
@@ -1,7 +1,7 @@
/* mpfr_erfc -- The Complementary Error Function of a floating-point number
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/exceptions.c b/Build/source/libs/mpfr/mpfr-src/src/exceptions.c
index dacca4eaa1b..ad8beb2c464 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/exceptions.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/exceptions.c
@@ -1,7 +1,7 @@
/* Exception flags and utilities.
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -22,10 +22,16 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
#include "mpfr-impl.h"
-unsigned int MPFR_THREAD_ATTR __gmpfr_flags = 0;
+MPFR_THREAD_ATTR unsigned int __gmpfr_flags = 0;
-mpfr_exp_t MPFR_THREAD_ATTR __gmpfr_emin = MPFR_EMIN_DEFAULT;
-mpfr_exp_t MPFR_THREAD_ATTR __gmpfr_emax = MPFR_EMAX_DEFAULT;
+MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emin = MPFR_EMIN_DEFAULT;
+MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emax = MPFR_EMAX_DEFAULT;
+
+#ifdef MPFR_WIN_THREAD_SAFE_DLL
+unsigned int * __gmpfr_flags_f() { return &__gmpfr_flags; }
+mpfr_exp_t * __gmpfr_emin_f() { return &__gmpfr_emin; }
+mpfr_exp_t * __gmpfr_emax_f() { return &__gmpfr_emax; }
+#endif
#undef mpfr_get_emin
diff --git a/Build/source/libs/mpfr/mpfr-src/src/exp.c b/Build/source/libs/mpfr/mpfr-src/src/exp.c
index 2a4f3414d09..225b6774324 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/exp.c
@@ -1,7 +1,7 @@
/* mpfr_exp -- exponential of a floating-point number
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/exp10.c b/Build/source/libs/mpfr/mpfr-src/src/exp10.c
index 49b9bc8a0ee..e68d8aab40e 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/exp10.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/exp10.c
@@ -1,7 +1,7 @@
/* mpfr_exp10 -- power of 10 function 10^y
-Copyright 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/exp2.c b/Build/source/libs/mpfr/mpfr-src/src/exp2.c
index 56eba78ba98..21c057cbe7e 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/exp2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/exp2.c
@@ -1,7 +1,7 @@
/* mpfr_exp2 -- power of 2 function 2^y
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/exp3.c b/Build/source/libs/mpfr/mpfr-src/src/exp3.c
index 2cd201197f9..47482923326 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/exp3.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/exp3.c
@@ -1,7 +1,7 @@
/* mpfr_exp -- exponential of a floating-point number
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -175,7 +175,7 @@ mpfr_exp_3 (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
/* decompose x */
/* we first write x = 1.xxxxxxxxxxxxx
- ----- k bits -- */
+ ----- k bits -- */
prec_x = MPFR_INT_CEIL_LOG2 (MPFR_PREC (x)) - MPFR_LOG2_GMP_NUMB_BITS;
if (prec_x < 0)
prec_x = 0;
diff --git a/Build/source/libs/mpfr/mpfr-src/src/exp_2.c b/Build/source/libs/mpfr/mpfr-src/src/exp_2.c
index bd181bea622..d6bf4d6347a 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/exp_2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/exp_2.c
@@ -1,8 +1,8 @@
/* 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-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/expm1.c b/Build/source/libs/mpfr/mpfr-src/src/expm1.c
index fab05be47f1..004ce4d5d51 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/expm1.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/expm1.c
@@ -1,7 +1,7 @@
/* mpfr_expm1 -- Compute exp(x)-1
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/extract.c b/Build/source/libs/mpfr/mpfr-src/src/extract.c
index c3bb0190276..3eb7b946a32 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/extract.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/extract.c
@@ -1,7 +1,7 @@
/* mpfr_extract -- bit-extraction function for the binary splitting algorithm
-Copyright 2000-2002, 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2002, 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/factorial.c b/Build/source/libs/mpfr/mpfr-src/src/factorial.c
index aa9a126d4e5..4f467d75cd2 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/factorial.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/factorial.c
@@ -1,7 +1,7 @@
/* mpfr_fac_ui -- factorial of a non-negative integer
-Copyright 2001, 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001, 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_intmax.c b/Build/source/libs/mpfr/mpfr-src/src/fits_intmax.c
index c3d072a228d..b3ad9f18276 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_intmax.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_intmax.c
@@ -1,7 +1,7 @@
/* mpfr_fits_intmax_p -- test whether an mpfr fits an intmax_t.
-Copyright 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -33,6 +33,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
int
mpfr_fits_intmax_p (mpfr_srcptr f, mpfr_rnd_t rnd)
{
+ unsigned int saved_flags;
mpfr_exp_t e;
int prec;
mpfr_t x, y;
@@ -85,6 +86,7 @@ mpfr_fits_intmax_p (mpfr_srcptr f, mpfr_rnd_t rnd)
MPFR_ASSERTD (e == prec);
/* hard case: first round to prec bits, then check */
+ saved_flags = __gmpfr_flags;
mpfr_init2 (x, prec);
mpfr_set (x, f, rnd);
@@ -97,10 +99,16 @@ mpfr_fits_intmax_p (mpfr_srcptr f, mpfr_rnd_t rnd)
}
else
{
- res = MPFR_GET_EXP (x) == e;
+ /* Warning! Due to the rounding, x can be an infinity. Here we use
+ the fact that singular numbers have a special exponent field,
+ thus well-defined and different from e, in which case this means
+ that the number does not fit. That's why we use MPFR_EXP, not
+ MPFR_GET_EXP. */
+ res = MPFR_EXP (x) == e;
}
mpfr_clear (x);
+ __gmpfr_flags = saved_flags;
return res;
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_s.h b/Build/source/libs/mpfr/mpfr-src/src/fits_s.h
index 0dd77fb45a2..8e667bc0c41 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_s.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_s.h
@@ -1,7 +1,7 @@
/* mpfr_fits_*_p -- test whether an mpfr fits a C signed type.
-Copyright 2003-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -29,6 +29,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
int
FUNCTION (mpfr_srcptr f, mpfr_rnd_t rnd)
{
+ unsigned int saved_flags;
mpfr_exp_t e;
int prec;
mpfr_t x;
@@ -81,9 +82,16 @@ FUNCTION (mpfr_srcptr f, mpfr_rnd_t rnd)
MPFR_ASSERTD (e == prec);
/* hard case: first round to prec bits, then check */
+ saved_flags = __gmpfr_flags;
mpfr_init2 (x, prec);
mpfr_set (x, f, rnd);
- res = neg ? (mpfr_cmp_si (x, MINIMUM) >= 0) : (MPFR_GET_EXP (x) == e);
+ /* Warning! Due to the rounding, x can be an infinity. Here we use
+ the fact that singular numbers have a special exponent field,
+ thus well-defined and different from e, in which case this means
+ that the number does not fit. That's why we use MPFR_EXP, not
+ MPFR_GET_EXP. */
+ res = neg ? (mpfr_cmp_si (x, MINIMUM) >= 0) : (MPFR_EXP (x) == e);
mpfr_clear (x);
+ __gmpfr_flags = saved_flags;
return res;
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_sint.c b/Build/source/libs/mpfr/mpfr-src/src/fits_sint.c
index 5c32fd3046a..5ab11409bff 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_sint.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_sint.c
@@ -1,7 +1,7 @@
/* mpfr_fits_sint_p -- test whether an mpfr fits an int.
-Copyright 2003, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_slong.c b/Build/source/libs/mpfr/mpfr-src/src/fits_slong.c
index 2f51700206e..3ff287486a4 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_slong.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_slong.c
@@ -1,7 +1,7 @@
/* mpfr_fits_slong_p -- test whether an mpfr fits a long.
-Copyright 2003, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_sshort.c b/Build/source/libs/mpfr/mpfr-src/src/fits_sshort.c
index d7cdd0b6acf..d9099800f02 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_sshort.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_sshort.c
@@ -1,7 +1,7 @@
/* mpfr_fits_sshort_p -- test whether an mpfr fits a short.
-Copyright 2003, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_u.h b/Build/source/libs/mpfr/mpfr-src/src/fits_u.h
index ed837a29bc9..9f97c30c6aa 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_u.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_u.h
@@ -1,7 +1,7 @@
/* mpfr_fits_*_p -- test whether an mpfr fits a C unsigned type.
-Copyright 2003-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -25,6 +25,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
int
FUNCTION (mpfr_srcptr f, mpfr_rnd_t rnd)
{
+ unsigned int saved_flags;
mpfr_exp_t e;
int prec;
TYPE s;
@@ -62,9 +63,16 @@ FUNCTION (mpfr_srcptr f, mpfr_rnd_t rnd)
MPFR_ASSERTD (e == prec);
/* hard case: first round to prec bits, then check */
+ saved_flags = __gmpfr_flags;
mpfr_init2 (x, prec);
mpfr_set (x, f, rnd);
- res = MPFR_GET_EXP (x) == e;
+ /* Warning! Due to the rounding, x can be an infinity. Here we use
+ the fact that singular numbers have a special exponent field,
+ thus well-defined and different from e, in which case this means
+ that the number does not fit. That's why we use MPFR_EXP, not
+ MPFR_GET_EXP. */
+ res = MPFR_EXP (x) == e;
mpfr_clear (x);
+ __gmpfr_flags = saved_flags;
return res;
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_uint.c b/Build/source/libs/mpfr/mpfr-src/src/fits_uint.c
index d62f9d21c75..96e2cc5abbc 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_uint.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_uint.c
@@ -1,7 +1,7 @@
/* mpfr_fits_uint_p -- test whether an mpfr fits an unsigned int.
-Copyright 2003, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_uintmax.c b/Build/source/libs/mpfr/mpfr-src/src/fits_uintmax.c
index fc51d91c5e1..a206287cce3 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_uintmax.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_uintmax.c
@@ -1,7 +1,7 @@
/* mpfr_fits_uintmax_p -- test whether an mpfr fits an uintmax_t.
-Copyright 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_ulong.c b/Build/source/libs/mpfr/mpfr-src/src/fits_ulong.c
index bbd2a3a1e8b..8e2c105199d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_ulong.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_ulong.c
@@ -1,7 +1,7 @@
/* mpfr_fits_ulong_p -- test whether an mpfr fits an unsigned long.
-Copyright 2003, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_ushort.c b/Build/source/libs/mpfr/mpfr-src/src/fits_ushort.c
index d4b389d630f..63bfbc0ecd1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_ushort.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_ushort.c
@@ -1,7 +1,7 @@
/* mpfr_fits_ushort_p -- test whether an mpfr fits an unsigned short.
-Copyright 2003, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fma.c b/Build/source/libs/mpfr/mpfr-src/src/fma.c
index 8acb617f7d5..da81a567a7a 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fma.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/fma.c
@@ -1,7 +1,7 @@
/* mpfr_fma -- Floating multiply-add
-Copyright 2001-2002, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2002, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fms.c b/Build/source/libs/mpfr/mpfr-src/src/fms.c
index fe17e5b201b..868b4d66180 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fms.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/fms.c
@@ -1,7 +1,7 @@
/* mpfr_fms -- Floating multiply-subtract
-Copyright 2001-2002, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2002, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/frac.c b/Build/source/libs/mpfr/mpfr-src/src/frac.c
index 5b26c2c2713..0bb38b23606 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/frac.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/frac.c
@@ -1,7 +1,7 @@
/* mpfr_frac -- Fractional part of a floating-point number.
-Copyright 2002-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/free_cache.c b/Build/source/libs/mpfr/mpfr-src/src/free_cache.c
index 928936ade46..d65784f2825 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/free_cache.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/free_cache.c
@@ -1,7 +1,7 @@
/* mpfr_free_cache - Free the cache used by MPFR for internal consts.
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/frexp.c b/Build/source/libs/mpfr/mpfr-src/src/frexp.c
index 0f8de7ed5e3..c5bcf0f442c 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/frexp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/frexp.c
@@ -1,7 +1,7 @@
/* mpfr_frexp -- convert to integral and fractional parts
-Copyright 2011-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2011-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -26,6 +26,13 @@ int
mpfr_frexp (mpfr_exp_t *exp, mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
{
int inex;
+ unsigned int saved_flags = __gmpfr_flags;
+ MPFR_BLOCK_DECL (flags);
+
+ MPFR_LOG_FUNC
+ (("x[%Pu]=%.*Rg rnd=%d", mpfr_get_prec (x), mpfr_log_prec, x, rnd),
+ ("y[%Pu]=%.*Rg exp=%" MPFR_EXP_FSPEC "d inex=%d", mpfr_get_prec (y),
+ mpfr_log_prec, y, (mpfr_eexp_t) *exp, inex));
if (MPFR_UNLIKELY(MPFR_IS_SINGULAR(x)))
{
@@ -49,8 +56,32 @@ mpfr_frexp (mpfr_exp_t *exp, mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
}
}
- inex = mpfr_set (y, x, rnd);
+ MPFR_BLOCK (flags, inex = mpfr_set (y, x, rnd));
+ __gmpfr_flags = saved_flags;
+
+ /* Possible overflow due to the rounding, no possible underflow. */
+
+ if (MPFR_UNLIKELY (MPFR_OVERFLOW (flags)))
+ {
+ int inex2;
+
+ /* An overflow here means that the exponent of y would be larger than
+ the one of x, thus x would be rounded to the next power of 2, and
+ the returned y should be 1/2 in absolute value, rounded (i.e. with
+ possible underflow or overflow). This also implies that x and y are
+ different objects, so that the exponent of x has not been lost. */
+ MPFR_LOG_MSG (("Internal overflow\n", 0));
+ MPFR_ASSERTD (x != y);
+ *exp = MPFR_GET_EXP (x) + 1;
+ inex2 = mpfr_set_si_2exp (y, MPFR_INT_SIGN (x), -1, rnd);
+ MPFR_LOG_MSG (("inex=%d inex2=%d\n", inex, inex2));
+ if (inex2 != 0)
+ inex = inex2;
+ MPFR_RET (inex);
+ }
+
*exp = MPFR_GET_EXP (y);
- MPFR_SET_EXP (y, 0);
+ /* Do not use MPFR_SET_EXP because the range has not been checked yet. */
+ MPFR_EXP (y) = 0;
return mpfr_check_range (y, inex, rnd);
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/gamma.c b/Build/source/libs/mpfr/mpfr-src/src/gamma.c
index d19a5b7212a..eefd3dd50cf 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/gamma.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/gamma.c
@@ -1,7 +1,7 @@
/* mpfr_gamma -- gamma function
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -70,6 +70,9 @@ bits_fac (unsigned long n)
{
mpfr_t x, y;
unsigned long r, k;
+ MPFR_SAVE_EXPO_DECL (expo);
+
+ MPFR_SAVE_EXPO_MARK (expo);
mpfr_init2 (x, 38);
mpfr_init2 (y, 38);
mpfr_set_ui (x, n, MPFR_RNDZ);
@@ -86,6 +89,8 @@ bits_fac (unsigned long n)
r -= n / k;
mpfr_clear (x);
mpfr_clear (y);
+ MPFR_SAVE_EXPO_FREE (expo);
+
return r;
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/gammaonethird.c b/Build/source/libs/mpfr/mpfr-src/src/gammaonethird.c
index 255e3fbbedc..f7a21fe1cc4 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/gammaonethird.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/gammaonethird.c
@@ -1,7 +1,7 @@
/* Functions for evaluating Gamma(1/3) and Gamma(2/3). Used by mpfr_ai.
-Copyright 2010-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2010-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/gen_inverse.h b/Build/source/libs/mpfr/mpfr-src/src/gen_inverse.h
index 643cdb06350..c0715d1da8b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/gen_inverse.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/gen_inverse.h
@@ -1,7 +1,7 @@
/* generic inverse of a function.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/generic/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/generic/mparam.h
index b850e6508f5..20cde126f51 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/generic/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/generic/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_d.c b/Build/source/libs/mpfr/mpfr-src/src/get_d.c
index e4098264a1e..aa5751e8ae0 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_d.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_d.c
@@ -1,8 +1,8 @@
/* mpfr_get_d, mpfr_get_d_2exp -- convert a multiple precision floating-point
number to a machine double precision float
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_d64.c b/Build/source/libs/mpfr/mpfr-src/src/get_d64.c
index 16c9c936e56..84dd130ad57 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_d64.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_d64.c
@@ -5,8 +5,8 @@ See http://gcc.gnu.org/ml/gcc/2006-06/msg00691.html,
http://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html,
and TR 24732 <http://www.open-std.org/jtc1/sc22/wg14/www/projects#24732>.
-Copyright 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_exp.c b/Build/source/libs/mpfr/mpfr-src/src/get_exp.c
index 9e177687bb0..99ae1184a73 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_exp.c
@@ -1,7 +1,7 @@
/* mpfr_get_exp - get the exponent of a floating-point number
-Copyright 2002-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_f.c b/Build/source/libs/mpfr/mpfr-src/src/get_f.c
index f129845b965..de94ddafbb6 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_f.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_f.c
@@ -1,7 +1,7 @@
/* mpfr_get_f -- convert a MPFR number to a GNU MPF number
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_flt.c b/Build/source/libs/mpfr/mpfr-src/src/get_flt.c
index 0fb66c32d0c..07b71206d86 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_flt.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_flt.c
@@ -1,7 +1,7 @@
/* mpfr_get_flt -- convert a mpfr_t to a machine single precision float
-Copyright 2009-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2009-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -49,6 +49,9 @@ mpfr_get_flt (mpfr_srcptr src, mpfr_rnd_t rnd_mode)
if (MPFR_UNLIKELY(rnd_mode == MPFR_RNDA))
rnd_mode = negative ? MPFR_RNDD : MPFR_RNDU;
+ /* FIXME: The code below assumes the IEEE-754 binary32 format
+ with subnormal support. */
+
/* the smallest positive normal float number is 2^(-126) = 0.5*2^(-125),
and the smallest positive subnormal number is 2^(-149) = 0.5*2^(-148) */
if (MPFR_UNLIKELY (e < -148))
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_ld.c b/Build/source/libs/mpfr/mpfr-src/src/get_ld.c
index b24f9b94ba6..1c1efedbc4d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_ld.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_ld.c
@@ -1,8 +1,8 @@
/* mpfr_get_ld, mpfr_get_ld_2exp -- convert a multiple precision floating-point
number to a machine long double
-Copyright 2002-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_patches.c b/Build/source/libs/mpfr/mpfr-src/src/get_patches.c
index d5d93b4ebb6..da1e49ebc46 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_patches.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_patches.c
@@ -1,7 +1,7 @@
/* mpfr_get_patches -- Patches that have been applied
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_si.c b/Build/source/libs/mpfr/mpfr-src/src/get_si.c
index ea3fb164f70..ef8ce3966dd 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_si.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_si.c
@@ -1,7 +1,7 @@
/* mpfr_get_si -- convert a floating-point number to a signed long.
-Copyright 2003-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_sj.c b/Build/source/libs/mpfr/mpfr-src/src/get_sj.c
index 49de8a00650..9bd68a181c8 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_sj.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_sj.c
@@ -1,7 +1,7 @@
/* mpfr_get_sj -- convert a MPFR number to a huge machine signed integer
-Copyright 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_str.c b/Build/source/libs/mpfr/mpfr-src/src/get_str.c
index 137aaa4f79d..0b284062224 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_str.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_str.c
@@ -1,7 +1,7 @@
/* mpfr_get_str -- output a floating-point number to a string
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_ui.c b/Build/source/libs/mpfr/mpfr-src/src/get_ui.c
index 374d35dd1eb..0bf5b5e3f3b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_ui.c
@@ -1,7 +1,7 @@
/* mpfr_get_ui -- convert a floating-point number to an unsigned long.
-Copyright 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_uj.c b/Build/source/libs/mpfr/mpfr-src/src/get_uj.c
index eb79e5d4030..b7ea2d97726 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_uj.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_uj.c
@@ -1,7 +1,7 @@
/* mpfr_get_uj -- convert a MPFR number to a huge machine unsigned integer
-Copyright 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_z.c b/Build/source/libs/mpfr/mpfr-src/src/get_z.c
index aebbfa33ed7..e323255137c 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_z.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_z.c
@@ -1,8 +1,8 @@
/* mpfr_get_z -- get a multiple-precision integer from
a floating-point number
-Copyright 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_z_exp.c b/Build/source/libs/mpfr/mpfr-src/src/get_z_exp.c
index 1431b013ef9..bc8eb0be505 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_z_exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_z_exp.c
@@ -1,8 +1,8 @@
/* mpfr_get_z_2exp -- get a multiple-precision integer and an exponent
from a floating-point number
-Copyright 2000-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/gmp_op.c b/Build/source/libs/mpfr/mpfr-src/src/gmp_op.c
index af2f8eeec3a..9418fa0984e 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/gmp_op.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/gmp_op.c
@@ -1,7 +1,7 @@
/* Implementations of operations between mpfr and mpz/mpq data
-Copyright 2001, 2003-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001, 2003-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/grandom.c b/Build/source/libs/mpfr/mpfr-src/src/grandom.c
index 21e71ca7c5a..5d07ae9afd4 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/grandom.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/grandom.c
@@ -3,8 +3,8 @@
distribution and round it to the precision of rop1, rop2 according
to the given rounding mode.
-Copyright 2011-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2011-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/hppa/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/hppa/mparam.h
index fdde759046f..1d785616914 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/hppa/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/hppa/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/hypot.c b/Build/source/libs/mpfr/mpfr-src/src/hypot.c
index ea744ea74f8..da38906505d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/hypot.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/hypot.c
@@ -1,7 +1,7 @@
/* mpfr_hypot -- Euclidean distance
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/ia64/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/ia64/mparam.h
index 4297632dbb8..e7649bb2938 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/ia64/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/ia64/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/ieee_floats.h b/Build/source/libs/mpfr/mpfr-src/src/ieee_floats.h
index 0cb44926ada..91ca5b92a8a 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/ieee_floats.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/ieee_floats.h
@@ -1,7 +1,7 @@
/* auxiliary data to generate special IEEE floats (NaN, +Inf, -Inf)
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/init.c b/Build/source/libs/mpfr/mpfr-src/src/init.c
index 23fa0f30d3e..e2aa53ffc3f 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/init.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/init.c
@@ -1,7 +1,7 @@
/* mpfr_init -- initialize a floating-point number
-Copyright 1999, 2001-2002, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2002, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/init2.c b/Build/source/libs/mpfr/mpfr-src/src/init2.c
index 0fb7dc76ae3..9e720f748fa 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/init2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/init2.c
@@ -1,7 +1,7 @@
/* mpfr_init2 -- initialize a floating-point number with given precision
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/inits.c b/Build/source/libs/mpfr/mpfr-src/src/inits.c
index 8b761b842d9..888f788f2a3 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/inits.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/inits.c
@@ -1,7 +1,7 @@
/* mpfr_inits -- initialize several floating-point numbers
-Copyright 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/inits2.c b/Build/source/libs/mpfr/mpfr-src/src/inits2.c
index 9e5af2b84d5..4791139d3ec 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/inits2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/inits2.c
@@ -1,8 +1,8 @@
/* mpfr_inits2 -- initialize several floating-point numbers with given
precision
-Copyright 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/inp_str.c b/Build/source/libs/mpfr/mpfr-src/src/inp_str.c
index c46276f0722..b155b149e34 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/inp_str.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/inp_str.c
@@ -1,8 +1,8 @@
/* 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-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2002, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/int_ceil_log2.c b/Build/source/libs/mpfr/mpfr-src/src/int_ceil_log2.c
index 13610570c0c..a6595a6c713 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/int_ceil_log2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/int_ceil_log2.c
@@ -1,7 +1,7 @@
/* __gmpfr_int_ceil_log2 -- Integer ceil of log2(x)
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/isinf.c b/Build/source/libs/mpfr/mpfr-src/src/isinf.c
index ee588e9c98f..264a8ea1ac1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/isinf.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/isinf.c
@@ -1,7 +1,7 @@
/* mpfr_inf_p -- check for infinities
-Copyright 2000-2001, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2001, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/isinteger.c b/Build/source/libs/mpfr/mpfr-src/src/isinteger.c
index 335babff4a8..6ec39a47328 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/isinteger.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/isinteger.c
@@ -1,7 +1,7 @@
/* mpfr_integer_p -- test if a mpfr variable is integer.
-Copyright 2001-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/isnan.c b/Build/source/libs/mpfr/mpfr-src/src/isnan.c
index e125ff9a1dc..36e8ad7a8b6 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/isnan.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/isnan.c
@@ -1,7 +1,7 @@
/* mpfr_nan_p -- check for NaN
-Copyright 2000-2001, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2001, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/isnum.c b/Build/source/libs/mpfr/mpfr-src/src/isnum.c
index 35ba820f22f..e3bf2813ff7 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/isnum.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/isnum.c
@@ -1,7 +1,7 @@
/* mpfr_number_p -- check for ordinary numbers
-Copyright 2000-2002, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2002, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/isqrt.c b/Build/source/libs/mpfr/mpfr-src/src/isqrt.c
index 86910e8a538..56228df7cf1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/isqrt.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/isqrt.c
@@ -1,7 +1,7 @@
/* __gmpfr_isqrt && __gmpfr_cuberoot -- Integer square root and cube root
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/isregular.c b/Build/source/libs/mpfr/mpfr-src/src/isregular.c
index d45a7c32531..1b5c5519bba 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/isregular.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/isregular.c
@@ -1,7 +1,7 @@
/* mpfr_regular_p -- check for regular number (neither NaN, Inf or zero)
-Copyright 2009-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2009-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/iszero.c b/Build/source/libs/mpfr/mpfr-src/src/iszero.c
index 2e9f3b5be56..45c6d470c86 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/iszero.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/iszero.c
@@ -1,7 +1,7 @@
/* mpfr_zero_p -- check for zero
-Copyright 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/jn.c b/Build/source/libs/mpfr/mpfr-src/src/jn.c
index 40eecf7bb1f..182f1e04678 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/jn.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/jn.c
@@ -1,8 +1,8 @@
/* mpfr_j0, mpfr_j1, mpfr_jn -- Bessel functions of 1st kind, integer order.
http://www.opengroup.org/onlinepubs/009695399/functions/j0.html
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c b/Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c
index b630c9bf2b7..fe0f3b9b354 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/jyn_asympt.c
@@ -1,7 +1,7 @@
/* mpfr_jn_asympt, mpfr_yn_asympt -- shared code for mpfr_jn and mpfr_yn
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -253,9 +253,9 @@ FUNCTION (mpfr_ptr res, long n, mpfr_srcptr z, mpfr_rnd_t r)
break;
if (diverge != 0)
{
- mpfr_set (c, z, r); /* will force inex=0 below, which means the
- asymptotic expansion failed */
- break;
+ MPFR_ZIV_FREE (loop);
+ mpfr_clear (c);
+ return 0; /* means that the asymptotic expansion failed */
}
MPFR_ZIV_NEXT (loop, w);
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/li2.c b/Build/source/libs/mpfr/mpfr-src/src/li2.c
index 9d9940e34bd..357ee4c9b50 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/li2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/li2.c
@@ -1,7 +1,7 @@
/* mpfr_li2 -- Dilogarithm.
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/lngamma.c b/Build/source/libs/mpfr/mpfr-src/src/lngamma.c
index cd43df61551..de98b171b00 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/lngamma.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/lngamma.c
@@ -1,7 +1,7 @@
/* mpfr_lngamma -- lngamma function
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -603,16 +603,17 @@ mpfr_lngamma (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
mpfr_get_prec (y), mpfr_log_prec, y, inex));
/* special cases */
- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x) ||
+ (MPFR_IS_NEG (x) && mpfr_integer_p (x))))
{
- if (MPFR_IS_NAN (x) || MPFR_IS_NEG (x))
+ if (MPFR_IS_NAN (x))
{
MPFR_SET_NAN (y);
MPFR_RET_NAN;
}
- else /* lngamma(+Inf) = lngamma(+0) = +Inf */
+ else /* lngamma(+/-Inf) = lngamma(nonpositive integer) = +Inf */
{
- if (MPFR_IS_ZERO (x))
+ if (!MPFR_IS_INF (x))
mpfr_set_divby0 ();
MPFR_SET_INF (y);
MPFR_SET_POS (y);
@@ -620,8 +621,8 @@ mpfr_lngamma (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
}
}
- /* if x < 0 and -2k-1 <= x <= -2k, then lngamma(x) = NaN */
- if (MPFR_IS_NEG (x) && (unit_bit (x) == 0 || mpfr_integer_p (x)))
+ /* if -2k-1 < x < -2k <= 0, then lngamma(x) = NaN */
+ if (MPFR_IS_NEG (x) && unit_bit (x) == 0)
{
MPFR_SET_NAN (y);
MPFR_RET_NAN;
diff --git a/Build/source/libs/mpfr/mpfr-src/src/log.c b/Build/source/libs/mpfr/mpfr-src/src/log.c
index d751a689fbc..2cb1e646cc6 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/log.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/log.c
@@ -1,7 +1,7 @@
/* mpfr_log -- natural logarithm of a floating-point number
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/log10.c b/Build/source/libs/mpfr/mpfr-src/src/log10.c
index d358d9ce6f9..5700af4c862 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/log10.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/log10.c
@@ -1,7 +1,7 @@
/* mpfr_log10 -- logarithm in base 10.
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/log1p.c b/Build/source/libs/mpfr/mpfr-src/src/log1p.c
index 6ef0e866ca8..53720fe2014 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/log1p.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/log1p.c
@@ -1,7 +1,7 @@
/* mpfr_log1p -- Compute log(1+x)
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/log2.c b/Build/source/libs/mpfr/mpfr-src/src/log2.c
index 4aca0f55753..6d755e027a3 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/log2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/log2.c
@@ -1,7 +1,7 @@
/* mpfr_log2 -- log base 2
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/logging.c b/Build/source/libs/mpfr/mpfr-src/src/logging.c
index dc42f9830c6..963fac705a5 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/logging.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/logging.c
@@ -1,7 +1,7 @@
/* MPFR Logging functions.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/min_prec.c b/Build/source/libs/mpfr/mpfr-src/src/min_prec.c
index c5e22755961..f2705d6fcf9 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/min_prec.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/min_prec.c
@@ -1,7 +1,7 @@
/* mpfr_min_prec -- minimal size in bits to hold the mantissa
-Copyright 2009-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2009-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/minmax.c b/Build/source/libs/mpfr/mpfr-src/src/minmax.c
index c9dee653f63..46964927487 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/minmax.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/minmax.c
@@ -1,7 +1,7 @@
/* mpfr_min -- min and max of x, y
-Copyright 2001, 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001, 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/modf.c b/Build/source/libs/mpfr/mpfr-src/src/modf.c
index e74ce168c61..36b017a7fb9 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/modf.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/modf.c
@@ -1,7 +1,7 @@
/* mpfr_modf -- Integral and fractional part.
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mp_clz_tab.c b/Build/source/libs/mpfr/mpfr-src/src/mp_clz_tab.c
index b63373880c7..fdaa432db05 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mp_clz_tab.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/mp_clz_tab.c
@@ -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-2015 Free Software Foundation, Inc.
+Copyright 1991, 1993-1994, 1996-1997, 2000-2001, 2004, 2006-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
It has been copied and adapted from the GNU MP Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mparam_h.in b/Build/source/libs/mpfr/mpfr-src/src/mparam_h.in
index bd6c91c6201..03b5454b24b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mparam_h.in
+++ b/Build/source/libs/mpfr/mpfr-src/src/mparam_h.in
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h b/Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h
index 03f6afbf890..e0db8103a8b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/mpf2mpfr.h
@@ -1,7 +1,7 @@
/* mpf2mpfr.h -- Compatibility include file with mpf.
-Copyright 1999-2002, 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2002, 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mpfr-gmp.c b/Build/source/libs/mpfr/mpfr-src/src/mpfr-gmp.c
index 893b2e495ad..d2d53ff8ad0 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mpfr-gmp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/mpfr-gmp.c
@@ -1,8 +1,8 @@
/* mpfr_gmp -- Limited gmp-impl emulator
Modified version of the GMP files.
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mpfr-gmp.h b/Build/source/libs/mpfr/mpfr-src/src/mpfr-gmp.h
index b1862ffe717..445b35338e9 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mpfr-gmp.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/mpfr-gmp.h
@@ -1,7 +1,7 @@
/* Interface to replace gmp-impl.h
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -158,7 +158,7 @@ __MPFR_DECLSPEC void mpfr_assert_fail _MPFR_PROTO((const char *, int,
#define ASSERT_FAIL(expr) mpfr_assert_fail (__FILE__, __LINE__, #expr)
#define ASSERT(expr) MPFR_ASSERTD(expr)
-/* Access fileds of GMP struct */
+/* Access fields of GMP struct */
#define SIZ(x) ((x)->_mp_size)
#define ABSIZ(x) ABS (SIZ (x))
#define PTR(x) ((x)->_mp_d)
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mpfr-impl.h b/Build/source/libs/mpfr/mpfr-src/src/mpfr-impl.h
index 5ce52ac21d1..cce39c3824f 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mpfr-impl.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/mpfr-impl.h
@@ -1,7 +1,7 @@
/* Utilities for MPFR developers, not exported.
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -234,6 +234,10 @@ typedef __gmp_const mp_limb_t *mpfr_limb_srcptr;
************* Global Internal Variables **************
******************************************************/
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
/* Cache struct */
struct __gmpfr_cache_s {
mpfr_t x;
@@ -243,32 +247,86 @@ struct __gmpfr_cache_s {
typedef struct __gmpfr_cache_s mpfr_cache_t[1];
typedef struct __gmpfr_cache_s *mpfr_cache_ptr;
-#if defined (__cplusplus)
-extern "C" {
+#if __GMP_LIBGMP_DLL
+# define MPFR_WIN_THREAD_SAFE_DLL 1
#endif
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR unsigned int __gmpfr_flags;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emin;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emax;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_prec_t __gmpfr_default_fp_bit_precision;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_rnd_t __gmpfr_default_rounding_mode;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_cache_const_euler;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_cache_const_catalan;
+/* Detect some possible inconsistencies under Unix. */
+#if defined(__unix__)
+# if defined(_WIN32)
+# error "Both __unix__ and _WIN32 are defined"
+# endif
+# if __GMP_LIBGMP_DLL
+# error "__unix__ is defined and __GMP_LIBGMP_DLL is true"
+# endif
+# if defined(MPFR_WIN_THREAD_SAFE_DLL)
+# error "Both __unix__ and MPFR_WIN_THREAD_SAFE_DLL are defined"
+# endif
+#endif
-#ifndef MPFR_USE_LOGGING
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_cache_const_pi;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_cache_const_log2;
-#else
+#if defined(__MPFR_WITHIN_MPFR) || !defined(MPFR_WIN_THREAD_SAFE_DLL)
+extern MPFR_THREAD_ATTR unsigned int __gmpfr_flags;
+extern MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emin;
+extern MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emax;
+extern MPFR_THREAD_ATTR mpfr_prec_t __gmpfr_default_fp_bit_precision;
+extern MPFR_THREAD_ATTR mpfr_rnd_t __gmpfr_default_rounding_mode;
+extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_cache_const_euler;
+extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_cache_const_catalan;
+# ifndef MPFR_USE_LOGGING
+extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_cache_const_pi;
+extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_cache_const_log2;
+# else
/* Two constants are used by the logging functions (via mpfr_fprintf,
then mpfr_log, for the base conversion): pi and log(2). Since the
mpfr_cache function isn't re-entrant when working on the same cache,
we need to define two caches for each constant. */
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_normal_pi;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_normal_log2;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_logging_pi;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_logging_log2;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_cache_ptr __gmpfr_cache_const_pi;
-__MPFR_DECLSPEC extern MPFR_THREAD_ATTR mpfr_cache_ptr __gmpfr_cache_const_log2;
+extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_normal_pi;
+extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_normal_log2;
+extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_logging_pi;
+extern MPFR_THREAD_ATTR mpfr_cache_t __gmpfr_logging_log2;
+extern MPFR_THREAD_ATTR mpfr_cache_ptr __gmpfr_cache_const_pi;
+extern MPFR_THREAD_ATTR mpfr_cache_ptr __gmpfr_cache_const_log2;
+# endif
+#endif
+
+#ifdef MPFR_WIN_THREAD_SAFE_DLL
+__MPFR_DECLSPEC unsigned int * __gmpfr_flags_f();
+__MPFR_DECLSPEC mpfr_exp_t * __gmpfr_emin_f();
+__MPFR_DECLSPEC mpfr_exp_t * __gmpfr_emax_f();
+__MPFR_DECLSPEC mpfr_prec_t * __gmpfr_default_fp_bit_precision_f();
+__MPFR_DECLSPEC mpfr_rnd_t * __gmpfr_default_rounding_mode_f();
+__MPFR_DECLSPEC mpfr_cache_t * __gmpfr_cache_const_euler_f();
+__MPFR_DECLSPEC mpfr_cache_t * __gmpfr_cache_const_catalan_f();
+# ifndef MPFR_USE_LOGGING
+__MPFR_DECLSPEC mpfr_cache_t * __gmpfr_cache_const_pi_f();
+__MPFR_DECLSPEC mpfr_cache_t * __gmpfr_cache_const_log2_f();
+# else
+__MPFR_DECLSPEC mpfr_cache_t * __gmpfr_normal_pi_f();
+__MPFR_DECLSPEC mpfr_cache_t * __gmpfr_normal_log2_f();
+__MPFR_DECLSPEC mpfr_cache_t * __gmpfr_logging_pi_f();
+__MPFR_DECLSPEC mpfr_cache_t * __gmpfr_logging_log2_f();
+__MPFR_DECLSPEC mpfr_cache_ptr * __gmpfr_cache_const_pi_f();
+__MPFR_DECLSPEC mpfr_cache_ptr * __gmpfr_cache_const_log2_f();
+# endif
+# ifndef __MPFR_WITHIN_MPFR
+# define __gmpfr_flags (*__gmpfr_flags_f())
+# define __gmpfr_emin (*__gmpfr_emin_f())
+# define __gmpfr_emax (*__gmpfr_emax_f())
+# define __gmpfr_default_fp_bit_precision (*__gmpfr_default_fp_bit_precision_f())
+# define __gmpfr_default_rounding_mode (*__gmpfr_default_rounding_mode_f())
+# define __gmpfr_cache_const_euler (*__gmpfr_cache_const_euler_f())
+# define __gmpfr_cache_const_catalan (*__gmpfr_cache_const_catalan_f())
+# ifndef MPFR_USE_LOGGING
+# define __gmpfr_cache_const_pi (*__gmpfr_cache_const_pi_f())
+# define __gmpfr_cache_const_log2 (*__gmpfr_cache_const_log2_f())
+# else
+# define __gmpfr_normal_pi (*__gmpfr_normal_pi_f())
+# define __gmpfr_logging_pi (*__gmpfr_logging_pi_f())
+# define __gmpfr_logging_log2 (*__gmpfr_logging_log2_f())
+# define __gmpfr_cache_const_pi (*__gmpfr_cache_const_pi_f())
+# define __gmpfr_cache_const_log2 (*__gmpfr_cache_const_log2_f())
+# endif
+# endif
#endif
#define BASE_MAX 62
@@ -864,7 +922,7 @@ typedef intmax_t mpfr_eexp_t;
#define MPFR_IS_LIKE_RNDD(rnd, sign) \
((rnd==MPFR_RNDD) || (rnd==MPFR_RNDZ && sign>0) || (rnd==MPFR_RNDA && sign<0))
-/* Invert a rounding mode, RNDZ and RNDA are unchanged */
+/* Invert a rounding mode, RNDN, RNDZ and RNDA are unchanged */
#define MPFR_INVERT_RND(rnd) ((rnd == MPFR_RNDU) ? MPFR_RNDD : \
((rnd == MPFR_RNDD) ? MPFR_RNDU : rnd))
@@ -994,7 +1052,7 @@ extern unsigned char *mpfr_stack;
#define mpfr_const_catalan(_d,_r) mpfr_cache(_d,__gmpfr_cache_const_catalan,_r)
#define MPFR_DECL_INIT_CACHE(_cache,_func) \
- mpfr_cache_t MPFR_THREAD_ATTR _cache = \
+ MPFR_THREAD_ATTR mpfr_cache_t _cache = \
{{{{0,MPFR_SIGN_POS,0,(mp_limb_t*)0}},0,_func}}
@@ -1875,7 +1933,8 @@ __MPFR_DECLSPEC int mpfr_round_raw_4 _MPFR_PROTO ((mp_limb_t *,
__MPFR_DECLSPEC int mpfr_check _MPFR_PROTO ((mpfr_srcptr));
__MPFR_DECLSPEC int mpfr_sum_sort _MPFR_PROTO ((mpfr_srcptr *const,
- unsigned long, mpfr_srcptr *));
+ unsigned long, mpfr_srcptr *,
+ mpfr_prec_t *));
__MPFR_DECLSPEC int mpfr_get_cputime _MPFR_PROTO ((void));
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mpfr-intmax.h b/Build/source/libs/mpfr/mpfr-src/src/mpfr-intmax.h
index 7a9b802d26d..3a7afc0fa75 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mpfr-intmax.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/mpfr-intmax.h
@@ -1,7 +1,7 @@
/* MPFR internal header related to intmax_t.
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mpfr-longlong.h b/Build/source/libs/mpfr/mpfr-src/src/mpfr-longlong.h
index 30aa7470bb6..1ba6d675bb4 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mpfr-longlong.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/mpfr-longlong.h
@@ -1,7 +1,7 @@
/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
-2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013-2015 Free Software Foundation, Inc.
+2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013-2016 Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mpfr-thread.h b/Build/source/libs/mpfr/mpfr-src/src/mpfr-thread.h
index 4c77d3f515b..1ccaa17c30a 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mpfr-thread.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/mpfr-thread.h
@@ -1,7 +1,7 @@
/* MPFR internal header related to thread-local variables.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -31,12 +31,9 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
#ifndef MPFR_THREAD_ATTR
# ifdef MPFR_USE_THREAD_SAFE
# if defined(_MSC_VER)
-# if defined(_WINDLL)
-# error "Can't build MPFR DLL as thread safe."
-# define MPFR_THREAD_ATTR
-# else
-# define MPFR_THREAD_ATTR __declspec( thread )
-# endif
+# define MPFR_THREAD_ATTR __declspec( thread )
+# elif defined(MPFR_USE_C11_THREAD_SAFE)
+# define MPFR_THREAD_ATTR _Thread_local
# else
# define MPFR_THREAD_ATTR __thread
# endif
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mpfr.h b/Build/source/libs/mpfr/mpfr-src/src/mpfr.h
index 7473dfd79d6..e6105c94796 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mpfr.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/mpfr.h
@@ -1,7 +1,7 @@
/* mpfr.h -- Include file for mpfr.
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -26,8 +26,8 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
/* Define MPFR version number */
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 1
-#define MPFR_VERSION_PATCHLEVEL 3
-#define MPFR_VERSION_STRING "3.1.3"
+#define MPFR_VERSION_PATCHLEVEL 4
+#define MPFR_VERSION_STRING "3.1.4"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mpn_exp.c b/Build/source/libs/mpfr/mpfr-src/src/mpn_exp.c
index a1d38667f5b..5fac37e721f 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mpn_exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/mpn_exp.c
@@ -1,7 +1,7 @@
/* mpfr_mpn_exp -- auxiliary function for mpfr_get_str and mpfr_set_str
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mul.c b/Build/source/libs/mpfr/mpfr-src/src/mul.c
index a67f774df86..67c974ffef3 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mul.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/mul.c
@@ -1,7 +1,7 @@
/* mpfr_mul -- multiply two floating-point numbers
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mul_2exp.c b/Build/source/libs/mpfr/mpfr-src/src/mul_2exp.c
index 0e816801c53..dac89f1fe6a 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mul_2exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/mul_2exp.c
@@ -1,7 +1,7 @@
/* mpfr_mul_2exp -- multiply a floating-point number by a power of two
-Copyright 1999, 2001, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mul_2si.c b/Build/source/libs/mpfr/mpfr-src/src/mul_2si.c
index b9293e2a1f3..04fdee403f6 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mul_2si.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/mul_2si.c
@@ -1,7 +1,7 @@
/* mpfr_mul_2si -- multiply a floating-point number by a power of two
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -39,7 +39,7 @@ mpfr_mul_2si (mpfr_ptr y, mpfr_srcptr x, long int n, mpfr_rnd_t rnd_mode)
{
mpfr_exp_t exp = MPFR_GET_EXP (x);
MPFR_SETRAW (inexact, y, x, exp, rnd_mode);
- if (MPFR_UNLIKELY( n > 0 && (__gmpfr_emax < MPFR_EMIN_MIN + n ||
+ if (MPFR_UNLIKELY(n >= 0 && (__gmpfr_emax < MPFR_EMIN_MIN + n ||
exp > __gmpfr_emax - n)))
return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y));
else if (MPFR_UNLIKELY(n < 0 && (__gmpfr_emin > MPFR_EMAX_MAX + n ||
@@ -48,7 +48,8 @@ mpfr_mul_2si (mpfr_ptr y, mpfr_srcptr x, long int n, mpfr_rnd_t rnd_mode)
if (rnd_mode == MPFR_RNDN &&
(__gmpfr_emin > MPFR_EMAX_MAX + (n + 1) ||
exp < __gmpfr_emin - (n + 1) ||
- (inexact >= 0 && mpfr_powerof2_raw (y))))
+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
+ mpfr_powerof2_raw (y))))
rnd_mode = MPFR_RNDZ;
return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mul_2ui.c b/Build/source/libs/mpfr/mpfr-src/src/mul_2ui.c
index cf7966c8238..8c9959abe37 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mul_2ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/mul_2ui.c
@@ -1,7 +1,7 @@
/* mpfr_mul_2ui -- multiply a floating-point number by a power of two
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mul_d.c b/Build/source/libs/mpfr/mpfr-src/src/mul_d.c
index 102f71f6e7d..ff2514ad7ba 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mul_d.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/mul_d.c
@@ -1,8 +1,8 @@
/* mpfr_mul_d -- multiply a multiple precision floating-point number
by a machine double precision float
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mul_ui.c b/Build/source/libs/mpfr/mpfr-src/src/mul_ui.c
index 9b762d4f7da..bd144761962 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mul_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/mul_ui.c
@@ -1,8 +1,8 @@
/* mpfr_mul_ui -- multiply a floating-point number by a machine integer
mpfr_mul_si -- multiply a floating-point number by a machine integer
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -126,7 +126,8 @@ int mpfr_mul_si (mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode)
res = mpfr_mul_ui (y, x, u, rnd_mode);
else
{
- res = -mpfr_mul_ui (y, x, -u, MPFR_INVERT_RND (rnd_mode));
+ res = - mpfr_mul_ui (y, x, - (unsigned long) u,
+ MPFR_INVERT_RND (rnd_mode));
MPFR_CHANGE_SIGN (y);
}
return res;
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mulders.c b/Build/source/libs/mpfr/mpfr-src/src/mulders.c
index 8f23d21b678..a988db84bcb 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mulders.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/mulders.c
@@ -1,7 +1,7 @@
/* Mulders' MulHigh function (short product)
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -236,9 +236,10 @@ mpfr_divhigh_n_basecase (mpfr_limb_ptr qp, mpfr_limb_ptr np,
that in addition to the limb np[n-1] to reduce, we have at least 2
extra limbs, thus accessing np[n-3] is valid. */
- /* warning: we can have np[n-1]=d1 and np[n-2]=d0, but since {np,n} < D,
- the largest possible partial quotient is B-1 */
- if (MPFR_UNLIKELY(np[n - 1] == d1 && np[n - 2] == d0))
+ /* Warning: we can have np[n-1]>d1 or (np[n-1]=d1 and np[n-2]>=d0) here,
+ since we truncate the divisor at each step, but since {np,n} < D
+ originally, the largest possible partial quotient is B-1. */
+ if (MPFR_UNLIKELY(np[n-1] > d1 || (np[n-1] == d1 && np[n-2] >= d0)))
q2 = ~ (mp_limb_t) 0;
else
udiv_qr_3by2 (q2, q1, q0, np[n - 1], np[n - 2], np[n - 3],
diff --git a/Build/source/libs/mpfr/mpfr-src/src/neg.c b/Build/source/libs/mpfr/mpfr-src/src/neg.c
index 030d4c79abc..b9f5c702cb3 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/neg.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/neg.c
@@ -1,7 +1,7 @@
/* mpfr_neg -- change the sign of a floating-point number
-Copyright 1999-2001, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2001, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/next.c b/Build/source/libs/mpfr/mpfr-src/src/next.c
index f03d3885919..c49c32928ee 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/next.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/next.c
@@ -1,8 +1,8 @@
/* mpfr_nextabove, mpfr_nextbelow, mpfr_nexttoward -- next representable
floating-point number
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/out_str.c b/Build/source/libs/mpfr/mpfr-src/src/out_str.c
index 046eb79f21b..88707571e44 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/out_str.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/out_str.c
@@ -1,7 +1,7 @@
/* mpfr_out_str -- output a floating-point number to a stream
-Copyright 1999, 2001-2002, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2002, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/pow.c b/Build/source/libs/mpfr/mpfr-src/src/pow.c
index 33bf5442ad1..62a3f018382 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/pow.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/pow.c
@@ -1,7 +1,7 @@
/* mpfr_pow -- power function x^y
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/pow_si.c b/Build/source/libs/mpfr/mpfr-src/src/pow_si.c
index 9ab6f82f810..3ea5cc56d9f 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/pow_si.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/pow_si.c
@@ -1,7 +1,7 @@
/* mpfr_pow_si -- power function x^y with y a signed int
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/pow_ui.c b/Build/source/libs/mpfr/mpfr-src/src/pow_ui.c
index 75e104ae408..061b54cbb7b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/pow_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/pow_ui.c
@@ -1,8 +1,8 @@
/* mpfr_pow_ui-- compute the power of a floating-point
by a machine integer
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/pow_z.c b/Build/source/libs/mpfr/mpfr-src/src/pow_z.c
index a8913281c87..c2b0c79d39e 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/pow_z.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/pow_z.c
@@ -1,7 +1,7 @@
/* mpfr_pow_z -- power function x^z with z a MPZ
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/powerof2.c b/Build/source/libs/mpfr/mpfr-src/src/powerof2.c
index bacbcdcf6e4..f10ace0ad03 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/powerof2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/powerof2.c
@@ -1,7 +1,7 @@
/* mpfr_powerof2_raw -- test whether a floating-point number is a power of 2
-Copyright 2002-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/powerpc32/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/powerpc32/mparam.h
index 687586afdb0..6b5816b495d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/powerpc32/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/powerpc32/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/powerpc64/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/powerpc64/mparam.h
index 1e852a52e2d..79b87ceddce 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/powerpc64/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/powerpc64/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/print_raw.c b/Build/source/libs/mpfr/mpfr-src/src/print_raw.c
index 7c91ec0727c..80992c56798 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/print_raw.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/print_raw.c
@@ -1,8 +1,8 @@
/* mpfr_print_binary -- print the internal binary representation of a
floating-point number
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/print_rnd_mode.c b/Build/source/libs/mpfr/mpfr-src/src/print_rnd_mode.c
index fa90f4823f1..f863bbcff07 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/print_rnd_mode.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/print_rnd_mode.c
@@ -1,7 +1,7 @@
/* mpfr_print_rnd_mode -- convert a given rounding mode to a string
-Copyright 1999, 2001-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/printf.c b/Build/source/libs/mpfr/mpfr-src/src/printf.c
index adf90bbe375..72fb40e8a85 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/printf.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/printf.c
@@ -1,7 +1,7 @@
/* mpfr_printf -- printf function and friends.
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/rec_sqrt.c b/Build/source/libs/mpfr/mpfr-src/src/rec_sqrt.c
index aa7814f02cf..2be95302182 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/rec_sqrt.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/rec_sqrt.c
@@ -1,7 +1,7 @@
/* mpfr_rec_sqrt -- inverse square root
-Copyright 2008-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2008-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/reldiff.c b/Build/source/libs/mpfr/mpfr-src/src/reldiff.c
index 058e39da604..eac12cb8284 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/reldiff.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/reldiff.c
@@ -1,7 +1,7 @@
/* mpfr_reldiff -- compute relative difference of two floating-point numbers.
-Copyright 2000-2001, 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2001, 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/rem1.c b/Build/source/libs/mpfr/mpfr-src/src/rem1.c
index a977a0924c3..1299396e32b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/rem1.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/rem1.c
@@ -2,8 +2,8 @@
mpfr_fmod -- compute the floating-point remainder of x/y
mpfr_remquo and mpfr_remainder -- argument reduction functions
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -59,6 +59,7 @@ mpfr_rem1 (mpfr_ptr rem, long *quo, mpfr_rnd_t rnd_q,
mpfr_exp_t ex, ey;
int compare, inex, q_is_odd, sign, signx = MPFR_SIGN (x);
mpz_t mx, my, r;
+ int tiny = 0;
MPFR_ASSERTD (rnd_q == MPFR_RNDN || rnd_q == MPFR_RNDZ);
@@ -109,13 +110,27 @@ mpfr_rem1 (mpfr_ptr rem, long *quo, mpfr_rnd_t rnd_q,
if (ex <= ey)
{
/* q = x/y = mx/(my*2^(ey-ex)) */
- mpz_mul_2exp (my, my, ey - ex); /* divide mx by my*2^(ey-ex) */
- if (rnd_q == MPFR_RNDZ)
- /* 0 <= |r| <= |my|, r has the same sign as mx */
- mpz_tdiv_qr (mx, r, mx, my);
+
+ /* First detect cases where q=0, to avoid creating a huge number
+ my*2^(ey-ex): if sx = mpz_sizeinbase (mx, 2) and sy =
+ mpz_sizeinbase (my, 2), we have x < 2^(ex + sx) and
+ y >= 2^(ey + sy - 1), thus if ex + sx <= ey + sy - 1
+ the quotient is 0 */
+ if (ex + (mpfr_exp_t) mpz_sizeinbase (mx, 2) <
+ ey + (mpfr_exp_t) mpz_sizeinbase (my, 2))
+ {
+ tiny = 1;
+ mpz_set (r, mx);
+ mpz_set_ui (mx, 0);
+ }
else
- /* 0 <= |r| <= |my|, r has the same sign as my */
- mpz_fdiv_qr (mx, r, mx, my);
+ {
+ mpz_mul_2exp (my, my, ey - ex); /* divide mx by my*2^(ey-ex) */
+
+ /* since mx > 0 and my > 0, we can use mpz_tdiv_qr in all cases */
+ mpz_tdiv_qr (mx, r, mx, my);
+ /* 0 <= |r| <= |my|, r has the same sign as mx */
+ }
if (rnd_q == MPFR_RNDN)
q_is_odd = mpz_tstbit (mx, 0);
@@ -181,7 +196,20 @@ mpfr_rem1 (mpfr_ptr rem, long *quo, mpfr_rnd_t rnd_q,
/* FIXME: the comparison 2*r < my could be done more efficiently
at the mpn level */
mpz_mul_2exp (r, r, 1);
- compare = mpz_cmpabs (r, my);
+ /* if tiny=1, we should compare r with my*2^(ey-ex) */
+ if (tiny)
+ {
+ if (ex + (mpfr_exp_t) mpz_sizeinbase (r, 2) <
+ ey + (mpfr_exp_t) mpz_sizeinbase (my, 2))
+ compare = 0; /* r*2^ex < my*2^ey */
+ else
+ {
+ mpz_mul_2exp (my, my, ey - ex);
+ compare = mpz_cmpabs (r, my);
+ }
+ }
+ else
+ compare = mpz_cmpabs (r, my);
mpz_fdiv_q_2exp (r, r, 1);
compare = ((compare > 0) ||
((rnd_q == MPFR_RNDN) && (compare == 0) && q_is_odd));
diff --git a/Build/source/libs/mpfr/mpfr-src/src/rint.c b/Build/source/libs/mpfr/mpfr-src/src/rint.c
index f2a9410a489..2e50a983df8 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/rint.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/rint.c
@@ -1,7 +1,7 @@
/* mpfr_rint -- Round to an integer.
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/root.c b/Build/source/libs/mpfr/mpfr-src/src/root.c
index c1a141c90bf..5bf45449851 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/root.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/root.c
@@ -1,7 +1,7 @@
/* mpfr_root -- kth root.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -23,13 +23,15 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
#define MPFR_NEED_LONGLONG_H
#include "mpfr-impl.h"
- /* The computation of y = x^(1/k) is done as follows:
+ /* The computation of y = x^(1/k) is done as follows, except for large
+ values of k, for which this would be inefficient or yield internal
+ integer overflows:
Let x = sign * m * 2^(k*e) where m is an integer
with 2^(k*(n-1)) <= m < 2^(k*n) where n = PREC(y)
- and m = s^k + r where 0 <= r and m < (s+1)^k
+ and m = s^k + t where 0 <= t and m < (s+1)^k
we want that s has n bits i.e. s >= 2^(n-1), or m >= 2^(k*(n-1))
i.e. m must have at least k*(n-1)+1 bits
@@ -38,11 +40,15 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
x^(1/k) = s * 2^e or (s+1) * 2^e according to the rounding mode.
*/
+static int
+mpfr_root_aux (mpfr_ptr y, mpfr_srcptr x, unsigned long k,
+ mpfr_rnd_t rnd_mode);
+
int
mpfr_root (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode)
{
mpz_t m;
- mpfr_exp_t e, r, sh;
+ mpfr_exp_t e, r, sh, f;
mpfr_prec_t n, size_m, tmp;
int inexact, negative;
MPFR_SAVE_EXPO_DECL (expo);
@@ -55,50 +61,27 @@ mpfr_root (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode)
if (MPFR_UNLIKELY (k <= 1))
{
- if (k < 1) /* k==0 => y=x^(1/0)=x^(+Inf) */
-#if 0
- /* For 0 <= x < 1 => +0.
- For x = 1 => 1.
- For x > 1, => +Inf.
- For x < 0 => NaN.
- */
+ if (k == 0)
{
- if (MPFR_IS_NEG (x) && !MPFR_IS_ZERO (x))
- {
- MPFR_SET_NAN (y);
- MPFR_RET_NAN;
- }
- inexact = mpfr_cmp (x, __gmpfr_one);
- if (inexact == 0)
- return mpfr_set_ui (y, 1, rnd_mode); /* 1 may be Out of Range */
- else if (inexact < 0)
- return mpfr_set_ui (y, 0, rnd_mode); /* 0+ */
- else
- {
- mpfr_set_inf (y, 1);
- return 0;
- }
+ MPFR_SET_NAN (y);
+ MPFR_RET_NAN;
}
-#endif
- {
- MPFR_SET_NAN (y);
- MPFR_RET_NAN;
- }
- else /* y =x^(1/1)=x */
+ else /* y = x^(1/1) = x */
return mpfr_set (y, x, rnd_mode);
}
/* Singular values */
- else if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
{
if (MPFR_IS_NAN (x))
{
MPFR_SET_NAN (y); /* NaN^(1/k) = NaN */
MPFR_RET_NAN;
}
- else if (MPFR_IS_INF (x)) /* +Inf^(1/k) = +Inf
- -Inf^(1/k) = -Inf if k odd
- -Inf^(1/k) = NaN if k even */
+
+ if (MPFR_IS_INF (x)) /* +Inf^(1/k) = +Inf
+ -Inf^(1/k) = -Inf if k odd
+ -Inf^(1/k) = NaN if k even */
{
if (MPFR_IS_NEG(x) && (k % 2 == 0))
{
@@ -106,27 +89,31 @@ mpfr_root (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode)
MPFR_RET_NAN;
}
MPFR_SET_INF (y);
- MPFR_SET_SAME_SIGN (y, x);
- MPFR_RET (0);
}
else /* x is necessarily 0: (+0)^(1/k) = +0
(-0)^(1/k) = -0 */
{
MPFR_ASSERTD (MPFR_IS_ZERO (x));
MPFR_SET_ZERO (y);
- MPFR_SET_SAME_SIGN (y, x);
- MPFR_RET (0);
}
+ MPFR_SET_SAME_SIGN (y, x);
+ MPFR_RET (0);
}
/* Returns NAN for x < 0 and k even */
- else if (MPFR_IS_NEG (x) && (k % 2 == 0))
+ if (MPFR_UNLIKELY (MPFR_IS_NEG (x) && (k % 2 == 0)))
{
MPFR_SET_NAN (y);
MPFR_RET_NAN;
}
/* General case */
+
+ /* For large k, use exp(log(x)/k). The threshold of 100 seems to be quite
+ good when the precision goes to infinity. */
+ if (k > 100)
+ return mpfr_root_aux (y, x, k, rnd_mode);
+
MPFR_SAVE_EXPO_MARK (expo);
mpz_init (m);
@@ -135,31 +122,24 @@ mpfr_root (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode)
mpz_neg (m, m);
r = e % (mpfr_exp_t) k;
if (r < 0)
- r += k; /* now r = e (mod k) with 0 <= e < r */
+ r += k; /* now r = e (mod k) with 0 <= r < k */
+ MPFR_ASSERTD (0 <= r && r < k);
/* x = (m*2^r) * 2^(e-r) where e-r is a multiple of k */
MPFR_MPZ_SIZEINBASE2 (size_m, m);
/* for rounding to nearest, we want the round bit to be in the root */
n = MPFR_PREC (y) + (rnd_mode == MPFR_RNDN);
- /* we now multiply m by 2^(r+k*sh) so that root(m,k) will give
- exactly n bits: we want k*(n-1)+1 <= size_m + k*sh + r <= k*n
- i.e. sh = floor ((kn-size_m-r)/k) */
- if ((mpfr_exp_t) size_m + r > k * (mpfr_exp_t) n)
- sh = 0; /* we already have too many bits */
+ /* we now multiply m by 2^sh so that root(m,k) will give
+ exactly n bits: we want k*(n-1)+1 <= size_m + sh <= k*n
+ i.e. sh = k*f + r with f = max(floor((k*n-size_m-r)/k),0) */
+ if ((mpfr_exp_t) size_m + r >= k * (mpfr_exp_t) n)
+ f = 0; /* we already have too many bits */
else
- sh = (k * (mpfr_exp_t) n - (mpfr_exp_t) size_m - r) / k;
- sh = k * sh + r;
- if (sh >= 0)
- {
- mpz_mul_2exp (m, m, sh);
- e = e - sh;
- }
- else if (r > 0)
- {
- mpz_mul_2exp (m, m, r);
- e = e - r;
- }
+ f = (k * (mpfr_exp_t) n - (mpfr_exp_t) size_m - r) / k;
+ sh = k * f + r;
+ mpz_mul_2exp (m, m, sh);
+ e = e - sh;
/* invariant: x = m*2^e, with e divisible by k */
@@ -203,3 +183,97 @@ mpfr_root (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode)
MPFR_SAVE_EXPO_FREE (expo);
return mpfr_check_range (y, inexact, rnd_mode);
}
+
+/* Compute y <- x^(1/k) using exp(log(x)/k).
+ Assume all special cases have been eliminated before.
+ In the extended exponent range, overflows/underflows are not possible.
+ Assume x > 0, or x < 0 and k odd.
+*/
+static int
+mpfr_root_aux (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode)
+{
+ int inexact, exact_root = 0;
+ mpfr_prec_t w; /* working precision */
+ mpfr_t absx, t;
+ MPFR_GROUP_DECL(group);
+ MPFR_TMP_DECL(marker);
+ MPFR_ZIV_DECL(loop);
+ MPFR_SAVE_EXPO_DECL (expo);
+
+ MPFR_TMP_INIT_ABS (absx, x);
+
+ MPFR_TMP_MARK(marker);
+ w = MPFR_PREC(y) + 10;
+ /* Take some guard bits to prepare for the 'expt' lost bits below.
+ If |x| < 2^k, then log|x| < k, thus taking log2(k) bits should be fine. */
+ if (MPFR_GET_EXP(x) > 0)
+ w += MPFR_INT_CEIL_LOG2 (MPFR_GET_EXP(x));
+ MPFR_GROUP_INIT_1(group, w, t);
+ MPFR_SAVE_EXPO_MARK (expo);
+ MPFR_ZIV_INIT (loop, w);
+ for (;;)
+ {
+ mpfr_exp_t expt;
+ unsigned int err;
+
+ mpfr_log (t, absx, MPFR_RNDN);
+ /* t = log|x| * (1 + theta) with |theta| <= 2^(-w) */
+ mpfr_div_ui (t, t, k, MPFR_RNDN);
+ expt = MPFR_GET_EXP (t);
+ /* t = log|x|/k * (1 + theta) + eps with |theta| <= 2^(-w)
+ and |eps| <= 1/2 ulp(t), thus the total error is bounded
+ by 1.5 * 2^(expt - w) */
+ mpfr_exp (t, t, MPFR_RNDN);
+ /* t = |x|^(1/k) * exp(tau) * (1 + theta1) with
+ |tau| <= 1.5 * 2^(expt - w) and |theta1| <= 2^(-w).
+ For |tau| <= 0.5 we have |exp(tau)-1| < 4/3*tau, thus
+ for w >= expt + 2 we have:
+ t = |x|^(1/k) * (1 + 2^(expt+2)*theta2) * (1 + theta1) with
+ |theta1|, |theta2| <= 2^(-w).
+ If expt+2 > 0, as long as w >= 1, we have:
+ t = |x|^(1/k) * (1 + 2^(expt+3)*theta3) with |theta3| < 2^(-w).
+ For expt+2 = 0, we have:
+ t = |x|^(1/k) * (1 + 2^2*theta3) with |theta3| < 2^(-w).
+ Finally for expt+2 < 0 we have:
+ t = |x|^(1/k) * (1 + 2*theta3) with |theta3| < 2^(-w).
+ */
+ err = (expt + 2 > 0) ? expt + 3
+ : (expt + 2 == 0) ? 2 : 1;
+ /* now t = |x|^(1/k) * (1 + 2^(err-w)) thus the error is at most
+ 2^(EXP(t) - w + err) */
+ if (MPFR_LIKELY (MPFR_CAN_ROUND(t, w - err, MPFR_PREC(y), rnd_mode)))
+ break;
+
+ /* If we fail to round correctly, check for an exact result or a
+ midpoint result with MPFR_RNDN (regarded as hard-to-round in
+ all precisions in order to determine the ternary value). */
+ {
+ mpfr_t z, zk;
+
+ mpfr_init2 (z, MPFR_PREC(y) + (rnd_mode == MPFR_RNDN));
+ mpfr_init2 (zk, MPFR_PREC(x));
+ mpfr_set (z, t, MPFR_RNDN);
+ inexact = mpfr_pow_ui (zk, z, k, MPFR_RNDN);
+ exact_root = !inexact && mpfr_equal_p (zk, absx);
+ if (exact_root) /* z is the exact root, thus round z directly */
+ inexact = mpfr_set4 (y, z, rnd_mode, MPFR_SIGN (x));
+ mpfr_clear (zk);
+ mpfr_clear (z);
+ if (exact_root)
+ break;
+ }
+
+ MPFR_ZIV_NEXT (loop, w);
+ MPFR_GROUP_REPREC_1(group, w, t);
+ }
+ MPFR_ZIV_FREE (loop);
+
+ if (!exact_root)
+ inexact = mpfr_set4 (y, t, rnd_mode, MPFR_SIGN (x));
+
+ MPFR_GROUP_CLEAR(group);
+ MPFR_TMP_FREE(marker);
+ MPFR_SAVE_EXPO_FREE (expo);
+
+ return mpfr_check_range (y, inexact, rnd_mode);
+}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/round_near_x.c b/Build/source/libs/mpfr/mpfr-src/src/round_near_x.c
index 02a9a1b56b5..6aa0eb24389 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/round_near_x.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/round_near_x.c
@@ -1,7 +1,7 @@
/* mpfr_round_near_x -- Round a floating point number nears another one.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/round_p.c b/Build/source/libs/mpfr/mpfr-src/src/round_p.c
index bf12defd7ee..f19a66433f5 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/round_p.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/round_p.c
@@ -1,7 +1,7 @@
/* mpfr_round_p -- check if an approximation is roundable.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -31,7 +31,11 @@ mpfr_round_p (mp_limb_t *bp, mp_size_t bn, mpfr_exp_t err0, mpfr_prec_t prec)
{
int i1, i2;
+ MPFR_ASSERTN(bp[bn - 1] & MPFR_LIMB_HIGHBIT);
+
i1 = mpfr_round_p_2 (bp, bn, err0, prec);
+
+ /* compare with mpfr_can_round_raw */
i2 = mpfr_can_round_raw (bp, bn, MPFR_SIGN_POS, err0,
MPFR_RNDN, MPFR_RNDZ, prec);
if (i1 != i2)
@@ -42,6 +46,7 @@ mpfr_round_p (mp_limb_t *bp, mp_size_t bn, mpfr_exp_t err0, mpfr_prec_t prec)
gmp_fprintf (stderr, "%NX\n", bp, bn);
MPFR_ASSERTN (0);
}
+
return i1;
}
# define mpfr_round_p mpfr_round_p_2
@@ -62,6 +67,8 @@ mpfr_round_p (mp_limb_t *bp, mp_size_t bn, mpfr_exp_t err0, mpfr_prec_t prec)
mp_limb_t tmp, mask;
int s;
+ MPFR_ASSERTD(bp[bn - 1] & MPFR_LIMB_HIGHBIT);
+
err = (mpfr_prec_t) bn * GMP_NUMB_BITS;
if (MPFR_UNLIKELY (err0 <= 0 || (mpfr_uexp_t) err0 <= prec || prec >= err))
return 0; /* can't round */
diff --git a/Build/source/libs/mpfr/mpfr-src/src/round_prec.c b/Build/source/libs/mpfr/mpfr-src/src/round_prec.c
index 9dce103520f..c99d63e55ef 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/round_prec.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/round_prec.c
@@ -1,8 +1,8 @@
/* 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-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -141,24 +141,40 @@ int
mpfr_can_round_raw (const mp_limb_t *bp, mp_size_t bn, int neg, mpfr_exp_t err0,
mpfr_rnd_t rnd1, mpfr_rnd_t rnd2, mpfr_prec_t prec)
{
- mpfr_prec_t err;
+ mpfr_prec_t err, prec0 = prec;
mp_size_t k, k1, tn;
int s, s1;
mp_limb_t cc, cc2;
mp_limb_t *tmp;
MPFR_TMP_DECL(marker);
+ MPFR_ASSERTD(bp[bn - 1] & MPFR_LIMB_HIGHBIT);
+
if (MPFR_UNLIKELY(err0 < 0 || (mpfr_uexp_t) err0 <= prec))
return 0; /* can't round */
- else if (MPFR_UNLIKELY (prec > (mpfr_prec_t) bn * GMP_NUMB_BITS))
- { /* then ulp(b) < precision < error */
- return rnd2 == MPFR_RNDN && (mpfr_uexp_t) err0 - 2 >= prec;
- /* can round only in rounding to the nearest and err0 >= prec + 2 */
- }
MPFR_ASSERT_SIGN(neg);
neg = MPFR_IS_NEG_SIGN(neg);
+ /* Transform RNDD and RNDU to Zero / Away */
+ MPFR_ASSERTD((neg == 0) || (neg == 1));
+ if (rnd1 != MPFR_RNDN)
+ rnd1 = MPFR_IS_LIKE_RNDZ(rnd1, neg) ? MPFR_RNDZ : MPFR_RNDA;
+ if (rnd2 != MPFR_RNDN)
+ rnd2 = MPFR_IS_LIKE_RNDZ(rnd2, neg) ? MPFR_RNDZ : MPFR_RNDA;
+
+ if (MPFR_UNLIKELY (prec > (mpfr_prec_t) bn * GMP_NUMB_BITS))
+ { /* Then prec < PREC(b): we can round:
+ (i) in rounding to the nearest iff err0 >= prec + 2
+ (ii) in directed rounding mode iff rnd1 is compatible with rnd2
+ and err0 >= prec + 1, unless b = 2^k and rnd1=rnd2=RNDA in
+ which case we need err0 >= prec + 2. */
+ if (rnd2 == MPFR_RNDN)
+ return (mpfr_uexp_t) err0 - 2 >= prec;
+ else
+ return (rnd1 == rnd2) && (mpfr_uexp_t) err0 - 2 >= prec;
+ }
+
/* if the error is smaller than ulp(b), then anyway it will propagate
up to ulp(b) */
err = ((mpfr_uexp_t) err0 > (mpfr_prec_t) bn * GMP_NUMB_BITS) ?
@@ -168,19 +184,25 @@ mpfr_can_round_raw (const mp_limb_t *bp, mp_size_t bn, int neg, mpfr_exp_t err0,
k = (err - 1) / GMP_NUMB_BITS;
MPFR_UNSIGNED_MINUS_MODULO(s, err);
/* the error corresponds to bit s in limb k, the most significant limb
- being limb 0 */
+ being limb 0; in memory, limb k is bp[bn-1-k]. */
k1 = (prec - 1) / GMP_NUMB_BITS;
MPFR_UNSIGNED_MINUS_MODULO(s1, prec);
- /* the last significant bit is bit s1 in limb k1 */
+ /* the least significant bit is bit s1 in limb k1 */
- /* don't need to consider the k1 most significant limbs */
+ /* We don't need to consider the k1 most significant limbs.
+ They will be considered later only to detect when subtracting
+ the error bound yields a change of binade.
+ Warning! The number with updated bn may no longer be normalized. */
k -= k1;
bn -= k1;
prec -= (mpfr_prec_t) k1 * GMP_NUMB_BITS;
- /* if when adding or subtracting (1 << s) in bp[bn-1-k], it does not
- change bp[bn-1] >> s1, then we can round */
+ /* We can decide of the correct rounding if rnd2(b-eps) and rnd2(b+eps)
+ give the same result to the target precision 'prec', i.e., if when
+ adding or subtracting (1 << s) in bp[bn-1-k], it does not change the
+ rounding in direction 'rnd2' at ulp-position bp[bn-1] >> s1, taking also
+ into account the possible change of binade. */
MPFR_TMP_MARK(marker);
tn = bn;
k++; /* since we work with k+1 everywhere */
@@ -190,11 +212,6 @@ mpfr_can_round_raw (const mp_limb_t *bp, mp_size_t bn, int neg, mpfr_exp_t err0,
MPFR_ASSERTD (k > 0);
- /* Transform RNDD and RNDU to Zero / Away */
- MPFR_ASSERTD((neg == 0) || (neg ==1));
- if (MPFR_IS_RNDUTEST_OR_RNDDNOTTEST(rnd1, neg))
- rnd1 = MPFR_RNDZ;
-
switch (rnd1)
{
case MPFR_RNDZ:
@@ -203,33 +220,54 @@ mpfr_can_round_raw (const mp_limb_t *bp, mp_size_t bn, int neg, mpfr_exp_t err0,
/* mpfr_round_raw2 returns 1 if one should add 1 at ulp(b,prec),
and 0 otherwise */
cc ^= mpfr_round_raw2 (bp, bn, neg, rnd2, prec);
- /* cc is the new value of bit s1 in bp[bn-1] */
+ /* cc is the new value of bit s1 in bp[bn-1] after rounding 'rnd2' */
+
/* now round b + 2^(MPFR_EXP(b)-err) */
- cc2 = mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
+ mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
+ /* if there was a carry here, then necessarily bit s1 of bp[bn-1]
+ changed, thus we surely cannot round for directed rounding, but this
+ will be detected below, with cc2 != cc */
break;
case MPFR_RNDN:
/* Round to nearest */
- /* first round b+2^(MPFR_EXP(b)-err) */
- cc = mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
+
+ /* first round b+2^(MPFR_EXP(b)-err) */
+ mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
+ /* same remark as above in case a carry occurs in mpn_add_1() */
cc = (tmp[bn - 1] >> s1) & 1; /* gives 0 when cc=1 */
cc ^= mpfr_round_raw2 (tmp, bn, neg, rnd2, prec);
+ /* cc is the new value of bit s1 in bp[bn-1]+eps after rounding 'rnd2' */
+
+ subtract_eps:
/* now round b-2^(MPFR_EXP(b)-err) */
cc2 = mpn_sub_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
+ /* propagate the potential borrow up to the most significant limb
+ (it cannot propagate further since the most significant limb is
+ at least MPFR_LIMB_HIGHBIT) */
+ for (tn = 0; tn + 1 < k1 && (cc2 != 0); tn ++)
+ cc2 = bp[bn + tn] == 0;
+ /* We have an exponent decrease when either:
+ (i) k1 = 0 and tmp[bn-1] < MPFR_LIMB_HIGHBIT
+ (ii) k1 > 0 and cc <> 0 and bp[bn + tn] = MPFR_LIMB_HIGHBIT
+ (then necessarily tn = k1-1).
+ Then for directed rounding we cannot round,
+ and for rounding to nearest we cannot round when err = prec + 1.
+ */
+ if (((k1 == 0 && tmp[bn - 1] < MPFR_LIMB_HIGHBIT) ||
+ (k1 != 0 && cc2 != 0 && bp[bn + tn] == MPFR_LIMB_HIGHBIT)) &&
+ (rnd2 != MPFR_RNDN || err0 == prec0 + 1))
+ {
+ MPFR_TMP_FREE(marker);
+ return 0;
+ }
break;
default:
/* Round away */
cc = (bp[bn - 1] >> s1) & 1;
cc ^= mpfr_round_raw2 (bp, bn, neg, rnd2, prec);
- /* now round b +/- 2^(MPFR_EXP(b)-err) */
- cc2 = mpn_sub_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
- break;
- }
+ /* cc is the new value of bit s1 in bp[bn-1]+eps after rounding 'rnd2' */
- /* if cc2 is 1, then a carry or borrow propagates to the next limb */
- if (cc2 && cc)
- {
- MPFR_TMP_FREE(marker);
- return 0;
+ goto subtract_eps;
}
cc2 = (tmp[bn - 1] >> s1) & 1;
diff --git a/Build/source/libs/mpfr/mpfr-src/src/round_raw_generic.c b/Build/source/libs/mpfr/mpfr-src/src/round_raw_generic.c
index d4e0e8ed347..2b67fcc989e 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/round_raw_generic.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/round_raw_generic.c
@@ -1,7 +1,7 @@
/* mpfr_round_raw_generic -- Generic rounding function
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/scale2.c b/Build/source/libs/mpfr/mpfr-src/src/scale2.c
index 8711cd4ab78..8439a019252 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/scale2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/scale2.c
@@ -1,7 +1,7 @@
/* mpfr_scale2 -- multiply a double float by 2^exp
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sec.c b/Build/source/libs/mpfr/mpfr-src/src/sec.c
index 5088cfa49a9..300591629a1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sec.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sec.c
@@ -1,7 +1,7 @@
/* mpfr_sec - secant function = 1/cos.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sech.c b/Build/source/libs/mpfr/mpfr-src/src/sech.c
index ff8999605f3..4dd9da78439 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sech.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sech.c
@@ -1,7 +1,7 @@
/* mpfr_sech - Hyperbolic secant function = 1/cosh.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set.c b/Build/source/libs/mpfr/mpfr-src/src/set.c
index be8d9012039..b10d7d8278d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set.c
@@ -1,7 +1,7 @@
/* mpfr_set -- copy of a floating-point number
-Copyright 1999, 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_d.c b/Build/source/libs/mpfr/mpfr-src/src/set_d.c
index e57b399f77c..c076ccf8405 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_d.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_d.c
@@ -1,8 +1,8 @@
/* mpfr_set_d -- convert a machine double precision float to
a multiple precision floating-point number
-Copyright 1999-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_d64.c b/Build/source/libs/mpfr/mpfr-src/src/set_d64.c
index 2ce71d6e663..a9300adfb95 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_d64.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_d64.c
@@ -5,8 +5,8 @@ See http://gcc.gnu.org/ml/gcc/2006-06/msg00691.html,
http://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html,
and TR 24732 <http://www.open-std.org/jtc1/sc22/wg14/www/projects#24732>.
-Copyright 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_dfl_prec.c b/Build/source/libs/mpfr/mpfr-src/src/set_dfl_prec.c
index 158d167ab45..96464c459f9 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_dfl_prec.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_dfl_prec.c
@@ -1,7 +1,7 @@
/* mpfr_set_default_prec, mpfr_get_default_prec -- set/get default precision
-Copyright 1999-2001, 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2001, 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -23,9 +23,16 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
#include "mpfr-impl.h"
/* default is IEEE double precision, i.e. 53 bits */
-mpfr_prec_t MPFR_THREAD_ATTR __gmpfr_default_fp_bit_precision \
+MPFR_THREAD_ATTR mpfr_prec_t __gmpfr_default_fp_bit_precision \
= IEEE_DBL_MANT_DIG;
+#ifdef MPFR_WIN_THREAD_SAFE_DLL
+mpfr_prec_t * __gmpfr_default_fp_bit_precision_f()
+{
+ return &__gmpfr_default_fp_bit_precision;
+}
+#endif
+
void
mpfr_set_default_prec (mpfr_prec_t prec)
{
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_exp.c b/Build/source/libs/mpfr/mpfr-src/src/set_exp.c
index 7e98dfd7aa5..f27fe5b59f0 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_exp.c
@@ -1,7 +1,7 @@
/* mpfr_set_exp - set the exponent of a floating-point number
-Copyright 2002-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_f.c b/Build/source/libs/mpfr/mpfr-src/src/set_f.c
index b6c9f5f12d2..67e6ae35655 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_f.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_f.c
@@ -1,7 +1,7 @@
/* mpfr_set_f -- set a MPFR number from a GNU MPF number
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_flt.c b/Build/source/libs/mpfr/mpfr-src/src/set_flt.c
index 3c26e148b92..b66da2f0d84 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_flt.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_flt.c
@@ -1,7 +1,7 @@
/* mpfr_set_flt -- convert a machine single precision float to mpfr_t
-Copyright 2009-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2009-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_inf.c b/Build/source/libs/mpfr/mpfr-src/src/set_inf.c
index d5345ccf855..0f1f5c4e2e1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_inf.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_inf.c
@@ -1,7 +1,7 @@
/* mpfr_set_inf -- set a number to plus or minus infinity.
-Copyright 2002, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_ld.c b/Build/source/libs/mpfr/mpfr-src/src/set_ld.c
index 628807c44be..8c4fa841429 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_ld.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_ld.c
@@ -1,8 +1,8 @@
/* mpfr_set_ld -- convert a machine long double to
a multiple precision floating-point number
-Copyright 2002-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_nan.c b/Build/source/libs/mpfr/mpfr-src/src/set_nan.c
index a9ae517f35a..08b546fbc9c 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_nan.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_nan.c
@@ -1,7 +1,7 @@
/* mpfr_set_nan -- set a number to NaN.
-Copyright 2002, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_prc_raw.c b/Build/source/libs/mpfr/mpfr-src/src/set_prc_raw.c
index 78cc5c3e3db..8638afa0feb 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_prc_raw.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_prc_raw.c
@@ -1,7 +1,7 @@
/* mpfr_set_prec_raw -- reset the precision of a floating-point number
-Copyright 2000-2001, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2001, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_prec.c b/Build/source/libs/mpfr/mpfr-src/src/set_prec.c
index e9ea33dcc5f..578c0274d6c 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_prec.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_prec.c
@@ -1,7 +1,7 @@
/* mpfr_set_prec -- reset the precision of a floating-point number
-Copyright 1999, 2001-2002, 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001-2002, 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_q.c b/Build/source/libs/mpfr/mpfr-src/src/set_q.c
index aa16a81b44a..cdfd0f083ca 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_q.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_q.c
@@ -1,7 +1,7 @@
/* mpfr_set_q -- set a floating-point number from a multiple-precision rational
-Copyright 2000-2002, 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2002, 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_rnd.c b/Build/source/libs/mpfr/mpfr-src/src/set_rnd.c
index d6faa7b487b..10fc232312d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_rnd.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_rnd.c
@@ -1,8 +1,8 @@
/* mpfr_set_default_rounding_mode -- set the default rounding mode
mpfr_get_default_rounding_mode -- get the default rounding mode
-Copyright 1999, 2001, 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999, 2001, 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -23,7 +23,15 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
#include "mpfr-impl.h"
-mpfr_rnd_t MPFR_THREAD_ATTR __gmpfr_default_rounding_mode = MPFR_RNDN;
+MPFR_THREAD_ATTR mpfr_rnd_t __gmpfr_default_rounding_mode = MPFR_RNDN;
+
+#ifdef MPFR_WIN_THREAD_SAFE_DLL
+mpfr_rnd_t *
+__gmpfr_default_rounding_mode_f()
+{
+ return &__gmpfr_default_rounding_mode;
+}
+#endif
void
mpfr_set_default_rounding_mode (mpfr_rnd_t rnd_mode)
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_si.c b/Build/source/libs/mpfr/mpfr-src/src/set_si.c
index 638862197d3..ce77aced2b2 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_si.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_si.c
@@ -1,7 +1,7 @@
/* mpfr_set_si -- set a MPFR number from a machine signed integer
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_si_2exp.c b/Build/source/libs/mpfr/mpfr-src/src/set_si_2exp.c
index 5b57254fc2a..f5add967644 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_si_2exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_si_2exp.c
@@ -1,8 +1,8 @@
/* mpfr_set_si_2exp -- set a MPFR number from a machine signed integer with
a shift
-Copyright 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_sj.c b/Build/source/libs/mpfr/mpfr-src/src/set_sj.c
index ef24c6b3701..2d1a734e212 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_sj.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_sj.c
@@ -1,7 +1,7 @@
/* mpfr_set_sj -- set a MPFR number from a huge machine signed integer
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_str.c b/Build/source/libs/mpfr/mpfr-src/src/set_str.c
index 9da8821688c..191db5826f1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_str.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_str.c
@@ -1,7 +1,7 @@
/* mpfr_set_str -- set a floating-point number from a string
-Copyright 2000-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_str_raw.c b/Build/source/libs/mpfr/mpfr-src/src/set_str_raw.c
index f7e1167adab..e84c25059fe 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_str_raw.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_str_raw.c
@@ -1,7 +1,7 @@
/* mpfr_set_str_binary -- set a floating-point number from a binary string
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_ui.c b/Build/source/libs/mpfr/mpfr-src/src/set_ui.c
index 05d5346e995..d59f5b9d297 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_ui.c
@@ -1,7 +1,7 @@
/* mpfr_set_ui -- set a MPFR number from a machine unsigned integer
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_ui_2exp.c b/Build/source/libs/mpfr/mpfr-src/src/set_ui_2exp.c
index 8ff538c6dad..de24331f1c9 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_ui_2exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_ui_2exp.c
@@ -1,8 +1,8 @@
/* mpfr_set_ui_2exp -- set a MPFR number from a machine unsigned integer with
a shift
-Copyright 2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_uj.c b/Build/source/libs/mpfr/mpfr-src/src/set_uj.c
index a1f679aea02..1dd15a5b24b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_uj.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_uj.c
@@ -1,7 +1,7 @@
/* mpfr_set_uj -- set a MPFR number from a huge machine unsigned integer
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_z.c b/Build/source/libs/mpfr/mpfr-src/src/set_z.c
index 590f5545d1b..e480bc653af 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_z.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_z.c
@@ -1,7 +1,7 @@
/* mpfr_set_z -- set a floating-point number from a multiple-precision integer
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_z_exp.c b/Build/source/libs/mpfr/mpfr-src/src/set_z_exp.c
index 15fc4d0aa31..5907ba88780 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_z_exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_z_exp.c
@@ -1,8 +1,8 @@
/* mpfr_set_z_2exp -- set a floating-point number from a multiple-precision
integer and an exponent
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_zero.c b/Build/source/libs/mpfr/mpfr-src/src/set_zero.c
index 04a6ebeea17..ba471340f96 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_zero.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_zero.c
@@ -1,7 +1,7 @@
/* mpfr_set_zero -- set a number to plus or minus zero.
-Copyright 2009-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2009-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/setmax.c b/Build/source/libs/mpfr/mpfr-src/src/setmax.c
index 5d79b62addf..cf8a873810b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/setmax.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/setmax.c
@@ -1,7 +1,7 @@
/* mpfr_setmax -- maximum representable floating-point number (raw version)
-Copyright 2002-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/setmin.c b/Build/source/libs/mpfr/mpfr-src/src/setmin.c
index 4b957b162a5..78b5deedfae 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/setmin.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/setmin.c
@@ -1,7 +1,7 @@
/* mpfr_setmin -- minimum representable floating-point number (raw version)
-Copyright 2002-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/setsign.c b/Build/source/libs/mpfr/mpfr-src/src/setsign.c
index fa717ef9de9..06d9f7c3f45 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/setsign.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/setsign.c
@@ -1,7 +1,7 @@
/* mpfr_setsign -- Produce a value with the magnitude of x and sign bit s
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sgn.c b/Build/source/libs/mpfr/mpfr-src/src/sgn.c
index 1e2a7fc5d2f..fe72bd71cb7 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sgn.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sgn.c
@@ -1,7 +1,7 @@
/* mpfr_sgn -- Sign of a floating point number.
-Copyright 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/si_op.c b/Build/source/libs/mpfr/mpfr-src/src/si_op.c
index e1785345196..11d1e4192d5 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/si_op.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/si_op.c
@@ -2,8 +2,8 @@
mpfr_sub_si -- sub a floating-point number with a machine integer
mpfr_si_sub -- sub a machine number with a floating-point number
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 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 @@ mpfr_add_si (mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode)
if (u >= 0)
return mpfr_add_ui (y, x, u, rnd_mode);
else
- return mpfr_sub_ui (y, x, -u, rnd_mode);
+ return mpfr_sub_ui (y, x, - (unsigned long) u, rnd_mode);
}
int
@@ -39,7 +39,7 @@ mpfr_sub_si (mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode)
if (u >= 0)
return mpfr_sub_ui (y, x, u, rnd_mode);
else
- return mpfr_add_ui (y, x, -u, rnd_mode);
+ return mpfr_add_ui (y, x, - (unsigned long) u, rnd_mode);
}
int
@@ -49,9 +49,9 @@ mpfr_si_sub (mpfr_ptr y, long int u, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
return mpfr_ui_sub (y, u, x, rnd_mode);
else
{
- int res = -mpfr_add_ui (y, x, -u, MPFR_INVERT_RND (rnd_mode));
- MPFR_CHANGE_SIGN (y);
- return res;
+ int res = - mpfr_add_ui (y, x, - (unsigned long) u,
+ MPFR_INVERT_RND (rnd_mode));
+ MPFR_CHANGE_SIGN (y);
+ return res;
}
}
-
diff --git a/Build/source/libs/mpfr/mpfr-src/src/signbit.c b/Build/source/libs/mpfr/mpfr-src/src/signbit.c
index 54632d368a4..a97f529543d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/signbit.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/signbit.c
@@ -1,7 +1,7 @@
/* mpfr_signbit -- Signbit of a MPFR number
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sin.c b/Build/source/libs/mpfr/mpfr-src/src/sin.c
index 44be51cb9a7..2a4c65e0f74 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sin.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sin.c
@@ -1,7 +1,7 @@
/* mpfr_sin -- sine of a floating-point number
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sin_cos.c b/Build/source/libs/mpfr/mpfr-src/src/sin_cos.c
index a064bc6b826..e665d063723 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sin_cos.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sin_cos.c
@@ -1,7 +1,7 @@
/* mpfr_sin_cos -- sine and cosine of a floating-point number
-Copyright 2002-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2002-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sinh.c b/Build/source/libs/mpfr/mpfr-src/src/sinh.c
index 1dc010ee6a3..3b06e217302 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sinh.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sinh.c
@@ -1,7 +1,7 @@
/* mpfr_sinh -- hyperbolic sine
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sinh_cosh.c b/Build/source/libs/mpfr/mpfr-src/src/sinh_cosh.c
index 35f82ad6133..b41281408a4 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sinh_cosh.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sinh_cosh.c
@@ -1,7 +1,7 @@
/* mpfr_sinh_cosh -- hyperbolic sine and cosine
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sparc64/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/sparc64/mparam.h
index 8c5cfdc9afd..26a7b91240f 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sparc64/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/sparc64/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sqr.c b/Build/source/libs/mpfr/mpfr-src/src/sqr.c
index ee55707955a..4096be731c5 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sqr.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sqr.c
@@ -1,7 +1,7 @@
/* mpfr_sqr -- Floating square
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sqrt.c b/Build/source/libs/mpfr/mpfr-src/src/sqrt.c
index 1f5687be352..e1f75d33afe 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sqrt.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sqrt.c
@@ -1,7 +1,7 @@
/* mpfr_sqrt -- square root of a floating-point number
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -211,10 +211,11 @@ mpfr_sqrt (mpfr_ptr r, mpfr_srcptr u, mpfr_rnd_t rnd_mode)
rsize --;
sh = 0;
}
+ /* now rsize = MPFR_LIMB_SIZE(r) */
if (mpn_add_1 (rp0, rp, rsize, MPFR_LIMB_ONE << sh))
{
expr ++;
- rp[rsize - 1] = MPFR_LIMB_HIGHBIT;
+ rp0[rsize - 1] = MPFR_LIMB_HIGHBIT;
}
goto end;
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sqrt_ui.c b/Build/source/libs/mpfr/mpfr-src/src/sqrt_ui.c
index 4cb6e9420ea..e824b088a39 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sqrt_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sqrt_ui.c
@@ -1,7 +1,7 @@
/* mpfr_sqrt_ui -- square root of a machine integer
-Copyright 2000-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/stack_interface.c b/Build/source/libs/mpfr/mpfr-src/src/stack_interface.c
index a8d4a93de29..fdf0edf2ab1 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/stack_interface.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/stack_interface.c
@@ -1,7 +1,7 @@
/* mpfr_stack -- initialize a floating-point number with given allocation area
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/strtofr.c b/Build/source/libs/mpfr/mpfr-src/src/strtofr.c
index 17d6b63745b..67f5caa62a0 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/strtofr.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/strtofr.c
@@ -1,7 +1,7 @@
/* mpfr_strtofr -- set a floating-point number from a string
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sub.c b/Build/source/libs/mpfr/mpfr-src/src/sub.c
index 9b44123c601..cc4ec1ca714 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sub.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sub.c
@@ -1,7 +1,7 @@
/* mpfr_sub -- subtract two floating-point numbers
-Copyright 2001-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sub1.c b/Build/source/libs/mpfr/mpfr-src/src/sub1.c
index 2586fd6ff3c..b00c4cd7cfc 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sub1.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sub1.c
@@ -1,7 +1,7 @@
/* mpfr_sub1 -- internal function to perform a "real" subtraction
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sub1sp.c b/Build/source/libs/mpfr/mpfr-src/src/sub1sp.c
index ddac834d17e..37b4d598d6e 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sub1sp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sub1sp.c
@@ -1,8 +1,8 @@
/* mpfr_sub1sp -- internal function to perform a "real" substraction
All the op must have the same precision
-Copyright 2003-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sub_d.c b/Build/source/libs/mpfr/mpfr-src/src/sub_d.c
index 1050f6b8016..82c10ad8a1b 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sub_d.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sub_d.c
@@ -1,8 +1,8 @@
/* mpfr_sub_d -- subtract a machine double precision float from
a multiple precision floating-point number
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sub_ui.c b/Build/source/libs/mpfr/mpfr-src/src/sub_ui.c
index 798fb1e6fc6..b366970eb34 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sub_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sub_ui.c
@@ -1,7 +1,7 @@
/* mpfr_sub_ui -- subtract a floating-point number and a machine integer
-Copyright 2000-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/subnormal.c b/Build/source/libs/mpfr/mpfr-src/src/subnormal.c
index 0f7150c06e7..753c900ac80 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/subnormal.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/subnormal.c
@@ -1,8 +1,8 @@
/* mpfr_subnormalize -- Subnormalize a floating point number
emulating sub-normal numbers.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/sum.c b/Build/source/libs/mpfr/mpfr-src/src/sum.c
index 9cbcbfac7f0..4cc0cc8ac63 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/sum.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/sum.c
@@ -1,7 +1,7 @@
/* Sum -- efficiently sum a list of floating-point numbers
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -45,9 +45,13 @@ static void count_sort (mpfr_srcptr *const, unsigned long, mpfr_srcptr *,
mpfr_exp_t, mpfr_uexp_t);
/* Either sort the tab in perm and returns 0
- Or returns 1 for +INF, -1 for -INF and 2 for NAN */
+ Or returns 1 for +INF, -1 for -INF and 2 for NAN.
+ Also set *maxprec to the maximal precision of tab[0..n-1] and of the
+ initial value of *maxprec.
+*/
int
-mpfr_sum_sort (mpfr_srcptr *const tab, unsigned long n, mpfr_srcptr *perm)
+mpfr_sum_sort (mpfr_srcptr *const tab, unsigned long n, mpfr_srcptr *perm,
+ mpfr_prec_t *maxprec)
{
mpfr_exp_t min, max;
mpfr_uexp_t exp_num;
@@ -79,6 +83,8 @@ mpfr_sum_sort (mpfr_srcptr *const tab, unsigned long n, mpfr_srcptr *perm)
if (MPFR_GET_EXP (tab[i]) > max)
max = MPFR_GET_EXP(tab[i]);
}
+ if (MPFR_PREC (tab[i]) > *maxprec)
+ *maxprec = MPFR_PREC (tab[i]);
}
if (MPFR_UNLIKELY (sign_inf != 0))
return sign_inf;
@@ -213,7 +219,8 @@ heap_sort (mpfr_srcptr *const tab, unsigned long n, mpfr_srcptr *perm)
/* Sum a list of float with order given by permutation perm,
- * intermediate size set to F.
+ * intermediate size set to F. Return non-zero if at least one of
+ * the operations is inexact (thus 0 implies that the sum is exact).
* Internal use function.
*/
static int
@@ -230,16 +237,19 @@ sum_once (mpfr_ptr ret, mpfr_srcptr *const tab, unsigned long n, mpfr_prec_t F)
for (i = 1; i < n - 1; i++)
{
MPFR_ASSERTD (!MPFR_IS_NAN (sum) && !MPFR_IS_INF (sum));
- error_trap |= mpfr_add (sum, sum, tab[i], MPFR_RNDN);
+ if (mpfr_add (sum, sum, tab[i], MPFR_RNDN))
+ error_trap = 1;
}
- error_trap |= mpfr_add (ret, sum, tab[n - 1], MPFR_RNDN);
+ if (mpfr_add (ret, sum, tab[n - 1], MPFR_RNDN))
+ error_trap = 1;
mpfr_clear (sum);
return error_trap;
}
/* Sum a list of floating-point numbers.
+ * If the return value is 0, then the sum is exact.
+ * Otherwise the return value gives no information.
*/
-
int
mpfr_sum (mpfr_ptr ret, mpfr_ptr *const tab_p, unsigned long n, mpfr_rnd_t rnd)
{
@@ -266,7 +276,8 @@ mpfr_sum (mpfr_ptr ret, mpfr_ptr *const tab_p, unsigned long n, mpfr_rnd_t rnd)
/* Sort and treat special cases */
MPFR_TMP_MARK (marker);
perm = (mpfr_srcptr *) MPFR_TMP_ALLOC (n * sizeof *perm);
- error_trap = mpfr_sum_sort (tab, n, perm);
+ prec = MPFR_PREC (ret);
+ error_trap = mpfr_sum_sort (tab, n, perm, &prec);
/* Check if there was a NAN or a INF */
if (MPFR_UNLIKELY (error_trap != 0))
{
@@ -281,8 +292,7 @@ mpfr_sum (mpfr_ptr ret, mpfr_ptr *const tab_p, unsigned long n, mpfr_rnd_t rnd)
MPFR_RET (0);
}
- /* Initial precision */
- prec = MAX (MPFR_PREC (tab[0]), MPFR_PREC (ret));
+ /* Initial precision is max(prec(ret),prec(tab[0]),...,prec(tab[n-1])) */
k = MPFR_INT_CEIL_LOG2 (n) + 1;
prec += k + 2;
mpfr_init2 (cur_sum, prec);
@@ -295,8 +305,7 @@ mpfr_sum (mpfr_ptr ret, mpfr_ptr *const tab_p, unsigned long n, mpfr_rnd_t rnd)
error_trap = sum_once (cur_sum, perm, n, prec + k);
if (MPFR_LIKELY (error_trap == 0 ||
(!MPFR_IS_ZERO (cur_sum) &&
- mpfr_can_round (cur_sum,
- MPFR_GET_EXP (cur_sum) - prec + 2,
+ mpfr_can_round (cur_sum, prec - 2,
MPFR_RNDN, rnd, MPFR_PREC (ret)))))
break;
MPFR_ZIV_NEXT (loop, prec);
@@ -305,11 +314,13 @@ mpfr_sum (mpfr_ptr ret, mpfr_ptr *const tab_p, unsigned long n, mpfr_rnd_t rnd)
MPFR_ZIV_FREE (loop);
MPFR_TMP_FREE (marker);
- error_trap |= mpfr_set (ret, cur_sum, rnd);
+ if (mpfr_set (ret, cur_sum, rnd))
+ error_trap = 1;
mpfr_clear (cur_sum);
MPFR_SAVE_EXPO_FREE (expo);
- error_trap |= mpfr_check_range (ret, 0, rnd);
+ if (mpfr_check_range (ret, 0, rnd))
+ error_trap = 1;
return error_trap; /* It doesn't return the ternary value */
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/swap.c b/Build/source/libs/mpfr/mpfr-src/src/swap.c
index 99f2a507af6..a7282089003 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/swap.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/swap.c
@@ -1,7 +1,7 @@
/* mpfr_swap (U, V) -- Swap U and V.
-Copyright 2000-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/tan.c b/Build/source/libs/mpfr/mpfr-src/src/tan.c
index d4274cb4466..b10edc620c7 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/tan.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/tan.c
@@ -1,7 +1,7 @@
/* mpfr_tan -- tangent of a floating-point number
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/tanh.c b/Build/source/libs/mpfr/mpfr-src/src/tanh.c
index 077dd2e7498..3ce860ac6b2 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/tanh.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/tanh.c
@@ -1,7 +1,7 @@
/* mpfr_tanh -- hyperbolic tangent
-Copyright 2001-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/uceil_exp2.c b/Build/source/libs/mpfr/mpfr-src/src/uceil_exp2.c
index 64cb017cbcc..29c685ad4c8 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/uceil_exp2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/uceil_exp2.c
@@ -1,7 +1,7 @@
/* __gmpfr_ceil_exp2 - returns y >= 2^d
-Copyright 1999-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/uceil_log2.c b/Build/source/libs/mpfr/mpfr-src/src/uceil_log2.c
index 417df9dde04..b34a21c07bc 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/uceil_log2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/uceil_log2.c
@@ -1,7 +1,7 @@
/* __gmpfr_ceil_log2 - returns ceil(log(d)/log(2))
-Copyright 1999-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/ufloor_log2.c b/Build/source/libs/mpfr/mpfr-src/src/ufloor_log2.c
index 0ad6d8522d2..8e7627e44fa 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/ufloor_log2.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/ufloor_log2.c
@@ -1,7 +1,7 @@
/* __gmpfr_floor_log2 - returns floor(log(d)/log(2))
-Copyright 1999-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/ui_div.c b/Build/source/libs/mpfr/mpfr-src/src/ui_div.c
index ac1efb3b984..dd190300d44 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/ui_div.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/ui_div.c
@@ -1,8 +1,8 @@
/* mpfr_ui_div -- divide a machine integer by a floating-point number
mpfr_si_div -- divide a machine number by a floating-point number
-Copyright 2000-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -106,7 +106,8 @@ mpfr_si_div (mpfr_ptr y, long int u, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
res = mpfr_ui_div (y, u, x, rnd_mode);
else
{
- res = -mpfr_ui_div (y, -u, x, MPFR_INVERT_RND(rnd_mode));
+ res = - mpfr_ui_div (y, - (unsigned long) u, x,
+ MPFR_INVERT_RND(rnd_mode));
MPFR_CHANGE_SIGN (y);
}
return res;
diff --git a/Build/source/libs/mpfr/mpfr-src/src/ui_pow.c b/Build/source/libs/mpfr/mpfr-src/src/ui_pow.c
index b8b982184b0..ed71309ca98 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/ui_pow.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/ui_pow.c
@@ -1,7 +1,7 @@
/* mpfr_ui_pow -- power of n function n^x
-Copyright 2001-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2001-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/ui_pow_ui.c b/Build/source/libs/mpfr/mpfr-src/src/ui_pow_ui.c
index eabb1fba8b8..98dc76e2165 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/ui_pow_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/ui_pow_ui.c
@@ -1,7 +1,7 @@
/* mpfr_ui_pow_ui -- compute the power beetween two machine integer
-Copyright 1999-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 1999-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/ui_sub.c b/Build/source/libs/mpfr/mpfr-src/src/ui_sub.c
index bb8166ef234..f4cbaac5120 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/ui_sub.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/ui_sub.c
@@ -1,7 +1,7 @@
/* mpfr_ui_sub -- subtract a floating-point number from an integer
-Copyright 2000-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/urandom.c b/Build/source/libs/mpfr/mpfr-src/src/urandom.c
index 0610eb1dbd4..1232ff18aa3 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/urandom.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/urandom.c
@@ -2,8 +2,8 @@
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-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/urandomb.c b/Build/source/libs/mpfr/mpfr-src/src/urandomb.c
index 3d1c12bf93c..fd728967aa6 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/urandomb.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/urandomb.c
@@ -3,8 +3,8 @@
using STATE as the random state previously initialized by a call to
gmp_randinit_lc_2exp_size().
-Copyright 2000-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2000-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/vasprintf.c b/Build/source/libs/mpfr/mpfr-src/src/vasprintf.c
index 2d209dc1a6d..7db85a962c5 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/vasprintf.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/vasprintf.c
@@ -1,8 +1,8 @@
/* mpfr_vasprintf -- main function for the printf functions family
plus helper macros & functions.
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/version.c b/Build/source/libs/mpfr/mpfr-src/src/version.c
index 96b2f614e67..130e0f86c1d 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/version.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/version.c
@@ -1,7 +1,7 @@
/* mpfr_get_version -- MPFR version
-Copyright 2004-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2004-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -25,5 +25,5 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
const char *
mpfr_get_version (void)
{
- return "3.1.3";
+ return "3.1.4";
}
diff --git a/Build/source/libs/mpfr/mpfr-src/src/volatile.c b/Build/source/libs/mpfr/mpfr-src/src/volatile.c
index bb4e7da42e0..938655ebab5 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/volatile.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/volatile.c
@@ -4,8 +4,8 @@
CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN
FUTURE MPFR RELEASES.
-Copyright 2003-2004, 2006-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2004, 2006-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/x86/core2/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/x86/core2/mparam.h
index 3a3abe2e99e..04edd526cea 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/x86/core2/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/x86/core2/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/x86/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/x86/mparam.h
index 6f5f4917503..978760a4c15 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/x86/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/x86/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/x86_64/core2/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/x86_64/core2/mparam.h
index 5d40b40d96a..59025ad0973 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/x86_64/core2/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/x86_64/core2/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/x86_64/pentium4/mparam.h b/Build/source/libs/mpfr/mpfr-src/src/x86_64/pentium4/mparam.h
index 19db0a4d670..88a06e5425a 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/x86_64/pentium4/mparam.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/x86_64/pentium4/mparam.h
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2015 Free Software Foundation, Inc.
+Copyright 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/yn.c b/Build/source/libs/mpfr/mpfr-src/src/yn.c
index c2c6bc97ea4..a17a7f35652 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/yn.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/yn.c
@@ -1,8 +1,8 @@
/* mpfr_y0, mpfr_y1, mpfr_yn -- Bessel functions of 2nd kind, integer order.
http://www.opengroup.org/onlinepubs/009695399/functions/y0.html
-Copyright 2007-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2007-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/mpfr-src/src/zeta.c b/Build/source/libs/mpfr/mpfr-src/src/zeta.c
index ef5c9395733..df000b15fc4 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/zeta.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/zeta.c
@@ -1,7 +1,7 @@
/* mpfr_zeta -- compute the Riemann Zeta function
-Copyright 2003-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2003-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
@@ -377,8 +377,8 @@ mpfr_zeta (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode)
}
}
- /* Check for case s= 1 before changing the exponent range */
- if (mpfr_cmp (s, __gmpfr_one) ==0)
+ /* Check for case s=1 before changing the exponent range */
+ if (mpfr_cmp (s, __gmpfr_one) == 0)
{
MPFR_SET_INF (z);
MPFR_SET_POS (z);
@@ -420,7 +420,7 @@ mpfr_zeta (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode)
MPFR_ZIV_INIT (loop, prec1);
for (;;)
{
- mpfr_sub (s1, __gmpfr_one, s, MPFR_RNDN);/* s1 = 1-s */
+ mpfr_sub (s1, __gmpfr_one, s, MPFR_RNDN); /* s1 = 1-s */
mpfr_zeta_pos (z_pre, s1, MPFR_RNDN); /* zeta(1-s) */
mpfr_gamma (y, s1, MPFR_RNDN); /* gamma(1-s) */
if (MPFR_IS_INF (y)) /* Zeta(s) < 0 for -4k-2 < s < -4k,
@@ -432,17 +432,32 @@ mpfr_zeta (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode)
break;
}
mpfr_mul (z_pre, z_pre, y, MPFR_RNDN); /* gamma(1-s)*zeta(1-s) */
- mpfr_const_pi (p, MPFR_RNDD);
- mpfr_mul (y, s, p, MPFR_RNDN);
- mpfr_div_2ui (y, y, 1, MPFR_RNDN); /* s*Pi/2 */
- mpfr_sin (y, y, MPFR_RNDN); /* sin(Pi*s/2) */
- mpfr_mul (z_pre, z_pre, y, MPFR_RNDN);
+
+ mpfr_const_pi (p, MPFR_RNDD); /* p is Pi */
+
+ /* multiply z_pre by 2^s*Pi^(s-1) where p=Pi, s1=1-s */
mpfr_mul_2ui (y, p, 1, MPFR_RNDN); /* 2*Pi */
mpfr_neg (s1, s1, MPFR_RNDN); /* s-1 */
mpfr_pow (y, y, s1, MPFR_RNDN); /* (2*Pi)^(s-1) */
mpfr_mul (z_pre, z_pre, y, MPFR_RNDN);
mpfr_mul_2ui (z_pre, z_pre, 1, MPFR_RNDN);
+ /* multiply z_pre by sin(Pi*s/2) */
+ mpfr_mul (y, s, p, MPFR_RNDN);
+ mpfr_div_2ui (p, y, 1, MPFR_RNDN); /* p = s*Pi/2 */
+ mpfr_sin (y, p, MPFR_RNDN); /* y = sin(Pi*s/2) */
+ if (MPFR_GET_EXP(y) < 0) /* take account of cancellation in sin(p) */
+ {
+ mpfr_t t;
+ mpfr_init2 (t, prec1 - MPFR_GET_EXP(y));
+ mpfr_const_pi (t, MPFR_RNDD);
+ mpfr_mul (t, s, t, MPFR_RNDN);
+ mpfr_div_2ui (t, t, 1, MPFR_RNDN);
+ mpfr_sin (y, t, MPFR_RNDN);
+ mpfr_clear (t);
+ }
+ mpfr_mul (z_pre, z_pre, y, MPFR_RNDN);
+
if (MPFR_LIKELY (MPFR_CAN_ROUND (z_pre, prec1 - add, precz,
rnd_mode)))
break;
diff --git a/Build/source/libs/mpfr/mpfr-src/src/zeta_ui.c b/Build/source/libs/mpfr/mpfr-src/src/zeta_ui.c
index 02ba337fb87..dc147e712a4 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/zeta_ui.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/zeta_ui.c
@@ -1,7 +1,7 @@
/* mpfr_zeta_ui -- compute the Riemann Zeta function for integer argument.
-Copyright 2005-2015 Free Software Foundation, Inc.
-Contributed by the AriC and Caramel projects, INRIA.
+Copyright 2005-2016 Free Software Foundation, Inc.
+Contributed by the AriC and Caramba projects, INRIA.
This file is part of the GNU MPFR Library.
diff --git a/Build/source/libs/mpfr/version.ac b/Build/source/libs/mpfr/version.ac
index 044c07bde50..c42a234b08b 100644
--- a/Build/source/libs/mpfr/version.ac
+++ b/Build/source/libs/mpfr/version.ac
@@ -8,4 +8,4 @@ dnl
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current mpfr version
-m4_define([mpfr_version], [3.1.3])
+m4_define([mpfr_version], [3.1.4])