aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-07-12 16:50:41 +0000
committerJakub Jelinek <jakub@redhat.com>2018-07-12 16:50:41 +0000
commit1ed159550621e4b1cf35ab868e0a7d51e2837724 (patch)
tree9bad8e165e1df1b26197b4700f9f51566152a405
parentc1e7aa1d88a3110f71b740fc8ea11f3274cae433 (diff)
parentf7d3a6a6300a4c330afca4d8772ac80ab09ac21c (diff)
svn merge -r258208:262569 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branchredhat/gcc-7-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-7-branch@262599 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog8
-rw-r--r--config/ChangeLog8
-rw-r--r--config/acx.m42
-rwxr-xr-xconfigure2
-rw-r--r--fixincludes/ChangeLog8
-rwxr-xr-xfixincludes/configure2
-rw-r--r--gcc/ChangeLog1050
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/ada/ChangeLog83
-rw-r--r--gcc/ada/gcc-interface/Makefile.in4
-rw-r--r--gcc/ada/gcc-interface/ada-tree.h25
-rw-r--r--gcc/ada/gcc-interface/decl.c150
-rw-r--r--gcc/ada/gcc-interface/gigi.h15
-rw-r--r--gcc/ada/gcc-interface/misc.c3
-rw-r--r--gcc/ada/gcc-interface/trans.c20
-rw-r--r--gcc/ada/gcc-interface/utils.c15
-rw-r--r--gcc/alias.c3
-rw-r--r--gcc/brig/ChangeLog5
-rw-r--r--gcc/brig/Make-lang.in3
-rw-r--r--gcc/builtins.c2
-rw-r--r--gcc/c-family/ChangeLog41
-rw-r--r--gcc/c-family/c-common.c30
-rw-r--r--gcc/c-family/c-common.h4
-rw-r--r--gcc/c-family/c-gimplify.c4
-rw-r--r--gcc/c-family/c-omp.c8
-rw-r--r--gcc/c/ChangeLog32
-rw-r--r--gcc/c/c-fold.c2
-rw-r--r--gcc/c/c-typeck.c39
-rw-r--r--gcc/calls.c133
-rw-r--r--gcc/cfgexpand.c8
-rw-r--r--gcc/cgraph.h3
-rw-r--r--gcc/collect2.c43
-rw-r--r--gcc/combine.c18
-rw-r--r--gcc/config.gcc22
-rw-r--r--gcc/config/aarch64/aarch64-simd.md97
-rw-r--r--gcc/config/aarch64/aarch64.c11
-rw-r--r--gcc/config/aarch64/aarch64.md3
-rw-r--r--gcc/config/alpha/alpha.c4
-rw-r--r--gcc/config/alpha/alpha.md10
-rw-r--r--gcc/config/arm/arm-builtins.c6
-rw-r--r--gcc/config/arm/arm.c16
-rw-r--r--gcc/config/arm/arm.h3
-rw-r--r--gcc/config/arm/arm.md9
-rw-r--r--gcc/config/arm/arm_cmse.h7
-rw-r--r--gcc/config/arm/neon.md14
-rw-r--r--gcc/config/avr/avr.h3
-rw-r--r--gcc/config/avr/avr.md2
-rw-r--r--gcc/config/i386/avx512vlintrin.h40
-rw-r--r--gcc/config/i386/i386.c178
-rw-r--r--gcc/config/i386/i386.md72
-rw-r--r--gcc/config/i386/sse.md28
-rw-r--r--gcc/config/nvptx/nvptx.c5
-rw-r--r--gcc/config/pa/pa.c20
-rw-r--r--gcc/config/pa/pa.h18
-rw-r--r--gcc/config/pa/pa.md82
-rw-r--r--gcc/config/pa/pa64-hpux.h14
-rw-r--r--gcc/config/riscv/t-rtems25
-rw-r--r--gcc/config/rs6000/altivec.h2
-rw-r--r--gcc/config/rs6000/altivec.md132
-rw-r--r--gcc/config/rs6000/rs6000-builtin.def21
-rw-r--r--gcc/config/rs6000/rs6000-c.c32
-rw-r--r--gcc/config/rs6000/rs6000.c97
-rw-r--r--gcc/config/rs6000/rs6000.h10
-rw-r--r--gcc/config/rs6000/rs6000.md32
-rw-r--r--gcc/config/rs6000/sysv4.opt4
-rw-r--r--gcc/config/rs6000/vector.md14
-rw-r--r--gcc/config/rs6000/vsx.md74
-rw-r--r--gcc/config/rtems.h4
-rw-r--r--gcc/config/s390/s390-builtin-types.def1
-rw-r--r--gcc/config/s390/s390-builtins.def2
-rw-r--r--gcc/config/s390/s390.c2
-rw-r--r--gcc/config/s390/s390.h2
-rw-r--r--gcc/config/sparc/sparc.c36
-rw-r--r--gcc/config/sparc/sparc.md12
-rw-r--r--gcc/config/xtensa/xtensa.md46
-rwxr-xr-xgcc/configure8
-rw-r--r--gcc/configure.ac4
-rw-r--r--gcc/cp/ChangeLog330
-rw-r--r--gcc/cp/call.c22
-rw-r--r--gcc/cp/class.c17
-rw-r--r--gcc/cp/constexpr.c39
-rw-r--r--gcc/cp/cp-gimplify.c51
-rw-r--r--gcc/cp/cp-tree.h3
-rw-r--r--gcc/cp/cvt.c2
-rw-r--r--gcc/cp/decl.c78
-rw-r--r--gcc/cp/decl2.c16
-rw-r--r--gcc/cp/error.c1
-rw-r--r--gcc/cp/init.c1
-rw-r--r--gcc/cp/name-lookup.c3
-rw-r--r--gcc/cp/parser.c62
-rw-r--r--gcc/cp/pt.c75
-rw-r--r--gcc/cp/search.c2
-rw-r--r--gcc/cp/semantics.c48
-rw-r--r--gcc/cp/tree.c22
-rw-r--r--gcc/cp/typeck.c68
-rw-r--r--gcc/cp/typeck2.c9
-rw-r--r--gcc/dce.c27
-rw-r--r--gcc/ddg.c9
-rw-r--r--gcc/doc/extend.texi23
-rw-r--r--gcc/doc/gcov.texi4
-rwxr-xr-xgcc/doc/install.texi2html5
-rw-r--r--gcc/doc/invoke.texi22
-rw-r--r--gcc/dse.c3
-rw-r--r--gcc/dwarf2asm.c18
-rw-r--r--gcc/dwarf2out.c2
-rw-r--r--gcc/emit-rtl.c2
-rw-r--r--gcc/expr.c10
-rw-r--r--gcc/final.c4
-rw-r--r--gcc/fold-const.c16
-rw-r--r--gcc/fortran/ChangeLog373
-rw-r--r--gcc/fortran/arith.c10
-rw-r--r--gcc/fortran/array.c14
-rw-r--r--gcc/fortran/check.c7
-rw-r--r--gcc/fortran/data.c34
-rw-r--r--gcc/fortran/decl.c79
-rw-r--r--gcc/fortran/expr.c44
-rw-r--r--gcc/fortran/frontend-passes.c13
-rw-r--r--gcc/fortran/gfortran.h4
-rw-r--r--gcc/fortran/interface.c2
-rw-r--r--gcc/fortran/match.c27
-rw-r--r--gcc/fortran/openmp.c8
-rw-r--r--gcc/fortran/primary.c18
-rw-r--r--gcc/fortran/resolve.c86
-rw-r--r--gcc/fortran/simplify.c80
-rw-r--r--gcc/fortran/symbol.c14
-rw-r--r--gcc/fortran/trans-array.c89
-rw-r--r--gcc/fortran/trans-decl.c61
-rw-r--r--gcc/fortran/trans-expr.c84
-rw-r--r--gcc/fortran/trans-intrinsic.c142
-rw-r--r--gcc/fortran/trans-stmt.c3
-rw-r--r--gcc/fortran/trans-types.c50
-rw-r--r--gcc/fortran/trans.h2
-rw-r--r--gcc/function.c5
-rw-r--r--gcc/genmatch.c6
-rw-r--r--gcc/gimple-ssa-backprop.c21
-rw-r--r--gcc/gimple-ssa-strength-reduction.c81
-rw-r--r--gcc/gimplify.c21
-rw-r--r--gcc/ipa-cp.c22
-rw-r--r--gcc/ipa-devirt.c11
-rw-r--r--gcc/ipa-icf.c113
-rw-r--r--gcc/ipa-icf.h12
-rw-r--r--gcc/ipa-utils.c2
-rw-r--r--gcc/loop-unroll.c2
-rw-r--r--gcc/lower-subreg.c11
-rw-r--r--gcc/lra-constraints.c16
-rw-r--r--gcc/lra-eliminations.c4
-rw-r--r--gcc/lra-int.h11
-rw-r--r--gcc/lra-lives.c4
-rw-r--r--gcc/lra-spills.c2
-rw-r--r--gcc/lra.c4
-rw-r--r--gcc/lto-streamer-out.c54
-rw-r--r--gcc/lto/ChangeLog99
-rw-r--r--gcc/lto/lto-lang.c2
-rw-r--r--gcc/lto/lto-partition.c3
-rw-r--r--gcc/lto/lto-symtab.c67
-rw-r--r--gcc/lto/lto.c67
-rw-r--r--gcc/match.pd36
-rw-r--r--gcc/omp-expand.c8
-rw-r--r--gcc/optabs.c3
-rw-r--r--gcc/opts.c20
-rw-r--r--gcc/params.def4
-rw-r--r--gcc/postreload.c12
-rw-r--r--gcc/shrink-wrap.c9
-rw-r--r--gcc/symtab.c56
-rw-r--r--gcc/testsuite/ChangeLog1074
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr85696.c20
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr86025.c20
-rw-r--r--gcc/testsuite/c-c++-common/pr43690.c4
-rw-r--r--gcc/testsuite/c-c++-common/pr84873.c8
-rw-r--r--gcc/testsuite/c-c++-common/pr84999.c12
-rw-r--r--gcc/testsuite/c-c++-common/torture/pr85022.c9
-rw-r--r--gcc/testsuite/c-c++-common/tsan/race_on_mutex.c9
-rw-r--r--gcc/testsuite/g++.dg/asan/pr78651.C26
-rw-r--r--gcc/testsuite/g++.dg/asan/pr85081.C20
-rw-r--r--gcc/testsuite/g++.dg/concepts/auto4.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto-60626.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto51.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-84463.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr-1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr-2.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype67.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/extern_template-4.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/fntmpdefarg7.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/fntmpdefarg8.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-64.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-defarg2.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-dependent1.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept33.C28
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi14.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr85147.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for13.C44
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for35.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae60.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-nested2.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-nested3.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic16.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic17.C125
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-mangle-1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr10.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr11.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr9.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60393.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60626.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr84662.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr85076.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction50.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction51.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction54.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/constexpr-84684.C163
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/constexpr-if13.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/decomp10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/decomp37.C62
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/decomp38.C48
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/decomp4.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/decomp41.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/decomp42.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/desig7.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/desig8.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/noexcept-type19.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/noexcept-type19.h4
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/pr85464.C5
-rw-r--r--gcc/testsuite/g++.dg/ext/asm14.C10
-rw-r--r--gcc/testsuite/g++.dg/ext/asm15.C10
-rw-r--r--gcc/testsuite/g++.dg/ext/asm16.C10
-rw-r--r--gcc/testsuite/g++.dg/ext/atomic-4.C9
-rw-r--r--gcc/testsuite/g++.dg/ext/attr-noinline-4.C10
-rw-r--r--gcc/testsuite/g++.dg/ext/builtin12.C10
-rw-r--r--gcc/testsuite/g++.dg/ext/builtin13.C9
-rw-r--r--gcc/testsuite/g++.dg/ext/offsetof2.C6
-rw-r--r--gcc/testsuite/g++.dg/ext/offsetof3.C5
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/lambda1.C14
-rw-r--r--gcc/testsuite/g++.dg/ext/vla18.C19
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr84791.C15
-rw-r--r--gcc/testsuite/g++.dg/inherit/covariant22.C19
-rw-r--r--gcc/testsuite/g++.dg/init/new44.C238
-rw-r--r--gcc/testsuite/g++.dg/init/struct2.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr84658.C30
-rw-r--r--gcc/testsuite/g++.dg/opt/pr79085.C24
-rw-r--r--gcc/testsuite/g++.dg/opt/pr85196.C89
-rw-r--r--gcc/testsuite/g++.dg/parse/array-size2.C2
-rw-r--r--gcc/testsuite/g++.dg/pr85026.C61
-rw-r--r--gcc/testsuite/g++.dg/template/dependent-base3.C26
-rw-r--r--gcc/testsuite/g++.dg/torture/pr84961-1.C24
-rw-r--r--gcc/testsuite/g++.dg/torture/pr84961-2.C24
-rw-r--r--gcc/testsuite/g++.dg/torture/pr85496.C18
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/volatile2.C20
-rw-r--r--gcc/testsuite/g++.dg/warn/Wformat-2.C17
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnonnull4.C21
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-function4.C21
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-var-33.C37
-rw-r--r--gcc/testsuite/g++.dg/warn/deprecated-13.C44
-rw-r--r--gcc/testsuite/g++.dg/warn/deprecated-6.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/deprecated.C4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr84860.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr85945.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr84524.c41
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr84748.c34
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr85095.c52
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr85529-1.c28
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr85529-2.c25
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr86231.c30
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-1.c19
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-10.c27
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-11.c27
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-12.c27
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-13.c27
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-14.c30
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-15.c30
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-16.c32
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-2.c20
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-3.c19
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-4.c19
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-5.c25
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-6.c25
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-7.c25
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-8.c27
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than-9.c27
-rw-r--r--gcc/testsuite/gcc.dg/Walloc-size-larger-than.c13
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr85252.c11
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr81440.h4
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr81440_0.c9
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr81440_1.c6
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr83954.h3
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr83954_0.c8
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr83954_1.c7
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr85248_0.c45
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr85248_1.c9
-rw-r--r--gcc/testsuite/gcc.dg/pr84607.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr84739.c26
-rw-r--r--gcc/testsuite/gcc.dg/pr84772.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr84834.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr84841.c9
-rw-r--r--gcc/testsuite/gcc.dg/pr84853.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr84875.c28
-rw-r--r--gcc/testsuite/gcc.dg/pr84899.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr84941.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr84953.c11
-rw-r--r--gcc/testsuite/gcc.dg/pr84956.c27
-rw-r--r--gcc/testsuite/gcc.dg/pr85167.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr85257.c20
-rw-r--r--gcc/testsuite/gcc.dg/pr85300.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr85430.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr85529.c27
-rw-r--r--gcc/testsuite/gcc.dg/pr86314.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57656.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr85168.c30
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr85244-1.c19
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr85244-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr85284.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr85567.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr85588.c4
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr85989.c31
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp119.c20
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr84485.c34
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr85597.c26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr63304_1.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr81647.c45
-rw-r--r--gcc/testsuite/gcc.target/arm/cmse/cmse-1.c28
-rw-r--r--gcc/testsuite/gcc.target/arm/cmse/cmse-16.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/cmse/cmse-1c99.c4
-rw-r--r--gcc/testsuite/gcc.target/arm/fpscr.c9
-rw-r--r--gcc/testsuite/gcc.target/arm/pr82518.c29
-rw-r--r--gcc/testsuite/gcc.target/arm/pr82989.c33
-rw-r--r--gcc/testsuite/gcc.target/arm/pr84826.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-pr84524.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr84786-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr84786-2.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr84786-3.c50
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermd-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-vpermd-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-vpermq-imm-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-vpermq-var-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr84310-2.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr84310.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr84827.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/pr85034.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr85095-1.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/pr85095-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/pr85193.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/ret-thunk-9.c2
-rw-r--r--gcc/testsuite/gcc.target/nvptx/pr85056.c21
-rw-r--r--gcc/testsuite/gcc.target/nvptx/pr85056a.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-1.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-3.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/crypto-builtin-1-runnable.c109
-rw-r--r--gcc/testsuite/gcc.target/powerpc/extend-divide-1.c14
-rw-r--r--gcc/testsuite/gcc.target/powerpc/extend-divide-2.c14
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p9-vinsert4b-1.c39
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p9-vinsert4b-2.c30
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr79799-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr81572.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr83660.C14
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr83969.c14
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr84700.c12
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr84878.c18
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr85698.c79
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr85755.c22
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-builtins-compile-4.c10
-rw-r--r--gcc/testsuite/gcc.target/s390/nobp-no-dwarf2-cfi.c19
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_alloc_opt_14.f908
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_assumed_charlen_4.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_stat_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_52.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/associate_30.f905
-rw-r--r--gcc/testsuite/gfortran.dg/associate_33.f0311
-rw-r--r--gcc/testsuite/gfortran.dg/char_result_18.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/class_67.f9055
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/get_to_indexed_array_1.f9032
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/get_to_indirect_array.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_45.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_46.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_8.f904
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_dependency_1.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f905
-rw-r--r--gcc/testsuite/gfortran.dg/data_bounds_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/data_char_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/pr84963.f907
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr85313.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/implied_do_2.f907
-rw-r--r--gcc/testsuite/gfortran.dg/init_flag_17.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/interface_41.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/internal_references_1.f907
-rw-r--r--gcc/testsuite/gfortran.dg/matmul_rank_1.f909
-rw-r--r--gcc/testsuite/gfortran.dg/pr38351.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/pr44491.f905
-rw-r--r--gcc/testsuite/gfortran.dg/pr51434.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/pr63514.f9041
-rw-r--r--gcc/testsuite/gfortran.dg/pr64124.f905
-rw-r--r--gcc/testsuite/gfortran.dg/pr65453.f908
-rw-r--r--gcc/testsuite/gfortran.dg/pr67803.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr67805.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr70409.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/pr70870_1.f909
-rw-r--r--gcc/testsuite/gfortran.dg/pr71085.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/pr77414.f909
-rw-r--r--gcc/testsuite/gfortran.dg/pr78278.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/pr78741.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/pr83149.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/pr83149_1.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/pr83149_a.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/pr83149_b.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/pr83939.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/pr84734.f904
-rw-r--r--gcc/testsuite/gfortran.dg/pr85138_1.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/pr85138_2.f9032
-rw-r--r--gcc/testsuite/gfortran.dg/pr85520.f907
-rw-r--r--gcc/testsuite/gfortran.dg/pr85521_1.f908
-rw-r--r--gcc/testsuite/gfortran.dg/pr85521_2.f908
-rw-r--r--gcc/testsuite/gfortran.dg/pr85542.f907
-rw-r--r--gcc/testsuite/gfortran.dg/pr85543.f908
-rw-r--r--gcc/testsuite/gfortran.dg/pr85687.f908
-rw-r--r--gcc/testsuite/gfortran.dg/pr85779_1.f906
-rw-r--r--gcc/testsuite/gfortran.dg/pr85779_2.f907
-rw-r--r--gcc/testsuite/gfortran.dg/pr85779_3.f907
-rw-r--r--gcc/testsuite/gfortran.dg/pr85780.f905
-rw-r--r--gcc/testsuite/gfortran.dg/pr85895.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/pr85996.f9069
-rw-r--r--gcc/testsuite/gfortran.dg/pr86045.f907
-rw-r--r--gcc/testsuite/gfortran.dg/pr86059.f908
-rw-r--r--gcc/testsuite/gfortran.dg/pr86110.f907
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_50.f9068
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_30.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_41.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_42.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_31.f0854
-rw-r--r--gcc/testsuite/gfortran.dg/temporary_2.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/temporary_3.f90121
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_4.f032
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_29.f9084
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_30.f0338
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/compile/pr85878.f908
-rw-r--r--gcc/testsuite/gnat.dg/aggr24.adb13
-rw-r--r--gcc/testsuite/gnat.dg/aggr24_pkg.adb15
-rw-r--r--gcc/testsuite/gnat.dg/aggr24_pkg.ads16
-rw-r--r--gcc/testsuite/gnat.dg/discr53.adb19
-rw-r--r--gcc/testsuite/gnat.dg/discr53.ads16
-rw-r--r--gcc/testsuite/gnat.dg/discr53_pkg.ads5
-rw-r--r--gcc/testsuite/gnat.dg/prot3.adb8
-rw-r--r--gcc/testsuite/gnat.dg/prot3_pkg.adb17
-rw-r--r--gcc/testsuite/gnat.dg/prot3_pkg.ads16
-rw-r--r--gcc/testsuite/gnat.dg/specs/opt3.ads13
-rw-r--r--gcc/testsuite/gnat.dg/specs/opt3_pkg.ads7
-rw-r--r--gcc/testsuite/go.dg/pr85436.go21
-rw-r--r--gcc/testsuite/lib/target-supports.exp3
-rw-r--r--gcc/tree-dfa.c13
-rw-r--r--gcc/tree-inline.c1
-rw-r--r--gcc/tree-ssa-loop-niter.c4
-rw-r--r--gcc/tree-ssa-pre.c25
-rw-r--r--gcc/tree-ssa-reassoc.c82
-rw-r--r--gcc/tree-ssa-sccvn.c15
-rw-r--r--gcc/tree-ssa-tail-merge.c6
-rw-r--r--gcc/tree-tailcall.c2
-rw-r--r--gcc/tree-vect-data-refs.c12
-rw-r--r--gcc/tree-vect-stmts.c27
-rw-r--r--gcc/tree-vrp.c2
-rw-r--r--gcc/tree.c10
-rw-r--r--gcc/varasm.c7
-rw-r--r--libada/ChangeLog8
-rwxr-xr-xlibada/configure2
-rw-r--r--libatomic/ChangeLog16
-rw-r--r--libatomic/config/s390/exch_n.c69
-rwxr-xr-xlibatomic/configure7
-rw-r--r--libatomic/configure.tgt5
-rw-r--r--libcc1/ChangeLog8
-rwxr-xr-xlibcc1/configure2
-rw-r--r--libcilkrts/ChangeLog8
-rw-r--r--libcilkrts/configure2
-rw-r--r--libcpp/lex.c2
-rw-r--r--libffi/ChangeLog8
-rwxr-xr-xlibffi/configure2
-rw-r--r--libgcc/ChangeLog42
-rw-r--r--libgcc/config/arm/cmse.c5
-rw-r--r--libgcc/config/i386/cpuinfo.c114
-rw-r--r--libgcc/config/pa/fptr.c20
-rw-r--r--libgcc/configure2
-rw-r--r--libgfortran/ChangeLog22
-rwxr-xr-xlibgfortran/configure2
-rw-r--r--libgfortran/io/write.c32
-rw-r--r--libgfortran/io/write_float.def1
-rw-r--r--libgo/config.h.in3
-rwxr-xr-xlibgo/configure33
-rw-r--r--libgo/configure.ac18
-rw-r--r--libgo/go/os/wait_waitid.go7
-rw-r--r--libgo/go/syscall/libcall_linux_ustat.go12
-rwxr-xr-xlibgo/mksysinfo.sh14
-rw-r--r--libgo/sysinfo.c3
-rw-r--r--libgomp/ChangeLog23
-rwxr-xr-xlibgomp/configure2
-rw-r--r--libgomp/testsuite/libgomp.c++/pr86291.C51
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/pr84955.c15
-rw-r--r--libgomp/testsuite/libgomp.oacc-fortran/pr84955.f9013
-rw-r--r--libhsail-rt/ChangeLog8
-rwxr-xr-xlibhsail-rt/configure2
-rw-r--r--libitm/ChangeLog8
-rw-r--r--libitm/configure2
-rw-r--r--libmpx/ChangeLog8
-rw-r--r--libmpx/configure2
-rw-r--r--libobjc/ChangeLog8
-rwxr-xr-xlibobjc/configure2
-rw-r--r--liboffloadmic/ChangeLog9
-rw-r--r--liboffloadmic/configure2
-rw-r--r--liboffloadmic/plugin/configure2
-rw-r--r--libquadmath/ChangeLog8
-rwxr-xr-xlibquadmath/configure2
-rw-r--r--libsanitizer/ChangeLog45
-rw-r--r--libsanitizer/asan/asan_allocator.h2
-rwxr-xr-xlibsanitizer/configure2
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc43
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc15
-rw-r--r--libssp/ChangeLog8
-rwxr-xr-xlibssp/configure2
-rw-r--r--libstdc++-v3/ChangeLog327
-rw-r--r--libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt1
-rwxr-xr-xlibstdc++-v3/configure41
-rw-r--r--libstdc++-v3/crossconfig.m43
-rw-r--r--libstdc++-v3/doc/html/faq.html13
-rw-r--r--libstdc++-v3/doc/html/manual/debug_mode_using.html2
-rw-r--r--libstdc++-v3/doc/html/manual/using_dual_abi.html29
-rw-r--r--libstdc++-v3/doc/xml/faq.xml14
-rw-r--r--libstdc++-v3/doc/xml/manual/debug_mode.xml14
-rw-r--r--libstdc++-v3/doc/xml/manual/using.xml31
-rw-r--r--libstdc++-v3/include/bits/basic_string.h25
-rw-r--r--libstdc++-v3/include/bits/basic_string.tcc25
-rw-r--r--libstdc++-v3/include/bits/char_traits.h4
-rw-r--r--libstdc++-v3/include/bits/forward_list.h11
-rw-r--r--libstdc++-v3/include/bits/forward_list.tcc8
-rw-r--r--libstdc++-v3/include/bits/node_handle.h2
-rw-r--r--libstdc++-v3/include/bits/random.tcc6
-rw-r--r--libstdc++-v3/include/bits/regex.h42
-rw-r--r--libstdc++-v3/include/bits/regex_automaton.h2
-rw-r--r--libstdc++-v3/include/bits/valarray_array.h10
-rw-r--r--libstdc++-v3/include/bits/vector.tcc24
-rw-r--r--libstdc++-v3/include/c_global/cstdlib6
-rw-r--r--libstdc++-v3/include/debug/string2
-rw-r--r--libstdc++-v3/include/experimental/bits/fs_path.h6
-rw-r--r--libstdc++-v3/include/std/chrono10
-rw-r--r--libstdc++-v3/include/std/utility4
-rw-r--r--libstdc++-v3/include/std/variant46
-rw-r--r--libstdc++-v3/include/tr1/ell_integral.tcc8
-rw-r--r--libstdc++-v3/include/tr1/exp_integral.tcc6
-rw-r--r--libstdc++-v3/libsupc++/cxxabi_init_exception.h3
-rw-r--r--libstdc++-v3/libsupc++/exception_ptr.h24
-rw-r--r--libstdc++-v3/src/c++11/Makefile.am20
-rw-r--r--libstdc++-v3/src/c++11/Makefile.in18
-rw-r--r--libstdc++-v3/src/c++11/cxx11-ios_failure.cc70
-rw-r--r--libstdc++-v3/src/c++11/ios.cc16
-rw-r--r--libstdc++-v3/src/c++98/ios_failure.cc47
-rw-r--r--libstdc++-v3/src/filesystem/ops.cc11
-rw-r--r--libstdc++-v3/testsuite/18_support/aligned_alloc/aligned_alloc.cc42
-rw-r--r--libstdc++-v3/testsuite/20_util/duration/cons/dr3050.cc24
-rw-r--r--libstdc++-v3/testsuite/20_util/duration/literals/range_neg.cc (renamed from libstdc++-v3/testsuite/20_util/duration/literals/range.cc)2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc30
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc30
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/dr2268.cc45
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/86169.cc37
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/modifiers/node_swap.cc48
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc60
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/exceptions_failbit.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/exceptions_failbit.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/12297.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/failure/dual_abi.cc99
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc15
-rw-r--r--libstdc++-v3/testsuite/28_regex/basic_regex/85098.cc45
-rw-r--r--libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc57
-rw-r--r--libstdc++-v3/testsuite/experimental/memory_resource/resource_adaptor.cc1
-rw-r--r--libstdc++-v3/testsuite/special_functions/06_comp_ellint_3/check_value.cc541
-rw-r--r--libstdc++-v3/testsuite/special_functions/06_comp_ellint_3/pr66689.cc24
-rw-r--r--libstdc++-v3/testsuite/special_functions/13_ellint_3/check_value.cc5090
-rw-r--r--libstdc++-v3/testsuite/special_functions/13_ellint_3/pr66689.cc26
-rw-r--r--libstdc++-v3/testsuite/special_functions/14_expint/pr68397.cc47
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_value.cc1185
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/pr66689.cc20
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_value.cc16039
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/pr66689.cc22
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/15_expint/pr68397.cc46
-rw-r--r--libvtv/ChangeLog8
-rwxr-xr-xlibvtv/configure2
595 files changed, 23013 insertions, 15242 deletions
diff --git a/ChangeLog b/ChangeLog
index 670d2bb20fd..f5199ea8db6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/config/ChangeLog b/config/ChangeLog
index abce453d1f7..57c8ff87fcf 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * acx.m4 (GCC_BASE_VER): Remove \$\$ from sed expression.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/config/acx.m4 b/config/acx.m4
index aa1d34b2b49..87c1b5e2932 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -246,7 +246,7 @@ AC_DEFUN([GCC_BASE_VER],
[AS_HELP_STRING([--with-gcc-major-version-only], [use only GCC major number in filesystem paths])],
[if test x$with_gcc_major_version_only = xyes ; then
changequote(,)dnl
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
changequote([,])dnl
fi
])
diff --git a/configure b/configure
index 32a38633ad8..32ee91f949e 100755
--- a/configure
+++ b/configure
@@ -6620,7 +6620,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 1472c9fe265..96107ab5015 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/fixincludes/configure b/fixincludes/configure
index ab97983f327..e4b03fd588c 100755
--- a/fixincludes/configure
+++ b/fixincludes/configure
@@ -5401,7 +5401,7 @@ _ACEOF
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e77323357b0..162169f188e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,1053 @@
+2018-07-10 Carl Love <cel@us.ibm.com>
+
+ Backport from mainline
+ 2017-09-07 Carl Love <cel@us.ibm.com>
+
+ * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
+ the sldi instruction.
+
+2018-06-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
+
+ * lex.c (search_line_fast): Remove illegal coercion of an
+ unaligned pointer value to vector pointer type and replace with
+ use of __builtin_vec_vsx_ld () built-in function, which operates
+ on unaligned pointer values.
+
+2018-06-27 David Edelsohn <dje.gcc@gmail.com>
+
+ 2018-06-19 Tony Reix <tony.reix@atos.com>
+ Damien Bergamini <damien.bergamini@atos.com>
+ David Edelsohn <dje.gcc@gmail.com>
+
+ * collect2.c (static_obj): New variable.
+ (static_libs): New variable.
+ (is_in_list): Uncomment declaration.
+ (main): Track AIX libraries linked statically.
+ (is_in_list): Uncomment definition.
+ (scan_prog_file): Don't add AIX shared libraries initializer
+ to constructor list if linking statically.
+
+2018-06-26 Kelvin Nilsen <kelvin@gcc.gnu.org>
+
+ Backported from mainline
+ 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
+
+ * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
+ behavior of vec_packsu (vector unsigned long long, vector unsigned
+ long long) to match behavior of vec_packs with same signature.
+
+2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
+
+ * config/s390/s390.h (enum processor_flags): Do not use
+ default tune parameter when -march was specified.
+
+2018-06-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/86314
+ * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
+ Check reg_overlap_mentioned_p in addition to reg_set_p with the same
+ operands.
+
+2018-06-25 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ Back port from trunk
+ 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/85424
+ * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
+ where the inputs overlap with the output.
+
+2018-06-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84786
+ * config/i386/sse.md (vshift_count): New mode attr.
+ (<shift_insn><mode>3<mask_name>): Use <vshift_count>N instead of vN
+ as last operand's constraint for VI2_AVX2_AVX512BW shifts. Use YvN
+ instead of vN as last operand's constraint for VI48_AVX2 shifts.
+
+2018-06-23 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR tree-optimization/85989
+ * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
+ variable.
+ (backprop::intersect_uses): Check it when deciding whether this
+ is a backedge reference.
+ (backprop::process_block): Add each phi to m_visited_phis
+ after visiting it, then clear it at the end.
+
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-06-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/86231
+ * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
+ anti-range don't overwrite *vr0min before using it to compute *vr0max.
+
+ 2018-06-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/85878
+ * expr.c (expand_assignment): Only call store_expr for halves if the
+ mode is the same.
+
+ 2018-06-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/85945
+ * lower-subreg.c (find_decomposable_subregs): Don't decompose float
+ subregs of multi-word pseudos unless the float mode has word size.
+
+ 2018-06-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/86025
+ * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
+
+ 2018-05-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85659
+ * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
+ the type is addressable. Don't force op into register if it has
+ BLKmode.
+
+ 2018-05-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR web/85578
+ * doc/install.texi2html: Replace _002d with - and _002a with * in
+ generated html files using sed.
+
+ 2018-04-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/85529
+ * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
+ argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
+ rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
+ zero extension or masking of the MSB bit.
+ (optimize_range_tests): Add FIRST_BB argument, pass it through
+ to optimize_range_tests_var_bound.
+ (maybe_optimize_range_tests, reassociate_bb): Adjust
+ optimize_range_tests callers.
+
+ 2018-04-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/85446
+ * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
+ the integral and pointer types to have the same precision.
+
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
+ by using gcc_base_ver to generate a gcc_driver_version, and use
+ it when generating GCC_DRIVER_NAME.
+ * configure: Regenerate.
+
+ 2018-04-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/85431
+ * dse.c (record_store): Ignore zero width stores.
+
+ PR target/85430
+ * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
+
+ 2018-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/85300
+ * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
+ into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
+ simplify_unary_operation fails.
+
+ 2018-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/85257
+ * fold-const.c (native_encode_vector): If not all elts could fit
+ and off is -1, return 0 rather than offset.
+ * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
+ (offset - offset2) / BITS_PER_UNIT as 4th argument to
+ native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
+ adjust buffer in native_interpret_expr call.
+
+ 2018-04-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/85252
+ * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
+ build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
+
+ 2018-04-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/85167
+ * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
+ bb_defs if *split_p, instead preinitialize it to NULL.
+
+ 2018-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/85095
+ * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
+ *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
+
+ 2018-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/85022
+ * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
+ known size by default.
+
+ PR inline-asm/85034
+ * function.c (match_asm_constraints_1): Don't optimize if input
+ doesn't satisfy general_operand predicate for output's mode.
+
+ PR inline-asm/85022
+ * alias.c (write_dependence_p): Don't require for x_canonicalized
+ non-VOIDmode if x has VOIDmode.
+
+ 2018-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/84941
+ * function.c (match_asm_constraints_1): Don't do the optimization
+ if input isn't a REG, SUBREG, MEM or constant.
+
+ PR sanitizer/85018
+ * dwarf2asm.c (dw2_output_indirect_constant_1): Set
+ DECL_INITIAL (decl) to decl at the end.
+ * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
+ adjust the comment.
+
+ 2018-03-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/84875
+ * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
+ holding REG_CFA_RESTORE notes, instead turn them into a USE.
+
+ PR c/84953
+ * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
+ instead of TREE_TYPE (s1) for the return value.
+
+ PR target/84990
+ * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
+ flag_section_anchors.
+ * varasm.c (use_blocks_for_decl_p): Remove hack for
+ dw2_force_const_mem.
+
+ 2018-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/78651
+ * dwarf2asm.c: Include fold-const.c.
+ (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
+ of decl rather than decl itself.
+
+ 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
+
+ PR sanitizer/78651
+ * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
+ calling assemble_variable.
+
+ 2018-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84899
+ * postreload.c (reload_combine_recognize_pattern): Perform
+ INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
+ truncate_int_for_mode the result for the destination's mode.
+
+ PR tree-optimization/84841
+ * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
+ 1 << 3.
+ (FLOAT_ONE_CONST_TYPE): Define.
+ (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
+ (sort_by_operand_rank): Put entries with higher constant_type last
+ rather than first to match comments.
+
+ 2018-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79085
+ * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
+ check and use address of target always.
+
+ PR target/84860
+ * optabs.c (emit_conditional_move): Pass address of cmode's copy
+ rather than address of cmode as last argument to prepare_cmp_insn.
+
+ 2018-03-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/84834
+ * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
+ integer_pow2p@2 and test integer_pow2p in condition.
+ (A < 0 ? C : 0): Similarly for @1.
+
+ PR target/84827
+ * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
+ pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
+
+ PR target/84786
+ * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
+ on the last operand.
+
+ 2018-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84772
+ * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
+ temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
+
+ PR c++/84767
+ * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
+ decl, use remap_type if we want to use the type.
+
+ 2018-03-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/84739
+ * tree-tailcall.c (find_tail_calls): Check call arguments against
+ DECL_ARGUMENTS (current_function_decl) rather than
+ DECL_ARGUMENTS (func) when checking for tail recursion.
+
+ 2018-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84700
+ * combine.c (combine_simplify_rtx): Don't try to simplify if
+ if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
+ are equal to x.
+
+2018-06-22 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ Backport from mainline
+ 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
+ __typeof__.
+ (cmse_check_pointed_object): Likewise.
+
+2018-06-22 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ Backport from mainline
+ 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
+
+ * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
+ #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
+
+2018-06-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ Backport from mainline
+ 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
+ multilibs for *-*-rtems*.
+ * config/riscv/t-rtems: New file.
+
+2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
+ constant.
+ (allocate_stack, frame_blockage, *frame_blockage): New patterns.
+
+2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gimplify.c (gimplify_init_constructor): Really never clear for an
+ incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
+
+2018-06-18 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/82063
+ * calls.c (alloc_max_size): Correct a logic error/typo.
+ Treat excessive arguments as infinite. Warn for invalid arguments.
+ * doc/invoke.texi (-Walloc-size-larger-than): Update.
+
+2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ Backport from mainline
+ 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config/rtems.h (STDINT_LONG32): Define.
+
+2018-06-11 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/85755
+ * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
+ addresses.
+
+2018-06-07 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/63177
+ * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
+ Don't handle -mcpu=power8 if -mpower9-vector is also used.
+
+2018-06-07 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-05-04 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/85588
+ * fold-const.c (negate_expr_p): Restrict negation of operand
+ zero of a division to when we know that can happen without
+ overflow.
+ (fold_negate_expr_1): Likewise.
+
+ 2018-05-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/85567
+ * gimplify.c (gimplify_save_expr): When in SSA form allow
+ SAVE_EXPRs to compute to SSA vars.
+
+ 2018-05-02 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/85597
+ * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
+ do not use split vect_get_vec_defs call but call vect_get_slp_defs
+ directly.
+
+2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ Backport from mainline
+ 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * config/s390/s390-builtin-types.def: Add void function type.
+ * config/s390/s390-builtins.def: Use the function type for the
+ tbeginc builtin.
+
+2018-06-01 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR tree-optimization/85712
+ Backport from mainline:
+ 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR tree-optimization/85712
+ * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
+ first_interp field.
+ (alloc_cand_and_find_basis): Initialize first_interp field.
+ (slsr_process_mul): Modify first_interp field.
+ (slsr_process_add): Likewise.
+ (slsr_process_cast): Modify first_interp field for each new
+ interpretation.
+ (slsr_process_copy): Likewise.
+ (dump_candidate): Dump first_interp field.
+ (replace_mult_candidate): Process all interpretations, not just
+ subsequent ones.
+ (replace_rhs_if_not_dup): Likewise.
+ (replace_one_candidate): Likewise.
+
+ Backport from mainline:
+ 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR tree-optimization/85712
+ * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
+ this candidate has already been replaced in-situ by a copy.
+
+2018-05-24 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
+ Add {q} suffix to insn mnemonic.
+
+2018-05-24 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/85903
+ * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
+ when memory input operand is handled.
+
+2018-05-21 Pat Haugen <pthaugen@us.ibm.com>
+
+ Backport from mainline
+ 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
+ Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/85698
+ * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check
+ dest operand.
+
+2018-05-17 Martin Jambor <mjambor@suse.cz>
+
+ Backport from mainline
+ 2018-05-11 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/85655
+ * ipa-cp.c (intersect_with_plats): Check that the lattice contains
+ single const.
+
+2018-05-01 Tom de Vries <tom@codesourcery.com>
+
+ backport from trunk:
+ 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
+ Tom de Vries <tom@codesourcery.com>
+
+ PR middle-end/84955
+ * omp-expand.c (expand_oacc_for): Add dummy false branch for
+ tiled basic blocks without omp continue statements.
+
+2018-04-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-04-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/85284
+ * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
+ Only use the niter constraining form of simple_iv when the exit
+ is always executed.
+
+ 2018-04-06 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/85244
+ * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
+ after seeing a component reference with an adjacent field. Treat
+ refs to arrays at struct end of external decls similar to
+ refs to unconstrained commons.
+
+ 2018-04-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/85168
+ * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
+ propagating abnormals.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-04-17 Martin Liska <mliska@suse.cz>
+
+ PR lto/85405
+ * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
+ in message, remote space in between '_G' and '('.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-04-17 Jan Hubicka <jh@suse.cz>
+
+ PR lto/85405
+ * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-03-28 Jakub Jelinek <jakub@redhat.com>
+ Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/85081
+ * gimplify.c (asan_poison_variable): Don't do the check for
+ gimplify_omp_ctxp here.
+ (gimplify_decl_expr): Do it here.
+ (gimplify_target_expr): Likewise.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-03-21 Martin Liska <mliska@suse.cz>
+
+ PR ipa/84963
+ * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
+ not intended return statement.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-03-13 Martin Liska <mliska@suse.cz>
+
+ PR ipa/84658.
+ * (sem_item_optimizer::sem_item_optimizer): Initialize new
+ vector.
+ (sem_item_optimizer::~sem_item_optimizer): Release it.
+ (sem_item_optimizer::merge_classes): Register variable aliases.
+ (sem_item_optimizer::fixup_pt_set): New function.
+ (sem_item_optimizer::fixup_points_to_sets): Likewise.
+ * ipa-icf.h: Declare new variables and functions.
+
+2018-04-23 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ Backport from mainline
+ 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ PR target/83660
+ * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
+ vec_extract expression as having side effects to make sure it gets
+ a cleanup point.
+
+2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR middle-end/85496
+ * expr.c (store_field): In the bitfield case, if the value comes from
+ a function call and is returned in registers by means of a PARALLEL,
+ do not change the mode of the temporary unless BLKmode and VOIDmode.
+
+2018-04-20 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/83969
+ * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
+ Add strict argument and use it.
+ (rs6000_split_multireg_move): Update for new strict argument.
+ (mem_operand_gpr): Disallow all non-offsettable addresses.
+ * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
+
+2018-04-18 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR target/85261
+ * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
+ into register.
+
+2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * config/s390/s390.c (s390_output_indirect_thunk_function): Check
+ also for flag_dwarf2_cfi_asm.
+
+2018-04-11 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/alpha/alpha.md (stack_probe_internal): Rename
+ from "probe_stack". Update all callers.
+
+2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR target/85203
+ * config/arm/arm-builtins.c (arm_expand_builtin): Change
+ expansion to perform a bitwise AND of the argument followed by a
+ boolean negation of the result.
+
+2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ Backport from mainline
+ 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/84748
+ * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
+ as clobbering CC_REGNUM.
+
+2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR target/85196
+ * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
+ based on LABEL_REF. Remove useless assertion.
+ (pic_address_needs_scratch): Fix formatting.
+ (sparc_legitimize_pic_address): Minor tweaks.
+ (sparc_delegitimize_address): Adjust assertion accordingly.
+ * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
+ into symbolic_operand.
+ (movsi_high_pic_label_ref): Likewise.
+ (movsi_lo_sum_pic_label_ref): Likewise.
+ (movdi_pic_label_ref): Likewise.
+ (movdi_high_pic_label_ref): Likewise.
+ (movdi_lo_sum_pic_label_ref): Likewise.
+
+2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
+
+ * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
+ custom LIB_SPEC setup.
+
+2018-04-05 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/85193
+ * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
+
+2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR rtl-optimization/84878
+ * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
+ the basic block. Assert the use reference is not artificial and that
+ it has an associated insn.
+
+2018-04-03 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
+ instructions when changing rounding bits to preserve precision bits
+ in the x87 control word.
+
+2018-04-03 Cesar Philippidis <cesar@codesourcery.com>
+
+ Backport from mainline
+ 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR target/85056
+ * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
+ extern array declarations.
+
+2018-04-02 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/84912
+ * config/rs6000/rs6000.h: Update copyright date.
+ (RS6000_BTM_POWERPC64): New define.
+ (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
+ * config/rs6000/rs6000.c: Update copyright date.
+ (rs6000_builtin_mask_calculate): Add support for RS6000_BTM_POWERPC64.
+ (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
+ (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
+ * config/rs6000/rs6000-builtin.def: Update copyright date.
+ (BU_P7_POWERPC64_MISC_2): New macro definition.
+ (DIVDE): Use it.
+ (DIVDEU): Likewise.
+
+ Backport from mainline
+ 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/84912
+ * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
+ (DIVWEUO): Likewise.
+ (DIVDEO): Likewise.
+ (DIVDEUO): Likewise.
+ * config/rs6000/rs6000.c (builtin_function_type): Remove support for
+ DIVWEUO and DIVDEUO.
+ * config/rs6000/rs6000.md: Update copyright date.
+ (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
+ (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
+ (div_extend): Likewise.
+ * doc/extend.texi: Update copyright date.
+ (__builtin_divweo): Remove documentation for deleted builtin function.
+ (__builtin_divweuo): Likewise.
+ (__builtin_divdeo): Likewise.
+ (__builtin_divdeuo): Likewise.
+
+2018-04-02 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/80546
+ * config/rs6000/vsx.md (??r): New mode attribute.
+ (*vsx_mov<mode>_64bit): Use it.
+ (*vsx_mov<mode>_32bit): Likewise.
+
+2018-03-29 Sebastian Peryt <sebastian.peryt@intel.com>
+
+ PR c++/84783
+ * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
+ (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
+
+2018-03-29 Sudakshina Das <sudi.das@arm.com>
+
+ Backport from mainline
+ 2018-03-22 Sudakshina Das <sudi.das@arm.com>
+
+ PR target/84826
+ * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
+ * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
+ re-computing once computed.
+ (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
+ (arm_init_machine_status): Initialize
+ machine->static_chain_stack_bytes.
+
+2018-03-28 Sudakshina Das <sudi.das@arm.com>
+
+ 2018-03-19 Sudakshina Das <sudi.das@arm.com>
+ PR target/81647
+
+ * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_cmp_result>): Modify
+ instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
+
+2018-03-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ Backport from mainline
+ 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/85026
+ * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
+ Clean up attributes.
+
+2018-03-28 Segher Boessenkool <segher@kernel.crashing.org>
+
+ Backport from mainline
+ 2018-03-08 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/82411
+ * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
+ readonly data in sdata, if that is disabled.
+ * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
+ * doc/invoke.texi (RS/6000 and PowerPC Options): Document
+ -mreadonly-in-sdata option.
+
+2018-03-27 Sudakshina Das <sudi.das@arm.com>
+
+ Backport from mainline:
+ 2018-03-20 Sudakshina Das <sudi.das@arm.com>
+
+ PR target/82989
+ * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
+ to favor GPR over NEON registers.
+ (<shift>di3_neon): Likewise.
+
+2018-03-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ Backport from mainline
+ 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/82518
+ * config/arm/arm.c (arm_array_mode_supported_p): Return false for
+ BYTES_BIG_ENDIAN.
+
+2018-03-23 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/83789
+ * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
+ (altivec_lvx_<mode>_1op): Likewise.
+ (altivec_stvx_<mode>_2op): Likewise.
+ (altivec_stvx_<mode>_1op): Likewise.
+ (altivec_lvx_<VM2:mode>): New define_expand.
+ (altivec_stvx_<VM2:mode>): Likewise.
+ (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
+ (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
+ (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
+ (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
+ * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
+ (altivec_expand_stv_builtin): Likewise.
+ (altivec_expand_builtin): Likewise.
+ * config/rs6000/vector.md: Likewise.
+
+2018-03-23 Carl Love <cel@us.ibm.com>
+
+ Backport from mainline:
+ 2018-03-14 Carl Love <cel@us.ibm.com>
+
+ * config/rs6000/r6000.c (rtx_is_swappable_p): Add case UNSPEC_VPERMXOR.
+
+2018-03-22 Tom de Vries <tom@codesourcery.com>
+
+ backport from trunk:
+ 2018-03-22 Tom de Vries <tom@codesourcery.com>
+
+ PR tree-optimization/84956
+ * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
+ bb_has_abnormal_pred.
+
+2018-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from mainline
+ 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/84574
+ * config/i386/i386.c (indirect_thunk_needed): Update comments.
+ (indirect_thunk_bnd_needed): Likewise.
+ (indirect_thunks_used): Likewise.
+ (indirect_thunks_bnd_used): Likewise.
+ (indirect_return_needed): New.
+ (indirect_return_bnd_needed): Likewise.
+ (output_indirect_thunk_function): Add a bool argument for
+ function return.
+ (output_indirect_thunk_function): Don't generate alias for
+ function return thunk.
+ (ix86_code_end): Call output_indirect_thunk_function to generate
+ function return thunks.
+ (ix86_output_function_return): Set indirect_return_bnd_needed
+ and indirect_return_needed instead of indirect_thunk_bnd_needed
+ and indirect_thunk_needed.
+
+2018-03-14 John David Anglin <danglin@gcc.gnu.org>
+
+ PR target/83451
+ * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
+ insn for floating-point loads and stores.
+
+2018-03-12 Jonathan Wakely <jwakely@redhat.com>
+
+ * doc/invoke.texi (-mclflushopt): Fix spelling of option.
+
+2018-03-12 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR tree-optimization/84485
+ * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Return
+ true for zero dependence distances if the step might be zero,
+ and if there is no metadata that guarantees correctness.
+ (vect_analyze_data_ref_access): Check safelen as well as
+ force_vectorize.
+
+2018-03-11 John David Anglin <danglin@gcc.gnu.org>
+
+ Backport from mainline
+ 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
+
+ PR target/83984
+ * config/pa/pa.md: Load address of PIC label using the linkage table
+ if the label is nonlocal.
+
+ Backport from mainline
+ 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
+
+ * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
+ sprint_ul.
+ (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
+ (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
+ * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
+
+2018-03-09 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ Backport from mainline
+ 2017-09-13 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
+ Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341
+ for default.
+
+2018-03-06 Denis Chertykov <chertykov@gmail.com>
+
+ Backport from mainline
+ 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/84209
+ * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
+ * config/avr/avr.md: Only post-reload split REG-REG moves if
+ either register is GENERAL_REG_P.
+
+2018-03-06 Carl Love <cel@us.ibm.com>
+
+ Backport from mainline
+ 2/16/18 commit 257748 Carl Love <cel@us.ibm.com>
+
+ * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
+ * config/rs6000/rs6000-builtin.def: Remove macro expansion for
+ VINSERT4B_DI and VINSERT4B.
+ * config/rs6000/rs6000.c: Remove case statements for
+ P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
+ and P9V_BUILTIN_VEC_VINSERT4B.
+ * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
+ P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
+ * config/rs6000/vsx.md: Remove define_expand vinsert4b,
+ define_insn *vinsert4b_internal, define_insn "*vinsert4b_di_internal.
+ * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
+ vec_insert4b.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-20 Martin Liska <mliska@suse.cz>
+
+ PR c/84310
+ PR target/79747
+ * final.c (shorten_branches): Build align_tab array with one
+ more element.
+ * opts.c (finish_options): Add alignment option limit check.
+ (MAX_CODE_ALIGN): Likewise.
+ (MAX_CODE_ALIGN_VALUE): Likewise.
+ * doc/invoke.texi: Document maximum allowed option value for
+ all -falign-* options.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-19 Martin Liska <mliska@suse.cz>
+
+ PR other/80589
+ * doc/invoke.texi: Fix typo.
+ * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-05 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/84137
+ * doc/gcov.texi: Fix typo in documentation.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-05 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/83879
+ * doc/gcov.texi: Document necessity of --dynamic-list-data when
+ using dlopen functionality.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-12-19 Martin Liska <mliska@suse.cz>
+
+ PR rtl-optimization/82675
+ * loop-unroll.c (unroll_loop_constant_iterations): Allocate one
+ more element in sbitmap.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-03-05 Martin Liska <mliska@suse.cz>
+
+ * ipa-utils.c (ipa_merge_profiles): Do not merge alias or
+ a function without profile.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
+
+ PR c/84229
+ * ipa-cp.c (determine_versionability): Do not version functions caling
+ va_arg_pack.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/81360
+ * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
+ * symtab.c: Include builtins.h
+ (symtab_node::output_to_lto_symbol_table_p): Move here
+ from lto-streamer-out.c:output_symbol_p.
+ * lto-streamer-out.c (write_symbol): Turn early exit to assert.
+ (output_symbol_p): Move all logic to symtab.c
+ (produce_symtab): Update.
+
+2018-03-06 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/81572
+ * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
+ * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
+ LRA_UNKNOWN_ALT.
+ * lra-constraints.c (curr_insn_transform): Set up
+ LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
+ LRA_UNKNOWN_ALT.
+ (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
+ * lra-eliminations.c (spill_pseudos): Ditto.
+ (process_insn_for_elimination): Ditto.
+ * lra-lives.c (reg_early_clobber_p): Use the new macros.
+ * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
+ LRA_NON_CLOBBERED_ALT.
+
+2018-03-06 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-03-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/84486
+ * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
+ When inserting a __builtin_assume_aligned call set the LHS
+ SSA name alignment info accordingly.
+
+ 2018-02-28 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/84607
+ * genmatch.c (capture_info::walk_match): Do not mark
+ captured expressions without operands as expr_p given
+ they act more like predicates and should be subject to
+ "lost tail" side-effect preserving.
+
+2018-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84524
+ * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
+ orig,vex.
+ (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
+
2018-03-03 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 54ab8238f3a..b4e3bc1923e 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20180303
+20180712
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index e04b87d0c16..0dde55a7f78 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,86 @@
+2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Change from
+ using TYPE_LANG_FLAG_4 to using TYPE_LANG_FLAG_0.
+ (TYPE_ALIGN_OK): Move around.
+ (TYPE_PADDING_FOR_COMPONENT): Remove superfluous parentheses.
+ * gcc-interface/decl.c (change_qualified_type): Move to...
+ (gnat_to_gnu_entity): Adjust comment.
+ * gcc-interface/gigi.h (change_qualified_type): ...here; make inline.
+ (ceil_pow2): Use ceil_log2.
+ * gcc-interface/utils.c (finish_subprog_decl): Add couple of comments
+ and do not set TREE_SIDE_EFFECTS.
+ (handle_noreturn_attribute): Use change_qualified_type.
+
+2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Do not get
+ the expression of a dispatch table that is not being defined.
+ <E_Record_Subtype>: Remove obsolete kludge.
+
+2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ Backpor from mainline
+ 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: If this is
+ not a definition, retrieve the expression only if it's a compile-time
+ known value if we are just annotating types.
+
+ * gcc-interface/utils.c (convert): Do not try to upcast properly for a
+ conversion between tagged types in type_annotate_only mode.
+
+2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ Backport from mainline
+ 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Reuse the
+ existing fields of a dummy fat pointer type, if any. Clear the
+ TYPE_DECL_SUPPRESS_DEBUG on the fat pointer type after completing it.
+
+2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/ada-tree.h (TYPE_PADDING_FOR_COMPONENT): New macro.
+ * gcc-interface/decl.c (gnat_to_gnu_component_type): Cache the padding
+ type built for an aliased component with variable size.
+
+2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ Backport from mainline
+ 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
+ there is no target, also create a temporary for the return value for
+ an allocator if the type is an unconstrained record type with default
+ discriminant.
+
+2018-04-12 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ Backport from mainline
+ 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
+ $(GNATLIBCFLAGS).
+ (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
+
+2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/82813
+ * gcc-interface/misc.c (gnat_post_options): Disable string overflow
+ warnings.
+
+2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
+ Consider only entities for objects.
+
+2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
+ guarding the overflow check emitted for the upper bound of a floating-
+ point conversion.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index ae2016e7f7a..e4efda434c1 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -2756,9 +2756,9 @@ OSCONS_CC=$(subst ./xgcc,../../xgcc,$(subst -B./, -B../../,$(GCC_FOR_TARGET)))
# ada/types.h does not conflict with a same-named system header (VxWorks
# has a <types.h> header).
-OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) $(GNATLIBCFLAGS_FOR_C) -E -C \
+OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS_FOR_C) -E -C \
-DTARGET=\"$(target)\" -iquote $(fsrcpfx)ada $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i
-OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
+OSCONS_EXTRACT=$(OSCONS_CC) $(GNATLIBCFLAGS_FOR_C) -S s-oscons-tmplt.i
# Note: if you need to build with a non-GNU compiler, you could adapt the
# following definitions (written for VMS DEC-C)
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h
index a3d38b1b22e..852e2a5138b 100644
--- a/gcc/ada/gcc-interface/ada-tree.h
+++ b/gcc/ada/gcc-interface/ada-tree.h
@@ -6,7 +6,7 @@
* *
* C Header File *
* *
- * Copyright (C) 1992-2016, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -83,6 +83,12 @@ do { \
((TREE_CODE (NODE) == INTEGER_TYPE || TREE_CODE (NODE) == ARRAY_TYPE) \
&& TYPE_PACKED_ARRAY_TYPE_P (NODE))
+/* For FUNCTION_TYPEs, nonzero if the function returns by direct reference,
+ i.e. the callee returns a pointer to a memory location it has allocated
+ and the caller only needs to dereference the pointer. */
+#define TYPE_RETURN_BY_DIRECT_REF_P(NODE) \
+ TYPE_LANG_FLAG_0 (FUNCTION_TYPE_CHECK (NODE))
+
/* For INTEGER_TYPE, nonzero if this is a modular type with a modulus that
is not equal to two to the power of its mode's size. */
#define TYPE_MODULAR_P(NODE) TYPE_LANG_FLAG_1 (INTEGER_TYPE_CHECK (NODE))
@@ -152,12 +158,6 @@ do { \
#define TYPE_CONVENTION_FORTRAN_P(NODE) \
TYPE_LANG_FLAG_4 (ARRAY_TYPE_CHECK (NODE))
-/* For FUNCTION_TYPEs, nonzero if the function returns by direct reference,
- i.e. the callee returns a pointer to a memory location it has allocated
- and the caller only needs to dereference the pointer. */
-#define TYPE_RETURN_BY_DIRECT_REF_P(NODE) \
- TYPE_LANG_FLAG_4 (FUNCTION_TYPE_CHECK (NODE))
-
/* For RECORD_TYPE, UNION_TYPE and ENUMERAL_TYPE, nonzero if this is a dummy
type, made to correspond to a private or incomplete type. */
#define TYPE_DUMMY_P(NODE) \
@@ -186,6 +186,9 @@ do { \
/* True for a dummy type if TYPE appears in a profile. */
#define TYPE_DUMMY_IN_PROFILE_P(NODE) TYPE_LANG_FLAG_6 (NODE)
+/* True if objects of this type are guaranteed to be properly aligned. */
+#define TYPE_ALIGN_OK(NODE) TYPE_LANG_FLAG_7 (NODE)
+
/* True for types that implement a packed array and for original packed array
types. */
#define TYPE_IMPL_PACKED_ARRAY_P(NODE) \
@@ -199,9 +202,6 @@ do { \
alignment value the type ought to have. */
#define TYPE_MAX_ALIGN(NODE) (TYPE_PRECISION (RECORD_OR_UNION_CHECK (NODE)))
-/* True if objects of tagged types are guaranteed to be properly aligned. */
-#define TYPE_ALIGN_OK(NODE) TYPE_LANG_FLAG_7 (NODE)
-
/* For an UNCONSTRAINED_ARRAY_TYPE, this is the record containing both the
template and the object.
@@ -232,6 +232,11 @@ do { \
refer to the routine gnat_to_gnu_entity. */
#define TYPE_CI_CO_LIST(NODE) TYPE_LANG_SLOT_1 (FUNCTION_TYPE_CHECK (NODE))
+/* For an ARRAY_TYPE with variable size, this is the padding type built for
+ the array type when it is itself the component type of another array. */
+#define TYPE_PADDING_FOR_COMPONENT(NODE) \
+ TYPE_LANG_SLOT_1 (ARRAY_TYPE_CHECK (NODE))
+
/* For a VECTOR_TYPE, this is the representative array type. */
#define TYPE_REPRESENTATIVE_ARRAY(NODE) \
TYPE_LANG_SLOT_1 (VECTOR_TYPE_CHECK (NODE))
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index e226f256b47..d2316afc8f1 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -206,7 +206,6 @@ static tree gnat_to_gnu_component_type (Entity_Id, bool, bool);
static tree gnat_to_gnu_subprog_type (Entity_Id, bool, bool, tree *);
static tree gnat_to_gnu_field (Entity_Id, tree, int, bool, bool);
static tree gnu_ext_name_for_subprog (Entity_Id, tree);
-static tree change_qualified_type (tree, int);
static void set_nonaliased_component_on_array_type (tree);
static void set_reverse_storage_order_on_array_type (tree);
static bool same_discriminant_p (Entity_Id, Entity_Id);
@@ -592,17 +591,22 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
/* If we have a constant that we are not defining, get the expression it
was defined to represent. This is necessary to avoid generating dumb
elaboration code in simple cases, but we may throw it away later if it
- is not a constant. But do not retrieve it if it is an allocator since
- the designated type might still be dummy at this point. */
+ is not a constant. But do not do it for dispatch tables because they
+ are only referenced indirectly and we need to have a consistent view
+ of the exported and of the imported declarations of the tables from
+ external units for them to be properly merged in LTO mode. Moreover
+ simply do not retrieve the expression it if it is an allocator since
+ the designated type might still be dummy at this point. Note that we
+ invoke gnat_to_gnu_external and not gnat_to_gnu because the expression
+ may contain N_Expression_With_Actions nodes and thus declarations of
+ objects from other units that we need to discard. */
if (!definition
&& !No_Initialization (Declaration_Node (gnat_entity))
- && Present (Expression (Declaration_Node (gnat_entity)))
- && Nkind (Expression (Declaration_Node (gnat_entity)))
- != N_Allocator)
- /* The expression may contain N_Expression_With_Actions nodes and
- thus object declarations from other units. Discard them. */
- gnu_expr
- = gnat_to_gnu_external (Expression (Declaration_Node (gnat_entity)));
+ && !Is_Dispatch_Table_Entity (gnat_entity)
+ && Present (gnat_temp = Expression (Declaration_Node (gnat_entity)))
+ && Nkind (gnat_temp) != N_Allocator
+ && (!type_annotate_only || Compile_Time_Known_Value (gnat_temp)))
+ gnu_expr = gnat_to_gnu_external (gnat_temp);
/* ... fall through ... */
@@ -2063,11 +2067,16 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
{
gnu_fat_type = TYPE_MAIN_VARIANT (TYPE_POINTER_TO (gnu_type));
TYPE_NAME (gnu_fat_type) = NULL_TREE;
- /* Save the contents of the dummy type for update_pointer_to. */
- TYPE_POINTER_TO (gnu_type) = copy_type (gnu_fat_type);
gnu_ptr_template =
- TREE_TYPE (TREE_CHAIN (TYPE_FIELDS (gnu_fat_type)));
+ TREE_TYPE (DECL_CHAIN (TYPE_FIELDS (gnu_fat_type)));
gnu_template_type = TREE_TYPE (gnu_ptr_template);
+
+ /* Save the contents of the dummy type for update_pointer_to. */
+ TYPE_POINTER_TO (gnu_type) = copy_type (gnu_fat_type);
+ TYPE_FIELDS (TYPE_POINTER_TO (gnu_type))
+ = copy_node (TYPE_FIELDS (gnu_fat_type));
+ DECL_CHAIN (TYPE_FIELDS (TYPE_POINTER_TO (gnu_type)))
+ = copy_node (DECL_CHAIN (TYPE_FIELDS (gnu_fat_type)));
}
else
{
@@ -2088,29 +2097,39 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
/* Build the fat pointer type. Use a "void *" object instead of
a pointer to the array type since we don't have the array type
- yet (it will reference the fat pointer via the bounds). */
- tem
- = create_field_decl (get_identifier ("P_ARRAY"), ptr_type_node,
- gnu_fat_type, NULL_TREE, NULL_TREE, 0, 0);
- DECL_CHAIN (tem)
- = create_field_decl (get_identifier ("P_BOUNDS"), gnu_ptr_template,
- gnu_fat_type, NULL_TREE, NULL_TREE, 0, 0);
-
+ yet (it will reference the fat pointer via the bounds). Note
+ that we reuse the existing fields of a dummy type because for:
+
+ type Arr is array (Positive range <>) of Element_Type;
+ type Array_Ref is access Arr;
+ Var : Array_Ref := Null;
+
+ in a declarative part, Arr will be frozen only after Var, which
+ means that the fields used in the CONSTRUCTOR built for Null are
+ those of the dummy type, which in turn means that COMPONENT_REFs
+ of Var may be built with these fields. Now if COMPONENT_REFs of
+ Var are also built later with the fields of the final type, the
+ aliasing machinery may consider that the accesses are distinct
+ if the FIELD_DECLs are distinct as objects. */
if (COMPLETE_TYPE_P (gnu_fat_type))
{
- /* We are going to lay it out again so reset the alias set. */
- alias_set_type alias_set = TYPE_ALIAS_SET (gnu_fat_type);
- TYPE_ALIAS_SET (gnu_fat_type) = -1;
- finish_fat_pointer_type (gnu_fat_type, tem);
- TYPE_ALIAS_SET (gnu_fat_type) = alias_set;
+ tem = TYPE_FIELDS (gnu_fat_type);
+ TREE_TYPE (tem) = ptr_type_node;
+ TREE_TYPE (DECL_CHAIN (tem)) = gnu_ptr_template;
+ TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (gnu_fat_type)) = 0;
for (t = gnu_fat_type; t; t = TYPE_NEXT_VARIANT (t))
- {
- TYPE_FIELDS (t) = tem;
- SET_TYPE_UNCONSTRAINED_ARRAY (t, gnu_type);
- }
+ SET_TYPE_UNCONSTRAINED_ARRAY (t, gnu_type);
}
else
{
+ tem
+ = create_field_decl (get_identifier ("P_ARRAY"),
+ ptr_type_node, gnu_fat_type,
+ NULL_TREE, NULL_TREE, 0, 0);
+ DECL_CHAIN (tem)
+ = create_field_decl (get_identifier ("P_BOUNDS"),
+ gnu_ptr_template, gnu_fat_type,
+ NULL_TREE, NULL_TREE, 0, 0);
finish_fat_pointer_type (gnu_fat_type, tem);
SET_TYPE_UNCONSTRAINED_ARRAY (gnu_fat_type, gnu_type);
}
@@ -3389,20 +3408,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
break;
}
- /* If this is a record subtype associated with a dispatch table,
- strip the suffix. This is necessary to make sure 2 different
- subtypes associated with the imported and exported views of a
- dispatch table are properly merged in LTO mode. */
- if (Is_Dispatch_Table_Entity (gnat_entity))
- {
- char *p;
- Get_Encoded_Name (gnat_entity);
- p = strchr (Name_Buffer, '_');
- gcc_assert (p);
- strcpy (p+2, "dtS");
- gnu_entity_name = get_identifier (Name_Buffer);
- }
-
/* When the subtype has discriminants and these discriminants affect
the initial shape it has inherited, factor them in. But for an
Unchecked_Union (it must be an Itype), just return the type.
@@ -4681,7 +4686,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
/* If this is not an unconstrained array type, set some flags. */
if (TREE_CODE (gnu_type) != UNCONSTRAINED_ARRAY_TYPE)
{
- /* Tell the middle-end that objects of tagged types are guaranteed to
+ /* Record the property that objects of tagged types are guaranteed to
be properly aligned. This is necessary because conversions to the
class-wide type are translated into conversions to the root type,
which can be less aligned than some of its derived types. */
@@ -5272,17 +5277,6 @@ gnat_to_gnu_component_type (Entity_Id gnat_array, bool definition,
Is_Bit_Packed_Array (gnat_array) ? TYPE_DECL : VAR_DECL,
true, Has_Component_Size_Clause (gnat_array));
- /* If the array has aliased components and the component size can be zero,
- force at least unit size to ensure that the components have distinct
- addresses. */
- if (!gnu_comp_size
- && Has_Aliased_Components (gnat_array)
- && (integer_zerop (TYPE_SIZE (gnu_type))
- || (TREE_CODE (gnu_type) == ARRAY_TYPE
- && !TREE_CONSTANT (TYPE_SIZE (gnu_type)))))
- gnu_comp_size
- = size_binop (MAX_EXPR, TYPE_SIZE (gnu_type), bitsize_unit_node);
-
/* If the component type is a RECORD_TYPE that has a self-referential size,
then use the maximum size for the component size. */
if (!gnu_comp_size
@@ -5290,6 +5284,13 @@ gnat_to_gnu_component_type (Entity_Id gnat_array, bool definition,
&& CONTAINS_PLACEHOLDER_P (TYPE_SIZE (gnu_type)))
gnu_comp_size = max_size (TYPE_SIZE (gnu_type), true);
+ /* If the array has aliased components and the component size is zero, force
+ the unit size to ensure that the components have distinct addresses. */
+ if (!gnu_comp_size
+ && Has_Aliased_Components (gnat_array)
+ && integer_zerop (TYPE_SIZE (gnu_type)))
+ gnu_comp_size = bitsize_unit_node;
+
/* Honor the component size. This is not needed for bit-packed arrays. */
if (gnu_comp_size && !Is_Bit_Packed_Array (gnat_array))
{
@@ -5312,6 +5313,30 @@ gnat_to_gnu_component_type (Entity_Id gnat_array, bool definition,
gnat_array);
}
+ /* This is a very special case where the array has aliased components and the
+ component size might be zero at run time. As explained above, we force at
+ least the unit size but we don't want to build a distinct padding type for
+ each invocation (they are not canonicalized if they have variable size) so
+ we cache this special padding type as TYPE_PADDING_FOR_COMPONENT. */
+ else if (Has_Aliased_Components (gnat_array)
+ && TREE_CODE (gnu_type) == ARRAY_TYPE
+ && !TREE_CONSTANT (TYPE_SIZE (gnu_type)))
+ {
+ if (TYPE_PADDING_FOR_COMPONENT (gnu_type))
+ gnu_type = TYPE_PADDING_FOR_COMPONENT (gnu_type);
+ else
+ {
+ gnu_comp_size
+ = size_binop (MAX_EXPR, TYPE_SIZE (gnu_type), bitsize_unit_node);
+ TYPE_PADDING_FOR_COMPONENT (gnu_type)
+ = maybe_pad_type (gnu_type, gnu_comp_size, 0, gnat_array,
+ true, false, definition, true);
+ gnu_type = TYPE_PADDING_FOR_COMPONENT (gnu_type);
+ create_type_decl (TYPE_NAME (gnu_type), gnu_type, true, debug_info_p,
+ gnat_array);
+ }
+ }
+
/* If the component type is a padded type made for a non-bit-packed array
of scalars with reverse storage order, we need to propagate the reverse
storage order to the padding type since it is the innermost enclosing
@@ -6276,19 +6301,6 @@ gnu_ext_name_for_subprog (Entity_Id gnat_subprog, tree gnu_entity_name)
return gnu_ext_name;
}
-/* Like build_qualified_type, but TYPE_QUALS is added to the existing
- qualifiers on TYPE. */
-
-static tree
-change_qualified_type (tree type, int type_quals)
-{
- /* Qualifiers must be put on the associated array type. */
- if (TREE_CODE (type) == UNCONSTRAINED_ARRAY_TYPE)
- return type;
-
- return build_qualified_type (type, TYPE_QUALS (type) | type_quals);
-}
-
/* Set TYPE_NONALIASED_COMPONENT on an array type built by means of
build_nonshared_array_type. */
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h
index 1d87b5be44e..2b33c13302c 100644
--- a/gcc/ada/gcc-interface/gigi.h
+++ b/gcc/ada/gcc-interface/gigi.h
@@ -1074,7 +1074,7 @@ maybe_vector_array (tree exp)
static inline unsigned HOST_WIDE_INT
ceil_pow2 (unsigned HOST_WIDE_INT x)
{
- return (unsigned HOST_WIDE_INT) 1 << (floor_log2 (x - 1) + 1);
+ return (unsigned HOST_WIDE_INT) 1 << ceil_log2 (x);
}
/* Return true if EXP, a CALL_EXPR, is an atomic load. */
@@ -1171,3 +1171,16 @@ maybe_debug_type (tree type)
return type;
}
+
+/* Like build_qualified_type, but TYPE_QUALS is added to the existing
+ qualifiers on TYPE. */
+
+static inline tree
+change_qualified_type (tree type, int type_quals)
+{
+ /* Qualifiers must be put on the associated array type. */
+ if (TREE_CODE (type) == UNCONSTRAINED_ARRAY_TYPE)
+ return type;
+
+ return build_qualified_type (type, TYPE_QUALS (type) | type_quals);
+}
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 1b6b3eb265a..11570f0987f 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -262,6 +262,9 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
/* No psABI change warnings for Ada. */
warn_psabi = 0;
+ /* No string overflow warnings for Ada. */
+ warn_stringop_overflow = 0;
+
/* No caret by default for Ada. */
if (!global_options_set.x_flag_diagnostics_show_caret)
global_dc->show_caret = false;
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index bef7f8121f3..47c8a286220 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -4059,6 +4059,8 @@ node_has_volatile_full_access (Node_Id gnat_node)
case N_Identifier:
case N_Expanded_Name:
gnat_entity = Entity (gnat_node);
+ if (!Is_Object (gnat_entity))
+ break;
return Is_Volatile_Full_Access (gnat_entity)
|| Is_Volatile_Full_Access (Etype (gnat_entity));
@@ -4324,12 +4326,15 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
because we need to preserve the return value before copying back the
parameters.
- 2. There is no target and the call is made for neither an object nor a
+ 2. There is no target and the call is made for neither an object, nor a
renaming declaration, nor a return statement, nor an allocator, and
the return type has variable size because in this case the gimplifier
- cannot create the temporary, or more generally is simply an aggregate
- type, because the gimplifier would then create the temporary in the
- outermost scope instead of locally.
+ cannot create the temporary, or more generally is an aggregate type,
+ because the gimplifier would create the temporary in the outermost
+ scope instead of locally. But there is an exception for an allocator
+ of an unconstrained record type with default discriminant because we
+ allocate the actual size in this case, unlike the other 3 cases, so
+ we need a temporary to fetch the discriminant and we create it here.
3. There is a target and it is a slice or an array with fixed size,
and the return type has variable size, because the gimplifier
@@ -4348,8 +4353,9 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
&& Nkind (Parent (gnat_node)) != N_Object_Declaration
&& Nkind (Parent (gnat_node)) != N_Object_Renaming_Declaration
&& Nkind (Parent (gnat_node)) != N_Simple_Return_Statement
- && !(Nkind (Parent (gnat_node)) == N_Qualified_Expression
- && Nkind (Parent (Parent (gnat_node))) == N_Allocator)
+ && (!(Nkind (Parent (gnat_node)) == N_Qualified_Expression
+ && Nkind (Parent (Parent (gnat_node))) == N_Allocator)
+ || type_is_padding_self_referential (gnu_result_type))
&& AGGREGATE_TYPE_P (gnu_result_type)
&& !TYPE_IS_FAT_POINTER_P (gnu_result_type))
|| (gnu_target
@@ -9272,7 +9278,7 @@ convert_with_check (Entity_Id gnat_type, tree gnu_expr, bool overflowp,
? tree_int_cst_lt (gnu_out_ub, gnu_in_ub)
: (FLOAT_TYPE_P (gnu_base_type)
? real_less (&TREE_REAL_CST (gnu_out_ub),
- &TREE_REAL_CST (gnu_in_lb))
+ &TREE_REAL_CST (gnu_in_ub))
: 1))
gnu_cond
= build_binary_op (TRUTH_ORIF_EXPR, boolean_type_node, gnu_cond,
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index f362946e63a..cb2c4d22a41 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -3255,8 +3255,11 @@ finish_subprog_decl (tree decl, tree asm_name, tree type)
DECL_BY_REFERENCE (result_decl) = TREE_ADDRESSABLE (type);
DECL_RESULT (decl) = result_decl;
+ /* Propagate the "const" property. */
TREE_READONLY (decl) = TYPE_READONLY (type);
- TREE_SIDE_EFFECTS (decl) = TREE_THIS_VOLATILE (decl) = TYPE_VOLATILE (type);
+
+ /* Propagate the "noreturn" property. */
+ TREE_THIS_VOLATILE (decl) = TYPE_VOLATILE (type);
if (asm_name)
{
@@ -4543,9 +4546,12 @@ convert (tree type, tree expr)
etype)))
return build1 (VIEW_CONVERT_EXPR, type, expr);
- /* If we are converting between tagged types, try to upcast properly. */
+ /* If we are converting between tagged types, try to upcast properly.
+ But don't do it if we are just annotating types since tagged types
+ aren't fully laid out in this mode. */
else if (ecode == RECORD_TYPE && code == RECORD_TYPE
- && TYPE_ALIGN_OK (etype) && TYPE_ALIGN_OK (type))
+ && TYPE_ALIGN_OK (etype) && TYPE_ALIGN_OK (type)
+ && !type_annotate_only)
{
tree child_etype = etype;
do {
@@ -6113,8 +6119,7 @@ handle_noreturn_attribute (tree *node, tree name, tree ARG_UNUSED (args),
&& TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
TREE_TYPE (*node)
= build_pointer_type
- (build_type_variant (TREE_TYPE (type),
- TYPE_READONLY (TREE_TYPE (type)), 1));
+ (change_qualified_type (TREE_TYPE (type), TYPE_QUAL_VOLATILE));
else
{
warning (OPT_Wattributes, "%qs attribute ignored",
diff --git a/gcc/alias.c b/gcc/alias.c
index e16e3501522..e6d67b1200c 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -2997,7 +2997,8 @@ write_dependence_p (const_rtx mem,
int ret;
gcc_checking_assert (x_canonicalized
- ? (x_addr != NULL_RTX && x_mode != VOIDmode)
+ ? (x_addr != NULL_RTX
+ && (x_mode != VOIDmode || GET_MODE (x) == VOIDmode))
: (x_addr == NULL_RTX && x_mode == VOIDmode));
if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem))
diff --git a/gcc/brig/ChangeLog b/gcc/brig/ChangeLog
index 0e5761be302..ec73d2d6f18 100644
--- a/gcc/brig/ChangeLog
+++ b/gcc/brig/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-04 Martin Jambor <mjambor@suse.cz>
+
+ PR hsa/86371
+ * Make-lang.in (BRIGINCLUDES): Remove erroneous include path in $HOME.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/gcc/brig/Make-lang.in b/gcc/brig/Make-lang.in
index d7566bfe365..0572f61e299 100644
--- a/gcc/brig/Make-lang.in
+++ b/gcc/brig/Make-lang.in
@@ -235,8 +235,7 @@ brig.stagefeedback: stagefeedback-start
CFLAGS-brig/brig-lang.o += -DDEFAULT_TARGET_VERSION=\"$(version)\" \
-DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\"
-BRIGINCLUDES = -I $(srcdir)/brig -I ${HOME}/local/include \
- -I $(srcdir)/brig/brigfrontend
+BRIGINCLUDES = -I $(srcdir)/brig -I $(srcdir)/brig/brigfrontend
brig/brig-machine.o: brig/brigfrontend/brig-machine.c
$(COMPILE) $(BRIGINCLUDES) $<
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 75342b786de..767093f539f 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -9270,7 +9270,7 @@ fold_builtin_strpbrk (location_t loc, tree s1, tree s2, tree type)
if (p2[0] == '\0')
/* strpbrk(x, "") == NULL.
Evaluate and ignore s1 in case it had side-effects. */
- return omit_one_operand_loc (loc, TREE_TYPE (s1), integer_zero_node, s1);
+ return omit_one_operand_loc (loc, type, integer_zero_node, s1);
if (p2[1] != '\0')
return NULL_TREE; /* Really call strpbrk. */
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 7a83a0a9062..a3e153a13db 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,44 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-06-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/86210
+ * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
+ comment.
+
+ 2018-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/85696
+ * c-omp.c (c_omp_predetermined_sharing): Return
+ OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
+
+ 2018-05-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85662
+ * c-common.h (fold_offsetof_1): Removed.
+ (fold_offsetof): Add TYPE argument defaulted to size_type_node and
+ CTX argument defaulted to ERROR_MARK.
+ * c-common.c (fold_offsetof_1): Renamed to ...
+ (fold_offsetof): ... this. Remove wrapper function. Add TYPE
+ argument, convert the pointer constant to TYPE and use size_binop
+ with PLUS_EXPR instead of fold_build_pointer_plus if type is not
+ a pointer type. Adjust recursive calls.
+
+2018-04-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-03-16 Richard Biener <rguenther@suse.de>
+
+ PR c/84873
+ * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
+ unshare the possibly folded expression.
+
+ 2018-03-15 Richard Biener <rguenther@suse.de>
+
+ PR c/84873
+ * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
+
2018-03-03 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index e272488b39b..45be4bd1cbe 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -5434,10 +5434,8 @@ check_nonnull_arg (void *ctx, tree param, unsigned HOST_WIDE_INT param_num)
if (TREE_CODE (TREE_TYPE (param)) != POINTER_TYPE)
return;
- /* When not optimizing diagnose the simple cases of null arguments.
- When optimization is enabled defer the checking until expansion
- when more cases can be detected. */
- if (integer_zerop (param))
+ /* Diagnose the simple cases of null arguments. */
+ if (integer_zerop (fold_for_warn (param)))
{
warning_at (pctx->loc, OPT_Wnonnull, "null argument where non-null "
"required (argument %lu)", (unsigned long) param_num);
@@ -6253,10 +6251,11 @@ c_common_to_target_charset (HOST_WIDE_INT c)
/* Fold an offsetof-like expression. EXPR is a nested sequence of component
references with an INDIRECT_REF of a constant at the bottom; much like the
- traditional rendering of offsetof as a macro. Return the folded result. */
+ traditional rendering of offsetof as a macro. TYPE is the desired type of
+ the whole expression. Return the folded result. */
tree
-fold_offsetof_1 (tree expr, enum tree_code ctx)
+fold_offsetof (tree expr, tree type, enum tree_code ctx)
{
tree base, off, t;
tree_code code = TREE_CODE (expr);
@@ -6281,10 +6280,10 @@ fold_offsetof_1 (tree expr, enum tree_code ctx)
error ("cannot apply %<offsetof%> to a non constant address");
return error_mark_node;
}
- return TREE_OPERAND (expr, 0);
+ return convert (type, TREE_OPERAND (expr, 0));
case COMPONENT_REF:
- base = fold_offsetof_1 (TREE_OPERAND (expr, 0), code);
+ base = fold_offsetof (TREE_OPERAND (expr, 0), type, code);
if (base == error_mark_node)
return base;
@@ -6301,7 +6300,7 @@ fold_offsetof_1 (tree expr, enum tree_code ctx)
break;
case ARRAY_REF:
- base = fold_offsetof_1 (TREE_OPERAND (expr, 0), code);
+ base = fold_offsetof (TREE_OPERAND (expr, 0), type, code);
if (base == error_mark_node)
return base;
@@ -6358,23 +6357,16 @@ fold_offsetof_1 (tree expr, enum tree_code ctx)
/* Handle static members of volatile structs. */
t = TREE_OPERAND (expr, 1);
gcc_assert (VAR_P (t));
- return fold_offsetof_1 (t);
+ return fold_offsetof (t, type);
default:
gcc_unreachable ();
}
+ if (!POINTER_TYPE_P (type))
+ return size_binop (PLUS_EXPR, base, convert (type, off));
return fold_build_pointer_plus (base, off);
}
-
-/* Likewise, but convert it to the return type of offsetof. */
-
-tree
-fold_offsetof (tree expr)
-{
- return convert (size_type_node, fold_offsetof_1 (expr));
-}
-
/* *PTYPE is an incomplete array. Complete it with a domain based on
INITIAL_VALUE. If INITIAL_VALUE is not present, use 1 if DO_DEFAULT
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index b9333420434..0cff4414294 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -1053,8 +1053,8 @@ extern bool c_dump_tree (void *, tree);
extern void verify_sequence_points (tree);
-extern tree fold_offsetof_1 (tree, tree_code ctx = ERROR_MARK);
-extern tree fold_offsetof (tree);
+extern tree fold_offsetof (tree, tree = size_type_node,
+ tree_code ctx = ERROR_MARK);
extern int complete_array_type (tree *, tree, bool);
diff --git a/gcc/c-family/c-gimplify.c b/gcc/c-family/c-gimplify.c
index 57edb41af0f..deecb1a3e4a 100644
--- a/gcc/c-family/c-gimplify.c
+++ b/gcc/c-family/c-gimplify.c
@@ -244,7 +244,9 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
unsigned_type_node)
&& !types_compatible_p (TYPE_MAIN_VARIANT (TREE_TYPE (*op1_p)),
integer_type_node))
- *op1_p = convert (unsigned_type_node, *op1_p);
+ /* Make sure to unshare the result, tree sharing is invalid
+ during gimplification. */
+ *op1_p = unshare_expr (convert (unsigned_type_node, *op1_p));
break;
}
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index 977cb0ea153..eee718ddce1 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -1540,5 +1540,13 @@ c_omp_predetermined_sharing (tree decl)
if (TREE_READONLY (decl))
return OMP_CLAUSE_DEFAULT_SHARED;
+ /* Predetermine artificial variables holding integral values, those
+ are usually result of gimplify_one_sizepos or SAVE_EXPR
+ gimplification. */
+ if (VAR_P (decl)
+ && DECL_ARTIFICIAL (decl)
+ && INTEGRAL_TYPE_P (TREE_TYPE (decl)))
+ return OMP_CLAUSE_DEFAULT_SHARED;
+
return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
}
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index b48e7cb422e..35f93f6ef3e 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,35 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/85696
+ * c-typeck.c (c_finish_omp_clauses): Don't use
+ c_omp_predetermined_sharing, instead just check TREE_READONLY.
+
+ 2018-05-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85662
+ * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
+ fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
+ fold_convert_loc.
+ * c-typeck.c (build_unary_op): Use fold_offsetof rather than
+ fold_offsetof_1, pass argtype as TYPE to it and drop the
+ fold_convert_loc.
+
+ 2018-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/84999
+ * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
+ building vector comparison, diagnose it and return error_mark_node.
+
+ 2018-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/84853
+ * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
+ If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
+ INTEGER_TYPE element type.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/gcc/c/c-fold.c b/gcc/c/c-fold.c
index b060d76da43..96c041e265d 100644
--- a/gcc/c/c-fold.c
+++ b/gcc/c/c-fold.c
@@ -403,7 +403,7 @@ c_fully_fold_internal (tree expr, bool in_init, bool *maybe_const_operands,
&& (op1 = get_base_address (op0)) != NULL_TREE
&& INDIRECT_REF_P (op1)
&& TREE_CONSTANT (TREE_OPERAND (op1, 0)))
- ret = fold_convert_loc (loc, TREE_TYPE (expr), fold_offsetof_1 (op0));
+ ret = fold_offsetof (op0, TREE_TYPE (expr));
else if (op0 != orig_op0 || in_init)
ret = in_init
? fold_build1_initializer_loc (loc, code, TREE_TYPE (expr), op0)
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index ee365313c81..66a58a81e71 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -4638,7 +4638,7 @@ build_unary_op (location_t location, enum tree_code code, tree xarg,
if (val && INDIRECT_REF_P (val)
&& TREE_CONSTANT (TREE_OPERAND (val, 0)))
{
- ret = fold_convert_loc (location, argtype, fold_offsetof_1 (arg));
+ ret = fold_offsetof (arg, argtype);
goto return_build_unary_op;
}
@@ -11150,7 +11150,8 @@ build_binary_op (location_t location, enum tree_code code,
converted = 1;
}
else if ((code0 == INTEGER_TYPE || code0 == FIXED_POINT_TYPE
- || code0 == VECTOR_TYPE)
+ || (code0 == VECTOR_TYPE
+ && TREE_CODE (TREE_TYPE (type0)) == INTEGER_TYPE))
&& code1 == INTEGER_TYPE)
{
doing_shift = true;
@@ -11207,7 +11208,8 @@ build_binary_op (location_t location, enum tree_code code,
converted = 1;
}
else if ((code0 == INTEGER_TYPE || code0 == FIXED_POINT_TYPE
- || code0 == VECTOR_TYPE)
+ || (code0 == VECTOR_TYPE
+ && TREE_CODE (TREE_TYPE (type0)) == INTEGER_TYPE))
&& code1 == INTEGER_TYPE)
{
doing_shift = true;
@@ -11299,6 +11301,13 @@ build_binary_op (location_t location, enum tree_code code,
/* Always construct signed integer vector type. */
intt = c_common_type_for_size (GET_MODE_BITSIZE
(TYPE_MODE (TREE_TYPE (type0))), 0);
+ if (!intt)
+ {
+ error_at (location, "could not find an integer type "
+ "of the same size as %qT",
+ TREE_TYPE (type0));
+ return error_mark_node;
+ }
result_type = build_opaque_vector_type (intt,
TYPE_VECTOR_SUBPARTS (type0));
converted = 1;
@@ -11458,6 +11467,13 @@ build_binary_op (location_t location, enum tree_code code,
/* Always construct signed integer vector type. */
intt = c_common_type_for_size (GET_MODE_BITSIZE
(TYPE_MODE (TREE_TYPE (type0))), 0);
+ if (!intt)
+ {
+ error_at (location, "could not find an integer type "
+ "of the same size as %qT",
+ TREE_TYPE (type0));
+ return error_mark_node;
+ }
result_type = build_opaque_vector_type (intt,
TYPE_VECTOR_SUBPARTS (type0));
converted = 1;
@@ -13744,22 +13760,11 @@ c_finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
if (VAR_P (t) && DECL_THREAD_LOCAL_P (t))
share_name = "threadprivate";
- else switch (c_omp_predetermined_sharing (t))
+ else if (TREE_READONLY (t))
{
- case OMP_CLAUSE_DEFAULT_UNSPECIFIED:
- break;
- case OMP_CLAUSE_DEFAULT_SHARED:
/* const vars may be specified in firstprivate clause. */
- if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_FIRSTPRIVATE
- && TREE_READONLY (t))
- break;
- share_name = "shared";
- break;
- case OMP_CLAUSE_DEFAULT_PRIVATE:
- share_name = "private";
- break;
- default:
- gcc_unreachable ();
+ if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_FIRSTPRIVATE)
+ share_name = "shared";
}
if (share_name)
{
diff --git a/gcc/calls.c b/gcc/calls.c
index b183be63dd4..8eec155cf7d 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1196,65 +1196,79 @@ static GTY(()) tree alloc_object_size_limit;
static tree
alloc_max_size (void)
{
- if (!alloc_object_size_limit)
- {
- alloc_object_size_limit = TYPE_MAX_VALUE (ssizetype);
+ if (alloc_object_size_limit)
+ return alloc_object_size_limit;
- if (warn_alloc_size_limit)
- {
- char *end = NULL;
- errno = 0;
- unsigned HOST_WIDE_INT unit = 1;
- unsigned HOST_WIDE_INT limit
- = strtoull (warn_alloc_size_limit, &end, 10);
+ alloc_object_size_limit = TYPE_MAX_VALUE (ssizetype);
- if (!errno)
- {
- if (end && *end)
- {
- /* Numeric option arguments are at most INT_MAX. Make it
- possible to specify a larger value by accepting common
- suffixes. */
- if (!strcmp (end, "kB"))
- unit = 1000;
- else if (!strcasecmp (end, "KiB") || strcmp (end, "KB"))
- unit = 1024;
- else if (!strcmp (end, "MB"))
- unit = HOST_WIDE_INT_UC (1000) * 1000;
- else if (!strcasecmp (end, "MiB"))
- unit = HOST_WIDE_INT_UC (1024) * 1024;
- else if (!strcasecmp (end, "GB"))
- unit = HOST_WIDE_INT_UC (1000) * 1000 * 1000;
- else if (!strcasecmp (end, "GiB"))
- unit = HOST_WIDE_INT_UC (1024) * 1024 * 1024;
- else if (!strcasecmp (end, "TB"))
- unit = HOST_WIDE_INT_UC (1000) * 1000 * 1000 * 1000;
- else if (!strcasecmp (end, "TiB"))
- unit = HOST_WIDE_INT_UC (1024) * 1024 * 1024 * 1024;
- else if (!strcasecmp (end, "PB"))
- unit = HOST_WIDE_INT_UC (1000) * 1000 * 1000 * 1000 * 1000;
- else if (!strcasecmp (end, "PiB"))
- unit = HOST_WIDE_INT_UC (1024) * 1024 * 1024 * 1024 * 1024;
- else if (!strcasecmp (end, "EB"))
- unit = HOST_WIDE_INT_UC (1000) * 1000 * 1000 * 1000 * 1000
- * 1000;
- else if (!strcasecmp (end, "EiB"))
- unit = HOST_WIDE_INT_UC (1024) * 1024 * 1024 * 1024 * 1024
- * 1024;
- else
- unit = 0;
- }
+ if (!warn_alloc_size_limit)
+ return alloc_object_size_limit;
- if (unit)
- {
- wide_int w = wi::uhwi (limit, HOST_BITS_PER_WIDE_INT + 64);
- w *= unit;
- if (wi::ltu_p (w, alloc_object_size_limit))
- alloc_object_size_limit = wide_int_to_tree (ssizetype, w);
- }
- }
+ const char *optname = "-Walloc-size-larger-than=";
+
+ char *end = NULL;
+ errno = 0;
+ unsigned HOST_WIDE_INT unit = 1;
+ unsigned HOST_WIDE_INT limit
+ = strtoull (warn_alloc_size_limit, &end, 10);
+
+ /* If the value is too large to be represented use the maximum
+ representable value that strtoull sets limit to (setting
+ errno to ERANGE). */
+
+ if (end && *end)
+ {
+ /* Numeric option arguments are at most INT_MAX. Make it
+ possible to specify a larger value by accepting common
+ suffixes. */
+ if (!strcmp (end, "kB"))
+ unit = 1000;
+ else if (!strcasecmp (end, "KiB") || !strcmp (end, "KB"))
+ unit = 1024;
+ else if (!strcmp (end, "MB"))
+ unit = HOST_WIDE_INT_UC (1000) * 1000;
+ else if (!strcasecmp (end, "MiB"))
+ unit = HOST_WIDE_INT_UC (1024) * 1024;
+ else if (!strcasecmp (end, "GB"))
+ unit = HOST_WIDE_INT_UC (1000) * 1000 * 1000;
+ else if (!strcasecmp (end, "GiB"))
+ unit = HOST_WIDE_INT_UC (1024) * 1024 * 1024;
+ else if (!strcasecmp (end, "TB"))
+ unit = HOST_WIDE_INT_UC (1000) * 1000 * 1000 * 1000;
+ else if (!strcasecmp (end, "TiB"))
+ unit = HOST_WIDE_INT_UC (1024) * 1024 * 1024 * 1024;
+ else if (!strcasecmp (end, "PB"))
+ unit = HOST_WIDE_INT_UC (1000) * 1000 * 1000 * 1000 * 1000;
+ else if (!strcasecmp (end, "PiB"))
+ unit = HOST_WIDE_INT_UC (1024) * 1024 * 1024 * 1024 * 1024;
+ else if (!strcasecmp (end, "EB"))
+ unit = HOST_WIDE_INT_UC (1000) * 1000 * 1000 * 1000 * 1000
+ * 1000;
+ else if (!strcasecmp (end, "EiB"))
+ unit = HOST_WIDE_INT_UC (1024) * 1024 * 1024 * 1024 * 1024
+ * 1024;
+ else
+ {
+ /* This could mean an unknown suffix or a bad prefix, like
+ "+-1". */
+ warning_at (UNKNOWN_LOCATION, 0,
+ "invalid argument %qs to %qs",
+ warn_alloc_size_limit, optname);
+ /* Ignore the limit extracted by strtoull. */
+ unit = 0;
}
}
+
+ if (unit)
+ {
+ widest_int w = wi::mul (limit, unit);
+ if (w < wi::to_widest (alloc_object_size_limit))
+ alloc_object_size_limit
+ = wide_int_to_tree (ptrdiff_type_node, w);
+ else
+ alloc_object_size_limit = build_all_ones_cst (size_type_node);
+ }
+
return alloc_object_size_limit;
}
@@ -3133,9 +3147,14 @@ expand_call (tree exp, rtx target, int ignore)
if (CALL_EXPR_RETURN_SLOT_OPT (exp)
&& target
&& MEM_P (target)
- && !(MEM_ALIGN (target) < TYPE_ALIGN (rettype)
- && SLOW_UNALIGNED_ACCESS (TYPE_MODE (rettype),
- MEM_ALIGN (target))))
+ /* If rettype is addressable, we may not create a temporary.
+ If target is properly aligned at runtime and the compiler
+ just doesn't know about it, it will work fine, otherwise it
+ will be UB. */
+ && (TREE_ADDRESSABLE (rettype)
+ || !(MEM_ALIGN (target) < TYPE_ALIGN (rettype)
+ && SLOW_UNALIGNED_ACCESS (TYPE_MODE (rettype),
+ MEM_ALIGN (target)))))
structure_value_addr = XEXP (target, 0);
else
{
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 66af69973c6..e15013b1149 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -2997,14 +2997,14 @@ expand_asm_stmt (gasm *stmt)
generating_concat_p = 0;
- if ((TREE_CODE (val) == INDIRECT_REF
- && allows_mem)
+ if ((TREE_CODE (val) == INDIRECT_REF && allows_mem)
|| (DECL_P (val)
&& (allows_mem || REG_P (DECL_RTL (val)))
&& ! (REG_P (DECL_RTL (val))
&& GET_MODE (DECL_RTL (val)) != TYPE_MODE (type)))
|| ! allows_reg
- || is_inout)
+ || is_inout
+ || TREE_ADDRESSABLE (type))
{
op = expand_expr (val, NULL_RTX, VOIDmode,
!allows_reg ? EXPAND_MEMORY : EXPAND_WRITE);
@@ -3013,7 +3013,7 @@ expand_asm_stmt (gasm *stmt)
if (! allows_reg && !MEM_P (op))
error ("output number %d not directly addressable", i);
- if ((! allows_mem && MEM_P (op))
+ if ((! allows_mem && MEM_P (op) && GET_MODE (op) != BLKmode)
|| GET_CODE (op) == CONCAT)
{
rtx old_op = op;
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index be4eaee71e2..ee053885442 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -321,6 +321,9 @@ public:
or abstract function kept for debug info purposes only. */
bool real_symbol_p (void);
+ /* Return true when the symbol needs to be output to the LTO symbol table. */
+ bool output_to_lto_symbol_table_p (void);
+
/* Determine if symbol declaration is needed. That is, visible to something
either outside this translation unit, something magic in the system
configury. This function is used just during symbol creation. */
diff --git a/gcc/collect2.c b/gcc/collect2.c
index ddbd2be8bf8..319fcb31e3f 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -1,6 +1,6 @@
/* Collect static initialization info into data structures that can be
traversed by C++ initialization and finalization routines.
- Copyright (C) 1992-2017 Free Software Foundation, Inc.
+ Copyright (C) 1992-2018 Free Software Foundation, Inc.
Contributed by Chris Smith (csmith@convex.com).
Heavily modified by Michael Meissner (meissner@cygnus.com),
Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com).
@@ -201,6 +201,7 @@ static enum lto_mode_d lto_mode = LTO_MODE_NONE;
bool helpflag; /* true if --help */
static int shared_obj; /* true if -shared */
+static int static_obj; /* true if -static */
static const char *c_file; /* <xxx>.c for constructor/destructor list. */
static const char *o_file; /* <xxx>.o for constructor/destructor list. */
@@ -255,6 +256,7 @@ bool may_unlink_output_file = false;
#ifdef COLLECT_EXPORT_LIST
/* Lists to keep libraries to be scanned for global constructors/destructors. */
static struct head libs; /* list of libraries */
+static struct head static_libs; /* list of statically linked libraries */
static struct path_prefix cmdline_lib_dirs; /* directories specified with -L */
static struct path_prefix libpath_lib_dirs; /* directories in LIBPATH */
static struct path_prefix *libpaths[3] = {&cmdline_lib_dirs,
@@ -320,9 +322,7 @@ static void write_c_file_glob (FILE *, const char *);
static void scan_libraries (const char *);
#endif
#ifdef COLLECT_EXPORT_LIST
-#if 0
static int is_in_list (const char *, struct id *);
-#endif
static void write_aix_file (FILE *, struct id *);
static char *resolve_lib_name (const char *);
#endif
@@ -911,6 +911,9 @@ main (int argc, char **argv)
int first_file;
int num_c_args;
char **old_argv;
+#ifdef COLLECT_EXPORT_LIST
+ bool is_static = false;
+#endif
int i;
for (i = 0; i < USE_LD_MAX; i++)
@@ -1241,6 +1244,8 @@ main (int argc, char **argv)
*c_ptr++ = xstrdup (q);
if (strcmp (q, "-shared") == 0)
shared_obj = 1;
+ if (strcmp (q, "-static") == 0)
+ static_obj = 1;
if (*q == '-' && q[1] == 'B')
{
*c_ptr++ = xstrdup (q);
@@ -1269,6 +1274,9 @@ main (int argc, char **argv)
/* Parse arguments. Remember output file spec, pass the rest to ld. */
/* After the first file, put in the c++ rt0. */
+#ifdef COLLECT_EXPORT_LIST
+ is_static = static_obj;
+#endif
first_file = 1;
while ((arg = *++argv) != (char *) 0)
{
@@ -1374,6 +1382,18 @@ main (int argc, char **argv)
#endif
break;
+#ifdef COLLECT_EXPORT_LIST
+ case 'b':
+ if (!strcmp (arg, "-bstatic"))
+ {
+ is_static = true;
+ }
+ else if (!strcmp (arg, "-bdynamic") || !strcmp (arg, "-bshared"))
+ {
+ is_static = false;
+ }
+ break;
+#endif
case 'l':
if (first_file)
{
@@ -1390,6 +1410,8 @@ main (int argc, char **argv)
/* Saving a full library name. */
add_to_list (&libs, s);
+ if (is_static)
+ add_to_list (&static_libs, s);
}
#endif
break;
@@ -1490,6 +1512,8 @@ main (int argc, char **argv)
{
/* Saving a full library name. */
add_to_list (&libs, arg);
+ if (is_static)
+ add_to_list (&static_libs, arg);
}
#endif
}
@@ -1501,6 +1525,8 @@ main (int argc, char **argv)
{
fprintf (stderr, "List of libraries:\n");
dump_list (stderr, "\t", libs.first);
+ fprintf (stderr, "List of statically linked libraries:\n");
+ dump_list (stderr, "\t", static_libs.first);
}
/* The AIX linker will discard static constructors in object files if
@@ -1525,9 +1551,11 @@ main (int argc, char **argv)
this_filter &= ~SCAN_DWEH;
#endif
+ /* Scan object files. */
while (export_object_lst < object)
scan_prog_file (*export_object_lst++, PASS_OBJ, this_filter);
+ /* Scan libraries. */
for (; list; list = list->next)
scan_prog_file (list->name, PASS_FIRST, this_filter);
@@ -1975,7 +2003,6 @@ write_list (FILE *stream, const char *prefix, struct id *list)
#ifdef COLLECT_EXPORT_LIST
/* This function is really used only on AIX, but may be useful. */
-#if 0
static int
is_in_list (const char *prefix, struct id *list)
{
@@ -1986,7 +2013,6 @@ is_in_list (const char *prefix, struct id *list)
}
return 0;
}
-#endif
#endif /* COLLECT_EXPORT_LIST */
/* Added for debugging purpose. */
@@ -2815,7 +2841,12 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
case SYM_AIXI:
if (! (filter & SCAN_CTOR))
break;
- if (is_shared && !aixlazy_flag)
+ if (is_shared && !aixlazy_flag
+#ifdef COLLECT_EXPORT_LIST
+ && ! static_obj
+ && ! is_in_list (prog_name, static_libs.first)
+#endif
+ )
add_to_list (&constructors, name);
break;
diff --git a/gcc/combine.c b/gcc/combine.c
index 064e4f97d01..81c40d84fa9 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5482,11 +5482,15 @@ subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy)
x = gen_rtx_CLOBBER (mode, const0_rtx);
}
else if (CONST_SCALAR_INT_P (new_rtx)
- && GET_CODE (x) == ZERO_EXTEND)
+ && (GET_CODE (x) == ZERO_EXTEND
+ || GET_CODE (x) == FLOAT
+ || GET_CODE (x) == UNSIGNED_FLOAT))
{
- x = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x),
- new_rtx, GET_MODE (XEXP (x, 0)));
- gcc_assert (x);
+ x = simplify_unary_operation (GET_CODE (x), GET_MODE (x),
+ new_rtx,
+ GET_MODE (XEXP (x, 0)));
+ if (!x)
+ return gen_rtx_CLOBBER (VOIDmode, const0_rtx);
}
else
SUBST (XEXP (x, i), new_rtx);
@@ -5637,7 +5641,11 @@ combine_simplify_rtx (rtx x, machine_mode op0_mode, int in_dest,
/* If everything is a comparison, what we have is highly unlikely
to be simpler, so don't use it. */
&& ! (COMPARISON_P (x)
- && (COMPARISON_P (true_rtx) || COMPARISON_P (false_rtx))))
+ && (COMPARISON_P (true_rtx) || COMPARISON_P (false_rtx)))
+ /* Similarly, if we end up with one of the expressions the same
+ as the original, it is certainly not simpler. */
+ && ! rtx_equal_p (x, true_rtx)
+ && ! rtx_equal_p (x, false_rtx))
{
rtx cop1 = const0_rtx;
enum rtx_code cond_code = simplify_comparison (NE, &cond, &cop1);
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 6e75bd45fb9..3e41aa5b764 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1461,7 +1461,7 @@ x86_64-*-elf*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
;;
x86_64-*-rtems*)
- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rtemself.h"
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rtemself.h rtems.h"
;;
i[34567]86-*-rdos*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
@@ -2046,10 +2046,17 @@ riscv*-*-linux*)
;;
riscv*-*-elf* | riscv*-*-rtems*)
tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h"
- case "x${enable_multilib}" in
- xno) ;;
- xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;;
- *) echo "Unknown value for enable_multilib"; exit 1
+ case ${target} in
+ *-*-rtems*)
+ tm_file="${tm_file} rtems.h riscv/rtems.h"
+ tmake_file="${tmake_file} riscv/t-rtems"
+ ;;
+ *)
+ case "x${enable_multilib}" in
+ xno) ;;
+ xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;;
+ *) echo "Unknown value for enable_multilib"; exit 1
+ esac
esac
tmake_file="${tmake_file} riscv/t-riscv"
gnu_ld=yes
@@ -2057,11 +2064,6 @@ riscv*-*-elf* | riscv*-*-rtems*)
# Force .init_array support. The configure script cannot always
# automatically detect that GAS supports it, yet we require it.
gcc_cv_initfini_array=yes
- case ${target} in
- riscv*-*-rtems*)
- tm_file="${tm_file} rtems.h riscv/rtems.h"
- ;;
- esac
;;
mips*-*-netbsd*) # NetBSD/mips, either endian.
target_cpu_default="MASK_ABICALLS"
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
index 1e0a346e553..9ddf43eda5e 100644
--- a/gcc/config/aarch64/aarch64-simd.md
+++ b/gcc/config/aarch64/aarch64-simd.md
@@ -2462,10 +2462,10 @@
break;
}
/* Fall through. */
- case UNGE:
+ case UNLT:
std::swap (operands[2], operands[3]);
/* Fall through. */
- case UNLE:
+ case UNGT:
case GT:
comparison = gen_aarch64_cmgt<mode>;
break;
@@ -2476,10 +2476,10 @@
break;
}
/* Fall through. */
- case UNGT:
+ case UNLE:
std::swap (operands[2], operands[3]);
/* Fall through. */
- case UNLT:
+ case UNGE:
case GE:
comparison = gen_aarch64_cmge<mode>;
break;
@@ -2502,21 +2502,35 @@
case UNGT:
case UNLE:
case UNLT:
- case NE:
- /* FCM returns false for lanes which are unordered, so if we use
- the inverse of the comparison we actually want to emit, then
- invert the result, we will end up with the correct result.
- Note that a NE NaN and NaN NE b are true for all a, b.
-
- Our transformations are:
- a UNGE b -> !(b GT a)
- a UNGT b -> !(b GE a)
- a UNLE b -> !(a GT b)
- a UNLT b -> !(a GE b)
- a NE b -> !(a EQ b) */
- gcc_assert (comparison != NULL);
- emit_insn (comparison (operands[0], operands[2], operands[3]));
- emit_insn (gen_one_cmpl<v_cmp_result>2 (operands[0], operands[0]));
+ {
+ /* All of the above must not raise any FP exceptions. Thus we first
+ check each operand for NaNs and force any elements containing NaN to
+ zero before using them in the compare.
+ Example: UN<cc> (a, b) -> UNORDERED (a, b) |
+ (cm<cc> (isnan (a) ? 0.0 : a,
+ isnan (b) ? 0.0 : b))
+ We use the following transformations for doing the comparisions:
+ a UNGE b -> a GE b
+ a UNGT b -> a GT b
+ a UNLE b -> b GE a
+ a UNLT b -> b GT a. */
+
+ rtx tmp0 = gen_reg_rtx (<V_cmp_result>mode);
+ rtx tmp1 = gen_reg_rtx (<V_cmp_result>mode);
+ rtx tmp2 = gen_reg_rtx (<V_cmp_result>mode);
+ emit_insn (gen_aarch64_cmeq<mode> (tmp0, operands[2], operands[2]));
+ emit_insn (gen_aarch64_cmeq<mode> (tmp1, operands[3], operands[3]));
+ emit_insn (gen_and<v_cmp_result>3 (tmp2, tmp0, tmp1));
+ emit_insn (gen_and<v_cmp_result>3 (tmp0, tmp0,
+ lowpart_subreg (<V_cmp_result>mode, operands[2], <MODE>mode)));
+ emit_insn (gen_and<v_cmp_result>3 (tmp1, tmp1,
+ lowpart_subreg (<V_cmp_result>mode, operands[3], <MODE>mode)));
+ gcc_assert (comparison != NULL);
+ emit_insn (comparison (operands[0],
+ lowpart_subreg (<MODE>mode, tmp0, <V_cmp_result>mode),
+ lowpart_subreg (<MODE>mode, tmp1, <V_cmp_result>mode)));
+ emit_insn (gen_orn<v_cmp_result>3 (operands[0], tmp2, operands[0]));
+ }
break;
case LT:
@@ -2524,25 +2538,19 @@
case GT:
case GE:
case EQ:
+ case NE:
/* The easy case. Here we emit one of FCMGE, FCMGT or FCMEQ.
As a LT b <=> b GE a && a LE b <=> b GT a. Our transformations are:
a GE b -> a GE b
a GT b -> a GT b
a LE b -> b GE a
a LT b -> b GT a
- a EQ b -> a EQ b */
+ a EQ b -> a EQ b
+ a NE b -> ~(a EQ b) */
gcc_assert (comparison != NULL);
emit_insn (comparison (operands[0], operands[2], operands[3]));
- break;
-
- case UNEQ:
- /* We first check (a > b || b > a) which is !UNEQ, inverting
- this result will then give us (a == b || a UNORDERED b). */
- emit_insn (gen_aarch64_cmgt<mode> (operands[0],
- operands[2], operands[3]));
- emit_insn (gen_aarch64_cmgt<mode> (tmp, operands[3], operands[2]));
- emit_insn (gen_ior<v_cmp_result>3 (operands[0], operands[0], tmp));
- emit_insn (gen_one_cmpl<v_cmp_result>2 (operands[0], operands[0]));
+ if (code == NE)
+ emit_insn (gen_one_cmpl<v_cmp_result>2 (operands[0], operands[0]));
break;
case LTGT:
@@ -2554,21 +2562,22 @@
emit_insn (gen_ior<v_cmp_result>3 (operands[0], operands[0], tmp));
break;
- case UNORDERED:
- /* Operands are ORDERED iff (a > b || b >= a), so we can compute
- UNORDERED as !ORDERED. */
- emit_insn (gen_aarch64_cmgt<mode> (tmp, operands[2], operands[3]));
- emit_insn (gen_aarch64_cmge<mode> (operands[0],
- operands[3], operands[2]));
- emit_insn (gen_ior<v_cmp_result>3 (operands[0], operands[0], tmp));
- emit_insn (gen_one_cmpl<v_cmp_result>2 (operands[0], operands[0]));
- break;
-
case ORDERED:
- emit_insn (gen_aarch64_cmgt<mode> (tmp, operands[2], operands[3]));
- emit_insn (gen_aarch64_cmge<mode> (operands[0],
- operands[3], operands[2]));
- emit_insn (gen_ior<v_cmp_result>3 (operands[0], operands[0], tmp));
+ case UNORDERED:
+ case UNEQ:
+ /* cmeq (a, a) & cmeq (b, b). */
+ emit_insn (gen_aarch64_cmeq<mode> (operands[0],
+ operands[2], operands[2]));
+ emit_insn (gen_aarch64_cmeq<mode> (tmp, operands[3], operands[3]));
+ emit_insn (gen_and<v_cmp_result>3 (operands[0], operands[0], tmp));
+
+ if (code == UNORDERED)
+ emit_insn (gen_one_cmpl<v_cmp_result>2 (operands[0], operands[0]));
+ else if (code == UNEQ)
+ {
+ emit_insn (gen_aarch64_cmeq<mode> (tmp, operands[2], operands[3]));
+ emit_insn (gen_orn<v_cmp_result>3 (operands[0], operands[0], tmp));
+ }
break;
default:
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 2bd3c5e069f..974f0f8b1a3 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -8610,17 +8610,6 @@ aarch64_override_options_after_change_1 (struct gcc_options *opts)
if (opts->x_pcrelative_literal_loads == 1)
aarch64_pcrelative_literal_loads = true;
- /* This is PR70113. When building the Linux kernel with
- CONFIG_ARM64_ERRATUM_843419, support for relocations
- R_AARCH64_ADR_PREL_PG_HI21 and R_AARCH64_ADR_PREL_PG_HI21_NC is
- removed from the kernel to avoid loading objects with possibly
- offending sequences. Without -mpc-relative-literal-loads we would
- generate such relocations, preventing the kernel build from
- succeeding. */
- if (opts->x_pcrelative_literal_loads == 2
- && TARGET_FIX_ERR_A53_843419)
- aarch64_pcrelative_literal_loads = true;
-
/* In the tiny memory model it makes no sense to disallow PC relative
literal pool loads. */
if (aarch64_cmodel == AARCH64_CMODEL_TINY
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 51368e29f2d..4c4e144587e 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -3093,7 +3093,8 @@
(define_insn_and_split "*compare_cstore<mode>_insn"
[(set (match_operand:GPI 0 "register_operand" "=r")
(EQL:GPI (match_operand:GPI 1 "register_operand" "r")
- (match_operand:GPI 2 "aarch64_imm24" "n")))]
+ (match_operand:GPI 2 "aarch64_imm24" "n")))
+ (clobber (reg:CC CC_REGNUM))]
"!aarch64_move_imm (INTVAL (operands[2]), <MODE>mode)
&& !aarch64_plus_operand (operands[2], <MODE>mode)
&& !reload_completed"
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index cbf28bcffa9..0c0d3bce42b 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -7750,13 +7750,13 @@ alpha_expand_prologue (void)
int probed;
for (probed = 4096; probed < probed_size; probed += 8192)
- emit_insn (gen_probe_stack (GEN_INT (-probed)));
+ emit_insn (gen_stack_probe_internal (GEN_INT (-probed)));
/* We only have to do this probe if we aren't saving registers or
if we are probing beyond the frame because of -fstack-check. */
if ((sa_size == 0 && probed_size > probed - 4096)
|| flag_stack_check || flag_stack_clash_protection)
- emit_insn (gen_probe_stack (GEN_INT (-probed_size)));
+ emit_insn (gen_stack_probe_internal (GEN_INT (-probed_size)));
}
if (frame_size != 0)
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md
index 97838a5083a..14c18656d82 100644
--- a/gcc/config/alpha/alpha.md
+++ b/gcc/config/alpha/alpha.md
@@ -4915,7 +4915,7 @@
;; Subroutine of stack space allocation. Perform a stack probe.
-(define_expand "probe_stack"
+(define_expand "stack_probe_internal"
[(set (match_dup 1) (match_operand:DI 0 "const_int_operand"))]
""
{
@@ -4950,12 +4950,14 @@
int probed = 4096;
- emit_insn (gen_probe_stack (GEN_INT (- probed)));
+ emit_insn (gen_stack_probe_internal (GEN_INT (- probed)));
while (probed + 8192 < INTVAL (operands[1]))
- emit_insn (gen_probe_stack (GEN_INT (- (probed += 8192))));
+ emit_insn (gen_stack_probe_internal
+ (GEN_INT (- (probed += 8192))));
if (probed + 4096 < INTVAL (operands[1]))
- emit_insn (gen_probe_stack (GEN_INT (- INTVAL(operands[1]))));
+ emit_insn (gen_stack_probe_internal
+ (GEN_INT (- INTVAL(operands[1]))));
}
operands[1] = GEN_INT (- INTVAL (operands[1]));
diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c
index 792b688f66c..d3b67184362 100644
--- a/gcc/config/arm/arm-builtins.c
+++ b/gcc/config/arm/arm-builtins.c
@@ -2576,7 +2576,7 @@ arm_expand_builtin (tree exp,
icode = CODE_FOR_set_fpscr;
arg0 = CALL_EXPR_ARG (exp, 0);
op0 = expand_normal (arg0);
- pat = GEN_FCN (icode) (op0);
+ pat = GEN_FCN (icode) (force_reg (SImode, op0));
}
emit_insn (pat);
return target;
@@ -2584,7 +2584,9 @@ arm_expand_builtin (tree exp,
case ARM_BUILTIN_CMSE_NONSECURE_CALLER:
target = gen_reg_rtx (SImode);
op0 = arm_return_addr (0, NULL_RTX);
- emit_insn (gen_addsi3 (target, op0, const1_rtx));
+ emit_insn (gen_andsi3 (target, op0, const1_rtx));
+ op1 = gen_rtx_EQ (SImode, target, const0_rtx);
+ emit_insn (gen_cstoresi4 (target, op1, target, const0_rtx));
return target;
case ARM_BUILTIN_TEXTRMSB:
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 80cb52744ae..5651fb7da4b 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -19097,6 +19097,11 @@ arm_r3_live_at_start_p (void)
static int
arm_compute_static_chain_stack_bytes (void)
{
+ /* Once the value is updated from the init value of -1, do not
+ re-compute. */
+ if (cfun->machine->static_chain_stack_bytes != -1)
+ return cfun->machine->static_chain_stack_bytes;
+
/* See the defining assertion in arm_expand_prologue. */
if (IS_NESTED (arm_current_func_type ())
&& ((TARGET_APCS_FRAME && frame_pointer_needed && TARGET_ARM)
@@ -21396,6 +21401,11 @@ arm_expand_prologue (void)
emit_insn (gen_movsi (stack_pointer_rtx, r1));
}
+ /* Let's compute the static_chain_stack_bytes required and store it. Right
+ now the value must the -1 as stored by arm_init_machine_status (). */
+ cfun->machine->static_chain_stack_bytes
+ = arm_compute_static_chain_stack_bytes ();
+
/* The static chain register is the same as the IP register. If it is
clobbered when creating the frame, we need to save and restore it. */
clobber_ip = IS_NESTED (func_type)
@@ -24545,6 +24555,7 @@ arm_init_machine_status (void)
#if ARM_FT_UNKNOWN != 0
machine->func_type = ARM_FT_UNKNOWN;
#endif
+ machine->static_chain_stack_bytes = -1;
return machine;
}
@@ -26858,7 +26869,10 @@ static bool
arm_array_mode_supported_p (machine_mode mode,
unsigned HOST_WIDE_INT nelems)
{
- if (TARGET_NEON
+ /* We don't want to enable interleaved loads and stores for BYTES_BIG_ENDIAN
+ for now, as the lane-swapping logic needs to be extended in the expanders.
+ See PR target/82518. */
+ if (TARGET_NEON && !BYTES_BIG_ENDIAN
&& (VALID_NEON_DREG_MODE (mode) || VALID_NEON_QREG_MODE (mode))
&& (nelems >= 2 && nelems <= 4))
return true;
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 25953f53bd6..68a6fa56c7c 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1420,6 +1420,9 @@ typedef struct GTY(()) machine_function
machine_mode thumb1_cc_mode;
/* Set to 1 after arm_reorg has started. */
int after_arm_reorg;
+ /* The number of bytes used to store the static chain register on the
+ stack, above the stack frame. */
+ int static_chain_stack_bytes;
}
machine_function;
#endif
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index f9365cde504..ad5f3874bc7 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -4498,16 +4498,13 @@
(set_attr "type" "load1")])
(define_insn "unaligned_loadhis"
- [(set (match_operand:SI 0 "s_register_operand" "=l,r")
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
(sign_extend:SI
- (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
+ (unspec:HI [(match_operand:HI 1 "memory_operand" "Uh")]
UNSPEC_UNALIGNED_LOAD)))]
"unaligned_access"
"ldrsh%?\t%0, %1\t@ unaligned"
- [(set_attr "arch" "t2,any")
- (set_attr "length" "2,4")
- (set_attr "predicable" "yes")
- (set_attr "predicable_short_it" "yes,no")
+ [(set_attr "predicable" "yes")
(set_attr "type" "load_byte")])
(define_insn "unaligned_loadhiu"
diff --git a/gcc/config/arm/arm_cmse.h b/gcc/config/arm/arm_cmse.h
index 8fde2736a2a..427647fb981 100644
--- a/gcc/config/arm/arm_cmse.h
+++ b/gcc/config/arm/arm_cmse.h
@@ -35,7 +35,6 @@ extern "C" {
#if __ARM_FEATURE_CMSE & 1
#include <stddef.h>
-#include <stdint.h>
#ifdef __ARM_BIG_ENDIAN
@@ -174,9 +173,9 @@ cmse_nonsecure_caller (void)
#define CMSE_MPU_NONSECURE 16
#define CMSE_NONSECURE 18
-#define cmse_nsfptr_create(p) ((typeof ((p))) ((intptr_t) (p) & ~1))
+#define cmse_nsfptr_create(p) ((__typeof__ ((p))) ((__INTPTR_TYPE__) (p) & ~1))
-#define cmse_is_nsfptr(p) (!((intptr_t) (p) & 1))
+#define cmse_is_nsfptr(p) (!((__INTPTR_TYPE__) (p) & 1))
#endif /* __ARM_FEATURE_CMSE & 2 */
@@ -188,7 +187,7 @@ __extension__ void *
cmse_check_address_range (void *, size_t, int);
#define cmse_check_pointed_object(p, f) \
- ((typeof ((p))) cmse_check_address_range ((p), sizeof (*(p)), (f)))
+ ((__typeof__ ((p))) cmse_check_address_range ((p), sizeof (*(p)), (f)))
#endif /* __ARM_FEATURE_CMSE & 1 */
diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
index cacc1f9198a..5ddef4956f5 100644
--- a/gcc/config/arm/neon.md
+++ b/gcc/config/arm/neon.md
@@ -1143,12 +1143,12 @@
)
(define_insn_and_split "ashldi3_neon"
- [(set (match_operand:DI 0 "s_register_operand" "= w, w,?&r,?r,?&r, ?w,w")
- (ashift:DI (match_operand:DI 1 "s_register_operand" " 0w, w, 0r, 0, r, 0w,w")
- (match_operand:SI 2 "general_operand" "rUm, i, r, i, i,rUm,i")))
- (clobber (match_scratch:SI 3 "= X, X,?&r, X, X, X,X"))
- (clobber (match_scratch:SI 4 "= X, X,?&r, X, X, X,X"))
- (clobber (match_scratch:DI 5 "=&w, X, X, X, X, &w,X"))
+ [(set (match_operand:DI 0 "s_register_operand" "= w, w, &r, r, &r, ?w,?w")
+ (ashift:DI (match_operand:DI 1 "s_register_operand" " 0w, w, 0r, 0, r, 0w, w")
+ (match_operand:SI 2 "general_operand" "rUm, i, r, i, i,rUm, i")))
+ (clobber (match_scratch:SI 3 "= X, X, &r, X, X, X, X"))
+ (clobber (match_scratch:SI 4 "= X, X, &r, X, X, X, X"))
+ (clobber (match_scratch:DI 5 "=&w, X, X, X, X, &w, X"))
(clobber (reg:CC_C CC_REGNUM))]
"TARGET_NEON"
"#"
@@ -1243,7 +1243,7 @@
;; ashrdi3_neon
;; lshrdi3_neon
(define_insn_and_split "<shift>di3_neon"
- [(set (match_operand:DI 0 "s_register_operand" "= w, w,?&r,?r,?&r,?w,?w")
+ [(set (match_operand:DI 0 "s_register_operand" "= w, w, &r, r, &r,?w,?w")
(RSHIFTS:DI (match_operand:DI 1 "s_register_operand" " 0w, w, 0r, 0, r,0w, w")
(match_operand:SI 2 "reg_or_int_operand" " r, i, r, i, i, r, i")))
(clobber (match_scratch:SI 3 "=2r, X, &r, X, X,2r, X"))
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 3dfa8c3b00b..c7705ca3c21 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -153,6 +153,9 @@ FIXME: DRIVER_SELF_SPECS has changed.
#define FIRST_PSEUDO_REGISTER 36
+#define GENERAL_REGNO_P(N) IN_RANGE (N, 2, 31)
+#define GENERAL_REG_P(X) (REG_P (X) && GENERAL_REGNO_P (REGNO (X)))
+
#define FIXED_REGISTERS {\
1,1,/* r0 r1 */\
0,0,/* r2 r3 */\
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index 3a6dec2b0c0..ee5a1c420c7 100644
--- a/gcc/config/avr/avr.md
+++ b/gcc/config/avr/avr.md
@@ -3362,6 +3362,8 @@
(match_operand:HI 1 "reg_or_0_operand"))]
"optimize
&& reload_completed
+ && GENERAL_REG_P (operands[0])
+ && (operands[1] == const0_rtx || GENERAL_REG_P (operands[1]))
&& (!AVR_HAVE_MOVW
|| const0_rtx == operands[1])"
[(set (match_dup 2) (match_dup 3))
diff --git a/gcc/config/i386/avx512vlintrin.h b/gcc/config/i386/avx512vlintrin.h
index f62f641188e..301713ba907 100644
--- a/gcc/config/i386/avx512vlintrin.h
+++ b/gcc/config/i386/avx512vlintrin.h
@@ -9099,6 +9099,17 @@ _mm_maskz_mul_epi32 (__mmask8 __M, __m128i __X, __m128i __Y)
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_permutexvar_epi64 (__m256i __X, __m256i __Y)
+{
+ return (__m256i) __builtin_ia32_permvardi256_mask ((__v4di) __Y,
+ (__v4di) __X,
+ (__v4di)
+ _mm256_setzero_si256 (),
+ (__mmask8) -1);
+}
+
+extern __inline __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_mask_permutexvar_epi64 (__m256i __W, __mmask8 __M, __m256i __X,
__m256i __Y)
{
@@ -9163,6 +9174,17 @@ _mm_maskz_mul_epu32 (__mmask8 __M, __m128i __X, __m128i __Y)
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_permutexvar_epi32 (__m256i __X, __m256i __Y)
+{
+ return (__m256i) __builtin_ia32_permvarsi256_mask ((__v8si) __Y,
+ (__v8si) __X,
+ (__v8si)
+ _mm256_setzero_si256 (),
+ (__mmask8) -1);
+}
+
+extern __inline __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_mask_permutexvar_epi32 (__m256i __W, __mmask8 __M, __m256i __X,
__m256i __Y)
{
@@ -9751,6 +9773,17 @@ _mm_cmple_epi64_mask (__m128i __X, __m128i __Y)
#ifdef __OPTIMIZE__
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_permutex_epi64 (__m256i __X, const int __I)
+{
+ return (__m256i) __builtin_ia32_permdi256_mask ((__v4di) __X,
+ __I,
+ (__v4di)
+ _mm256_setzero_si256 (),
+ (__mmask8) -1);
+}
+
+extern __inline __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_mask_permutex_epi64 (__m256i __W, __mmask8 __M,
__m256i __X, const int __I)
{
@@ -12367,6 +12400,13 @@ _mm256_permutex_pd (__m256d __X, const int __M)
_mm256_undefined_pd (), \
(__mmask8)-1))
+#define _mm256_permutex_epi64(X, I) \
+ ((__m256i) __builtin_ia32_permdi256_mask ((__v4di)(__m256i)(X), \
+ (int)(I), \
+ (__v4di)(__m256i) \
+ (_mm256_setzero_si256 ()),\
+ (__mmask8) -1))
+
#define _mm256_maskz_permutex_epi64(M, X, I) \
((__m256i) __builtin_ia32_permdi256_mask ((__v4di)(__m256i)(X), \
(int)(I), \
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 88411ca0c59..761c0c28c36 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -12033,19 +12033,23 @@ ix86_setup_frame_addresses (void)
labels in call and return thunks. */
static int indirectlabelno;
-/* True if call and return thunk functions are needed. */
+/* True if call thunk function is needed. */
static bool indirect_thunk_needed = false;
-/* True if call and return thunk functions with the BND prefix are
- needed. */
+/* True if call thunk function with the BND prefix is needed. */
static bool indirect_thunk_bnd_needed = false;
/* Bit masks of integer registers, which contain branch target, used
- by call and return thunks functions. */
+ by call thunk functions. */
static int indirect_thunks_used;
/* Bit masks of integer registers, which contain branch target, used
- by call and return thunks functions with the BND prefix. */
+ by call thunk functions with the BND prefix. */
static int indirect_thunks_bnd_used;
+/* True if return thunk function is needed. */
+static bool indirect_return_needed = false;
+/* True if return thunk function with the BND prefix is needed. */
+static bool indirect_return_bnd_needed = false;
+
/* True if return thunk function via CX is needed. */
static bool indirect_return_via_cx;
/* True if return thunk function via CX with the BND prefix is
@@ -12192,16 +12196,18 @@ output_indirect_thunk (bool need_bnd_p, unsigned int regno)
/* Output a funtion with a call and return thunk for indirect branch.
If BND_P is true, the BND prefix is needed. If REGNO != INVALID_REGNUM,
the function address is in REGNO. Otherwise, the function address is
- on the top of stack. */
+ on the top of stack. Thunk is used for function return if RET_P is
+ true. */
static void
-output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
+output_indirect_thunk_function (bool need_bnd_p, unsigned int regno,
+ bool ret_p)
{
char name[32];
tree decl;
/* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
- indirect_thunk_name (name, regno, need_bnd_p, false);
+ indirect_thunk_name (name, regno, need_bnd_p, ret_p);
decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
get_identifier (name),
build_function_type_list (void_type_node, NULL_TREE));
@@ -12244,50 +12250,6 @@ output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
ASM_OUTPUT_LABEL (asm_out_file, name);
}
- /* Create alias for __x86_return_thunk/__x86_return_thunk_bnd or
- __x86_return_thunk_ecx/__x86_return_thunk_ecx_bnd. */
- bool need_alias;
- if (regno == INVALID_REGNUM)
- need_alias = true;
- else if (regno == CX_REG)
- {
- if (need_bnd_p)
- need_alias = indirect_return_via_cx_bnd;
- else
- need_alias = indirect_return_via_cx;
- }
- else
- need_alias = false;
-
- if (need_alias)
- {
- char alias[32];
-
- indirect_thunk_name (alias, regno, need_bnd_p, true);
-#if TARGET_MACHO
- if (TARGET_MACHO)
- {
- fputs ("\t.weak_definition\t", asm_out_file);
- assemble_name (asm_out_file, alias);
- fputs ("\n\t.private_extern\t", asm_out_file);
- assemble_name (asm_out_file, alias);
- putc ('\n', asm_out_file);
- ASM_OUTPUT_LABEL (asm_out_file, alias);
- }
-#else
- ASM_OUTPUT_DEF (asm_out_file, alias, name);
- if (USE_HIDDEN_LINKONCE)
- {
- fputs ("\t.globl\t", asm_out_file);
- assemble_name (asm_out_file, alias);
- putc ('\n', asm_out_file);
- fputs ("\t.hidden\t", asm_out_file);
- assemble_name (asm_out_file, alias);
- putc ('\n', asm_out_file);
- }
-#endif
- }
-
DECL_INITIAL (decl) = make_node (BLOCK);
current_function_decl = decl;
allocate_struct_function (decl, false);
@@ -12334,19 +12296,29 @@ ix86_code_end (void)
rtx xops[2];
unsigned int regno;
+ if (indirect_return_needed)
+ output_indirect_thunk_function (false, INVALID_REGNUM, true);
+ if (indirect_return_bnd_needed)
+ output_indirect_thunk_function (true, INVALID_REGNUM, true);
+
+ if (indirect_return_via_cx)
+ output_indirect_thunk_function (false, CX_REG, true);
+ if (indirect_return_via_cx_bnd)
+ output_indirect_thunk_function (true, CX_REG, true);
+
if (indirect_thunk_needed)
- output_indirect_thunk_function (false, INVALID_REGNUM);
+ output_indirect_thunk_function (false, INVALID_REGNUM, false);
if (indirect_thunk_bnd_needed)
- output_indirect_thunk_function (true, INVALID_REGNUM);
+ output_indirect_thunk_function (true, INVALID_REGNUM, false);
for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
{
unsigned int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
if ((indirect_thunks_used & (1 << i)))
- output_indirect_thunk_function (false, regno);
+ output_indirect_thunk_function (false, regno, false);
if ((indirect_thunks_bnd_used & (1 << i)))
- output_indirect_thunk_function (true, regno);
+ output_indirect_thunk_function (true, regno, false);
}
for (regno = AX_REG; regno <= SP_REG; regno++)
@@ -12355,10 +12327,10 @@ ix86_code_end (void)
tree decl;
if ((indirect_thunks_used & (1 << regno)))
- output_indirect_thunk_function (false, regno);
+ output_indirect_thunk_function (false, regno, false);
if ((indirect_thunks_bnd_used & (1 << regno)))
- output_indirect_thunk_function (true, regno);
+ output_indirect_thunk_function (true, regno, false);
if (!(pic_labels_used & (1 << regno)))
continue;
@@ -20061,72 +20033,36 @@ emit_i387_cw_initialization (int mode)
emit_insn (gen_x86_fnstcw_1 (stored_mode));
emit_move_insn (reg, copy_rtx (stored_mode));
- if (TARGET_64BIT || TARGET_PARTIAL_REG_STALL
- || optimize_insn_for_size_p ())
- {
- switch (mode)
- {
- case I387_CW_TRUNC:
- /* round toward zero (truncate) */
- emit_insn (gen_iorhi3 (reg, reg, GEN_INT (0x0c00)));
- slot = SLOT_CW_TRUNC;
- break;
-
- case I387_CW_FLOOR:
- /* round down toward -oo */
- emit_insn (gen_andhi3 (reg, reg, GEN_INT (~0x0c00)));
- emit_insn (gen_iorhi3 (reg, reg, GEN_INT (0x0400)));
- slot = SLOT_CW_FLOOR;
- break;
-
- case I387_CW_CEIL:
- /* round up toward +oo */
- emit_insn (gen_andhi3 (reg, reg, GEN_INT (~0x0c00)));
- emit_insn (gen_iorhi3 (reg, reg, GEN_INT (0x0800)));
- slot = SLOT_CW_CEIL;
- break;
-
- case I387_CW_MASK_PM:
- /* mask precision exception for nearbyint() */
- emit_insn (gen_iorhi3 (reg, reg, GEN_INT (0x0020)));
- slot = SLOT_CW_MASK_PM;
- break;
-
- default:
- gcc_unreachable ();
- }
- }
- else
+ switch (mode)
{
- switch (mode)
- {
- case I387_CW_TRUNC:
- /* round toward zero (truncate) */
- emit_insn (gen_insvsi_1 (reg, GEN_INT (0xc)));
- slot = SLOT_CW_TRUNC;
- break;
+ case I387_CW_TRUNC:
+ /* round toward zero (truncate) */
+ emit_insn (gen_iorhi3 (reg, reg, GEN_INT (0x0c00)));
+ slot = SLOT_CW_TRUNC;
+ break;
- case I387_CW_FLOOR:
- /* round down toward -oo */
- emit_insn (gen_insvsi_1 (reg, GEN_INT (0x4)));
- slot = SLOT_CW_FLOOR;
- break;
+ case I387_CW_FLOOR:
+ /* round down toward -oo */
+ emit_insn (gen_andhi3 (reg, reg, GEN_INT (~0x0c00)));
+ emit_insn (gen_iorhi3 (reg, reg, GEN_INT (0x0400)));
+ slot = SLOT_CW_FLOOR;
+ break;
- case I387_CW_CEIL:
- /* round up toward +oo */
- emit_insn (gen_insvsi_1 (reg, GEN_INT (0x8)));
- slot = SLOT_CW_CEIL;
- break;
+ case I387_CW_CEIL:
+ /* round up toward +oo */
+ emit_insn (gen_andhi3 (reg, reg, GEN_INT (~0x0c00)));
+ emit_insn (gen_iorhi3 (reg, reg, GEN_INT (0x0800)));
+ slot = SLOT_CW_CEIL;
+ break;
- case I387_CW_MASK_PM:
- /* mask precision exception for nearbyint() */
- emit_insn (gen_iorhi3 (reg, reg, GEN_INT (0x0020)));
- slot = SLOT_CW_MASK_PM;
- break;
+ case I387_CW_MASK_PM:
+ /* mask precision exception for nearbyint() */
+ emit_insn (gen_iorhi3 (reg, reg, GEN_INT (0x0020)));
+ slot = SLOT_CW_MASK_PM;
+ break;
- default:
- gcc_unreachable ();
- }
+ default:
+ gcc_unreachable ();
}
gcc_assert (slot < MAX_386_STACK_LOCALS);
@@ -29403,12 +29339,12 @@ ix86_output_function_return (bool long_p)
true);
if (need_bnd_p)
{
- indirect_thunk_bnd_needed |= need_thunk;
+ indirect_return_bnd_needed |= need_thunk;
fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
}
else
{
- indirect_thunk_needed |= need_thunk;
+ indirect_return_needed |= need_thunk;
fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
}
}
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 10abb165bd9..c5dae5ffe7d 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -739,7 +739,7 @@
(if_then_else (match_operand 1 "constant_call_address_operand")
(const_string "none")
(const_string "load"))
- (and (eq_attr "type" "alu1,negnot,ishift1,sselog1,sseshuf1")
+ (and (eq_attr "type" "alu1,negnot,ishift1,rotate1,sselog1,sseshuf1")
(match_operand 1 "memory_operand"))
(const_string "both")
(and (match_operand 0 "memory_operand")
@@ -750,7 +750,7 @@
(match_operand 1 "memory_operand")
(const_string "load")
(and (eq_attr "type"
- "!alu1,negnot,ishift1,
+ "!alu1,negnot,ishift1,rotate1,
imov,imovx,icmp,test,bitmanip,
fmov,fcmp,fsgn,
sse,ssemov,ssecmp,ssecomi,ssecvt,ssecvt1,sseicvt,
@@ -6685,6 +6685,20 @@
(set_attr "pent_pair" "pu")
(set_attr "mode" "<MODE>")])
+(define_insn "*add<mode>3_carry_0"
+ [(set (match_operand:SWI 0 "nonimmediate_operand" "=<r>m")
+ (plus:SWI
+ (match_operator:SWI 3 "ix86_carry_flag_operator"
+ [(match_operand 2 "flags_reg_operand") (const_int 0)])
+ (match_operand:SWI 1 "nonimmediate_operand" "0")))
+ (clobber (reg:CC FLAGS_REG))]
+ "ix86_unary_operator_ok (PLUS, <MODE>mode, operands)"
+ "adc{<imodesuffix>}\t{$0, %0|%0, 0}"
+ [(set_attr "type" "alu")
+ (set_attr "use_carry" "1")
+ (set_attr "pent_pair" "pu")
+ (set_attr "mode" "<MODE>")])
+
(define_insn "*addsi3_carry_zext"
[(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI
@@ -6701,6 +6715,20 @@
(set_attr "pent_pair" "pu")
(set_attr "mode" "SI")])
+(define_insn "*addsi3_carry_zext_0"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (zero_extend:DI
+ (plus:SI (match_operator:SI 2 "ix86_carry_flag_operator"
+ [(reg FLAGS_REG) (const_int 0)])
+ (match_operand:SI 1 "register_operand" "0"))))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_64BIT"
+ "adc{l}\t{$0, %k0|%k0, 0}"
+ [(set_attr "type" "alu")
+ (set_attr "use_carry" "1")
+ (set_attr "pent_pair" "pu")
+ (set_attr "mode" "SI")])
+
;; There is no point to generate ADCX instruction. ADC is shorter and faster.
(define_insn "addcarry<mode>"
@@ -6741,6 +6769,20 @@
(set_attr "pent_pair" "pu")
(set_attr "mode" "<MODE>")])
+(define_insn "*sub<mode>3_carry_0"
+ [(set (match_operand:SWI 0 "nonimmediate_operand" "=<r>m")
+ (minus:SWI
+ (match_operand:SWI 1 "nonimmediate_operand" "0")
+ (match_operator:SWI 3 "ix86_carry_flag_operator"
+ [(match_operand 2 "flags_reg_operand") (const_int 0)])))
+ (clobber (reg:CC FLAGS_REG))]
+ "ix86_unary_operator_ok (MINUS, <MODE>mode, operands)"
+ "sbb{<imodesuffix>}\t{$0, %0|%0, 0}"
+ [(set_attr "type" "alu")
+ (set_attr "use_carry" "1")
+ (set_attr "pent_pair" "pu")
+ (set_attr "mode" "<MODE>")])
+
(define_insn "*subsi3_carry_zext"
[(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI
@@ -6758,6 +6800,21 @@
(set_attr "pent_pair" "pu")
(set_attr "mode" "SI")])
+(define_insn "*subsi3_carry_zext_0"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (zero_extend:DI
+ (minus:SI
+ (match_operand:SI 1 "register_operand" "0")
+ (match_operator:SI 2 "ix86_carry_flag_operator"
+ [(reg FLAGS_REG) (const_int 0)]))))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_64BIT"
+ "sbb{l}\t{$0, %k0|%k0, 0}"
+ [(set_attr "type" "alu")
+ (set_attr "use_carry" "1")
+ (set_attr "pent_pair" "pu")
+ (set_attr "mode" "SI")])
+
(define_insn "subborrow<mode>"
[(set (reg:CCC FLAGS_REG)
(compare:CCC
@@ -9916,7 +9973,7 @@
{
switch (get_attr_type (insn))
{
- case TYPE_ALU:
+ case TYPE_ALU1:
gcc_assert (operands[1] == const1_rtx);
return "add{b}\t%0, %0";
@@ -9932,12 +9989,12 @@
(cond [(and (and (match_test "TARGET_DOUBLE_WITH_ADD")
(match_operand 0 "register_operand"))
(match_operand 1 "const1_operand"))
- (const_string "alu")
+ (const_string "alu1")
]
(const_string "ishift1")))
(set (attr "length_immediate")
(if_then_else
- (ior (eq_attr "type" "alu")
+ (ior (eq_attr "type" "alu1")
(and (eq_attr "type" "ishift1")
(and (match_operand 1 "const1_operand")
(ior (match_test "TARGET_SHIFT1")
@@ -11730,6 +11787,7 @@
"(peep2_reg_dead_p (3, operands[1])
|| operands_match_p (operands[1], operands[3]))
&& ! reg_overlap_mentioned_p (operands[3], operands[0])
+ && ! reg_overlap_mentioned_p (operands[3], operands[4])
&& ! reg_set_p (operands[3], operands[4])
&& peep2_regno_dead_p (0, FLAGS_REG)"
[(parallel [(set (match_dup 5) (match_dup 0))
@@ -11776,6 +11834,7 @@
"(peep2_reg_dead_p (3, operands[1])
|| operands_match_p (operands[1], operands[3]))
&& ! reg_overlap_mentioned_p (operands[3], operands[0])
+ && ! reg_overlap_mentioned_p (operands[3], operands[4])
&& ! reg_set_p (operands[3], operands[4])
&& peep2_regno_dead_p (0, FLAGS_REG)"
[(parallel [(set (match_dup 5) (match_dup 0))
@@ -15536,7 +15595,8 @@
"(TARGET_USE_FANCY_MATH_387
&& (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|| TARGET_MIX_SSE_I387)
- && flag_unsafe_math_optimizations)
+ && flag_unsafe_math_optimizations
+ && (flag_fp_int_builtin_inexact || !flag_trapping_math))
|| (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
&& !flag_trapping_math && !flag_rounding_math)"
{
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 80cda39bacf..c8c3a5045b7 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1134,11 +1134,8 @@
operands[2]));
}
else if (memory_operand (operands[1], DImode))
- {
- rtx tmp = gen_reg_rtx (V2DImode);
- emit_insn (gen_vec_concatv2di (tmp, operands[1], const0_rtx));
- emit_move_insn (operands[0], gen_lowpart (V4SImode, tmp));
- }
+ emit_insn (gen_vec_concatv2di (gen_lowpart (V2DImode, operands[0]),
+ operands[1], const0_rtx));
else
gcc_unreachable ();
DONE;
@@ -4398,7 +4395,7 @@
(match_operand:VF_128 1 "register_operand" "v")
(const_int 1)))]
"TARGET_AVX512F && TARGET_64BIT"
- "vcvtusi2<ssescalarmodesuffix>\t{%2, <round_op3>%1, %0|%0, %1<round_op3>, %2}"
+ "vcvtusi2<ssescalarmodesuffix>{q}\t{%2, <round_op3>%1, %0|%0, %1<round_op3>, %2}"
[(set_attr "type" "sseicvt")
(set_attr "prefix" "evex")
(set_attr "mode" "<ssescalarmode>")])
@@ -8883,14 +8880,14 @@
;; see comment above inline_secondary_memory_needed function in i386.c
(define_insn "sse2_loadhpd"
[(set (match_operand:V2DF 0 "nonimmediate_operand"
- "=x,v,x,v,o,o ,o")
+ "=x,v,x,v ,o,o ,o")
(vec_concat:V2DF
(vec_select:DF
(match_operand:V2DF 1 "nonimmediate_operand"
- " 0,v,0,v,0,0 ,0")
+ " 0,v,0,v ,0,0 ,0")
(parallel [(const_int 0)]))
(match_operand:DF 2 "nonimmediate_operand"
- " m,m,x,v,x,*f,r")))]
+ " m,m,x,Yv,x,*f,r")))]
"TARGET_SSE2 && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
"@
movhpd\t{%2, %0|%0, %2}
@@ -9938,11 +9935,11 @@
&& ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)"
"@
p<plusminus_mnemonic><ssemodesuffix>\t{%2, %0|%0, %2}
- vp<plusminus_mnemonic><ssemodesuffix>\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
+ vp<plusminus_mnemonic><ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "isa" "noavx,avx")
(set_attr "type" "sseiadd")
(set_attr "prefix_data16" "1,*")
- (set_attr "prefix" "<mask_prefix3>")
+ (set_attr "prefix" "orig,vex")
(set_attr "mode" "<sseinsnmode>")])
(define_insn "*<plusminus_insn><mode>3_mask"
@@ -10683,11 +10680,14 @@
(const_string "0")))
(set_attr "mode" "<sseinsnmode>")])
+(define_mode_attr vshift_count
+ [(V32HI "v") (V16HI "Yv") (V8HI "Yv")])
+
(define_insn "<shift_insn><mode>3<mask_name>"
[(set (match_operand:VI2_AVX2_AVX512BW 0 "register_operand" "=x,v")
(any_lshift:VI2_AVX2_AVX512BW
(match_operand:VI2_AVX2_AVX512BW 1 "register_operand" "0,v")
- (match_operand:DI 2 "nonmemory_operand" "xN,vN")))]
+ (match_operand:DI 2 "nonmemory_operand" "xN,<vshift_count>N")))]
"TARGET_SSE2 && <mask_mode512bit_condition> && <mask_avx512bw_condition>"
"@
p<vshift><ssemodesuffix>\t{%2, %0|%0, %2}
@@ -10706,7 +10706,7 @@
[(set (match_operand:VI48_AVX2 0 "register_operand" "=x,x,v")
(any_lshift:VI48_AVX2
(match_operand:VI48_AVX2 1 "register_operand" "0,x,v")
- (match_operand:DI 2 "nonmemory_operand" "xN,xN,vN")))]
+ (match_operand:DI 2 "nonmemory_operand" "xN,xN,YvN")))]
"TARGET_SSE2 && <mask_mode512bit_condition>"
"@
p<vshift><ssemodesuffix>\t{%2, %0|%0, %2}
@@ -11822,7 +11822,7 @@
(eq_attr "mode" "TI"))
(const_string "1")
(const_string "*")))
- (set_attr "prefix" "<mask_prefix3>")
+ (set_attr "prefix" "orig,vex")
(set (attr "mode")
(cond [(and (match_test "<MODE_SIZE> == 16")
(match_test "TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL"))
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 70a8f0de245..af2c4a23dfe 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -2008,6 +2008,9 @@ static void
nvptx_assemble_decl_begin (FILE *file, const char *name, const char *section,
const_tree type, HOST_WIDE_INT size, unsigned align)
{
+ bool atype = (TREE_CODE (type) == ARRAY_TYPE)
+ && (TYPE_DOMAIN (type) == NULL_TREE);
+
while (TREE_CODE (type) == ARRAY_TYPE)
type = TREE_TYPE (type);
@@ -2047,6 +2050,8 @@ nvptx_assemble_decl_begin (FILE *file, const char *name, const char *section,
/* We make everything an array, to simplify any initialization
emission. */
fprintf (file, "[" HOST_WIDE_INT_PRINT_DEC "]", init_frag.remaining);
+ else if (atype)
+ fprintf (file, "[]");
}
/* Called when the initializer for a decl has been completely output through
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index e6ac34acec9..9368d4504a8 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -1725,9 +1725,7 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg)
}
else
emit_move_insn (scratch_reg, XEXP (op1, 0));
- emit_insn (gen_rtx_SET (operand0,
- replace_equiv_address (op1, scratch_reg)));
- return 1;
+ op1 = replace_equiv_address (op1, scratch_reg);
}
}
else if ((!INT14_OK_STRICT && symbolic_memory_operand (op1, VOIDmode))
@@ -1737,10 +1735,10 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg)
/* Load memory address into SCRATCH_REG. */
scratch_reg = force_mode (word_mode, scratch_reg);
emit_move_insn (scratch_reg, XEXP (op1, 0));
- emit_insn (gen_rtx_SET (operand0,
- replace_equiv_address (op1, scratch_reg)));
- return 1;
+ op1 = replace_equiv_address (op1, scratch_reg);
}
+ emit_insn (gen_rtx_SET (operand0, op1));
+ return 1;
}
else if (scratch_reg
&& FP_REG_P (operand1)
@@ -1778,9 +1776,7 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg)
}
else
emit_move_insn (scratch_reg, XEXP (op0, 0));
- emit_insn (gen_rtx_SET (replace_equiv_address (op0, scratch_reg),
- operand1));
- return 1;
+ op0 = replace_equiv_address (op0, scratch_reg);
}
}
else if ((!INT14_OK_STRICT && symbolic_memory_operand (op0, VOIDmode))
@@ -1790,10 +1786,10 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, rtx scratch_reg)
/* Load memory address into SCRATCH_REG. */
scratch_reg = force_mode (word_mode, scratch_reg);
emit_move_insn (scratch_reg, XEXP (op0, 0));
- emit_insn (gen_rtx_SET (replace_equiv_address (op0, scratch_reg),
- operand1));
- return 1;
+ op0 = replace_equiv_address (op0, scratch_reg);
}
+ emit_insn (gen_rtx_SET (op0, operand1));
+ return 1;
}
/* Handle secondary reloads for loads of FP registers from constant
expressions by forcing the constant into memory. For the most part,
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 65df53e54b0..dd37dd3ad8d 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -1153,8 +1153,18 @@ do { \
PREFIX is the class of label and NUM is the number within the class.
This is suitable for output with `assemble_name'. */
-#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
- sprintf (LABEL, "*%c$%s%04ld", (PREFIX)[0], (PREFIX) + 1, (long)(NUM))
+#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
+ do \
+ { \
+ char *__p; \
+ (LABEL)[0] = '*'; \
+ (LABEL)[1] = (PREFIX)[0]; \
+ (LABEL)[2] = '$'; \
+ __p = stpcpy (&(LABEL)[3], &(PREFIX)[1]); \
+ sprint_ul (__p, (unsigned long) (NUM)); \
+ } \
+ while (0)
+
/* Output the definition of a compiler-generated label named NAME. */
@@ -1193,14 +1203,14 @@ do { \
/* This is how to output an element of a case-vector that is absolute. */
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
- fprintf (FILE, "\t.word L$%04d\n", VALUE)
+ fprintf (FILE, "\t.word L$%d\n", VALUE)
/* This is how to output an element of a case-vector that is relative.
Since we always place jump tables in the text section, the difference
is absolute and requires no relocation. */
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
- fprintf (FILE, "\t.word L$%04d-L$%04d\n", VALUE, REL)
+ fprintf (FILE, "\t.word L$%d-L$%d\n", VALUE, REL)
/* This is how to output an absolute case-vector. */
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index e786d104b1f..01657fdf838 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -2536,24 +2536,40 @@
xoperands[0] = operands[0];
xoperands[1] = operands[1];
- xoperands[2] = gen_label_rtx ();
- (*targetm.asm_out.internal_label) (asm_out_file, \"L\",
- CODE_LABEL_NUMBER (xoperands[2]));
- output_asm_insn (\"mfia %0\", xoperands);
-
- /* If we're trying to load the address of a label that happens to be
- close, then we can use a shorter sequence. */
if (GET_CODE (operands[1]) == LABEL_REF
- && !LABEL_REF_NONLOCAL_P (operands[1])
- && INSN_ADDRESSES_SET_P ()
- && abs (INSN_ADDRESSES (INSN_UID (XEXP (operands[1], 0)))
- - INSN_ADDRESSES (INSN_UID (insn))) < 8100)
- output_asm_insn (\"ldo %1-%2(%0),%0\", xoperands);
+ && !LABEL_REF_NONLOCAL_P (operands[1]))
+ {
+ xoperands[2] = gen_label_rtx ();
+ (*targetm.asm_out.internal_label) (asm_out_file, \"L\",
+ CODE_LABEL_NUMBER (xoperands[2]));
+ output_asm_insn (\"mfia %0\", xoperands);
+
+ /* If we're trying to load the address of a label that happens to be
+ close, then we can use a shorter sequence. */
+ if (INSN_ADDRESSES_SET_P ()
+ && abs (INSN_ADDRESSES (INSN_UID (XEXP (operands[1], 0)))
+ - INSN_ADDRESSES (INSN_UID (insn))) < 8100)
+ output_asm_insn (\"ldo %1-%2(%0),%0\", xoperands);
+ else
+ {
+ output_asm_insn (\"addil L%%%1-%2,%0\", xoperands);
+ output_asm_insn (\"ldo R%%%1-%2(%0),%0\", xoperands);
+ }
+ }
else
{
- output_asm_insn (\"addil L%%%1-%2,%0\", xoperands);
- output_asm_insn (\"ldo R%%%1-%2(%0),%0\", xoperands);
+ /* Load using linkage table. */
+ if (TARGET_64BIT)
+ {
+ output_asm_insn (\"addil LT%%%1,%%r27\", xoperands);
+ output_asm_insn (\"ldd RT%%%1(%0),%0\", xoperands);
+ }
+ else
+ {
+ output_asm_insn (\"addil LT%%%1,%%r19\", xoperands);
+ output_asm_insn (\"ldw RT%%%1(%0),%0\", xoperands);
+ }
}
return \"\";
}"
@@ -2570,25 +2586,33 @@
xoperands[0] = operands[0];
xoperands[1] = operands[1];
- xoperands[2] = gen_label_rtx ();
- output_asm_insn (\"bl .+8,%0\", xoperands);
- output_asm_insn (\"depi 0,31,2,%0\", xoperands);
- (*targetm.asm_out.internal_label) (asm_out_file, \"L\",
- CODE_LABEL_NUMBER (xoperands[2]));
-
- /* If we're trying to load the address of a label that happens to be
- close, then we can use a shorter sequence. */
if (GET_CODE (operands[1]) == LABEL_REF
- && !LABEL_REF_NONLOCAL_P (operands[1])
- && INSN_ADDRESSES_SET_P ()
- && abs (INSN_ADDRESSES (INSN_UID (XEXP (operands[1], 0)))
- - INSN_ADDRESSES (INSN_UID (insn))) < 8100)
- output_asm_insn (\"ldo %1-%2(%0),%0\", xoperands);
+ && !LABEL_REF_NONLOCAL_P (operands[1]))
+ {
+ xoperands[2] = gen_label_rtx ();
+ output_asm_insn (\"bl .+8,%0\", xoperands);
+ output_asm_insn (\"depi 0,31,2,%0\", xoperands);
+ (*targetm.asm_out.internal_label) (asm_out_file, \"L\",
+ CODE_LABEL_NUMBER (xoperands[2]));
+
+ /* If we're trying to load the address of a label that happens to be
+ close, then we can use a shorter sequence. */
+ if (INSN_ADDRESSES_SET_P ()
+ && abs (INSN_ADDRESSES (INSN_UID (XEXP (operands[1], 0)))
+ - INSN_ADDRESSES (INSN_UID (insn))) < 8100)
+ output_asm_insn (\"ldo %1-%2(%0),%0\", xoperands);
+ else
+ {
+ output_asm_insn (\"addil L%%%1-%2,%0\", xoperands);
+ output_asm_insn (\"ldo R%%%1-%2(%0),%0\", xoperands);
+ }
+ }
else
{
- output_asm_insn (\"addil L%%%1-%2,%0\", xoperands);
- output_asm_insn (\"ldo R%%%1-%2(%0),%0\", xoperands);
+ /* Load using linkage table. */
+ output_asm_insn (\"addil LT%%%1,%%r19\", xoperands);
+ output_asm_insn (\"ldw RT%%%1(%0),%0\", xoperands);
}
return \"\";
}"
diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h
index 8b7a42be3b5..5b21482602d 100644
--- a/gcc/config/pa/pa64-hpux.h
+++ b/gcc/config/pa/pa64-hpux.h
@@ -245,8 +245,18 @@ do { \
/* We need to use the HP style for internal labels. */
#undef ASM_GENERATE_INTERNAL_LABEL
-#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
- sprintf (LABEL, "*%c$%s%04ld", (PREFIX)[0], (PREFIX) + 1, (long)(NUM))
+#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
+ do \
+ { \
+ char *__p; \
+ (LABEL)[0] = '*'; \
+ (LABEL)[1] = (PREFIX)[0]; \
+ (LABEL)[2] = '$'; \
+ __p = stpcpy (&(LABEL)[3], &(PREFIX)[1]); \
+ sprint_ul (__p, (unsigned long) (NUM)); \
+ } \
+ while (0)
+
#else /* USING_ELFOS_H */
diff --git a/gcc/config/riscv/t-rtems b/gcc/config/riscv/t-rtems
new file mode 100644
index 00000000000..41f5927fc87
--- /dev/null
+++ b/gcc/config/riscv/t-rtems
@@ -0,0 +1,25 @@
+MULTILIB_OPTIONS =
+MULTILIB_DIRNAMES =
+
+MULTILIB_OPTIONS += march=rv32i/march=rv32im/march=rv32imafd/march=rv32iac/march=rv32imac/march=rv32imafc/march=rv64imafd/march=rv64imac/march=rv64imafdc
+MULTILIB_DIRNAMES += rv32i rv32im rv32imafd rv32iac rv32imac rv32imafc rv64imafd rv64imac rv64imafdc
+
+MULTILIB_OPTIONS += mabi=ilp32/mabi=ilp32f/mabi=ilp32d/mabi=lp64/mabi=lp64d
+MULTILIB_DIRNAMES += ilp32 ilp32f ilp32d lp64 lp64d
+
+MULTILIB_OPTIONS += mcmodel=medany
+MULTILIB_DIRNAMES += medany
+
+MULTILIB_REQUIRED =
+MULTILIB_REQUIRED += march=rv32i/mabi=ilp32
+MULTILIB_REQUIRED += march=rv32im/mabi=ilp32
+MULTILIB_REQUIRED += march=rv32imafd/mabi=ilp32d
+MULTILIB_REQUIRED += march=rv32iac/mabi=ilp32
+MULTILIB_REQUIRED += march=rv32imac/mabi=ilp32
+MULTILIB_REQUIRED += march=rv32imafc/mabi=ilp32f
+MULTILIB_REQUIRED += march=rv64imafd/mabi=lp64d
+MULTILIB_REQUIRED += march=rv64imafd/mabi=lp64d/mcmodel=medany
+MULTILIB_REQUIRED += march=rv64imac/mabi=lp64
+MULTILIB_REQUIRED += march=rv64imac/mabi=lp64/mcmodel=medany
+MULTILIB_REQUIRED += march=rv64imafdc/mabi=lp64d
+MULTILIB_REQUIRED += march=rv64imafdc/mabi=lp64d/mcmodel=medany
diff --git a/gcc/config/rs6000/altivec.h b/gcc/config/rs6000/altivec.h
index 3011a87becf..e04c3a50a9e 100644
--- a/gcc/config/rs6000/altivec.h
+++ b/gcc/config/rs6000/altivec.h
@@ -398,8 +398,6 @@
#define vec_vctzd __builtin_vec_vctzd
#define vec_vctzh __builtin_vec_vctzh
#define vec_vctzw __builtin_vec_vctzw
-#define vec_vextract4b __builtin_vec_vextract4b
-#define vec_vinsert4b __builtin_vec_vinsert4b
#define vec_extract4b __builtin_vec_extract4b
#define vec_insert4b __builtin_vec_insert4b
#define vec_vprtyb __builtin_vec_vprtyb
diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index 53c6eb81154..32dfa8f999a 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -2615,39 +2615,49 @@
"lvx %0,%y1"
[(set_attr "type" "vecload")])
-; The next two patterns embody what lvx should usually look like.
-(define_insn "altivec_lvx_<mode>_2op"
- [(set (match_operand:VM2 0 "register_operand" "=v")
- (mem:VM2 (and:DI (plus:DI (match_operand:DI 1 "register_operand" "b")
- (match_operand:DI 2 "register_operand" "r"))
- (const_int -16))))]
- "TARGET_ALTIVEC && TARGET_64BIT"
- "lvx %0,%1,%2"
- [(set_attr "type" "vecload")])
-
-(define_insn "altivec_lvx_<mode>_1op"
- [(set (match_operand:VM2 0 "register_operand" "=v")
- (mem:VM2 (and:DI (match_operand:DI 1 "register_operand" "r")
- (const_int -16))))]
- "TARGET_ALTIVEC && TARGET_64BIT"
- "lvx %0,0,%1"
- [(set_attr "type" "vecload")])
+; The following patterns embody what lvx should usually look like.
+(define_expand "altivec_lvx_<VM2:mode>"
+ [(set (match_operand:VM2 0 "register_operand")
+ (match_operand:VM2 1 "altivec_indexed_or_indirect_operand"))]
+ "TARGET_ALTIVEC"
+{
+ rtx addr = XEXP (operand1, 0);
+ if (GET_CODE (addr) == PLUS
+ && REG_P (XEXP (addr, 0))
+ && REG_P (XEXP (addr, 1)))
+ {
+ rtx op1 = XEXP (addr, 0);
+ rtx op2 = XEXP (addr, 1);
+ if (TARGET_64BIT)
+ emit_insn (gen_altivec_lvx_<VM2:mode>_2op_di (operand0, op1, op2));
+ else
+ emit_insn (gen_altivec_lvx_<VM2:mode>_2op_si (operand0, op1, op2));
+ }
+ else
+ {
+ if (TARGET_64BIT)
+ emit_insn (gen_altivec_lvx_<VM2:mode>_1op_di (operand0, addr));
+ else
+ emit_insn (gen_altivec_lvx_<VM2:mode>_1op_si (operand0, addr));
+ }
+ DONE;
+})
-; 32-bit versions of the above.
-(define_insn "altivec_lvx_<mode>_2op_si"
+; The next two patterns embody what lvx should usually look like.
+(define_insn "altivec_lvx_<VM2:mode>_2op_<P:mptrsize>"
[(set (match_operand:VM2 0 "register_operand" "=v")
- (mem:VM2 (and:SI (plus:SI (match_operand:SI 1 "register_operand" "b")
- (match_operand:SI 2 "register_operand" "r"))
- (const_int -16))))]
- "TARGET_ALTIVEC && TARGET_32BIT"
+ (mem:VM2 (and:P (plus:P (match_operand:P 1 "register_operand" "b")
+ (match_operand:P 2 "register_operand" "r"))
+ (const_int -16))))]
+ "TARGET_ALTIVEC"
"lvx %0,%1,%2"
[(set_attr "type" "vecload")])
-(define_insn "altivec_lvx_<mode>_1op_si"
+(define_insn "altivec_lvx_<VM2:mode>_1op_<P:mptrsize>"
[(set (match_operand:VM2 0 "register_operand" "=v")
- (mem:VM2 (and:SI (match_operand:SI 1 "register_operand" "r")
- (const_int -16))))]
- "TARGET_ALTIVEC && TARGET_32BIT"
+ (mem:VM2 (and:P (match_operand:P 1 "register_operand" "r")
+ (const_int -16))))]
+ "TARGET_ALTIVEC"
"lvx %0,0,%1"
[(set_attr "type" "vecload")])
@@ -2663,39 +2673,49 @@
"stvx %1,%y0"
[(set_attr "type" "vecstore")])
-; The next two patterns embody what stvx should usually look like.
-(define_insn "altivec_stvx_<mode>_2op"
- [(set (mem:VM2 (and:DI (plus:DI (match_operand:DI 1 "register_operand" "b")
- (match_operand:DI 2 "register_operand" "r"))
- (const_int -16)))
- (match_operand:VM2 0 "register_operand" "v"))]
- "TARGET_ALTIVEC && TARGET_64BIT"
- "stvx %0,%1,%2"
- [(set_attr "type" "vecstore")])
-
-(define_insn "altivec_stvx_<mode>_1op"
- [(set (mem:VM2 (and:DI (match_operand:DI 1 "register_operand" "r")
- (const_int -16)))
- (match_operand:VM2 0 "register_operand" "v"))]
- "TARGET_ALTIVEC && TARGET_64BIT"
- "stvx %0,0,%1"
- [(set_attr "type" "vecstore")])
+; The following patterns embody what stvx should usually look like.
+(define_expand "altivec_stvx_<VM2:mode>"
+ [(set (match_operand:VM2 1 "altivec_indexed_or_indirect_operand")
+ (match_operand:VM2 0 "register_operand"))]
+ "TARGET_ALTIVEC"
+{
+ rtx addr = XEXP (operand1, 0);
+ if (GET_CODE (addr) == PLUS
+ && REG_P (XEXP (addr, 0))
+ && REG_P (XEXP (addr, 1)))
+ {
+ rtx op1 = XEXP (addr, 0);
+ rtx op2 = XEXP (addr, 1);
+ if (TARGET_64BIT)
+ emit_insn (gen_altivec_stvx_<VM2:mode>_2op_di (operand0, op1, op2));
+ else
+ emit_insn (gen_altivec_stvx_<VM2:mode>_2op_si (operand0, op1, op2));
+ }
+ else
+ {
+ if (TARGET_64BIT)
+ emit_insn (gen_altivec_stvx_<VM2:mode>_1op_di (operand0, addr));
+ else
+ emit_insn (gen_altivec_stvx_<VM2:mode>_1op_si (operand0, addr));
+ }
+ DONE;
+})
-; 32-bit versions of the above.
-(define_insn "altivec_stvx_<mode>_2op_si"
- [(set (mem:VM2 (and:SI (plus:SI (match_operand:SI 1 "register_operand" "b")
- (match_operand:SI 2 "register_operand" "r"))
- (const_int -16)))
- (match_operand:VM2 0 "register_operand" "v"))]
- "TARGET_ALTIVEC && TARGET_32BIT"
+; The next two patterns embody what stvx should usually look like.
+(define_insn "altivec_stvx_<VM2:mode>_2op_<P:mptrsize>"
+ [(set (mem:VM2 (and:P (plus:P (match_operand:P 1 "register_operand" "b")
+ (match_operand:P 2 "register_operand" "r"))
+ (const_int -16)))
+ (match_operand:VM2 0 "register_operand" "v"))]
+ "TARGET_ALTIVEC"
"stvx %0,%1,%2"
[(set_attr "type" "vecstore")])
-(define_insn "altivec_stvx_<mode>_1op_si"
- [(set (mem:VM2 (and:SI (match_operand:SI 1 "register_operand" "r")
- (const_int -16)))
- (match_operand:VM2 0 "register_operand" "v"))]
- "TARGET_ALTIVEC && TARGET_32BIT"
+(define_insn "altivec_stvx_<VM2:mode>_1op_<P:mptrsize>"
+ [(set (mem:VM2 (and:P (match_operand:P 1 "register_operand" "r")
+ (const_int -16)))
+ (match_operand:VM2 0 "register_operand" "v"))]
+ "TARGET_ALTIVEC"
"stvx %0,0,%1"
[(set_attr "type" "vecstore")])
diff --git a/gcc/config/rs6000/rs6000-builtin.def b/gcc/config/rs6000/rs6000-builtin.def
index 46ae21a6120..2cc07c6b5ae 100644
--- a/gcc/config/rs6000/rs6000-builtin.def
+++ b/gcc/config/rs6000/rs6000-builtin.def
@@ -1,5 +1,5 @@
/* Builtin functions for rs6000/powerpc.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
Contributed by Michael Meissner (meissner@linux.vnet.ibm.com)
This file is part of GCC.
@@ -659,6 +659,14 @@
| RS6000_BTC_BINARY), \
CODE_FOR_ ## ICODE) /* ICODE */
+#define BU_P7_POWERPC64_MISC_2(ENUM, NAME, ATTR, ICODE) \
+ RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
+ "__builtin_" NAME, /* NAME */ \
+ RS6000_BTM_POPCNTD /* MASK */ \
+ | RS6000_BTM_POWERPC64, \
+ (RS6000_BTC_ ## ATTR /* ATTR */ \
+ | RS6000_BTC_BINARY), \
+ CODE_FOR_ ## ICODE) /* ICODE */
/* Miscellaneous builtins for instructions added in ISA 2.07. These
instructions do require the ISA 2.07 vector support, but they aren't vector
@@ -2034,8 +2042,6 @@ BU_P9V_AV_2 (VEXTUWRX, "vextuwrx", CONST, vextuwrx)
/* Insert/extract 4 byte word into a vector. */
BU_P9V_VSX_2 (VEXTRACT4B, "vextract4b", CONST, vextract4b)
-BU_P9V_VSX_3 (VINSERT4B, "vinsert4b", CONST, vinsert4b)
-BU_P9V_VSX_3 (VINSERT4B_DI, "vinsert4b_di", CONST, vinsert4b_di)
BU_P9V_VSX_3 (INSERT4B, "insert4b", CONST, insert4b)
BU_P9V_VSX_2 (EXTRACT4B, "extract4b", CONST, extract4b)
@@ -2090,7 +2096,6 @@ BU_P9V_OVERLOAD_2 (EXTRACT4B, "extract4b")
/* ISA 3.0 Vector scalar overloaded 3 argument functions */
BU_P9V_OVERLOAD_3 (STXVL, "stxvl")
-BU_P9V_OVERLOAD_3 (VINSERT4B, "vinsert4b")
BU_P9V_OVERLOAD_3 (INSERT4B, "insert4b")
/* Overloaded CMPNE support was implemented prior to Power 9,
@@ -2107,13 +2112,9 @@ BU_P9V_OVERLOAD_1 (VCTZLSBB, "vctzlsbb")
/* 2 argument extended divide functions added in ISA 2.06. */
BU_P7_MISC_2 (DIVWE, "divwe", CONST, dive_si)
-BU_P7_MISC_2 (DIVWEO, "divweo", CONST, diveo_si)
BU_P7_MISC_2 (DIVWEU, "divweu", CONST, diveu_si)
-BU_P7_MISC_2 (DIVWEUO, "divweuo", CONST, diveuo_si)
-BU_P7_MISC_2 (DIVDE, "divde", CONST, dive_di)
-BU_P7_MISC_2 (DIVDEO, "divdeo", CONST, diveo_di)
-BU_P7_MISC_2 (DIVDEU, "divdeu", CONST, diveu_di)
-BU_P7_MISC_2 (DIVDEUO, "divdeuo", CONST, diveuo_di)
+BU_P7_POWERPC64_MISC_2 (DIVDE, "divde", CONST, dive_di)
+BU_P7_POWERPC64_MISC_2 (DIVDEU, "divdeu", CONST, diveu_di)
/* 1 argument DFP (decimal floating point) functions added in ISA 2.05. */
BU_DFP_MISC_1 (DXEX, "dxex", CONST, dfp_dxex_dd)
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index c3134fce60d..516db05da8f 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -2393,7 +2393,7 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
RS6000_BTI_unsigned_V8HI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
{ ALTIVEC_BUILTIN_VEC_PACKSU, P8V_BUILTIN_VPKSDUS,
RS6000_BTI_unsigned_V4SI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
- { ALTIVEC_BUILTIN_VEC_PACKSU, P8V_BUILTIN_VPKSDUS,
+ { ALTIVEC_BUILTIN_VEC_PACKSU, P8V_BUILTIN_VPKUDUS,
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
{ ALTIVEC_BUILTIN_VEC_VPKSWUS, ALTIVEC_BUILTIN_VPKSWUS,
RS6000_BTI_unsigned_V8HI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
@@ -5109,27 +5109,6 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
{ P9V_BUILTIN_VEC_INSERT4B, P9V_BUILTIN_INSERT4B,
RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V4SI,
RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI },
- { P9V_BUILTIN_VEC_VINSERT4B, P9V_BUILTIN_VINSERT4B,
- RS6000_BTI_V16QI, RS6000_BTI_V4SI,
- RS6000_BTI_V16QI, RS6000_BTI_UINTSI },
- { P9V_BUILTIN_VEC_VINSERT4B, P9V_BUILTIN_VINSERT4B,
- RS6000_BTI_V16QI, RS6000_BTI_unsigned_V4SI,
- RS6000_BTI_V16QI, RS6000_BTI_UINTSI },
- { P9V_BUILTIN_VEC_VINSERT4B, P9V_BUILTIN_VINSERT4B,
- RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V4SI,
- RS6000_BTI_unsigned_V16QI, RS6000_BTI_UINTSI },
- { P9V_BUILTIN_VEC_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
- RS6000_BTI_V16QI, RS6000_BTI_INTDI,
- RS6000_BTI_V16QI, RS6000_BTI_UINTDI },
- { P9V_BUILTIN_VEC_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
- RS6000_BTI_V16QI, RS6000_BTI_UINTDI,
- RS6000_BTI_V16QI, RS6000_BTI_UINTDI },
- { P9V_BUILTIN_VEC_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
- RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTDI,
- RS6000_BTI_unsigned_V16QI, RS6000_BTI_UINTDI },
- { P9V_BUILTIN_VEC_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
- RS6000_BTI_unsigned_V16QI, RS6000_BTI_UINTDI,
- RS6000_BTI_unsigned_V16QI, RS6000_BTI_UINTDI },
{ P8V_BUILTIN_VEC_VADDECUQ, P8V_BUILTIN_VADDECUQ,
RS6000_BTI_V1TI, RS6000_BTI_V1TI, RS6000_BTI_V1TI, RS6000_BTI_V1TI },
@@ -6096,6 +6075,15 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
stmt = build_binary_op (loc, PLUS_EXPR, stmt, arg2, 1);
stmt = build_indirect_ref (loc, stmt, RO_NULL);
+ /* PR83660: We mark this as having side effects so that
+ downstream in fold_build_cleanup_point_expr () it will get a
+ CLEANUP_POINT_EXPR. If it does not we can run into an ICE
+ later in gimplify_cleanup_point_expr (). Potentially this
+ causes missed optimization because the actually is no side
+ effect. */
+ if (c_dialect_cxx ())
+ TREE_SIDE_EFFECTS (stmt) = 1;
+
return stmt;
}
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 86e410e4bdf..dcb483dea51 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on IBM RS/6000.
- Copyright (C) 1991-2017 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GCC.
@@ -1372,6 +1372,7 @@ static rtx rs6000_debug_legitimize_reload_address (rtx, machine_mode, int,
int, int, int *);
static bool rs6000_mode_dependent_address (const_rtx);
static bool rs6000_debug_mode_dependent_address (const_rtx);
+static bool rs6000_offsettable_memref_p (rtx, machine_mode, bool);
static enum reg_class rs6000_secondary_reload_class (enum reg_class,
machine_mode, rtx);
static enum reg_class rs6000_debug_secondary_reload_class (enum reg_class,
@@ -3890,6 +3891,7 @@ rs6000_builtin_mask_calculate (void)
| ((TARGET_P9_MISC) ? RS6000_BTM_P9_MISC : 0)
| ((TARGET_MODULO) ? RS6000_BTM_MODULO : 0)
| ((TARGET_64BIT) ? RS6000_BTM_64BIT : 0)
+ | ((TARGET_POWERPC64) ? RS6000_BTM_POWERPC64 : 0)
| ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0)
| ((TARGET_HTM) ? RS6000_BTM_HTM : 0)
| ((TARGET_DFP) ? RS6000_BTM_DFP : 0)
@@ -8563,10 +8565,15 @@ mem_operand_gpr (rtx op, machine_mode mode)
int extra;
rtx addr = XEXP (op, 0);
- /* Don't allow altivec type addresses like (mem (and (plus ...))).
- See PR target/84279. */
+ /* PR85755: Allow PRE_INC and PRE_DEC addresses. */
+ if (TARGET_UPDATE
+ && (GET_CODE (addr) == PRE_INC || GET_CODE (addr) == PRE_DEC)
+ && mode_supports_pre_incdec_p (mode)
+ && legitimate_indirect_address_p (XEXP (addr, 0), false))
+ return true;
- if (GET_CODE (addr) == AND)
+ /* Don't allow non-offsettable addresses. See PRs 83969 and 84279. */
+ if (!rs6000_offsettable_memref_p (op, mode, false))
return false;
op = address_offset (addr);
@@ -10339,7 +10346,7 @@ rs6000_find_base_term (rtx op)
in 32-bit mode, that the recog predicate rejects. */
static bool
-rs6000_offsettable_memref_p (rtx op, machine_mode reg_mode)
+rs6000_offsettable_memref_p (rtx op, machine_mode reg_mode, bool strict)
{
bool worst_case;
@@ -10347,7 +10354,7 @@ rs6000_offsettable_memref_p (rtx op, machine_mode reg_mode)
return false;
/* First mimic offsettable_memref_p. */
- if (offsettable_address_p (true, GET_MODE (op), XEXP (op, 0)))
+ if (offsettable_address_p (strict, GET_MODE (op), XEXP (op, 0)))
return true;
/* offsettable_address_p invokes rs6000_mode_dependent_address, but
@@ -10361,7 +10368,7 @@ rs6000_offsettable_memref_p (rtx op, machine_mode reg_mode)
worst_case = ((TARGET_POWERPC64 && GET_MODE_CLASS (reg_mode) == MODE_INT)
|| GET_MODE_SIZE (reg_mode) == 4);
return rs6000_legitimate_offset_address_p (GET_MODE (op), XEXP (op, 0),
- true, worst_case);
+ strict, worst_case);
}
/* Determine the reassociation width to be used in reassociate_bb.
@@ -14117,6 +14124,7 @@ rs6000_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
tree copy = build_call_expr (builtin_decl_implicit (BUILT_IN_MEMCPY),
3, dest_addr, addr, size_int (rsize * 4));
+ TREE_ADDRESSABLE (tmp) = 1;
gimplify_and_add (copy, pre_p);
addr = dest_addr;
@@ -15098,12 +15106,12 @@ altivec_expand_lv_builtin (enum insn_code icode, tree exp, rtx target, bool blk)
/* For LVX, express the RTL accurately by ANDing the address with -16.
LVXL and LVE*X expand to use UNSPECs to hide their special behavior,
so the raw address is fine. */
- if (icode == CODE_FOR_altivec_lvx_v2df_2op
- || icode == CODE_FOR_altivec_lvx_v2di_2op
- || icode == CODE_FOR_altivec_lvx_v4sf_2op
- || icode == CODE_FOR_altivec_lvx_v4si_2op
- || icode == CODE_FOR_altivec_lvx_v8hi_2op
- || icode == CODE_FOR_altivec_lvx_v16qi_2op)
+ if (icode == CODE_FOR_altivec_lvx_v2df
+ || icode == CODE_FOR_altivec_lvx_v2di
+ || icode == CODE_FOR_altivec_lvx_v4sf
+ || icode == CODE_FOR_altivec_lvx_v4si
+ || icode == CODE_FOR_altivec_lvx_v8hi
+ || icode == CODE_FOR_altivec_lvx_v16qi)
{
rtx rawaddr;
if (op0 == const0_rtx)
@@ -15289,12 +15297,12 @@ altivec_expand_stv_builtin (enum insn_code icode, tree exp)
/* For STVX, express the RTL accurately by ANDing the address with -16.
STVXL and STVE*X expand to use UNSPECs to hide their special behavior,
so the raw address is fine. */
- if (icode == CODE_FOR_altivec_stvx_v2df_2op
- || icode == CODE_FOR_altivec_stvx_v2di_2op
- || icode == CODE_FOR_altivec_stvx_v4sf_2op
- || icode == CODE_FOR_altivec_stvx_v4si_2op
- || icode == CODE_FOR_altivec_stvx_v8hi_2op
- || icode == CODE_FOR_altivec_stvx_v16qi_2op)
+ if (icode == CODE_FOR_altivec_stvx_v2df
+ || icode == CODE_FOR_altivec_stvx_v2di
+ || icode == CODE_FOR_altivec_stvx_v4sf
+ || icode == CODE_FOR_altivec_stvx_v4si
+ || icode == CODE_FOR_altivec_stvx_v8hi
+ || icode == CODE_FOR_altivec_stvx_v16qi)
{
if (op1 == const0_rtx)
rawaddr = op2;
@@ -16195,18 +16203,18 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp)
switch (fcode)
{
case ALTIVEC_BUILTIN_STVX_V2DF:
- return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v2df_2op, exp);
+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v2df, exp);
case ALTIVEC_BUILTIN_STVX_V2DI:
- return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v2di_2op, exp);
+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v2di, exp);
case ALTIVEC_BUILTIN_STVX_V4SF:
- return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v4sf_2op, exp);
+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v4sf, exp);
case ALTIVEC_BUILTIN_STVX:
case ALTIVEC_BUILTIN_STVX_V4SI:
- return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v4si_2op, exp);
+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v4si, exp);
case ALTIVEC_BUILTIN_STVX_V8HI:
- return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v8hi_2op, exp);
+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v8hi, exp);
case ALTIVEC_BUILTIN_STVX_V16QI:
- return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v16qi_2op, exp);
+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v16qi, exp);
case ALTIVEC_BUILTIN_STVEBX:
return altivec_expand_stv_builtin (CODE_FOR_altivec_stvebx, exp);
case ALTIVEC_BUILTIN_STVEHX:
@@ -16400,9 +16408,6 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp)
}
break;
- case P9V_BUILTIN_VINSERT4B:
- case P9V_BUILTIN_VINSERT4B_DI:
- case P9V_BUILTIN_VEC_VINSERT4B:
case P9V_BUILTIN_VEC_INSERT4B:
arg2 = CALL_EXPR_ARG (exp, 2);
STRIP_NOPS (arg2);
@@ -16413,7 +16418,7 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp)
if (TREE_CODE (arg2) != INTEGER_CST || TREE_INT_CST_LOW (arg2) > 12)
{
- error ("third argument to vec_vinsert4b must be 0..12");
+ error ("third argument to vec_insert4b must be 0..12");
return expand_call (exp, target, false);
}
break;
@@ -16473,23 +16478,23 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp)
return altivec_expand_lv_builtin (CODE_FOR_altivec_lvxl_v16qi,
exp, target, false);
case ALTIVEC_BUILTIN_LVX_V2DF:
- return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v2df_2op,
+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v2df,
exp, target, false);
case ALTIVEC_BUILTIN_LVX_V2DI:
- return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v2di_2op,
+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v2di,
exp, target, false);
case ALTIVEC_BUILTIN_LVX_V4SF:
- return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v4sf_2op,
+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v4sf,
exp, target, false);
case ALTIVEC_BUILTIN_LVX:
case ALTIVEC_BUILTIN_LVX_V4SI:
- return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v4si_2op,
+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v4si,
exp, target, false);
case ALTIVEC_BUILTIN_LVX_V8HI:
- return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v8hi_2op,
+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v8hi,
exp, target, false);
case ALTIVEC_BUILTIN_LVX_V16QI:
- return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v16qi_2op,
+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v16qi,
exp, target, false);
case ALTIVEC_BUILTIN_LVLX:
return altivec_expand_lv_builtin (CODE_FOR_altivec_lvlx,
@@ -17053,6 +17058,11 @@ rs6000_invalid_builtin (enum rs6000_builtins fncode)
error ("Builtin function %s requires the -mhard-float option", name);
else if ((fnmask & RS6000_BTM_FLOAT128) != 0)
error ("Builtin function %s requires the -mfloat128 option", name);
+ else if ((fnmask & (RS6000_BTM_POPCNTD | RS6000_BTM_POWERPC64))
+ == (RS6000_BTM_POPCNTD | RS6000_BTM_POWERPC64))
+ error ("builtin function %qs requires the %qs (or newer), and "
+ "%qs or %qs options",
+ name, "-mcpu=power7", "-m64", "-mpowerpc64");
else
error ("Builtin function %s is not supported with the current options",
name);
@@ -18817,9 +18827,7 @@ builtin_function_type (machine_mode mode_ret, machine_mode mode_arg0,
case CRYPTO_BUILTIN_VPMSUM:
case MISC_BUILTIN_ADDG6S:
case MISC_BUILTIN_DIVWEU:
- case MISC_BUILTIN_DIVWEUO:
case MISC_BUILTIN_DIVDEU:
- case MISC_BUILTIN_DIVDEUO:
h.uns_p[0] = 1;
h.uns_p[1] = 1;
h.uns_p[2] = 1;
@@ -23280,7 +23288,7 @@ rs6000_output_move_128bit (rtx operands[])
}
else if (TARGET_ALTIVEC && src_vmx_p
- && altivec_indexed_or_indirect_operand (src, mode))
+ && altivec_indexed_or_indirect_operand (dest, mode))
return "stvx %1,%y0";
else if (TARGET_VSX && src_vsx_p)
@@ -26558,7 +26566,7 @@ rs6000_split_multireg_move (rtx dst, rtx src)
emit_insn (gen_add3_insn (breg, breg, delta_rtx));
src = replace_equiv_address (src, breg);
}
- else if (! rs6000_offsettable_memref_p (src, reg_mode))
+ else if (! rs6000_offsettable_memref_p (src, reg_mode, true))
{
if (GET_CODE (XEXP (src, 0)) == PRE_MODIFY)
{
@@ -26625,7 +26633,7 @@ rs6000_split_multireg_move (rtx dst, rtx src)
emit_insn (gen_add3_insn (breg, breg, delta_rtx));
dst = replace_equiv_address (dst, breg);
}
- else if (!rs6000_offsettable_memref_p (dst, reg_mode)
+ else if (!rs6000_offsettable_memref_p (dst, reg_mode, true)
&& GET_CODE (XEXP (dst, 0)) != LO_SUM)
{
if (GET_CODE (XEXP (dst, 0)) == PRE_MODIFY)
@@ -26664,7 +26672,7 @@ rs6000_split_multireg_move (rtx dst, rtx src)
}
}
else if (GET_CODE (XEXP (dst, 0)) != LO_SUM)
- gcc_assert (rs6000_offsettable_memref_p (dst, reg_mode));
+ gcc_assert (rs6000_offsettable_memref_p (dst, reg_mode, true));
}
for (i = 0; i < nregs; i++)
@@ -35886,6 +35894,11 @@ rs6000_elf_in_small_data_p (const_tree decl)
}
else
{
+ /* If we are told not to put readonly data in sdata, then don't. */
+ if (TREE_READONLY (decl) && rs6000_sdata != SDATA_EABI
+ && !rs6000_readonly_in_sdata)
+ return false;
+
HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl));
if (size > 0
@@ -39423,6 +39436,7 @@ static struct rs6000_opt_mask const rs6000_builtin_mask_names[] =
{ "hard-dfp", RS6000_BTM_DFP, false, false },
{ "hard-float", RS6000_BTM_HARD_FLOAT, false, false },
{ "long-double-128", RS6000_BTM_LDBL128, false, false },
+ { "powerpc64", RS6000_BTM_POWERPC64, false, false },
{ "float128", RS6000_BTM_FLOAT128, false, false },
};
@@ -42160,6 +42174,7 @@ rtx_is_swappable_p (rtx op, unsigned int *special)
case UNSPEC_VPERM_UNS:
case UNSPEC_VPERMHI:
case UNSPEC_VPERMSI:
+ case UNSPEC_VPERMXOR:
case UNSPEC_VPKPX:
case UNSPEC_VSLDOI:
case UNSPEC_VSLO:
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 3780a49d902..ba234fda718 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for IBM RS/6000.
- Copyright (C) 1992-2017 Free Software Foundation, Inc.
+ Copyright (C) 1992-2018 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GCC.
@@ -110,7 +110,8 @@
/* Common ASM definitions used by ASM_SPEC among the various targets for
handling -mcpu=xxx switches. There is a parallel list in driver-rs6000.c to
provide the default assembler options if the user uses -mcpu=native, so if
- you make changes here, make them also there. */
+ you make changes here, make them also there. PR63177: Do not pass -mpower8
+ to the assembler if -mpower9-vector was also used. */
#define ASM_CPU_SPEC \
"%{!mcpu*: \
%{mpowerpc64*: -mppc64} \
@@ -124,7 +125,7 @@
%{mcpu=power6: %(asm_cpu_power6) -maltivec} \
%{mcpu=power6x: %(asm_cpu_power6) -maltivec} \
%{mcpu=power7: %(asm_cpu_power7)} \
-%{mcpu=power8: %(asm_cpu_power8)} \
+%{mcpu=power8: %{!mpower9-vector: %(asm_cpu_power8)}} \
%{mcpu=power9: %(asm_cpu_power9)} \
%{mcpu=a2: -ma2} \
%{mcpu=powerpc: -mppc} \
@@ -173,6 +174,7 @@
%{maltivec: -maltivec} \
%{mvsx: -mvsx %{!maltivec: -maltivec} %{!mcpu*: %(asm_cpu_power7)}} \
%{mpower8-vector|mcrypto|mdirect-move|mhtm: %{!mcpu*: %(asm_cpu_power8)}} \
+%{mpower9-vector: %{!mcpu*|mcpu=power8: %(asm_cpu_power9)}} \
-many"
#define CPP_DEFAULT_SPEC ""
@@ -2735,6 +2737,7 @@ extern int frame_pointer_needed;
#define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */
#define RS6000_BTM_LDBL128 MASK_MULTIPLE /* 128-bit long double. */
#define RS6000_BTM_64BIT MASK_64BIT /* 64-bit addressing. */
+#define RS6000_BTM_POWERPC64 MASK_POWERPC64 /* 64-bit registers. */
#define RS6000_BTM_FLOAT128 MASK_FLOAT128_TYPE /* IEEE 128-bit float. */
#define RS6000_BTM_COMMON (RS6000_BTM_ALTIVEC \
@@ -2754,6 +2757,7 @@ extern int frame_pointer_needed;
| RS6000_BTM_DFP \
| RS6000_BTM_HARD_FLOAT \
| RS6000_BTM_LDBL128 \
+ | RS6000_BTM_POWERPC64 \
| RS6000_BTM_FLOAT128)
/* Define builtin enum index. */
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 138b0c7e995..80f29e5b97d 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -1,5 +1,5 @@
;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler
-;; Copyright (C) 1990-2017 Free Software Foundation, Inc.
+;; Copyright (C) 1990-2018 Free Software Foundation, Inc.
;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
;; This file is part of GCC.
@@ -135,9 +135,7 @@
UNSPEC_CDTBCD
UNSPEC_CBCDTD
UNSPEC_DIVE
- UNSPEC_DIVEO
UNSPEC_DIVEU
- UNSPEC_DIVEUO
UNSPEC_UNPACK_128BIT
UNSPEC_PACK_128BIT
UNSPEC_LSQ
@@ -8642,14 +8640,14 @@
;; FPR->GPR GPR->FPR VSX->GPR GPR->VSX
(define_insn "*movdi_internal64"
[(set (match_operand:DI 0 "nonimmediate_operand"
- "=Y, r, r, r, r, r,
+ "=YZ, r, r, r, r, r,
^m, ^d, ^d, ^wY, $Z, $wb,
$wv, ^wi, *wo, *wo, *wv, *wi,
*wi, *wv, *wv, r, *h, *h,
?*r, ?*wg, ?*r, ?*wj")
(match_operand:DI 1 "input_operand"
- "r, Y, r, I, L, nF,
+ "r, YZ, r, I, L, nF,
d, m, d, wb, wv, wY,
Z, wi, Oj, wM, OjwM, Oj,
wM, wS, wB, *h, r, 0,
@@ -14449,14 +14447,10 @@
(set_attr "length" "4")])
(define_int_iterator UNSPEC_DIV_EXTEND [UNSPEC_DIVE
- UNSPEC_DIVEO
- UNSPEC_DIVEU
- UNSPEC_DIVEUO])
+ UNSPEC_DIVEU])
(define_int_attr div_extend [(UNSPEC_DIVE "e")
- (UNSPEC_DIVEO "eo")
- (UNSPEC_DIVEU "eu")
- (UNSPEC_DIVEUO "euo")])
+ (UNSPEC_DIVEU "eu")])
(define_insn "div<div_extend>_<mode>"
[(set (match_operand:GPR 0 "register_operand" "=r")
@@ -14535,16 +14529,14 @@
(set_attr "length" "4")])
(define_insn_and_split "pack<mode>"
- [(set (match_operand:FMOVE128 0 "register_operand" "=d,&d")
+ [(set (match_operand:FMOVE128 0 "register_operand" "=&d")
(unspec:FMOVE128
- [(match_operand:<FP128_64> 1 "register_operand" "0,d")
- (match_operand:<FP128_64> 2 "register_operand" "d,d")]
+ [(match_operand:<FP128_64> 1 "register_operand" "d")
+ (match_operand:<FP128_64> 2 "register_operand" "d")]
UNSPEC_PACK_128BIT))]
"FLOAT128_2REG_P (<MODE>mode)"
- "@
- fmr %L0,%2
- #"
- "&& reload_completed && REGNO (operands[0]) != REGNO (operands[1])"
+ "#"
+ "&& reload_completed"
[(set (match_dup 3) (match_dup 1))
(set (match_dup 4) (match_dup 2))]
{
@@ -14557,8 +14549,8 @@
operands[3] = gen_rtx_REG (<FP128_64>mode, dest_hi);
operands[4] = gen_rtx_REG (<FP128_64>mode, dest_lo);
}
- [(set_attr "type" "fpsimple,fp")
- (set_attr "length" "4,8")])
+ [(set_attr "type" "fp")
+ (set_attr "length" "8")])
(define_insn "unpack<mode>"
[(set (match_operand:DI 0 "register_operand" "=d,d")
diff --git a/gcc/config/rs6000/sysv4.opt b/gcc/config/rs6000/sysv4.opt
index 423300b8148..1492871da7d 100644
--- a/gcc/config/rs6000/sysv4.opt
+++ b/gcc/config/rs6000/sysv4.opt
@@ -27,6 +27,10 @@ msdata=
Target RejectNegative Joined Var(rs6000_sdata_name)
Select method for sdata handling.
+mreadonly-in-sdata
+Target Report Var(rs6000_readonly_in_sdata) Init(1) Save
+Allow readonly data in sdata.
+
mtls-size=
Target RejectNegative Joined Var(rs6000_tls_size) Enum(rs6000_tls_size)
Specify bit size of immediate TLS offsets.
diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md
index ea8169fabe0..a9ec9a9981a 100644
--- a/gcc/config/rs6000/vector.md
+++ b/gcc/config/rs6000/vector.md
@@ -180,12 +180,7 @@
operands[1] = rs6000_address_for_altivec (operands[1]);
rtx and_op = XEXP (operands[1], 0);
gcc_assert (GET_CODE (and_op) == AND);
- rtx addr = XEXP (and_op, 0);
- if (GET_CODE (addr) == PLUS)
- emit_insn (gen_altivec_lvx_<mode>_2op (operands[0], XEXP (addr, 0),
- XEXP (addr, 1)));
- else
- emit_insn (gen_altivec_lvx_<mode>_1op (operands[0], operands[1]));
+ emit_insn (gen_altivec_lvx_<mode> (operands[0], operands[1]));
DONE;
}
}")
@@ -203,12 +198,7 @@
operands[0] = rs6000_address_for_altivec (operands[0]);
rtx and_op = XEXP (operands[0], 0);
gcc_assert (GET_CODE (and_op) == AND);
- rtx addr = XEXP (and_op, 0);
- if (GET_CODE (addr) == PLUS)
- emit_insn (gen_altivec_stvx_<mode>_2op (operands[1], XEXP (addr, 0),
- XEXP (addr, 1)));
- else
- emit_insn (gen_altivec_stvx_<mode>_1op (operands[1], operands[0]));
+ emit_insn (gen_altivec_stvx_<mode> (operands[1], operands[0]));
DONE;
}
}")
diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index c00238bf7a3..37d768fe570 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -157,6 +157,22 @@
(TF "wp")
(KF "wq")])
+;; A mode attribute to disparage use of GPR registers, except for scalar
+;; interger modes.
+(define_mode_attr ??r [(V16QI "??r")
+ (V8HI "??r")
+ (V4SI "??r")
+ (V4SF "??r")
+ (V2DI "??r")
+ (V2DF "??r")
+ (DI "r")
+ (DF "??r")
+ (SF "??r")
+ (V1TI "??r")
+ (TI "r")
+ (TF "??r")
+ (KF "??r")])
+
;; Same size integer type for floating point data
(define_mode_attr VSi [(V4SF "v4si")
(V2DF "v2di")
@@ -961,7 +977,7 @@
(define_insn "*vsx_mov<mode>_64bit"
[(set (match_operand:VSX_M 0 "nonimmediate_operand"
"=ZwO, <VSa>, <VSa>, r, we, ?wQ,
- ?&r, ??r, ??Y, ??r, wo, v,
+ ?&r, ??r, ??Y, <??r>, wo, v,
?<VSa>, *r, v, ??r, wZ, v")
(match_operand:VSX_M 1 "input_operand"
@@ -990,7 +1006,7 @@
;; LVX (VMX) STVX (VMX)
(define_insn "*vsx_mov<mode>_32bit"
[(set (match_operand:VSX_M 0 "nonimmediate_operand"
- "=ZwO, <VSa>, <VSa>, ??r, ??Y, ??r,
+ "=ZwO, <VSa>, <VSa>, ??r, ??Y, <??r>,
wo, v, ?<VSa>, *r, v, ??r,
wZ, v")
@@ -3930,7 +3946,7 @@
(match_operand:DI 2 "register_operand" "+r")]
UNSPEC_STXVL))]
"TARGET_P9_VECTOR && TARGET_64BIT"
- "sldi %2,%2\;stxvl %x0,%1,%2"
+ "sldi %2,%2,56\;stxvl %x0,%1,%2"
[(set_attr "length" "8")
(set_attr "type" "vecstore")])
@@ -4084,7 +4100,7 @@
;; Vector insert/extract word at arbitrary byte values. Note, the little
;; endian version needs to adjust the byte number, and the V4SI element in
-;; vinsert4b.
+;; insert4b.
(define_insn "extract4b"
[(set (match_operand:V2DI 0 "vsx_register_operand")
(unspec:V2DI [(match_operand:V16QI 1 "vsx_register_operand" "wa")
@@ -4164,56 +4180,6 @@
}
[(set_attr "type" "vecperm")])
-(define_expand "vinsert4b"
- [(set (match_operand:V16QI 0 "vsx_register_operand")
- (unspec:V16QI [(match_operand:V4SI 1 "vsx_register_operand")
- (match_operand:V16QI 2 "vsx_register_operand")
- (match_operand:QI 3 "const_0_to_12_operand")]
- UNSPEC_XXINSERTW))]
- "TARGET_P9_VECTOR"
-{
- if (!VECTOR_ELT_ORDER_BIG)
- {
- rtx op1 = operands[1];
- rtx v4si_tmp = gen_reg_rtx (V4SImode);
- emit_insn (gen_vsx_xxpermdi_v4si_be (v4si_tmp, op1, op1, const1_rtx));
- operands[1] = v4si_tmp;
- operands[3] = GEN_INT (12 - INTVAL (operands[3]));
- }
-})
-
-(define_insn "*vinsert4b_internal"
- [(set (match_operand:V16QI 0 "vsx_register_operand" "=wa")
- (unspec:V16QI [(match_operand:V4SI 1 "vsx_register_operand" "wa")
- (match_operand:V16QI 2 "vsx_register_operand" "0")
- (match_operand:QI 3 "const_0_to_12_operand" "n")]
- UNSPEC_XXINSERTW))]
- "TARGET_P9_VECTOR"
- "xxinsertw %x0,%x1,%3"
- [(set_attr "type" "vecperm")])
-
-(define_expand "vinsert4b_di"
- [(set (match_operand:V16QI 0 "vsx_register_operand")
- (unspec:V16QI [(match_operand:DI 1 "vsx_register_operand")
- (match_operand:V16QI 2 "vsx_register_operand")
- (match_operand:QI 3 "const_0_to_12_operand")]
- UNSPEC_XXINSERTW))]
- "TARGET_P9_VECTOR"
-{
- if (!VECTOR_ELT_ORDER_BIG)
- operands[3] = GEN_INT (12 - INTVAL (operands[3]));
-})
-
-(define_insn "*vinsert4b_di_internal"
- [(set (match_operand:V16QI 0 "vsx_register_operand" "=wa")
- (unspec:V16QI [(match_operand:DI 1 "vsx_register_operand" "wj")
- (match_operand:V16QI 2 "vsx_register_operand" "0")
- (match_operand:QI 3 "const_0_to_12_operand" "n")]
- UNSPEC_XXINSERTW))]
- "TARGET_P9_VECTOR"
- "xxinsertw %x0,%x1,%3"
- [(set_attr "type" "vecperm")])
-
;; Support for ISA 3.0 vector byte reverse
diff --git a/gcc/config/rtems.h b/gcc/config/rtems.h
index 439199d4cbb..35026efa2c7 100644
--- a/gcc/config/rtems.h
+++ b/gcc/config/rtems.h
@@ -48,3 +48,7 @@
-latomic -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}"
#define TARGET_POSIX_IO
+
+/* Prefer int for int32_t (see stdint-newlib.h). */
+#undef STDINT_LONG32
+#define STDINT_LONG32 (INT_TYPE_SIZE != 32 && LONG_TYPE_SIZE == 32)
diff --git a/gcc/config/s390/s390-builtin-types.def b/gcc/config/s390/s390-builtin-types.def
index b7f33030eb9..915b050b2fb 100644
--- a/gcc/config/s390/s390-builtin-types.def
+++ b/gcc/config/s390/s390-builtin-types.def
@@ -124,6 +124,7 @@ DEF_OPAQUE_VECTOR_TYPE (BT_OUV4SI, BT_UINT, 4)
DEF_OPAQUE_VECTOR_TYPE (BT_BV4SI, BT_BINT, 4)
DEF_FN_TYPE_0 (BT_FN_INT, BT_INT)
DEF_FN_TYPE_0 (BT_FN_UINT, BT_UINT)
+DEF_FN_TYPE_0 (BT_FN_VOID, BT_VOID)
DEF_FN_TYPE_1 (BT_FN_INT_INT, BT_INT, BT_INT)
DEF_FN_TYPE_1 (BT_FN_INT_VOIDPTR, BT_INT, BT_VOIDPTR)
DEF_FN_TYPE_1 (BT_FN_OV4SI_INT, BT_OV4SI, BT_INT)
diff --git a/gcc/config/s390/s390-builtins.def b/gcc/config/s390/s390-builtins.def
index 9046cb08f94..c2f278dc9c3 100644
--- a/gcc/config/s390/s390-builtins.def
+++ b/gcc/config/s390/s390-builtins.def
@@ -294,7 +294,7 @@
flags: Flags applying to all its variants should be mentioned in the OB_DEF line instead. */
-B_DEF (tbeginc, tbeginc, 0, B_HTM, 0, BT_FN_INT)
+B_DEF (tbeginc, tbeginc, 0, B_HTM, 0, BT_FN_VOID)
B_DEF (tbegin, tbegin, returns_twice_attr, B_HTM, 0, BT_FN_INT_VOIDPTR)
B_DEF (tbegin_nofloat, tbegin_nofloat, returns_twice_attr, B_HTM, 0, BT_FN_INT_VOIDPTR)
B_DEF (tbegin_retry, tbegin_retry, returns_twice_attr, B_HTM, 0, BT_FN_INT_VOIDPTR_INT)
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 5b3a7cefd3d..3a850342ea7 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -16173,7 +16173,7 @@ s390_output_indirect_thunk_function (unsigned int regno, bool z10_p)
Stopping in the thunk: backtrace will point to the thunk target
is if it was interrupted by a signal. For a call this means that
the call chain will be: caller->callee->thunk */
- if (flag_asynchronous_unwind_tables)
+ if (flag_asynchronous_unwind_tables && flag_dwarf2_cfi_asm)
{
fputs ("\t.cfi_signal_frame\n", asm_out_file);
fprintf (asm_out_file, "\t.cfi_return_column %d\n", regno);
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 68e3876f51d..f204204b435 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -205,7 +205,7 @@ enum processor_flags
#define OPTION_DEFAULT_SPECS \
{ "mode", "%{!mesa:%{!mzarch:-m%(VALUE)}}" }, \
{ "arch", "%{!march=*:-march=%(VALUE)}" }, \
- { "tune", "%{!mtune=*:-mtune=%(VALUE)}" }
+ { "tune", "%{!mtune=*:%{!march=*:-mtune=%(VALUE)}}" }
#ifdef __s390__
extern const char *s390_host_detect_local_cpu (int argc, const char **argv);
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index b28d1570990..af56ddd8432 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -2188,7 +2188,7 @@ sparc_expand_move (machine_mode mode, rtx *operands)
}
}
- /* Fixup TLS cases. */
+ /* Fix up TLS cases. */
if (TARGET_HAVE_TLS
&& CONSTANT_P (operands[1])
&& sparc_tls_referenced_p (operands [1]))
@@ -2197,15 +2197,20 @@ sparc_expand_move (machine_mode mode, rtx *operands)
return false;
}
- /* Fixup PIC cases. */
+ /* Fix up PIC cases. */
if (flag_pic && CONSTANT_P (operands[1]))
{
if (pic_address_needs_scratch (operands[1]))
operands[1] = sparc_legitimize_pic_address (operands[1], NULL_RTX);
/* We cannot use the mov{si,di}_pic_label_ref patterns in all cases. */
- if (GET_CODE (operands[1]) == LABEL_REF
- && can_use_mov_pic_label_ref (operands[1]))
+ if ((GET_CODE (operands[1]) == LABEL_REF
+ && can_use_mov_pic_label_ref (operands[1]))
+ || (GET_CODE (operands[1]) == CONST
+ && GET_CODE (XEXP (operands[1], 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == LABEL_REF
+ && GET_CODE (XEXP (XEXP (operands[1], 0), 1)) == CONST_INT
+ && can_use_mov_pic_label_ref (XEXP (XEXP (operands[1], 0), 0))))
{
if (mode == SImode)
{
@@ -2215,7 +2220,6 @@ sparc_expand_move (machine_mode mode, rtx *operands)
if (mode == DImode)
{
- gcc_assert (TARGET_ARCH64);
emit_insn (gen_movdi_pic_label_ref (operands[0], operands[1]));
return true;
}
@@ -4216,10 +4220,11 @@ int
pic_address_needs_scratch (rtx x)
{
/* An address which is a symbolic plus a non SMALL_INT needs a temp reg. */
- if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS
+ if (GET_CODE (x) == CONST
+ && GET_CODE (XEXP (x, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF
&& GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT
- && ! SMALL_INT (XEXP (XEXP (x, 0), 1)))
+ && !SMALL_INT (XEXP (XEXP (x, 0), 1)))
return 1;
return 0;
@@ -4667,16 +4672,15 @@ sparc_legitimize_tls_address (rtx addr)
static rtx
sparc_legitimize_pic_address (rtx orig, rtx reg)
{
- bool gotdata_op = false;
-
if (GET_CODE (orig) == SYMBOL_REF
/* See the comment in sparc_expand_move. */
|| (GET_CODE (orig) == LABEL_REF && !can_use_mov_pic_label_ref (orig)))
{
+ bool gotdata_op = false;
rtx pic_ref, address;
rtx_insn *insn;
- if (reg == 0)
+ if (!reg)
{
gcc_assert (can_create_pseudo_p ());
reg = gen_reg_rtx (Pmode);
@@ -4687,8 +4691,7 @@ sparc_legitimize_pic_address (rtx orig, rtx reg)
/* If not during reload, allocate another temp reg here for loading
in the address, so that these instructions can be optimized
properly. */
- rtx temp_reg = (! can_create_pseudo_p ()
- ? reg : gen_reg_rtx (Pmode));
+ rtx temp_reg = can_create_pseudo_p () ? gen_reg_rtx (Pmode) : reg;
/* Must put the SYMBOL_REF inside an UNSPEC here so that cse
won't get confused into thinking that these two instructions
@@ -4704,6 +4707,7 @@ sparc_legitimize_pic_address (rtx orig, rtx reg)
emit_insn (gen_movsi_high_pic (temp_reg, orig));
emit_insn (gen_movsi_lo_sum_pic (temp_reg, temp_reg, orig));
}
+
address = temp_reg;
gotdata_op = true;
}
@@ -4744,7 +4748,7 @@ sparc_legitimize_pic_address (rtx orig, rtx reg)
&& XEXP (XEXP (orig, 0), 0) == pic_offset_table_rtx)
return orig;
- if (reg == 0)
+ if (!reg)
{
gcc_assert (can_create_pseudo_p ());
reg = gen_reg_rtx (Pmode);
@@ -4853,7 +4857,11 @@ sparc_delegitimize_address (rtx x)
&& XINT (XEXP (XEXP (x, 1), 1), 1) == UNSPEC_MOVE_PIC_LABEL)
{
x = XVECEXP (XEXP (XEXP (x, 1), 1), 0, 0);
- gcc_assert (GET_CODE (x) == LABEL_REF);
+ gcc_assert (GET_CODE (x) == LABEL_REF
+ || (GET_CODE (x) == CONST
+ && GET_CODE (XEXP (x, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (x, 0), 0)) == LABEL_REF
+ && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT));
}
return x;
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 4ddbe56fbf4..55d41ef8dc7 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -1758,7 +1758,7 @@
(define_expand "movsi_pic_label_ref"
[(set (match_dup 3) (high:SI
- (unspec:SI [(match_operand:SI 1 "label_ref_operand" "")
+ (unspec:SI [(match_operand:SI 1 "symbolic_operand" "")
(match_dup 2)] UNSPEC_MOVE_PIC_LABEL)))
(set (match_dup 4) (lo_sum:SI (match_dup 3)
(unspec:SI [(match_dup 1) (match_dup 2)] UNSPEC_MOVE_PIC_LABEL)))
@@ -1784,7 +1784,7 @@
(define_insn "*movsi_high_pic_label_ref"
[(set (match_operand:SI 0 "register_operand" "=r")
(high:SI
- (unspec:SI [(match_operand:SI 1 "label_ref_operand" "")
+ (unspec:SI [(match_operand:SI 1 "symbolic_operand" "")
(match_operand:SI 2 "" "")] UNSPEC_MOVE_PIC_LABEL)))]
"flag_pic"
"sethi\t%%hi(%a2-(%a1-.)), %0")
@@ -1792,7 +1792,7 @@
(define_insn "*movsi_lo_sum_pic_label_ref"
[(set (match_operand:SI 0 "register_operand" "=r")
(lo_sum:SI (match_operand:SI 1 "register_operand" "r")
- (unspec:SI [(match_operand:SI 2 "label_ref_operand" "")
+ (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")
(match_operand:SI 3 "" "")] UNSPEC_MOVE_PIC_LABEL)))]
"flag_pic"
"or\t%1, %%lo(%a3-(%a2-.)), %0")
@@ -1896,7 +1896,7 @@ visl")
(define_expand "movdi_pic_label_ref"
[(set (match_dup 3) (high:DI
- (unspec:DI [(match_operand:DI 1 "label_ref_operand" "")
+ (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")
(match_dup 2)] UNSPEC_MOVE_PIC_LABEL)))
(set (match_dup 4) (lo_sum:DI (match_dup 3)
(unspec:DI [(match_dup 1) (match_dup 2)] UNSPEC_MOVE_PIC_LABEL)))
@@ -1922,7 +1922,7 @@ visl")
(define_insn "*movdi_high_pic_label_ref"
[(set (match_operand:DI 0 "register_operand" "=r")
(high:DI
- (unspec:DI [(match_operand:DI 1 "label_ref_operand" "")
+ (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")
(match_operand:DI 2 "" "")] UNSPEC_MOVE_PIC_LABEL)))]
"TARGET_ARCH64 && flag_pic"
"sethi\t%%hi(%a2-(%a1-.)), %0")
@@ -1930,7 +1930,7 @@ visl")
(define_insn "*movdi_lo_sum_pic_label_ref"
[(set (match_operand:DI 0 "register_operand" "=r")
(lo_sum:DI (match_operand:DI 1 "register_operand" "r")
- (unspec:DI [(match_operand:DI 2 "label_ref_operand" "")
+ (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")
(match_operand:DI 3 "" "")] UNSPEC_MOVE_PIC_LABEL)))]
"TARGET_ARCH64 && flag_pic"
"or\t%1, %%lo(%a3-(%a2-.)), %0")
diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
index d5596e25d82..0eba10b742c 100644
--- a/gcc/config/xtensa/xtensa.md
+++ b/gcc/config/xtensa/xtensa.md
@@ -38,6 +38,7 @@
(UNSPEC_MEMW 11)
(UNSPEC_LSETUP_START 12)
(UNSPEC_LSETUP_END 13)
+ (UNSPEC_FRAME_BLOCKAGE 14)
(UNSPECV_SET_FP 1)
(UNSPECV_ENTRY 2)
@@ -1676,6 +1677,32 @@
;; Miscellaneous instructions.
+;; In windowed ABI stack pointer adjustment must happen before any access
+;; to the space allocated on stack is allowed, otherwise register spill
+;; area may be clobbered. That's what frame blockage is supposed to enforce.
+
+(define_expand "allocate_stack"
+ [(set (match_operand 0 "nonimmed_operand")
+ (minus (reg A1_REG) (match_operand 1 "add_operand")))
+ (set (reg A1_REG)
+ (minus (reg A1_REG) (match_dup 1)))]
+ "TARGET_WINDOWED_ABI"
+{
+ if (CONST_INT_P (operands[1]))
+ {
+ rtx neg_op0 = GEN_INT (-INTVAL (operands[1]));
+ emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, neg_op0));
+ }
+ else
+ {
+ emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx,
+ operands[1]));
+ }
+ emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
+ emit_insn (gen_frame_blockage ());
+ DONE;
+})
+
(define_expand "prologue"
[(const_int 0)]
""
@@ -1767,6 +1794,25 @@
[(set_attr "length" "0")
(set_attr "type" "nop")])
+;; Do not schedule instructions accessing memory before this point.
+
+(define_expand "frame_blockage"
+ [(set (match_dup 0)
+ (unspec:BLK [(match_dup 1)] UNSPEC_FRAME_BLOCKAGE))]
+ ""
+{
+ operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
+ MEM_VOLATILE_P (operands[0]) = 1;
+ operands[1] = stack_pointer_rtx;
+})
+
+(define_insn "*frame_blockage"
+ [(set (match_operand:BLK 0 "" "")
+ (unspec:BLK [(match_operand:SI 1 "" "")] UNSPEC_FRAME_BLOCKAGE))]
+ ""
+ ""
+ [(set_attr "length" "0")])
+
(define_insn "trap"
[(trap_if (const_int 1) (const_int 0))]
""
diff --git a/gcc/configure b/gcc/configure
index 169498da4b4..64e85875115 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -11871,7 +11871,7 @@ EOF
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
@@ -25225,6 +25225,7 @@ $as_echo "#define HAVE_AS_SPARC5_VIS4 1" >>confdefs.h
fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for SPARC6 instructions" >&5
$as_echo_n "checking assembler for SPARC6 instructions... " >&6; }
if test "${gcc_cv_as_sparc_sparc6+set}" = set; then :
@@ -25261,6 +25262,7 @@ $as_echo "#define HAVE_AS_SPARC6 1" >>confdefs.h
fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for LEON instructions" >&5
$as_echo_n "checking assembler for LEON instructions... " >&6; }
if test "${gcc_cv_as_sparc_leon+set}" = set; then :
@@ -29810,8 +29812,10 @@ _ACEOF
# Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
# of jit/jit-playback.c.
+gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"`
+echo "gcc_driver_version: ${gcc_driver_version}"
cat > gcc-driver-name.h <<EOF
-#define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_BASEVER}${exeext}"
+#define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_driver_version}${exeext}"
EOF
# Check whether --enable-default-pie was given.
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 195d084b217..fd2b4f1bd13 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -6318,8 +6318,10 @@ AC_DEFINE_UNQUOTED(DIAGNOSTICS_COLOR_DEFAULT, $DIAGNOSTICS_COLOR_DEFAULT,
# Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
# of jit/jit-playback.c.
+gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"`
+echo "gcc_driver_version: ${gcc_driver_version}"
cat > gcc-driver-name.h <<EOF
-#define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_BASEVER}${exeext}"
+#define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_driver_version}${exeext}"
EOF
# Check whether --enable-default-pie was given.
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 63e0025dbb7..4cc49d77cff 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,333 @@
+2018-07-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/86378 - functional cast in noexcept-specifier.
+ * tree.c (strip_typedefs_expr) [TREE_LIST]: Fix iteration.
+
+2018-06-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/80290 - memory-hog with std::pair.
+ * pt.c (type_unification_real): Skip non-dependent conversion
+ check for a nested list argument.
+ (braced_init_depth): New.
+
+2018-06-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/86291
+ * parser.c (cp_parser_omp_for_loop_init): Change for_block argument
+ type from vec<tree, va_gc> * to vec<tree, va_gc> *&.
+
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-05-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85952
+ * init.c (build_aggr_init): For structured binding initialized from
+ array call mark_rvalue_use on the initializer.
+
+ 2018-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/85696
+ * cp-tree.h (cxx_omp_predetermined_sharing_1): New prototype.
+ * cp-gimplify.c (cxx_omp_predetermined_sharing): New wrapper around
+ cxx_omp_predetermined_sharing_1. Rename old function to ...
+ (cxx_omp_predetermined_sharing_1): ... this.
+ * semantics.c (finish_omp_clauses): Use cxx_omp_predetermined_sharing_1
+ instead of cxx_omp_predetermined_sharing.
+
+ 2018-05-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85662
+ * cp-gimplify.c (cp_fold): Use fold_offsetof rather than
+ fold_offsetof_1, pass TREE_TYPE (x) as TYPE to it and drop the
+ fold_convert.
+
+ 2018-04-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84463
+ * typeck.c (cp_build_addr_expr_1): Move handling of offsetof-like
+ tricks from here to ...
+ * cp-gimplify.c (cp_fold) <case ADDR_EXPR>: ... here. Only use it
+ if INDIRECT_REF's operand is INTEGER_CST cast to pointer type.
+
+ 2018-04-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85210
+ * pt.c (tsubst_decomp_names): Return error_mark_node and assert
+ errorcount is set if tsubst doesn't return a VAR_DECL.
+
+ 2018-04-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85208
+ * decl.c (start_decl): For DECL_DECOMPOSITION_P decls, don't call
+ maybe_apply_pragma_weak here...
+ (cp_maybe_mangle_decomp): ... but call it here instead.
+
+ 2018-04-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/85172
+ * constexpr.c (cxx_eval_builtin_function_call): For calls to
+ builtin_valid_in_constant_expr_p functions, don't call
+ cxx_eval_constant_expression if argument is not
+ potential_constant_expression.
+
+ 2018-04-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85147
+ * pt.c (fixed_parameter_pack_p_1): Punt if parm is error_mark_node.
+
+ PR c++/85140
+ * name-lookup.c (handle_namespace_attrs): Return early if attributes
+ is error_mark_node.
+
+ 2018-03-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84791
+ * semantics.c (finish_omp_reduction_clause): If
+ OMP_CLAUSE_REDUCTION_PLACEHOLDER is error_mark_node, return true
+ even if processing_template_decl.
+
+ 2018-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85076
+ * tree.c (cp_build_reference_type): If to_type is error_mark_node,
+ return it right away.
+
+ PR c++/85068
+ * class.c (update_vtable_entry_for_fn): Don't ICE if base_binfo
+ is NULL. Assert if thunk_binfo is NULL then errorcount is non-zero.
+
+ 2018-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84961
+ * cp-tree.h (genericize_compound_lvalue): Declare.
+ * typeck.c (genericize_compound_lvalue): New function.
+ (unary_complex_lvalue, cp_build_modify_expr): Use it.
+ * semantics.c (finish_asm_stmt): Replace MODIFY_EXPR, PREINCREMENT_EXPR
+ and PREDECREMENT_EXPR in output and "m" constrained input operands with
+ COMPOUND_EXPR. Call cxx_mark_addressable on the rightmost
+ COMPOUND_EXPR operand.
+
+ 2018-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84874
+ * decl.c (reshape_init_class): Don't assert d->cur->index == field
+ if d->cur->index is a FIELD_DECL, instead set field to d->cur->index.
+
+ 2018-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84222
+ * cp-tree.h (cp_warn_deprecated_use): Declare.
+ * tree.c (cp_warn_deprecated_use): New function.
+ * typeck2.c (build_functional_cast): Use it.
+ * decl.c (grokparms): Likewise.
+ (grokdeclarator): Likewise. Temporarily push nested class scope
+ around grokparms call for out of class member definitions.
+
+ 2018-03-09 Jason Merrill <jason@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84076
+ * call.c (convert_arg_to_ellipsis): Instead of cp_build_addr_expr
+ build ADDR_EXPR with REFERENCE_TYPE.
+ (build_over_call): For purposes of check_function_arguments, if
+ argarray[j] is ADDR_EXPR with REFERENCE_TYPE created above, use
+ its operand rather than the argument itself.
+
+ 2018-03-08 Jason Merrill <jason@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/80598
+ * call.c (build_over_call): In templates set TREE_USED (first_fn) when
+ not calling mark_used for the benefit of -Wunused-function warning.
+
+ 2018-03-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84662
+ * pt.c (tsubst_copy_and_build) <case TEMPLATE_ID_EXPR>: Use
+ RETURN instead of return.
+ <case POINTER_PLUS_EXPR>: Likewise.
+ <case CONVERT_EXPR>: If op0 is error_mark_node, just return
+ it instead of wrapping it into CONVERT_EXPR.
+
+2018-06-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/85815 - reference to member of enclosing template.
+ * parser.c (cp_parser_postfix_dot_deref_expression): Check
+ currently_open_class.
+
+ PR c++/86060 - ICE on range for with -std=c++98.
+ * parser.c (cp_parser_init_statement): Don't clobber *decl after
+ pedwarn.
+
+2018-05-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/85646 - lambda visibility.
+ * decl2.c (determine_visibility): Don't mess with template arguments
+ from the containing scope.
+ (vague_linkage_p): Check DECL_ABSTRACT_P before looking at a 'tor
+ thunk.
+
+2018-04-23 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ Backport from mainline
+ 2018-04-05 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ Implement P0969
+ * decl.c (find_decomp_class_base): Check accessibility instead
+ of declared access, adjust diagnostic.
+
+2018-04-23 Jakub Jelinek <jakub@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/85470 - wrong error with static data member.
+ * decl.c (check_initializer): Check DECL_INITIALIZED_IN_CLASS_P.
+ * typeck2.c (store_init_value): Likewise.
+
+2018-04-23 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ Backport from mainline
+ 2018-04-05 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ Implement P0961
+ * decl.c (get_tuple_decomp_init): Check the templatedness
+ of a member get.
+
+2018-04-19 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/85464 - missing location for -Wignored-qualifiers diagnostic
+ * decl.c (grokdeclarator): If declspecs->locations[ds_type_spec]
+ is UNKNOWN_LOCATION fall back to input_location.
+
+2018-04-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/85279 - dump_expr doesn't understand decltype.
+ * error.c (dump_expr): Handle DECLTYPE_TYPE.
+
+2018-04-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/82152 - ICE with class deduction and inherited ctor.
+ * pt.c (do_class_deduction): Ignore inherited ctors.
+
+ PR c++/84665 - ICE with array of empty class.
+ * decl2.c (cp_check_const_attributes): Use fold_non_dependent_expr.
+
+ PR c++/85006 - -fconcepts ICE with A<auto...> return type
+ * pt.c (tsubst_pack_expansion): Allow unsubstituted auto pack.
+
+2018-04-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/85118 - wrong error with generic lambda and std::bind.
+ * call.c (add_template_conv_candidate): Disable if there are any
+ call operators.
+
+ PR c++/85148 - ICE with 'this' in array NSDMI.
+ * tree.c (replace_placeholders_r): Use handled_component_p.
+
+2018-04-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/85113 - ICE with constexpr and __builtin_constant_p.
+ * constexpr.c (cxx_eval_builtin_function_call): Only defer
+ __builtin_constant_p if ctx->quiet.
+
+ * typeck.c (merge_types): Limit matching attribute shortcut to
+ the default case.
+
+ PR c++/64095 - auto... parameter pack.
+ * parser.c (cp_parser_parameter_declaration): Handle turning autos
+ into packs here.
+ (cp_parser_parameter_declaration_list): Not here.
+
+ PR c++/85060 - wrong-code with call to base member in template.
+ * search.c (any_dependent_bases_p): Check uses_template_parms
+ rather than processing_template_decl.
+
+2018-03-29 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ Backport from mainline
+ 2018-03-23 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ Implement P0962
+ * parser.c (cp_parser_perform_range_for_lookup): Change
+ the condition for deciding whether to use members.
+
+2018-03-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/78489 - Substitution in wrong order
+ PR c++/84489
+ * pt.c (type_unification_real): Revert last two changes.
+
+ PR c++/71834 - template-id with too few arguments.
+ * pt.c (coerce_template_parms): Make sure we gave an error.
+
+ PR c++/84937 - ICE with class deduction and auto.
+ * pt.c (rewrite_template_parm): Fix auto handling.
+
+ PR c++/80227 - SFINAE and negative array size.
+ * decl.c (compute_array_index_type): Convert to signed for negative
+ check.
+
+ PR c++/84839 - ICE with decltype of parameter pack.
+ * pt.c (tsubst_pack_expansion): Set cp_unevaluated_operand while
+ instantiating dummy parms.
+
+ PR c++/84798 - ICE with auto in abstract function declarator.
+ * parser.c (cp_parser_parameter_declaration_clause): Check
+ parser->default_arg_ok_p.
+
+ PR c++/84355 - ICE with deduction for member class template.
+ * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Always substitute into
+ CLASS_PLACEHOLDER_TEMPLATE.
+
+2018-03-23 Paolo Carlini <paolo.carlini@oracle.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/82336 - link error with list-init default argument.
+ * decl.c (check_default_argument): Unshare an initializer list.
+
+2018-03-22 Marek Polacek <polacek@redhat.com>
+
+ Backported from mainline
+ 2018-03-22 Marek Polacek <polacek@redhat.com>
+
+ PR c++/84854
+ * semantics.c (finish_if_stmt_cond): Check if the type of the condition
+ is boolean.
+
+ 2018-03-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/84927
+ * constexpr.c (cxx_eval_bare_aggregate): Update constructor's flags
+ as we evaluate the elements.
+ (cxx_eval_constant_expression): Verify constructor's flags
+ unconditionally.
+
+ 2018-03-21 Marek Polacek <polacek@redhat.com>
+
+ PR c++/71638, ICE with NSDMI and reference.
+ * constexpr.c (cxx_eval_bare_aggregate): Update constructor's flags
+ even when we replace an element.
+
+2018-03-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/84785 - ICE with alias template and default targs.
+ * pt.c (type_unification_real): Set processing_template_decl if
+ saw_undeduced == 1.
+
+2018-03-07 Marek Polacek <polacek@redhat.com>
+
+ Backported from mainline
+ 2018-03-06 Marek Polacek <polacek@redhat.com>
+
+ PR c++/84684
+ * constexpr.c (cxx_bind_parameters_in_call): Unshare evaluated
+ arguments.
+
+2018-03-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/84686 - missing volatile loads.
+ * cvt.c (convert_to_void): Call maybe_undo_parenthesized_ref.
+
2018-03-03 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 87729ac01e8..5145e438460 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3259,10 +3259,10 @@ add_template_conv_candidate (struct z_candidate **candidates, tree tmpl,
tree return_type, tree access_path,
tree conversion_path, tsubst_flags_t complain)
{
- /* Making this work broke PR 71117, so until the committee resolves core
- issue 2189, let's disable this candidate if there are any viable call
+ /* Making this work broke PR 71117 and 85118, so until the committee resolves
+ core issue 2189, let's disable this candidate if there are any call
operators. */
- if (any_strictly_viable (*candidates))
+ if (*candidates)
return NULL;
return
@@ -7144,7 +7144,7 @@ convert_arg_to_ellipsis (tree arg, tsubst_flags_t complain)
"passing objects of non-trivially-copyable "
"type %q#T through %<...%> is conditionally supported",
arg_type);
- return cp_build_addr_expr (arg, complain);
+ return build1 (ADDR_EXPR, build_reference_type (arg_type), arg);
}
/* Build up a real lvalue-to-rvalue conversion in case the
copy constructor is trivial but not callable. */
@@ -7568,6 +7568,10 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
if (undeduced_auto_decl (fn))
mark_used (fn, complain);
+ else
+ /* Otherwise set TREE_USED for the benefit of -Wunused-function.
+ See PR80598. */
+ TREE_USED (fn) = 1;
return_type = TREE_TYPE (TREE_TYPE (fn));
nargs = vec_safe_length (args);
@@ -7931,7 +7935,15 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
tree *fargs = (!nargs ? argarray
: (tree *) alloca (nargs * sizeof (tree)));
for (j = 0; j < nargs; j++)
- fargs[j] = maybe_constant_value (argarray[j]);
+ {
+ /* For -Wformat undo the implicit passing by hidden reference
+ done by convert_arg_to_ellipsis. */
+ if (TREE_CODE (argarray[j]) == ADDR_EXPR
+ && TREE_CODE (TREE_TYPE (argarray[j])) == REFERENCE_TYPE)
+ fargs[j] = TREE_OPERAND (argarray[j], 0);
+ else
+ fargs[j] = maybe_constant_value (argarray[j]);
+ }
warned_p = check_function_arguments (input_location, fn, TREE_TYPE (fn),
nargs, fargs);
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 5a4c9840acf..a1bf77589dc 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -2732,19 +2732,20 @@ update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals,
order. Of course it is lame that we have to repeat the
search here anyway -- we should really be caching pieces
of the vtable and avoiding this repeated work. */
- tree thunk_binfo, base_binfo;
+ tree thunk_binfo = NULL_TREE;
+ tree base_binfo = TYPE_BINFO (base_return);
/* Find the base binfo within the overriding function's
return type. We will always find a thunk_binfo, except
when the covariancy is invalid (which we will have
already diagnosed). */
- for (base_binfo = TYPE_BINFO (base_return),
- thunk_binfo = TYPE_BINFO (over_return);
- thunk_binfo;
- thunk_binfo = TREE_CHAIN (thunk_binfo))
- if (SAME_BINFO_TYPE_P (BINFO_TYPE (thunk_binfo),
- BINFO_TYPE (base_binfo)))
- break;
+ if (base_binfo)
+ for (thunk_binfo = TYPE_BINFO (over_return); thunk_binfo;
+ thunk_binfo = TREE_CHAIN (thunk_binfo))
+ if (SAME_BINFO_TYPE_P (BINFO_TYPE (thunk_binfo),
+ BINFO_TYPE (base_binfo)))
+ break;
+ gcc_assert (thunk_binfo || errorcount);
/* See if virtual inheritance is involved. */
for (virtual_offset = thunk_binfo;
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index a681f89509a..361a955ba01 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -1140,7 +1140,10 @@ cxx_eval_builtin_function_call (const constexpr_ctx *ctx, tree t, tree fun,
/* Don't fold __builtin_constant_p within a constexpr function. */
bool bi_const_p = (DECL_FUNCTION_CODE (fun) == BUILT_IN_CONSTANT_P);
+ /* If we aren't requiring a constant expression, defer __builtin_constant_p
+ in a constexpr function until we have values for the parameters. */
if (bi_const_p
+ && ctx->quiet
&& current_function_decl
&& DECL_DECLARED_CONSTEXPR_P (current_function_decl))
{
@@ -1155,8 +1158,14 @@ cxx_eval_builtin_function_call (const constexpr_ctx *ctx, tree t, tree fun,
bool dummy1 = false, dummy2 = false;
for (i = 0; i < nargs; ++i)
{
- args[i] = cxx_eval_constant_expression (&new_ctx, CALL_EXPR_ARG (t, i),
- false, &dummy1, &dummy2);
+ args[i] = CALL_EXPR_ARG (t, i);
+ /* If builtin_valid_in_constant_expr_p is true,
+ potential_constant_expression_1 has not recursed into the arguments
+ of the builtin, verify it here. */
+ if (!builtin_valid_in_constant_expr_p (fun)
+ || potential_constant_expression (args[i]))
+ args[i] = cxx_eval_constant_expression (&new_ctx, args[i], false,
+ &dummy1, &dummy2);
if (bi_const_p)
/* For __built_in_constant_p, fold all expressions with constant values
even if they aren't C++ constant-expressions. */
@@ -1274,6 +1283,8 @@ cxx_bind_parameters_in_call (const constexpr_ctx *ctx, tree t,
if (!*non_constant_p)
{
+ /* Don't share a CONSTRUCTOR that might be changed. */
+ arg = unshare_constructor (arg);
/* Make sure the binding has the same type as the parm. But
only for constant args. */
if (TREE_CODE (type) != REFERENCE_TYPE)
@@ -2783,14 +2794,20 @@ cxx_eval_bare_aggregate (const constexpr_ctx *ctx, tree t,
gcc_assert (is_empty_class (TREE_TYPE (TREE_TYPE (index))));
changed = true;
}
- else if (new_ctx.ctor != ctx->ctor)
+ else
{
- /* We appended this element above; update the value. */
- gcc_assert ((*p)->last().index == index);
- (*p)->last().value = elt;
+ if (new_ctx.ctor != ctx->ctor)
+ {
+ /* We appended this element above; update the value. */
+ gcc_assert ((*p)->last().index == index);
+ (*p)->last().value = elt;
+ }
+ else
+ CONSTRUCTOR_APPEND_ELT (*p, index, elt);
+ /* Adding or replacing an element might change the ctor's flags. */
+ TREE_CONSTANT (ctx->ctor) = constant_p;
+ TREE_SIDE_EFFECTS (ctx->ctor) = side_effects_p;
}
- else
- CONSTRUCTOR_APPEND_ELT (*p, index, elt);
}
if (*non_constant_p || !changed)
return t;
@@ -4437,11 +4454,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
{
/* Don't re-process a constant CONSTRUCTOR, but do fold it to
VECTOR_CST if applicable. */
- /* FIXME after GCC 6 branches, make the verify unconditional. */
- if (CHECKING_P)
- verify_constructor_flags (t);
- else
- recompute_constructor_flags (t);
+ verify_constructor_flags (t);
if (TREE_CONSTANT (t))
return fold (t);
}
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index b3c6374416a..4891346a609 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -1918,7 +1918,7 @@ cxx_omp_const_qual_no_mutable (tree decl)
/* True if OpenMP sharing attribute of DECL is predetermined. */
enum omp_clause_default_kind
-cxx_omp_predetermined_sharing (tree decl)
+cxx_omp_predetermined_sharing_1 (tree decl)
{
/* Static data members are predetermined shared. */
if (TREE_STATIC (decl))
@@ -1936,6 +1936,32 @@ cxx_omp_predetermined_sharing (tree decl)
return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
}
+/* Likewise, but also include the artificial vars. We don't want to
+ disallow the artificial vars being mentioned in explicit clauses,
+ as we use artificial vars e.g. for loop constructs with random
+ access iterators other than pointers, but during gimplification
+ we want to treat them as predetermined. */
+
+enum omp_clause_default_kind
+cxx_omp_predetermined_sharing (tree decl)
+{
+ enum omp_clause_default_kind ret = cxx_omp_predetermined_sharing_1 (decl);
+ if (ret != OMP_CLAUSE_DEFAULT_UNSPECIFIED)
+ return ret;
+
+ /* Predetermine artificial variables holding integral values, those
+ are usually result of gimplify_one_sizepos or SAVE_EXPR
+ gimplification. */
+ if (VAR_P (decl)
+ && DECL_ARTIFICIAL (decl)
+ && INTEGRAL_TYPE_P (TREE_TYPE (decl))
+ && !(DECL_LANG_SPECIFIC (decl)
+ && DECL_OMP_PRIVATIZED_MEMBER (decl)))
+ return OMP_CLAUSE_DEFAULT_SHARED;
+
+ return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
+}
+
/* Finalize an implicitly determined clause. */
void
@@ -2156,6 +2182,28 @@ cp_fold (tree x)
goto unary;
case ADDR_EXPR:
+ loc = EXPR_LOCATION (x);
+ op0 = cp_fold_maybe_rvalue (TREE_OPERAND (x, 0), false);
+
+ /* Cope with user tricks that amount to offsetof. */
+ if (op0 != error_mark_node
+ && TREE_CODE (TREE_TYPE (op0)) != FUNCTION_TYPE
+ && TREE_CODE (TREE_TYPE (op0)) != METHOD_TYPE)
+ {
+ tree val = get_base_address (op0);
+ if (val
+ && INDIRECT_REF_P (val)
+ && COMPLETE_TYPE_P (TREE_TYPE (val))
+ && TREE_CONSTANT (TREE_OPERAND (val, 0)))
+ {
+ val = TREE_OPERAND (val, 0);
+ STRIP_NOPS (val);
+ if (TREE_CODE (val) == INTEGER_CST)
+ return fold_offsetof (op0, TREE_TYPE (x));
+ }
+ }
+ goto finish_unary;
+
case REALPART_EXPR:
case IMAGPART_EXPR:
rval_ops = false;
@@ -2173,6 +2221,7 @@ cp_fold (tree x)
loc = EXPR_LOCATION (x);
op0 = cp_fold_maybe_rvalue (TREE_OPERAND (x, 0), rval_ops);
+ finish_unary:
if (op0 != TREE_OPERAND (x, 0))
{
if (op0 == error_mark_node)
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index fadf6ecb1a2..664def60405 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -6708,6 +6708,7 @@ extern tree cxx_copy_lang_qualifiers (const_tree, const_tree);
extern void cxx_print_statistics (void);
extern bool maybe_warn_zero_as_null_pointer_constant (tree, location_t);
+extern void cp_warn_deprecated_use (tree);
/* in ptree.c */
extern void cxx_print_xnode (FILE *, tree, int);
@@ -6777,6 +6778,7 @@ extern tree cp_build_addressof (location_t, tree,
extern tree cp_build_addr_expr (tree, tsubst_flags_t);
extern tree cp_build_unary_op (enum tree_code, tree, bool,
tsubst_flags_t);
+extern tree genericize_compound_lvalue (tree);
extern tree unary_complex_lvalue (enum tree_code, tree);
extern tree build_x_conditional_expr (location_t, tree, tree, tree,
tsubst_flags_t);
@@ -6941,6 +6943,7 @@ extern int cp_gimplify_expr (tree *, gimple_seq *,
gimple_seq *);
extern void cp_genericize (tree);
extern bool cxx_omp_const_qual_no_mutable (tree);
+extern enum omp_clause_default_kind cxx_omp_predetermined_sharing_1 (tree);
extern enum omp_clause_default_kind cxx_omp_predetermined_sharing (tree);
extern tree cxx_omp_clause_default_ctor (tree, tree, tree);
extern tree cxx_omp_clause_copy_ctor (tree, tree, tree);
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 5f4b5e30a5f..5d3a47ec640 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -1053,6 +1053,8 @@ convert_to_void (tree expr, impl_conv_void implicit, tsubst_flags_t complain)
|| TREE_TYPE (expr) == error_mark_node)
return error_mark_node;
+ expr = maybe_undo_parenthesized_ref (expr);
+
if (implicit == ICV_CAST)
mark_exp_read (expr);
else
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 730a6f1be37..950e04a6680 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -5022,7 +5022,7 @@ start_decl (const cp_declarator *declarator,
}
/* If #pragma weak was used, mark the decl weak now. */
- if (!processing_template_decl)
+ if (!processing_template_decl && !DECL_DECOMPOSITION_P (decl))
maybe_apply_pragma_weak (decl);
if (TREE_CODE (decl) == FUNCTION_DECL
@@ -5796,8 +5796,18 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p,
return error_mark_node;
if (TREE_CODE (d->cur->index) == FIELD_DECL)
- /* We already reshaped this. */
- gcc_assert (d->cur->index == field);
+ {
+ /* We already reshaped this. */
+ if (field != d->cur->index)
+ {
+ tree id = DECL_NAME (d->cur->index);
+ gcc_assert (id);
+ gcc_checking_assert (lookup_field_1 (type, id,
+ /*want_type=*/false)
+ == d->cur->index);
+ field = d->cur->index;
+ }
+ }
else if (TREE_CODE (d->cur->index) == IDENTIFIER_NODE)
field = lookup_field_1 (type, d->cur->index, /*want_type=*/false);
else
@@ -6400,7 +6410,9 @@ check_initializer (tree decl, tree init, int flags, vec<tree, va_gc> **cleanups)
}
if (init_code
- && (DECL_IN_AGGR_P (decl) && !DECL_VAR_DECLARED_INLINE_P (decl)))
+ && (DECL_IN_AGGR_P (decl)
+ && DECL_INITIALIZED_IN_CLASS_P (decl)
+ && !DECL_VAR_DECLARED_INLINE_P (decl)))
{
static int explained = 0;
@@ -7228,9 +7240,9 @@ find_decomp_class_base (location_t loc, tree type, tree ret)
inform (DECL_SOURCE_LOCATION (field), "declared here");
return error_mark_node;
}
- else if (TREE_PRIVATE (field) || TREE_PROTECTED (field))
+ else if (!accessible_p (type, field, true))
{
- error_at (loc, "cannot decompose non-public member %qD of %qT",
+ error_at (loc, "cannot decompose inaccessible member %qD of %qT",
field, type);
inform (DECL_SOURCE_LOCATION (field),
TREE_PRIVATE (field)
@@ -7338,7 +7350,29 @@ get_tuple_decomp_init (tree decl, unsigned i)
tree fns = lookup_qualified_name (TREE_TYPE (e), get_id,
/*type*/false, /*complain*/false);
- if (fns != error_mark_node)
+ bool use_member_get = false;
+
+ /* To use a member get, member lookup must find at least one
+ declaration that is a function template
+ whose first template parameter is a non-type parameter. */
+ for (tree iter = BASELINK_P (fns) ? BASELINK_FUNCTIONS (fns) : fns;
+ iter;
+ iter = OVL_NEXT (iter))
+ {
+ tree fn = OVL_CURRENT (iter);
+ if (TREE_CODE (fn) == TEMPLATE_DECL)
+ {
+ tree tparms = DECL_TEMPLATE_PARMS (fn);
+ tree parm = TREE_VEC_ELT (INNERMOST_TEMPLATE_PARMS (tparms), 0);
+ if (TREE_CODE (TREE_VALUE (parm)) == PARM_DECL)
+ {
+ use_member_get = true;
+ break;
+ }
+ }
+ }
+
+ if (use_member_get)
{
fns = lookup_template_function (fns, targs);
return build_new_method_call (e, fns, /*args*/NULL,
@@ -7388,6 +7422,7 @@ cp_maybe_mangle_decomp (tree decl, tree first, unsigned int count)
for (unsigned int i = 0; i < count; i++, d = DECL_CHAIN (d))
v[count - i - 1] = d;
SET_DECL_ASSEMBLER_NAME (decl, mangle_decomp (decl, v));
+ maybe_apply_pragma_weak (decl);
}
}
@@ -9524,7 +9559,8 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
constant_expression_error (size);
/* An array must have a positive number of elements. */
- if (tree_int_cst_lt (size, integer_zero_node))
+ tree signed_size = fold_convert (ssizetype, size);
+ if (tree_int_cst_lt (signed_size, integer_zero_node))
{
if (!(complain & tf_error))
return error_mark_node;
@@ -10104,6 +10140,8 @@ grokdeclarator (const cp_declarator *declarator,
declspecs->locations);
if (typespec_loc == UNKNOWN_LOCATION)
typespec_loc = declspecs->locations[ds_type_spec];
+ if (typespec_loc == UNKNOWN_LOCATION)
+ typespec_loc = input_location;
/* Look inside a declarator for the name being declared
and get it as a string, for an error message. */
@@ -10373,7 +10411,7 @@ grokdeclarator (const cp_declarator *declarator,
suppress reports of deprecated items. */
if (type && TREE_DEPRECATED (type)
&& deprecated_state != DEPRECATED_SUPPRESS)
- warn_deprecated_use (type, NULL_TREE);
+ cp_warn_deprecated_use (type);
if (type && TREE_CODE (type) == TYPE_DECL)
{
typedef_decl = type;
@@ -10381,7 +10419,7 @@ grokdeclarator (const cp_declarator *declarator,
if (TREE_DEPRECATED (type)
&& DECL_ARTIFICIAL (typedef_decl)
&& deprecated_state != DEPRECATED_SUPPRESS)
- warn_deprecated_use (type, NULL_TREE);
+ cp_warn_deprecated_use (type);
}
/* No type at all: default to `int', and set DEFAULTED_INT
because it was not a user-defined typedef. */
@@ -11176,8 +11214,18 @@ grokdeclarator (const cp_declarator *declarator,
explicitp = 2;
}
- arg_types = grokparms (declarator->u.function.parameters,
- &parms);
+ tree pushed_scope = NULL_TREE;
+ if (funcdecl_p
+ && decl_context != FIELD
+ && inner_declarator->u.id.qualifying_scope
+ && CLASS_TYPE_P (inner_declarator->u.id.qualifying_scope))
+ pushed_scope
+ = push_scope (inner_declarator->u.id.qualifying_scope);
+
+ arg_types = grokparms (declarator->u.function.parameters, &parms);
+
+ if (pushed_scope)
+ pop_scope (pushed_scope);
if (inner_declarator
&& inner_declarator->kind == cdk_id
@@ -12563,7 +12611,9 @@ check_default_argument (tree decl, tree arg, tsubst_flags_t complain)
A default argument expression is implicitly converted to the
parameter type. */
++cp_unevaluated_operand;
- perform_implicit_conversion_flags (decl_type, arg, complain,
+ /* Avoid digest_init clobbering the initializer. */
+ tree carg = BRACE_ENCLOSED_INITIALIZER_P (arg) ? unshare_expr (arg): arg;
+ perform_implicit_conversion_flags (decl_type, carg, complain,
LOOKUP_IMPLICIT);
--cp_unevaluated_operand;
@@ -12692,7 +12742,7 @@ grokparms (tree parmlist, tree *parms)
{
tree deptype = type_is_deprecated (type);
if (deptype)
- warn_deprecated_use (deptype, NULL_TREE);
+ cp_warn_deprecated_use (deptype);
}
/* Top-level qualifiers on the parameters are
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index b1c3c30521f..7ad6a108224 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1360,7 +1360,7 @@ cp_check_const_attributes (tree attributes)
{
tree expr = TREE_VALUE (arg);
if (EXPR_P (expr))
- TREE_VALUE (arg) = maybe_constant_value (expr);
+ TREE_VALUE (arg) = fold_non_dependent_expr (expr);
}
}
}
@@ -1829,10 +1829,13 @@ vague_linkage_p (tree decl)
{
if (!TREE_PUBLIC (decl))
{
- /* maybe_thunk_body clears TREE_PUBLIC on the maybe-in-charge 'tor
- variants, check one of the "clones" for the real linkage. */
+ /* maybe_thunk_body clears TREE_PUBLIC and DECL_ABSTRACT_P on the
+ maybe-in-charge 'tor variants; in that case we need to check one of
+ the "clones" for the real linkage. But only in that case; before
+ maybe_clone_body we haven't yet copied the linkage to the clones. */
if ((DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (decl)
|| DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl))
+ && !DECL_ABSTRACT_P (decl)
&& DECL_CHAIN (decl)
&& DECL_CLONED_FUNCTION (DECL_CHAIN (decl)))
return vague_linkage_p (DECL_CHAIN (decl));
@@ -2310,11 +2313,8 @@ determine_visibility (tree decl)
}
/* Local classes in templates have CLASSTYPE_USE_TEMPLATE set,
- but have no TEMPLATE_INFO. Their containing template
- function does, and the local class could be constrained
- by that. */
- if (template_decl)
- template_decl = fn;
+ but have no TEMPLATE_INFO, so don't try to check it. */
+ template_decl = NULL_TREE;
}
else if (VAR_P (decl) && DECL_TINFO_P (decl)
&& flag_visibility_ms_compat)
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 38bc0b2474a..989a5e8eda1 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -2695,6 +2695,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags)
case INTEGER_TYPE:
case COMPLEX_TYPE:
case VECTOR_TYPE:
+ case DECLTYPE_TYPE:
pp_type_specifier_seq (pp, t);
break;
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index e9c39ff25e6..ec01f6b6776 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1632,6 +1632,7 @@ build_aggr_init (tree exp, tree init, int flags, tsubst_flags_t complain)
if (VAR_P (exp) && DECL_DECOMPOSITION_P (exp))
{
from_array = 1;
+ init = mark_rvalue_use (init);
if (init && DECL_P (init)
&& !(flags & LOOKUP_ONLYCONVERTING))
{
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index dc8e82c2fe2..6ccfdbfdb71 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -3684,6 +3684,9 @@ handle_namespace_attrs (tree ns, tree attributes)
tree d;
bool saw_vis = false;
+ if (attributes == error_mark_node)
+ return false;
+
for (d = attributes; d; d = TREE_CHAIN (d))
{
tree name = get_attribute_name (d);
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index ede8ca8097c..24ecf17b3b4 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -7364,9 +7364,7 @@ cp_parser_postfix_dot_deref_expression (cp_parser *parser,
if (postfix_expression != current_class_ref
&& scope != error_mark_node
&& !(processing_template_decl
- && current_class_type
- && (same_type_ignoring_top_level_qualifiers_p
- (scope, current_class_type))))
+ && currently_open_class (scope)))
{
scope = complete_type (scope);
if (!COMPLETE_TYPE_P (scope)
@@ -11858,7 +11856,7 @@ cp_parser_perform_range_for_lookup (tree range, tree *begin, tree *end)
/*protect=*/2, /*want_type=*/false,
tf_warning_or_error);
- if (member_begin != NULL_TREE || member_end != NULL_TREE)
+ if (member_begin != NULL_TREE && member_end != NULL_TREE)
{
/* Use the member functions. */
if (member_begin != NULL_TREE)
@@ -12103,12 +12101,9 @@ cp_parser_init_statement (cp_parser* parser, tree *decl)
cp_lexer_consume_token (parser->lexer);
is_range_for = true;
if (cxx_dialect < cxx11)
- {
- pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0,
- "range-based %<for%> loops only available with "
- "-std=c++11 or -std=gnu++11");
- *decl = error_mark_node;
- }
+ pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0,
+ "range-based %<for%> loops only available with "
+ "-std=c++11 or -std=gnu++11");
}
else
/* The ';' is not consumed yet because we told
@@ -20969,7 +20964,10 @@ cp_parser_parameter_declaration_clause (cp_parser* parser)
if (!processing_specialization
&& !processing_template_parmlist
- && !processing_explicit_instantiation)
+ && !processing_explicit_instantiation
+ /* default_arg_ok_p tracks whether this is a parameter-clause for an
+ actual function or a random abstract declarator. */
+ && parser->default_arg_ok_p)
if (!current_function_decl
|| (current_class_type && LAMBDA_TYPE_P (current_class_type)))
parser->auto_is_implicit_function_template_parm_p = true;
@@ -21078,9 +21076,6 @@ cp_parser_parameter_declaration_list (cp_parser* parser, bool *is_error)
cp_parameter_declarator *parameter;
tree decl = error_mark_node;
bool parenthesized_p = false;
- int template_parm_idx = (function_being_declared_is_template_p (parser)?
- TREE_VEC_LENGTH (INNERMOST_TEMPLATE_PARMS
- (current_template_parms)) : 0);
/* Parse the parameter. */
parameter
@@ -21094,22 +21089,6 @@ cp_parser_parameter_declaration_list (cp_parser* parser, bool *is_error)
if (parameter)
{
- /* If a function parameter pack was specified and an implicit template
- parameter was introduced during cp_parser_parameter_declaration,
- change any implicit parameters introduced into packs. */
- if (parser->implicit_template_parms
- && parameter->declarator
- && parameter->declarator->parameter_pack_p)
- {
- int latest_template_parm_idx = TREE_VEC_LENGTH
- (INNERMOST_TEMPLATE_PARMS (current_template_parms));
-
- if (latest_template_parm_idx != template_parm_idx)
- parameter->decl_specifiers.type = convert_generic_types_to_packs
- (parameter->decl_specifiers.type,
- template_parm_idx, latest_template_parm_idx);
- }
-
decl = grokdeclarator (parameter->declarator,
&parameter->decl_specifiers,
PARM,
@@ -21267,6 +21246,10 @@ cp_parser_parameter_declaration (cp_parser *parser,
parser->type_definition_forbidden_message
= G_("types may not be defined in parameter types");
+ int template_parm_idx = (function_being_declared_is_template_p (parser) ?
+ TREE_VEC_LENGTH (INNERMOST_TEMPLATE_PARMS
+ (current_template_parms)) : 0);
+
/* Parse the declaration-specifiers. */
cp_parser_decl_specifier_seq (parser,
CP_PARSER_FLAGS_NONE,
@@ -21355,6 +21338,23 @@ cp_parser_parameter_declaration (cp_parser *parser,
parameter pack expansion expression. Otherwise, leave the ellipsis
for a C-style variadic function. */
token = cp_lexer_peek_token (parser->lexer);
+
+ /* If a function parameter pack was specified and an implicit template
+ parameter was introduced during cp_parser_parameter_declaration,
+ change any implicit parameters introduced into packs. */
+ if (parser->implicit_template_parms
+ && (token->type == CPP_ELLIPSIS
+ || (declarator && declarator->parameter_pack_p)))
+ {
+ int latest_template_parm_idx = TREE_VEC_LENGTH
+ (INNERMOST_TEMPLATE_PARMS (current_template_parms));
+
+ if (latest_template_parm_idx != template_parm_idx)
+ decl_specifiers.type = convert_generic_types_to_packs
+ (decl_specifiers.type,
+ template_parm_idx, latest_template_parm_idx);
+ }
+
if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS))
{
tree type = decl_specifiers.type;
@@ -34286,7 +34286,7 @@ static tree
cp_parser_omp_for_loop_init (cp_parser *parser,
enum tree_code code,
tree &this_pre_body,
- vec<tree, va_gc> *for_block,
+ vec<tree, va_gc> *&for_block,
tree &init,
tree &orig_init,
tree &decl,
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 9815df63c28..71077a3b049 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -4864,7 +4864,7 @@ static void
fixed_parameter_pack_p_1 (tree parm, struct find_parameter_pack_data *ppd)
{
/* A type parm can't refer to another parm. */
- if (TREE_CODE (parm) == TYPE_DECL)
+ if (TREE_CODE (parm) == TYPE_DECL || parm == error_mark_node)
return;
else if (TREE_CODE (parm) == PARM_DECL)
{
@@ -8265,7 +8265,11 @@ coerce_template_parms (tree parms,
}
if (lost)
- return error_mark_node;
+ {
+ if ((complain & tf_error) && !seen_error())
+ error ("wrong number of template arguments");
+ return error_mark_node;
+ }
if (CHECKING_P && !NON_DEFAULT_TEMPLATE_ARGS_COUNT (new_inner_args))
SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (new_inner_args,
@@ -11475,7 +11479,9 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
{
/* This parameter pack was used in an unevaluated context. Just
make a dummy decl, since it's only used for its type. */
+ ++cp_unevaluated_operand;
arg_pack = tsubst_decl (parm_pack, args, complain);
+ --cp_unevaluated_operand;
if (arg_pack && DECL_PACK_P (arg_pack))
/* Partial instantiation of the parm_pack, we can't build
up an argument pack yet. */
@@ -11545,7 +11551,7 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
/* We can't substitute for this parameter pack. We use a flag as
well as the missing_level counter because function parameter
packs don't have a level. */
- gcc_assert (processing_template_decl);
+ gcc_assert (processing_template_decl || is_auto (parm_pack));
unsubstituted_packs = true;
}
}
@@ -13776,8 +13782,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
= tsubst_constraint (constr, args, complain, in_decl);
else if (tree pl = CLASS_PLACEHOLDER_TEMPLATE (t))
{
- if (DECL_TEMPLATE_TEMPLATE_PARM_P (pl))
- pl = tsubst (pl, args, complain, in_decl);
+ pl = tsubst_copy (pl, args, complain, in_decl);
CLASS_PLACEHOLDER_TEMPLATE (r) = pl;
}
}
@@ -15799,6 +15804,12 @@ tsubst_decomp_names (tree decl, tree pattern_decl, tree args,
DECL_HAS_VALUE_EXPR_P (decl2) = 1;
if (VAR_P (decl3))
DECL_TEMPLATE_INSTANTIATED (decl3) = 1;
+ else
+ {
+ gcc_assert (errorcount);
+ decl = error_mark_node;
+ continue;
+ }
maybe_push_decl (decl3);
if (error_operand_p (decl3))
decl = error_mark_node;
@@ -16787,14 +16798,14 @@ tsubst_copy_and_build (tree t,
if (targs)
targs = tsubst_template_args (targs, args, complain, in_decl);
if (targs == error_mark_node)
- return error_mark_node;
+ RETURN (error_mark_node);
if (TREE_CODE (templ) == SCOPE_REF)
{
tree name = TREE_OPERAND (templ, 1);
tree tid = lookup_template_function (name, targs);
TREE_OPERAND (templ, 1) = tid;
- return templ;
+ RETURN (templ);
}
if (variable_template_p (templ))
@@ -16859,6 +16870,8 @@ tsubst_copy_and_build (tree t,
{
tree type = tsubst (TREE_TYPE (t), args, complain, in_decl);
tree op0 = RECUR (TREE_OPERAND (t, 0));
+ if (op0 == error_mark_node)
+ RETURN (error_mark_node);
RETURN (build1 (CONVERT_EXPR, type, op0));
}
@@ -17006,7 +17019,7 @@ tsubst_copy_and_build (tree t,
{
tree op0 = RECUR (TREE_OPERAND (t, 0));
tree op1 = RECUR (TREE_OPERAND (t, 1));
- return fold_build_pointer_plus (op0, op1);
+ RETURN (fold_build_pointer_plus (op0, op1));
}
case SCOPE_REF:
@@ -19229,6 +19242,24 @@ try_array_deduction (tree tparms, tree targs, tree parm)
/*nondeduced*/false, array_deduction_r);
}
+/* Returns how many levels of { } INIT contains. */
+
+static int
+braced_init_depth (tree init)
+{
+ if (!init || !BRACE_ENCLOSED_INITIALIZER_P (init))
+ return 0;
+ unsigned i; tree val;
+ unsigned max = 0;
+ FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (init), i, val)
+ {
+ unsigned elt_d = braced_init_depth (val);
+ if (elt_d > max)
+ max = elt_d;
+ }
+ return max + 1;
+}
+
/* Most parms like fn_type_unification.
If SUBR is 1, we're being called recursively (to unify the
@@ -19465,6 +19496,10 @@ type_unification_real (tree tparms,
if (uses_template_parms (parm))
continue;
+ /* Workaround for c++/80290: avoid combinatorial explosion on
+ deeply nested braced init-lists. */
+ if (braced_init_depth (arg) > 2)
+ continue;
if (check_non_deducible_conversion (parm, arg, strict, flags,
explain_p))
return 1;
@@ -19491,10 +19526,10 @@ type_unification_real (tree tparms,
if (DECL_P (parm))
input_location = DECL_SOURCE_LOCATION (parm);
arg = tsubst_template_arg (arg, full_targs, complain, NULL_TREE);
- if (arg != error_mark_node && !uses_template_parms (arg))
+ if (!uses_template_parms (arg))
arg = convert_template_argument (parm, arg, full_targs, complain,
i, NULL_TREE);
- else if (saw_undeduced == 1)
+ else if (saw_undeduced < 2)
arg = NULL_TREE;
else
arg = error_mark_node;
@@ -25130,8 +25165,21 @@ rewrite_template_parm (tree olddecl, unsigned index, unsigned level,
= TEMPLATE_TYPE_PARM_FOR_CLASS (oldtype);
}
else
- newtype = tsubst (TREE_TYPE (olddecl), tsubst_args,
- complain, NULL_TREE);
+ {
+ newtype = TREE_TYPE (olddecl);
+ if (type_uses_auto (newtype))
+ {
+ // Substitute once to fix references to other template parameters.
+ newtype = tsubst (newtype, tsubst_args,
+ complain|tf_partial, NULL_TREE);
+ // Now substitute again to reduce the level of the auto.
+ newtype = tsubst (newtype, current_template_args (),
+ complain, NULL_TREE);
+ }
+ else
+ newtype = tsubst (newtype, tsubst_args,
+ complain, NULL_TREE);
+ }
tree newdecl
= build_decl (DECL_SOURCE_LOCATION (olddecl), TREE_CODE (olddecl),
@@ -25411,6 +25459,9 @@ do_class_deduction (tree ptype, tree tmpl, tree init, int flags,
// FIXME cache artificial deduction guides
for (tree fns = CLASSTYPE_CONSTRUCTORS (type); fns; fns = OVL_NEXT (fns))
{
+ if (TREE_CODE (fns) == OVERLOAD && OVL_USED (fns))
+ continue;
+
tree fn = OVL_CURRENT (fns);
tree guide = build_deduction_guide (fn, outer_args, complain);
cands = ovl_cons (guide, cands);
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index f9d770ad8ee..e72ce5a427c 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -2879,7 +2879,7 @@ original_binfo (tree binfo, tree here)
bool
any_dependent_bases_p (tree type)
{
- if (!type || !CLASS_TYPE_P (type) || !processing_template_decl)
+ if (!type || !CLASS_TYPE_P (type) || !uses_template_parms (type))
return false;
unsigned i;
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index e0663764638..34ca72e10a0 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -730,7 +730,10 @@ finish_if_stmt_cond (tree cond, tree if_stmt)
cond = maybe_convert_cond (cond);
if (IF_STMT_CONSTEXPR_P (if_stmt)
&& require_potential_rvalue_constant_expression (cond)
- && !value_dependent_expression_p (cond))
+ && !value_dependent_expression_p (cond)
+ /* Wait until instantiation time, since only then COND has been
+ converted to bool. */
+ && TREE_TYPE (cond) == boolean_type_node)
{
cond = instantiate_non_dependent_expr (cond);
cond = cxx_constant_value (cond, NULL_TREE);
@@ -1480,6 +1483,21 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
&& C_TYPE_FIELDS_READONLY (TREE_TYPE (operand)))))
cxx_readonly_error (operand, lv_asm);
+ tree *op = &operand;
+ while (TREE_CODE (*op) == COMPOUND_EXPR)
+ op = &TREE_OPERAND (*op, 1);
+ switch (TREE_CODE (*op))
+ {
+ case PREINCREMENT_EXPR:
+ case PREDECREMENT_EXPR:
+ case MODIFY_EXPR:
+ *op = genericize_compound_lvalue (*op);
+ op = &TREE_OPERAND (*op, 1);
+ break;
+ default:
+ break;
+ }
+
constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)));
oconstraints[i] = constraint;
@@ -1488,7 +1506,7 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
{
/* If the operand is going to end up in memory,
mark it addressable. */
- if (!allows_reg && !cxx_mark_addressable (operand))
+ if (!allows_reg && !cxx_mark_addressable (*op))
operand = error_mark_node;
}
else
@@ -1530,7 +1548,23 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
/* Strip the nops as we allow this case. FIXME, this really
should be rejected or made deprecated. */
STRIP_NOPS (operand);
- if (!cxx_mark_addressable (operand))
+
+ tree *op = &operand;
+ while (TREE_CODE (*op) == COMPOUND_EXPR)
+ op = &TREE_OPERAND (*op, 1);
+ switch (TREE_CODE (*op))
+ {
+ case PREINCREMENT_EXPR:
+ case PREDECREMENT_EXPR:
+ case MODIFY_EXPR:
+ *op = genericize_compound_lvalue (*op);
+ op = &TREE_OPERAND (*op, 1);
+ break;
+ default:
+ break;
+ }
+
+ if (!cxx_mark_addressable (*op))
operand = error_mark_node;
}
else if (!allows_reg && !allows_mem)
@@ -5604,7 +5638,11 @@ finish_omp_reduction_clause (tree c, bool *need_default_ctor, bool *need_dtor)
return false;
}
else if (processing_template_decl)
- return false;
+ {
+ if (OMP_CLAUSE_REDUCTION_PLACEHOLDER (c) == error_mark_node)
+ return true;
+ return false;
+ }
tree id = OMP_CLAUSE_REDUCTION_PLACEHOLDER (c);
@@ -7333,7 +7371,7 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
if (VAR_P (t) && CP_DECL_THREAD_LOCAL_P (t))
share_name = "threadprivate";
- else switch (cxx_omp_predetermined_sharing (t))
+ else switch (cxx_omp_predetermined_sharing_1 (t))
{
case OMP_CLAUSE_DEFAULT_UNSPECIFIED:
break;
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 65277584aa2..f24e272b0fd 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1050,6 +1050,9 @@ cp_build_reference_type (tree to_type, bool rval)
{
tree lvalue_ref, t;
+ if (to_type == error_mark_node)
+ return error_mark_node;
+
if (TREE_CODE (to_type) == REFERENCE_TYPE)
{
rval = rval && TYPE_REF_IS_RVALUE (to_type);
@@ -1667,9 +1670,9 @@ strip_typedefs_expr (tree t, bool *remove_attributes)
tree it;
for (it = t; it; it = TREE_CHAIN (it))
{
- tree val = strip_typedefs_expr (TREE_VALUE (t), remove_attributes);
+ tree val = strip_typedefs_expr (TREE_VALUE (it), remove_attributes);
vec_safe_push (vec, val);
- if (val != TREE_VALUE (t))
+ if (val != TREE_VALUE (it))
changed = true;
gcc_assert (TREE_PURPOSE (it) == NULL_TREE);
}
@@ -2798,7 +2801,7 @@ replace_placeholders_r (tree* t, int* walk_subtrees, void* data_)
for (; !same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (*t),
TREE_TYPE (x));
x = TREE_OPERAND (x, 0))
- gcc_assert (TREE_CODE (x) == COMPONENT_REF);
+ gcc_assert (handled_component_p (x));
*t = x;
*walk_subtrees = false;
d->seen = true;
@@ -4900,6 +4903,19 @@ cp_tree_code_length (enum tree_code code)
}
}
+/* Wrapper around warn_deprecated_use that doesn't warn for
+ current_class_type. */
+
+void
+cp_warn_deprecated_use (tree node)
+{
+ if (TYPE_P (node)
+ && current_class_type
+ && TYPE_MAIN_VARIANT (node) == current_class_type)
+ return;
+ warn_deprecated_use (node, NULL_TREE);
+}
+
/* Implement -Wzero_as_null_pointer_constant. Return true if the
conditions for the warning hold, false otherwise. */
bool
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index d79b724ecca..0da2da1c30f 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -905,14 +905,14 @@ merge_types (tree t1, tree t2)
return t1;
default:;
+ if (attribute_list_equal (TYPE_ATTRIBUTES (t1), attributes))
+ return t1;
+ else if (attribute_list_equal (TYPE_ATTRIBUTES (t2), attributes))
+ return t2;
+ break;
}
- if (attribute_list_equal (TYPE_ATTRIBUTES (t1), attributes))
- return t1;
- else if (attribute_list_equal (TYPE_ATTRIBUTES (t2), attributes))
- return t2;
- else
- return cp_build_type_attribute_variant (t1, attributes);
+ return cp_build_type_attribute_variant (t1, attributes);
}
/* Return the ARRAY_TYPE type without its domain. */
@@ -5713,19 +5713,6 @@ cp_build_addr_expr_1 (tree arg, bool strict_lvalue, tsubst_flags_t complain)
return arg;
}
- /* ??? Cope with user tricks that amount to offsetof. */
- if (TREE_CODE (argtype) != FUNCTION_TYPE
- && TREE_CODE (argtype) != METHOD_TYPE
- && argtype != unknown_type_node
- && (val = get_base_address (arg))
- && COMPLETE_TYPE_P (TREE_TYPE (val))
- && INDIRECT_REF_P (val)
- && TREE_CONSTANT (TREE_OPERAND (val, 0)))
- {
- tree type = build_pointer_type (argtype);
- return fold_convert (type, fold_offsetof_1 (arg));
- }
-
/* Handle complex lvalues (when permitted)
by reduction to simpler cases. */
val = unary_complex_lvalue (ADDR_EXPR, arg);
@@ -6177,6 +6164,25 @@ build_unary_op (location_t /*location*/,
return cp_build_unary_op (code, xarg, noconvert, tf_warning_or_error);
}
+/* Adjust LVALUE, an MODIFY_EXPR, PREINCREMENT_EXPR or PREDECREMENT_EXPR,
+ so that it is a valid lvalue even for GENERIC by replacing
+ (lhs = rhs) with ((lhs = rhs), lhs)
+ (--lhs) with ((--lhs), lhs)
+ (++lhs) with ((++lhs), lhs)
+ and if lhs has side-effects, calling cp_stabilize_reference on it, so
+ that it can be evaluated multiple times. */
+
+tree
+genericize_compound_lvalue (tree lvalue)
+{
+ if (TREE_SIDE_EFFECTS (TREE_OPERAND (lvalue, 0)))
+ lvalue = build2 (TREE_CODE (lvalue), TREE_TYPE (lvalue),
+ cp_stabilize_reference (TREE_OPERAND (lvalue, 0)),
+ TREE_OPERAND (lvalue, 1));
+ return build2 (COMPOUND_EXPR, TREE_TYPE (TREE_OPERAND (lvalue, 0)),
+ lvalue, TREE_OPERAND (lvalue, 0));
+}
+
/* Apply unary lvalue-demanding operator CODE to the expression ARG
for certain kinds of expressions which are not really lvalues
but which we can accept as lvalues.
@@ -6211,17 +6217,7 @@ unary_complex_lvalue (enum tree_code code, tree arg)
if (TREE_CODE (arg) == MODIFY_EXPR
|| TREE_CODE (arg) == PREINCREMENT_EXPR
|| TREE_CODE (arg) == PREDECREMENT_EXPR)
- {
- tree lvalue = TREE_OPERAND (arg, 0);
- if (TREE_SIDE_EFFECTS (lvalue))
- {
- lvalue = cp_stabilize_reference (lvalue);
- arg = build2 (TREE_CODE (arg), TREE_TYPE (arg),
- lvalue, TREE_OPERAND (arg, 1));
- }
- return unary_complex_lvalue
- (code, build2 (COMPOUND_EXPR, TREE_TYPE (lvalue), arg, lvalue));
- }
+ return unary_complex_lvalue (code, genericize_compound_lvalue (arg));
if (code != ADDR_EXPR)
return NULL_TREE;
@@ -7617,11 +7613,7 @@ cp_build_modify_expr (location_t loc, tree lhs, enum tree_code modifycode,
case PREINCREMENT_EXPR:
if (compound_side_effects_p)
newrhs = rhs = stabilize_expr (rhs, &preeval);
- if (TREE_SIDE_EFFECTS (TREE_OPERAND (lhs, 0)))
- lhs = build2 (TREE_CODE (lhs), TREE_TYPE (lhs),
- cp_stabilize_reference (TREE_OPERAND (lhs, 0)),
- TREE_OPERAND (lhs, 1));
- lhs = build2 (COMPOUND_EXPR, lhstype, lhs, TREE_OPERAND (lhs, 0));
+ lhs = genericize_compound_lvalue (lhs);
maybe_add_compound:
/* If we had (bar, --foo) = 5; or (bar, (baz, --foo)) = 5;
and looked through the COMPOUND_EXPRs, readd them now around
@@ -7644,11 +7636,7 @@ cp_build_modify_expr (location_t loc, tree lhs, enum tree_code modifycode,
case MODIFY_EXPR:
if (compound_side_effects_p)
newrhs = rhs = stabilize_expr (rhs, &preeval);
- if (TREE_SIDE_EFFECTS (TREE_OPERAND (lhs, 0)))
- lhs = build2 (TREE_CODE (lhs), TREE_TYPE (lhs),
- cp_stabilize_reference (TREE_OPERAND (lhs, 0)),
- TREE_OPERAND (lhs, 1));
- lhs = build2 (COMPOUND_EXPR, lhstype, lhs, TREE_OPERAND (lhs, 0));
+ lhs = genericize_compound_lvalue (lhs);
goto maybe_add_compound;
case MIN_EXPR:
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 1f0eb454754..c8b9d787ac5 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -817,9 +817,12 @@ store_init_value (tree decl, tree init, vec<tree, va_gc>** cleanups, int flags)
bool const_init;
value = instantiate_non_dependent_expr (value);
if (DECL_DECLARED_CONSTEXPR_P (decl)
- || (DECL_IN_AGGR_P (decl) && !DECL_VAR_DECLARED_INLINE_P (decl)))
+ || (DECL_IN_AGGR_P (decl)
+ && DECL_INITIALIZED_IN_CLASS_P (decl)
+ && !DECL_VAR_DECLARED_INLINE_P (decl)))
{
- /* Diagnose a non-constant initializer for constexpr. */
+ /* Diagnose a non-constant initializer for constexpr variable or
+ non-inline in-class-initialized static data member. */
if (processing_template_decl
&& !require_potential_constant_expression (value))
value = error_mark_node;
@@ -1954,7 +1957,7 @@ build_functional_cast (tree exp, tree parms, tsubst_flags_t complain)
if (complain & tf_warning
&& TREE_DEPRECATED (type)
&& DECL_ARTIFICIAL (exp))
- warn_deprecated_use (type, NULL_TREE);
+ cp_warn_deprecated_use (type);
}
else
type = exp;
diff --git a/gcc/dce.c b/gcc/dce.c
index f7f41e8e71f..91e2f2768a3 100644
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -566,9 +566,19 @@ delete_unmarked_insns (void)
FOR_BB_INSNS_REVERSE_SAFE (bb, insn, next)
if (NONDEBUG_INSN_P (insn))
{
+ rtx turn_into_use = NULL_RTX;
+
/* Always delete no-op moves. */
if (noop_move_p (insn))
- ;
+ {
+ if (RTX_FRAME_RELATED_P (insn))
+ turn_into_use
+ = find_reg_note (insn, REG_CFA_RESTORE, NULL);
+ if (turn_into_use && REG_P (XEXP (turn_into_use, 0)))
+ turn_into_use = XEXP (turn_into_use, 0);
+ else
+ turn_into_use = NULL_RTX;
+ }
/* Otherwise rely only on the DCE algorithm. */
else if (marked_insn_p (insn))
@@ -608,8 +618,19 @@ delete_unmarked_insns (void)
if (CALL_P (insn))
must_clean = true;
- /* Now delete the insn. */
- delete_insn_and_edges (insn);
+ if (turn_into_use)
+ {
+ /* Don't remove frame related noop moves if they cary
+ REG_CFA_RESTORE note, while we don't need to emit any code,
+ we need it to emit the CFI restore note. */
+ PATTERN (insn)
+ = gen_rtx_USE (GET_MODE (turn_into_use), turn_into_use);
+ INSN_CODE (insn) = -1;
+ df_insn_rescan (insn);
+ }
+ else
+ /* Now delete the insn. */
+ delete_insn_and_edges (insn);
}
/* Deleted a pure or const call. */
diff --git a/gcc/ddg.c b/gcc/ddg.c
index 9ea98d6f40f..68a77f8043e 100644
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -295,11 +295,14 @@ add_cross_iteration_register_deps (ddg_ptr g, df_ref last_def)
/* Create inter-loop true dependences and anti dependences. */
for (r_use = DF_REF_CHAIN (last_def); r_use != NULL; r_use = r_use->next)
{
- rtx_insn *use_insn = DF_REF_INSN (r_use->ref);
-
- if (BLOCK_FOR_INSN (use_insn) != g->bb)
+ if (DF_REF_BB (r_use->ref) != g->bb)
continue;
+ gcc_assert (!DF_REF_IS_ARTIFICIAL (r_use->ref)
+ && DF_REF_INSN_INFO (r_use->ref) != NULL);
+
+ rtx_insn *use_insn = DF_REF_INSN (r_use->ref);
+
/* ??? Do not handle uses with DF_REF_IN_NOTE notes. */
use_node = get_node_of_insn (g, use_insn);
gcc_assert (use_node);
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index d1fa318bc98..b0a1b7ffac6 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1988-2017 Free Software Foundation, Inc.
+@c Copyright (C) 1988-2018 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@@ -15165,21 +15165,16 @@ or @option{-mpopcntd}):
@smallexample
long __builtin_bpermd (long, long);
int __builtin_divwe (int, int);
-int __builtin_divweo (int, int);
unsigned int __builtin_divweu (unsigned int, unsigned int);
-unsigned int __builtin_divweuo (unsigned int, unsigned int);
long __builtin_divde (long, long);
-long __builtin_divdeo (long, long);
unsigned long __builtin_divdeu (unsigned long, unsigned long);
-unsigned long __builtin_divdeuo (unsigned long, unsigned long);
unsigned int cdtbcd (unsigned int);
unsigned int cbcdtd (unsigned int);
unsigned int addg6s (unsigned int, unsigned int);
@end smallexample
-The @code{__builtin_divde}, @code{__builtin_divdeo},
-@code{__builtin_divdeu}, @code{__builtin_divdeou} functions require a
-64-bit environment support ISA 2.06 or later.
+The @code{__builtin_divde} and @code{__builtin_divdeu} functions
+require a 64-bit environment supporting ISA 2.06 or later.
The following built-in functions are available for the PowerPC family
of processors, starting with ISA 3.0 or later (@option{-mcpu=power9}):
@@ -18124,21 +18119,11 @@ vector unsigned short vec_vctzh (vector unsigned short);
vector int vec_vctzw (vector int);
vector unsigned int vec_vctzw (vector int);
-long long vec_vextract4b (const vector signed char, const int);
-vector unsigned long long vec_extract4b (vector unsigned char,
- const int);
-long long vec_extract4b (const vector signed char, const int);
-long long vec_vextract4b (const vector unsigned char, const int);
-
+long long vec_extract4b (const vector unsigned char, const int);
vector unsigned char vec_insert4b (vector signed int, vector unsigned char,
const int);
vector unsigned char vec_insert4b (vector unsigned int, vector unsigned char,
const int);
-vector signed char vec_insert4b (vector int, vector signed char, const int);
-vector unsigned char vec_insert4b (vector unsigned int, vector unsigned char,
- const int);
-vector signed char vec_insert4b (long long, vector signed char, const int);
-vector unsigned char vec_insert4b (long long, vector unsigned char, const int);
vector int vec_vprtyb (vector int);
vector unsigned int vec_vprtyb (vector unsigned int);
diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi
index 88b8d6d9071..4c232113ca3 100644
--- a/gcc/doc/gcov.texi
+++ b/gcc/doc/gcov.texi
@@ -322,7 +322,7 @@ program source code. The format is
Additional block information may succeed each line, when requested by
command line option. The @var{execution_count} is @samp{-} for lines
containing no code. Unexecuted lines are marked @samp{#####} or
-@samp{====}, depending on whether they are reachable by
+@samp{=====}, depending on whether they are reachable by
non-exceptional paths or only exceptional paths such as C++ exception
handlers, respectively. Given @samp{-a} option, unexecuted blocks are
marked @samp{$$$$$} or @samp{%%%%%}, depending on whether a basic block
@@ -618,6 +618,8 @@ Instrumented applications use a static destructor with priority 99
to invoke the @code{__gcov_dump} function. Thus @code{__gcov_dump}
is executed after all user defined static destructors,
as well as handlers registered with @code{atexit}.
+If an executable loads a dynamic shared object via dlopen functionality,
+@option{-Wl,--dynamic-list-data} is needed to dump all profile data.
@c man end
diff --git a/gcc/doc/install.texi2html b/gcc/doc/install.texi2html
index 8a7781ef7cd..44e6f0f8a69 100755
--- a/gcc/doc/install.texi2html
+++ b/gcc/doc/install.texi2html
@@ -52,7 +52,10 @@ for x in index.html specific.html prerequisites.html download.html configure.htm
do
define=`echo $x | sed -e 's/\.//g'`
echo "define = $define"
- $MAKEINFO --no-number-sections -I $SOURCEDIR -I $SOURCEDIR/include -I $DESTDIR $SOURCEDIR/install.texi --html --no-split -D$define -o$DESTDIR/$x
+ $MAKEINFO --no-number-sections -I $SOURCEDIR -I $SOURCEDIR/include -I $DESTDIR $SOURCEDIR/install.texi --html --no-split -D$define -o$DESTDIR/temp.html
+ # Use sed to work around makeinfo 4.7 brokenness.
+ sed -e 's/_002d/-/g' -e 's/_002a/*/g' $DESTDIR/temp.html > $DESTDIR/$x
+ rm $DESTDIR/temp.html
done
rm $DESTDIR/gcc-vers.texi
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 004b108c616..63ae514a047 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1025,7 +1025,7 @@ See RS/6000 and PowerPC Options.
-mfloat-gprs=yes -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double @gol
-mprototype -mno-prototype @gol
-msim -mmvme -mads -myellowknife -memb -msdata @gol
--msdata=@var{opt} -mvxworks -G @var{num} @gol
+-msdata=@var{opt} -mreadonly-in-sdata -mvxworks -G @var{num} @gol
-mrecip -mrecip=@var{opt} -mno-recip -mrecip-precision @gol
-mno-recip-precision @gol
-mveclibabi=@var{type} -mfriz -mno-friz @gol
@@ -5171,6 +5171,9 @@ precision would exceed @code{SIZE_MAX / 2}. The option argument @var{n}
may end in one of the standard suffixes designating a multiple of bytes
such as @code{kB} and @code{KiB} for kilobyte and kibibyte, respectively,
@code{MB} and @code{MiB} for megabyte and mebibyte, and so on.
+@option{-Walloc-size-larger-than=}@var{PTRDIFF_MAX} is enabled by default.
+Warnings controlled by the option can be disabled by specifying @var{n}
+of @var{SIZE_MAX} or more.
@xref{Function Attributes}.
@item -Walloca
@@ -8132,7 +8135,7 @@ This flag is enabled by default at @option{-O2} and higher and depends on
@item -fisolate-erroneous-paths-attribute
@opindex fisolate-erroneous-paths-attribute
-Detect paths that trigger erroneous or undefined behavior due a null value
+Detect paths that trigger erroneous or undefined behavior due to a null value
being used in a way forbidden by a @code{returns_nonnull} or @code{nonnull}
attribute. Isolate those paths from the main control flow and turn the
statement with erroneous or undefined behavior into a trap. This is not
@@ -8690,6 +8693,7 @@ Some assemblers only support this flag when @var{n} is a power of two;
in that case, it is rounded up.
If @var{n} is not specified or is zero, use a machine-dependent default.
+The maximum allowed @var{n} option value is 65536.
Enabled at levels @option{-O2}, @option{-O3}.
@@ -8715,6 +8719,7 @@ are greater than this value, then their values are used instead.
If @var{n} is not specified or is zero, use a machine-dependent default
which is very likely to be @samp{1}, meaning no alignment.
+The maximum allowed @var{n} option value is 65536.
Enabled at levels @option{-O2}, @option{-O3}.
@@ -8728,6 +8733,7 @@ operations.
@option{-fno-align-loops} and @option{-falign-loops=1} are
equivalent and mean that loops are not aligned.
+The maximum allowed @var{n} option value is 65536.
If @var{n} is not specified or is zero, use a machine-dependent default.
@@ -8745,6 +8751,7 @@ need be executed.
equivalent and mean that loops are not aligned.
If @var{n} is not specified or is zero, use a machine-dependent default.
+The maximum allowed @var{n} option value is 65536.
Enabled at levels @option{-O2}, @option{-O3}.
@@ -22105,6 +22112,13 @@ On embedded PowerPC systems, put all initialized global and static data
in the @code{.data} section, and all uninitialized data in the
@code{.bss} section.
+@item -mreadonly-in-sdata
+@itemx -mreadonly-in-sdata
+@opindex mreadonly-in-sdata
+@opindex mno-readonly-in-sdata
+Put read-only objects in the @code{.sdata} section as well. This is the
+default.
+
@item -mblock-move-inline-limit=@var{num}
@opindex mblock-move-inline-limit
Inline all block moves (such as calls to @code{memcpy} or structure
@@ -25126,8 +25140,8 @@ preferred alignment to @option{-mpreferred-stack-boundary=2}.
@itemx -mpclmul
@opindex mpclmul
@need 200
-@itemx -mclfushopt
-@opindex mclfushopt
+@itemx -mclflushopt
+@opindex mclflushopt
@need 200
@itemx -mfsgsbase
@opindex mfsgsbase
diff --git a/gcc/dse.c b/gcc/dse.c
index f87dd50024e..174865bbc40 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1342,6 +1342,9 @@ record_store (rtx body, bb_info_t bb_info)
else
width = GET_MODE_SIZE (GET_MODE (mem));
+ if (width == 0)
+ return 0;
+
if (group_id >= 0)
{
/* In the restrictive case where the base is a constant or the
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index 8e3e86f224c..d5d0cfb0e8d 100644
--- a/gcc/dwarf2asm.c
+++ b/gcc/dwarf2asm.c
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "dwarf2.h"
#include "function.h"
#include "emit-rtl.h"
+#include "fold-const.h"
#ifndef XCOFF_DEBUGGING_INFO
#define XCOFF_DEBUGGING_INFO 0
@@ -925,7 +926,7 @@ dw2_output_indirect_constant_1 (const char *sym, tree id)
SET_DECL_ASSEMBLER_NAME (decl, id);
DECL_ARTIFICIAL (decl) = 1;
DECL_IGNORED_P (decl) = 1;
- DECL_INITIAL (decl) = decl;
+ DECL_INITIAL (decl) = build_fold_addr_expr (decl);
TREE_READONLY (decl) = 1;
TREE_STATIC (decl) = 1;
@@ -938,8 +939,23 @@ dw2_output_indirect_constant_1 (const char *sym, tree id)
}
sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym);
+ /* Disable ASan for decl because redzones cause ABI breakage between GCC and
+ libstdc++ for `.LDFCM*' variables. See PR 78651 for details. */
+ unsigned int save_flag_sanitize = flag_sanitize;
+ flag_sanitize &= ~(SANITIZE_ADDRESS | SANITIZE_USER_ADDRESS
+ | SANITIZE_KERNEL_ADDRESS);
+ /* And also temporarily disable -fsection-anchors. These indirect constants
+ are never referenced from code, so it doesn't make any sense to aggregate
+ them in blocks. */
+ int save_flag_section_anchors = flag_section_anchors;
+ flag_section_anchors = 0;
assemble_variable (decl, 1, 1, 1);
+ flag_section_anchors = save_flag_section_anchors;
+ flag_sanitize = save_flag_sanitize;
assemble_integer (sym_ref, POINTER_SIZE_UNITS, POINTER_SIZE, 1);
+ /* The following is a hack recognized by use_blocks_for_decl_p to disable
+ section anchor handling of the decl. */
+ DECL_INITIAL (decl) = decl;
return 0;
}
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 43bb121fb21..7e1ce9e152a 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -18749,6 +18749,8 @@ rtl_for_decl_init (tree init, tree type)
if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE_SIZE (mode) == 1
&& domain
+ && TYPE_MAX_VALUE (domain)
+ && TREE_CODE (TYPE_MAX_VALUE (domain)) == INTEGER_CST
&& integer_zerop (TYPE_MIN_VALUE (domain))
&& compare_tree_int (TYPE_MAX_VALUE (domain),
TREE_STRING_LENGTH (init) - 1) == 0
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 0d25d4ec17e..3d47559ec0f 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -5851,7 +5851,7 @@ init_emit_regs (void)
attrs = ggc_cleared_alloc<mem_attrs> ();
attrs->align = BITS_PER_UNIT;
attrs->addrspace = ADDR_SPACE_GENERIC;
- if (mode != BLKmode)
+ if (mode != BLKmode && mode != VOIDmode)
{
attrs->size_known_p = true;
attrs->size = GET_MODE_SIZE (mode);
diff --git a/gcc/expr.c b/gcc/expr.c
index d87e24f0634..ee545ce071f 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -5109,7 +5109,10 @@ expand_assignment (tree to, tree from, bool nontemporal)
&& bitpos == 0
&& bitsize == mode_bitsize)
result = store_expr (from, to_rtx, false, nontemporal, reversep);
- else if (bitsize == mode_bitsize / 2
+ else if (COMPLEX_MODE_P (GET_MODE (to_rtx))
+ && (TYPE_MODE (TREE_TYPE (from))
+ == GET_MODE_INNER (GET_MODE (to_rtx)))
+ && bitsize == mode_bitsize / 2
&& (bitpos == 0 || bitpos == mode_bitsize / 2))
result = store_expr (from, XEXP (to_rtx, bitpos != 0), false,
nontemporal, reversep);
@@ -6893,8 +6896,9 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
if (GET_CODE (temp) == PARALLEL)
{
HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
- machine_mode temp_mode
- = smallest_mode_for_size (size * BITS_PER_UNIT, MODE_INT);
+ machine_mode temp_mode = GET_MODE (temp);
+ if (temp_mode == BLKmode || temp_mode == VOIDmode)
+ temp_mode = smallest_mode_for_size (size * BITS_PER_UNIT, MODE_INT);
rtx temp_target = gen_reg_rtx (temp_mode);
emit_group_store (temp_target, temp, TREE_TYPE (exp), size);
temp = temp_target;
diff --git a/gcc/final.c b/gcc/final.c
index 820162b2d28..20af67816bb 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -906,7 +906,7 @@ shorten_branches (rtx_insn *first)
char *varying_length;
rtx body;
int uid;
- rtx align_tab[MAX_CODE_ALIGN];
+ rtx align_tab[MAX_CODE_ALIGN + 1];
/* Compute maximum UID and allocate label_align / uid_shuid. */
max_uid = get_max_uid ();
@@ -1015,7 +1015,7 @@ shorten_branches (rtx_insn *first)
alignment of n. */
uid_align = XCNEWVEC (rtx, max_uid);
- for (i = MAX_CODE_ALIGN; --i >= 0;)
+ for (i = MAX_CODE_ALIGN + 1; --i >= 0;)
align_tab[i] = NULL_RTX;
seq = get_last_insn ();
for (; seq; seq = PREV_INSN (seq))
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 0781f4212b7..ba8dd498554 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -473,12 +473,15 @@ negate_expr_p (tree t)
case EXACT_DIV_EXPR:
if (TYPE_UNSIGNED (type))
break;
- if (negate_expr_p (TREE_OPERAND (t, 0)))
+ /* In general we can't negate A in A / B, because if A is INT_MIN and
+ B is not 1 we change the sign of the result. */
+ if (TREE_CODE (TREE_OPERAND (t, 0)) == INTEGER_CST
+ && negate_expr_p (TREE_OPERAND (t, 0)))
return true;
/* In general we can't negate B in A / B, because if A is INT_MIN and
B is 1, we may turn this into INT_MIN / -1 which is undefined
and actually traps on some architectures. */
- if (! INTEGRAL_TYPE_P (TREE_TYPE (t))
+ if (! ANY_INTEGRAL_TYPE_P (TREE_TYPE (t))
|| TYPE_OVERFLOW_WRAPS (TREE_TYPE (t))
|| (TREE_CODE (TREE_OPERAND (t, 1)) == INTEGER_CST
&& ! integer_onep (TREE_OPERAND (t, 1))))
@@ -652,14 +655,17 @@ fold_negate_expr_1 (location_t loc, tree t)
case EXACT_DIV_EXPR:
if (TYPE_UNSIGNED (type))
break;
- if (negate_expr_p (TREE_OPERAND (t, 0)))
+ /* In general we can't negate A in A / B, because if A is INT_MIN and
+ B is not 1 we change the sign of the result. */
+ if (TREE_CODE (TREE_OPERAND (t, 0)) == INTEGER_CST
+ && negate_expr_p (TREE_OPERAND (t, 0)))
return fold_build2_loc (loc, TREE_CODE (t), type,
negate_expr (TREE_OPERAND (t, 0)),
TREE_OPERAND (t, 1));
/* In general we can't negate B in A / B, because if A is INT_MIN and
B is 1, we may turn this into INT_MIN / -1 which is undefined
and actually traps on some architectures. */
- if ((! INTEGRAL_TYPE_P (TREE_TYPE (t))
+ if ((! ANY_INTEGRAL_TYPE_P (TREE_TYPE (t))
|| TYPE_OVERFLOW_WRAPS (TREE_TYPE (t))
|| (TREE_CODE (TREE_OPERAND (t, 1)) == INTEGER_CST
&& ! integer_onep (TREE_OPERAND (t, 1))))
@@ -7199,7 +7205,7 @@ native_encode_vector (const_tree expr, unsigned char *ptr, int len, int off)
return 0;
offset += res;
if (offset >= len)
- return offset;
+ return (off == -1 && i < count - 1) ? 0 : offset;
if (off != -1)
off = 0;
}
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 6db647e26e6..a9fa0f99fcb 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,376 @@
+2018-07-03 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/82969
+ PR fortran/86242
+ * trans-array.c (structure_alloc_comps): Do not explicitly copy
+ procedure pointer components.
+
+2018-06-25 Fritz Reese <fritzoreese@gmail.com>
+
+ PR fortran/82972
+ PR fortran/83088
+ PR fortran/85851
+ Backport from trunk.
+ * expr.c (component_initializer): Assign init expr to c->initializer.
+ (generate_isocbinding_initializer): New.
+ (gfc_generate_initializer): Call generate_isocbinding_initializer to
+ generate initializers for c_ptr and c_funptr with -finit-derived.
+
+2018-06-25 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83118
+ Back port from trunk
+ * resolve.c (resolve_ordinary_assign): Force the creation of a
+ vtable for assignment of non-polymorphic expressions to an
+ unlimited polymorphic object.
+ * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
+ size of the rhs type for such assignments. Set the dtype, _len
+ and vptrs appropriately.
+ * trans-expr.c (gfc_trans_assignment): Force the use of the
+ _copy function for these assignments.
+
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/85313
+ * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
+ (resolve_oacc_nested_loops): Likewise. Formatting fix.
+
+2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/86110
+ * array.c (gfc_resolve_character_array_constructor): Avoid NULL
+ pointer dereference.
+
+2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/44491
+ * expr.c (gfc_check_assign): Select non-NULL locus.
+
+2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/38351
+ * resolve.c (resolve_operator): Provide better error message for
+ derived type entity used in an binary intrinsic numeric operator.
+
+2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/63514
+ * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
+
+2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/78278
+ * data.c (gfc_assign_data_value): Re-arrange code to allow for
+ an error for double initialization of CHARACTER entities.
+
+2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/86059
+ * array.c (match_array_cons_element): NULL() cannot be in an
+ array constructor.
+
+2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85138
+ PR fortran/85996
+ PR fortran/86051
+ * decl.c (gfc_match_char_spec): Use private namespace in attempt to
+ reduce a charlen to a constant.
+
+2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/86045
+ Backport from trunk.
+ * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
+ 'P' is zero and issue an error if it is.
+
+2018-06-07 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/85641
+ Backport from trunk.
+ * frontend-passes.c (is_fe_temp): Add prototype.
+ (realloc_string_callback): Early return for frontend-generated
+ temporary.
+
+2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85981
+ * resolve.c (resolve_allocate_deallocate): Check errmsg is default
+ character kind.
+
+2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85543
+ Backport from trunk
+ * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
+ pointer dereference.
+
+2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85779
+ Backport from trunk
+ * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
+
+2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85780
+ Backport from trunk
+ * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
+
+2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85895
+ Backport from trunk
+ * resolve.c (resolve_sync): Resolve expression before checking for
+ an error.
+
+2018-05-20 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/80657
+ Backport from trunk
+ * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
+ test for self refs to the function result in the character len
+ expression. If a self reference is found, emit an error and
+ return true.
+ (resolve_fntype): Use the function symbol in the calls to the
+ above.
+
+2018-05-20 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/82275
+ Backport from trunk
+ * match.c (gfc_match_type_spec): Go through the array ref and
+ decrement 'rank' for every dimension that is an element.
+
+2018-05-19 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/82923
+ PR fortran/66694
+ PR fortran/82617
+ Backport from trunk
+ * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
+ charlen backend_decl of the rhs expr to ss->info->string_length
+ so that the value in the current scope is used.
+
+2018-05-16 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83149
+ Backport from trunk
+ * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
+ before accessing its components.
+ * trans-types.c (gfc_sym_type): If a character result has null
+ backend_decl, try the procedure symbol..
+
+2018-16-05 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83898
+ Backport from trunk
+ * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
+ for characters.
+
+2018-05-16 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/84546
+ Backport from trunk
+ * trans-array.c (structure_alloc_comps): Make sure that the
+ vptr is copied and that the unlimited polymorphic _len is used
+ to compute the size to be allocated.
+ (build_array_ref): Set the 'unlimited' argument false in the
+ call to gfc_get_class_array_ref.
+ * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
+ unlimited polymorphic _len for the offset to the element.
+ (gfc_copy_class_to_class): Set the new 'unlimited' argument.
+ * trans.h : Add the boolean 'unlimited' to the prototype.
+
+2018-05-12 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85542
+ Backport from trunk
+ * expr.c (check_inquiry): Avoid NULL pointer dereference.
+
+2018-05-12 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/68846
+ PR fortran/70864
+ Backport from trunk
+ * resolve.c (get_temp_from_expr): The temporary must not have
+ dummy or intent attributes.
+
+2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/70870
+ Backport from trunk
+ * data.c (gfc_assign_data_value): Check that a data object does
+ not also have default initialization.
+
+2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85521
+ Backport from trunk
+ * array.c (gfc_resolve_character_array_constructor): Substrings
+ with upper bound smaller than lower bound are zero length strings.
+
+2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85687
+ Backport from trunk
+ * check.c (gfc_check_rank): Check that the argument is a data object.
+
+2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ PR fortran/85507
+ Backport from trunk.
+ * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
+ introduced by r259385.
+ * trans-intrinsic.c (conv_caf_send): Always report a dependency for
+ same variables in coarray assignments.
+
+2018-04-28 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ PR fortran/81773
+ PR fortran/83606
+ Backport from trunk.
+ * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
+ during dependency computation. They define no data dependency.
+ * trans-array.c (conv_array_index_offset): The stride can not be set
+ here, prevent fail.
+ * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
+ for caf_get's result and copying to the array with vectorial
+ indexing.
+
+2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85520
+ * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
+
+2018-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/85084
+ Backport from trunk.
+ * frontend-passes.c (gfc_run_passes): Do not run front-end
+ optimizations if a previous error occurred.
+
+2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85001
+ * interface.c (symbol_rank): Remove bogus null pointer check that
+ crept in when translating a ternary operator into an if-else
+ constructor.
+
+2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/84931
+ Backport from trunk
+ * simplify.c (gfc_convert_constant): Correctly handle iterators
+ for type conversion.
+
+2018-03-19 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/77414
+ * decl.c (get_proc_name): Check for a subroutine re-defined in
+ the contain portion of a subroutine. Change language of existing
+ error message to better describe the issue. While here fix whitespace
+ issues.
+
+2018-03-19 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/65453
+ * decl.c (get_proc_name): Catch clash between a procedure statement
+ and a contained subprogram
+
+2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/78741
+ * decl.c (get_proc_name): Check for clash of entry name with
+ subroutine name.
+
+2018-03-12 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/83939
+ * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
+
+2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/84734
+ * arith.c (check_result, eval_intrinsic): If result overflows, pass
+ the expression up the chain instead of a NULL pointer.
+
+2018-03-08 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/64124
+ PR fortran/70409
+ * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
+
+2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/56667
+ * primary.c (match_sym_complex_part): Give the matcher for an implied
+ do-loop a chance to run.
+
+2018-03-04 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83076
+ * resolve.c (resolve_fl_derived0): Add caf_token fields for
+ allocatable and pointer scalars, when -fcoarray selected.
+ * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
+ field as well as the backend_decl.
+ (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
+ derived types that are not vtypes. Components with caf_token
+ attribute are pvoid types. For a component requiring it, find
+ the caf_token field and have the component token field point to
+ its backend_decl.
+
+2018-03-03 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/71085
+ * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
+ dereference NULL pointer.
+
+2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/51434
+ * simplify.c (gfc_simplify_transfer): Resolve mold.
+
+2018-03-03 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/80965
+ * resolve.c (build_loc_call): Change symtree name from 'loc' to
+ '_loc'.
+
+2018-03-03 Paul Thomas <pault@gcc.gnu.org>
+
+ Backported from trunk.
+ PR fortran/78990
+ * expr.c (gfc_is_class_array_function): Renamed from
+ 'gfc_is_alloc_class_array_function' and modified to return true
+ for pointers as well as allocatable results.
+ * gfortran.h : Change of name for prototype of above function.
+ * trans-array.c (gfc_add_loop_ss_code): Force finalization of
+ class array results.
+ (build_class_array_ref): Change assertion into a condition.
+ (build_class_array_ref): Set the se class_vptr for class array
+ function results.
+ (gfc_walk_function_expr): Reference gfc_is_class_array_function
+ as above.
+ * trans-decl.c (get_proc_result): Move it up before
+ gfc_trans_deferred_vars.
+ (gfc_trans_deferred_vars): Nullify explicit return class arrays
+ on entry.
+ * trans-expr.c (gfc_conv_class_to_class): Allow conversion of
+ class array functions that have an se class_vptr and use it
+ for the result vptr.
+ (gfc_conv_subref_array_arg): Rename reference to the above
+ function.
+ (gfc_conv_procedure_call): Ditto. Add the se pre block to the
+ loop pre block before the function is evaluated. Do not
+ finalize class pointer results.
+ (arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
+ renamed references.
+ * trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.
+
2018-03-03 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index 8fa305c6aee..c594048eb51 100644
--- a/gcc/fortran/arith.c
+++ b/gcc/fortran/arith.c
@@ -555,10 +555,10 @@ check_result (arith rc, gfc_expr *x, gfc_expr *r, gfc_expr **rp)
val = ARITH_OK;
}
- if (val != ARITH_OK)
- gfc_free_expr (r);
- else
+ if (val == ARITH_OK || val == ARITH_OVERFLOW)
*rp = r;
+ else
+ gfc_free_expr (r);
return val;
}
@@ -1603,9 +1603,13 @@ eval_intrinsic (gfc_intrinsic_op op,
if (rc != ARITH_OK)
{
gfc_error (gfc_arith_error (rc), &op1->where);
+ if (rc == ARITH_OVERFLOW)
+ goto done;
return NULL;
}
+done:
+
gfc_free_expr (op1);
gfc_free_expr (op2);
return result;
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
index ec0c26656ff..17b3c7d44e8 100644
--- a/gcc/fortran/array.c
+++ b/gcc/fortran/array.c
@@ -1079,6 +1079,15 @@ match_array_cons_element (gfc_constructor_base *result)
if (m != MATCH_YES)
return m;
+ if (expr->expr_type == EXPR_FUNCTION
+ && expr->ts.type == BT_UNKNOWN
+ && strcmp(expr->symtree->name, "null") == 0)
+ {
+ gfc_error ("NULL() at %C cannot appear in an array constructor");
+ gfc_free_expr (expr);
+ return MATCH_ERROR;
+ }
+
gfc_constructor_append_expr (result, expr, &gfc_current_locus);
return MATCH_YES;
}
@@ -1998,7 +2007,9 @@ got_charlen:
gfc_ref *ref;
for (ref = p->expr->ref; ref; ref = ref->next)
if (ref->type == REF_SUBSTRING
+ && ref->u.ss.start
&& ref->u.ss.start->expr_type == EXPR_CONSTANT
+ && ref->u.ss.end
&& ref->u.ss.end->expr_type == EXPR_CONSTANT)
break;
@@ -2021,7 +2032,8 @@ got_charlen:
else
return true;
- gcc_assert (current_length != -1);
+ if (current_length < 0)
+ current_length = 0;
if (found_length == -1)
found_length = current_length;
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 6e62d409e7b..f5e0ab5f5b8 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -3764,8 +3764,11 @@ gfc_check_rank (gfc_expr *a)
? a->value.function.esym->result->attr.pointer
: a->symtree->n.sym->result->attr.pointer;
- if (a->expr_type == EXPR_OP || a->expr_type == EXPR_NULL
- || a->expr_type == EXPR_COMPCALL|| a->expr_type == EXPR_PPC
+ if (a->expr_type == EXPR_OP
+ || a->expr_type == EXPR_NULL
+ || a->expr_type == EXPR_COMPCALL
+ || a->expr_type == EXPR_PPC
+ || a->ts.type == BT_PROCEDURE
|| !is_variable)
{
gfc_error ("The argument of the RANK intrinsic at %L must be a data "
diff --git a/gcc/fortran/data.c b/gcc/fortran/data.c
index 184e53d480f..5d1d38042f4 100644
--- a/gcc/fortran/data.c
+++ b/gcc/fortran/data.c
@@ -481,6 +481,21 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index,
mpz_clear (offset);
gcc_assert (repeat == NULL);
+ /* Overwriting an existing initializer is non-standard but usually only
+ provokes a warning from other compilers. */
+ if (init != NULL && init->where.lb && rvalue->where.lb)
+ {
+ /* Order in which the expressions arrive here depends on whether
+ they are from data statements or F95 style declarations.
+ Therefore, check which is the most recent. */
+ expr = (LOCATION_LINE (init->where.lb->location)
+ > LOCATION_LINE (rvalue->where.lb->location))
+ ? init : rvalue;
+ if (gfc_notify_std (GFC_STD_GNU, "re-initialization of %qs at %L",
+ symbol->name, &expr->where) == false)
+ return false;
+ }
+
if (ref || last_ts->type == BT_CHARACTER)
{
/* An initializer has to be constant. */
@@ -492,20 +507,13 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index,
}
else
{
- /* Overwriting an existing initializer is non-standard but usually only
- provokes a warning from other compilers. */
- if (init != NULL)
+ if (lvalue->ts.type == BT_DERIVED
+ && gfc_has_default_initializer (lvalue->ts.u.derived))
{
- /* Order in which the expressions arrive here depends on whether
- they are from data statements or F95 style declarations.
- Therefore, check which is the most recent. */
- expr = (LOCATION_LINE (init->where.lb->location)
- > LOCATION_LINE (rvalue->where.lb->location))
- ? init : rvalue;
- if (gfc_notify_std (GFC_STD_GNU,
- "re-initialization of %qs at %L",
- symbol->name, &expr->where) == false)
- return false;
+ gfc_error ("Nonpointer object %qs with default initialization "
+ "shall not appear in a DATA statement at %L",
+ symbol->name, &lvalue->where);
+ return false;
}
expr = gfc_copy_expr (rvalue);
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 6d3d28af127..e73f2d76f45 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -1129,14 +1129,12 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry)
if (sym->attr.proc == PROC_ST_FUNCTION)
return rc;
- if (sym->attr.module_procedure
- && sym->attr.if_source == IFSRC_IFBODY)
+ if (sym->attr.module_procedure && sym->attr.if_source == IFSRC_IFBODY)
{
/* Create a partially populated interface symbol to carry the
characteristics of the procedure and the result. */
sym->tlink = gfc_new_symbol (name, sym->ns);
- gfc_add_type (sym->tlink, &(sym->ts),
- &gfc_current_locus);
+ gfc_add_type (sym->tlink, &(sym->ts), &gfc_current_locus);
gfc_copy_attr (&sym->tlink->attr, &sym->attr, NULL);
if (sym->attr.dimension)
sym->tlink->as = gfc_copy_array_spec (sym->as);
@@ -1166,11 +1164,22 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry)
accessible names. */
if (sym->attr.flavor != 0
&& sym->attr.proc != 0
- && (sym->attr.subroutine || sym->attr.function)
+ && (sym->attr.subroutine || sym->attr.function || sym->attr.entry)
&& sym->attr.if_source != IFSRC_UNKNOWN)
gfc_error_now ("Procedure %qs at %C is already defined at %L",
name, &sym->declared_at);
+ if (sym->attr.flavor != 0
+ && sym->attr.entry && sym->attr.if_source != IFSRC_UNKNOWN)
+ gfc_error_now ("Procedure %qs at %C is already defined at %L",
+ name, &sym->declared_at);
+
+ if (sym->attr.external && sym->attr.procedure
+ && gfc_current_state () == COMP_CONTAINS)
+ gfc_error_now ("Contained procedure %qs at %C clashes with "
+ "procedure defined at %L",
+ name, &sym->declared_at);
+
/* Trap a procedure with a name the same as interface in the
encompassing scope. */
if (sym->attr.generic != 0
@@ -1190,7 +1199,16 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry)
&& sym->attr.access == 0
&& !module_fcn_entry)
gfc_error_now ("Procedure %qs at %C has an explicit interface "
- "and must not have attributes declared at %L",
+ "from a previous declaration", name);
+ }
+
+ if (sym && !sym->gfc_new
+ && sym->attr.flavor != FL_UNKNOWN
+ && sym->attr.referenced == 0 && sym->attr.subroutine == 1
+ && gfc_state_stack->state == COMP_CONTAINS
+ && gfc_state_stack->previous->state == COMP_SUBROUTINE)
+ {
+ gfc_error_now ("Procedure %qs at %C is already defined at %L",
name, &sym->declared_at);
}
@@ -1215,10 +1233,10 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry)
/* See if the procedure should be a module procedure. */
if (((sym->ns->proc_name != NULL
- && sym->ns->proc_name->attr.flavor == FL_MODULE
- && sym->attr.proc != PROC_MODULE)
- || (module_fcn_entry && sym->attr.proc != PROC_MODULE))
- && !gfc_add_procedure (&sym->attr, PROC_MODULE, sym->name, NULL))
+ && sym->ns->proc_name->attr.flavor == FL_MODULE
+ && sym->attr.proc != PROC_MODULE)
+ || (module_fcn_entry && sym->attr.proc != PROC_MODULE))
+ && !gfc_add_procedure (&sym->attr, PROC_MODULE, sym->name, NULL))
rc = 2;
return rc;
@@ -2979,7 +2997,38 @@ done:
if (seen_length == 0)
cl->length = gfc_get_int_expr (gfc_default_integer_kind, NULL, 1);
else
- cl->length = len;
+ {
+ /* If gfortran ends up here, then len may be reducible to a constant.
+ Try to do that here. If it does not reduce, simply assign len to
+ charlen. A complication occurs with user-defined generic functions,
+ which are not resolved. Use a private namespace to deal with
+ generic functions. */
+
+ if (len && len->expr_type != EXPR_CONSTANT)
+ {
+ gfc_namespace *old_ns;
+ gfc_expr *e;
+
+ old_ns = gfc_current_ns;
+ gfc_current_ns = gfc_get_namespace (NULL, 0);
+
+ e = gfc_copy_expr (len);
+ gfc_reduce_init_expr (e);
+ if (e->expr_type == EXPR_CONSTANT)
+ {
+ gfc_replace_expr (len, e);
+ if (mpz_cmp_si (len->value.integer, 0) < 0)
+ mpz_set_ui (len->value.integer, 0);
+ }
+ else
+ gfc_free_expr (e);
+
+ gfc_free_namespace (gfc_current_ns);
+ gfc_current_ns = old_ns;
+ }
+
+ cl->length = len;
+ }
ts->u.cl = cl;
ts->kind = kind == 0 ? gfc_default_character_kind : kind;
@@ -8996,8 +9045,12 @@ gfc_match_derived_decl (void)
if (!gensym->attr.generic && gensym->ts.type != BT_UNKNOWN)
{
- gfc_error ("Derived type name %qs at %C already has a basic type "
- "of %s", gensym->name, gfc_typename (&gensym->ts));
+ if (gensym->ts.u.derived)
+ gfc_error ("Derived type name %qs at %C already has a basic type "
+ "of %s", gensym->name, gfc_typename (&gensym->ts));
+ else
+ gfc_error ("Derived type name %qs at %C already has a basic type",
+ gensym->name);
return MATCH_ERROR;
}
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index f347c753702..85247b65735 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -2315,7 +2315,7 @@ check_inquiry (gfc_expr *e, int not_restricted)
/* Assumed character length will not reduce to a constant expression
with LEN, as required by the standard. */
- if (i == 5 && not_restricted
+ if (i == 5 && not_restricted && ap->expr->symtree
&& ap->expr->symtree->n.sym->ts.type == BT_CHARACTER
&& (ap->expr->symtree->n.sym->ts.u.cl->length == NULL
|| ap->expr->symtree->n.sym->ts.deferred))
@@ -3288,6 +3288,8 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform,
/* Only DATA Statements come here. */
if (!conform)
{
+ locus *where;
+
/* Numeric can be converted to any other numeric. And Hollerith can be
converted to any other type. */
if ((gfc_numeric_ts (&lvalue->ts) && gfc_numeric_ts (&rvalue->ts))
@@ -3297,8 +3299,9 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform,
if (lvalue->ts.type == BT_LOGICAL && rvalue->ts.type == BT_LOGICAL)
return true;
+ where = lvalue->where.lb ? &lvalue->where : &rvalue->where;
gfc_error ("Incompatible types in DATA statement at %L; attempted "
- "conversion of %s to %s", &lvalue->where,
+ "conversion of %s to %s", where,
gfc_typename (&rvalue->ts), gfc_typename (&lvalue->ts));
return false;
@@ -4335,7 +4338,7 @@ component_initializer (gfc_typespec *ts, gfc_component *c, bool generate)
gfc_apply_init (&c->ts, &c->attr, init);
}
- return init;
+ return (c->initializer = init);
}
@@ -4347,6 +4350,32 @@ gfc_default_initializer (gfc_typespec *ts)
return gfc_generate_initializer (ts, false);
}
+/* Generate an initializer expression for an iso_c_binding type
+ such as c_[fun]ptr. The appropriate initializer is c_null_[fun]ptr. */
+
+static gfc_expr *
+generate_isocbinding_initializer (gfc_symbol *derived)
+{
+ /* The initializers have already been built into the c_null_[fun]ptr symbols
+ from gen_special_c_interop_ptr. */
+ gfc_symtree *npsym = NULL;
+ if (0 == strcmp (derived->name, "c_ptr"))
+ gfc_find_sym_tree ("c_null_ptr", gfc_current_ns, true, &npsym);
+ else if (0 == strcmp (derived->name, "c_funptr"))
+ gfc_find_sym_tree ("c_null_funptr", gfc_current_ns, true, &npsym);
+ else
+ gfc_internal_error ("generate_isocbinding_initializer(): bad iso_c_binding"
+ " type, expected %<c_ptr%> or %<c_funptr%>");
+ if (npsym)
+ {
+ gfc_expr *init = gfc_copy_expr (npsym->n.sym->value);
+ init->symtree = npsym;
+ init->ts.is_iso_c = true;
+ return init;
+ }
+
+ return NULL;
+}
/* Get or generate an expression for a default initializer of a derived type.
If -finit-derived is specified, generate default initialization expressions
@@ -4357,8 +4386,12 @@ gfc_generate_initializer (gfc_typespec *ts, bool generate)
{
gfc_expr *init, *tmp;
gfc_component *comp;
+
generate = flag_init_derived && generate;
+ if (ts->u.derived->ts.is_iso_c && generate)
+ return generate_isocbinding_initializer (ts->u.derived);
+
/* See if we have a default initializer in this, but not in nested
types (otherwise we could use gfc_has_default_initializer()).
We don't need to check if we are going to generate them. */
@@ -4762,14 +4795,15 @@ gfc_is_alloc_class_scalar_function (gfc_expr *expr)
/* Determine if an expression is a function with an allocatable class array
result. */
bool
-gfc_is_alloc_class_array_function (gfc_expr *expr)
+gfc_is_class_array_function (gfc_expr *expr)
{
if (expr->expr_type == EXPR_FUNCTION
&& expr->value.function.esym
&& expr->value.function.esym->result
&& expr->value.function.esym->result->ts.type == BT_CLASS
&& CLASS_DATA (expr->value.function.esym->result)->attr.dimension
- && CLASS_DATA (expr->value.function.esym->result)->attr.allocatable)
+ && (CLASS_DATA (expr->value.function.esym->result)->attr.allocatable
+ || CLASS_DATA (expr->value.function.esym->result)->attr.pointer))
return true;
return false;
diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c
index 8a5829a3358..ef1d8f97434 100644
--- a/gcc/fortran/frontend-passes.c
+++ b/gcc/fortran/frontend-passes.c
@@ -48,6 +48,8 @@ static gfc_code * create_do_loop (gfc_expr *, gfc_expr *, gfc_expr *,
locus *, gfc_namespace *,
char *vname=NULL);
+static bool is_fe_temp (gfc_expr *e);
+
#ifdef CHECKING_P
static void check_locus (gfc_namespace *);
#endif
@@ -135,6 +137,10 @@ gfc_run_passes (gfc_namespace *ns)
check_locus (ns);
#endif
+ gfc_get_errors (&w, &e);
+ if (e > 0)
+ return;
+
if (flag_frontend_optimize)
{
optimize_namespace (ns);
@@ -145,10 +151,6 @@ gfc_run_passes (gfc_namespace *ns)
expr_array.release ();
}
- gfc_get_errors (&w, &e);
- if (e > 0)
- return;
-
if (flag_realloc_lhs)
realloc_strings (ns);
}
@@ -231,6 +233,9 @@ realloc_string_callback (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
|| !expr1->ts.deferred)
return 0;
+ if (is_fe_temp (expr1))
+ return 0;
+
expr2 = gfc_discard_nops (co->expr2);
if (expr2->expr_type == EXPR_VARIABLE)
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index a32de3e7202..e5287c5d8d9 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -863,7 +863,7 @@ typedef struct
unsigned alloc_comp:1, pointer_comp:1, proc_pointer_comp:1,
private_comp:1, zero_comp:1, coarray_comp:1, lock_comp:1,
event_comp:1, defined_assign_comp:1, unlimited_polymorphic:1,
- has_dtio_procs:1;
+ has_dtio_procs:1, caf_token:1;
/* This is a temporary selector for SELECT TYPE or an associate
variable for SELECT_TYPE or ASSOCIATE. */
@@ -3147,7 +3147,7 @@ bool gfc_expr_check_typed (gfc_expr*, gfc_namespace*, bool);
gfc_component * gfc_get_proc_ptr_comp (gfc_expr *);
bool gfc_is_proc_ptr_comp (gfc_expr *);
bool gfc_is_alloc_class_scalar_function (gfc_expr *);
-bool gfc_is_alloc_class_array_function (gfc_expr *);
+bool gfc_is_class_array_function (gfc_expr *);
bool gfc_ref_this_image (gfc_ref *ref);
bool gfc_is_coindexed (gfc_expr *);
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 162f7772970..bd7707efc88 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1263,7 +1263,7 @@ symbol_rank (gfc_symbol *sym)
{
gfc_array_spec *as = NULL;
- if (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->as)
+ if (sym->ts.type == BT_CLASS && CLASS_DATA (sym))
as = CLASS_DATA (sym)->as;
else
as = sym->as;
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 682f7b021b0..89fb43dc048 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -2063,7 +2063,7 @@ gfc_match_type_spec (gfc_typespec *ts)
or list item in a type-list of an OpenMP reduction clause. Need to
differentiate REAL([KIND]=scalar-int-initialization-expr) from
REAL(A,[KIND]) and REAL(KIND,A). Logically, when this code was
- written the use of LOGICAL as a type-spec or intrinsic subprogram
+ written the use of LOGICAL as a type-spec or intrinsic subprogram
was overlooked. */
m = gfc_match (" %n", name);
@@ -5714,6 +5714,7 @@ copy_ts_from_selector_to_associate (gfc_expr *associate, gfc_expr *selector)
{
gfc_ref *ref;
gfc_symbol *assoc_sym;
+ int rank = 0;
assoc_sym = associate->symtree->n.sym;
@@ -5750,14 +5751,28 @@ copy_ts_from_selector_to_associate (gfc_expr *associate, gfc_expr *selector)
selector->rank = ref->u.ar.dimen;
else
selector->rank = 0;
+
+ rank = selector->rank;
}
- if (selector->rank)
+ if (rank)
{
- assoc_sym->attr.dimension = 1;
- assoc_sym->as = gfc_get_array_spec ();
- assoc_sym->as->rank = selector->rank;
- assoc_sym->as->type = AS_DEFERRED;
+ for (int i = 0; i < ref->u.ar.dimen + ref->u.ar.codimen; i++)
+ if (ref->u.ar.dimen_type[i] == DIMEN_ELEMENT
+ || (ref->u.ar.dimen_type[i] == DIMEN_UNKNOWN
+ && ref->u.ar.end[i] == NULL
+ && ref->u.ar.stride[i] == NULL))
+ rank--;
+
+ if (rank)
+ {
+ assoc_sym->attr.dimension = 1;
+ assoc_sym->as = gfc_get_array_spec ();
+ assoc_sym->as->rank = rank;
+ assoc_sym->as->type = AS_DEFERRED;
+ }
+ else
+ assoc_sym->as = NULL;
}
else
assoc_sym->as = NULL;
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 746785c8893..8f7c622bbed 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -5575,8 +5575,6 @@ resolve_omp_do (gfc_code *code)
"iteration space at %L", name, &do_code->loc);
break;
}
- if (j < i)
- break;
do_code2 = do_code2->block->next;
}
}
@@ -5740,12 +5738,10 @@ resolve_oacc_nested_loops (gfc_code *code, gfc_code* do_code, int collapse,
|| gfc_find_sym_in_expr (ivar, do_code->ext.iterator->end)
|| gfc_find_sym_in_expr (ivar, do_code->ext.iterator->step))
{
- gfc_error ("!$ACC LOOP %s loops don't form rectangular iteration space at %L",
- clause, &do_code->loc);
+ gfc_error ("!$ACC LOOP %s loops don't form rectangular "
+ "iteration space at %L", clause, &do_code->loc);
break;
}
- if (j < i)
- break;
do_code2 = do_code2->block->next;
}
}
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index b97b4a1ca59..c0ab09e7f50 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -1247,8 +1247,22 @@ match_sym_complex_part (gfc_expr **result)
if (sym->attr.flavor != FL_PARAMETER)
{
- gfc_error ("Expected PARAMETER symbol in complex constant at %C");
- return MATCH_ERROR;
+ /* Give the matcher for implied do-loops a chance to run. This yields
+ a much saner error message for "write(*,*) (i, i=1, 6" where the
+ right parenthesis is missing. */
+ char c;
+ gfc_gobble_whitespace ();
+ c = gfc_peek_ascii_char ();
+ if (c == '=' || c == ',')
+ {
+ m = MATCH_NO;
+ }
+ else
+ {
+ gfc_error ("Expected PARAMETER symbol in complex constant at %C");
+ m = MATCH_ERROR;
+ }
+ return m;
}
if (!sym->value)
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 4bb88b4e23b..483f3b2a7b7 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -2906,8 +2906,8 @@ update_current_proc_array_outer_dependency (gfc_symbol *sym)
/* If SYM has references to outer arrays, so has the procedure calling
SYM. If SYM is a procedure pointer, we can assume the worst. */
- if (sym->attr.array_outer_dependency
- || sym->attr.proc_pointer)
+ if ((sym->attr.array_outer_dependency || sym->attr.proc_pointer)
+ && gfc_current_ns->proc_name)
gfc_current_ns->proc_name->attr.array_outer_dependency = 1;
}
@@ -3685,7 +3685,13 @@ resolve_operator (gfc_expr *e)
break;
}
- sprintf (msg,
+ if (op1->ts.type == BT_DERIVED || op2->ts.type == BT_DERIVED)
+ sprintf (msg,
+ _("Unexpected derived-type entities in binary intrinsic "
+ "numeric operator %%<%s%%> at %%L"),
+ gfc_op2string (e->value.op.op));
+ else
+ sprintf (msg,
_("Operands of binary numeric operator %%<%s%%> at %%L are %s/%s"),
gfc_op2string (e->value.op.op), gfc_typename (&op1->ts),
gfc_typename (&op2->ts));
@@ -7554,12 +7560,17 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn)
gfc_check_vardef_context (errmsg, false, false, false,
_("ERRMSG variable"));
+ /* F18:R928 alloc-opt is ERRMSG = errmsg-variable
+ F18:R930 errmsg-variable is scalar-default-char-variable
+ F18:R906 default-char-variable is variable
+ F18:C906 default-char-variable shall be default character. */
if ((errmsg->ts.type != BT_CHARACTER
&& !(errmsg->ref
&& (errmsg->ref->type == REF_ARRAY
|| errmsg->ref->type == REF_COMPONENT)))
- || errmsg->rank > 0 )
- gfc_error ("Errmsg-variable at %L must be a scalar CHARACTER "
+ || errmsg->rank > 0
+ || errmsg->ts.kind != gfc_default_character_kind)
+ gfc_error ("ERRMSG variable at %L shall be a scalar default CHARACTER "
"variable", &errmsg->where);
for (p = code->ext.alloc.list; p; p = p->next)
@@ -8498,7 +8509,7 @@ build_loc_call (gfc_expr *sym_expr)
gfc_expr *loc_call;
loc_call = gfc_get_expr ();
loc_call->expr_type = EXPR_FUNCTION;
- gfc_get_sym_tree ("loc", gfc_current_ns, &loc_call->symtree, false);
+ gfc_get_sym_tree ("_loc", gfc_current_ns, &loc_call->symtree, false);
loc_call->symtree->n.sym->attr.flavor = FL_PROCEDURE;
loc_call->symtree->n.sym->attr.intrinsic = 1;
loc_call->symtree->n.sym->result = loc_call->symtree->n.sym;
@@ -8551,6 +8562,9 @@ resolve_select_type (gfc_code *code, gfc_namespace *old_ns)
code->expr1->symtree->n.sym->ts = code->expr2->ts;
selector_type = CLASS_DATA (code->expr2)->ts.u.derived;
+ if (code->expr2->rank && CLASS_DATA (code->expr1)->as)
+ CLASS_DATA (code->expr1)->as->rank = code->expr2->rank;
+
/* F2008: C803 The selector expression must not be coindexed. */
if (gfc_is_coindexed (code->expr2))
{
@@ -9296,6 +9310,7 @@ resolve_sync (gfc_code *code)
}
/* Check STAT. */
+ gfc_resolve_expr (code->expr2);
if (code->expr2
&& (code->expr2->ts.type != BT_INTEGER || code->expr2->rank != 0
|| code->expr2->expr_type != EXPR_VARIABLE))
@@ -9303,6 +9318,7 @@ resolve_sync (gfc_code *code)
&code->expr2->where);
/* Check ERRMSG. */
+ gfc_resolve_expr (code->expr3);
if (code->expr3
&& (code->expr3->ts.type != BT_CHARACTER || code->expr3->rank != 0
|| code->expr3->expr_type != EXPR_VARIABLE))
@@ -10135,6 +10151,11 @@ resolve_ordinary_assign (gfc_code *code, gfc_namespace *ns)
&& rhs->expr_type != EXPR_ARRAY)
gfc_add_data_component (rhs);
+ /* Make sure there is a vtable and, in particular, a _copy for the
+ rhs type. */
+ if (UNLIMITED_POLY (lhs) && lhs->rank && rhs->ts.type != BT_CLASS)
+ gfc_find_vtab (&rhs->ts);
+
bool caf_convert_to_send = flag_coarray == GFC_FCOARRAY_LIB
&& (lhs_coindexed
|| (code->expr2->expr_type == EXPR_FUNCTION
@@ -10273,6 +10294,8 @@ get_temp_from_expr (gfc_expr *e, gfc_namespace *ns)
tmp->n.sym->attr.function = 0;
tmp->n.sym->attr.result = 0;
tmp->n.sym->attr.flavor = FL_VARIABLE;
+ tmp->n.sym->attr.dummy = 0;
+ tmp->n.sym->attr.intent = INTENT_UNKNOWN;
if (as)
{
@@ -12225,6 +12248,19 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
}
}
+ /* F2018, C15100: "The result of an elemental function shall be scalar,
+ and shall not have the POINTER or ALLOCATABLE attribute." The scalar
+ pointer is tested and caught elsewhere. */
+ if (sym->attr.elemental && sym->result
+ && (sym->result->attr.allocatable || sym->result->attr.pointer))
+ {
+ gfc_error ("Function result variable %qs at %L of elemental "
+ "function %qs shall not have an ALLOCATABLE or POINTER "
+ "attribute", sym->result->name,
+ &sym->result->declared_at, sym->name);
+ return false;
+ }
+
if (sym->attr.is_bind_c && sym->attr.is_c_interop != 1)
{
gfc_formal_arglist *curr_arg;
@@ -12250,7 +12286,7 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
while (curr_arg != NULL)
{
/* Skip implicitly typed dummy args here. */
- if (curr_arg->sym->attr.implicit_type == 0)
+ if (curr_arg->sym && curr_arg->sym->attr.implicit_type == 0)
if (!gfc_verify_c_interop_param (curr_arg->sym))
/* If something is found to fail, record the fact so we
can mark the symbol for the procedure as not being
@@ -13799,6 +13835,31 @@ resolve_fl_derived0 (gfc_symbol *sym)
if (!success)
return false;
+ /* Now add the caf token field, where needed. */
+ if (flag_coarray != GFC_FCOARRAY_NONE
+ && !sym->attr.is_class && !sym->attr.vtype)
+ {
+ for (c = sym->components; c; c = c->next)
+ if (!c->attr.dimension && !c->attr.codimension
+ && (c->attr.allocatable || c->attr.pointer))
+ {
+ char name[GFC_MAX_SYMBOL_LEN+9];
+ gfc_component *token;
+ sprintf (name, "_caf_%s", c->name);
+ token = gfc_find_component (sym, name, true, true, NULL);
+ if (token == NULL)
+ {
+ if (!gfc_add_component (sym, name, &token))
+ return false;
+ token->ts.type = BT_VOID;
+ token->ts.kind = gfc_default_integer_kind;
+ token->attr.access = ACCESS_PRIVATE;
+ token->attr.artificial = 1;
+ token->attr.caf_token = 1;
+ }
+ }
+ }
+
check_defined_assignments (sym);
if (!sym->attr.defined_assign_comp && super_type)
@@ -15827,7 +15888,7 @@ resolve_equivalence (gfc_equiv *eq)
static bool
flag_fn_result_spec (gfc_expr *expr,
- gfc_symbol *sym ATTRIBUTE_UNUSED,
+ gfc_symbol *sym,
int *f ATTRIBUTE_UNUSED)
{
gfc_namespace *ns;
@@ -15840,6 +15901,13 @@ flag_fn_result_spec (gfc_expr *expr,
if (!ns->parent)
break;
+ if (sym == s)
+ {
+ gfc_error ("Self reference in character length expression "
+ "for %qs at %L", sym->name, &expr->where);
+ return true;
+ }
+
if (!s->fn_result_spec
&& s->attr.flavor == FL_PARAMETER)
{
@@ -15922,7 +15990,7 @@ resolve_fntype (gfc_namespace *ns)
}
if (sym->ts.type == BT_CHARACTER)
- gfc_traverse_expr (sym->ts.u.cl->length, NULL, flag_fn_result_spec, 0);
+ gfc_traverse_expr (sym->ts.u.cl->length, sym, flag_fn_result_spec, 0);
}
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index d12ae5f4aab..6cfa2283336 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "gfortran.h"
#include "arith.h"
#include "intrinsic.h"
+#include "match.h"
#include "target-memory.h"
#include "constructor.h"
#include "version.h" /* For version_string. */
@@ -4641,43 +4642,48 @@ gfc_simplify_mod (gfc_expr *a, gfc_expr *p)
gfc_expr *result;
int kind;
- if (a->expr_type != EXPR_CONSTANT || p->expr_type != EXPR_CONSTANT)
+ /* First check p. */
+ if (p->expr_type != EXPR_CONSTANT)
return NULL;
- kind = a->ts.kind > p->ts.kind ? a->ts.kind : p->ts.kind;
- result = gfc_get_constant_expr (a->ts.type, kind, &a->where);
-
- switch (a->ts.type)
+ /* p shall not be 0. */
+ switch (p->ts.type)
{
case BT_INTEGER:
if (mpz_cmp_ui (p->value.integer, 0) == 0)
{
- /* Result is processor-dependent. */
- gfc_error ("Second argument MOD at %L is zero", &a->where);
- gfc_free_expr (result);
+ gfc_error ("Argument %qs of MOD at %L shall not be zero",
+ "P", &p->where);
return &gfc_bad_expr;
}
- mpz_tdiv_r (result->value.integer, a->value.integer, p->value.integer);
break;
-
case BT_REAL:
if (mpfr_cmp_ui (p->value.real, 0) == 0)
{
- /* Result is processor-dependent. */
- gfc_error ("Second argument of MOD at %L is zero", &p->where);
- gfc_free_expr (result);
+ gfc_error ("Argument %qs of MOD at %L shall not be zero",
+ "P", &p->where);
return &gfc_bad_expr;
}
-
- gfc_set_model_kind (kind);
- mpfr_fmod (result->value.real, a->value.real, p->value.real,
- GFC_RND_MODE);
break;
-
default:
gfc_internal_error ("gfc_simplify_mod(): Bad arguments");
}
+ if (a->expr_type != EXPR_CONSTANT)
+ return NULL;
+
+ kind = a->ts.kind > p->ts.kind ? a->ts.kind : p->ts.kind;
+ result = gfc_get_constant_expr (a->ts.type, kind, &a->where);
+
+ if (a->ts.type == BT_INTEGER)
+ mpz_tdiv_r (result->value.integer, a->value.integer, p->value.integer);
+ else
+ {
+ gfc_set_model_kind (kind);
+ mpfr_fmod (result->value.real, a->value.real, p->value.real,
+ GFC_RND_MODE);
+ }
+
return range_check (result, "MOD");
}
@@ -6579,10 +6585,12 @@ gfc_simplify_transfer (gfc_expr *source, gfc_expr *mold, gfc_expr *size)
unsigned char *buffer;
size_t result_length;
+ if (!gfc_is_constant_expr (source) || !gfc_is_constant_expr (size))
+ return NULL;
- if (!gfc_is_constant_expr (source)
- || (gfc_init_expr_flag && !gfc_is_constant_expr (mold))
- || !gfc_is_constant_expr (size))
+ if (!gfc_resolve_expr (mold))
+ return NULL;
+ if (gfc_init_expr_flag && !gfc_is_constant_expr (mold))
return NULL;
if (!gfc_calculate_transfer_sizes (source, mold, size, &source_size,
@@ -7172,26 +7180,32 @@ gfc_convert_constant (gfc_expr *e, bt type, int kind)
{
gfc_expr *tmp;
if (c->iterator == NULL)
- tmp = f (c->expr, kind);
+ {
+ tmp = f (c->expr, kind);
+ if (tmp == NULL)
+ {
+ gfc_free_expr (result);
+ return NULL;
+ }
+
+ gfc_constructor_append_expr (&result->value.constructor,
+ tmp, &c->where);
+ }
else
{
+ gfc_constructor *n;
g = gfc_convert_constant (c->expr, type, kind);
- if (g == &gfc_bad_expr)
+ if (g == NULL || g == &gfc_bad_expr)
{
gfc_free_expr (result);
return g;
}
- tmp = g;
- }
-
- if (tmp == NULL)
- {
- gfc_free_expr (result);
- return NULL;
+ n = gfc_constructor_get ();
+ n->expr = g;
+ n->iterator = gfc_copy_iterator (c->iterator);
+ n->where = c->where;
+ gfc_constructor_append (&result->value.constructor, n);
}
-
- gfc_constructor_append_expr (&result->value.constructor,
- tmp, &c->where);
}
break;
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index ec43e635bf3..6917b22dff2 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -1259,6 +1259,20 @@ gfc_add_volatile (symbol_attribute *attr, const char *name, locus *where)
where))
return false;
+ /* F2008: C1282 A designator of a variable with the VOLATILE attribute
+ shall not appear in a pure subprogram.
+
+ F2018: C1588 A local variable of a pure subprogram, or of a BLOCK
+ construct within a pure subprogram, shall not have the SAVE or
+ VOLATILE attribute. */
+ if (gfc_pure (NULL))
+ {
+ gfc_error ("VOLATILE attribute at %L cannot be specified in a "
+ "PURE procedure", where);
+ return false;
+ }
+
+
attr->volatile_ = 1;
attr->volatile_ns = gfc_current_ns;
return check_conflict (attr, name, where);
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 96fe8d431a3..8c566e85769 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -2652,6 +2652,8 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript,
gfc_init_se (&se, NULL);
se.loop = loop;
se.ss = ss;
+ if (gfc_is_class_array_function (expr))
+ expr->must_finalize = 1;
gfc_conv_expr (&se, expr);
gfc_add_block_to_block (&outer_loop->pre, &se.pre);
gfc_add_block_to_block (&outer_loop->post, &se.post);
@@ -3071,7 +3073,7 @@ conv_array_index_offset (gfc_se * se, gfc_ss * ss, int dim, int i,
}
/* Multiply by the stride. */
- if (!integer_onep (stride))
+ if (stride != NULL && !integer_onep (stride))
index = fold_build2_loc (input_location, MULT_EXPR, gfc_array_index_type,
index, stride);
@@ -3102,7 +3104,7 @@ build_class_array_ref (gfc_se *se, tree base, tree index)
{
if (expr == NULL
|| (expr->ts.type != BT_CLASS
- && !gfc_is_alloc_class_array_function (expr)
+ && !gfc_is_class_array_function (expr)
&& !gfc_is_class_array_ref (expr, NULL)))
return false;
@@ -3132,12 +3134,12 @@ build_class_array_ref (gfc_se *se, tree base, tree index)
}
if (class_ref == NULL && expr && expr->symtree->n.sym->attr.function
- && expr->symtree->n.sym == expr->symtree->n.sym->result)
+ && expr->symtree->n.sym == expr->symtree->n.sym->result
+ && expr->symtree->n.sym->backend_decl == current_function_decl)
{
- gcc_assert (expr->symtree->n.sym->backend_decl == current_function_decl);
decl = gfc_get_fake_result_decl (expr->symtree->n.sym, 0);
}
- else if (expr && gfc_is_alloc_class_array_function (expr))
+ else if (expr && gfc_is_class_array_function (expr))
{
size = NULL_TREE;
decl = NULL_TREE;
@@ -3160,6 +3162,8 @@ build_class_array_ref (gfc_se *se, tree base, tree index)
if (decl == NULL_TREE)
return false;
+
+ se->class_vptr = gfc_evaluate_now (gfc_class_vptr_get (decl), &se->pre);
}
else if (class_ref == NULL)
{
@@ -3334,7 +3338,10 @@ build_array_ref (tree desc, tree offset, tree decl, tree vptr)
{
type = gfc_get_element_type (type);
tmp = TREE_OPERAND (cdecl, 0);
- tmp = gfc_get_class_array_ref (offset, tmp, NULL_TREE);
+ /* Note that the fourth argument in this call has been set false.
+ should any character dynamic types come this way, the 'len'
+ field of the unlimited object will not be used. */
+ tmp = gfc_get_class_array_ref (offset, tmp, NULL_TREE, false);
tmp = fold_convert (build_pointer_type (type), tmp);
tmp = build_fold_indirect_ref_loc (input_location, tmp);
return tmp;
@@ -7125,7 +7132,11 @@ gfc_conv_expr_descriptor (gfc_se *se, gfc_expr *expr)
else
{
/* Otherwise make a new one. */
- parmtype = gfc_get_element_type (TREE_TYPE (desc));
+ if (expr->ts.type == BT_CHARACTER && expr->ts.deferred)
+ parmtype = gfc_typenode_for_spec (&expr->ts);
+ else
+ parmtype = gfc_get_element_type (TREE_TYPE (desc));
+
parmtype = gfc_get_array_type_bounds (parmtype, loop.dimen, codim,
loop.from, loop.to, 0,
GFC_ARRAY_UNKNOWN, false);
@@ -8598,7 +8609,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl,
break;
case COPY_ALLOC_COMP:
- if (c->attr.pointer)
+ if (c->attr.pointer || c->attr.proc_pointer)
continue;
/* We need source and destination components. */
@@ -8642,6 +8653,31 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl,
gfc_init_block (&tmpblock);
+ gfc_add_modify (&tmpblock, gfc_class_vptr_get (dcmp),
+ gfc_class_vptr_get (comp));
+
+ /* Copy the unlimited '_len' field. If it is greater than zero
+ (ie. a character(_len)), multiply it by size and use this
+ for the malloc call. */
+ if (UNLIMITED_POLY (c))
+ {
+ tree ctmp;
+ gfc_add_modify (&tmpblock, gfc_class_len_get (dcmp),
+ gfc_class_len_get (comp));
+
+ size = gfc_evaluate_now (size, &tmpblock);
+ tmp = gfc_class_len_get (comp);
+ ctmp = fold_build2_loc (input_location, MULT_EXPR,
+ size_type_node, size,
+ fold_convert (size_type_node, tmp));
+ tmp = fold_build2_loc (input_location, GT_EXPR,
+ logical_type_node, tmp,
+ build_zero_cst (TREE_TYPE (tmp)));
+ size = fold_build3_loc (input_location, COND_EXPR,
+ size_type_node, tmp, ctmp, size);
+ size = gfc_evaluate_now (size, &tmpblock);
+ }
+
/* Coarray component have to have the same allocation status and
shape/type-parameter/effective-type on the LHS and RHS of an
intrinsic assignment. Hence, we did not deallocated them - and
@@ -9096,6 +9132,12 @@ gfc_alloc_allocatable_for_assignment (gfc_loopinfo *loop,
if (expr2 && rss == gfc_ss_terminator)
return NULL_TREE;
+ /* Ensure that the string length from the current scope is used. */
+ if (expr2->ts.type == BT_CHARACTER
+ && expr2->expr_type == EXPR_FUNCTION
+ && !expr2->value.function.isym)
+ expr2->ts.u.cl->backend_decl = rss->info->string_length;
+
gfc_start_block (&fblock);
/* Since the lhs is allocatable, this must be a descriptor type.
@@ -9340,6 +9382,8 @@ gfc_alloc_allocatable_for_assignment (gfc_loopinfo *loop,
gfc_array_index_type, tmp,
expr1->ts.u.cl->backend_decl);
}
+ else if (UNLIMITED_POLY (expr1) && expr2->ts.type != BT_CLASS)
+ tmp = TYPE_SIZE_UNIT (gfc_typenode_for_spec (&expr2->ts));
else
tmp = TYPE_SIZE_UNIT (gfc_typenode_for_spec (&expr1->ts));
tmp = fold_convert (gfc_array_index_type, tmp);
@@ -9366,6 +9410,28 @@ gfc_alloc_allocatable_for_assignment (gfc_loopinfo *loop,
gfc_add_modify (&fblock, tmp,
gfc_get_dtype_rank_type (expr1->rank,type));
}
+ else if (UNLIMITED_POLY (expr1) && expr2->ts.type != BT_CLASS)
+ {
+ tree type;
+ tmp = gfc_conv_descriptor_dtype (desc);
+ type = gfc_typenode_for_spec (&expr2->ts);
+ gfc_add_modify (&fblock, tmp,
+ gfc_get_dtype_rank_type (expr2->rank,type));
+ /* Set the _len field as well... */
+ tmp = gfc_class_len_get (TREE_OPERAND (desc, 0));
+ if (expr2->ts.type == BT_CHARACTER)
+ gfc_add_modify (&fblock, tmp,
+ fold_convert (TREE_TYPE (tmp),
+ TYPE_SIZE_UNIT (type)));
+ else
+ gfc_add_modify (&fblock, tmp,
+ build_int_cst (TREE_TYPE (tmp), 0));
+ /* ...and the vptr. */
+ tmp = gfc_class_vptr_get (TREE_OPERAND (desc, 0));
+ tmp2 = gfc_get_symbol_decl (gfc_find_vtab (&expr2->ts));
+ tmp2 = gfc_build_addr_expr (TREE_TYPE (tmp), tmp2);
+ gfc_add_modify (&fblock, tmp, tmp2);
+ }
else if (coarray && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (desc)))
{
gfc_add_modify (&fblock, gfc_conv_descriptor_dtype (desc),
@@ -9471,10 +9537,11 @@ gfc_alloc_allocatable_for_assignment (gfc_loopinfo *loop,
/* We already set the dtype in the case of deferred character
- length arrays. */
+ length arrays and unlimited polymorphic arrays. */
if (!(GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (desc))
&& ((expr1->ts.type == BT_CHARACTER && expr1->ts.deferred)
- || coarray)))
+ || coarray))
+ && !UNLIMITED_POLY (expr1))
{
tmp = gfc_conv_descriptor_dtype (desc);
gfc_add_modify (&alloc_block, tmp, gfc_get_dtype (TREE_TYPE (desc)));
@@ -10007,7 +10074,7 @@ gfc_walk_function_expr (gfc_ss * ss, gfc_expr * expr)
if (!sym)
sym = expr->symtree->n.sym;
- if (gfc_is_alloc_class_array_function (expr))
+ if (gfc_is_class_array_function (expr))
return gfc_get_array_ss (ss, expr,
CLASS_DATA (expr->value.function.esym->result)->as->rank,
GFC_SS_FUNCTION);
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 5f2f76b7cbe..1e2be2f2d0e 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -603,10 +603,12 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym)
function scope. */
if (current_function_decl != NULL_TREE)
{
- if (sym->ns->proc_name->backend_decl == current_function_decl
- || sym->result == sym)
+ if (sym->ns->proc_name
+ && (sym->ns->proc_name->backend_decl == current_function_decl
+ || sym->result == sym))
gfc_add_decl_to_function (decl);
- else if (sym->ns->proc_name->attr.flavor == FL_LABEL)
+ else if (sym->ns->proc_name
+ && sym->ns->proc_name->attr.flavor == FL_LABEL)
/* This is a BLOCK construct. */
add_decl_as_local (decl);
else
@@ -698,7 +700,8 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym)
}
/* Keep variables larger than max-stack-var-size off stack. */
- if (!sym->ns->proc_name->attr.recursive && !sym->attr.automatic
+ if (!(sym->ns->proc_name && sym->ns->proc_name->attr.recursive)
+ && !sym->attr.automatic
&& INTEGER_CST_P (DECL_SIZE_UNIT (decl))
&& !gfc_can_put_var_on_stack (DECL_SIZE_UNIT (decl))
/* Put variable length auto array pointers always into stack. */
@@ -4142,6 +4145,24 @@ gfc_null_and_pass_deferred_len (gfc_symbol *sym, stmtblock_t *init,
return tmp;
}
+
+/* Get the result expression for a procedure. */
+
+static tree
+get_proc_result (gfc_symbol* sym)
+{
+ if (sym->attr.subroutine || sym == sym->result)
+ {
+ if (current_fake_result_decl != NULL)
+ return TREE_VALUE (current_fake_result_decl);
+
+ return NULL_TREE;
+ }
+
+ return sym->result->backend_decl;
+}
+
+
/* Generate function entry and exit code, and add it to the function body.
This includes:
Allocation and initialization of array variables.
@@ -4251,6 +4272,21 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block)
else
gcc_assert (flag_f2c && proc_sym->ts.type == BT_COMPLEX);
}
+ else if (proc_sym == proc_sym->result && IS_CLASS_ARRAY (proc_sym))
+ {
+ /* Nullify explicit return class arrays on entry. */
+ tree type;
+ tmp = get_proc_result (proc_sym);
+ if (tmp && GFC_CLASS_TYPE_P (TREE_TYPE (tmp)))
+ {
+ gfc_start_block (&init);
+ tmp = gfc_class_data_get (tmp);
+ type = TREE_TYPE (gfc_conv_descriptor_data_get (tmp));
+ gfc_conv_descriptor_data_set (&init, tmp, build_int_cst (type, 0));
+ gfc_add_init_cleanup (block, gfc_finish_block (&init), NULL_TREE);
+ }
+ }
+
/* Initialize the INTENT(OUT) derived type dummy arguments. This
should be done here so that the offsets and lbounds of arrays
@@ -5981,23 +6017,6 @@ create_main_function (tree fndecl)
}
-/* Get the result expression for a procedure. */
-
-static tree
-get_proc_result (gfc_symbol* sym)
-{
- if (sym->attr.subroutine || sym == sym->result)
- {
- if (current_fake_result_decl != NULL)
- return TREE_VALUE (current_fake_result_decl);
-
- return NULL_TREE;
- }
-
- return sym->result->backend_decl;
-}
-
-
/* Generate an appropriate return-statement for a procedure. */
tree
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index b022704e7fd..d7cab27e6ee 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -960,6 +960,7 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts,
}
if ((ref == NULL || class_ref == ref)
+ && !(gfc_is_class_array_function (e) && parmse->class_vptr != NULL_TREE)
&& (!class_ts.u.derived->components->as
|| class_ts.u.derived->components->as->rank != -1))
return;
@@ -1030,8 +1031,11 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts,
First we have to find the corresponding class reference. */
tmp = NULL_TREE;
- if (class_ref == NULL
- && e->symtree && e->symtree->n.sym->ts.type == BT_CLASS)
+ if (gfc_is_class_array_function (e)
+ && parmse->class_vptr != NULL_TREE)
+ tmp = parmse->class_vptr;
+ else if (class_ref == NULL
+ && e->symtree && e->symtree->n.sym->ts.type == BT_CLASS)
{
tmp = e->symtree->n.sym->backend_decl;
@@ -1063,7 +1067,11 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts,
if (TREE_CODE (TREE_TYPE (tmp)) == REFERENCE_TYPE)
tmp = build_fold_indirect_ref_loc (input_location, tmp);
- vptr = gfc_class_vptr_get (tmp);
+ if (!(gfc_is_class_array_function (e) && parmse->class_vptr))
+ vptr = gfc_class_vptr_get (tmp);
+ else
+ vptr = tmp;
+
gfc_add_modify (&block, ctree,
fold_convert (TREE_TYPE (ctree), vptr));
@@ -1148,15 +1156,32 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts,
of the referenced element. */
tree
-gfc_get_class_array_ref (tree index, tree class_decl, tree data_comp)
+gfc_get_class_array_ref (tree index, tree class_decl, tree data_comp,
+ bool unlimited)
{
- tree data = data_comp != NULL_TREE ? data_comp :
- gfc_class_data_get (class_decl);
- tree size = gfc_class_vtab_size_get (class_decl);
- tree offset = fold_build2_loc (input_location, MULT_EXPR,
- gfc_array_index_type,
- index, size);
- tree ptr;
+ tree data, size, tmp, ctmp, offset, ptr;
+
+ data = data_comp != NULL_TREE ? data_comp :
+ gfc_class_data_get (class_decl);
+ size = gfc_class_vtab_size_get (class_decl);
+
+ if (unlimited)
+ {
+ tmp = fold_convert (gfc_array_index_type,
+ gfc_class_len_get (class_decl));
+ ctmp = fold_build2_loc (input_location, MULT_EXPR,
+ gfc_array_index_type, size, tmp);
+ tmp = fold_build2_loc (input_location, GT_EXPR,
+ logical_type_node, tmp,
+ build_zero_cst (TREE_TYPE (tmp)));
+ size = fold_build3_loc (input_location, COND_EXPR,
+ gfc_array_index_type, tmp, ctmp, size);
+ }
+
+ offset = fold_build2_loc (input_location, MULT_EXPR,
+ gfc_array_index_type,
+ index, size);
+
data = gfc_conv_descriptor_data_get (data);
ptr = fold_convert (pvoid_type_node, data);
ptr = fold_build_pointer_plus_loc (input_location, ptr, offset);
@@ -1258,14 +1283,15 @@ gfc_copy_class_to_class (tree from, tree to, tree nelems, bool unlimited)
if (is_from_desc)
{
- from_ref = gfc_get_class_array_ref (index, from, from_data);
+ from_ref = gfc_get_class_array_ref (index, from, from_data,
+ unlimited);
vec_safe_push (args, from_ref);
}
else
vec_safe_push (args, from_data);
if (is_to_class)
- to_ref = gfc_get_class_array_ref (index, to, to_data);
+ to_ref = gfc_get_class_array_ref (index, to, to_data, unlimited);
else
{
tmp = gfc_conv_array_data (to);
@@ -4307,6 +4333,8 @@ gfc_apply_interface_mapping_to_expr (gfc_interface_mapping * mapping,
if (expr->value.function.esym == NULL
&& expr->value.function.isym != NULL
+ && expr->value.function.actual
+ && expr->value.function.actual->expr
&& expr->value.function.actual->expr->symtree
&& gfc_map_intrinsic_function (expr, mapping))
break;
@@ -4435,7 +4463,7 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr, int g77,
/* Reset the offset for the function call since the loop
is zero based on the data pointer. Note that the temp
comes first in the loop chain since it is added second. */
- if (gfc_is_alloc_class_array_function (expr))
+ if (gfc_is_class_array_function (expr))
{
tmp = loop.ss->loop_chain->info->data.array.descriptor;
gfc_conv_descriptor_offset_set (&loop.pre, tmp,
@@ -4484,7 +4512,7 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr, int g77,
dimen = rse.ss->dimen;
/* Skip the write-out loop for this case. */
- if (gfc_is_alloc_class_array_function (expr))
+ if (gfc_is_class_array_function (expr))
goto class_array_fcn;
/* Calculate the bounds of the scalarization. */
@@ -4778,7 +4806,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
gcc_assert ((!comp && gfc_return_by_reference (sym)
&& sym->result->attr.dimension)
|| (comp && comp->attr.dimension)
- || gfc_is_alloc_class_array_function (expr));
+ || gfc_is_class_array_function (expr));
gcc_assert (se->loop != NULL);
/* Access the previously obtained result. */
gfc_conv_tmp_array_ref (se);
@@ -5461,7 +5489,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
fsym ? fsym->attr.intent : INTENT_INOUT,
fsym && fsym->attr.pointer);
- else if (gfc_is_alloc_class_array_function (e)
+ else if (gfc_is_class_array_function (e)
&& fsym && fsym->ts.type == BT_DERIVED)
/* See previous comment. For function actual argument,
the write out is not needed so the intent is set as
@@ -6302,7 +6330,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
call the finalization function of the temporary. Note that the
nullification of allocatable components needed by the result
is done in gfc_trans_assignment_1. */
- if (expr && ((gfc_is_alloc_class_array_function (expr)
+ if (expr && ((gfc_is_class_array_function (expr)
&& se->ss && se->ss->loop)
|| gfc_is_alloc_class_scalar_function (expr))
&& se->expr && GFC_CLASS_TYPE_P (TREE_TYPE (se->expr))
@@ -6313,6 +6341,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
int n;
if (se->ss && se->ss->loop)
{
+ gfc_add_block_to_block (&se->ss->loop->pre, &se->pre);
se->expr = gfc_evaluate_now (se->expr, &se->ss->loop->pre);
tmp = gfc_class_data_get (se->expr);
info->descriptor = tmp;
@@ -6335,6 +6364,11 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
CLASS_DATA (expr->value.function.esym->result)->attr);
}
+ if ((gfc_is_class_array_function (expr)
+ || gfc_is_alloc_class_scalar_function (expr))
+ && CLASS_DATA (expr->value.function.esym->result)->attr.pointer)
+ goto no_finalization;
+
final_fndecl = gfc_class_vtab_final_get (se->expr);
is_final = fold_build2_loc (input_location, NE_EXPR,
logical_type_node,
@@ -6365,6 +6399,8 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
tmp = gfc_call_free (tmp);
gfc_add_expr_to_block (&se->post, tmp);
}
+
+no_finalization:
expr->must_finalize = 0;
}
@@ -8835,7 +8871,7 @@ gfc_trans_scalar_assign (gfc_se * lse, gfc_se * rse, gfc_typespec ts,
gfc_add_expr_to_block (&block, tmp);
}
}
- else if (gfc_bt_struct (ts.type) || ts.type == BT_CLASS)
+ else if (gfc_bt_struct (ts.type) || ts.type == BT_CLASS || ts.type == BT_COMPLEX)
{
gfc_add_block_to_block (&block, &lse->pre);
gfc_add_block_to_block (&block, &rse->pre);
@@ -8871,7 +8907,7 @@ arrayfunc_assign_needs_temporary (gfc_expr * expr1, gfc_expr * expr2)
gfc_symbol *sym = expr1->symtree->n.sym;
/* Play it safe with class functions assigned to a derived type. */
- if (gfc_is_alloc_class_array_function (expr2)
+ if (gfc_is_class_array_function (expr2)
&& expr1->ts.type == BT_DERIVED)
return true;
@@ -9878,7 +9914,7 @@ gfc_trans_assignment_1 (gfc_expr * expr1, gfc_expr * expr2, bool init_flag,
rss = NULL;
if ((expr1->ts.type == BT_DERIVED)
- && (gfc_is_alloc_class_array_function (expr2)
+ && (gfc_is_class_array_function (expr2)
|| gfc_is_alloc_class_scalar_function (expr2)))
expr2->must_finalize = 1;
@@ -10085,7 +10121,7 @@ gfc_trans_assignment_1 (gfc_expr * expr1, gfc_expr * expr2, bool init_flag,
a scalar to array assignment, this is done in gfc_trans_scalar_assign
as part of the deep copy. */
if (!scalar_to_array && expr1->ts.type == BT_DERIVED
- && (gfc_is_alloc_class_array_function (expr2)
+ && (gfc_is_class_array_function (expr2)
|| gfc_is_alloc_class_scalar_function (expr2)))
{
tmp = rse.expr;
@@ -10294,6 +10330,10 @@ gfc_trans_assignment (gfc_expr * expr1, gfc_expr * expr2, bool init_flag,
return tmp;
}
+ if (UNLIMITED_POLY (expr1) && expr1->rank
+ && expr2->ts.type != BT_CLASS)
+ use_vptr_copy = true;
+
/* Fallback to the scalarizer to generate explicit loops. */
return gfc_trans_assignment_1 (expr1, expr2, init_flag, dealloc,
use_vptr_copy, may_alias);
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 69b9d79492b..18cae832c64 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -1860,7 +1860,7 @@ conv_caf_send (gfc_code *code) {
lhs_expr = code->ext.actual->expr;
rhs_expr = code->ext.actual->next->expr;
- may_require_tmp = gfc_check_dependency (lhs_expr, rhs_expr, false) == 0
+ may_require_tmp = gfc_check_dependency (lhs_expr, rhs_expr, true) == 0
? boolean_false_node : boolean_true_node;
gfc_init_block (&block);
@@ -1906,34 +1906,124 @@ conv_caf_send (gfc_code *code) {
}
else
{
- /* If has_vector, pass descriptor for whole array and the
- vector bounds separately. */
- gfc_array_ref *ar, ar2;
- bool has_vector = false;
+ bool has_vector = gfc_has_vector_subscript (lhs_expr);
- if (gfc_is_coindexed (lhs_expr) && gfc_has_vector_subscript (lhs_expr))
+ if (gfc_is_coindexed (lhs_expr) || !has_vector)
{
- has_vector = true;
- ar = gfc_find_array_ref (lhs_expr);
- ar2 = *ar;
- memset (ar, '\0', sizeof (*ar));
- ar->as = ar2.as;
- ar->type = AR_FULL;
+ /* If has_vector, pass descriptor for whole array and the
+ vector bounds separately. */
+ gfc_array_ref *ar, ar2;
+ bool has_tmp_lhs_array = false;
+ if (has_vector)
+ {
+ has_tmp_lhs_array = true;
+ ar = gfc_find_array_ref (lhs_expr);
+ ar2 = *ar;
+ memset (ar, '\0', sizeof (*ar));
+ ar->as = ar2.as;
+ ar->type = AR_FULL;
+ }
+ lhs_se.want_pointer = 1;
+ gfc_conv_expr_descriptor (&lhs_se, lhs_expr);
+ /* Using gfc_conv_expr_descriptor, we only get the descriptor, but
+ that has the wrong type if component references are done. */
+ lhs_type = gfc_typenode_for_spec (&lhs_expr->ts);
+ tmp = build_fold_indirect_ref_loc (input_location, lhs_se.expr);
+ gfc_add_modify (&lhs_se.pre, gfc_conv_descriptor_dtype (tmp),
+ gfc_get_dtype_rank_type (has_vector ? ar2.dimen
+ : lhs_expr->rank,
+ lhs_type));
+ if (has_tmp_lhs_array)
+ {
+ vec = conv_caf_vector_subscript (&block, lhs_se.expr, &ar2);
+ *ar = ar2;
+ }
}
- lhs_se.want_pointer = 1;
- gfc_conv_expr_descriptor (&lhs_se, lhs_expr);
- /* Using gfc_conv_expr_descriptor, we only get the descriptor, but that
- has the wrong type if component references are done. */
- lhs_type = gfc_typenode_for_spec (&lhs_expr->ts);
- tmp = build_fold_indirect_ref_loc (input_location, lhs_se.expr);
- gfc_add_modify (&lhs_se.pre, gfc_conv_descriptor_dtype (tmp),
- gfc_get_dtype_rank_type (has_vector ? ar2.dimen
- : lhs_expr->rank,
- lhs_type));
- if (has_vector)
+ else
{
- vec = conv_caf_vector_subscript (&block, lhs_se.expr, &ar2);
- *ar = ar2;
+ /* Special casing for arr1 ([...]) = arr2[...], i.e. caf_get to
+ indexed array expression. This is rewritten to:
+
+ tmp_array = arr2[...]
+ arr1 ([...]) = tmp_array
+
+ because using the standard gfc_conv_expr (lhs_expr) did the
+ assignment with lhs and rhs exchanged. */
+
+ gfc_ss *lss_for_tmparray, *lss_real;
+ gfc_loopinfo loop;
+ gfc_se se;
+ stmtblock_t body;
+ tree tmparr_desc, src;
+ tree index = gfc_index_zero_node;
+ tree stride = gfc_index_zero_node;
+ int n;
+
+ /* Walk both sides of the assignment, once to get the shape of the
+ temporary array to create right. */
+ lss_for_tmparray = gfc_walk_expr (lhs_expr);
+ /* And a second time to be able to create an assignment of the
+ temporary to the lhs_expr. gfc_trans_create_temp_array replaces
+ the tree in the descriptor with the one for the temporary
+ array. */
+ lss_real = gfc_walk_expr (lhs_expr);
+ gfc_init_loopinfo (&loop);
+ gfc_add_ss_to_loop (&loop, lss_for_tmparray);
+ gfc_add_ss_to_loop (&loop, lss_real);
+ gfc_conv_ss_startstride (&loop);
+ gfc_conv_loop_setup (&loop, &lhs_expr->where);
+ lhs_type = gfc_typenode_for_spec (&lhs_expr->ts);
+ gfc_trans_create_temp_array (&lhs_se.pre, &lhs_se.post,
+ lss_for_tmparray, lhs_type, NULL_TREE,
+ false, true, false,
+ &lhs_expr->where);
+ tmparr_desc = lss_for_tmparray->info->data.array.descriptor;
+ gfc_start_scalarized_body (&loop, &body);
+ gfc_init_se (&se, NULL);
+ gfc_copy_loopinfo_to_se (&se, &loop);
+ se.ss = lss_real;
+ gfc_conv_expr (&se, lhs_expr);
+ gfc_add_block_to_block (&body, &se.pre);
+
+ /* Walk over all indexes of the loop. */
+ for (n = loop.dimen - 1; n > 0; --n)
+ {
+ tmp = loop.loopvar[n];
+ tmp = fold_build2_loc (input_location, MINUS_EXPR,
+ gfc_array_index_type, tmp, loop.from[n]);
+ tmp = fold_build2_loc (input_location, PLUS_EXPR,
+ gfc_array_index_type, tmp, index);
+
+ stride = fold_build2_loc (input_location, MINUS_EXPR,
+ gfc_array_index_type,
+ loop.to[n - 1], loop.from[n - 1]);
+ stride = fold_build2_loc (input_location, PLUS_EXPR,
+ gfc_array_index_type,
+ stride, gfc_index_one_node);
+
+ index = fold_build2_loc (input_location, MULT_EXPR,
+ gfc_array_index_type, tmp, stride);
+ }
+
+ index = fold_build2_loc (input_location, MINUS_EXPR,
+ gfc_array_index_type,
+ index, loop.from[0]);
+
+ index = fold_build2_loc (input_location, PLUS_EXPR,
+ gfc_array_index_type,
+ loop.loopvar[0], index);
+
+ src = build_fold_indirect_ref (gfc_conv_array_data (tmparr_desc));
+ src = gfc_build_array_ref (src, index, NULL);
+ /* Now create the assignment of lhs_expr = tmp_array. */
+ gfc_add_modify (&body, se.expr, src);
+ gfc_add_block_to_block (&body, &se.post);
+ lhs_se.expr = gfc_build_addr_expr (NULL_TREE, tmparr_desc);
+ gfc_trans_scalarizing_loops (&loop, &body);
+ gfc_add_block_to_block (&loop.pre, &loop.post);
+ gfc_add_expr_to_block (&lhs_se.post, gfc_finish_block (&loop.pre));
+ gfc_free_ss (lss_for_tmparray);
+ gfc_free_ss (lss_real);
}
}
@@ -6617,7 +6707,7 @@ gfc_conv_intrinsic_size (gfc_se * se, gfc_expr * expr)
gfc_add_class_array_ref (actual->expr);
argse.data_not_needed = 1;
- if (gfc_is_alloc_class_array_function (actual->expr))
+ if (gfc_is_class_array_function (actual->expr))
{
/* For functions that return a class array conv_expr_descriptor is not
able to get the descriptor right. Therefore this special case. */
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 79ec6c2e13b..ac90c97e544 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -1566,7 +1566,8 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block *block)
desc = sym->backend_decl;
cst_array_ctor = e->expr_type == EXPR_ARRAY
- && gfc_constant_array_constructor_p (e->value.constructor);
+ && gfc_constant_array_constructor_p (e->value.constructor)
+ && e->ts.type != BT_CHARACTER;
/* If association is to an expression, evaluate it and create temporary.
Otherwise, get descriptor of target for pointer assignment. */
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index 8c2c8a69cac..9a96ae7b69d 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -1804,7 +1804,7 @@ gfc_get_array_descriptor_base (int dimen, int codimen, bool restricted)
TREE_NO_WARNING (decl) = 1;
}
- if (flag_coarray == GFC_FCOARRAY_LIB && codimen)
+ if (flag_coarray == GFC_FCOARRAY_LIB)
{
decl = gfc_add_field_to_struct_1 (fat_type,
get_identifier ("token"),
@@ -2168,6 +2168,14 @@ gfc_sym_type (gfc_symbol * sym)
if (sym->backend_decl && !sym->attr.function)
return TREE_TYPE (sym->backend_decl);
+ if (sym->attr.result
+ && sym->ts.type == BT_CHARACTER
+ && sym->ts.u.cl->backend_decl == NULL_TREE
+ && sym->ns->proc_name
+ && sym->ns->proc_name->ts.u.cl
+ && sym->ns->proc_name->ts.u.cl->backend_decl != NULL_TREE)
+ sym->ts.u.cl->backend_decl = sym->ns->proc_name->ts.u.cl->backend_decl;
+
if (sym->ts.type == BT_CHARACTER
&& ((sym->attr.function && sym->attr.is_bind_c)
|| (sym->attr.result
@@ -2334,6 +2342,7 @@ gfc_copy_dt_decls_ifequal (gfc_symbol *from, gfc_symbol *to,
for (; to_cm; to_cm = to_cm->next, from_cm = from_cm->next)
{
to_cm->backend_decl = from_cm->backend_decl;
+ to_cm->caf_token = from_cm->caf_token;
if (from_cm->ts.type == BT_UNION)
gfc_get_union_type (to_cm->ts.u.derived);
else if (from_cm->ts.type == BT_DERIVED
@@ -2444,6 +2453,10 @@ gfc_get_derived_type (gfc_symbol * derived, int codimen)
gfc_dt_list *dt;
gfc_namespace *ns;
tree tmp;
+ bool coarray_flag;
+
+ coarray_flag = flag_coarray == GFC_FCOARRAY_LIB
+ && derived->module && !derived->attr.vtype;
if (derived->attr.unlimited_polymorphic
|| (flag_coarray == GFC_FCOARRAY_LIB
@@ -2636,7 +2649,9 @@ gfc_get_derived_type (gfc_symbol * derived, int codimen)
field_type = build_pointer_type (tmp);
}
else if (c->ts.type == BT_DERIVED || c->ts.type == BT_CLASS)
- field_type = c->ts.u.derived->backend_decl;
+ field_type = c->ts.u.derived->backend_decl;
+ else if (c->attr.caf_token)
+ field_type = pvoid_type_node;
else
{
if (c->ts.type == BT_CHARACTER && !c->ts.deferred)
@@ -2715,19 +2730,6 @@ gfc_get_derived_type (gfc_symbol * derived, int codimen)
gcc_assert (field);
if (!c->backend_decl)
c->backend_decl = field;
-
- /* Do not add a caf_token field for classes' data components. */
- if (codimen && !c->attr.dimension && !c->attr.codimension
- && (c->attr.allocatable || c->attr.pointer)
- && c->caf_token == NULL_TREE && strcmp ("_data", c->name) != 0)
- {
- char caf_name[GFC_MAX_SYMBOL_LEN];
- snprintf (caf_name, GFC_MAX_SYMBOL_LEN, "_caf_%s", c->name);
- c->caf_token = gfc_add_field_to_struct (typenode,
- get_identifier (caf_name),
- pvoid_type_node, &chain);
- TREE_NO_WARNING (c->caf_token) = 1;
- }
}
/* Now lay out the derived type, including the fields. */
@@ -2753,6 +2755,24 @@ gfc_get_derived_type (gfc_symbol * derived, int codimen)
copy_derived_types:
+ for (c = derived->components; c; c = c->next)
+ {
+ /* Do not add a caf_token field for class container components. */
+ if ((codimen || coarray_flag)
+ && !c->attr.dimension && !c->attr.codimension
+ && (c->attr.allocatable || c->attr.pointer)
+ && !derived->attr.is_class)
+ {
+ char caf_name[GFC_MAX_SYMBOL_LEN];
+ gfc_component *token;
+ snprintf (caf_name, GFC_MAX_SYMBOL_LEN, "_caf_%s", c->name);
+ token = gfc_find_component (derived, caf_name, true, true, NULL);
+ gcc_assert (token);
+ c->caf_token = token->backend_decl;
+ TREE_NO_WARNING (c->caf_token) = 1;
+ }
+ }
+
for (dt = gfc_derived_types; dt; dt = dt->next)
gfc_copy_dt_decls_ifequal (derived, dt->derived, false);
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h
index d02f3470eeb..4fcc389a53b 100644
--- a/gcc/fortran/trans.h
+++ b/gcc/fortran/trans.h
@@ -431,7 +431,7 @@ tree gfc_vptr_deallocate_get (tree);
void gfc_reset_vptr (stmtblock_t *, gfc_expr *);
void gfc_reset_len (stmtblock_t *, gfc_expr *);
tree gfc_get_vptr_from_expr (tree);
-tree gfc_get_class_array_ref (tree, tree, tree);
+tree gfc_get_class_array_ref (tree, tree, tree, bool);
tree gfc_copy_class_to_class (tree, tree, tree, bool);
bool gfc_add_finalizer_call (stmtblock_t *, gfc_expr *);
bool gfc_add_comp_finalizer_call (stmtblock_t *, tree, gfc_component *, bool);
diff --git a/gcc/function.c b/gcc/function.c
index 6d0f462a262..a98d8dcb29f 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6628,8 +6628,9 @@ match_asm_constraints_1 (rtx_insn *insn, rtx *p_sets, int noutputs)
/* Only do the transformation for pseudos. */
if (! REG_P (output)
|| rtx_equal_p (output, input)
- || (GET_MODE (input) != VOIDmode
- && GET_MODE (input) != GET_MODE (output)))
+ || !(REG_P (input) || SUBREG_P (input)
+ || MEM_P (input) || CONSTANT_P (input))
+ || !general_operand (input, GET_MODE (output)))
continue;
/* We can't do anything if the output is also used as input,
diff --git a/gcc/genmatch.c b/gcc/genmatch.c
index 5621aa05b59..3527e499cbf 100644
--- a/gcc/genmatch.c
+++ b/gcc/genmatch.c
@@ -2054,7 +2054,11 @@ capture_info::walk_match (operand *o, unsigned toplevel_arg,
if (c->what
&& (e = dyn_cast <expr *> (c->what)))
{
- info[where].expr_p = true;
+ /* Zero-operand expression captures like ADDR_EXPR@0 are
+ similar as predicates -- if they are not mentioned in
+ the result we have to force them to have no side-effects. */
+ if (e->ops.length () != 0)
+ info[where].expr_p = true;
info[where].force_single_use |= e->force_single_use;
}
}
diff --git a/gcc/gimple-ssa-backprop.c b/gcc/gimple-ssa-backprop.c
index 3acf3d604ea..fa4ef45e555 100644
--- a/gcc/gimple-ssa-backprop.c
+++ b/gcc/gimple-ssa-backprop.c
@@ -260,6 +260,11 @@ private:
post-order walk. */
auto_sbitmap m_visited_blocks;
+ /* A bitmap of phis that we have finished processing in the initial
+ post-order walk, excluding those from blocks mentioned in
+ M_VISITED_BLOCKS. */
+ auto_bitmap m_visited_phis;
+
/* A worklist of SSA names whose definitions need to be reconsidered. */
auto_vec <tree, 64> m_worklist;
@@ -500,8 +505,11 @@ backprop::intersect_uses (tree var, usage_info *info)
{
if (is_gimple_debug (stmt))
continue;
- if (is_a <gphi *> (stmt)
- && !bitmap_bit_p (m_visited_blocks, gimple_bb (stmt)->index))
+ gphi *phi = dyn_cast <gphi *> (stmt);
+ if (phi
+ && !bitmap_bit_p (m_visited_blocks, gimple_bb (phi)->index)
+ && !bitmap_bit_p (m_visited_phis,
+ SSA_NAME_VERSION (gimple_phi_result (phi))))
{
/* Skip unprocessed phis. */
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -509,7 +517,7 @@ backprop::intersect_uses (tree var, usage_info *info)
fprintf (dump_file, "[BACKEDGE] ");
print_generic_expr (dump_file, var, 0);
fprintf (dump_file, " in ");
- print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
+ print_gimple_stmt (dump_file, phi, 0, TDF_SLIM);
}
}
else
@@ -633,7 +641,12 @@ backprop::process_block (basic_block bb)
}
for (gphi_iterator gpi = gsi_start_phis (bb); !gsi_end_p (gpi);
gsi_next (&gpi))
- process_var (gimple_phi_result (gpi.phi ()));
+ {
+ tree result = gimple_phi_result (gpi.phi ());
+ process_var (result);
+ bitmap_set_bit (m_visited_phis, SSA_NAME_VERSION (result));
+ }
+ bitmap_clear (m_visited_phis);
}
/* Delete the definition of VAR, which has no uses. */
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index 2b68c2b1b0a..3e19c4b603e 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -266,6 +266,10 @@ struct slsr_cand_d
of a statement. */
cand_idx next_interp;
+ /* Index of the first candidate record in a chain for the same
+ statement. */
+ cand_idx first_interp;
+
/* Index of the basis statement S0, if any, in the candidate vector. */
cand_idx basis;
@@ -643,6 +647,7 @@ alloc_cand_and_find_basis (enum cand_kind kind, gimple *gs, tree base,
c->kind = kind;
c->cand_num = cand_vec.length () + 1;
c->next_interp = 0;
+ c->first_interp = c->cand_num;
c->dependent = 0;
c->sibling = 0;
c->def_phi = kind == CAND_MULT ? find_phi_def (base) : 0;
@@ -1213,6 +1218,7 @@ slsr_process_mul (gimple *gs, tree rhs1, tree rhs2, bool speed)
is the stride and RHS2 is the base expression. */
c2 = create_mul_ssa_cand (gs, rhs2, rhs1, speed);
c->next_interp = c2->cand_num;
+ c2->first_interp = c->cand_num;
}
else
{
@@ -1450,7 +1456,10 @@ slsr_process_add (gimple *gs, tree rhs1, tree rhs2, bool speed)
{
c2 = create_add_ssa_cand (gs, rhs2, rhs1, false, speed);
if (c)
- c->next_interp = c2->cand_num;
+ {
+ c->next_interp = c2->cand_num;
+ c2->first_interp = c->cand_num;
+ }
else
add_cand_for_stmt (gs, c2);
}
@@ -1573,6 +1582,8 @@ slsr_process_cast (gimple *gs, tree rhs1, bool speed)
if (base_cand && base_cand->kind != CAND_PHI)
{
+ slsr_cand_t first_cand = NULL;
+
while (base_cand)
{
/* Propagate all data from the base candidate except the type,
@@ -1587,6 +1598,12 @@ slsr_process_cast (gimple *gs, tree rhs1, bool speed)
base_cand->index, base_cand->stride,
ctype, base_cand->stride_type,
savings);
+ if (!first_cand)
+ first_cand = c;
+
+ if (first_cand != c)
+ c->first_interp = first_cand->cand_num;
+
if (base_cand->next_interp)
base_cand = lookup_cand (base_cand->next_interp);
else
@@ -1609,6 +1626,7 @@ slsr_process_cast (gimple *gs, tree rhs1, bool speed)
c2 = alloc_cand_and_find_basis (CAND_MULT, gs, rhs1, 0,
integer_one_node, ctype, sizetype, 0);
c->next_interp = c2->cand_num;
+ c2->first_interp = c->cand_num;
}
/* Add the first (or only) interpretation to the statement-candidate
@@ -1633,6 +1651,8 @@ slsr_process_copy (gimple *gs, tree rhs1, bool speed)
if (base_cand && base_cand->kind != CAND_PHI)
{
+ slsr_cand_t first_cand = NULL;
+
while (base_cand)
{
/* Propagate all data from the base candidate. */
@@ -1645,6 +1665,12 @@ slsr_process_copy (gimple *gs, tree rhs1, bool speed)
base_cand->index, base_cand->stride,
base_cand->cand_type,
base_cand->stride_type, savings);
+ if (!first_cand)
+ first_cand = c;
+
+ if (first_cand != c)
+ c->first_interp = first_cand->cand_num;
+
if (base_cand->next_interp)
base_cand = lookup_cand (base_cand->next_interp);
else
@@ -1669,6 +1695,7 @@ slsr_process_copy (gimple *gs, tree rhs1, bool speed)
integer_one_node, TREE_TYPE (rhs1),
sizetype, 0);
c->next_interp = c2->cand_num;
+ c2->first_interp = c->cand_num;
}
/* Add the first (or only) interpretation to the statement-candidate
@@ -1839,8 +1866,9 @@ dump_candidate (slsr_cand_t c)
print_generic_expr (dump_file, c->cand_type, 0);
fprintf (dump_file, "\n basis: %d dependent: %d sibling: %d\n",
c->basis, c->dependent, c->sibling);
- fprintf (dump_file, " next-interp: %d dead-savings: %d\n",
- c->next_interp, c->dead_savings);
+ fprintf (dump_file,
+ " next-interp: %d first-interp: %d dead-savings: %d\n",
+ c->next_interp, c->first_interp, c->dead_savings);
if (c->def_phi)
fprintf (dump_file, " phi: %d\n", c->def_phi);
fputs ("\n", dump_file);
@@ -2098,14 +2126,13 @@ replace_mult_candidate (slsr_cand_t c, tree basis_name, widest_int bump)
tree lhs = gimple_assign_lhs (c->cand_stmt);
gassign *copy_stmt = gimple_build_assign (lhs, basis_name);
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
- slsr_cand_t cc = c;
+ slsr_cand_t cc = lookup_cand (c->first_interp);
gimple_set_location (copy_stmt, gimple_location (c->cand_stmt));
gsi_replace (&gsi, copy_stmt, false);
- c->cand_stmt = copy_stmt;
- while (cc->next_interp)
+ while (cc)
{
- cc = lookup_cand (cc->next_interp);
cc->cand_stmt = copy_stmt;
+ cc = cc->next_interp ? lookup_cand (cc->next_interp) : NULL;
}
if (dump_file && (dump_flags & TDF_DETAILS))
stmt_to_print = copy_stmt;
@@ -2132,15 +2159,14 @@ replace_mult_candidate (slsr_cand_t c, tree basis_name, widest_int bump)
else
{
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
- slsr_cand_t cc = c;
+ slsr_cand_t cc = lookup_cand (c->first_interp);
gimple_assign_set_rhs_with_ops (&gsi, code,
basis_name, bump_tree);
update_stmt (gsi_stmt (gsi));
- c->cand_stmt = gsi_stmt (gsi);
- while (cc->next_interp)
+ while (cc)
{
- cc = lookup_cand (cc->next_interp);
cc->cand_stmt = gsi_stmt (gsi);
+ cc = cc->next_interp ? lookup_cand (cc->next_interp) : NULL;
}
if (dump_file && (dump_flags & TDF_DETAILS))
stmt_to_print = gsi_stmt (gsi);
@@ -3426,14 +3452,13 @@ replace_rhs_if_not_dup (enum tree_code new_code, tree new_rhs1, tree new_rhs2,
|| !operand_equal_p (new_rhs2, old_rhs1, 0))))
{
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
- slsr_cand_t cc = c;
+ slsr_cand_t cc = lookup_cand (c->first_interp);
gimple_assign_set_rhs_with_ops (&gsi, new_code, new_rhs1, new_rhs2);
update_stmt (gsi_stmt (gsi));
- c->cand_stmt = gsi_stmt (gsi);
- while (cc->next_interp)
+ while (cc)
{
- cc = lookup_cand (cc->next_interp);
cc->cand_stmt = gsi_stmt (gsi);
+ cc = cc->next_interp ? lookup_cand (cc->next_interp) : NULL;
}
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -3466,6 +3491,11 @@ replace_one_candidate (slsr_cand_t c, unsigned i, tree basis_name)
orig_rhs2 = gimple_assign_rhs2 (c->cand_stmt);
cand_incr = cand_increment (c);
+ /* If orig_rhs2 is NULL, we have already replaced this in situ with
+ a copy statement under another interpretation. */
+ if (!orig_rhs2)
+ return;
+
if (dump_file && (dump_flags & TDF_DETAILS))
{
fputs ("Replacing: ", dump_file);
@@ -3538,14 +3568,13 @@ replace_one_candidate (slsr_cand_t c, unsigned i, tree basis_name)
|| !operand_equal_p (rhs2, orig_rhs2, 0))
{
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
- slsr_cand_t cc = c;
+ slsr_cand_t cc = lookup_cand (c->first_interp);
gimple_assign_set_rhs_with_ops (&gsi, MINUS_EXPR, basis_name, rhs2);
update_stmt (gsi_stmt (gsi));
- c->cand_stmt = gsi_stmt (gsi);
- while (cc->next_interp)
+ while (cc)
{
- cc = lookup_cand (cc->next_interp);
cc->cand_stmt = gsi_stmt (gsi);
+ cc = cc->next_interp ? lookup_cand (cc->next_interp) : NULL;
}
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -3565,14 +3594,13 @@ replace_one_candidate (slsr_cand_t c, unsigned i, tree basis_name)
{
gassign *copy_stmt = gimple_build_assign (lhs, basis_name);
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
- slsr_cand_t cc = c;
+ slsr_cand_t cc = lookup_cand (c->first_interp);
gimple_set_location (copy_stmt, gimple_location (c->cand_stmt));
gsi_replace (&gsi, copy_stmt, false);
- c->cand_stmt = copy_stmt;
- while (cc->next_interp)
+ while (cc)
{
- cc = lookup_cand (cc->next_interp);
cc->cand_stmt = copy_stmt;
+ cc = cc->next_interp ? lookup_cand (cc->next_interp) : NULL;
}
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -3582,14 +3610,13 @@ replace_one_candidate (slsr_cand_t c, unsigned i, tree basis_name)
{
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
gassign *cast_stmt = gimple_build_assign (lhs, NOP_EXPR, basis_name);
- slsr_cand_t cc = c;
+ slsr_cand_t cc = lookup_cand (c->first_interp);
gimple_set_location (cast_stmt, gimple_location (c->cand_stmt));
gsi_replace (&gsi, cast_stmt, false);
- c->cand_stmt = cast_stmt;
- while (cc->next_interp)
+ while (cc)
{
- cc = lookup_cand (cc->next_interp);
cc->cand_stmt = cast_stmt;
+ cc = cc->next_interp ? lookup_cand (cc->next_interp) : NULL;
}
if (dump_file && (dump_flags & TDF_DETAILS))
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 5264a4f3d40..2a7951f16b3 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1125,10 +1125,6 @@ static void
asan_poison_variable (tree decl, bool poison, gimple_stmt_iterator *it,
bool before)
{
- /* When within an OMP context, do not emit ASAN_MARK internal fns. */
- if (gimplify_omp_ctxp)
- return;
-
tree unit_size = DECL_SIZE_UNIT (decl);
tree base = build_fold_addr_expr (decl);
@@ -1640,7 +1636,8 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p)
&& TREE_ADDRESSABLE (decl)
&& !TREE_STATIC (decl)
&& !DECL_HAS_VALUE_EXPR_P (decl)
- && dbg_cnt (asan_use_after_scope))
+ && dbg_cnt (asan_use_after_scope)
+ && !gimplify_omp_ctxp)
{
asan_poisoned_variables->add (decl);
asan_poison_variable (decl, false, seq_p);
@@ -4684,7 +4681,7 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
objects. Initializers for such objects must explicitly set
every field that needs to be set. */
cleared = false;
- else if (!complete_p && !CONSTRUCTOR_NO_CLEARING (ctor))
+ else if (!complete_p)
/* If the constructor isn't complete, clear the whole object
beforehand, unless CONSTRUCTOR_NO_CLEARING is set on it.
@@ -4693,7 +4690,7 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
we'd need to *find* the elements that are not present, and that
requires trickery to avoid quadratic compile-time behavior in
large cases or excessive memory use in small cases. */
- cleared = true;
+ cleared = !CONSTRUCTOR_NO_CLEARING (ctor);
else if (num_ctor_elements - num_nonzero_elements
> CLEAR_RATIO (optimize_function_for_speed_p (cfun))
&& num_nonzero_elements < num_ctor_elements / 4)
@@ -5776,8 +5773,11 @@ gimplify_save_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
}
else
/* The temporary may not be an SSA name as later abnormal and EH
- control flow may invalidate use/def domination. */
- val = get_initialized_tmp_var (val, pre_p, post_p, false);
+ control flow may invalidate use/def domination. When in SSA
+ form then assume there are no such issues and SAVE_EXPRs only
+ appear via GENERIC foldings. */
+ val = get_initialized_tmp_var (val, pre_p, post_p,
+ gimple_in_ssa_p (cfun));
TREE_OPERAND (*expr_p, 0) = val;
SAVE_EXPR_RESOLVED_P (*expr_p) = 1;
@@ -6458,7 +6458,8 @@ gimplify_target_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
clobber = build2 (MODIFY_EXPR, TREE_TYPE (temp), temp, clobber);
gimple_push_cleanup (temp, clobber, false, pre_p, true);
}
- if (asan_poisoned_variables && dbg_cnt (asan_use_after_scope))
+ if (asan_poisoned_variables && dbg_cnt (asan_use_after_scope)
+ && !gimplify_omp_ctxp)
{
tree asan_cleanup = build_asan_poison_call_expr (temp);
if (asan_cleanup)
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 716c8cc3a1f..3902d3a8a00 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -621,6 +621,24 @@ determine_versionability (struct cgraph_node *node,
reason = "calls comdat-local function";
}
+ /* Functions calling BUILT_IN_VA_ARG_PACK and BUILT_IN_VA_ARG_PACK_LEN
+ works only when inlined. Cloning them may still lead to better code
+ becuase ipa-cp will not give up on cloning further. If the function is
+ external this however leads to wrong code becuase we may end up producing
+ offline copy of the function. */
+ if (DECL_EXTERNAL (node->decl))
+ for (cgraph_edge *edge = node->callees; !reason && edge;
+ edge = edge->next_callee)
+ if (DECL_BUILT_IN (edge->callee->decl)
+ && DECL_BUILT_IN_CLASS (edge->callee->decl) == BUILT_IN_NORMAL)
+ {
+ if (DECL_FUNCTION_CODE (edge->callee->decl) == BUILT_IN_VA_ARG_PACK)
+ reason = "external function which calls va_arg_pack";
+ if (DECL_FUNCTION_CODE (edge->callee->decl)
+ == BUILT_IN_VA_ARG_PACK_LEN)
+ reason = "external function which calls va_arg_pack_len";
+ }
+
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
node->name (), node->order, reason);
@@ -4009,7 +4027,9 @@ intersect_with_plats (struct ipcp_param_lattices *plats,
if (aglat->offset - offset == item->offset)
{
gcc_checking_assert (item->value);
- if (values_equal_for_ipcp_p (item->value, aglat->values->value))
+ if (aglat->is_single_const ()
+ && values_equal_for_ipcp_p (item->value,
+ aglat->values->value))
found = true;
break;
}
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index 0d214170c24..c1b7aa3bea6 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -1577,8 +1577,15 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned,
"in another translation unit"));
return false;
}
- gcc_assert (DECL_NONADDRESSABLE_P (f1)
- == DECL_NONADDRESSABLE_P (f2));
+ if (DECL_BIT_FIELD (f1) != DECL_BIT_FIELD (f2))
+ {
+ warn_odr (t1, t2, f1, f2, warn, warned,
+ G_("one field is bitfield while other is not"));
+ return false;
+ }
+ else
+ gcc_assert (DECL_NONADDRESSABLE_P (f1)
+ == DECL_NONADDRESSABLE_P (f2));
}
/* If one aggregate has more fields than the other, they
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 95fad30e83a..c8ca9566cb7 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -2132,23 +2132,6 @@ sem_variable::get_hash (void)
return m_hash;
}
-/* Set all points-to UIDs of aliases pointing to node N as UID. */
-
-static void
-set_alias_uids (symtab_node *n, int uid)
-{
- ipa_ref *ref;
- FOR_EACH_ALIAS (n, ref)
- {
- if (dump_file)
- fprintf (dump_file, " Setting points-to UID of [%s] as %d\n",
- xstrdup_for_dump (ref->referring->asm_name ()), uid);
-
- SET_DECL_PT_UID (ref->referring->decl, uid);
- set_alias_uids (ref->referring, uid);
- }
-}
-
/* Merges instance with an ALIAS_ITEM, where alias, thunk or redirection can
be applied. */
@@ -2275,7 +2258,6 @@ sem_variable::merge (sem_item *alias_item)
if (dump_file)
fprintf (dump_file, "Unified; Variable alias has been created.\n");
- set_alias_uids (original, DECL_UID (original->decl));
return true;
}
}
@@ -2295,7 +2277,7 @@ unsigned int sem_item_optimizer::class_id = 0;
sem_item_optimizer::sem_item_optimizer ()
: worklist (0), m_classes (0), m_classes_count (0), m_cgraph_node_hooks (NULL),
- m_varpool_node_hooks (NULL)
+ m_varpool_node_hooks (NULL), m_merged_variables ()
{
m_items.create (0);
bitmap_obstack_initialize (&m_bmstack);
@@ -2320,6 +2302,7 @@ sem_item_optimizer::~sem_item_optimizer ()
m_items.release ();
bitmap_obstack_release (&m_bmstack);
+ m_merged_variables.release ();
}
/* Write IPA ICF summary for symbols. */
@@ -3571,13 +3554,103 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count)
}
if (dbg_cnt (merged_ipa_icf))
- merged_p |= source->merge (alias);
+ {
+ bool merged = source->merge (alias);
+ merged_p |= merged;
+
+ if (merged && alias->type == VAR)
+ {
+ symtab_pair p = symtab_pair (source->node, alias->node);
+ m_merged_variables.safe_push (p);
+ }
+ }
}
}
+ if (!m_merged_variables.is_empty ())
+ fixup_points_to_sets ();
+
return merged_p;
}
+/* Fixup points to set PT. */
+
+void
+sem_item_optimizer::fixup_pt_set (struct pt_solution *pt)
+{
+ if (pt->vars == NULL)
+ return;
+
+ unsigned i;
+ symtab_pair *item;
+ FOR_EACH_VEC_ELT (m_merged_variables, i, item)
+ if (bitmap_bit_p (pt->vars, DECL_UID (item->second->decl)))
+ bitmap_set_bit (pt->vars, DECL_UID (item->first->decl));
+}
+
+/* Set all points-to UIDs of aliases pointing to node N as UID. */
+
+static void
+set_alias_uids (symtab_node *n, int uid)
+{
+ ipa_ref *ref;
+ FOR_EACH_ALIAS (n, ref)
+ {
+ if (dump_file)
+ fprintf (dump_file, " Setting points-to UID of [%s] as %d\n",
+ xstrdup_for_dump (ref->referring->asm_name ()), uid);
+
+ SET_DECL_PT_UID (ref->referring->decl, uid);
+ set_alias_uids (ref->referring, uid);
+ }
+}
+
+/* Fixup points to analysis info. */
+
+void
+sem_item_optimizer::fixup_points_to_sets (void)
+{
+ /* TODO: remove in GCC 9 and trigger PTA re-creation after IPA passes. */
+ cgraph_node *cnode;
+
+ FOR_EACH_DEFINED_FUNCTION (cnode)
+ {
+ tree name;
+ unsigned i;
+ function *fn = DECL_STRUCT_FUNCTION (cnode->decl);
+ if (!gimple_in_ssa_p (fn))
+ continue;
+
+ FOR_EACH_SSA_NAME (i, name, fn)
+ if (POINTER_TYPE_P (TREE_TYPE (name))
+ && SSA_NAME_PTR_INFO (name))
+ fixup_pt_set (&SSA_NAME_PTR_INFO (name)->pt);
+ fixup_pt_set (&fn->gimple_df->escaped);
+
+ /* The above get's us to 99% I guess, at least catching the
+ address compares. Below also gets us aliasing correct
+ but as said we're giving leeway to the situation with
+ readonly vars anyway, so ... */
+ basic_block bb;
+ FOR_EACH_BB_FN (bb, fn)
+ for (gimple_stmt_iterator gsi = gsi_start_bb (bb); !gsi_end_p (gsi);
+ gsi_next (&gsi))
+ {
+ gcall *call = dyn_cast<gcall *> (gsi_stmt (gsi));
+ if (call)
+ {
+ fixup_pt_set (gimple_call_use_set (call));
+ fixup_pt_set (gimple_call_clobber_set (call));
+ }
+ }
+ }
+
+ unsigned i;
+ symtab_pair *item;
+ FOR_EACH_VEC_ELT (m_merged_variables, i, item)
+ set_alias_uids (item->first, DECL_UID (item->first->decl));
+}
+
/* Dump function prints all class members to a FILE with an INDENT. */
void
diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h
index c57224c1517..2101747bfd6 100644
--- a/gcc/ipa-icf.h
+++ b/gcc/ipa-icf.h
@@ -141,6 +141,8 @@ public:
unsigned int index;
};
+typedef std::pair<symtab_node *, symtab_node *> symtab_pair;
+
/* Semantic item is a base class that encapsulates all shared functionality
for both semantic function and variable items. */
class sem_item
@@ -563,6 +565,12 @@ private:
processed. */
bool merge_classes (unsigned int prev_class_count);
+ /* Fixup points to analysis info. */
+ void fixup_points_to_sets (void);
+
+ /* Fixup points to set PT. */
+ void fixup_pt_set (struct pt_solution *pt);
+
/* Adds a newly created congruence class CLS to worklist. */
void worklist_push (congruence_class *cls);
@@ -632,6 +640,10 @@ private:
/* Bitmap stack. */
bitmap_obstack m_bmstack;
+
+ /* Vector of merged variables. Needed for fixup of points-to-analysis
+ info. */
+ vec <symtab_pair> m_merged_variables;
}; // class sem_item_optimizer
} // ipa_icf namespace
diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c
index 959e31a68e6..f7dd29f925c 100644
--- a/gcc/ipa-utils.c
+++ b/gcc/ipa-utils.c
@@ -404,6 +404,8 @@ ipa_merge_profiles (struct cgraph_node *dst,
if (!dst->count)
return;
+ if (!src->count || src->alias)
+ return;
if (symtab->dump_file)
{
fprintf (symtab->dump_file, "Merging profiles of %s/%i to %s/%i\n",
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 3d48a8fb7bc..21959f716b1 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -477,7 +477,7 @@ unroll_loop_constant_iterations (struct loop *loop)
exit_mod = niter % (max_unroll + 1);
- auto_sbitmap wont_exit (max_unroll + 1);
+ auto_sbitmap wont_exit (max_unroll + 2);
bitmap_ones (wont_exit);
auto_vec<edge> remove_edges;
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index a4dcec51bb5..b1e2e287e15 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -490,7 +490,16 @@ find_decomposable_subregs (rtx *loc, enum classify_move_insn *pcmi)
were the same number and size of pieces. Hopefully this
doesn't happen much. */
- if (outer_words == 1 && inner_words > 1)
+ if (outer_words == 1
+ && inner_words > 1
+ /* Don't allow to decompose floating point subregs of
+ multi-word pseudos if the floating point mode does
+ not have word size, because otherwise we'd generate
+ a subreg with that floating mode from a different
+ sized integral pseudo which is not allowed by
+ validate_subreg. */
+ && (!FLOAT_MODE_P (GET_MODE (x))
+ || outer_size == UNITS_PER_WORD))
{
bitmap_set_bit (decomposable_context, regno);
iter.skip_subrtxes ();
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index db67677bf0b..9b011fd70a5 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -3724,7 +3724,13 @@ curr_insn_transform (bool check_only_p)
curr_insn_set = single_set (curr_insn);
if (curr_insn_set != NULL_RTX && simple_move_p ())
- return false;
+ {
+ /* We assume that the corresponding insn alternative has no
+ earlier clobbers. If it is not the case, don't define move
+ cost equal to 2 for the corresponding register classes. */
+ lra_set_used_insn_alternative (curr_insn, LRA_NON_CLOBBERED_ALT);
+ return false;
+ }
no_input_reloads_p = no_output_reloads_p = false;
goal_alt_number = -1;
@@ -3832,7 +3838,7 @@ curr_insn_transform (bool check_only_p)
if (change_p)
/* If we've changed the instruction then any alternative that
we chose previously may no longer be valid. */
- lra_set_used_insn_alternative (curr_insn, -1);
+ lra_set_used_insn_alternative (curr_insn, LRA_UNKNOWN_ALT);
if (! check_only_p && curr_insn_set != NULL_RTX
&& check_and_process_move (&change_p, &sec_mem_p))
@@ -3840,7 +3846,7 @@ curr_insn_transform (bool check_only_p)
try_swapped:
- reused_alternative_num = check_only_p ? -1 : curr_id->used_insn_alternative;
+ reused_alternative_num = check_only_p ? LRA_UNKNOWN_ALT : curr_id->used_insn_alternative;
if (lra_dump_file != NULL && reused_alternative_num >= 0)
fprintf (lra_dump_file, "Reusing alternative %d for insn #%u\n",
reused_alternative_num, INSN_UID (curr_insn));
@@ -6708,7 +6714,7 @@ remove_inheritance_pseudos (bitmap remove_pseudos)
}
lra_push_insn_and_update_insn_regno_info (curr_insn);
lra_set_used_insn_alternative_by_uid
- (INSN_UID (curr_insn), -1);
+ (INSN_UID (curr_insn), LRA_UNKNOWN_ALT);
done_p = true;
if (lra_dump_file != NULL)
{
@@ -6747,7 +6753,7 @@ remove_inheritance_pseudos (bitmap remove_pseudos)
constraints pass. */
lra_push_insn_and_update_insn_regno_info (curr_insn);
lra_set_used_insn_alternative_by_uid
- (INSN_UID (curr_insn), -1);
+ (INSN_UID (curr_insn), LRA_UNKNOWN_ALT);
}
else if (restored_regs_p)
/* The instruction has been restored to the form that
diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c
index 695f99ad317..993da861cf9 100644
--- a/gcc/lra-eliminations.c
+++ b/gcc/lra-eliminations.c
@@ -1178,7 +1178,7 @@ spill_pseudos (HARD_REG_SET set)
if (bitmap_bit_p (&to_process, INSN_UID (insn)))
{
lra_push_insn (insn);
- lra_set_used_insn_alternative (insn, -1);
+ lra_set_used_insn_alternative (insn, LRA_UNKNOWN_ALT);
}
bitmap_clear (&to_process);
}
@@ -1409,7 +1409,7 @@ process_insn_for_elimination (rtx_insn *insn, bool final_p, bool first_p)
}
lra_update_insn_regno_info (insn);
lra_push_insn (insn);
- lra_set_used_insn_alternative (insn, -1);
+ lra_set_used_insn_alternative (insn, LRA_UNKNOWN_ALT);
}
}
diff --git a/gcc/lra-int.h b/gcc/lra-int.h
index 405071708b1..59b08ec73ef 100644
--- a/gcc/lra-int.h
+++ b/gcc/lra-int.h
@@ -202,15 +202,20 @@ struct lra_static_insn_data
const struct operand_alternative *operand_alternative;
};
+/* Negative insn alternative numbers used for special cases. */
+#define LRA_UNKNOWN_ALT -1
+#define LRA_NON_CLOBBERED_ALT -2
+
/* LRA internal info about an insn (LRA internal insn
representation). */
struct lra_insn_recog_data
{
/* The insn code. */
int icode;
- /* The alternative should be used for the insn, -1 if invalid, or we
- should try to use any alternative, or the insn is a debug
- insn. */
+ /* The alternative should be used for the insn, LRA_UNKNOWN_ALT if
+ unknown, or we should assume any alternative, or the insn is a
+ debug insn. LRA_NON_CLOBBERED_ALT means ignoring any earlier
+ clobbers for the insn. */
int used_insn_alternative;
/* SP offset before the insn relative to one at the func start. */
HOST_WIDE_INT sp_offset;
diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c
index 5d4015b5ab9..bb8ab25d4ef 100644
--- a/gcc/lra-lives.c
+++ b/gcc/lra-lives.c
@@ -593,7 +593,9 @@ static inline bool
reg_early_clobber_p (const struct lra_insn_reg *reg, int n_alt)
{
return (reg->early_clobber
- && (n_alt < 0 || TEST_BIT (reg->early_clobber_alts, n_alt)));
+ && (n_alt == LRA_UNKNOWN_ALT
+ || (n_alt != LRA_NON_CLOBBERED_ALT
+ && TEST_BIT (reg->early_clobber_alts, n_alt))));
}
/* Process insns of the basic block BB to update pseudo live ranges,
diff --git a/gcc/lra-spills.c b/gcc/lra-spills.c
index 492fc182cf0..73f293a08f7 100644
--- a/gcc/lra-spills.c
+++ b/gcc/lra-spills.c
@@ -503,7 +503,7 @@ spill_pseudos (void)
INSN_UID (insn));
lra_push_insn (insn);
if (lra_reg_spill_p || targetm.different_addr_displacement_p ())
- lra_set_used_insn_alternative (insn, -1);
+ lra_set_used_insn_alternative (insn, LRA_UNKNOWN_ALT);
}
else if (CALL_P (insn)
/* Presence of any pseudo in CALL_INSN_FUNCTION_USAGE
diff --git a/gcc/lra.c b/gcc/lra.c
index 1230b25e7e1..a0c9797e2fd 100644
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -946,7 +946,7 @@ lra_set_insn_recog_data (rtx_insn *insn)
data = XNEW (struct lra_insn_recog_data);
lra_insn_recog_data[uid] = data;
data->insn = insn;
- data->used_insn_alternative = -1;
+ data->used_insn_alternative = LRA_UNKNOWN_ALT;
data->icode = icode;
data->regs = NULL;
if (DEBUG_INSN_P (insn))
@@ -1187,7 +1187,7 @@ lra_update_insn_recog_data (rtx_insn *insn)
return data;
}
insn_static_data = data->insn_static_data;
- data->used_insn_alternative = -1;
+ data->used_insn_alternative = LRA_UNKNOWN_ALT;
if (DEBUG_INSN_P (insn))
return data;
if (data->icode < 0)
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index b96b9df63b7..89313727068 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -2524,13 +2524,10 @@ write_symbol (struct streamer_tree_cache_d *cache,
const char *comdat;
unsigned char c;
- /* None of the following kinds of symbols are needed in the
- symbol table. */
- if (!TREE_PUBLIC (t)
- || is_builtin_fn (t)
- || DECL_ABSTRACT_P (t)
- || (VAR_P (t) && DECL_HARD_REGISTER (t)))
- return;
+ gcc_checking_assert (TREE_PUBLIC (t)
+ && !is_builtin_fn (t)
+ && !DECL_ABSTRACT_P (t)
+ && (!VAR_P (t) || !DECL_HARD_REGISTER (t)));
gcc_assert (VAR_OR_FUNCTION_DECL_P (t));
@@ -2618,45 +2615,6 @@ write_symbol (struct streamer_tree_cache_d *cache,
lto_write_data (&slot_num, 4);
}
-/* Return true if NODE should appear in the plugin symbol table. */
-
-bool
-output_symbol_p (symtab_node *node)
-{
- struct cgraph_node *cnode;
- if (!node->real_symbol_p ())
- return false;
- /* We keep external functions in symtab for sake of inlining
- and devirtualization. We do not want to see them in symbol table as
- references unless they are really used. */
- cnode = dyn_cast <cgraph_node *> (node);
- if (cnode && (!node->definition || DECL_EXTERNAL (cnode->decl))
- && cnode->callers)
- return true;
-
- /* Ignore all references from external vars initializers - they are not really
- part of the compilation unit until they are used by folding. Some symbols,
- like references to external construction vtables can not be referred to at all.
- We decide this at can_refer_decl_in_current_unit_p. */
- if (!node->definition || DECL_EXTERNAL (node->decl))
- {
- int i;
- struct ipa_ref *ref;
- for (i = 0; node->iterate_referring (i, ref); i++)
- {
- if (ref->use == IPA_REF_ALIAS)
- continue;
- if (is_a <cgraph_node *> (ref->referring))
- return true;
- if (!DECL_EXTERNAL (ref->referring->decl))
- return true;
- }
- return false;
- }
- return true;
-}
-
-
/* Write an IL symbol table to OB.
SET and VSET are cgraph/varpool node sets we are outputting. */
@@ -2681,7 +2639,7 @@ produce_symtab (struct output_block *ob)
{
symtab_node *node = lsei_node (lsei);
- if (!output_symbol_p (node) || DECL_EXTERNAL (node->decl))
+ if (DECL_EXTERNAL (node->decl) || !node->output_to_lto_symbol_table_p ())
continue;
write_symbol (cache, node->decl, &seen, false);
}
@@ -2690,7 +2648,7 @@ produce_symtab (struct output_block *ob)
{
symtab_node *node = lsei_node (lsei);
- if (!output_symbol_p (node) || !DECL_EXTERNAL (node->decl))
+ if (!DECL_EXTERNAL (node->decl) || !node->output_to_lto_symbol_table_p ())
continue;
write_symbol (cache, node->decl, &seen, false);
}
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 251156789d3..17431acfe90 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,102 @@
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-04-19 Martin Liska <mliska@suse.cz>
+
+ * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
+ for multiple PREVAILING_DEF_IRONLY for common symbols.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-04-10 Martin Liska <mliska@suse.cz>
+
+ PR lto/85248
+ * lto-symtab.c (lto_symtab_merge_p): Do not check for
+ TREE_VALUES of error attributes.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-04-10 Richard Biener <rguenther@suse.de>
+ Martin Liska <mliska@suse.cz>
+
+ PR lto/85248
+ * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-01-23 Martin Liska <mliska@suse.cz>
+
+ PR lto/81440
+ * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
+ trailing arrays at the end of a struct.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto-partition.c (lto_balanced_map): Watch overflow.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/81360
+ * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
+ (read_cgraph_and_symbols): Use
+ symtab_node::output_to_lto_symbol_table_p.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto.c (register_resolution): Remove forgotten sanity check.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
+
+ PR lto/81004
+ * lto.c: Include builtins.h
+ (register_resolution): Merge resolutions in case trees was
+ merged across units.
+ (lto_maybe_register_decl): Break out from ...
+ (lto_read_decls): ... here.
+ (unify_scc): Also register decls here.
+ (read_cgraph_and_symbols): Sanity check that all resolutions was
+ read.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR lto/83954
+ * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
+ component type of array types with non-aliased component.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
+
+ PR lto/83954
+ * lto-symtab.c (warn_type_compatibility_p): Silence false positive
+ for type match warning on arrays of pointers.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-10-13 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index ca8945e53bb..fdd6ae08a1c 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -840,11 +840,13 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED)
flag_pie is 2. */
flag_pie = MAX (flag_pie, flag_pic);
flag_pic = flag_pie;
+ flag_shlib = 0;
break;
case LTO_LINKER_OUTPUT_EXEC: /* Normal executable */
flag_pic = 0;
flag_pie = 0;
+ flag_shlib = 0;
break;
case LTO_LINKER_OUTPUT_UNKNOWN:
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c
index e27d0d1690c..a624dfa8847 100644
--- a/gcc/lto/lto-partition.c
+++ b/gcc/lto/lto-partition.c
@@ -756,7 +756,8 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size)
if (npartitions < n_lto_partitions)
partition_size = total_size / (n_lto_partitions - npartitions);
else
- partition_size = INT_MAX;
+ /* Watch for overflow. */
+ partition_size = INT_MAX / 16;
if (partition_size < PARAM_VALUE (MIN_PARTITION_SIZE))
partition_size = PARAM_VALUE (MIN_PARTITION_SIZE);
diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c
index f61b1f80133..65eb2b58c72 100644
--- a/gcc/lto/lto-symtab.c
+++ b/gcc/lto/lto-symtab.c
@@ -283,11 +283,25 @@ warn_type_compatibility_p (tree prevailing_type, tree type,
alias_set_type set1 = get_alias_set (type);
alias_set_type set2 = get_alias_set (prevailing_type);
- if (set1 && set2 && set1 != set2
- && (!POINTER_TYPE_P (type) || !POINTER_TYPE_P (prevailing_type)
+ if (set1 && set2 && set1 != set2)
+ {
+ tree t1 = type, t2 = prevailing_type;
+
+ /* Alias sets of arrays with aliased components are the same as alias
+ sets of the inner types. */
+ while (TREE_CODE (t1) == ARRAY_TYPE
+ && !TYPE_NONALIASED_COMPONENT (t1)
+ && TREE_CODE (t2) == ARRAY_TYPE
+ && !TYPE_NONALIASED_COMPONENT (t2))
+ {
+ t1 = TREE_TYPE (t1);
+ t2 = TREE_TYPE (t2);
+ }
+ if ((!POINTER_TYPE_P (t1) || !POINTER_TYPE_P (t2))
|| (set1 != TYPE_ALIAS_SET (ptr_type_node)
- && set2 != TYPE_ALIAS_SET (ptr_type_node))))
- lev |= 5;
+ && set2 != TYPE_ALIAS_SET (ptr_type_node)))
+ lev |= 5;
+ }
}
return lev;
@@ -351,18 +365,31 @@ lto_symtab_merge (symtab_node *prevailing, symtab_node *entry)
return false;
if (DECL_SIZE (decl) && DECL_SIZE (prevailing_decl)
- && !tree_int_cst_equal (DECL_SIZE (decl), DECL_SIZE (prevailing_decl))
+ && !tree_int_cst_equal (DECL_SIZE (decl), DECL_SIZE (prevailing_decl)))
+ {
+ if (!DECL_COMMON (decl) && !DECL_EXTERNAL (decl))
+ return false;
+
+ tree type = TREE_TYPE (decl);
+
+ /* For record type, check for array at the end of the structure. */
+ if (TREE_CODE (type) == RECORD_TYPE)
+ {
+ tree field = TYPE_FIELDS (type);
+ while (DECL_CHAIN (field) != NULL_TREE)
+ field = DECL_CHAIN (field);
+
+ return TREE_CODE (TREE_TYPE (field)) == ARRAY_TYPE;
+ }
/* As a special case do not warn about merging
int a[];
and
int a[]={1,2,3};
here the first declaration is COMMON
and sizeof(a) == sizeof (int). */
- && ((!DECL_COMMON (decl) && !DECL_EXTERNAL (decl))
- || TREE_CODE (TREE_TYPE (decl)) != ARRAY_TYPE
- || TYPE_SIZE (TREE_TYPE (decl))
- != TYPE_SIZE (TREE_TYPE (TREE_TYPE (decl)))))
- return false;
+ else if (TREE_CODE (type) == ARRAY_TYPE)
+ return (TYPE_SIZE (decl) == TYPE_SIZE (TREE_TYPE (type)));
+ }
return true;
}
@@ -438,9 +465,14 @@ lto_symtab_resolve_symbols (symtab_node *first)
/* If the chain is already resolved there is nothing else to do. */
if (prevailing)
{
- /* Assert it's the only one. */
+ /* Assert it's the only one.
+ GCC should silence multiple PREVAILING_DEF_IRONLY defs error
+ on COMMON symbols since it isn't error.
+ See: https://sourceware.org/bugzilla/show_bug.cgi?id=23079. */
for (e = prevailing->next_sharing_asm_name; e; e = e->next_sharing_asm_name)
if (lto_symtab_symbol_p (e)
+ && !DECL_COMMON (prevailing->decl)
+ && !DECL_COMMON (e->decl)
&& (e->resolution == LDPR_PREVAILING_DEF_IRONLY
|| e->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP
|| e->resolution == LDPR_PREVAILING_DEF))
@@ -544,6 +576,9 @@ lto_symtab_merge_p (tree prevailing, tree decl)
return false;
}
}
+
+ /* FIXME: after MPX is removed, use flags_from_decl_or_type
+ function instead. PR lto/85248. */
if (DECL_ATTRIBUTES (prevailing) != DECL_ATTRIBUTES (decl))
{
tree prev_attr = lookup_attribute ("error", DECL_ATTRIBUTES (prevailing));
@@ -571,6 +606,16 @@ lto_symtab_merge_p (tree prevailing, tree decl)
"warning attribute mismatch\n");
return false;
}
+
+ prev_attr = lookup_attribute ("noreturn", DECL_ATTRIBUTES (prevailing));
+ attr = lookup_attribute ("noreturn", DECL_ATTRIBUTES (decl));
+ if ((prev_attr == NULL) != (attr == NULL))
+ {
+ if (symtab->dump_file)
+ fprintf (symtab->dump_file, "Not merging decls; "
+ "noreturn attribute mismatch\n");
+ return false;
+ }
}
return true;
}
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index a7d5e450ea0..8a82f923b6e 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -53,6 +53,7 @@ along with GCC; see the file COPYING3. If not see
#include "lto-symtab.h"
#include "stringpool.h"
#include "fold-const.h"
+#include "builtins.h"
/* Number of parallel tasks to run, -1 if we want to use GNU Make jobserver. */
@@ -829,12 +830,19 @@ static void
register_resolution (struct lto_file_decl_data *file_data, tree decl,
enum ld_plugin_symbol_resolution resolution)
{
+ bool existed;
if (resolution == LDPR_UNKNOWN)
return;
if (!file_data->resolution_map)
file_data->resolution_map
= new hash_map<tree, ld_plugin_symbol_resolution>;
- file_data->resolution_map->put (decl, resolution);
+ ld_plugin_symbol_resolution_t &res
+ = file_data->resolution_map->get_or_insert (decl, &existed);
+ if (!existed
+ || resolution == LDPR_PREVAILING_DEF_IRONLY
+ || resolution == LDPR_PREVAILING_DEF
+ || resolution == LDPR_PREVAILING_DEF_IRONLY_EXP)
+ res = resolution;
}
/* Register DECL with the global symbol table and change its
@@ -877,6 +885,18 @@ lto_register_function_decl_in_symtab (struct data_in *data_in, tree decl,
decl, get_resolution (data_in, ix));
}
+/* Check if T is a decl and needs register its resolution info. */
+
+static void
+lto_maybe_register_decl (struct data_in *data_in, tree t, unsigned ix)
+{
+ if (TREE_CODE (t) == VAR_DECL)
+ lto_register_var_decl_in_symtab (data_in, t, ix);
+ else if (TREE_CODE (t) == FUNCTION_DECL
+ && !DECL_BUILT_IN (t))
+ lto_register_function_decl_in_symtab (data_in, t, ix);
+}
+
/* For the type T re-materialize it in the type variant list and
the pointer/reference-to chains. */
@@ -1607,7 +1627,10 @@ unify_scc (struct data_in *data_in, unsigned from,
/* Fixup the streamer cache with the prevailing nodes according
to the tree node mapping computed by compare_tree_sccs. */
if (len == 1)
- streamer_tree_cache_replace_tree (cache, pscc->entries[0], from);
+ {
+ lto_maybe_register_decl (data_in, pscc->entries[0], from);
+ streamer_tree_cache_replace_tree (cache, pscc->entries[0], from);
+ }
else
{
tree *map2 = XALLOCAVEC (tree, 2 * len);
@@ -1619,8 +1642,12 @@ unify_scc (struct data_in *data_in, unsigned from,
qsort (map2, len, 2 * sizeof (tree), cmp_tree);
qsort (map, len, 2 * sizeof (tree), cmp_tree);
for (unsigned i = 0; i < len; ++i)
- streamer_tree_cache_replace_tree (cache, map[2*i],
- (uintptr_t)map2[2*i]);
+ {
+ lto_maybe_register_decl (data_in, map[2*i],
+ (uintptr_t)map2[2*i]);
+ streamer_tree_cache_replace_tree (cache, map[2*i],
+ (uintptr_t)map2[2*i]);
+ }
}
/* Free the tree nodes from the read SCC. */
@@ -1759,13 +1786,7 @@ lto_read_decls (struct lto_file_decl_data *decl_data, const void *data,
}
if (!flag_ltrans)
{
- /* Register variables and functions with the
- symbol table. */
- if (TREE_CODE (t) == VAR_DECL)
- lto_register_var_decl_in_symtab (data_in, t, from + i);
- else if (TREE_CODE (t) == FUNCTION_DECL
- && !DECL_BUILT_IN (t))
- lto_register_function_decl_in_symtab (data_in, t, from + i);
+ lto_maybe_register_decl (data_in, t, from + i);
/* Scan the tree for references to global functions or
variables and record those for later fixup. */
if (mentions_vars_p (t))
@@ -2858,13 +2879,25 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
/* Store resolutions into the symbol table. */
- ld_plugin_symbol_resolution_t *res;
FOR_EACH_SYMBOL (snode)
- if (snode->real_symbol_p ()
- && snode->lto_file_data
- && snode->lto_file_data->resolution_map
- && (res = snode->lto_file_data->resolution_map->get (snode->decl)))
- snode->resolution = *res;
+ if (snode->externally_visible && snode->real_symbol_p ()
+ && snode->lto_file_data && snode->lto_file_data->resolution_map
+ && !is_builtin_fn (snode->decl)
+ && !(VAR_P (snode->decl) && DECL_HARD_REGISTER (snode->decl)))
+ {
+ ld_plugin_symbol_resolution_t *res;
+
+ res = snode->lto_file_data->resolution_map->get (snode->decl);
+ if (!res || *res == LDPR_UNKNOWN)
+ {
+ if (snode->output_to_lto_symbol_table_p ())
+ fatal_error (input_location, "missing resolution data for %s",
+ IDENTIFIER_POINTER
+ (DECL_ASSEMBLER_NAME (snode->decl)));
+ }
+ else
+ snode->resolution = *res;
+ }
for (i = 0; all_file_decl_data[i]; i++)
if (all_file_decl_data[i]->resolution_map)
{
diff --git a/gcc/match.pd b/gcc/match.pd
index 100e188ea2c..e405d9e84e9 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -2789,15 +2789,17 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(simplify
(cond
(ne (bit_and @0 integer_pow2p@1) integer_zerop)
- integer_pow2p@2 integer_zerop)
- (with {
- int shift = wi::exact_log2 (@2) - wi::exact_log2 (@1);
- }
- (if (shift > 0)
- (bit_and
- (lshift (convert @0) { build_int_cst (integer_type_node, shift); }) @2)
- (bit_and
- (convert (rshift @0 { build_int_cst (integer_type_node, -shift); })) @2))))
+ INTEGER_CST@2 integer_zerop)
+ (if (integer_pow2p (@2))
+ (with {
+ int shift = wi::exact_log2 (@2) - wi::exact_log2 (@1);
+ }
+ (if (shift > 0)
+ (bit_and
+ (lshift (convert @0) { build_int_cst (integer_type_node, shift); }) @2)
+ (bit_and
+ (convert (rshift @0 { build_int_cst (integer_type_node, -shift); }))
+ @2)))))
/* If we have (A & C) != 0 where C is the sign bit of A, convert
this into A < 0. Similarly for (A & C) == 0 into A >= 0. */
@@ -2818,8 +2820,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(simplify
(cond
(lt @0 integer_zerop)
- integer_pow2p@1 integer_zerop)
- (if (!TYPE_UNSIGNED (TREE_TYPE (@0)))
+ INTEGER_CST@1 integer_zerop)
+ (if (integer_pow2p (@1)
+ && !TYPE_UNSIGNED (TREE_TYPE (@0)))
(with {
int shift = element_precision (@0) - wi::exact_log2 (@1) - 1;
}
@@ -2926,10 +2929,13 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(for cmp (ne eq)
(simplify
(cmp (convert @0) INTEGER_CST@1)
- (if ((POINTER_TYPE_P (TREE_TYPE (@0)) && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (@0)))
- && INTEGRAL_TYPE_P (TREE_TYPE (@1)))
- || (INTEGRAL_TYPE_P (TREE_TYPE (@0)) && POINTER_TYPE_P (TREE_TYPE (@1))
- && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (@1)))))
+ (if (((POINTER_TYPE_P (TREE_TYPE (@0))
+ && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (@0)))
+ && INTEGRAL_TYPE_P (TREE_TYPE (@1)))
+ || (INTEGRAL_TYPE_P (TREE_TYPE (@0))
+ && POINTER_TYPE_P (TREE_TYPE (@1))
+ && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (@1)))))
+ && TYPE_PRECISION (TREE_TYPE (@0)) == TYPE_PRECISION (TREE_TYPE (@1)))
(cmp @0 (convert @1)))))
/* Non-equality compare simplifications from fold_binary */
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c
index a1e668d99d2..549a5db000a 100644
--- a/gcc/omp-expand.c
+++ b/gcc/omp-expand.c
@@ -5628,6 +5628,14 @@ expand_oacc_for (struct omp_region *region, struct omp_for_data *fd)
split->flags ^= EDGE_FALLTHRU | EDGE_TRUE_VALUE;
+ /* Add a dummy exit for the tiled block when cont_bb is missing. */
+ if (cont_bb == NULL)
+ {
+ edge e = make_edge (body_bb, exit_bb, EDGE_FALSE_VALUE);
+ e->probability = PROB_EVEN;
+ split->probability = PROB_EVEN;
+ }
+
/* Initialize the user's loop vars. */
gsi = gsi_start_bb (elem_body_bb);
expand_oacc_collapse_vars (fd, true, &gsi, counts, e_offset);
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 714fac76f3c..9591adaae0c 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -4294,9 +4294,10 @@ emit_conditional_move (rtx target, enum rtx_code code, rtx op0, rtx op1,
save_pending_stack_adjust (&save);
last = get_last_insn ();
do_pending_stack_adjust ();
+ machine_mode cmpmode = cmode;
prepare_cmp_insn (XEXP (comparison, 0), XEXP (comparison, 1),
GET_CODE (comparison), NULL_RTX, unsignedp,
- OPTAB_WIDEN, &comparison, &cmode);
+ OPTAB_WIDEN, &comparison, &cmpmode);
if (comparison)
{
struct expand_operand ops[4];
diff --git a/gcc/opts.c b/gcc/opts.c
index f03b57aa343..e5126618f35 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1014,6 +1014,26 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
if ((opts->x_flag_sanitize & SANITIZE_KERNEL_ADDRESS) && opts->x_flag_tm)
sorry ("transactional memory is not supported with "
"%<-fsanitize=kernel-address%>");
+
+ /* Comes from final.c -- no real reason to change it. */
+#define MAX_CODE_ALIGN 16
+#define MAX_CODE_ALIGN_VALUE (1 << MAX_CODE_ALIGN)
+
+ if (opts->x_align_loops > MAX_CODE_ALIGN_VALUE)
+ error_at (loc, "-falign-loops=%d is not between 0 and %d",
+ opts->x_align_loops, MAX_CODE_ALIGN_VALUE);
+
+ if (opts->x_align_jumps > MAX_CODE_ALIGN_VALUE)
+ error_at (loc, "-falign-jumps=%d is not between 0 and %d",
+ opts->x_align_jumps, MAX_CODE_ALIGN_VALUE);
+
+ if (opts->x_align_functions > MAX_CODE_ALIGN_VALUE)
+ error_at (loc, "-falign-functions=%d is not between 0 and %d",
+ opts->x_align_functions, MAX_CODE_ALIGN_VALUE);
+
+ if (opts->x_align_labels > MAX_CODE_ALIGN_VALUE)
+ error_at (loc, "-falign-labels=%d is not between 0 and %d",
+ opts->x_align_labels, MAX_CODE_ALIGN_VALUE);
}
#define LEFT_COLUMN 27
diff --git a/gcc/params.def b/gcc/params.def
index ce66e393eb1..a0981b09e6d 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -354,11 +354,11 @@ DEFPARAM(PARAM_MAX_UNSWITCH_LEVEL,
"The maximum number of unswitchings in a single loop.",
3, 0, 0)
-/* The maximum number of insns in loop header duplicated by he copy loop
+/* The maximum number of insns in loop header duplicated by the copy loop
headers pass. */
DEFPARAM(PARAM_MAX_LOOP_HEADER_INSNS,
"max-loop-header-insns",
- "The maximum number of insns in loop header duplicated by he copy loop headers pass.",
+ "The maximum number of insns in loop header duplicated by the copy loop headers pass.",
20, 0, 0)
/* The maximum number of iterations of a loop the brute force algorithm
diff --git a/gcc/postreload.c b/gcc/postreload.c
index e721f2f867d..d60875a257b 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -1160,11 +1160,13 @@ reload_combine_recognize_pattern (rtx_insn *insn)
value in PREV, the constant loading instruction. */
validate_change (prev, &SET_DEST (prev_set), index_reg, 1);
if (reg_state[regno].offset != const0_rtx)
- validate_change (prev,
- &SET_SRC (prev_set),
- GEN_INT (INTVAL (SET_SRC (prev_set))
- + INTVAL (reg_state[regno].offset)),
- 1);
+ {
+ HOST_WIDE_INT c
+ = trunc_int_for_mode (UINTVAL (SET_SRC (prev_set))
+ + UINTVAL (reg_state[regno].offset),
+ GET_MODE (index_reg));
+ validate_change (prev, &SET_SRC (prev_set), GEN_INT (c), 1);
+ }
/* Now for every use of REG that we have recorded, replace REG
with REG_SUM. */
diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c
index 253be9d5273..083eebc257c 100644
--- a/gcc/shrink-wrap.c
+++ b/gcc/shrink-wrap.c
@@ -157,7 +157,7 @@ move_insn_for_shrink_wrap (basic_block bb, rtx_insn *insn,
struct dead_debug_local *debug)
{
rtx set, src, dest;
- bitmap live_out, live_in, bb_uses, bb_defs;
+ bitmap live_out, live_in, bb_uses = NULL, bb_defs = NULL;
unsigned int i, dregno, end_dregno;
unsigned int sregno = FIRST_PSEUDO_REGISTER;
unsigned int end_sregno = FIRST_PSEUDO_REGISTER;
@@ -330,8 +330,11 @@ move_insn_for_shrink_wrap (basic_block bb, rtx_insn *insn,
/* Check whether BB uses DEST or clobbers DEST. We need to add
INSN to BB if so. Either way, DEST is no longer live on entry,
except for any part that overlaps SRC (next loop). */
- bb_uses = &DF_LR_BB_INFO (bb)->use;
- bb_defs = &DF_LR_BB_INFO (bb)->def;
+ if (!*split_p)
+ {
+ bb_uses = &DF_LR_BB_INFO (bb)->use;
+ bb_defs = &DF_LR_BB_INFO (bb)->def;
+ }
if (df_live)
{
for (i = dregno; i < end_dregno; i++)
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 342cc36f3af..c18f1b25199 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "ipa-utils.h"
#include "calls.h"
+#include "builtins.h"
static const char *ipa_ref_use_name[] = {"read","write","addr","alias","chkp"};
@@ -2279,3 +2280,58 @@ symtab_node::binds_to_current_def_p (symtab_node *ref)
return false;
}
+
+/* Return true if symbol should be output to the symbol table. */
+
+bool
+symtab_node::output_to_lto_symbol_table_p (void)
+{
+ /* Only externally visible symbols matter. */
+ if (!TREE_PUBLIC (decl))
+ return false;
+ if (!real_symbol_p ())
+ return false;
+ /* FIXME: variables probably should not be considered as real symbols at
+ first place. */
+ if (VAR_P (decl) && DECL_HARD_REGISTER (decl))
+ return false;
+ /* FIXME: Builtins corresponding to real functions probably should have
+ symbol table entries. */
+ if (is_builtin_fn (decl))
+ return false;
+
+ /* We have real symbol that should be in symbol table. However try to trim
+ down the refernces to libraries bit more because linker will otherwise
+ bring unnecesary object files into the final link.
+ FIXME: The following checks can easily be confused i.e. by self recursive
+ function or self-referring variable. */
+
+ /* We keep external functions in symtab for sake of inlining
+ and devirtualization. We do not want to see them in symbol table as
+ references unless they are really used. */
+ cgraph_node *cnode = dyn_cast <cgraph_node *> (this);
+ if (cnode && (!definition || DECL_EXTERNAL (decl))
+ && cnode->callers)
+ return true;
+
+ /* Ignore all references from external vars initializers - they are not really
+ part of the compilation unit until they are used by folding. Some symbols,
+ like references to external construction vtables can not be referred to at
+ all. We decide this at can_refer_decl_in_current_unit_p. */
+ if (!definition || DECL_EXTERNAL (decl))
+ {
+ int i;
+ struct ipa_ref *ref;
+ for (i = 0; iterate_referring (i, ref); i++)
+ {
+ if (ref->use == IPA_REF_ALIAS)
+ continue;
+ if (is_a <cgraph_node *> (ref->referring))
+ return true;
+ if (!DECL_EXTERNAL (ref->referring->decl))
+ return true;
+ }
+ return false;
+ }
+ return true;
+}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 69e86c21ea8..ecdeaf7efdc 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,1073 @@
+2018-07-03 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/82969
+ PR fortran/86242
+ * gfortran.dg/proc_ptr_50.f90: New test.
+
+2018-06-26 Kelvin Nilsen <kelvin@gcc.gnu.org>
+
+ Backported from mainline
+ 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
+
+ * gcc.target/powerpc/builtins-1.c: Add dg directives to scan
+ for vpkudus.
+
+2018-06-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/86314
+ * gcc.dg/pr86314.c: New test.
+
+2018-06-25 Fritz Reese <fritzoreese@gmail.com>
+
+ PR fortran/82972
+ PR fortran/83088
+ PR fortran/85851
+ Backport from trunk.
+ * gfortran.dg/init_flag_17.f90: New testcase.
+
+2018-06-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84786
+ * gcc.target/i386/avx512f-pr84786-3.c: New test.
+
+2018-06-25 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83118
+ Back port from trunk
+ * gfortran.dg/unlimited_polymorphic_30.f03: New test.
+
+2018-06-23 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR tree-optimization/85989
+ * gcc.dg/torture/pr85989.c: New test.
+
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85662
+ * g++.dg/ext/offsetof3.C: New test.
+
+ 2018-06-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/86210
+ * g++.dg/warn/Wnonnull4.C: New test.
+
+ PR tree-optimization/86231
+ * gcc.dg/tree-ssa/vrp119.c: New test.
+ * gcc.c-torture/execute/pr86231.c: New test.
+
+ 2018-06-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/85878
+ * gfortran.fortran-torture/compile/pr85878.f90: New test.
+
+ 2018-06-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/85945
+ * gcc.c-torture/compile/pr85945.c: New test.
+
+ 2018-06-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/86025
+ * c-c++-common/gomp/pr86025.c: New test.
+
+ 2018-05-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85952
+ * g++.dg/warn/Wunused-var-33.C: New test.
+
+ 2018-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/85696
+ * c-c++-common/gomp/pr85696.c: New test.
+
+ 2018-05-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85662
+ * g++.dg/ext/offsetof2.C: New test.
+
+ 2018-05-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85659
+ * g++.dg/ext/asm14.C: New test.
+ * g++.dg/ext/asm15.C: New test.
+ * g++.dg/ext/asm16.C: New test.
+
+ 2018-04-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/85529
+ * gcc.c-torture/execute/pr85529-1.c: New test.
+ * gcc.c-torture/execute/pr85529-2.c: New test.
+ * gcc.dg/pr85529.c: New test.
+
+ 2018-04-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84463
+ * g++.dg/cpp0x/constexpr-nullptr-1.C: Add -O1 to dg-options.
+ * g++.dg/cpp0x/constexpr-nullptr-2.C: Expect different diagnostics
+ in two cases. Uncomment two other tests and add expected dg-error for
+ them.
+ * g++.dg/init/struct2.C: Cast to int rather than long to avoid
+ -Wnarrowing diagnostics on some targets for c++11.
+ * g++.dg/parse/array-size2.C: Remove xfail.
+ * g++.dg/cpp0x/constexpr-84463.C: New test.
+
+ 2018-04-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/85430
+ * gcc.dg/pr85430.c: New test.
+
+ 2018-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/85300
+ * gcc.dg/pr85300.c: New test.
+
+ PR fortran/85313
+ * gfortran.dg/gomp/pr85313.f90: New test.
+
+ 2018-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/85257
+ * gcc.dg/pr85257.c: New test.
+
+ 2018-04-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/85252
+ * gcc.dg/debug/pr85252.c: New test.
+
+ PR c++/85210
+ * g++.dg/cpp1z/decomp42.C: New test.
+
+ 2018-04-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85208
+ * g++.dg/cpp1z/decomp41.C: New test.
+
+ 2018-04-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/85172
+ * g++.dg/ext/builtin13.C: New test.
+ * g++.dg/ext/atomic-4.C: New test.
+
+ 2018-04-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/85167
+ * gcc.dg/pr85167.c: New test.
+
+ PR c++/85147
+ * g++.dg/cpp0x/pr85147.C: New test.
+
+ PR c++/85140
+ * g++.dg/cpp0x/gen-attrs-64.C: New test.
+
+ 2018-03-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84791
+ * g++.dg/gomp/pr84791.C: New test.
+
+ 2018-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/85095
+ * gcc.target/i386/pr85095-1.c: New test.
+ * gcc.target/i386/pr85095-2.c: New test.
+ * gcc.c-torture/execute/pr85095.c: New test.
+
+ 2018-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85076
+ * g++.dg/cpp1y/pr85076.C: New test.
+
+ PR c++/85068
+ * g++.dg/inherit/covariant22.C: New test.
+
+ 2018-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/85034
+ * gcc.target/i386/pr85034.c: New test.
+
+ PR inline-asm/85022
+ * c-c++-common/torture/pr85022.c: New test.
+
+ 2018-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/84941
+ * gcc.dg/pr84941.c: New test.
+
+ 2018-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/84999
+ * c-c++-common/pr84999.c: New test.
+
+ PR c++/84961
+ * c-c++-common/pr43690.c: Don't expect errors on "m" (--x) and
+ "m" (++x) in C++.
+ * g++.dg/torture/pr84961-1.C: New test.
+ * g++.dg/torture/pr84961-2.C: New test.
+
+ 2018-03-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/84875
+ * gcc.dg/pr84875.c: New test.
+
+ PR c/84953
+ * gcc.dg/pr84953.c: New test.
+
+ 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
+
+ PR sanitizer/78651
+ * g++.dg/asan/pr78651.C: New test.
+
+ 2018-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84899
+ * gcc.dg/pr84899.c: New test.
+
+ PR c++/84874
+ * g++.dg/cpp1z/desig8.C: New test.
+
+ PR tree-optimization/84841
+ * gcc.dg/pr84841.c: New test.
+
+ PR c++/84874
+ * g++.dg/cpp1z/desig7.C: New test.
+
+ 2018-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79085
+ * g++.dg/opt/pr79085.C: New test.
+
+ PR c++/84222
+ * g++.dg/warn/deprecated.C (T::member3): Change dg-warning to dg-bogus.
+ * g++.dg/warn/deprecated-6.C (T::member3): Likewise.
+ * g++.dg/warn/deprecated-13.C: New test.
+
+ PR target/84860
+ * gcc.c-torture/compile/pr84860.c: New test.
+
+ PR c/84853
+ * gcc.dg/pr84853.c: New test.
+
+ 2018-03-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/84834
+ * gcc.dg/pr84834.c: New test.
+
+ PR target/84827
+ * gcc.target/i386/pr84827.c: New test.
+
+ PR target/84786
+ * gcc.target/i386/avx512f-pr84786-1.c: New test.
+ * gcc.target/i386/avx512f-pr84786-2.c: New test.
+
+ 2018-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84772
+ * gcc.dg/pr84772.c: New test.
+
+ 2018-03-09 Jason Merrill <jason@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84076
+ * g++.dg/warn/Wformat-2.C: New test.
+
+ 2018-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84767
+ * g++.dg/ext/vla18.C: New test.
+
+ 2018-03-08 Jason Merrill <jason@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/80598
+ * g++.dg/warn/Wunused-function4.C: New test.
+
+ 2018-03-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/84739
+ * gcc.dg/pr84739.c: New test.
+
+ 2018-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84700
+ * gcc.target/powerpc/pr84700.c: New test.
+
+ 2018-03-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84662
+ * g++.dg/cpp1y/pr84662.C: New test.
+
+2018-06-22 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ Backport from mainline
+ 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ * gcc.target/arm/cmse/cmse-1c99.c: New test.
+
+2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/aggr24.adb: New test.
+ * gnat.dg/aggr24_pkg.ad[sb]: New helper.
+
+2018-06-18 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/82063
+ * gcc.dg/Walloc-size-larger-than-1.c: New test.
+ * gcc.dg/Walloc-size-larger-than-10.c: New test.
+ * gcc.dg/Walloc-size-larger-than-11.c: New test.
+ * gcc.dg/Walloc-size-larger-than-12.c: New test.
+ * gcc.dg/Walloc-size-larger-than-13.c: New test.
+ * gcc.dg/Walloc-size-larger-than-14.c: New test.
+ * gcc.dg/Walloc-size-larger-than-15.c: New test.
+ * gcc.dg/Walloc-size-larger-than-16.c: New test.
+ * gcc.dg/Walloc-size-larger-than-2.c: New test.
+ * gcc.dg/Walloc-size-larger-than-3.c: New test.
+ * gcc.dg/Walloc-size-larger-than-4.c: New test.
+ * gcc.dg/Walloc-size-larger-than-5.c: New test.
+ * gcc.dg/Walloc-size-larger-than-6.c: New test.
+ * gcc.dg/Walloc-size-larger-than-7.c: New test.
+ * gcc.dg/Walloc-size-larger-than-8.c: New test.
+ * gcc.dg/Walloc-size-larger-than-9.c: New test.
+ * gcc.dg/Walloc-size-larger-than.c: New test.
+
+2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/86110
+ * gfortran.dg/pr86110.f90: New test.
+
+2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/44491
+ * gfortran.dg/pr44491.f90: New testcase
+
+2018-06-11 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/85755
+ * gcc.target/powerpc/pr85755.c: New test.
+
+2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/38351
+ * gfortran.dg/pr38351.f90: New test.
+ * gfortran.dg/typebound_operator_4.f03: Adjust for new error message.
+
+2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/63514
+ * gfortran.dg/pr63514.f90: New test.
+
+2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/78278
+ * gfortran.dg/data_bounds_1.f90: Add -std=gnu option.
+ * gfortran.dg/data_char_1.f90: Ditto.
+ * gfortran.dg/pr78571.f90: Ditto.
+ * gfortran.dg/pr78278.f90: New test.
+
+2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/86059
+ * gfortran.dg/associate_30.f90: Remove code tested ...
+ * gfortran.dg/pr67803.f90: Ditto.
+ * gfortran.dg/pr67805.f90: Ditto.
+ * gfortran.dg/pr86059.f90: ... here. New test.
+
+2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85138
+ PR fortran/85996
+ PR fortran/86051
+ * gfortran.dg/pr85138_1.f90: New test.
+ * gfortran.dg/pr85138_2.f90: Ditto.
+ * gfortran.dg/pr85996.f90: Ditto.
+
+2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/86045
+ Backport from trunk.
+ * gfortran.dg/pr86045.f90: New test.
+
+2018-06-07 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/85641
+ Backport from trunk.
+ * gfortran.dg/realloc_on_assign_30.f90: New test.
+
+2018-06-07 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-05-04 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/85588
+ * gcc.dg/torture/pr85588.c: New testcase.
+ * gcc.dg/torture/pr57656.c: Use dg-additional-options.
+
+ 2018-05-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/85567
+ * gcc.dg/torture/pr85567.c: New testcase.
+
+ 2018-05-02 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/85597
+ * gcc.dg/vect/pr85597.c: New testcase.
+
+2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ Backport from mainline
+ 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/htm-builtins-compile-4.c: New test.
+
+2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85981
+ * gfortran.dg/allocate_alloc_opt_14.f90: New test.
+ * gfortran.dg/allocate_alloc_opt_1.f90: Update error string.
+ * gfortran.dg/allocate_stat_2.f90: Ditto.
+ * gfortran.dg/deallocate_alloc_opt_1.f90: Ditto.
+
+2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/opt3.ads: New test.
+ * gnat.dg/specs/opt3_pkg.ads: New helper.
+
+2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr53.ad[sb]: New test.
+ * gnat.dg/discr53_pkg.ads: New helper.
+
+2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85543
+ Backport from trunk
+ * gfortran.dg/pr85543.f90: New test.
+
+2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85779
+ Backport from trunk
+ * gfortran.dg/pr85779_1.f90: New test.
+ * gfortran.dg/pr85779_2.f90: Ditto.
+ * gfortran.dg/pr85779_3.f90: Ditto.
+
+2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85780
+ Backport from trunk
+ * gfortran.dg/pr85780.f90: New test.
+
+2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85895
+ Backport from trunk
+ * gfortran.dg/coarray_3.f90: Fix invalid testcase.
+ * gfortran.dg/pr85895.f90: New test.
+
+2018-05-24 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/avx512f-vcvtusi2sd64-1.c: Update scan string.
+ * gcc.target/i386/avx512f-vcvtusi2ss64-1.c: Ditto.
+
+2018-05-21 Pat Haugen <pthaugen@us.ibm.com>
+
+ Backport from mainline:
+ 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
+
+ PR target/85698
+ * gcc.target/powerpc/pr85698.c: New test.
+
+2018-05-20 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/80657
+ Backport from trunk
+ * gfortran.dg/char_result_18.f90: New test.
+
+2018-05-20 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/82275
+ Backport from trunk
+ * gfortran.dg/select_type_42.f90: New test.
+
+2018-05-19 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/82923
+ Backport from trunk
+ * gfortran.dg/allocate_assumed_charlen_4.f90: New test. Note
+ that the patch fixes PR66694 & PR82617, although the testcases
+ are not explicitly included.
+
+2017-05-17 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/82814
+ Backport from trunk
+ * gfortran.dg/submodule_31.f08: New test.
+
+2018-05-16 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83149
+ Backport from trunk
+ * gfortran.dg/pr83149_1.f90: New test.
+ * gfortran.dg/pr83149.f90: Additional source for previous.
+ * gfortran.dg/pr83149_b.f90: New test.
+ * gfortran.dg/pr83149_a.f90: Additional source for previous.
+
+2018-16-05 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83898
+ Backport from trunk
+ * gfortran.dg/associate_33.f03 : New test.
+
+2018-05-16 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/84546
+ Backport from trunk
+ * gfortran.dg/unlimited_polymorphic_29.f90 : New test.
+
+2018-05-12 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85542
+ Backport from trunk
+ * gfortran.dg/pr85542.f90: New test.
+
+2018-05-12 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/68846
+ Backport from trunk
+ * gfortran.dg/temporary_3.f90 : New test.
+
+ PR fortran/70864
+ Backport from trunk
+ * gfortran.dg/temporary_2.f90 : New test.
+
+2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/70870
+ Backport from trunk
+ * gfortran.dg/pr70870_1.f90: New test.
+
+2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85521
+ Backport from trunk
+ * gfortran.dg/pr85521_1.f90: New test.
+ * gfortran.dg/pr85521_2.f90: New test.
+
+2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85687
+ Backport from trunk
+ * gfortran.dg/pr85687.f90: new test.
+
+2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ PR fortran/85507
+ Backport from trunk.
+ * gfortran.dg/coarray_dependency_1.f90: New test.
+ * gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.
+
+2018-05-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ Backport from trunk
+ 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/82518
+ * lib/target-supports.exp (check_effective_target_vect_load_lanes):
+ Use check_effective_target_arm_little_endian.
+
+2018-04-28 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ PR fortran/81773
+ PR fortran/83606
+ Backport from trunk.
+ * gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
+ * gfortran.dg/coarray/get_to_indirect_array.f90: New test.
+
+2018-04-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-04-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/85284
+ * gcc.dg/torture/pr85284.c: New testcase.
+
+ 2018-04-06 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/85244
+ * gcc.dg/torture/pr85244-1.c: New testcase.
+ * gcc.dg/torture/pr85244-2.c: Likewise.
+
+ 2018-04-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/85168
+ * gcc.dg/torture/pr85168.c: New testcase.
+
+ 2018-03-15 Richard Biener <rguenther@suse.de>
+
+ PR c/84873
+ * c-c++-common/pr84873.c: New testcase.
+
+2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85520
+ * gfortran.dg/pr85520.f90: New test.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR lto/85248
+ * gcc.dg/lto/pr85248_0.c: New test.
+ * gcc.dg/lto/pr85248_1.c: New test.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-03-28 Jakub Jelinek <jakub@redhat.com>
+ Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/85081
+ * g++.dg/asan/pr85081.C: New test.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-03-21 Martin Liska <mliska@suse.cz>
+
+ PR ipa/84963
+ * gfortran.dg/goacc/pr84963.f90: New test.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-03-13 Martin Liska <mliska@suse.cz>
+
+ PR ipa/84658.
+ * g++.dg/ipa/pr84658.C: New test.
+
+2018-04-23 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ Backport from mainline
+ 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ PR target/83660
+ * gcc.target/powerpc/pr83660.C: New test.
+
+2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ * g++.dg/torture/pr85496.C: New test.
+
+2018-04-20 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/85436
+ * go.dg/pr85436.go: New test.
+
+ Backport from mainline
+ 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/83969
+ * gcc.target/powerpc/pr83969.c: New test.
+
+2018-04-19 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/85464 - missing location for -Wignored-qualifiers diagnostic
+ * g++.dg/diagnostic/pr85464.C: New.
+
+2018-04-18 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR target/85261
+ * gcc.target/arm/fpscr.c: Add call to __builtin_arm_set_fpscr with
+ literal value. Expect 2 MCR instruction. Fix function prototype.
+ Remove volatile keyword.
+
+2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * gcc.target/s390/nobp-no-dwarf2-cfi.c: New test.
+
+2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR target/85203
+ * gcc.target/arm/cmse/cmse-1.c: Tighten cmse_nonsecure_caller RTL scan
+ to match a single insn of the baz function. Move scan directives at
+ the end of the file below the functions they are trying to test for
+ better readability.
+ * gcc.target/arm/cmse/cmse-16.c: New testcase.
+
+2018-04-10 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR target/85056
+ * gcc.target/nvptx/pr85056.c (main): Initialize "sum".
+
+2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ Backport from mainline
+ 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/84748
+ * gcc.c-torture/execute/pr84748.c: New test.
+
+2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * g++.dg/opt/pr85196.C: New test.
+
+2018-04-05 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/85193
+ * gcc.target/i386/pr85193.c: New test.
+
+2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR rtl-optimization/84878
+ * gcc.target/powerpc/pr84878.c: New test.
+
+2018-04-03 Cesar Philippidis <cesar@codesourcery.com>
+
+ Backport from mainline
+ 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR target/85056
+ * testsuite/gcc.target/nvptx/pr85056.c: New test.
+ * testsuite/gcc.target/nvptx/pr85056a.c: New test.
+
+2018-04-02 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/84912
+ * gcc.target/powerpc/extend-divide-1.c (div_weo): Remove test for
+ deleted builtin function.
+ (div_weuo): Likewise.
+ * gcc.target/powerpc/extend-divide-2.c (div_deo): Likewise.
+ (div_deuo): Likewise.
+
+2018-04-02 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-02-08 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/81143
+ * gcc.target/powerpc/pr79799-2.c: Use __LITTLE_ENDIAN__.
+
+2018-03-29 Sebastian Peryt <sebastian.peryt@intel.com>
+
+ PR c++/84783
+ * gcc.target/i386/avx512vl-vpermd-1.c (_mm256_permutexvar_epi32):
+ Test new intrinsic.
+ * gcc.target/i386/avx512vl-vpermq-imm-1.c (_mm256_permutex_epi64):
+ Ditto.
+ * gcc.target/i386/avx512vl-vpermq-var-1.c (_mm256_permutexvar_epi64):
+ Ditto.
+ * gcc.target/i386/avx512f-vpermd-2.c: Do not check for AVX512F_LEN.
+ * gcc.target/i386/avx512f-vpermq-imm-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermq-var-2.c: Ditto.
+
+2018-03-29 Sudakshina Das <sudi.das@arm.com>
+
+ * gcc.target/arm/pr84826.c: Change dg-option to -fstack-check.
+
+ Backport from mainline
+ 2018-03-23 Sudakshina Das <sudi.das@arm.com>
+
+ PR target/84826
+ * gcc.target/arm/pr84826.c: Add dg directive.
+
+ Backport from mainline
+ 2018-03-22 Sudakshina Das <sudi.das@arm.com>
+
+ PR target/84826
+ * gcc.target/arm/pr84826.c: New test.
+
+2018-03-28 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/crypto-builtin-1-runnable: Add
+ p8vector_hw to dg-do run.
+
+2018-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/85084
+ Backport from trunk.
+ * gfortran.dg/matmul_rank_1.f90: New test.
+
+2018-03-28 Sudakshina Das <sudi.das@arm.com>
+ Christophe Lyon <christophe.lyon@linaro.org>
+
+ 2018-03-20 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/81647
+ * gcc.target/aarch64/pr81647.c: Require fenv_exceptions.
+
+ 2018-03-19 Sudakshina Das <sudi.das@arm.com>
+
+ PR target/81647
+ * gcc.target/aarch64/pr81647.c: New.
+
+2018-03-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ Backport from mainline
+ 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/85026
+ * g++.dg/pr85026.C: New test.
+
+2018-03-28 Segher Boessenkool <segher@kernel.crashing.org>
+
+ Backport from mainline
+ 2018-03-08 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/82411
+ * gcc.target/powerpc/ppc-sdata-2.c: Skip if -mno-readonly-in-sdata.
+
+2018-03-27 Sudakshina Das <sudi.das@arm.com>
+
+ Backport from mainline:
+ 2018-03-20 Sudakshina Das <sudi.das@arm.com>
+
+ PR target/82989
+ * gcc.target/arm/pr82989.c: New test.
+
+ Backport from mainline:
+ 2018-03-21 Sudakshina Das <sudi.das@arm.com>
+
+ PR target/82989
+ * gcc.target/arm/pr82989.c: Change dg scan-assembly directives.
+
+2018-03-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ Backport from mainline
+ 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/82518
+ * lib/target-supports.exp (check_effective_target_vect_load_lanes):
+ Disable for armeb targets.
+ * gcc.target/arm/pr82518.c: New test.
+
+2018-03-23 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/crypto-builtin-1-runnable.c: New test file.
+
+2018-03-22 Tom de Vries <tom@codesourcery.com>
+
+ backport from trunk:
+ 2018-03-22 Tom de Vries <tom@codesourcery.com>
+
+ PR tree-optimization/84956
+ * gcc.dg/pr84956.c: New test.
+
+2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85001
+ * gfortran.dg/interface_41.f90: New test.
+
+2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/84931
+ Backport from trunk
+ * gfortran.dg/array_constructor_52.f90: New test.
+
+2018-03-19 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/77414
+ * gfortran.dg/pr77414.f90: New test.
+ * gfortran.dg/internal_references_1.f90: Adjust error message.
+
+2018-03-19 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/65453
+ * gfortran.dg/pr65453.f90: New test.
+
+2018-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from mainline
+ 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/84574
+ * gcc.target/i386/ret-thunk-9.c: Expect __x86_return_thunk
+ label instead of __x86_indirect_thunk label.
+
+2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/78741
+ * gfortran.dg/pr78741.f90: New test.
+
+2018-03-12 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/83939
+ * gfortran.dg/pr83939.f90
+
+2018-03-12 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR tree-optimization/84485
+ * gcc.dg/vect/pr84485.c: New test.
+
+2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/84734
+ * gfortran.dg/pr84734.f90: New test.
+
+2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/prot3.adb: New test.
+ * gnat.dg/prot3_pkg.ad[sb]: New helper.
+
+2018-03-09 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ Backport from mainline
+ 2017-09-13 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ * gcc.target/aarch64/pr63304_1.c: Remove-mno-fix-cortex-a53-843419.
+
+2018-03-08 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/64124
+ PR fortran/70409
+ * gfortran.dg/pr64124.f90: New tests.
+ * gfortran.dg/pr70409.f90: New tests.
+
+2018-03-06 Carl Love <cel@us.ibm.com>
+
+ Backport from mainline
+ 2/16/18 commit 257748 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/p9-vinsert4b-1.c: Remove test file for non-ABI
+ tests.
+ * gcc.target/powerpc/p9-vinsert4b-2.c: Remove test file for non-ABI
+ tests.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-23 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR testsuite/80551
+ * c-c++-common/tsan/race_on_mutex.c: Change regexp to allow
+ __GI___pthread_mutex_init as well.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-02-20 Martin Liska <mliska@suse.cz>
+
+ PR c/84310
+ PR target/79747
+ * gcc.target/i386/pr84310.c: New test.
+ * gcc.target/i386/pr84310-2.c: Likewise.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-01-23 Martin Liska <mliska@suse.cz>
+
+ PR lto/81440
+ * gcc.dg/lto/pr81440.h: New test.
+ * gcc.dg/lto/pr81440_0.c: New test.
+ * gcc.dg/lto/pr81440_1.c: New test.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-27 Martin Liska <mliska@suse.cz>
+
+ PR testsuite/79455
+ * c-c++-common/tsan/race_on_mutex.c: Make the scanned pattern
+ more generic.
+
+2018-03-06 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
+
+ PR lto/83954
+ * gcc.dg/lto/pr83954.h: New testcase.
+ * gcc.dg/lto/pr83954_0.c: New testcase.
+ * gcc.dg/lto/pr83954_1.c: New testcase.
+
+2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/56667
+ * gfortran.dg/implied_do_2.f90: New test.
+ * gfortran.dg/coarray_8.f90: Update for new error message.
+
+2018-03-06 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/81572
+ * gcc.target/powerpc/pr81572.c: New.
+
+2018-03-06 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-02-28 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/84607
+ * gcc.dg/pr84607.c: New testcase.
+
+2018-03-05 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ Backport from trunk.
+
+ 2018-02-16 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ PR target/84371
+ * gcc.target/powerpc/builtins-3.c: Update dg-options and dg-skip-if
+ stanzas.
+ * gcc.target/powerpc/builtins-3.p8.c: Add dg-skip-if stanza.
+ * gcc.target/powerpc/builtins-3.p9.c: Add dg-skip-if stanza.
+
+2018-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84524
+ * gcc.c-torture/execute/pr84524.c: New test.
+ * gcc.target/i386/avx512bw-pr84524.c: New test.
+
+2018-03-04 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83076
+ * gfortran.dg/coarray_45.f90: New test.
+
+ PR fortran/83319
+ * gfortran.dg/coarray_46.f90: New test.
+
+2018-03-03 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/71085
+ * gfortran.dg/pr71085.f90: New test.
+
+2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/51434
+ * gfortran.dg/pr51434.f90: New test.
+
+2018-03-03 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/80965
+ * gfortran.dg/select_type_41.f90: New test.
+
+2018-03-03 Paul Thomas <pault@gcc.gnu.org>
+
+ Backported from trunk.
+ PR fortran/78990
+ * gfortran.dg/class_67.f90: New test.
+
2018-03-03 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
@@ -1587,7 +2657,7 @@
Backported from trunk
PR fortran/80850
- * gfortran.dg/class_64_f90 : New test.
+ * gfortran.dg/class_64_f90: New test.
2017-10-30 Paolo Carlini <paolo.carlini@oracle.com>
@@ -1638,7 +2708,7 @@
Backport from trunk
PR fortran/82312
- * gfortran.dg/typebound_proc_36.f90 : New test.
+ * gfortran.dg/typebound_proc_36.f90: New test.
2017-10-20 Thomas Koenig <tkoenig@gcc.gnu.org>
diff --git a/gcc/testsuite/c-c++-common/gomp/pr85696.c b/gcc/testsuite/c-c++-common/gomp/pr85696.c
new file mode 100644
index 00000000000..798718b563d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr85696.c
@@ -0,0 +1,20 @@
+/* PR c/85696 */
+
+#ifndef __cplusplus
+void
+foo (int n, int a[][n])
+{
+ #pragma omp parallel shared(a) default(none)
+ #pragma omp master
+ a[23][0] = 42;
+}
+#endif
+
+void
+bar (int n, void *p)
+{
+ int (*a)[n] = (int (*)[n]) p;
+ #pragma omp parallel shared(a) default(none)
+ #pragma omp master
+ a[23][0] = 42;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr86025.c b/gcc/testsuite/c-c++-common/gomp/pr86025.c
new file mode 100644
index 00000000000..c1c50799413
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr86025.c
@@ -0,0 +1,20 @@
+/* PR c++/86025 */
+/* { dg-do compile } */
+/* { dg-additional-options "-Wduplicated-branches" } */
+
+int i;
+
+void
+foo (int x)
+{
+ if (x)
+ {
+ #pragma omp critical (foo)
+ i++;
+ }
+ else
+ {
+ #pragma omp critical
+ i++;
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/pr43690.c b/gcc/testsuite/c-c++-common/pr43690.c
index 67c6cb0f88c..8d10744903f 100644
--- a/gcc/testsuite/c-c++-common/pr43690.c
+++ b/gcc/testsuite/c-c++-common/pr43690.c
@@ -6,8 +6,8 @@ void
foo (char *x)
{
asm ("" : : "m" (x++)); /* { dg-error "is not directly addressable" } */
- asm ("" : : "m" (++x)); /* { dg-error "is not directly addressable" } */
+ asm ("" : : "m" (++x)); /* { dg-error "is not directly addressable" "" { target c } } */
asm ("" : : "m" (x--)); /* { dg-error "is not directly addressable" } */
- asm ("" : : "m" (--x)); /* { dg-error "is not directly addressable" } */
+ asm ("" : : "m" (--x)); /* { dg-error "is not directly addressable" "" { target c } } */
asm ("" : : "m" (x + 1)); /* { dg-error "is not directly addressable" } */
}
diff --git a/gcc/testsuite/c-c++-common/pr84873.c b/gcc/testsuite/c-c++-common/pr84873.c
new file mode 100644
index 00000000000..5eb8a8df81d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr84873.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-frounding-math" } */
+
+int
+i1 (int w3, int n9)
+{
+ return w3 >> ((long int)(1 + 0.1) + -!n9);
+}
diff --git a/gcc/testsuite/c-c++-common/pr84999.c b/gcc/testsuite/c-c++-common/pr84999.c
new file mode 100644
index 00000000000..42d53769a3b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr84999.c
@@ -0,0 +1,12 @@
+/* PR c/84999 */
+/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "" } */
+
+typedef __float128 V __attribute__ ((__vector_size__ (2 * sizeof (__float128))));
+V a;
+typeof (a != 0) b; /* { dg-error "could not find an integer type of the same size as" "" { target ia32 } } */
+typeof (a == 0) c; /* { dg-error "could not find an integer type of the same size as" "" { target ia32 } } */
+typeof (a < 0) d; /* { dg-error "could not find an integer type of the same size as" "" { target ia32 } } */
+typeof (a <= 0) e; /* { dg-error "could not find an integer type of the same size as" "" { target ia32 } } */
+typeof (a > 0) f; /* { dg-error "could not find an integer type of the same size as" "" { target ia32 } } */
+typeof (a >= 0) g; /* { dg-error "could not find an integer type of the same size as" "" { target ia32 } } */
diff --git a/gcc/testsuite/c-c++-common/torture/pr85022.c b/gcc/testsuite/c-c++-common/torture/pr85022.c
new file mode 100644
index 00000000000..3ec2c781aa1
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/pr85022.c
@@ -0,0 +1,9 @@
+/* PR inline-asm/85022 */
+
+extern struct B b;
+
+void
+foo ()
+{
+ __asm ("" : "+m" (b));
+}
diff --git a/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c b/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c
index ae30d053c92..2e4b7ac3cb9 100644
--- a/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c
+++ b/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c
@@ -37,9 +37,10 @@ int main() {
}
/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
-/* { dg-output " Atomic read of size 1 at .* by thread T2:(\n|\r\n|\r)" } */
+/* { dg-output " Atomic read of size \[0-9]\+ at .* by thread T2:(\n|\r\n|\r)" } */
/* { dg-output " #0 pthread_mutex_lock.*" } */
/* { dg-output " #1 Thread2.* .*(race_on_mutex.c:22|\\?{2}:0) (.*)" } */
-/* { dg-output " Previous write of size 1 at .* by thread T1:(\n|\r\n|\r)" } */
-/* { dg-output " #0 pthread_mutex_init .* (.)*" } */
-/* { dg-output " #1 Thread1.* .*(race_on_mutex.c:12|\\?{2}:0) .*" } */
+/* { dg-output " Previous write of size \[0-9]\+ at .* by thread T1:(\n|\r\n|\r)" } */
+/* { dg-output "( #0 \[^\n\r\]*(\n|\r\n|\r))?" } */
+/* { dg-output " #\[01\] ((__GI_)?__)?pthread_mutex_init \[^\n\r\]* (.)*" } */
+/* { dg-output " #\[12\] Thread1.* .*(race_on_mutex.c:12|\\?{2}:0) .*" } */
diff --git a/gcc/testsuite/g++.dg/asan/pr78651.C b/gcc/testsuite/g++.dg/asan/pr78651.C
new file mode 100644
index 00000000000..09f1be538c3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/pr78651.C
@@ -0,0 +1,26 @@
+// PR sanitizer/78651
+// { dg-do run }
+// { dg-additional-options "-fpic" { target fpic } }
+
+struct A { };
+
+namespace {
+
+void thisThrows () {
+ throw A();
+}
+
+struct SomeRandomType {};
+}
+
+int main() {
+ try {
+ thisThrows();
+ }
+ catch (SomeRandomType) {
+ throw;
+ }
+ catch (A) {
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/asan/pr85081.C b/gcc/testsuite/g++.dg/asan/pr85081.C
new file mode 100644
index 00000000000..d7dec311450
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/pr85081.C
@@ -0,0 +1,20 @@
+/* PR sanitizer/85081 */
+/* { dg-do run } */
+/* { dg-options "-fopenmp-simd" } */
+/* { dg-require-effective-target fopenmp } */
+
+inline const int& max(const int& a, const int& b)
+{
+ return a < b ? b : a;
+}
+
+int main()
+{
+ #pragma omp simd
+ for ( int i = 0; i < 20; ++i )
+ {
+ const int j = max(i, 1);
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/concepts/auto4.C b/gcc/testsuite/g++.dg/concepts/auto4.C
new file mode 100644
index 00000000000..e80341ec038
--- /dev/null
+++ b/gcc/testsuite/g++.dg/concepts/auto4.C
@@ -0,0 +1,11 @@
+// PR c++/85006
+// { dg-additional-options "-std=c++17 -fconcepts" }
+
+template<typename... Ts> struct A {};
+
+template<typename... Us> A<auto...> foo() { return A{}; }
+
+void bar()
+{
+ foo();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto-60626.C b/gcc/testsuite/g++.dg/cpp0x/auto-60626.C
new file mode 100644
index 00000000000..35671924ea9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto-60626.C
@@ -0,0 +1,6 @@
+// PR c++/60626
+// { dg-do compile { target c++14 } }
+
+struct A {};
+
+void (*A::p)(auto) = 0; // { dg-error "auto|static data member|template" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto51.C b/gcc/testsuite/g++.dg/cpp0x/auto51.C
new file mode 100644
index 00000000000..dfb08336b53
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto51.C
@@ -0,0 +1,9 @@
+// PR c++/84798
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+struct S {
+ static constexpr T value = 0;
+};
+
+constexpr auto x = S<void(*)(auto)>::value; // { dg-error "auto" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-84463.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-84463.C
new file mode 100644
index 00000000000..0743059be53
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-84463.C
@@ -0,0 +1,22 @@
+// PR c++/84463
+// { dg-do compile { target c++11 } }
+
+struct S { int r; const unsigned char s[5]; };
+static constexpr S a[] = { { 0, "abcd" } };
+struct T { const unsigned char s[5]; };
+static constexpr T b[] = { { "abcd" } };
+
+constexpr int
+foo (const unsigned char *x)
+{
+ return x[0];
+}
+
+constexpr static const S *j = &a[0];
+constexpr static const int k = j->s[0];
+constexpr static int l = foo (a[0].s);
+constexpr static int m = foo (j->s);
+constexpr static const T *n = &b[0];
+constexpr static const int o = n->s[0];
+constexpr static int p = foo (b[0].s);
+constexpr static int q = foo (n->s);
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr-1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr-1.C
index e2f7917d36e..ed53fcd69aa 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr-1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr-1.C
@@ -6,7 +6,7 @@
// c++/67376 on gcc-patches for additional background.
// { dg-do compile { target c++11 } }
-// { dg-options "-fdelete-null-pointer-checks -fdump-tree-optimized" }
+// { dg-options "-O1 -fdelete-null-pointer-checks -fdump-tree-optimized" }
// Runtime assert. Used for potentially invalid expressions.
#define RA(e) ((e) ? (void)0 : __builtin_abort ())
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr-2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr-2.C
index aeea87c2ae7..3b3f01adea3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr-2.C
@@ -192,12 +192,11 @@ constexpr bool b11 = ps >= (S*)0;
constexpr S* ps1 = ps;
constexpr S* ps2 = ps1;
-// The following aren't diagnosed due to a bug.
-// constexpr int* pi0 = &((S*)0)->i;
-// constexpr int* pi1 = &((S*)nullptr)->i;
+constexpr int* pi0 = &((S*)0)->i; // { dg-error "null pointer|not a constant" }
+constexpr int* pi1 = &((S*)nullptr)->i; // { dg-error "null pointer|not a constant" }
-constexpr int* pj0 = &((S*)0)->j; // { dg-error "not a constant expression" }
-constexpr int* pj1 = &((S*)nullptr)->j; // { dg-error "not a constant expression" }
+constexpr int* pj0 = &((S*)0)->j; // { dg-error "null pointer|not a constant" }
+constexpr int* pj1 = &((S*)nullptr)->j; // { dg-error "null pointer|not a constant" }
constexpr int* psi = &ps->i; // { dg-error "null pointer|not a constant" }
constexpr int* psj = &ps->j; // { dg-error "null pointer|not a constant" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype67.C b/gcc/testsuite/g++.dg/cpp0x/decltype67.C
new file mode 100644
index 00000000000..e8042ac59e7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype67.C
@@ -0,0 +1,7 @@
+// PR c++/85279
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct A
+{
+ void foo(decltype(T())::Y); // { dg-error {decltype\(T\(\)\)::Y} }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/extern_template-4.C b/gcc/testsuite/g++.dg/cpp0x/extern_template-4.C
new file mode 100644
index 00000000000..9f0c7d720ab
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/extern_template-4.C
@@ -0,0 +1,23 @@
+// PR c++/85470
+// { dg-do compile { target c++11 } }
+
+template <class T>
+struct StaticObject
+{
+ static T& create()
+ {
+ static T t;
+ return t;
+ }
+
+ static T & instance;
+};
+
+template <class T> T & StaticObject<T>::instance = StaticObject<T>::create();
+
+extern template class StaticObject<int>;
+
+void test()
+{
+ StaticObject<int>::instance;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg7.C b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg7.C
deleted file mode 100644
index 636bf1afd88..00000000000
--- a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg7.C
+++ /dev/null
@@ -1,10 +0,0 @@
-// PR c++/84489
-// { dg-do compile { target c++11 } }
-
-template <class T = int, T N = T(), bool B = (N >> 1)>
-T f1() {return 0;}
-
-int main()
-{
- f1(); // Bug here
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg8.C b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg8.C
new file mode 100644
index 00000000000..8d9b2d26f01
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg8.C
@@ -0,0 +1,10 @@
+// PR c++/80227
+// { dg-do compile { target c++11 } }
+
+template <class T>
+int foo (T);
+
+template <class T, class U = T [sizeof (T) - 5]>
+int foo (T, U* = 0);
+
+int i = foo (123);
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-64.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-64.C
new file mode 100644
index 00000000000..c0d48fc88e9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-64.C
@@ -0,0 +1,4 @@
+// PR c++/85140
+// { dg-do compile { target c++11 } }
+
+namespace N alignas() {} // { dg-error "expected" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-defarg2.C b/gcc/testsuite/g++.dg/cpp0x/initlist-defarg2.C
new file mode 100644
index 00000000000..65240355fc3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-defarg2.C
@@ -0,0 +1,8 @@
+// PR c++/82336
+// { dg-do link { target c++11 } }
+
+struct foo { int x = 5; };
+struct bar : foo { bar() = default; };
+struct baz { bar x; };
+void qux(baz = {}){}
+int main() { qux(); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-dependent1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-dependent1.C
new file mode 100644
index 00000000000..6fd2bb379bf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-dependent1.C
@@ -0,0 +1,19 @@
+// PR c++/85815
+// { dg-do compile { target c++11 } }
+
+template<class T>
+class A {
+ static A* INSTANCE;
+ void foobar();
+ void moo() {}
+};
+
+template<class T>
+A<T>* A<T>::INSTANCE = nullptr;
+
+template<class T>
+void A<T>::foobar() {
+ auto x = []() {
+ INSTANCE->moo();
+ };
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept33.C b/gcc/testsuite/g++.dg/cpp0x/noexcept33.C
new file mode 100644
index 00000000000..c5a03de38dd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept33.C
@@ -0,0 +1,28 @@
+// PR c++/86378
+// { dg-do compile { target c++11 } }
+
+struct Pepper {};
+struct Apple { Apple(int) {} };
+
+struct Combination : Apple, Pepper
+{
+ Combination(Pepper p, Apple a)
+ : Apple(a), Pepper(p)
+ {}
+};
+
+struct MyCombination
+{
+ using Spice = Pepper;
+ using Fruit = Apple;
+
+ Combination combination;
+
+ template<typename T>
+ constexpr MyCombination(T&& t)
+ noexcept(noexcept(Combination(Spice(), Fruit(t))))
+ : combination(Spice(), Fruit(t))
+ {}
+};
+
+MyCombination obj(Apple(4));
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi14.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi14.C
new file mode 100644
index 00000000000..aac6fa1c81b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi14.C
@@ -0,0 +1,19 @@
+// PR c++/71638
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall" }
+
+struct A {
+ struct {
+ int i;
+ int &j = i;
+ } b;
+ int a = b.j;
+};
+
+void bar (A);
+
+void
+foo ()
+{
+ bar (A{});
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr85147.C b/gcc/testsuite/g++.dg/cpp0x/pr85147.C
new file mode 100644
index 00000000000..68c0022d80a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr85147.C
@@ -0,0 +1,9 @@
+// PR c++/85147
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct A
+{
+ template<template<...T> class...> struct B {}; // { dg-error "expected|mismatch" }
+};
+
+A<int>::B<> b; // { dg-error "does not name a template type" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for13.C b/gcc/testsuite/g++.dg/cpp0x/range-for13.C
index 100f531f760..7babd713cfb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for13.C
@@ -3,16 +3,6 @@
// { dg-do compile { target c++11 } }
-//These should not be used
-template<typename T> int *begin(T &t)
-{
- T::fail;
-}
-template<typename T> int *end(T &t)
-{
- T::fail;
-}
-
struct container1
{
int *begin();
@@ -87,10 +77,37 @@ struct container10
static function end;
};
+namespace N
+{
+template<typename T> int *begin(T &t)
+{
+ return 0;
+}
+template<typename T> int *end(T &t)
+{
+ return 0;
+}
+struct container11
+{
+ int *begin();
+ //no end
+};
+
+struct container12
+{
+ int *end();
+ //no begin
+};
+
+struct container13
+{
+};
+}
+
void test1()
{
- for (int x : container1()); // { dg-error "member but not" }
- for (int x : container2()); // { dg-error "member but not" }
+ for (int x : container1()); // { dg-error "'begin' was not declared|'end' was not declared" }
+ for (int x : container2()); // { dg-error "'begin' was not declared|'end' was not declared" }
for (int x : container3()); // { dg-error "within this context" }
for (int x : container4()); // { dg-error "cannot be used as a function" }
for (int x : container5()); // { dg-error "invalid use of" }
@@ -99,4 +116,7 @@ void test1()
for (int x : container8());
for (int x : container9()); // { dg-error "within this context" }
for (int x : container10());
+ for (int x : N::container11());
+ for (int x : N::container12());
+ for (int x : N::container13());
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for35.C b/gcc/testsuite/g++.dg/cpp0x/range-for35.C
new file mode 100644
index 00000000000..c77a5af5a44
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for35.C
@@ -0,0 +1,8 @@
+// PR c++/86060
+// { dg-options -Wpedantic }
+
+template <typename T> void foo(T (&a)[8]) {
+ for (int i : a) // { dg-warning "range-based" "" { target c++98_only } }
+ i;
+}
+void fn1() { foo<int>; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for9.C b/gcc/testsuite/g++.dg/cpp0x/range-for9.C
index 6a50ec36c14..eaa5b406880 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for9.C
@@ -5,6 +5,6 @@
void test()
{
int a[] = {0,1,2};
- for (int x : a) // { dg-error "range-based 'for'" }
+ for (int x : a) // { dg-error "range-based 'for'|forming reference" }
;
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae60.C b/gcc/testsuite/g++.dg/cpp0x/sfinae60.C
new file mode 100644
index 00000000000..cfb4dc0b9a7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae60.C
@@ -0,0 +1,25 @@
+// PR c++/78489
+// { dg-do compile { target c++11 } }
+
+template <bool P, class T = void> struct enable_if { using type = T; };
+template <class T> struct enable_if<false, T> {};
+
+template <class Dummy> struct use_type { using type = int; };
+
+template <bool Pred>
+struct get_type {
+ static_assert(Pred, "");
+ using type = int;
+};
+
+template <bool Val,
+ class = typename enable_if<Val>::type, // Evaluation/Substitution should end here
+ class ValT = typename get_type<Val>::type, // This should not be instantiated
+ typename use_type<ValT>::type = 0 // This NTTP causes ValT to be required
+ >
+constexpr bool test(int) { return false; }
+
+template <bool>
+constexpr bool test(long) { return true; }
+
+static_assert(test<false>(0), ""); // should call test(long)
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-nested2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-nested2.C
new file mode 100644
index 00000000000..ce18f99ea50
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-nested2.C
@@ -0,0 +1,9 @@
+// PR c++/84839
+// { dg-do compile { target c++11 } }
+
+template<typename... T>
+struct S {
+ using fptr = void(*)(T... x, decltype(x)... y);
+};
+
+using F = S<int>::fptr;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-nested3.C b/gcc/testsuite/g++.dg/cpp0x/variadic-nested3.C
new file mode 100644
index 00000000000..381ff731c09
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-nested3.C
@@ -0,0 +1,10 @@
+// PR c++/71834
+// { dg-do compile { target c++11 } }
+
+template < typename ... Ts > struct A
+{
+ template < Ts ..., typename U > struct B {};
+};
+
+// should be, e.g.: A < int >::B < 0, int > e;
+A < int >::B < 0 > e; // { dg-error "wrong number of template arguments" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic16.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic16.C
new file mode 100644
index 00000000000..a9292253453
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic16.C
@@ -0,0 +1,8 @@
+// PR c++/64095
+// { dg-do compile { target c++14 } }
+
+void f()
+{
+ [](auto...){}();
+ [](auto&&...){}();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic17.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic17.C
new file mode 100644
index 00000000000..4a7392f93bc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic17.C
@@ -0,0 +1,125 @@
+// PR c++/85118
+// { dg-do compile { target c++14 } }
+
+namespace std
+{
+ template<typename _Tp>
+ struct remove_const
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct remove_const<_Tp const>
+ { typedef _Tp type; };
+
+
+ template<typename _Tp>
+ struct remove_volatile
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct remove_volatile<_Tp volatile>
+ { typedef _Tp type; };
+
+
+ template<typename _Tp>
+ struct remove_cv
+ {
+ typedef typename
+ remove_const<typename remove_volatile<_Tp>::type>::type type;
+ };
+
+ template<typename _Tp>
+ struct remove_reference
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct remove_reference<_Tp&>
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct remove_reference<_Tp&&>
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct decay
+ {
+ using type = typename remove_reference<typename remove_const<_Tp>::type>::type;
+ };
+
+ template<typename _Tp>
+ _Tp&&
+ declval() noexcept;
+
+ template<typename _Tp>
+ constexpr _Tp&&
+ forward(typename std::remove_reference<_Tp>::type& __t) noexcept
+ { return static_cast<_Tp&&>(__t); }
+
+
+ template<typename _Arg>
+ struct _Mu
+ {
+ template<typename _CVArg, typename _Tuple>
+ _CVArg&&
+ operator()(_CVArg&& __arg, _Tuple&) const volatile
+ { return std::forward<_CVArg>(__arg); }
+ };
+
+ template<typename _Functor, typename _Bound_args>
+ struct _Bind
+ {
+ _Functor _M_f;
+ _Bound_args _M_bound_args;
+
+ template<typename _Args, typename _Result
+ = decltype( std::declval<_Functor&>()(
+ _Mu<_Bound_args>()( std::declval<_Bound_args&>(),
+ std::declval<_Args&>() ) ) )>
+ _Result
+ operator()(_Args&& __args) { return {}; }
+
+ template<typename _Args, typename _Result
+ = decltype( std::declval<volatile _Functor&>()(
+ _Mu<_Bound_args>()( std::declval<volatile _Bound_args&>(),
+ std::declval<_Args&>() ) ) )>
+ _Result
+ operator()(_Args&& __args) volatile;
+
+ };
+
+ template<typename _Func, typename _BoundArgs>
+ _Bind<typename decay<_Func>::type, typename decay<_BoundArgs>::type>
+ bind(_Func&& __f, _BoundArgs&& __args)
+ {
+ return {
+ std::forward<_Func>(__f),
+ std::forward<_BoundArgs>(__args)
+ };
+ }
+
+} // namespace std
+
+
+template <typename T>
+bool isOneOf(const T& )
+{
+ return false;
+}
+
+template <typename T, typename FirstType, typename... Tail>
+bool isOneOf(const T& t, const FirstType& firstValue, const Tail&... tail)
+{
+ return t == firstValue || isOneOf(t, tail...);
+}
+
+int main()
+{
+ const auto isOneOfHelper = [](auto&&... params)
+ {
+ return isOneOf(std::forward<decltype(params)>(params)...);
+ };
+
+ auto isO = std::bind(isOneOfHelper, 'o');
+
+ isO('o');
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-mangle-1.C b/gcc/testsuite/g++.dg/cpp1y/lambda-mangle-1.C
index ca0910be503..8f135358465 100644
--- a/gcc/testsuite/g++.dg/cpp1y/lambda-mangle-1.C
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-mangle-1.C
@@ -85,4 +85,4 @@ void Baz ()
// { dg-final { scan-assembler "_Z3eatIZ3FoovEUlPT_PT0_E4_Z3FoovEUlS1_S3_E5_EvRS0_RS2_:" } }
// { dg-final { scan-assembler "_Z3eatIPiZ3BarIsEvvEUlPsPfS3_E_EvRT_RT0_:" } }
// { dg-final { scan-assembler "_Z3eatIPiZ3BarIsEvvEUlPsPT_PT0_E0_EvRS3_RS5_:" } }
-// { dg-final { scan-assembler "_Z3eatIPiZ3BarIsEvvEUlPsPT_zE1_EvRS3_RT0_:" } }
+// { dg-final { scan-assembler "_Z3eatIPiZ3BarIsEvvEUlPsDpPT_E1_EvRT_RT0_:" } }
diff --git a/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr10.C b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr10.C
new file mode 100644
index 00000000000..1dc396d9ca5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr10.C
@@ -0,0 +1,7 @@
+// PR c++/71638
+// { dg-do compile { target c++14 } }
+
+struct {
+ int &&a;
+ int b{a};
+} c[] { { 2 } };
diff --git a/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr11.C b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr11.C
new file mode 100644
index 00000000000..09591df3807
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr11.C
@@ -0,0 +1,12 @@
+// PR c++/85148
+// { dg-do compile { target c++14 } }
+
+template<typename T> struct A
+{
+ T x[1]{(__PTRDIFF_TYPE__)this};
+};
+
+void foo()
+{
+ A<A<__PTRDIFF_TYPE__>> a{};
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr9.C b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr9.C
new file mode 100644
index 00000000000..4e13fc5c9d8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr9.C
@@ -0,0 +1,14 @@
+// PR c++/84927 - ICE with NSDMI and reference
+// { dg-do compile { target c++14 } }
+
+struct A
+{
+ int& r;
+ int i = r;
+};
+
+void foo()
+{
+ int j;
+ A a = A{j};
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60393.C b/gcc/testsuite/g++.dg/cpp1y/pr60393.C
index 27fe2b72296..2ae21ed1147 100644
--- a/gcc/testsuite/g++.dg/cpp1y/pr60393.C
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60393.C
@@ -1,8 +1,7 @@
// PR c++/60393
// { dg-do compile { target c++14 } }
-// { dg-options "" }
-void (*f)(auto) + 0; // { dg-error "expected" }
+void (*f)(auto) + 0; // { dg-error "auto|expected" }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60626.C b/gcc/testsuite/g++.dg/cpp1y/pr60626.C
deleted file mode 100644
index 311464472da..00000000000
--- a/gcc/testsuite/g++.dg/cpp1y/pr60626.C
+++ /dev/null
@@ -1,7 +0,0 @@
-// PR c++/60626
-// { dg-do compile { target c++14 } }
-// { dg-options "" }
-
-struct A {};
-
-void (*A::p)(auto) = 0; // { dg-error "static data member|template" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr84662.C b/gcc/testsuite/g++.dg/cpp1y/pr84662.C
new file mode 100644
index 00000000000..36bd201073e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr84662.C
@@ -0,0 +1,6 @@
+// PR c++/84662
+// { dg-do compile { target c++14 } }
+// { dg-options "" }
+
+double b;
+a (__attribute__((c (0 && int() - ([] {} && b) || auto)))); // { dg-error "expected constructor, destructor, or type conversion before" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr85076.C b/gcc/testsuite/g++.dg/cpp1y/pr85076.C
new file mode 100644
index 00000000000..6d54dea6c01
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr85076.C
@@ -0,0 +1,6 @@
+// PR c++/85076
+// { dg-do compile { target c++14 } }
+
+template<typename> struct A*; // { dg-error "expected unqualified-id before" }
+
+auto a = [](A<auto>) {}; // { dg-error "is not a template|has incomplete type" }
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction50.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction50.C
new file mode 100644
index 00000000000..e8cdd8c710f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction50.C
@@ -0,0 +1,22 @@
+// PR c++/84355
+// { dg-additional-options -std=c++17 }
+
+template <class, class> struct same;
+template <class T> struct same<T,T> {};
+
+template<typename T> struct A
+{
+ template<class U> struct B
+ {
+ B(U);
+ };
+
+ A() {
+ B b(0);
+ same<decltype(b),B<int>>{};
+ }
+};
+
+struct C {};
+
+A<C> a;
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction51.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction51.C
new file mode 100644
index 00000000000..eba7972c3c6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction51.C
@@ -0,0 +1,11 @@
+// PR c++/84937
+// { dg-additional-options -std=c++17 }
+
+template<int, int> struct A {};
+
+template<int I> struct B
+{
+ template<auto J> B(A<I,J>);
+};
+
+B b(A<0,0>{});
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction54.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction54.C
new file mode 100644
index 00000000000..e51398bbbb0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction54.C
@@ -0,0 +1,15 @@
+// PR c++/82152
+// { dg-additional-options -std=c++17 }
+
+struct Base {};
+
+template<typename T>
+struct Derived : public Base {
+ using Base::Base;
+};
+
+Derived() -> Derived< void >;
+
+int main() {
+ Derived x;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-84684.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-84684.C
new file mode 100644
index 00000000000..0e7912d4067
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-84684.C
@@ -0,0 +1,163 @@
+// PR c++/84684
+// { dg-options -std=c++17 }
+
+typedef decltype (sizeof (0)) size_t;
+
+namespace std {
+ template<class _E>
+ struct initializer_list
+ {
+ typedef _E value_type;
+ typedef const _E& reference;
+ typedef const _E& const_reference;
+ typedef size_t size_type;
+ typedef const _E* iterator;
+ typedef const _E* const_iterator;
+ iterator _M_array;
+ size_type _M_len;
+ constexpr initializer_list(const_iterator __a, size_type __l) : _M_array(__a), _M_len(__l) { }
+ constexpr initializer_list() noexcept : _M_array(0), _M_len(0) { }
+ constexpr size_type size() const noexcept { return _M_len; }
+ constexpr const_iterator begin() const noexcept { return _M_array; }
+ constexpr const_iterator end() const noexcept { return begin() + size(); }
+ };
+}
+
+template <typename E, size_t N>
+struct array
+{
+ constexpr E &operator[](size_t n) noexcept { return elems[n]; }
+ constexpr const E &operator[](size_t n) const noexcept { return elems[n]; }
+ constexpr size_t size() const { return N; }
+ E elems[N];
+};
+
+template<typename T>
+constexpr
+inline T
+max (std::initializer_list<T> i)
+{
+ const T *b = i.begin ();
+ const T *e = i.end ();
+ if (b == e) return *b;
+ const T *r = b;
+ while (++b != e)
+ if (*r < *b)
+ r = b;
+ return *r;
+}
+
+template <typename alphabet_type>
+constexpr char to_char(alphabet_type const alph)
+{
+ return alph.to_char();
+}
+
+template <typename ...alphabet_types>
+struct union_composition
+{
+ static constexpr size_t value_size = (alphabet_types::value_size + ... );
+ unsigned char _value;
+ template <size_t fixed_size, typename alphabet_t>
+ static constexpr auto value_to_char_helper(alphabet_t alphabet)
+ {
+ array<char, fixed_size> value_to_char{};
+ for (size_t i = 0u; i < alphabet_t::value_size; ++i)
+ value_to_char[i] = to_char(alphabet.assign_rank(i));
+ return value_to_char;
+ }
+
+ static constexpr auto make_value_to_char()
+ {
+ constexpr auto N = sizeof...(alphabet_types);
+ constexpr array<size_t, N> alphabet_sizes { alphabet_types::value_size... };
+ constexpr size_t fixed_size = max({alphabet_types::value_size...});
+ array value_to_char_tables = array<array<char, fixed_size>, N> {
+ value_to_char_helper<fixed_size>(alphabet_types{})...
+ };
+ array<char, value_size> value_to_char{};
+ for (size_t i = 0u, value = 0u; i < N; ++i)
+ for (size_t k = 0u; k < alphabet_sizes[i]; ++k, ++value)
+ value_to_char[value] = value_to_char_tables[i][k];
+ return value_to_char;
+ }
+};
+
+struct gap
+{
+ constexpr char to_char() const noexcept { return '-'; }
+ constexpr gap & assign_rank([[maybe_unused]] bool const i) noexcept { return *this; }
+ static constexpr size_t value_size{1};
+};
+
+struct dna4
+{
+ constexpr char to_char() const noexcept { return value_to_char[_value]; }
+ constexpr dna4 & assign_rank(unsigned char const c) { _value = c; return *this; }
+ static constexpr size_t value_size{4};
+ static constexpr char value_to_char[value_size] { 'A', 'C', 'G', 'T' };
+ unsigned char _value;
+};
+
+struct dna5
+{
+ constexpr char to_char() const noexcept { return value_to_char[_value]; }
+ constexpr dna5 & assign_rank(unsigned char const c) { _value = c; return *this; }
+ static constexpr size_t value_size{5};
+ static constexpr char value_to_char[value_size] { 'A', 'C', 'G', 'T', 'N' };
+ unsigned char _value;
+};
+
+constexpr array value_to_char1 = union_composition<dna4>::make_value_to_char();
+static_assert(value_to_char1.size() == 4u);
+static_assert(value_to_char1[0] == 'A');
+static_assert(value_to_char1[1] == 'C');
+static_assert(value_to_char1[2] == 'G');
+static_assert(value_to_char1[3] == 'T');
+
+constexpr array value_to_char2 = union_composition<dna4, gap>::make_value_to_char();
+static_assert(value_to_char2.size() == 5u);
+static_assert(value_to_char2[0] == 'A');
+static_assert(value_to_char2[1] == 'C');
+static_assert(value_to_char2[2] == 'G');
+static_assert(value_to_char2[3] == 'T');
+static_assert(value_to_char2[4] == '-');
+
+constexpr array value_to_char3 = union_composition<dna4, gap, dna5>::make_value_to_char();
+static_assert(value_to_char3.size() == 10u);
+static_assert(value_to_char3[0] == 'A');
+static_assert(value_to_char3[1] == 'C');
+static_assert(value_to_char3[2] == 'G');
+static_assert(value_to_char3[3] == 'T');
+static_assert(value_to_char3[4] == '-');
+static_assert(value_to_char3[5] == 'A');
+static_assert(value_to_char3[6] == 'C');
+static_assert(value_to_char3[7] == 'G');
+static_assert(value_to_char3[8] == 'T');
+static_assert(value_to_char3[9] == 'N');
+
+constexpr array value_to_char4 = union_composition<dna5, gap, dna4>::make_value_to_char();
+static_assert(value_to_char4.size() == 10u);
+static_assert(value_to_char4[0] == 'A');
+static_assert(value_to_char4[1] == 'C');
+static_assert(value_to_char4[2] == 'G');
+static_assert(value_to_char4[3] == 'T');
+static_assert(value_to_char4[4] == 'N');
+static_assert(value_to_char4[5] == '-');
+static_assert(value_to_char4[6] == 'A');
+static_assert(value_to_char4[7] == 'C');
+static_assert(value_to_char4[8] == 'G');
+static_assert(value_to_char4[9] == 'T');
+
+constexpr array value_to_char5 = union_composition<gap, dna4, dna5>::make_value_to_char();
+static_assert(value_to_char5.size() == 10u);
+static_assert(value_to_char5[0] == '-');
+static_assert(value_to_char5[1] == 'A');
+static_assert(value_to_char5[2] == 'C');
+static_assert(value_to_char5[3] == 'G');
+static_assert(value_to_char5[4] == 'T');
+static_assert(value_to_char5[5] == 'A');
+static_assert(value_to_char5[6] == 'C');
+static_assert(value_to_char5[7] == 'G');
+static_assert(value_to_char5[8] == 'T');
+static_assert(value_to_char5[9] == 'N');
diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-if13.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-if13.C
new file mode 100644
index 00000000000..9a9053c3305
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-if13.C
@@ -0,0 +1,11 @@
+// PR c++/84854
+// { dg-options -std=c++17 }
+
+constexpr int foo () { return 1; }
+constexpr int foo (int) { return 2; }
+
+template <typename>
+void a()
+{
+ if constexpr(foo) { };
+}
diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp10.C b/gcc/testsuite/g++.dg/cpp1z/decomp10.C
index f27cbfbc0d9..95d8bf6364e 100644
--- a/gcc/testsuite/g++.dg/cpp1z/decomp10.C
+++ b/gcc/testsuite/g++.dg/cpp1z/decomp10.C
@@ -20,7 +20,7 @@ void f3() { auto [ x ] = a3; } // { dg-error "get" }
struct A3a { int i,j; int get(); } a3a;
template<> struct std::tuple_size<A3a> { enum { value = 1 }; };
-void f3a() { auto [ x ] = a3a; } // { dg-error "get<0>" }
+void f3a() { auto [ x ] = a3a; } // { dg-error "get" }
struct A3b { int i,j; } a3b;
int get(A3b&&);
diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp37.C b/gcc/testsuite/g++.dg/cpp1z/decomp37.C
new file mode 100644
index 00000000000..dc47908cddf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/decomp37.C
@@ -0,0 +1,62 @@
+// { dg-additional-options -std=c++17 }
+// { dg-do compile }
+
+#include <memory>
+#include <tuple>
+#include <string>
+
+struct X : private std::shared_ptr<int>
+{
+ std::string fun_payload;
+};
+
+template<int N> std::string& get(X& x)
+{
+ if constexpr(N==0) return x.fun_payload;
+}
+
+namespace std {
+ template<> class tuple_size<X> : public std::integral_constant<int, 1> {};
+ template<> class tuple_element<0, X> {public: using type = std::string;};
+}
+
+struct X2 : private std::shared_ptr<int>
+{
+ int fun_payload;
+ template <class T> void get();
+};
+
+template<int N> int& get(X2& x)
+{
+ if constexpr(N==0) return x.fun_payload;
+}
+
+namespace std {
+ template<> class tuple_size<X2> : public std::integral_constant<int, 1> {};
+ template<> class tuple_element<0, X2> {public: using type = int;};
+}
+
+class X3
+{
+ double fun_payload;
+public:
+ template <int N> double& get()
+ {
+ if constexpr(N==0) return fun_payload;
+ }
+};
+
+namespace std {
+ template<> class tuple_size<X3> : public std::integral_constant<int, 1> {};
+ template<> class tuple_element<0, X3> {public: using type = double;};
+}
+
+int main()
+{
+ X x;
+ auto& [b1] = x;
+ X2 x2;
+ auto& [b2] = x2;
+ X3 x3;
+ auto& [b3] = x3;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp38.C b/gcc/testsuite/g++.dg/cpp1z/decomp38.C
new file mode 100644
index 00000000000..fc69c02e4d3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/decomp38.C
@@ -0,0 +1,48 @@
+// { dg-additional-options -std=c++17 }
+// { dg-do compile }
+
+class X
+{
+ int a, b;
+ void f()
+ {
+ auto[x,y] = *this;
+ }
+};
+
+class X2
+{
+ int a, b;
+ void f(X2& other)
+ {
+ auto[x,y] = other;
+ }
+};
+
+struct X3
+{
+ friend void foo();
+private:
+ int a;
+};
+
+void foo()
+{
+ X3 x;
+ auto [a] = x;
+}
+
+struct X4
+{
+ int a;
+};
+
+struct X5 : private X4
+{
+ friend void foo2();
+};
+
+void foo2() {
+ X5 x;
+ auto [a] = x;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp4.C b/gcc/testsuite/g++.dg/cpp1z/decomp4.C
index bc85263e986..30068592553 100644
--- a/gcc/testsuite/g++.dg/cpp1z/decomp4.C
+++ b/gcc/testsuite/g++.dg/cpp1z/decomp4.C
@@ -18,10 +18,10 @@ test (A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i)
// { dg-warning "decomposition declaration only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
auto [ k ] { b }; // { dg-error "cannot decompose class type 'B' because it has an anonymous union member" }
// { dg-warning "decomposition declaration only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
- auto [ l, l2 ] = c; // { dg-error "cannot decompose non-public member 'C::b' of 'C'" }
+ auto [ l, l2 ] = c; // { dg-error "cannot decompose inaccessible member 'C::b' of 'C'" }
// { dg-warning "decomposition declaration only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
auto [ m ] = d; // { dg-warning "decomposition declaration only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } }
- auto [ n ] { e }; // { dg-error "cannot decompose non-public member 'E::a' of 'E'" }
+ auto [ n ] { e }; // { dg-error "cannot decompose inaccessible member 'E::a' of 'E'" }
// { dg-warning "decomposition declaration only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } .-1 }
auto [ o ] { f }; // { dg-warning "decomposition declaration only available with -std=c..1z or -std=gnu..1z" "" { target c++14_down } }
auto & [ p ] { g }; // { dg-error "cannot decompose class type 'G': both it and its base class 'F' have non-static data members" }
diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp41.C b/gcc/testsuite/g++.dg/cpp1z/decomp41.C
new file mode 100644
index 00000000000..1ce836bd6dd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/decomp41.C
@@ -0,0 +1,9 @@
+// PR c++/85208
+// { dg-do compile { target c++11 } }
+// { dg-require-weak "" }
+// { dg-options "" }
+
+#pragma weak _ZDC1d1e1fE
+struct A { int i, j, k; };
+auto [a, b, c] = A (); // { dg-warning "decomposition declaration only available with" "" { target c++14_down } }
+auto [d, e, f] = A (); // { dg-warning "decomposition declaration only available with" "" { target c++14_down } }
diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp42.C b/gcc/testsuite/g++.dg/cpp1z/decomp42.C
new file mode 100644
index 00000000000..22c68ebd3a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/decomp42.C
@@ -0,0 +1,18 @@
+// PR c++/85210
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+struct A { int i; };
+
+template <int>
+void
+foo (int j)
+{
+ auto [j] = A{j}; // { dg-error "shadows a parameter" }
+} // { dg-warning "decomposition declaration only available with" "" { target c++14_down } .-1 }
+
+void
+bar ()
+{
+ foo<0> (0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1z/desig7.C b/gcc/testsuite/g++.dg/cpp1z/desig7.C
new file mode 100644
index 00000000000..83688375f78
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/desig7.C
@@ -0,0 +1,18 @@
+// PR c++/84874
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+struct A { int a, b; };
+struct B { A d; };
+
+void
+foo (B *x)
+{
+ *x = { .d = { .b = 5 } }; // { dg-message "non-trivial designated initializers not supported" }
+}
+
+void
+bar (A *x)
+{
+ *x = { .b = 6 }; // { dg-message "non-trivial designated initializers not supported" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1z/desig8.C b/gcc/testsuite/g++.dg/cpp1z/desig8.C
new file mode 100644
index 00000000000..a6fc1600f5a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/desig8.C
@@ -0,0 +1,18 @@
+// PR c++/84874
+// { dg-do compile { target c++1z } }
+// { dg-options "" }
+
+struct A { int a; struct { int b; }; };
+struct B { A d; };
+
+void
+foo (B *x)
+{
+ *x = { .d = { .b = 5 } }; // { dg-message "non-trivial designated initializers not supported" }
+}
+
+void
+bar (A *x)
+{
+ *x = { .b = 6 }; // { dg-message "non-trivial designated initializers not supported" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1z/noexcept-type19.C b/gcc/testsuite/g++.dg/cpp1z/noexcept-type19.C
new file mode 100644
index 00000000000..2fc2b033ba6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/noexcept-type19.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++11 } }
+
+#include "noexcept-type19.h"
+
+extern "C" void *malloc (size_t);
+
+template<class T> void f(T*);
+
+int main()
+{
+ f<decltype(malloc)>(operator new);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1z/noexcept-type19.h b/gcc/testsuite/g++.dg/cpp1z/noexcept-type19.h
new file mode 100644
index 00000000000..33a29357e7f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/noexcept-type19.h
@@ -0,0 +1,4 @@
+#pragma GCC system_header
+
+typedef decltype(sizeof(0)) size_t;
+extern "C" void *malloc (size_t) throw();
diff --git a/gcc/testsuite/g++.dg/diagnostic/pr85464.C b/gcc/testsuite/g++.dg/diagnostic/pr85464.C
new file mode 100644
index 00000000000..ee8b65185e5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/pr85464.C
@@ -0,0 +1,5 @@
+// { dg-options "-Wignored-qualifiers" }
+struct Test {
+ operator int const(); // { dg-warning "type qualifiers ignored" }
+ operator int const() const; // { dg-warning "type qualifiers ignored" }
+};
diff --git a/gcc/testsuite/g++.dg/ext/asm14.C b/gcc/testsuite/g++.dg/ext/asm14.C
new file mode 100644
index 00000000000..f7f61aabd93
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/asm14.C
@@ -0,0 +1,10 @@
+// PR c++/85659
+// { dg-do compile }
+
+struct S { S (); ~S (); int s; };
+
+void
+foo (S &s)
+{
+ __asm volatile ("" : "+m,r" (s) : : "memory");
+}
diff --git a/gcc/testsuite/g++.dg/ext/asm15.C b/gcc/testsuite/g++.dg/ext/asm15.C
new file mode 100644
index 00000000000..c4946ddc536
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/asm15.C
@@ -0,0 +1,10 @@
+// PR c++/85659
+// { dg-do compile }
+
+struct S { S (); ~S (); int s; };
+
+void
+foo (S &s)
+{
+ __asm volatile ("" : "+r" (s) : : "memory"); // { dg-error "" }
+}
diff --git a/gcc/testsuite/g++.dg/ext/asm16.C b/gcc/testsuite/g++.dg/ext/asm16.C
new file mode 100644
index 00000000000..565cbb33e5f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/asm16.C
@@ -0,0 +1,10 @@
+// PR c++/85659
+// { dg-do compile }
+
+struct S { S (); ~S (); int s[64]; } s;
+
+void
+foo ()
+{
+ __asm volatile ("" : "=r" (s) : : "memory"); // { dg-error "" }
+}
diff --git a/gcc/testsuite/g++.dg/ext/atomic-4.C b/gcc/testsuite/g++.dg/ext/atomic-4.C
new file mode 100644
index 00000000000..1eba11773e9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/atomic-4.C
@@ -0,0 +1,9 @@
+// PR inline-asm/85172
+// { dg-do compile }
+// { dg-options "" }
+
+int
+foo (int *p)
+{
+ return !__atomic_always_lock_free (4, ({ __asm (""); p; }));
+}
diff --git a/gcc/testsuite/g++.dg/ext/attr-noinline-4.C b/gcc/testsuite/g++.dg/ext/attr-noinline-4.C
new file mode 100644
index 00000000000..27c7ae80fec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attr-noinline-4.C
@@ -0,0 +1,10 @@
+// PR c++/84665
+
+struct S {} a[1];
+
+template <int N>
+void
+foo ()
+{
+ __attribute__ ((noinline (a[0]))) int c = 0; // { dg-error "wrong number of arguments" }
+}
diff --git a/gcc/testsuite/g++.dg/ext/builtin12.C b/gcc/testsuite/g++.dg/ext/builtin12.C
new file mode 100644
index 00000000000..1d6bb75cd77
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/builtin12.C
@@ -0,0 +1,10 @@
+// PR c++/85113
+// { dg-do compile { target c++14 } }
+
+template<bool> struct A {};
+
+constexpr int foo()
+{
+ A<__builtin_constant_p(0)> a{};
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ext/builtin13.C b/gcc/testsuite/g++.dg/ext/builtin13.C
new file mode 100644
index 00000000000..7007fe8a6ef
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/builtin13.C
@@ -0,0 +1,9 @@
+// PR inline-asm/85172
+// { dg-do compile }
+// { dg-options "" }
+
+int
+foo ()
+{
+ return !__builtin_constant_p (({ __asm (""); 0; }));
+}
diff --git a/gcc/testsuite/g++.dg/ext/offsetof2.C b/gcc/testsuite/g++.dg/ext/offsetof2.C
new file mode 100644
index 00000000000..647cf8d0b77
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/offsetof2.C
@@ -0,0 +1,6 @@
+// PR c++/85662
+// { dg-do compile { target c++11 } }
+
+struct S { unsigned long x[31]; };
+struct T { bool b; S f; };
+static_assert (__builtin_offsetof (T, f.x[31 - 1]) == __builtin_offsetof (T, f.x[30]), "");
diff --git a/gcc/testsuite/g++.dg/ext/offsetof3.C b/gcc/testsuite/g++.dg/ext/offsetof3.C
new file mode 100644
index 00000000000..6bf4c506fe3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/offsetof3.C
@@ -0,0 +1,5 @@
+// PR c++/85662
+// { dg-do compile { target c++11 } }
+// { dg-options "-O2" }
+
+#include "offsetof2.C"
diff --git a/gcc/testsuite/g++.dg/ext/visibility/lambda1.C b/gcc/testsuite/g++.dg/ext/visibility/lambda1.C
new file mode 100644
index 00000000000..359f8e4af5a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/visibility/lambda1.C
@@ -0,0 +1,14 @@
+// PR c++/85646
+// { dg-do compile { target c++11 } }
+// { dg-additional-options -fvisibility=hidden }
+
+template<typename T>
+void foo() {
+ struct inner {
+ inner() {
+ (void)([this] { });
+ }
+ };
+}
+
+int main() { foo<int>(); }
diff --git a/gcc/testsuite/g++.dg/ext/vla18.C b/gcc/testsuite/g++.dg/ext/vla18.C
new file mode 100644
index 00000000000..31a1bb32f1a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vla18.C
@@ -0,0 +1,19 @@
+// PR c++/84767
+// { dg-do compile }
+// { dg-options "" }
+
+int v[1][10];
+
+struct A
+{
+ A (int);
+};
+
+A::A (int i)
+{
+ typedef int T[1][i];
+ T *x = (T *) v;
+ (*x)[0][0] = 0;
+}
+
+A a = 10;
diff --git a/gcc/testsuite/g++.dg/gomp/pr84791.C b/gcc/testsuite/g++.dg/gomp/pr84791.C
new file mode 100644
index 00000000000..4e6d3b8fd44
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr84791.C
@@ -0,0 +1,15 @@
+// PR c++/84791
+// { dg-do compile }
+
+typedef int I;
+
+template <int>
+void
+foo ()
+{
+ I i;
+ #pragma omp parallel reduction (I::I: i) // { dg-error "'I' is not a class, namespace, or enumeration" "" { target c++11 } }
+ ; // { dg-error "'I' is not a class or namespace" "" { target c++98_only } .-1 }
+}
+
+template void foo<0> ();
diff --git a/gcc/testsuite/g++.dg/inherit/covariant22.C b/gcc/testsuite/g++.dg/inherit/covariant22.C
new file mode 100644
index 00000000000..26c96e6abfc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/covariant22.C
@@ -0,0 +1,19 @@
+// PR c++/85068
+// { dg-do compile }
+
+struct A;
+
+struct B
+{
+ virtual A *foo (); // { dg-error "overriding" }
+};
+
+struct C : virtual B
+{
+ virtual C *foo (); // { dg-error "invalid covariant return type for" }
+};
+
+struct D : C
+{
+ virtual C *foo ();
+};
diff --git a/gcc/testsuite/g++.dg/init/new44.C b/gcc/testsuite/g++.dg/init/new44.C
index ab6e3484cc8..4ab73209e22 100644
--- a/gcc/testsuite/g++.dg/init/new44.C
+++ b/gcc/testsuite/g++.dg/init/new44.C
@@ -87,10 +87,10 @@ test_one_dim_short_array ()
static void __attribute__ ((used))
test_two_dim_char_array ()
{
- p = new char [1][MAX]; // { dg-error "size of unnamed array" }
- p = new char [1][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new char [1][MAX - 2]; // { dg-error "size of unnamed array" }
- p = new char [1][MAX - 99]; // { dg-error "size of unnamed array" }
+ p = new char [1][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][MAX - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][MAX - 99]; // { dg-error "size of (unnamed )?array" }
p = new char [1][MAX / 2]; // { dg-error "size of array" }
p = new char [1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new char [1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -104,18 +104,18 @@ test_two_dim_char_array ()
p = new char [1][MAX / 2 - 7]; // okay
p = new char [1][MAX / 2 - 8]; // okay
- p = new char [2][MAX]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX - 2]; // { dg-error "size of (unnamed )?array" }
p = new char [2][MAX / 2]; // { dg-error "size of array" }
p = new char [2][MAX / 2 - 1]; // { dg-error "size of array" }
p = new char [2][MAX / 2 - 2]; // { dg-error "size of array" }
p = new char [2][MAX / 2 - 7]; // { dg-error "size of array" }
p = new char [2][MAX / 2 - 8]; // { dg-error "size of array" }
- p = new char [MAX][MAX]; // { dg-error "size of unnamed array" }
- p = new char [MAX][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new char [MAX][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new char [MAX][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new char [MAX][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new char [MAX][MAX - 2]; // { dg-error "size of (unnamed )?array" }
p = new char [MAX][MAX / 2]; // { dg-error "size of array" }
p = new char [MAX][MAX / 2 - 1]; // { dg-error "size of array" }
p = new char [MAX][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -142,10 +142,10 @@ test_two_dim_char_array ()
static __attribute__ ((used)) void
test_three_dim_char_array ()
{
- p = new char [1][1][MAX]; // { dg-error "size of unnamed array" }
- p = new char [1][1][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new char [1][1][MAX - 2]; // { dg-error "size of unnamed array" }
- p = new char [1][1][MAX - 99]; // { dg-error "size of unnamed array" }
+ p = new char [1][1][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][1][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][1][MAX - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][1][MAX - 99]; // { dg-error "size of (unnamed )?array" }
p = new char [1][1][MAX / 2]; // { dg-error "size of array" }
p = new char [1][1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new char [1][1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -159,19 +159,19 @@ test_three_dim_char_array ()
p = new char [1][1][MAX / 2 - 7]; // okay
p = new char [1][1][MAX / 2 - 8]; // okay
- p = new char [1][2][MAX]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX - 2]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX - 99]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX / 2]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX / 2 - 1]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX / 2 - 2]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX / 2 - 3]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX / 2 - 4]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX / 2 - 5]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX / 2 - 6]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX / 2 - 7]; // { dg-error "size of unnamed array" }
- p = new char [1][2][MAX / 2 - 8]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX - 99]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX / 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX / 2 - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX / 2 - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX / 2 - 3]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX / 2 - 4]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX / 2 - 5]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX / 2 - 6]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX / 2 - 7]; // { dg-error "size of (unnamed )?array" }
+ p = new char [1][2][MAX / 2 - 8]; // { dg-error "size of (unnamed )?array" }
p = new char [1][2][MAX / 4]; // { dg-error "size of array" }
// Avoid exercising data model-dependent expressions.
@@ -181,10 +181,10 @@ test_three_dim_char_array ()
p = new char [1][2][MAX / 4 - 3]; // okay
p = new char [1][2][MAX / 4 - 4]; // okay
- p = new char [2][1][MAX]; // { dg-error "size of unnamed array" }
- p = new char [2][1][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new char [2][1][MAX - 2]; // { dg-error "size of unnamed array" }
- p = new char [2][1][MAX - 99]; // { dg-error "size of unnamed array" }
+ p = new char [2][1][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][1][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][1][MAX - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][1][MAX - 99]; // { dg-error "size of (unnamed )?array" }
p = new char [2][1][MAX / 2]; // { dg-error "size of array" }
p = new char [2][1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new char [2][1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -203,19 +203,19 @@ test_three_dim_char_array ()
p = new char [2][1][MAX / 4 - 3]; // okay
p = new char [2][1][MAX / 4 - 4]; // okay
- p = new char [2][2][MAX]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX - 2]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX - 99]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX / 2]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX / 2 - 1]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX / 2 - 2]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX / 2 - 3]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX / 2 - 4]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX / 2 - 5]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX / 2 - 6]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX / 2 - 7]; // { dg-error "size of unnamed array" }
- p = new char [2][2][MAX / 2 - 8]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX - 99]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX / 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX / 2 - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX / 2 - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX / 2 - 3]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX / 2 - 4]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX / 2 - 5]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX / 2 - 6]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX / 2 - 7]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][2][MAX / 2 - 8]; // { dg-error "size of (unnamed )?array" }
p = new char [2][2][MAX / 4]; // { dg-error "size of array" }
p = new char [2][2][MAX / 4 - 1]; // { dg-error "size of array" }
p = new char [2][2][MAX / 4 - 2]; // { dg-error "size of array" }
@@ -227,19 +227,19 @@ test_three_dim_char_array ()
p = new char [2][2][MAX / 8 - 2];
p = new char [2][2][MAX / 8 - 3];
- p = new char [2][MAX][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX - 1][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX - 2][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX - 99][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX / 2][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX / 2 - 1][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX / 2 - 2][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX / 2 - 3][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX / 2 - 4][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX / 2 - 5][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX / 2 - 6][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX / 2 - 7][2]; // { dg-error "size of unnamed array" }
- p = new char [2][MAX / 2 - 8][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX - 1][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX - 2][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX - 99][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX / 2][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX / 2 - 1][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX / 2 - 2][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX / 2 - 3][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX / 2 - 4][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX / 2 - 5][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX / 2 - 6][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX / 2 - 7][2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [2][MAX / 2 - 8][2]; // { dg-error "size of (unnamed )?array" }
p = new char [2][MAX / 4][2]; // { dg-error "size of array" }
p = new char [2][MAX / 4 - 1][2]; // { dg-error "size of array" }
p = new char [2][MAX / 4 - 2][2]; // { dg-error "size of array" }
@@ -275,11 +275,11 @@ test_three_dim_char_array ()
p = new char [MAX / 8 - 2][2][2];
p = new char [MAX / 8 - 3][2][2];
- p = new char [MAX][MAX][MAX]; // { dg-error "size of unnamed array" }
- p = new char [MAX][MAX][MAX / 2]; // { dg-error "size of unnamed array" }
- p = new char [MAX][MAX / 2][MAX]; // { dg-error "size of unnamed array" }
- p = new char [MAX][MAX / 2][MAX / 2]; // { dg-error "size of unnamed array" }
- p = new char [MAX / 2][MAX / 2][MAX / 2]; // { dg-error "size of unnamed array" }
+ p = new char [MAX][MAX][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new char [MAX][MAX][MAX / 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [MAX][MAX / 2][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new char [MAX][MAX / 2][MAX / 2]; // { dg-error "size of (unnamed )?array" }
+ p = new char [MAX / 2][MAX / 2][MAX / 2]; // { dg-error "size of (unnamed )?array" }
}
// Exercise new expression with N-dimensional arrays where N is
@@ -342,10 +342,10 @@ test_one_dim_byte_array (void *p)
static void __attribute__ ((used))
test_placement_two_dim_byte_struct_array (void *p)
{
- p = new (p) B [1][MAX]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][MAX - 2]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][MAX - 99]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][MAX - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][MAX - 99]; // { dg-error "size of (unnamed )?array" }
p = new (p) B [1][MAX / 2]; // { dg-error "size of array" }
p = new (p) B [1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new (p) B [1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -359,18 +359,18 @@ test_placement_two_dim_byte_struct_array (void *p)
p = new (p) B [1][MAX / 2 - 7]; // okay
p = new (p) B [1][MAX / 2 - 8]; // okay
- p = new (p) B [2][MAX]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX - 2]; // { dg-error "size of (unnamed )?array" }
p = new (p) B [2][MAX / 2]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 2 - 1]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 2 - 2]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 2 - 7]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 2 - 8]; // { dg-error "size of array" }
- p = new (p) B [MAX][MAX]; // { dg-error "size of unnamed array" }
- p = new (p) B [MAX][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new (p) B [MAX][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [MAX][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [MAX][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [MAX][MAX - 2]; // { dg-error "size of (unnamed )?array" }
p = new (p) B [MAX][MAX / 2]; // { dg-error "size of array" }
p = new (p) B [MAX][MAX / 2 - 1]; // { dg-error "size of array" }
p = new (p) B [MAX][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -397,10 +397,10 @@ test_placement_two_dim_byte_struct_array (void *p)
static __attribute__ ((used)) void
test_placement_three_dim_byte_struct_array (void *p)
{
- p = new (p) B [1][1][MAX]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][1][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][1][MAX - 2]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][1][MAX - 99]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][1][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][1][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][1][MAX - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][1][MAX - 99]; // { dg-error "size of (unnamed )?array" }
p = new (p) B [1][1][MAX / 2]; // { dg-error "size of array" }
p = new (p) B [1][1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new (p) B [1][1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -414,19 +414,19 @@ test_placement_three_dim_byte_struct_array (void *p)
p = new (p) B [1][1][MAX / 2 - 7]; // okay
p = new (p) B [1][1][MAX / 2 - 8]; // okay
- p = new (p) B [1][2][MAX]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX - 2]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX - 99]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX / 2]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX / 2 - 1]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX / 2 - 2]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX / 2 - 3]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX / 2 - 4]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX / 2 - 5]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX / 2 - 6]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX / 2 - 7]; // { dg-error "size of unnamed array" }
- p = new (p) B [1][2][MAX / 2 - 8]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX - 99]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX / 2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX / 2 - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX / 2 - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX / 2 - 3]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX / 2 - 4]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX / 2 - 5]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX / 2 - 6]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX / 2 - 7]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [1][2][MAX / 2 - 8]; // { dg-error "size of (unnamed )?array" }
p = new (p) B [1][2][MAX / 4]; // { dg-error "size of array" }
// Avoid exercising data model-dependent expressions.
@@ -436,10 +436,10 @@ test_placement_three_dim_byte_struct_array (void *p)
p = new (p) B [1][2][MAX / 4 - 3]; // okay
p = new (p) B [1][2][MAX / 4 - 4]; // okay
- p = new (p) B [2][1][MAX]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][1][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][1][MAX - 2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][1][MAX - 99]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][1][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][1][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][1][MAX - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][1][MAX - 99]; // { dg-error "size of (unnamed )?array" }
p = new (p) B [2][1][MAX / 2]; // { dg-error "size of array" }
p = new (p) B [2][1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new (p) B [2][1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -458,19 +458,19 @@ test_placement_three_dim_byte_struct_array (void *p)
p = new (p) B [2][1][MAX / 4 - 3]; // okay
p = new (p) B [2][1][MAX / 4 - 4]; // okay
- p = new (p) B [2][2][MAX]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX - 1]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX - 2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX - 99]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX / 2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX / 2 - 1]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX / 2 - 2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX / 2 - 3]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX / 2 - 4]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX / 2 - 5]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX / 2 - 6]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX / 2 - 7]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][2][MAX / 2 - 8]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX - 99]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX / 2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX / 2 - 1]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX / 2 - 2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX / 2 - 3]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX / 2 - 4]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX / 2 - 5]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX / 2 - 6]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX / 2 - 7]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][2][MAX / 2 - 8]; // { dg-error "size of (unnamed )?array" }
p = new (p) B [2][2][MAX / 4]; // { dg-error "size of array" }
p = new (p) B [2][2][MAX / 4 - 1]; // { dg-error "size of array" }
p = new (p) B [2][2][MAX / 4 - 2]; // { dg-error "size of array" }
@@ -482,19 +482,19 @@ test_placement_three_dim_byte_struct_array (void *p)
p = new (p) B [2][2][MAX / 8 - 2];
p = new (p) B [2][2][MAX / 8 - 3];
- p = new (p) B [2][MAX][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX - 1][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX - 2][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX - 99][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX / 2][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX / 2 - 1][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX / 2 - 2][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX / 2 - 3][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX / 2 - 4][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX / 2 - 5][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX / 2 - 6][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX / 2 - 7][2]; // { dg-error "size of unnamed array" }
- p = new (p) B [2][MAX / 2 - 8][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX - 1][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX - 2][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX - 99][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX / 2][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX / 2 - 1][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX / 2 - 2][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX / 2 - 3][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX / 2 - 4][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX / 2 - 5][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX / 2 - 6][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX / 2 - 7][2]; // { dg-error "size of (unnamed )?array" }
+ p = new (p) B [2][MAX / 2 - 8][2]; // { dg-error "size of (unnamed )?array" }
p = new (p) B [2][MAX / 4][2]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 4 - 1][2]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 4 - 2][2]; // { dg-error "size of array" }
diff --git a/gcc/testsuite/g++.dg/init/struct2.C b/gcc/testsuite/g++.dg/init/struct2.C
index 85aacc6fa09..4396febdc46 100644
--- a/gcc/testsuite/g++.dg/init/struct2.C
+++ b/gcc/testsuite/g++.dg/init/struct2.C
@@ -15,7 +15,7 @@ void saveOrLoad() {
};
SaveLoadEntry trackEntries = {
- ((long) (__SIZE_TYPE__) (&((Track *) 42)->soundName[0])) - 42,
+ ((int) (__SIZE_TYPE__) (&((Track *) 42)->soundName[0])) - 42,
0, 1
};
saveLoadEntries(&trackEntries);
diff --git a/gcc/testsuite/g++.dg/ipa/pr84658.C b/gcc/testsuite/g++.dg/ipa/pr84658.C
new file mode 100644
index 00000000000..6846e1832bd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr84658.C
@@ -0,0 +1,30 @@
+/* PR ipa/84658 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fmerge-all-constants -std=c++11" } */
+
+const int kTestCasesFoo[] = { 0, 1, 2, 3, 4, 5, 8, 15, 16, 17, 512, 1020, 1021, 1022, 1023, 1024 };
+const int kTestCasesBar[] = { 0, 1, 2, 3, 4, 5, 8, 15, 16, 17, 512, 1020, 1021, 1022, 1023, 1024 };
+
+void Foo() {
+ __builtin_printf("foo:");
+ for (int count : kTestCasesFoo) {
+ __builtin_printf("%d,", count);
+ }
+ __builtin_printf(";\n");
+}
+
+void Bar() {
+ __builtin_printf("bar:");
+ for (int count : kTestCasesBar) {
+ __builtin_printf("%d,", count);
+ }
+ __builtin_printf(";\n");
+}
+
+int main() {
+ Foo();
+ Bar();
+}
+
+/* { dg-output "foo:0,1,2,3,4,5,8,15,16,17,512,1020,1021,1022,1023,1024,;(\n|\n\r|\r)*" } */
+/* { dg-output "bar:0,1,2,3,4,5,8,15,16,17,512,1020,1021,1022,1023,1024,;(\n|\n\r|\r)*" } */
diff --git a/gcc/testsuite/g++.dg/opt/pr79085.C b/gcc/testsuite/g++.dg/opt/pr79085.C
new file mode 100644
index 00000000000..1d75d6a7300
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr79085.C
@@ -0,0 +1,24 @@
+// PR c++/79085
+// { dg-do compile }
+// { dg-options "-Os" }
+// { dg-additional-options "-mstrict-align" { target { aarch64*-*-* powerpc*-*-linux* powerpc*-*-elf* } } }
+
+void *operator new (__SIZE_TYPE__, void *p) { return p; }
+
+struct S
+{
+ S ();
+ S (const S &);
+ ~S (void);
+ int i;
+};
+
+S foo ();
+
+static char buf [sizeof (S) + 1];
+
+S *
+bar ()
+{
+ return new (buf + 1) S (foo ());
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr85196.C b/gcc/testsuite/g++.dg/opt/pr85196.C
new file mode 100644
index 00000000000..04d7abde4fa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr85196.C
@@ -0,0 +1,89 @@
+// PR target/85196
+// Testcase by Rainer Orth <ro@gcc.gnu.org>
+
+// { dg-do compile }
+// { dg-options "-O -fpermissive -w" }
+// { dg-additional-options "-fPIC" { target fpic } }
+
+class a;
+template <typename> class b;
+template <typename k> class d : public b<k> {};
+class e {};
+void f(int);
+template <class> class g {
+public:
+ h();
+ a i();
+};
+template <> class b<e> : public g<e> {};
+typedef (*j)(d<e>);
+template <class k> class l {
+public:
+ k operator->() { return 0; }
+};
+enum m { n, aa, o, ab, q, p };
+inline s(m ac) {
+ switch (ac) {
+ case n:
+ case aa:
+ case p:
+ return 1;
+ case o:
+ case ab:
+ return 2;
+ }
+}
+class D {
+ int ad;
+
+public:
+ *ae() { return &ad; }
+};
+class a {
+ l<D *> af;
+
+public:
+ *r() { return af->ae(); }
+ t(int *c) {
+ int *w = af->ae();
+ return w == c;
+ }
+};
+class F : a {
+public:
+ static int ah[];
+ static e v(F *);
+ unsigned long ai() const;
+};
+inline unsigned long F::ai() const {
+ m aj = r() - &ah[0];
+ return s(aj);
+}
+inline e F::v(F *ak) {
+ long al = ak->ai();
+ f(al);
+}
+template <typename> am() { return q; }
+class an : F {
+public:
+ static ao(d<e> u) {
+ int *ap;
+ m aq = am<unsigned>();
+ ap = &ah[aq];
+ return u.h() && u.i().t(ap);
+ }
+ template <e ar(F *)> static as() {
+ F at;
+ ar(&at);
+ }
+ template <e ar(F *)> static au(int *, unsigned, e *) {
+ j av = ao;
+ d<e> aw;
+ if (av(aw))
+ as<ar>();
+ }
+};
+int *ax;
+int ay;
+e az;
+ba() { an::au<an::v>(ax, ay, &az); }
diff --git a/gcc/testsuite/g++.dg/parse/array-size2.C b/gcc/testsuite/g++.dg/parse/array-size2.C
index 3c833472d69..d0bc47fe746 100644
--- a/gcc/testsuite/g++.dg/parse/array-size2.C
+++ b/gcc/testsuite/g++.dg/parse/array-size2.C
@@ -15,6 +15,6 @@ void
foo (void)
{
char g[(char *) &((struct S *) 0)->b - (char *) 0]; // { dg-error "constant" }
- char h[(__SIZE_TYPE__) &((struct S *) 8)->b]; // { dg-error "constant" "" { xfail *-*-* } }
+ char h[(__SIZE_TYPE__) &((struct S *) 8)->b]; // { dg-error "constant" }
bar (g, h);
}
diff --git a/gcc/testsuite/g++.dg/pr85026.C b/gcc/testsuite/g++.dg/pr85026.C
new file mode 100644
index 00000000000..e1e3ccd2e35
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr85026.C
@@ -0,0 +1,61 @@
+/* PR target/85026. */
+/* { dg-do assemble } */
+/* { dg-options "-O2 -std=gnu++11" } */
+
+template <class> class a;
+class b;
+struct c {
+ typedef a<b> &g;
+};
+template <typename d> struct e { typedef typename d::f iter; };
+class h {
+public:
+ void __attribute__((noreturn)) i();
+} ab;
+template <class> class a {
+public:
+ typedef b *f;
+ b &operator[](unsigned m) {
+ if (ac)
+ ab.i();
+ return ad[m];
+ }
+ f n() { return ad; }
+ f m_fn3();
+ b *ad;
+ unsigned ac;
+};
+class b {
+public:
+ short j;
+ short k;
+ signed l;
+} __attribute__((__packed__));
+void o(a<b> &m, b &p2, b &p) {
+ p2 = p = m[0];
+ if (bool at = false)
+ ;
+ else
+ for (c::g au(m);; at = true)
+ if (bool av = false)
+ ;
+ else
+ for (e<a<int>>::iter aw = au.n(), ax = au.m_fn3(); ax;
+ av ? (void)0 : (void)0)
+ if (bool ay = 0)
+ ;
+ else
+ for (b az = *aw; !ay; ay = true) {
+ if (p2.j)
+ p2.j = az.j;
+ else if (p.j)
+ p.j = az.j;
+ if (p2.k)
+ p2.k = az.k;
+ else if (az.k > p.k)
+ p.k = az.k;
+ if (az.l < p2.l)
+ if (az.l > p.l)
+ p.l = az.l;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/template/dependent-base3.C b/gcc/testsuite/g++.dg/template/dependent-base3.C
new file mode 100644
index 00000000000..e38b968e774
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/dependent-base3.C
@@ -0,0 +1,26 @@
+// PR c++/85060
+// { dg-do compile { target c++14 } }
+
+struct CA {
+ constexpr int foo() const { return 42; }
+};
+
+template <class T>
+struct CB : CA { };
+
+template <class T>
+struct CC : CB<T> {
+ constexpr int bar() const {
+ const int m = CA::foo();
+ return m;
+ }
+
+ constexpr int baz() const {
+ const T m = CA::foo();
+ return m;
+ }
+};
+
+constexpr CC<double> c;
+
+static_assert( c.bar() == 42, "" );
diff --git a/gcc/testsuite/g++.dg/torture/pr84961-1.C b/gcc/testsuite/g++.dg/torture/pr84961-1.C
new file mode 100644
index 00000000000..6a72ad5134f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr84961-1.C
@@ -0,0 +1,24 @@
+// PR c++/84961
+// { dg-do compile }
+
+short a;
+volatile int b;
+int c, d;
+
+void
+foo ()
+{
+ asm volatile ("" : "=r" (b = a));
+}
+
+void
+bar ()
+{
+ asm volatile ("" : "=r" (++c, ++d, b = a));
+}
+
+void
+baz ()
+{
+ asm volatile ("" : "=r" (--b));
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr84961-2.C b/gcc/testsuite/g++.dg/torture/pr84961-2.C
new file mode 100644
index 00000000000..0909eedb7f9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr84961-2.C
@@ -0,0 +1,24 @@
+// PR c++/84961
+// { dg-do compile }
+
+short a;
+volatile int b;
+int c, d;
+
+void
+foo ()
+{
+ asm volatile ("" : : "m" (b = a));
+}
+
+void
+bar ()
+{
+ asm volatile ("" : : "m" (++c, ++d, b = a));
+}
+
+void
+baz ()
+{
+ asm volatile ("" : : "m" (--b));
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr85496.C b/gcc/testsuite/g++.dg/torture/pr85496.C
new file mode 100644
index 00000000000..3f504a37791
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr85496.C
@@ -0,0 +1,18 @@
+// PR middle-end/85496
+// Reported by Marek Polacek <mpolacek@gcc.gnu.org>
+
+template <typename> class complex;
+template <typename _Tp> complex<_Tp> operator*(complex<_Tp>, complex<_Tp>);
+template <> struct complex<float> { _Complex float _M_value; };
+class A {
+ complex<float> _f0, _f1;
+
+public:
+ complex<float> &m_fn1() { return _f1; }
+};
+complex<float> a;
+void cos() {
+ A b;
+ complex<float> c;
+ b.m_fn1() = c * a;
+}
diff --git a/gcc/testsuite/g++.dg/tree-ssa/volatile2.C b/gcc/testsuite/g++.dg/tree-ssa/volatile2.C
new file mode 100644
index 00000000000..bec60442477
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/volatile2.C
@@ -0,0 +1,20 @@
+// PR c++/84686
+// { dg-additional-options -fdump-tree-gimple }
+// { dg-final { scan-tree-dump-times "= i" 10 "gimple" } }
+
+volatile int i;
+
+int main()
+{
+ i; //evaluated (a load is performed)
+ (i); //unevaluated => the load shall be performed
+
+ (void)i; //evaluated (a load is performed)
+ (void)(i); //unevaluated => the load shall be performed
+
+ (void)i; //evaluated (a load is performed)
+ (void)(i); //unevaluated => the load shall be performed
+
+ (i,i); // the two subexpression are evaluated
+ ((i),(i)); // no evaluation, => two loads shall happen
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wformat-2.C b/gcc/testsuite/g++.dg/warn/Wformat-2.C
new file mode 100644
index 00000000000..ff8b54b4899
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wformat-2.C
@@ -0,0 +1,17 @@
+// PR c++/84076
+// { dg-do compile }
+// { dg-options "-Wformat" }
+
+struct S { ~S (); };
+struct T { T (); T (const T &); };
+
+void
+foo ()
+{
+ S s;
+ T t;
+ __builtin_printf ("%s\n", s); // { dg-warning "format '%s' expects argument of type 'char\\*', but argument 2 has type 'S'" }
+ __builtin_printf ("%s\n", t); // { dg-warning "format '%s' expects argument of type 'char\\*', but argument 2 has type 'T'" }
+ __builtin_printf ("%s\n", &s);// { dg-warning "format '%s' expects argument of type 'char\\*', but argument 2 has type 'S\\*'" }
+ __builtin_printf ("%s\n", &t);// { dg-warning "format '%s' expects argument of type 'char\\*', but argument 2 has type 'T\\*'" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wnonnull4.C b/gcc/testsuite/g++.dg/warn/Wnonnull4.C
new file mode 100644
index 00000000000..d07a4452ddb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wnonnull4.C
@@ -0,0 +1,21 @@
+// PR c++/86210
+// { dg-do compile }
+// { dg-options "-Wnonnull" }
+
+void *declared_not_defined (void *p) __attribute__((nonnull));
+
+inline void *declared_and_defined (void *p) __attribute__((nonnull));
+
+int
+main ()
+{
+ int *const p = 0;
+ declared_not_defined (p); // { dg-warning "null argument where non-null required" }
+ declared_and_defined (p); // { dg-warning "null argument where non-null required" }
+}
+
+void *
+declared_and_defined (void *p)
+{
+ return p;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-function4.C b/gcc/testsuite/g++.dg/warn/Wunused-function4.C
new file mode 100644
index 00000000000..00d5d70fc90
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-function4.C
@@ -0,0 +1,21 @@
+// PR c++/80598
+// { dg-do compile }
+// { dg-options "-Wunused-function" }
+
+static void
+foo () // { dg-bogus "defined but not used" }
+{
+}
+
+static void
+bar () // { dg-warning "defined but not used" }
+{
+}
+
+template <class T>
+int
+baz (T x)
+{
+ foo ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-var-33.C b/gcc/testsuite/g++.dg/warn/Wunused-var-33.C
new file mode 100644
index 00000000000..5f10d781082
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-var-33.C
@@ -0,0 +1,37 @@
+// PR c++/85952
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wunused-but-set-variable" }
+
+int
+foo ()
+{
+ int a[2] = {1, 2}; // { dg-bogus "set but not used" } */
+ auto [x, y] = a; // { dg-warning "decomposition declaration only available with" "" { target c++14_down } }
+ return x + y;
+}
+
+struct S { int d, e; };
+
+int
+bar ()
+{
+ S a = {1, 2};
+ auto [x, y] = a; // { dg-warning "decomposition declaration only available with" "" { target c++14_down } }
+ return x + y;
+}
+
+int
+baz ()
+{
+ S a = {1, 2};
+ auto & [x, y] = a; // { dg-warning "decomposition declaration only available with" "" { target c++14_down } }
+ return x + y;
+}
+
+int
+qux ()
+{
+ int a[2] = {1, 2};
+ auto & [x, y] = a; // { dg-warning "decomposition declaration only available with" "" { target c++14_down } }
+ return x + y;
+}
diff --git a/gcc/testsuite/g++.dg/warn/deprecated-13.C b/gcc/testsuite/g++.dg/warn/deprecated-13.C
new file mode 100644
index 00000000000..ef05b95f026
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/deprecated-13.C
@@ -0,0 +1,44 @@
+// PR c++/84222
+// { dg-do compile }
+
+struct __attribute__((deprecated)) C { // { dg-message "declared here" }
+ C () {}
+ C (const C &); // { dg-bogus "'C' is deprecated" }
+ C (const C &x, const C &y) { C z = x; } // { dg-bogus "'C' is deprecated" }
+ void foo (const C &x, const C &y); // { dg-bogus "'C' is deprecated" }
+};
+
+void
+C::foo (const C &x, const C &y) // { dg-bogus "'C' is deprecated" }
+{
+ C z = x; // { dg-bogus "'C' is deprecated" }
+}
+
+void
+bar (const C &x, const C &y) // { dg-warning "'C' is deprecated" }
+{
+ C z = x; // { dg-warning "'C' is deprecated" }
+}
+
+template <int N>
+struct __attribute__((deprecated)) D { // { dg-message "declared here" }
+ D () {}
+ D (const D &); // { dg-bogus "is deprecated" }
+ D (const D &x, const D &y) { D z = x; } // { dg-bogus "is deprecated" }
+ void foo (const D &x, const D &y); // { dg-bogus "is deprecated" }
+};
+
+template <int N>
+void
+D<N>::foo // { dg-bogus "is deprecated" "" { xfail *-*-* } }
+(const D &x, const D &y) // { dg-bogus "is deprecated" }
+{
+ D z = x; // { dg-bogus "is deprecated" }
+}
+
+template <int N>
+void
+bar (const D<N> &x, const D<N> &y) // { dg-warning "is deprecated" }
+{
+ D<N> z = x; // { dg-warning "is deprecated" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/deprecated-6.C b/gcc/testsuite/g++.dg/warn/deprecated-6.C
index ad9eb3d4820..682e9b226ca 100644
--- a/gcc/testsuite/g++.dg/warn/deprecated-6.C
+++ b/gcc/testsuite/g++.dg/warn/deprecated-6.C
@@ -98,7 +98,7 @@ T *p3; // { dg-warning "'T' is deprecated: Please avoid T" }
inline void T::member1(int) {}
-int T::member3(T *p) // { dg-warning "'T' is deprecated: Please avoid T" }
+int T::member3(T *p) // { dg-bogus "'T' is deprecated: Please avoid T" }
{
p->member1(1); /* { dg-warning "'void T::member1\\(int\\)' is deprecated: Please avoid member1" "" } */
(*p).member1(2); /* { dg-warning "'void T::member1\\(int\\)' is deprecated: Please avoid member1" "" } */
diff --git a/gcc/testsuite/g++.dg/warn/deprecated.C b/gcc/testsuite/g++.dg/warn/deprecated.C
index a5b2aee03e3..0420a6afd22 100644
--- a/gcc/testsuite/g++.dg/warn/deprecated.C
+++ b/gcc/testsuite/g++.dg/warn/deprecated.C
@@ -102,7 +102,7 @@ T *p3; // { dg-warning "'T' is deprecated" }
inline void T::member1(int) {}
-int T::member3(T *p) // { dg-warning "'T' is deprecated" }
+int T::member3(T *p) // { dg-bogus "'T' is deprecated" }
{
p->member1(1); /* { dg-warning "'void T::member1\\(int\\)' is deprecated" "" } */
(*p).member1(2); /* { dg-warning "'void T::member1\\(int\\)' is deprecated" "" } */
@@ -113,5 +113,3 @@ int T::member3(T *p) // { dg-warning "'T' is deprecated" }
return f1(); /* { dg-warning "'INT1 f1\\(\\)' is deprecated" "" } */
}
#endif
-
-
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr84860.c b/gcc/testsuite/gcc.c-torture/compile/pr84860.c
new file mode 100644
index 00000000000..002737c71b5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr84860.c
@@ -0,0 +1,11 @@
+/* PR target/84860 */
+
+void
+foo (int x, int y)
+{
+ while (x < 1)
+ {
+ x = y;
+ y = ((float)1 / 0) ? 2 : 0;
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr85945.c b/gcc/testsuite/gcc.c-torture/compile/pr85945.c
new file mode 100644
index 00000000000..93b2023f25c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr85945.c
@@ -0,0 +1,16 @@
+/* PR target/85945 */
+
+typedef float V __attribute__((vector_size(16)));
+union U { V v; float f[4]; };
+int f;
+float g[4];
+
+void
+foo (void)
+{
+ V d;
+ union U i;
+ i.v = d;
+ for (f = 0; f < 4; f++)
+ g[f] = i.f[f];
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr84524.c b/gcc/testsuite/gcc.c-torture/execute/pr84524.c
new file mode 100644
index 00000000000..ba20ad87a5a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr84524.c
@@ -0,0 +1,41 @@
+/* PR target/84524 */
+
+__attribute__((noinline,noclone)) void
+foo (unsigned short *x)
+{
+ unsigned short i, v;
+ unsigned char j;
+ for (i = 0; i < 256; i++)
+ {
+ v = i << 8;
+ for (j = 0; j < 8; j++)
+ if (v & 0x8000)
+ v = (v << 1) ^ 0x1021;
+ else
+ v = v << 1;
+ x[i] = v;
+ }
+}
+
+int
+main ()
+{
+ unsigned short a[256];
+
+ foo (a);
+ for (int i = 0; i < 256; i++)
+ {
+ unsigned short v = i << 8;
+ for (int j = 0; j < 8; j++)
+ {
+ asm volatile ("" : "+r" (v));
+ if (v & 0x8000)
+ v = (v << 1) ^ 0x1021;
+ else
+ v = v << 1;
+ }
+ if (a[i] != v)
+ __builtin_abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr84748.c b/gcc/testsuite/gcc.c-torture/execute/pr84748.c
new file mode 100644
index 00000000000..9572ab285c6
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr84748.c
@@ -0,0 +1,34 @@
+/* { dg-require-effective-target int128 } */
+
+typedef unsigned __int128 u128;
+
+int a, c, d;
+u128 b;
+
+unsigned long long g0, g1;
+
+void
+store (unsigned long long a0, unsigned long long a1)
+{
+ g0 = a0;
+ g1 = a1;
+}
+
+void
+foo (void)
+{
+ b += a;
+ c = d != 84347;
+ b /= c;
+ u128 x = b;
+ store (x >> 0, x >> 64);
+}
+
+int
+main (void)
+{
+ foo ();
+ if (g0 != 0 || g1 != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr85095.c b/gcc/testsuite/gcc.c-torture/execute/pr85095.c
new file mode 100644
index 00000000000..abcb1785a16
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr85095.c
@@ -0,0 +1,52 @@
+/* PR target/85095 */
+
+__attribute__((noinline, noclone)) unsigned long
+f1 (unsigned long a, unsigned long b)
+{
+ unsigned long i = __builtin_add_overflow (a, b, &a);
+ return a + i;
+}
+
+__attribute__((noinline, noclone)) unsigned long
+f2 (unsigned long a, unsigned long b)
+{
+ unsigned long i = __builtin_add_overflow (a, b, &a);
+ return a - i;
+}
+
+__attribute__((noinline, noclone)) unsigned long
+f3 (unsigned int a, unsigned int b)
+{
+ unsigned int i = __builtin_add_overflow (a, b, &a);
+ return a + i;
+}
+
+__attribute__((noinline, noclone)) unsigned long
+f4 (unsigned int a, unsigned int b)
+{
+ unsigned int i = __builtin_add_overflow (a, b, &a);
+ return a - i;
+}
+
+int
+main ()
+{
+ if (f1 (16UL, -18UL) != -2UL
+ || f1 (16UL, -17UL) != -1UL
+ || f1 (16UL, -16UL) != 1UL
+ || f1 (16UL, -15UL) != 2UL
+ || f2 (24UL, -26UL) != -2UL
+ || f2 (24UL, -25UL) != -1UL
+ || f2 (24UL, -24UL) != -1UL
+ || f2 (24UL, -23UL) != 0UL
+ || f3 (32U, -34U) != -2U
+ || f3 (32U, -33U) != -1U
+ || f3 (32U, -32U) != 1U
+ || f3 (32U, -31U) != 2U
+ || f4 (35U, -37U) != -2U
+ || f4 (35U, -36U) != -1U
+ || f4 (35U, -35U) != -1U
+ || f4 (35U, -34U) != 0U)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr85529-1.c b/gcc/testsuite/gcc.c-torture/execute/pr85529-1.c
new file mode 100644
index 00000000000..83d5cdd997e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr85529-1.c
@@ -0,0 +1,28 @@
+/* PR tree-optimization/85529 */
+
+struct S { int a; };
+
+int b, c = 1, d, e, f;
+static int g;
+volatile struct S s;
+
+signed char
+foo (signed char i, int j)
+{
+ return i < 0 ? i : i << j;
+}
+
+int
+main ()
+{
+ signed char k = -83;
+ if (!d)
+ goto L;
+ k = e || f;
+L:
+ for (; b < 1; b++)
+ s.a != (k < foo (k, 2) && (c = k = g));
+ if (c != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr85529-2.c b/gcc/testsuite/gcc.c-torture/execute/pr85529-2.c
new file mode 100644
index 00000000000..727280de061
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr85529-2.c
@@ -0,0 +1,25 @@
+/* PR tree-optimization/85529 */
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ x &= 63;
+ x -= 50;
+ x |= 1;
+ if (x < 0)
+ return 1;
+ int y = x >> 2;
+ if (x >= y)
+ return 1;
+ return 0;
+}
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 63; i++)
+ if (foo (i) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr86231.c b/gcc/testsuite/gcc.c-torture/execute/pr86231.c
new file mode 100644
index 00000000000..1eafe794dd3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr86231.c
@@ -0,0 +1,30 @@
+/* PR tree-optimization/86231 */
+
+#define ONE ((void *) 1)
+#define TWO ((void *) 2)
+
+__attribute__((noinline, noclone)) int
+foo (void *p, int x)
+{
+ if (p == ONE) return 0;
+ if (!p)
+ p = x ? TWO : ONE;
+ return p == ONE ? 0 : 1;
+}
+
+int v[8];
+
+int
+main ()
+{
+ if (foo ((void *) 0, 0) != 0
+ || foo ((void *) 0, 1) != 1
+ || foo (ONE, 0) != 0
+ || foo (ONE, 1) != 0
+ || foo (TWO, 0) != 1
+ || foo (TWO, 1) != 1
+ || foo (&v[7], 0) != 1
+ || foo (&v[7], 1) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-1.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-1.c
new file mode 100644
index 00000000000..2e0b76554f9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-1.c
@@ -0,0 +1,19 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-O -Walloc-size-larger-than=1KB -ftrack-macro-expansion=0" } */
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ unsigned n = 0;
+ T (__builtin_malloc (n));
+
+ n = 1024; /* 1 kibibyte (KB or KiB) */
+ T (__builtin_malloc (n));
+
+ n = 1025;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1025. exceeds maximum object size 1024" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-10.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-10.c
new file mode 100644
index 00000000000..559309d5531
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-10.c
@@ -0,0 +1,27 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile { target lp64 } }
+ { dg-options "-O -Walloc-size-larger-than=1PiB -ftrack-macro-expansion=0" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ size_t n = 0;
+ T (__builtin_malloc (n));
+
+ n = (size_t)1024 * 1024 * 1024 * 1024 * 1024; /* 1 pebibyte (PiB) */
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1125899906842625. exceeds maximum object size 1125899906842624" } */
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-11.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-11.c
new file mode 100644
index 00000000000..41e523c6958
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-11.c
@@ -0,0 +1,27 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile { target lp64 } }
+ { dg-options "-O -Walloc-size-larger-than=1PB -ftrack-macro-expansion=0" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ size_t n = 0;
+ T (__builtin_malloc (n));
+
+ n = (size_t)1000 * 1000 * 1000 * 1000 * 1000; /* 1 petabyte (PB) */
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1000000000000001. exceeds maximum object size 1000000000000000" } */
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-12.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-12.c
new file mode 100644
index 00000000000..24269a8a102
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-12.c
@@ -0,0 +1,27 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile { target lp64 } }
+ { dg-options "-O -Walloc-size-larger-than=1EiB -ftrack-macro-expansion=0" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ size_t n = 0;
+ T (__builtin_malloc (n));
+
+ n = (size_t)1024 * 1024 * 1024 * 1024 * 1024 * 1024; /* 1 exbibyte (EiB) */
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1152921504606846977. exceeds maximum object size 1152921504606846976" } */
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-13.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-13.c
new file mode 100644
index 00000000000..b96e3892bd8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-13.c
@@ -0,0 +1,27 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile { target lp64 } }
+ { dg-options "-O -Walloc-size-larger-than=1EB -ftrack-macro-expansion=0" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ size_t n = 0;
+ T (__builtin_malloc (n));
+
+ n = (size_t)1000 * 1000 * 1000 * 1000 * 1000 * 1000; /* 1 exabyte (EB) */
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1000000000000000001. exceeds maximum object size 1000000000000000000" } */
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-14.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-14.c
new file mode 100644
index 00000000000..e632e2236a3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-14.c
@@ -0,0 +1,30 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-O -Walloc-size-larger-than=123456789123456789123456789123456789 -ftrack-macro-expansion=0" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+/* Verify that an exceedingly large -Walloc-size-larger-than argument
+ with no suffix is accepted and treated as infinite. */
+
+void f (void)
+{
+ size_t n = 0;
+ T (__builtin_malloc (n));
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n));
+
+ n = __SIZE_MAX__ - 1;
+ T (__builtin_malloc (n));
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n));
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-15.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-15.c
new file mode 100644
index 00000000000..b699cc09c22
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-15.c
@@ -0,0 +1,30 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-O -Walloc-size-larger-than=123456789123456789123456789123456789gb -ftrack-macro-expansion=0" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+/* Verify that an exceeingly large -Walloc-size-larger-than argument
+ with a valid suffic is accepted and treated as infinite. */
+
+void f (void)
+{
+ size_t n = 0;
+ T (__builtin_malloc (n));
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n));
+
+ n = __SIZE_MAX__ - 1;
+ T (__builtin_malloc (n));
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n));
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-16.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-16.c
new file mode 100644
index 00000000000..837b69a36d8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-16.c
@@ -0,0 +1,32 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-O -Walloc-size-larger-than=1zb -ftrack-macro-expansion=0" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+/* Verify that an invalid -Walloc-size-larger-than argument is diagnosed
+ and rejected without changing the default setting of PTRDIFF_MAX. */
+
+void f (void)
+{
+ size_t n = 0;
+ T (__builtin_malloc (n));
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+
+ n = __SIZE_MAX__ - 1;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+}
+
+/* { dg-warning "invalid argument .1zb. to .-Walloc-size-larger-than=." "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-2.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-2.c
new file mode 100644
index 00000000000..1ded37b0b5c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-2.c
@@ -0,0 +1,20 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-O -Walloc-size-larger-than=1KiB -ftrack-macro-expansion=0" }
+*/
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ unsigned n = 0;
+ T (__builtin_malloc (n));
+
+ n = 1024; /* 1 kibibyte (KB or KiB) */
+ T (__builtin_malloc (n));
+
+ n = 1025;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1025. exceeds maximum object size 1024" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-3.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-3.c
new file mode 100644
index 00000000000..500ddbf7c74
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-3.c
@@ -0,0 +1,19 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-O -Walloc-size-larger-than=1kB -ftrack-macro-expansion=0" } */
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ unsigned n = 0;
+ T (__builtin_malloc (n));
+
+ n = 1000; /* 1 kilobyte (kB, not to be confused with KB or KiB) */
+ T (__builtin_malloc (n));
+
+ n = 1001;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1001. exceeds maximum object size 1000" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-4.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-4.c
new file mode 100644
index 00000000000..e4fde5a8eb9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-4.c
@@ -0,0 +1,19 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-O -Walloc-size-larger-than=1MiB -ftrack-macro-expansion=0" } */
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ unsigned n = 0;
+ T (__builtin_malloc (n));
+
+ n = 1024 * 1024; /* 1 mebibyte (MiB) */
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1048577. exceeds maximum object size 1048576" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-5.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-5.c
new file mode 100644
index 00000000000..bfea259e0ad
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-5.c
@@ -0,0 +1,25 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-O -Walloc-size-larger-than=1MB -ftrack-macro-expansion=0" } */
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ __SIZE_TYPE__ n = 0;
+ T (__builtin_malloc (n));
+
+ n = 1000 * 1000; /* 1 megabyte (MB) */
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1000001. exceeds maximum object size 1000000" } */
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size 1000000" } */
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size 1000000" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-6.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-6.c
new file mode 100644
index 00000000000..1eb83a5f613
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-6.c
@@ -0,0 +1,25 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-O -Walloc-size-larger-than=1GiB -ftrack-macro-expansion=0" } */
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ __SIZE_TYPE__ n = 0;
+ T (__builtin_malloc (n));
+
+ n = 1024 * 1024 * 1024; /* 1 gigibyte (GiB) */
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1073741825. exceeds maximum object size 1073741824" } */
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-7.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-7.c
new file mode 100644
index 00000000000..5188203337d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-7.c
@@ -0,0 +1,25 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-O -Walloc-size-larger-than=1GB -ftrack-macro-expansion=0" } */
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ __SIZE_TYPE__ n = 0;
+ T (__builtin_malloc (n));
+
+ n = 1000 * 1000 * 1000; /* 1 gigabyte (GB) */
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1000000001. exceeds maximum object size 1000000000" } */
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-8.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-8.c
new file mode 100644
index 00000000000..4f84a027d79
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-8.c
@@ -0,0 +1,27 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile { target lp64 } }
+ { dg-options "-O -Walloc-size-larger-than=1TiB -ftrack-macro-expansion=0" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ size_t n = 0;
+ T (__builtin_malloc (n));
+
+ n = (size_t)1024 * 1024 * 1024 * 1024; /* 1 tebibyte (TiB) */
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1099511627777. exceeds maximum object size 1099511627776" } */
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-9.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-9.c
new file mode 100644
index 00000000000..f3927f1456e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-9.c
@@ -0,0 +1,27 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile { target lp64 } }
+ { dg-options "-O -Walloc-size-larger-than=1TB -ftrack-macro-expansion=0" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ size_t n = 0;
+ T (__builtin_malloc (n));
+
+ n = (size_t)1000 * 1000 * 1000 * 1000; /* 1 terabyte (TB) */
+ T (__builtin_malloc (n));
+
+ n += 1;
+ T (__builtin_malloc (n)); /* { dg-warning "argument 1 value .1000000000001. exceeds maximum object size 1000000000000" } */
+
+ n = __PTRDIFF_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+
+ n = __SIZE_MAX__;
+ T (__builtin_malloc (n)); /* { dg-warning "exceeds maximum object size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than.c
new file mode 100644
index 00000000000..8096ff1d3dd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than.c
@@ -0,0 +1,13 @@
+/* PR middle-end/82063 - issues with arguments enabled by -Wall
+ { dg-do compile }
+ { dg-options "-Walloc-size-larger-than=0 -ftrack-macro-expansion=0" } */
+
+void sink (void*);
+
+#define T(x) sink (x)
+
+void f (void)
+{
+ T (__builtin_malloc (0));
+ T (__builtin_malloc (1)); /* { dg-warning "argument 1 value .1. exceeds maximum object size 0" } */
+}
diff --git a/gcc/testsuite/gcc.dg/debug/pr85252.c b/gcc/testsuite/gcc.dg/debug/pr85252.c
new file mode 100644
index 00000000000..6e5ca85bc86
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr85252.c
@@ -0,0 +1,11 @@
+/* PR debug/85252 */
+/* { dg-do compile } */
+
+void
+foo (void)
+{
+ static char a[0] = "";
+ static char b[0] = "b"; /* { dg-warning "initializer-string for array of chars is too long" } */
+ static char c[1] = "c";
+ static char d[1] = "de"; /* { dg-warning "initializer-string for array of chars is too long" } */
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr81440.h b/gcc/testsuite/gcc.dg/lto/pr81440.h
new file mode 100644
index 00000000000..d9e6c3da645
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr81440.h
@@ -0,0 +1,4 @@
+typedef struct {
+ int i;
+ int ints[];
+} struct_t;
diff --git a/gcc/testsuite/gcc.dg/lto/pr81440_0.c b/gcc/testsuite/gcc.dg/lto/pr81440_0.c
new file mode 100644
index 00000000000..07f2a87da21
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr81440_0.c
@@ -0,0 +1,9 @@
+/* { dg-lto-do link } */
+
+#include "pr81440.h"
+
+extern struct_t my_struct;
+
+int main() {
+ return my_struct.ints[0];
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr81440_1.c b/gcc/testsuite/gcc.dg/lto/pr81440_1.c
new file mode 100644
index 00000000000..d03533029c1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr81440_1.c
@@ -0,0 +1,6 @@
+#include "pr81440.h"
+
+struct_t my_struct = {
+ 20,
+ { 1, 2 }
+};
diff --git a/gcc/testsuite/gcc.dg/lto/pr83954.h b/gcc/testsuite/gcc.dg/lto/pr83954.h
new file mode 100644
index 00000000000..e0155402504
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr83954.h
@@ -0,0 +1,3 @@
+struct foo;
+extern struct foo *FOO_PTR_ARR[1];
+
diff --git a/gcc/testsuite/gcc.dg/lto/pr83954_0.c b/gcc/testsuite/gcc.dg/lto/pr83954_0.c
new file mode 100644
index 00000000000..065a31dab80
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr83954_0.c
@@ -0,0 +1,8 @@
+/* { dg-lto-do link } */
+#include "pr83954.h"
+
+int main() {
+ // just to prevent symbol removal
+ FOO_PTR_ARR[1] = 0;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr83954_1.c b/gcc/testsuite/gcc.dg/lto/pr83954_1.c
new file mode 100644
index 00000000000..61b40fc7759
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr83954_1.c
@@ -0,0 +1,7 @@
+#include "pr83954.h"
+
+struct foo {
+ int x;
+};
+struct foo *FOO_PTR_ARR[1] = { 0 };
+
diff --git a/gcc/testsuite/gcc.dg/lto/pr85248_0.c b/gcc/testsuite/gcc.dg/lto/pr85248_0.c
new file mode 100644
index 00000000000..df61ac976a5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr85248_0.c
@@ -0,0 +1,45 @@
+/* PR lto/85248 */
+/* { dg-lto-do run } */
+/* { dg-lto-options { { -flto -O2 } } } */
+
+extern void test_alias (int s, int e) __asm__ (__USER_LABEL_PREFIX__ "test");
+extern void test_noreturn (int s, int e) __asm__ (__USER_LABEL_PREFIX__ "test")
+ __attribute__ ((__noreturn__));
+
+extern inline __attribute__ ((__always_inline__, __gnu_inline__)) void
+test (int s, int e)
+{
+ if (__builtin_constant_p (s) && s != 0)
+ test_noreturn (s, e);
+ else
+ test_alias (s, e);
+}
+
+int
+foo (void)
+{
+ static volatile int a;
+ return a;
+}
+
+static void
+bar (void)
+{
+ test (0, 1);
+ __builtin_exit (0);
+}
+
+static void
+baz ()
+{
+ test (1, 0);
+}
+
+int
+main ()
+{
+ if (foo ())
+ baz ();
+ bar ();
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr85248_1.c b/gcc/testsuite/gcc.dg/lto/pr85248_1.c
new file mode 100644
index 00000000000..5ce257181fb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr85248_1.c
@@ -0,0 +1,9 @@
+/* { dg-options "-fno-lto" } */
+
+void
+test (int s, int e)
+{
+ asm volatile ("" : "+g" (s), "+g" (e) : : "memory");
+ if (s)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/pr84607.c b/gcc/testsuite/gcc.dg/pr84607.c
new file mode 100644
index 00000000000..710ee94f729
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84607.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+
+extern void exit(int);
+extern void abort(void);
+int a[10];
+int foo()
+{
+ exit (0);
+ return 0;
+}
+int main()
+{
+ if (&a[foo()])
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr84739.c b/gcc/testsuite/gcc.dg/pr84739.c
new file mode 100644
index 00000000000..9864f990b0c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84739.c
@@ -0,0 +1,26 @@
+/* PR tree-optimization/84739 */
+/* { dg-do compile } */
+/* { dg-require-weak "" } */
+/* { dg-options "-O2 -w" } */
+
+static void baz (void) __attribute__((weakref("bar")));
+
+int
+foo (int x, int y)
+{
+ if (x)
+ y = 0;
+ if (y)
+ goto lab;
+ y = 0;
+lab:
+ return y;
+}
+
+void
+bar (int x, int y)
+{
+ y = foo (x, y);
+ if (y != 0)
+ baz ();
+}
diff --git a/gcc/testsuite/gcc.dg/pr84772.c b/gcc/testsuite/gcc.dg/pr84772.c
new file mode 100644
index 00000000000..1241d212350
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84772.c
@@ -0,0 +1,13 @@
+/* PR target/84772 */
+/* { dg-do compile } */
+/* { dg-options "-O -Wuninitialized" } */
+
+#include <stdarg.h>
+
+void
+foo (int *x, int y, va_list ap)
+{
+ __builtin_memset (x, 0, sizeof (int));
+ for (int i = 0; i < y; i++)
+ va_arg (ap, long double); /* { dg-bogus "uninitialized" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr84834.c b/gcc/testsuite/gcc.dg/pr84834.c
new file mode 100644
index 00000000000..38c056bb4ca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84834.c
@@ -0,0 +1,15 @@
+/* PR middle-end/84834 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+_Complex int
+foo (int a)
+{
+ return a < 0;
+}
+
+_Complex int
+bar (int a)
+{
+ return (a & 8) ? (_Complex int) 16 : (_Complex int) 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr84841.c b/gcc/testsuite/gcc.dg/pr84841.c
new file mode 100644
index 00000000000..4f7422a659f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84841.c
@@ -0,0 +1,9 @@
+/* PR tree-optimization/84841 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fassociative-math -frounding-math -fno-signed-zeros -fno-trapping-math -fno-tree-forwprop" } */
+
+double
+foo (double x)
+{
+ return -x * 0.1 * 0.1;
+}
diff --git a/gcc/testsuite/gcc.dg/pr84853.c b/gcc/testsuite/gcc.dg/pr84853.c
new file mode 100644
index 00000000000..c74526369a4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84853.c
@@ -0,0 +1,19 @@
+/* PR c/84853 */
+/* { dg-do compile } */
+
+typedef float V __attribute__((__vector_size__ (16)));
+typedef int W __attribute__((__vector_size__ (16)));
+
+void
+foo (int x, V *y, V *z, W *w)
+{
+ *y = *y << x; /* { dg-error "invalid operands to binary <<" } */
+ *z = *z << *w; /* { dg-error "invalid operands to binary <<" } */
+}
+
+void
+bar (int x, V *y, V *z, W *w)
+{
+ *y = *y >> x; /* { dg-error "invalid operands to binary >>" } */
+ *z = *z >> *w; /* { dg-error "invalid operands to binary >>" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr84875.c b/gcc/testsuite/gcc.dg/pr84875.c
new file mode 100644
index 00000000000..257176de205
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84875.c
@@ -0,0 +1,28 @@
+/* PR debug/84875 */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+/* { dg-additional-options "-fpie" { target pie } } */
+/* { dg-additional-options "-march=z196" { target s390*-*-* } } */
+
+static long *a[100];
+static int b[100];
+long *c;
+int d;
+void foo (long *);
+
+void
+bar ()
+{
+ long *g = c;
+ g--;
+ d = *g;
+ if (d)
+ if (b[d] < 8)
+ {
+ *(void **)g = a[d];
+ a[d] = g;
+ b[d]++;
+ return;
+ }
+ foo (g);
+}
diff --git a/gcc/testsuite/gcc.dg/pr84899.c b/gcc/testsuite/gcc.dg/pr84899.c
new file mode 100644
index 00000000000..0706fecada3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84899.c
@@ -0,0 +1,12 @@
+/* PR target/84899 */
+/* { dg-do compile } */
+/* { dg-options "-O -funroll-all-loops -fno-move-loop-invariants" } */
+
+void
+foo (int x)
+{
+ int a = 1 / x, b = 0;
+
+ while ((a + b + 1) < x)
+ b = __INT_MAX__;
+}
diff --git a/gcc/testsuite/gcc.dg/pr84941.c b/gcc/testsuite/gcc.dg/pr84941.c
new file mode 100644
index 00000000000..6f4674e54f0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84941.c
@@ -0,0 +1,10 @@
+/* PR inline-asm/84941 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+foo (void)
+{
+ short *b[1] = { 0 };
+ asm volatile ("" : "=m,m" (b), "=r,r" (b) : "1,p" (b));
+}
diff --git a/gcc/testsuite/gcc.dg/pr84953.c b/gcc/testsuite/gcc.dg/pr84953.c
new file mode 100644
index 00000000000..723a8a67dda
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84953.c
@@ -0,0 +1,11 @@
+/* PR c/84953 */
+/* { dg-do compile } */
+
+char *strpbrk (const char *, const char *);
+
+char *
+test (char *p)
+{
+ p = strpbrk (p, ""); /* { dg-bogus "assignment discards 'const' qualifier from pointer target type" } */
+ return p;
+}
diff --git a/gcc/testsuite/gcc.dg/pr84956.c b/gcc/testsuite/gcc.dg/pr84956.c
new file mode 100644
index 00000000000..055a749d635
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84956.c
@@ -0,0 +1,27 @@
+/* { dg-options "-O2 -ftree-tail-merge" } */
+
+char a;
+int c;
+unsigned b ();
+
+unsigned
+setjmp ()
+{
+}
+
+static void
+d ()
+{
+ if (b ())
+ c = 3;
+}
+
+void
+e ()
+{
+ d ();
+ a && ({ setjmp (); });
+ a && ({ setjmp (); });
+ a && ({ setjmp (); });
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr85167.c b/gcc/testsuite/gcc.dg/pr85167.c
new file mode 100644
index 00000000000..e4277e3ef72
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr85167.c
@@ -0,0 +1,16 @@
+/* PR rtl-optimization/85167 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -w" } */
+
+struct A { long b; };
+int c, d, e;
+int bar (void);
+
+int
+foo (void)
+{
+ long g;
+ for (; g == c ? 0 : (e = 1); g = ((struct A *)g)->b)
+ if (bar ())
+ return d;
+}
diff --git a/gcc/testsuite/gcc.dg/pr85257.c b/gcc/testsuite/gcc.dg/pr85257.c
new file mode 100644
index 00000000000..75fafd96fd3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr85257.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/85257 */
+/* { dg-do run { target int128 } } */
+/* { dg-options "-O2 -fno-tree-ccp" } */
+
+typedef __int128 V __attribute__ ((__vector_size__ (16 * sizeof (__int128))));
+
+__int128 __attribute__ ((noinline, noclone))
+foo (void)
+{
+ V v = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
+ return v[5];
+}
+
+int
+main ()
+{
+ if (foo () != 6)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr85300.c b/gcc/testsuite/gcc.dg/pr85300.c
new file mode 100644
index 00000000000..87a30b8d419
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr85300.c
@@ -0,0 +1,16 @@
+/* PR rtl-optimization/85300 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -g -funroll-all-loops -fno-tree-ter -fno-web" } */
+
+void
+foo (double x, unsigned char y)
+{
+ while ((int) x < 1)
+ {
+ float a;
+
+ a = y | 0x100;
+ y = 0;
+ x = a;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr85430.c b/gcc/testsuite/gcc.dg/pr85430.c
new file mode 100644
index 00000000000..7b58a3cd567
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr85430.c
@@ -0,0 +1,12 @@
+/* PR target/85430 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-tree-ccp -fno-tree-fre" } */
+
+typedef char V __attribute__((vector_size (4)));
+
+V
+foo (V v)
+{
+ v[(V){}[0]] <<= 1;
+ return v;
+}
diff --git a/gcc/testsuite/gcc.dg/pr85529.c b/gcc/testsuite/gcc.dg/pr85529.c
new file mode 100644
index 00000000000..0b732284749
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr85529.c
@@ -0,0 +1,27 @@
+/* PR tree-optimization/85529 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-ssa-phiopt" } */
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ x &= 31;
+ x -= 25;
+ x *= 2;
+ if (x < 0)
+ return 1;
+ int y = x >> 2;
+ if (x >= y)
+ return 1;
+ return 0;
+}
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 63; i++)
+ if (foo (i) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr86314.c b/gcc/testsuite/gcc.dg/pr86314.c
new file mode 100644
index 00000000000..8962a3cf2ff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr86314.c
@@ -0,0 +1,20 @@
+// PR target/86314
+// { dg-do run { target sync_int_long } }
+// { dg-options "-O2" }
+
+__attribute__((noinline, noclone)) unsigned long
+foo (unsigned long *p)
+{
+ unsigned long m = 1UL << ((*p & 1) ? 1 : 0);
+ unsigned long n = __atomic_fetch_or (p, m, __ATOMIC_SEQ_CST);
+ return (n & m) == 0;
+}
+
+int
+main ()
+{
+ unsigned long v = 1;
+ if (foo (&v) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57656.c b/gcc/testsuite/gcc.dg/torture/pr57656.c
index 4f3645e4693..02490140105 100644
--- a/gcc/testsuite/gcc.dg/torture/pr57656.c
+++ b/gcc/testsuite/gcc.dg/torture/pr57656.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-fstrict-overflow" } */
+/* { dg-additional-options "-fstrict-overflow" } */
int main (void)
{
diff --git a/gcc/testsuite/gcc.dg/torture/pr85168.c b/gcc/testsuite/gcc.dg/torture/pr85168.c
new file mode 100644
index 00000000000..cc5e6648c7e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr85168.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target indirect_jumps } */
+
+typedef struct {
+ struct {
+ char a;
+ } b;
+} c;
+
+int d, f;
+c *e;
+
+extern void i(void);
+extern void sejtmp () __attribute__((returns_twice));
+
+void g(void)
+{
+ c *h = e;
+ if (f)
+ {
+ i();
+ h--;
+ if (d)
+ if (h->b.a)
+ i();
+ }
+ if (h->b.a)
+ sejtmp();
+ e = h;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr85244-1.c b/gcc/testsuite/gcc.dg/torture/pr85244-1.c
new file mode 100644
index 00000000000..44716aa9e04
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr85244-1.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-additional-sources "pr85244-2.c" } */
+
+struct s {
+ long a;
+ int b;
+ int tab[];
+};
+
+extern const struct s val;
+extern int idx;
+extern void abort (void);
+
+int main()
+{
+ if (val.tab[0] != 42 || val.tab[1] != 1337 || val.tab[idx] != 1337)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr85244-2.c b/gcc/testsuite/gcc.dg/torture/pr85244-2.c
new file mode 100644
index 00000000000..d57cb712420
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr85244-2.c
@@ -0,0 +1,8 @@
+struct s {
+ long a;
+ int b;
+ int tab[];
+};
+
+int idx = 1;
+const struct s val = { 0, 0, { 42, 1337 } };
diff --git a/gcc/testsuite/gcc.dg/torture/pr85284.c b/gcc/testsuite/gcc.dg/torture/pr85284.c
new file mode 100644
index 00000000000..80e2c5b247b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr85284.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+
+static int p[48], v;
+
+int
+main ()
+{
+ p[32] = 1;
+ for (int i = 48; i--;)
+ {
+ if (!p[i])
+ continue;
+ if ((i & 7) > 2)
+ break;
+ v = i & 1;
+ }
+ if (v != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr85567.c b/gcc/testsuite/gcc.dg/torture/pr85567.c
new file mode 100644
index 00000000000..f20c69f4201
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr85567.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+extern void sincos(double x, double *sinx, double *cosx);
+
+void apply(void (*f)(double, double *, double *),
+ double x, double *sinx, double *cosx)
+{
+ f(x, sinx, cosx);
+ return;
+}
+
+void apply_sincos(double x, double *sinx, double *cosx)
+{
+ apply(sincos, x, sinx, cosx);
+ return;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr85588.c b/gcc/testsuite/gcc.dg/torture/pr85588.c
new file mode 100644
index 00000000000..5d95c96bc35
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr85588.c
@@ -0,0 +1,4 @@
+/* { dg-do run } */
+/* { dg-additional-options "-fwrapv" } */
+
+#include "pr57656.c"
diff --git a/gcc/testsuite/gcc.dg/torture/pr85989.c b/gcc/testsuite/gcc.dg/torture/pr85989.c
new file mode 100644
index 00000000000..5cfd7016fb5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr85989.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+
+#define N 9
+
+void __attribute__((noinline, noclone))
+f (double x, double y, double *res)
+{
+ y = -y;
+ for (int i = 0; i < N; ++i)
+ {
+ double tmp = y;
+ y = x;
+ x = tmp;
+ res[i] = i;
+ }
+ res[N] = y * y;
+ res[N + 1] = x;
+}
+
+int
+main (void)
+{
+ double res[N + 2];
+ f (10, 20, res);
+ for (int i = 0; i < N; ++i)
+ if (res[i] != i)
+ __builtin_abort ();
+ if (res[N] != 100 || res[N + 1] != -20)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp119.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp119.c
new file mode 100644
index 00000000000..92c490e542c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp119.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/86231 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-final { scan-tree-dump-not "link_error" "vrp1" } } */
+
+int bar (int);
+void link_error (void);
+
+int
+foo (int x, int y, int z)
+{
+ if (x < 4 || x > 8) __builtin_unreachable ();
+ if (y >= 2 && y <= 6) __builtin_unreachable ();
+ /* x is [4, 8], y is ~[2, 6], resulting range of e should be ~[2, 3]. */
+ int e = (z ? x : y);
+ bar (bar (bar (bar (bar (bar (bar (bar (bar (bar (bar (bar (e))))))))))));
+ if (e == 2 || e == 3)
+ link_error ();
+ return e;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr84485.c b/gcc/testsuite/gcc.dg/vect/pr84485.c
new file mode 100644
index 00000000000..ad25d3642c8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr84485.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+#define N 256
+
+void __attribute__ ((noinline, noclone))
+f (unsigned long incx, unsigned long incy,
+ float *restrict dx, float *restrict dy)
+{
+ unsigned long ix = 0, iy = 0;
+ for (unsigned long i = 0; i < N; ++i)
+ {
+ dy[iy] += dx[ix];
+ ix += incx;
+ iy += incy;
+ }
+}
+
+float a = 0.0;
+float b[N];
+
+int
+main (void)
+{
+ check_vect ();
+
+ for (int i = 0; i < N; ++i)
+ b[i] = i;
+ f (1, 0, b, &a);
+ if (a != N * (N - 1) / 2)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr85597.c b/gcc/testsuite/gcc.dg/vect/pr85597.c
new file mode 100644
index 00000000000..cf615f9c464
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr85597.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-mfma" { target { x86_64-*-* i?86-*-* } } } */
+
+extern double fma (double, double, double);
+
+static inline void
+bar (int i, double *D, double *S)
+{
+ while (i-- > 0)
+ {
+ D[0] = fma (1, S[0], D[0]);
+ D[1] = fma (1, S[1], D[1]);
+ D[2] = fma (1, S[2], D[2]);
+ D[3] = fma (1, S[3], D[3]);
+ D += 4;
+ S += 4;
+ }
+}
+
+void
+foo (double *d, double *s)
+{
+ bar (10, d, s);
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c
index c917f81c022..fa0fb56d9e1 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c
@@ -1,5 +1,5 @@
/* { dg-do assemble } */
-/* { dg-options "-O1 --save-temps -mno-fix-cortex-a53-843419" } */
+/* { dg-options "-O1 --save-temps" } */
#pragma GCC push_options
#pragma GCC target ("+nothing+simd, cmodel=small")
diff --git a/gcc/testsuite/gcc.target/aarch64/pr81647.c b/gcc/testsuite/gcc.target/aarch64/pr81647.c
new file mode 100644
index 00000000000..2d764030dc8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr81647.c
@@ -0,0 +1,45 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fdump-tree-ssa" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+
+double x[28], y[28];
+int res[28];
+
+int
+main (void)
+{
+ int i;
+ for (i = 0; i < 28; ++i)
+ {
+ x[i] = __builtin_nan ("");
+ y[i] = i;
+ }
+ __asm__ volatile ("" ::: "memory");
+ feclearexcept (FE_ALL_EXCEPT);
+ for (i = 0; i < 4; ++i)
+ res[i] = __builtin_isgreater (x[i], y[i]);
+ for (i = 4; i < 8; ++i)
+ res[i] = __builtin_isgreaterequal (x[i], y[i]);
+ for (i = 8; i < 12; ++i)
+ res[i] = __builtin_isless (x[i], y[i]);
+ for (i = 12; i < 16; ++i)
+ res[i] = __builtin_islessequal (x[i], y[i]);
+ for (i = 16; i < 20; ++i)
+ res[i] = __builtin_islessgreater (x[i], y[i]);
+ for (i = 20; i < 24; ++i)
+ res[i] = __builtin_isunordered (x[i], y[i]);
+ for (i = 24; i < 28; ++i)
+ res[i] = !(__builtin_isunordered (x[i], y[i]));
+ __asm__ volatile ("" ::: "memory");
+ return fetestexcept (FE_ALL_EXCEPT) != 0;
+}
+
+/* { dg-final { scan-tree-dump " u> " "ssa" } } */
+/* { dg-final { scan-tree-dump " u>= " "ssa" } } */
+/* { dg-final { scan-tree-dump " u< " "ssa" } } */
+/* { dg-final { scan-tree-dump " u<= " "ssa" } } */
+/* { dg-final { scan-tree-dump " u== " "ssa" } } */
+/* { dg-final { scan-tree-dump " unord " "ssa" } } */
+/* { dg-final { scan-tree-dump " ord " "ssa" } } */
diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-1.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-1.c
index c13272eed68..f764153cb17 100644
--- a/gcc/testsuite/gcc.target/arm/cmse/cmse-1.c
+++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-1.c
@@ -71,6 +71,20 @@ baz (void)
{
return cmse_nonsecure_caller ();
}
+/* { dg-final { scan-assembler "baz:" } } */
+/* { dg-final { scan-assembler "__acle_se_baz:" } } */
+/* { dg-final { scan-assembler-not "\tcmse_nonsecure_caller" } } */
+/* Look for an andsi of 1 with a register in function baz, ie.
+
+;; Function baz<anything>
+<any line without '('>
+(insn <anything but '('> (set (reg<any register modifier>:SI <anything but ')'>)
+ (and:SI (reg<any register modifier>:SI <anything but ')'>)
+ (const_int 1 <anything but ')'>)<anything but '('>
+ <optional: (nil)<anything but '('>>
+(insn
+*/
+/* { dg-final { scan-rtl-dump "\n;; Function baz\[^\n\]*\[^(\]+\[^;\]*\n\\(insn \[^(\]+ \\(set \\(reg\[^:\]*:SI \[^)\]+\\)\[^(\]*\\(and:SI \\(reg\[^:\]*:SI \[^)\]+\\)\[^(\]*\\((const_int 1|reg\[^:\]*:SI) \[^)\]+\\)\[^(\]+(\\(nil\\)\[^(\]+)?\\(insn" expand } } */
typedef int __attribute__ ((cmse_nonsecure_call)) (int_nsfunc_t) (void);
@@ -86,6 +100,11 @@ qux (int_nsfunc_t * callback)
{
fp = cmse_nsfptr_create (callback);
}
+/* { dg-final { scan-assembler "qux:" } } */
+/* { dg-final { scan-assembler "__acle_se_qux:" } } */
+/* { dg-final { scan-assembler "bic" } } */
+/* { dg-final { scan-assembler "push\t\{r4, r5, r6" } } */
+/* { dg-final { scan-assembler "msr\tAPSR_nzcvq" } } */
int call_callback (void)
{
@@ -94,13 +113,4 @@ int call_callback (void)
else
return default_callback ();
}
-/* { dg-final { scan-assembler "baz:" } } */
-/* { dg-final { scan-assembler "__acle_se_baz:" } } */
-/* { dg-final { scan-assembler "qux:" } } */
-/* { dg-final { scan-assembler "__acle_se_qux:" } } */
-/* { dg-final { scan-assembler-not "\tcmse_nonsecure_caller" } } */
-/* { dg-final { scan-rtl-dump "and.*reg.*const_int 1" expand } } */
-/* { dg-final { scan-assembler "bic" } } */
-/* { dg-final { scan-assembler "push\t\{r4, r5, r6" } } */
-/* { dg-final { scan-assembler "msr\tAPSR_nzcvq" } } */
/* { dg-final { scan-assembler-times "bl\\s+__gnu_cmse_nonsecure_call" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-16.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-16.c
new file mode 100644
index 00000000000..3fb0380afaa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-16.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-options "-Os -mcmse" } */
+
+#include <arm_cmse.h>
+
+int
+foo (void)
+{
+ return cmse_nonsecure_caller ();
+}
+
+int
+main (void)
+{
+ /* Return success (0) if main is secure, ie if cmse_nonsecure_caller/foo
+ returns false (0). */
+ return foo ();
+}
diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-1c99.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-1c99.c
new file mode 100644
index 00000000000..0f99dd341b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-1c99.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -mcmse -std=c99" } */
+/* This is a copy of cmse-1.c to test arm_mve.h ISO C compatibility. */
+#include "cmse-1.c"
diff --git a/gcc/testsuite/gcc.target/arm/fpscr.c b/gcc/testsuite/gcc.target/arm/fpscr.c
index 7b4d71d72d8..4c3eaf7fcf7 100644
--- a/gcc/testsuite/gcc.target/arm/fpscr.c
+++ b/gcc/testsuite/gcc.target/arm/fpscr.c
@@ -6,11 +6,14 @@
/* { dg-add-options arm_fp } */
void
-test_fpscr ()
+test_fpscr (void)
{
- volatile unsigned int status = __builtin_arm_get_fpscr ();
+ unsigned status;
+
+ __builtin_arm_set_fpscr (0);
+ status = __builtin_arm_get_fpscr ();
__builtin_arm_set_fpscr (status);
}
/* { dg-final { scan-assembler "mrc\tp10, 7, r\[0-9\]+, cr1, cr0, 0" } } */
-/* { dg-final { scan-assembler "mcr\tp10, 7, r\[0-9\]+, cr1, cr0, 0" } } */
+/* { dg-final { scan-assembler-times "mcr\tp10, 7, r\[0-9\]+, cr1, cr0, 0" 2 } } */
diff --git a/gcc/testsuite/gcc.target/arm/pr82518.c b/gcc/testsuite/gcc.target/arm/pr82518.c
new file mode 100644
index 00000000000..ce820b78a8d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr82518.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-additional-options "-O3 -fno-inline -std=gnu99" } */
+/* { dg-add-options arm_neon } */
+
+typedef struct { int x, y; } X;
+
+void f4(X *p, int n)
+{
+ for (int i = 0; i < n; i++)
+ { p[i].x = i;
+ p[i].y = i + 1;
+ }
+}
+
+__attribute ((aligned (16))) X arr[100];
+
+int main(void)
+{
+ volatile int fail = 0;
+ f4 (arr, 100);
+ for (int i = 0; i < 100; i++)
+ if (arr[i].y != i+1 || arr[i].x != i)
+ fail = 1;
+ if (fail)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr82989.c b/gcc/testsuite/gcc.target/arm/pr82989.c
new file mode 100644
index 00000000000..8519c3fdc82
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr82989.c
@@ -0,0 +1,33 @@
+/* PR target/82989. */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-a8" } } */
+/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mfpu=*" } { "-mfpu=neon" } } */
+/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
+/* { dg-options "-O2 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard" } */
+/* { dg-add-options arm_neon } */
+
+typedef unsigned long long uint64_t;
+
+void f_shr_imm (uint64_t *a)
+{
+ *a += *a >> 32;
+}
+
+void f_shr_reg (uint64_t *a, uint64_t b)
+{
+ *a += *a >> b;
+}
+
+void f_shl_imm (uint64_t *a)
+{
+ *a += *a << 32;
+}
+
+void f_shl_reg (uint64_t *a, uint64_t b)
+{
+ *a += *a << b;
+}
+/* { dg-final { scan-assembler-not "vshl*" } } */
+/* { dg-final { scan-assembler-not "vshr*" } } */
+/* { dg-final { scan-assembler-not "vmov*" } } */
diff --git a/gcc/testsuite/gcc.target/arm/pr84826.c b/gcc/testsuite/gcc.target/arm/pr84826.c
new file mode 100644
index 00000000000..563ce51b76f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr84826.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-options "-Ofast -fstack-check" } */
+
+void d (void *);
+
+void a ()
+{
+ int b;
+ void bar (int c)
+ {
+ if (__builtin_expect (c, 0))
+ ++b;
+ }
+ d (bar);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr84524.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr84524.c
new file mode 100644
index 00000000000..536e81e17db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr84524.c
@@ -0,0 +1,14 @@
+/* PR target/84524 */
+/* { dg-do run { target avx512bw } } */
+/* { dg-options "-O3 -mavx512bw" } */
+
+#include "avx512bw-check.h"
+
+#define main() do_main()
+#include "../../gcc.c-torture/execute/pr84524.c"
+
+static void
+avx512bw_test (void)
+{
+ do_main ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr84786-1.c b/gcc/testsuite/gcc.target/i386/avx512f-pr84786-1.c
new file mode 100644
index 00000000000..d57b53b7e36
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr84786-1.c
@@ -0,0 +1,25 @@
+/* PR target/84786 */
+/* { dg-do run { target { ! ia32 } } } */
+/* { dg-options "-mavx512f -mno-avx512vl -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+typedef double V __attribute__((vector_size (16)));
+
+__attribute__((noinline, noclone)) V
+foo (V x, double y)
+{
+ register double z __asm ("xmm18");
+ asm volatile ("" : "=v" (z) : "0" (y));
+ x[1] = z;
+ return x;
+}
+
+static void
+avx512f_test (void)
+{
+ V a = foo ((V) { 1.0, 2.0 }, 3.0);
+ if (a[0] != 1.0 || a[1] != 3.0)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr84786-2.c b/gcc/testsuite/gcc.target/i386/avx512f-pr84786-2.c
new file mode 100644
index 00000000000..5ac28aa4a47
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr84786-2.c
@@ -0,0 +1,16 @@
+/* PR target/84786 */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-mavx512f -mno-avx512vl -O2" } */
+
+typedef double V __attribute__((vector_size (16)));
+
+__attribute__((noinline, noclone)) V
+foo (V x, double y)
+{
+ register double z __asm ("xmm18");
+ asm volatile ("" : "=v" (z) : "0" (y));
+ x[1] = z;
+ return x;
+}
+
+/* { dg-final { scan-assembler-not "vunpcklpd\[\^\n\r]*xmm(1\[6-9]|\[23]\[0-9])" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr84786-3.c b/gcc/testsuite/gcc.target/i386/avx512f-pr84786-3.c
new file mode 100644
index 00000000000..4d125b9933f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr84786-3.c
@@ -0,0 +1,50 @@
+/* PR target/84786 */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-mavx512f -mno-avx512vl -O2" } */
+
+#include <x86intrin.h>
+
+__m512i v;
+__m128i w;
+
+__m128i
+foo (__m128i x, int y)
+{
+ __m128i z;
+#define A(n) register __m512i zmm##n __asm ("zmm" #n);
+#define B A(1) A(2) A(3) A(4) A(5) A(6) A(7) \
+ A(8) A(9) A(10) A(11) A(12) A(13) A(14)
+ B
+#undef A
+#define A(n) asm volatile ("" : "=v" (zmm##n) : "0" (v));
+ B
+ asm volatile ("" : "=x" (z) : "0" (w));
+ x = _mm_srli_epi16 (x, y);
+ asm volatile ("" : : "x" (z));
+#undef A
+#define A(n) asm volatile ("" : : "v" (zmm##n));
+ B
+ return x;
+}
+
+__m256i
+bar (__m256i x, int y)
+{
+ __m128i z;
+#undef A
+#define A(n) register __m512i zmm##n __asm ("zmm" #n);
+ B
+#undef A
+#define A(n) asm volatile ("" : "=v" (zmm##n) : "0" (v));
+ B
+ asm volatile ("" : "=x" (z) : "0" (w));
+ x = _mm256_slli_epi16 (x, y);
+ asm volatile ("" : : "x" (z));
+#undef A
+#define A(n) asm volatile ("" : : "v" (zmm##n));
+ B
+ return x;
+}
+
+/* { dg-final { scan-assembler-not "vpsrlw\[\^\n\r]*xmm(1\[6-9]|\[23]\[0-9])" } } */
+/* { dg-final { scan-assembler-not "vpsllw\[\^\n\r]*xmm(1\[6-9]|\[23]\[0-9])" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c
index 8675450f0c4..66476c3013f 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c
@@ -1,7 +1,7 @@
/* { dg-do compile { target { ! ia32 } } } */
/* { dg-options "-mavx512f -O2" } */
-/* { dg-final { scan-assembler-times "vcvtusi2sd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtusi2sd\[ \\t\]+\[^%\n\]*%r\[^\{\n\]*\{ru-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtusi2sdq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtusi2sdq\[ \\t\]+\[^%\n\]*%r\[^\{\n\]*\{ru-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c
index 38ecf39ad65..f4dae536873 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c
@@ -1,7 +1,7 @@
/* { dg-do compile { target { ! ia32 } } } */
/* { dg-options "-mavx512f -O2" } */
-/* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^%\n\]*%r\[^\{\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtusi2ssq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtusi2ssq\[ \\t\]+\[^%\n\]*%r\[^\{\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermd-2.c
index dbd4544c39e..b36a9c2da0a 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vpermd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermd-2.c
@@ -41,18 +41,14 @@ TEST (void)
res3.a[i] = DEFAULT_VALUE;
}
-#if AVX512F_LEN == 512
res1.x = INTRINSIC (_permutexvar_epi32) (src1.x, src2.x);
-#endif
res2.x = INTRINSIC (_maskz_permutexvar_epi32) (mask, src1.x, src2.x);
res3.x = INTRINSIC (_mask_permutexvar_epi32) (res3.x, mask, src1.x, src2.x);
CALC (src1.a, src2.a, res_ref);
-#if AVX512F_LEN == 512
if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
abort ();
-#endif
MASK_ZERO (i_d) (res_ref, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-2.c
index 770d5623f5f..dd88cd46c0b 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-2.c
@@ -40,18 +40,14 @@ TEST (void)
res3.a[i] = DEFAULT_VALUE;
}
-#if AVX512F_LEN == 512
res1.x = INTRINSIC (_permutex_epi64) (src1.x, IMM_MASK);
-#endif
res2.x = INTRINSIC (_maskz_permutex_epi64) (mask, src1.x, IMM_MASK);
res3.x = INTRINSIC (_mask_permutex_epi64) (res3.x, mask, src1.x, IMM_MASK);
CALC (src1.a, IMM_MASK, res_ref);
-#if AVX512F_LEN == 512
if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
abort ();
-#endif
MASK_ZERO (i_q) (res_ref, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-2.c
index c596b1d9c40..6c222888e88 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-2.c
@@ -41,18 +41,14 @@ TEST (void)
res3.a[i] = DEFAULT_VALUE;
}
-#if AVX512F_LEN == 512
res1.x = INTRINSIC (_permutexvar_epi64) (src1.x, src2.x);
-#endif
res2.x = INTRINSIC (_maskz_permutexvar_epi64) (mask, src1.x, src2.x);
res3.x = INTRINSIC (_mask_permutexvar_epi64) (res3.x, mask, src1.x, src2.x);
CALC (src1.a, src2.a, res_ref);
-#if AVX512F_LEN == 512
if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
abort ();
-#endif
MASK_ZERO (i_q) (res_ref, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-vpermd-1.c b/gcc/testsuite/gcc.target/i386/avx512vl-vpermd-1.c
index fa1aaa390ab..069bb5d6c63 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vl-vpermd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-vpermd-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-mavx512vl -O2" } */
+/* { dg-final { scan-assembler-times "vpermd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\](?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpermd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpermd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
@@ -11,6 +12,7 @@ volatile __mmask8 m;
void extern
avx512vl_test (void)
{
+ x = _mm256_permutexvar_epi32 (x, x);
x = _mm256_maskz_permutexvar_epi32 (m, x, x);
x = _mm256_mask_permutexvar_epi32 (x, m, x, x);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-vpermq-imm-1.c b/gcc/testsuite/gcc.target/i386/avx512vl-vpermq-imm-1.c
index c74c8ce96c7..2340a6d9993 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vl-vpermq-imm-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-vpermq-imm-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-mavx512vl -O2" } */
+/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\](?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
@@ -11,6 +12,7 @@ volatile __mmask8 m;
void extern
avx512vl_test (void)
{
+ x = _mm256_permutex_epi64 (x, 13);
x = _mm256_mask_permutex_epi64 (x, m, x, 13);
x = _mm256_maskz_permutex_epi64 (m, x, 13);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-vpermq-var-1.c b/gcc/testsuite/gcc.target/i386/avx512vl-vpermq-var-1.c
index 43ccad3d6c1..69185e50f76 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vl-vpermq-var-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-vpermq-var-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-mavx512vl -O2" } */
+/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\](?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
@@ -11,6 +12,7 @@ volatile __mmask8 m;
void extern
avx512vl_test (void)
{
+ x = _mm256_permutexvar_epi64 (x, x);
x = _mm256_maskz_permutexvar_epi64 (m, x, x);
x = _mm256_mask_permutexvar_epi64 (x, m, x, x);
}
diff --git a/gcc/testsuite/gcc.target/i386/pr84310-2.c b/gcc/testsuite/gcc.target/i386/pr84310-2.c
new file mode 100644
index 00000000000..dbf5db6ff87
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr84310-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -malign-loops=16" } */
+/* { dg-warning "is obsolete" "" { target *-*-* } 0 } */
+
+void
+c (void)
+{
+ for (;;)
+ ;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr84310.c b/gcc/testsuite/gcc.target/i386/pr84310.c
new file mode 100644
index 00000000000..f82327e45f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr84310.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -falign-functions=100000" } */
+/* { dg-error "is not between 0 and 65536" "" { target *-*-* } 0 } */
+
+void
+test_func (void)
+{
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr84827.c b/gcc/testsuite/gcc.target/i386/pr84827.c
new file mode 100644
index 00000000000..003258c8204
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr84827.c
@@ -0,0 +1,21 @@
+/* PR target/84827 */
+/* { dg-do compile } */
+/* { dg-options "-Ofast -fno-fp-int-builtin-inexact -ftrapping-math -fno-associative-math -mfpmath=387" } */
+
+double
+f1 (double a)
+{
+ return __builtin_round (a);
+}
+
+float
+f2 (float a)
+{
+ return __builtin_roundf (a);
+}
+
+long double
+f3 (long double a)
+{
+ return __builtin_roundl (a);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr85034.c b/gcc/testsuite/gcc.target/i386/pr85034.c
new file mode 100644
index 00000000000..4a35b112174
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr85034.c
@@ -0,0 +1,11 @@
+/* PR inline-asm/85034 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+foo (void)
+{
+ volatile float a;
+ struct S { char a; } b = { 0 };
+ asm volatile ("" : "=r" (a) : "0ir" (b));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr85095-1.c b/gcc/testsuite/gcc.target/i386/pr85095-1.c
new file mode 100644
index 00000000000..4c882e0ed9d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr85095-1.c
@@ -0,0 +1,33 @@
+/* PR target/85095 *
+/* { dg-do compile } */
+/* { dg-options "-O2 -masm=att" } */
+
+unsigned int
+foo (unsigned int a, unsigned int b)
+{
+ a += b;
+ if (a < b) a++;
+ return a;
+}
+
+#ifdef __x86_64__
+unsigned long long
+bar (unsigned long long a, unsigned long long b)
+{
+ a += b;
+ if (a < b) a++;
+ return a;
+}
+
+unsigned long long
+baz (unsigned int a, unsigned int b)
+{
+ a += b;
+ if (a < b) a++;
+ return a;
+}
+#endif
+
+/* { dg-final { scan-assembler-times "adcl\t\\\$0," 1 { target ia32 } } } */
+/* { dg-final { scan-assembler-times "adcl\t\\\$0," 2 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "adcq\t\\\$0," 1 { target { ! ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr85095-2.c b/gcc/testsuite/gcc.target/i386/pr85095-2.c
new file mode 100644
index 00000000000..fbd7992bf4f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr85095-2.c
@@ -0,0 +1,54 @@
+/* PR target/85095 *
+/* { dg-do compile } */
+/* { dg-options "-O2 -masm=att" } */
+
+unsigned int
+f1 (unsigned int a, unsigned int b)
+{
+ unsigned int i = __builtin_add_overflow (a, b, &a);
+ return a + i;
+}
+
+unsigned int
+f2 (unsigned int a, unsigned int b)
+{
+ unsigned int i = __builtin_add_overflow (a, b, &a);
+ return a - i;
+}
+
+#ifdef __x86_64__
+unsigned long long
+f3 (unsigned long long a, unsigned long long b)
+{
+ unsigned long long i = __builtin_add_overflow (a, b, &a);
+ return a + i;
+}
+
+unsigned long long
+f4 (unsigned long long a, unsigned long long b)
+{
+ unsigned long long i = __builtin_add_overflow (a, b, &a);
+ return a - i;
+}
+
+unsigned long long
+f5 (unsigned int a, unsigned int b)
+{
+ unsigned int i = __builtin_add_overflow (a, b, &a);
+ return a + i;
+}
+
+unsigned long long
+f6 (unsigned int a, unsigned int b)
+{
+ unsigned int i = __builtin_add_overflow (a, b, &a);
+ return a - i;
+}
+#endif
+
+/* { dg-final { scan-assembler-times "adcl\t\\\$0," 1 { target ia32 } } } */
+/* { dg-final { scan-assembler-times "sbbl\t\\\$0," 1 { target ia32 } } } */
+/* { dg-final { scan-assembler-times "adcl\t\\\$0," 2 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "sbbl\t\\\$0," 2 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "adcq\t\\\$0," 1 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "sbbq\t\\\$0," 1 { target { ! ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr85193.c b/gcc/testsuite/gcc.target/i386/pr85193.c
new file mode 100644
index 00000000000..98e3dafc7ae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr85193.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-Wno-psabi -O2 -fno-tree-ccp -fno-tree-fre -mno-sse" } */
+
+typedef unsigned char U __attribute__((vector_size(16)));
+typedef unsigned int V __attribute__((vector_size(16)));
+typedef unsigned long long W __attribute__((vector_size(16)));
+
+extern void bar(U, U);
+
+V v;
+
+void
+foo(U f)
+{
+ f[0] = f[0] << (unsigned char)~v[0] | f[~((W)(U){0, 0, 0, 0, 0, 0, 0, 0, 5})[1] & 5] >> (-(unsigned char)~v[0] & 7);
+ bar(f, (U){});
+}
diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
index d2df8b874e0..eee230ca2f6 100644
--- a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
@@ -13,7 +13,7 @@ foo (void)
/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-/* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
+/* { dg-final { scan-assembler "__x86_return_thunk:" } } */
/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
/* { dg-final { scan-assembler-times {\tpause} 2 } } */
/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/pr85056.c b/gcc/testsuite/gcc.target/nvptx/pr85056.c
new file mode 100644
index 00000000000..2471cb83b9e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/pr85056.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-additional-sources "pr85056a.c" } */
+
+extern void abort ();
+
+extern int a[];
+
+int
+main ()
+{
+ int i, sum;
+
+ sum = 0;
+ for (i = 0; i < 10; i++)
+ sum += a[i];
+
+ if (sum != 55)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/nvptx/pr85056a.c b/gcc/testsuite/gcc.target/nvptx/pr85056a.c
new file mode 100644
index 00000000000..a45a5f2b07f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/pr85056a.c
@@ -0,0 +1,3 @@
+/* { dg-skip-if "" { *-*-* } } */
+
+int a[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-1.c b/gcc/testsuite/gcc.target/powerpc/builtins-1.c
index 8d0b7c9b19a..6289302a2b5 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-1.c
@@ -165,3 +165,6 @@ int main ()
return 0;
}
+
+/* Translation of vec_packsu (unsigned long long, unsigned long long) */
+/* { dg-final { scan-assembler-times {\mvpkudus\M} 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c b/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c
index 90e573d2654..92b8f9a9154 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mcpu=power8" } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c b/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c
index e3db2da655c..25a94bca612 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mcpu=power9" } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3.c b/gcc/testsuite/gcc.target/powerpc/builtins-3.c
index bddd0ac91cc..01aa862aaa8 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-3.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-maltivec -mvsx" } */
+/* { dg-options "-O2 -mvsx -mcpu=power6" } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/crypto-builtin-1-runnable.c b/gcc/testsuite/gcc.target/powerpc/crypto-builtin-1-runnable.c
new file mode 100644
index 00000000000..25c27bf9a37
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/crypto-builtin-1-runnable.c
@@ -0,0 +1,109 @@
+/* { dg-do run { target { powerpc*-*-* && p8vector_hw } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O2 " } */
+
+/* Make sure the test case compiled with -O2 generates the same expected
+ results. The expected results were generated with -O0. */
+
+#include <altivec.h>
+#define TRUE 1
+#define FALSE 0
+
+#define DEBUG 1
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+void abort (void);
+
+typedef vector unsigned long long crypto_t;
+typedef vector unsigned long long v2di_t;
+typedef vector unsigned int v4si_t;
+typedef vector unsigned short v8hi_t;
+typedef vector unsigned char v16qi_t;
+
+v16qi_t crypto6a (v16qi_t a, v16qi_t b, v16qi_t c)
+{
+ return __builtin_crypto_vpermxor (a, b, c);
+}
+
+v8hi_t crypto6b (v8hi_t a, v8hi_t b, v8hi_t c)
+{
+ return __builtin_crypto_vpermxor (a, b, c);
+}
+
+v4si_t crypto6c (v4si_t a, v4si_t b, v4si_t c)
+{
+ return __builtin_crypto_vpermxor (a, b, c);
+}
+
+v2di_t crypto6d (v2di_t a, v2di_t b, v2di_t c)
+{
+ return __builtin_crypto_vpermxor (a, b, c);
+}
+
+int main()
+{
+ int i;
+ v16qi_t expected_v16qi, result_v16qi;
+ v8hi_t expected_v8hi, result_v8hi;
+ v4si_t expected_v4si, result_v4si;
+ v2di_t expected_v2di, result_v2di;
+ v16qi_t v16qi_arg_a, v16qi_arg_b, v16qi_arg_c;
+ v8hi_t v8hi_arg_a, v8hi_arg_b, v8hi_arg_c;
+ v4si_t v4si_arg_a, v4si_arg_b, v4si_arg_c;
+ v2di_t v2di_arg_a, v2di_arg_b, v2di_arg_c;
+
+ v16qi_arg_a = (vector unsigned char){ 7, 6, 5, 4, 3, 2, 1, 0,
+ 1, 2, 3, 4, 5, 6, 7, 8 };
+ v16qi_arg_b = (vector unsigned char){ 1, 2, 3, 4, 5, 6, 7, 8,
+ 7, 6, 5, 4, 3, 2, 1, 0 };
+ v16qi_arg_c = (vector unsigned char){ 7, 2, 5, 4, 3, 6, 1, 8,
+ 1, 6, 3, 4, 5, 2, 7, 0 };
+ expected_v16qi = (vector unsigned char){ 15, 10, 13, 12, 11, 14, 9, 0,
+ 9, 14, 11, 12, 13, 10, 15, 8 };
+
+ result_v16qi = crypto6a (v16qi_arg_a, v16qi_arg_b, v16qi_arg_c);
+
+ for (i = 0; i < 16; i++)
+ if (expected_v16qi[i] != result_v16qi[i])
+ printf("crypto6a: result_v16qi[%d] = %d, expected = %d\n",
+ i, result_v16qi[i], expected_v16qi[i]);
+
+ v8hi_arg_a = (vector unsigned short int){ 7, 6, 5, 4, 3, 2, 1, 0};
+ v8hi_arg_b = (vector unsigned short int){ 1, 2, 3, 4, 5, 6, 7, 8};
+ v8hi_arg_c = (vector unsigned short int){ 7, 2, 5, 4, 3, 6, 1, 8};
+ expected_v8hi = (vector unsigned short int){ 5, 0, 6, 0, 7, 0, 8};
+
+ result_v8hi = crypto6b (v8hi_arg_a, v8hi_arg_b, v8hi_arg_c);
+
+ for (i = 0; i < 8; i++)
+ if (expected_v8hi[i] != result_v8hi[i])
+ printf("crypto6a: result_v8hi[%d] = %d, expected = %d\n",
+ i, result_v8hi[i], expected_v8hi[i]);
+
+ v4si_arg_a = (vector unsigned int){ 7, 6, 5, 4};
+ v4si_arg_b = (vector unsigned int){ 15, 6, 7, 8};
+ v4si_arg_c = (vector unsigned int){ 7, 14, 3, 6};
+ expected_v4si = (vector unsigned int){ 7, 0, 8, 0};
+
+ result_v4si = crypto6c (v4si_arg_a, v4si_arg_b, v4si_arg_c);
+
+ for (i = 0; i < 4; i++)
+ if (expected_v4si[i] != result_v4si[i])
+ printf("crypto6a: result_v4si[%d] = %d, expected = %d\n",
+ i, result_v4si[i], expected_v4si[i]);
+
+ v2di_arg_a = (vector unsigned long long int){ 7, 6, };
+ v2di_arg_b = (vector unsigned long long int){ 15, 6, };
+ v2di_arg_c = (vector unsigned long long int){ 7, 14};
+ expected_v2di = (vector unsigned long long int){ 6, 0};
+
+ result_v2di = crypto6d (v2di_arg_a, v2di_arg_b, v2di_arg_c);
+
+ for (i = 0; i < 2; i++)
+ if (expected_v2di[i] != result_v2di[i])
+ printf("crypto6a: result_v2di[%d] = %d, expected = %d\n",
+ i, result_v2di[i], expected_v2di[i]);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/extend-divide-1.c b/gcc/testsuite/gcc.target/powerpc/extend-divide-1.c
index 365dead9fac..aaf9b40fc24 100644
--- a/gcc/testsuite/gcc.target/powerpc/extend-divide-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/extend-divide-1.c
@@ -5,9 +5,7 @@
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
/* { dg-options "-mcpu=power7 -O2" } */
/* { dg-final { scan-assembler-times "divwe " 1 } } */
-/* { dg-final { scan-assembler-times "divweo " 1 } } */
/* { dg-final { scan-assembler-times "divweu " 1 } } */
-/* { dg-final { scan-assembler-times "divweuo " 1 } } */
/* { dg-final { scan-assembler-not "bl __builtin" } } */
int
@@ -16,20 +14,8 @@ div_we (int a, int b)
return __builtin_divwe (a, b);
}
-int
-div_weo (int a, int b)
-{
- return __builtin_divweo (a, b);
-}
-
unsigned int
div_weu (unsigned int a, unsigned int b)
{
return __builtin_divweu (a, b);
}
-
-unsigned int
-div_weuo (unsigned int a, unsigned int b)
-{
- return __builtin_divweuo (a, b);
-}
diff --git a/gcc/testsuite/gcc.target/powerpc/extend-divide-2.c b/gcc/testsuite/gcc.target/powerpc/extend-divide-2.c
index 829cd40cae8..92e494aa136 100644
--- a/gcc/testsuite/gcc.target/powerpc/extend-divide-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/extend-divide-2.c
@@ -5,9 +5,7 @@
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
/* { dg-options "-mcpu=power7 -O2" } */
/* { dg-final { scan-assembler-times "divde " 1 } } */
-/* { dg-final { scan-assembler-times "divdeo " 1 } } */
/* { dg-final { scan-assembler-times "divdeu " 1 } } */
-/* { dg-final { scan-assembler-times "divdeuo " 1 } } */
/* { dg-final { scan-assembler-not "bl __builtin" } } */
long
@@ -16,20 +14,8 @@ div_de (long a, long b)
return __builtin_divde (a, b);
}
-long
-div_deo (long a, long b)
-{
- return __builtin_divdeo (a, b);
-}
-
unsigned long
div_deu (unsigned long a, unsigned long b)
{
return __builtin_divdeu (a, b);
}
-
-unsigned long
-div_deuo (unsigned long a, unsigned long b)
-{
- return __builtin_divdeuo (a, b);
-}
diff --git a/gcc/testsuite/gcc.target/powerpc/p9-vinsert4b-1.c b/gcc/testsuite/gcc.target/powerpc/p9-vinsert4b-1.c
deleted file mode 100644
index fa1ba754705..00000000000
--- a/gcc/testsuite/gcc.target/powerpc/p9-vinsert4b-1.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
-/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
-/* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mcpu=power9 -O2" } */
-
-#include <altivec.h>
-
-vector signed char
-vins_v4si (vector int *vi, vector signed char *vc)
-{
- return vec_vinsert4b (*vi, *vc, 1);
-}
-
-vector unsigned char
-vins_di (long di, vector unsigned char *vc)
-{
- return vec_vinsert4b (di, *vc, 2);
-}
-
-vector char
-vins_di2 (long *p_di, vector char *vc)
-{
- return vec_vinsert4b (*p_di, *vc, 3);
-}
-
-vector unsigned char
-vins_di0 (vector unsigned char *vc)
-{
- return vec_vinsert4b (0, *vc, 4);
-}
-
-long
-vext (vector signed char *vc)
-{
- return vec_vextract4b (*vc, 5);
-}
-
-/* { dg-final { scan-assembler "xxextractuw\|vextuw\[lr\]x" } } */
-/* { dg-final { scan-assembler "xxinsertw" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p9-vinsert4b-2.c b/gcc/testsuite/gcc.target/powerpc/p9-vinsert4b-2.c
deleted file mode 100644
index 3b5872ebec6..00000000000
--- a/gcc/testsuite/gcc.target/powerpc/p9-vinsert4b-2.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
-/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
-/* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mcpu=power9 -O2" } */
-
-#include <altivec.h>
-
-vector signed char
-ins_v4si (vector int vi, vector signed char vc)
-{
- return vec_vinsert4b (vi, vc, 13); /* { dg-error "vec_vinsert4b" } */
-}
-
-vector unsigned char
-ins_di (long di, vector unsigned char vc, long n)
-{
- return vec_vinsert4b (di, vc, n); /* { dg-error "vec_vinsert4b" } */
-}
-
-long
-vext1 (vector signed char vc)
-{
- return vec_vextract4b (vc, 13); /* { dg-error "vec_vextract4b" } */
-}
-
-long
-vextn (vector unsigned char vc, long n)
-{
- return vec_vextract4b (vc, n); /* { dg-error "vec_vextract4b" } */
-}
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c b/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c
index 570c81f7e33..ee77456ca4f 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c
@@ -5,6 +5,7 @@
/* { dg-final { scan-assembler-not "\\.section\[ \t\]\\.sdata2," } } */
/* { dg-final { scan-assembler "sdat@sdarel\\(13\\)" } } */
/* { dg-final { scan-assembler "sdat2@sdarel\\(13\\)" } } */
+/* { dg-skip-if "" { *-*-* } { "-mno-readonly-in-sdata" } { "" } } */
int sdat = 2;
diff --git a/gcc/testsuite/gcc.target/powerpc/pr79799-2.c b/gcc/testsuite/gcc.target/powerpc/pr79799-2.c
index 793e3b9b66c..b1a0b09cbf7 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr79799-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr79799-2.c
@@ -8,7 +8,7 @@
/* Optimize x = vec_insert (vec_extract (v2, N), v1, M) for SFmode if N is the default
scalar position. */
-#if __ORDER_LITTLE_ENDIAN__
+#if __LITTLE_ENDIAN__
#define ELE 2
#else
#define ELE 1
diff --git a/gcc/testsuite/gcc.target/powerpc/pr81572.c b/gcc/testsuite/gcc.target/powerpc/pr81572.c
new file mode 100644
index 00000000000..de00c187d62
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr81572.c
@@ -0,0 +1,13 @@
+/* { dg-do compile { target powerpc64*-*-* } } */
+/* { dg-options "-O2 -mcpu=power7" } */
+/* { dg-final { scan-assembler-not "xxlor" } } */
+
+#include <altivec.h>
+
+typedef __vector unsigned char nvec_t;
+
+long testz_and(nvec_t a, nvec_t b)
+{
+ nvec_t c = vec_andc(a, b);
+ return vec_all_eq(a, c);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr83660.C b/gcc/testsuite/gcc.target/powerpc/pr83660.C
new file mode 100644
index 00000000000..60adcdacb4b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr83660.C
@@ -0,0 +1,14 @@
+/* PR target/83660 */
+/* { dg-do compile } */
+/* { dg-options "-mcpu=power7" } */
+
+#include <altivec.h>
+
+typedef __vector unsigned int uvec32_t __attribute__((__aligned__(16)));
+
+unsigned get_word(uvec32_t v)
+{
+ return ({const unsigned _B1 = 32;
+ vec_extract((uvec32_t)v, 2);});
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr83969.c b/gcc/testsuite/gcc.target/powerpc/pr83969.c
new file mode 100644
index 00000000000..fe61594be16
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr83969.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=G5" } } */
+/* { dg-options "-O1 -mcpu=G5 -fno-split-wide-types -ftree-loop-vectorize" } */
+
+long long int
+n7 (int po, long long int r4)
+{
+ while (po < 1)
+ {
+ r4 |= 1;
+ ++po;
+ }
+ return r4;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr84700.c b/gcc/testsuite/gcc.target/powerpc/pr84700.c
new file mode 100644
index 00000000000..c89094a56d3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr84700.c
@@ -0,0 +1,12 @@
+/* PR target/84700 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -misel" } */
+
+long long int
+foo (long long int x)
+{
+ long long int a = x < 2;
+ int b = a >= 0;
+
+ return a + ((x == 0) ? a : b);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr84878.c b/gcc/testsuite/gcc.target/powerpc/pr84878.c
new file mode 100644
index 00000000000..f96d3803d06
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr84878.c
@@ -0,0 +1,18 @@
+/* PR rtl-optimization/84878 */
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-O2 -maltivec -mno-vsx -fmodulo-sched -ftree-vectorize -funroll-loops -fassociative-math -fno-signed-zeros -fno-trapping-math" } */
+
+int ek;
+float zu;
+
+int
+k5 (int ks)
+{
+ while (ek < 1)
+ {
+ ks += (int)(0x1000000 + zu + !ek);
+ ++ek;
+ }
+ return ks;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr85698.c b/gcc/testsuite/gcc.target/powerpc/pr85698.c
new file mode 100644
index 00000000000..294a5665b32
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr85698.c
@@ -0,0 +1,79 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
+/* { dg-options "-O3 -mcpu=power7" } */
+
+/* PR85698: Incorrect code generated on LE due to use of stxvw4x. */
+
+typedef unsigned char uint8_t;
+typedef short int16_t;
+extern void abort (void);
+extern int memcmp(const void *, const void *, __SIZE_TYPE__);
+
+uint8_t expected[128] =
+{14, 0, 4, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 28, 35, 33, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 66, 63, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 96,
+ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127};
+
+static uint8_t x264_clip_uint8( int x )
+{
+ return x&(~255) ? (-x)>>31 : x;
+}
+void add4x4_idct( uint8_t *p_dst, int16_t dct[16])
+{
+ int16_t d[16];
+ int16_t tmp[16];
+ int i, y, x;
+ for( i = 0; i < 4; i++ )
+ {
+ int s02 = dct[0*4+i] + dct[2*4+i];
+ int d02 = dct[0*4+i] - dct[2*4+i];
+ int s13 = dct[1*4+i] + (dct[3*4+i]>>1);
+ int d13 = (dct[1*4+i]>>1) - dct[3*4+i];
+ tmp[i*4+0] = s02 + s13;
+ tmp[i*4+1] = d02 + d13;
+ tmp[i*4+2] = d02 - d13;
+ tmp[i*4+3] = s02 - s13;
+ }
+ for( i = 0; i < 4; i++ )
+ {
+ int s02 = tmp[0*4+i] + tmp[2*4+i];
+ int d02 = tmp[0*4+i] - tmp[2*4+i];
+ int s13 = tmp[1*4+i] + (tmp[3*4+i]>>1);
+ int d13 = (tmp[1*4+i]>>1) - tmp[3*4+i];
+ d[0*4+i] = ( s02 + s13 + 32 ) >> 6;
+ d[1*4+i] = ( d02 + d13 + 32 ) >> 6;
+ d[2*4+i] = ( d02 - d13 + 32 ) >> 6;
+ d[3*4+i] = ( s02 - s13 + 32 ) >> 6;
+ }
+ for( y = 0; y < 4; y++ )
+ {
+ for( x = 0; x < 4; x++ )
+ p_dst[x] = x264_clip_uint8( p_dst[x] + d[y*4+x] );
+ p_dst += 32;
+ }
+}
+
+int main()
+{
+ uint8_t dst[128];
+ int16_t dct[16];
+ int i;
+
+ for (i = 0; i < 16; i++)
+ dct[i] = i*10 + i;
+ for (i = 0; i < 128; i++)
+ dst[i] = i;
+
+ add4x4_idct(dst, dct);
+
+ if (memcmp (dst, expected, 128))
+ abort();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr85755.c b/gcc/testsuite/gcc.target/powerpc/pr85755.c
new file mode 100644
index 00000000000..2d8741d639e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr85755.c
@@ -0,0 +1,22 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-options "-O1" } */
+
+void
+preinc (long *q, long n)
+{
+ long i;
+ for (i = 0; i < n; i++)
+ q[i] = i;
+}
+
+void
+predec (long *q, long n)
+{
+ long i;
+ for (i = n; i >= 0; i--)
+ q[i] = i;
+}
+
+/* { dg-final { scan-assembler-times {\mstwu\M} 2 { target ilp32 } } } */
+/* { dg-final { scan-assembler-times {\mstdu\M} 2 { target lp64 } } } */
+/* { dg-final { scan-assembler-not {\mstfdu\M} } } */
diff --git a/gcc/testsuite/gcc.target/s390/htm-builtins-compile-4.c b/gcc/testsuite/gcc.target/s390/htm-builtins-compile-4.c
new file mode 100644
index 00000000000..c3866bde4a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-builtins-compile-4.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+/* A bug in the builtin definition made__builtin_tbeginc to have an
+ integer return argument. */
+void
+must_not_compile1 (void)
+{
+ int rc = __builtin_tbeginc (); /* { dg-error "void value not ignored as it ought to be" } */
+}
diff --git a/gcc/testsuite/gcc.target/s390/nobp-no-dwarf2-cfi.c b/gcc/testsuite/gcc.target/s390/nobp-no-dwarf2-cfi.c
new file mode 100644
index 00000000000..75e32a1c7c0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/nobp-no-dwarf2-cfi.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -march=z900 --save-temps -mfunction-return-reg=thunk -mindirect-branch-table -fno-dwarf2-cfi-asm" } */
+
+/* Make sure that we do not emit .cfi directives when -fno-dwarf2-cfi-asm is being used. */
+
+int
+main ()
+{
+ return 0;
+}
+
+/* 1 x main
+/* { dg-final { scan-assembler-times "jg\t__s390_indirect_jump" 1 } } */
+/* { dg-final { scan-assembler "ex\t" } } */
+
+/* { dg-final { scan-assembler-not "section\t.s390_indirect_jump" } } */
+/* { dg-final { scan-assembler-not "section\t.s390_indirect_call" } } */
+/* { dg-final { scan-assembler "section\t.s390_return_reg" } } */
+/* { dg-final { scan-assembler-not "section\t.s390_return_mem" } } */
diff --git a/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90 b/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90
index 95571fdfe12..12005a6cc16 100644
--- a/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90
@@ -22,7 +22,7 @@ program a
allocate(i(2))) ! { dg-error "Syntax error in ALLOCATE" }
allocate(i(2), errmsg=err, errmsg=err) ! { dg-error "Redundant ERRMSG" }
allocate(i(2), errmsg=err) ! { dg-warning "useless without a STAT" }
- allocate(i(2), stat=j, errmsg=x) ! { dg-error "must be a scalar CHARACTER" }
+ allocate(i(2), stat=j, errmsg=x) ! { dg-error "shall be a scalar default CHARACTER" }
allocate(err) ! { dg-error "neither a data pointer nor an allocatable" }
diff --git a/gcc/testsuite/gfortran.dg/allocate_alloc_opt_14.f90 b/gcc/testsuite/gfortran.dg/allocate_alloc_opt_14.f90
new file mode 100644
index 00000000000..6de43a7597f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_alloc_opt_14.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+program p
+ integer, allocatable :: arr(:)
+ integer :: stat
+ character(len=128, kind=4) :: errmsg = ' '
+ allocate (arr(3), stat=stat, errmsg=errmsg) ! { dg-error "shall be a scalar default CHARACTER" }
+ print *, allocated(arr), stat, trim(errmsg)
+end
diff --git a/gcc/testsuite/gfortran.dg/allocate_assumed_charlen_4.f90 b/gcc/testsuite/gfortran.dg/allocate_assumed_charlen_4.f90
new file mode 100644
index 00000000000..1a5539a642b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_assumed_charlen_4.f90
@@ -0,0 +1,39 @@
+! { dg-do run }
+!
+! Test the fix for PR82923, in which an ICE occurred because the
+! character length from 'getchars' scope was being used in the
+! automatic allocation of 'mine'.
+!
+! Contributed by "Werner Blokbuster" <werner.blokbuster@gmail.com>
+!
+module m
+ implicit none
+contains
+ function getchars(my_len,my_size)
+ integer, intent(in) :: my_len, my_size
+ character(my_len) :: getchars(my_size)
+ getchars = 'A-'
+ end function getchars
+
+ function getchars2(my_len)
+ integer, intent(in) :: my_len
+ character(my_len) :: getchars2
+ getchars2 = 'B--'
+ end function getchars2
+end module m
+
+program testca
+ use m, only: getchars, getchars2
+ implicit none
+ character(:), allocatable :: mine(:)
+ character(:), allocatable :: mine2
+ integer :: i
+
+ ! ICE occured at this line:
+ mine = getchars(2,4)
+ if (any (mine .ne. [('A-', i = 1, 4)])) stop 1
+
+ ! The scalar version was fine and this will keep it so:
+ mine2 = getchars2(3)
+ if (mine2 .ne. 'B--') stop 2
+end program testca
diff --git a/gcc/testsuite/gfortran.dg/allocate_stat_2.f90 b/gcc/testsuite/gfortran.dg/allocate_stat_2.f90
index 7cf6d659ea2..a28a2536046 100644
--- a/gcc/testsuite/gfortran.dg/allocate_stat_2.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_stat_2.f90
@@ -5,6 +5,6 @@ program main
character(len=30), dimension(2) :: er
integer, dimension (:), allocatable :: a
allocate (a (16), stat = ier) ! { dg-error "must be a scalar INTEGER" }
- allocate (a (14), stat=ier(1),errmsg=er) ! { dg-error "must be a scalar CHARACTER" }
+ allocate (a (14), stat=ier(1),errmsg=er) ! { dg-error "shall be a scalar default CHARACTER" }
end
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_52.f90 b/gcc/testsuite/gfortran.dg/array_constructor_52.f90
new file mode 100644
index 00000000000..63581acf989
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_52.f90
@@ -0,0 +1,11 @@
+! { dg-do run }
+! PR 84931 - long array constructors with type conversion were not
+! handled correctly.
+program test
+ implicit none
+ integer, parameter :: n = 2**16
+ real, dimension(n) :: y
+ integer :: i
+ y = (/ (1, i=1, n) /)
+ if (y(2) /= 1) stop 1
+end program test
diff --git a/gcc/testsuite/gfortran.dg/associate_30.f90 b/gcc/testsuite/gfortran.dg/associate_30.f90
index ad15d8bf576..ecc9ad06a56 100644
--- a/gcc/testsuite/gfortran.dg/associate_30.f90
+++ b/gcc/testsuite/gfortran.dg/associate_30.f90
@@ -8,8 +8,3 @@
associate (x => null()) ! { dg-error "cannot be NULL()" }
end associate
end subroutine
-
- subroutine s2
- associate (x => [null()]) ! { dg-error "has no type" }
- end associate
- end subroutine
diff --git a/gcc/testsuite/gfortran.dg/associate_33.f03 b/gcc/testsuite/gfortran.dg/associate_33.f03
new file mode 100644
index 00000000000..1f87b22e8e4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associate_33.f03
@@ -0,0 +1,11 @@
+! { dg-do run }
+!
+! Test the fix for PR83898.f90
+!
+! Contributed by G Steinmetz <gscfq@t-online.de>
+!
+program p
+ associate (x => ['1','2'])
+ if (any (x .ne. ['1','2'])) call abort
+ end associate
+end
diff --git a/gcc/testsuite/gfortran.dg/char_result_18.f90 b/gcc/testsuite/gfortran.dg/char_result_18.f90
new file mode 100644
index 00000000000..f47c88ad4b3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/char_result_18.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! Tests the fix for PR80657.
+!
+! Contributed by Vittorio Zecca <zeccav@gmail.com>
+!
+function f(x)
+implicit character(len(f)) (x) ! { dg-error "Self reference in character length" }
+character(len(x)) f
+end
diff --git a/gcc/testsuite/gfortran.dg/class_67.f90 b/gcc/testsuite/gfortran.dg/class_67.f90
new file mode 100644
index 00000000000..20029939d64
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_67.f90
@@ -0,0 +1,55 @@
+! { dg-do run }
+!
+! Test the fix for PR78990 in which the scalarization of the assignment
+! in the main program failed for two reasons: (i) The conversion of 'v1'
+! into a class actual was being done after the call to 'return_t1', giving
+! rise to the ICE reported in comment #1; and (ii) The 'info' descriptor,
+! required for scalarization was not set, which gave rise to the ICE noted
+! by the contributor.
+!
+! Contributed by Chris Macmackin <cmacmackin@gmail.com>
+!
+module test_type
+ implicit none
+
+ type t1
+ integer :: i
+ contains
+ procedure :: assign
+ generic :: assignment(=) => assign
+ end type t1
+
+contains
+
+ elemental subroutine assign(this,rhs)
+ class(t1), intent(inout) :: this
+ class(t1), intent(in) :: rhs
+ this%i = rhs%i
+ end subroutine assign
+
+ function return_t1(arg)
+ class(t1), dimension(:), intent(in) :: arg
+ class(t1), dimension(:), allocatable :: return_t1
+ allocate(return_t1(size(arg)), source=arg)
+ end function return_t1
+
+ function return_t1_p(arg)
+ class(t1), dimension(:), intent(in), target :: arg
+ class(t1), dimension(:), pointer :: return_t1_p
+ return_t1_p => arg
+ end function return_t1_p
+end module test_type
+
+program test
+ use test_type
+ implicit none
+
+ type(t1), dimension(3) :: v1, v2
+ v1%i = [1,2,3]
+ v2 = return_t1(v1)
+ if (any (v2%i .ne. v1%i)) call abort
+
+ v1%i = [4,5,6]
+ v2 = return_t1_p(v1)
+ if (any (v2%i .ne. v1%i)) call abort
+end program test
diff --git a/gcc/testsuite/gfortran.dg/coarray/get_to_indexed_array_1.f90 b/gcc/testsuite/gfortran.dg/coarray/get_to_indexed_array_1.f90
new file mode 100644
index 00000000000..04714711707
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray/get_to_indexed_array_1.f90
@@ -0,0 +1,32 @@
+! { dg-do run }
+
+! Test that index vector on lhs of caf-expression works correctly.
+
+program pr81773
+
+ integer, parameter :: ndim = 5
+ integer :: i
+ integer :: vec(ndim) = -1
+ integer :: res(ndim)[*] = [ (i, i=1, ndim) ]
+ type T
+ integer :: padding
+ integer :: dest(ndim)
+ integer :: src(ndim)
+ end type
+
+ type(T) :: dest
+ type(T), allocatable :: caf[:]
+
+ vec([ndim, 3, 1]) = res(1:3)[1]
+ if (any (vec /= [ 3, -1, 2, -1, 1])) stop 1
+
+ dest = T(42, [ ( -1, i = 1, ndim ) ], [ ( i - 2, i = ndim, 1, -1) ] )
+ dest%dest([ 4,3,2 ]) = res(3:5)[1]
+ if (any (dest%dest /= [-1, 5, 4, 3, -1])) stop 2
+
+ vec(:) = -1
+ allocate(caf[*], source = T(42, [ ( -1, i = 1, ndim ) ], [ ( i - 2, i = ndim, 1, -1) ] ))
+ vec([ 5,3,2 ]) = caf[1]%src(2:4)
+ if (any (vec /= [ -1, 0, 1, -1, 2])) stop 3
+end
+
diff --git a/gcc/testsuite/gfortran.dg/coarray/get_to_indirect_array.f90 b/gcc/testsuite/gfortran.dg/coarray/get_to_indirect_array.f90
new file mode 100644
index 00000000000..efb78353637
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray/get_to_indirect_array.f90
@@ -0,0 +1,28 @@
+! { dg-do run }
+!
+! Test that pr81773/fortran is fixed.
+
+program get_to_indexed_array
+
+ integer, parameter :: ndim = 5
+ integer :: i
+ integer :: vec(1:ndim) = 0
+ integer :: indx(1:2) = [3, 2]
+ integer :: mat(1:ndim, 1:ndim) = 0
+ integer :: res(1:ndim)[*]=[ (i, i=1, ndim) ]
+
+ ! No sync needed, because this test always is running on single image
+ vec([ndim , 1]) = res(1:2)[1]
+ if (vec(1) /= res(2) .or. vec(ndim) /= res(1)) then
+ print *,"vec: ", vec, " on image: ", this_image()
+ stop 1
+ end if
+
+ mat(2:3,[indx(:)]) = reshape(res(1:4)[1], [2, 2])
+ if (any(mat(2:3, 3:2:-1) /= reshape(res(1:4), [2,2]))) then
+ print *, "mat: ", mat, " on image: ", this_image()
+ stop 2
+ end if
+end
+
+! vim:ts=2:sts=2:sw=2:
diff --git a/gcc/testsuite/gfortran.dg/coarray_3.f90 b/gcc/testsuite/gfortran.dg/coarray_3.f90
index aba4eb1bc84..d152ce1b2bd 100644
--- a/gcc/testsuite/gfortran.dg/coarray_3.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_3.f90
@@ -13,7 +13,7 @@ end critical fkl ! { dg-error "Expecting END PROGRAM" }
sync all (stat=1) ! { dg-error "Syntax error in SYNC ALL" }
sync all ( stat = n,stat=k) ! { dg-error "Redundant STAT" }
-sync memory (errmsg=str)
+sync memory (errmsg=str) ! { dg-error "must be a scalar CHARACTER variable" }
sync memory (errmsg=n) ! { dg-error "must be a scalar CHARACTER variable" }
sync images (*, stat=1.0) ! { dg-error "Syntax error in SYNC IMAGES" }
sync images (-1) ! { dg-error "must between 1 and num_images" }
diff --git a/gcc/testsuite/gfortran.dg/coarray_45.f90 b/gcc/testsuite/gfortran.dg/coarray_45.f90
new file mode 100644
index 00000000000..87763563efe
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_45.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -lcaf_single " }
+!
+! Test the fix for PR83076
+!
+module m
+ type t
+ integer, pointer :: z
+ end type
+ type(t) :: ptr
+contains
+ function g(x)
+ type(t) :: x[*]
+ if (associated (x%z, ptr%z)) deallocate (x%z) ! This used to ICE with -fcoarray=lib
+ end
+end module
+
+ use m
+contains
+ function f(x)
+ type(t) :: x[*]
+ if (associated (x%z, ptr%z)) deallocate (x%z)
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/coarray_46.f90 b/gcc/testsuite/gfortran.dg/coarray_46.f90
new file mode 100644
index 00000000000..273c6e86840
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_46.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -lcaf_single" }
+!
+! Test the fix for PR83319
+!
+module foo_module
+ implicit none
+ type foo
+ integer, allocatable :: i(:)
+ end type
+end module
+
+ use foo_module
+ implicit none
+ type(foo), save :: bar[*]
+ allocate(bar%i(1)) ! Used to ICE here.
+end
diff --git a/gcc/testsuite/gfortran.dg/coarray_8.f90 b/gcc/testsuite/gfortran.dg/coarray_8.f90
index db6eb6c2e2d..060f94118ac 100644
--- a/gcc/testsuite/gfortran.dg/coarray_8.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_8.f90
@@ -145,7 +145,7 @@ end module mmm4
subroutine tfgh()
integer :: i(2)
- DATA i/(i, i=1,2)/ ! { dg-error "Expected PARAMETER symbol" }
+ DATA i/(i, i=1,2)/ ! { dg-error "Syntax error in DATA" }
do i = 1, 5 ! { dg-error "cannot be an array" }
end do ! { dg-error "Expecting END SUBROUTINE" }
end subroutine tfgh
@@ -153,7 +153,7 @@ end subroutine tfgh
subroutine tfgh2()
integer, save :: x[*]
integer :: i(2)
- DATA i/(x, x=1,2)/ ! { dg-error "Expected PARAMETER symbol" }
+ DATA i/(x, x=1,2)/ ! { dg-error "Syntax error in DATA" }
do x = 1, 5 ! { dg-error "cannot be a coarray" }
end do ! { dg-error "Expecting END SUBROUTINE" }
end subroutine tfgh2
diff --git a/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90 b/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
new file mode 100644
index 00000000000..dc4cbacba1e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -lcaf_single" }
+!
+! Check that reffing x on both sides of a coarray send does not ICE.
+! PR 85507
+
+program check_dependency
+ integer :: x[*]
+ x[42] = x
+end program check_dependency
+
diff --git a/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 b/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90
index 8ad6b081a13..df3b9d439b1 100644
--- a/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90
@@ -38,9 +38,8 @@ B(1:5) = B(3:7)
if (any (A-B /= 0)) call abort
end
-! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, &parm.\[0-9\]+, 4, 4, 0, 0B\\\);" 1 "original" } }
-! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, &parm.\[0-9\]+, 4, 4, 1, 0B\\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, &parm.\[0-9\]+, 4, 4, 1, 0B\\\);" 2 "original" } }
! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, &p, 4, 4, 1, 0B\\\);" 1 "original" } }
! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.1, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) b, 1, &parm.\[0-9\]+, 0B, &p, 4, 4, 0, 0B\\\);" 1 "original" } }
-! { dg-final { scan-tree-dump-times "_gfortran_caf_sendget \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, 4, 4, 0, 0B\\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_sendget \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, 4, 4, 1, 0B\\\);" 1 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/data_bounds_1.f90 b/gcc/testsuite/gfortran.dg/data_bounds_1.f90
index b20aa415b8a..24cdc7c9815 100644
--- a/gcc/testsuite/gfortran.dg/data_bounds_1.f90
+++ b/gcc/testsuite/gfortran.dg/data_bounds_1.f90
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-std=gnu" }
! Checks the fix for PR32315, in which the bounds checks below were not being done.
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
diff --git a/gcc/testsuite/gfortran.dg/data_char_1.f90 b/gcc/testsuite/gfortran.dg/data_char_1.f90
index 96db4fd30eb..24785b636fa 100644
--- a/gcc/testsuite/gfortran.dg/data_char_1.f90
+++ b/gcc/testsuite/gfortran.dg/data_char_1.f90
@@ -1,4 +1,5 @@
! { dg-do run }
+! { dg-options "-std=gnu" }
! Test character variables in data statements
! Also substrings of character variables.
! PR14976 PR16228
diff --git a/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90 b/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
index 969ce257efe..58790ebfb58 100644
--- a/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
+++ b/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
@@ -22,7 +22,7 @@ program a
deallocate(i)) ! { dg-error "Syntax error in DEALLOCATE" }
deallocate(i, errmsg=err, errmsg=err) ! { dg-error "Redundant ERRMSG" }
deallocate(i, errmsg=err) ! { dg-warning "useless without a STAT" }
- deallocate(i, stat=j, errmsg=x) ! { dg-error "must be a scalar CHARACTER" }
+ deallocate(i, stat=j, errmsg=x) ! { dg-error "shall be a scalar default CHARACTER" }
deallocate(err) ! { dg-error "nonprocedure pointer nor an allocatable" }
diff --git a/gcc/testsuite/gfortran.dg/goacc/pr84963.f90 b/gcc/testsuite/gfortran.dg/goacc/pr84963.f90
new file mode 100644
index 00000000000..4548082bee3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/pr84963.f90
@@ -0,0 +1,7 @@
+! PR ipa/84963
+! { dg-options "-O2" }
+
+program p
+ print *, sin([1.0, 2.0])
+ print *, cos([1.0, 2.0])
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr85313.f90 b/gcc/testsuite/gfortran.dg/gomp/pr85313.f90
new file mode 100644
index 00000000000..04599849ed7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr85313.f90
@@ -0,0 +1,25 @@
+! PR fortran/85313
+! { dg-do compile }
+
+!$omp do collapse(3)
+ do i = 1, 10
+ do j = i, 20 ! { dg-error "form rectangular iteration space" }
+ do k = 1, 2
+ end do
+ end do
+ end do
+!$omp do collapse(3)
+ do i = 1, 10
+ do j = 1, 5
+ do k = i, 20 ! { dg-error "form rectangular iteration space" }
+ end do
+ end do
+ end do
+!$omp do collapse(3)
+ do i = 1, 10
+ do j = 1, 5
+ do k = j, 20 ! { dg-error "form rectangular iteration space" }
+ end do
+ end do
+ end do
+end
diff --git a/gcc/testsuite/gfortran.dg/implied_do_2.f90 b/gcc/testsuite/gfortran.dg/implied_do_2.f90
new file mode 100644
index 00000000000..5078ac804d3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/implied_do_2.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! PR fortran/56667
+program error_message
+ implicit none
+ integer :: ir
+ write(*,*) ( ir, ir = 1,10 ! { dg-error "Expected a right parenthesis" }
+end program error_message
diff --git a/gcc/testsuite/gfortran.dg/init_flag_17.f90 b/gcc/testsuite/gfortran.dg/init_flag_17.f90
new file mode 100644
index 00000000000..401830fccbc
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/init_flag_17.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+! { dg-options "-finit-derived -finit-local-zero -fdump-tree-original" }
+!
+! PR fortran/82972
+!
+! Make sure we do not ICE when generating initializers for c_ptr and c_funptr
+! components of derived types (and make sure they are properly initialized to
+! zero).
+!
+
+program init_flag_17
+ use iso_c_binding
+ implicit none
+
+ type :: ty
+ type(c_ptr) :: ptr ! = c_null_ptr
+ type(c_funptr) :: fptr ! = c_null_funptr
+ end type
+
+ type(ty) :: t
+
+ print *, t%ptr
+ print *, t%fptr
+
+end program
+
+! { dg-final { scan-tree-dump "\.ptr=0" "original" } }
+! { dg-final { scan-tree-dump "\.fptr=0" "original" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_41.f90 b/gcc/testsuite/gfortran.dg/interface_41.f90
new file mode 100644
index 00000000000..b5ea8af189d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/interface_41.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+! PR fortran/85001
+! Contributed by Gerhard Steinmetz.
+program p
+ type t
+ end type
+ call s
+contains
+ real function f(x)
+ class(t) :: x
+ dimension :: x(:)
+ f = 1.0
+ end
+ subroutine s
+ type(t) :: x(2)
+ real :: z
+ z = f(x) ! { dg-error "Rank mismatch in argument" }
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/internal_references_1.f90 b/gcc/testsuite/gfortran.dg/internal_references_1.f90
index 12041df9d70..2434e28d5e3 100644
--- a/gcc/testsuite/gfortran.dg/internal_references_1.f90
+++ b/gcc/testsuite/gfortran.dg/internal_references_1.f90
@@ -11,7 +11,7 @@ module m
implicit none
contains
- subroutine p (i) ! { dg-error "is already defined" }
+ subroutine p (i) ! { dg-error "(1)" }
integer :: i
end subroutine
@@ -22,14 +22,15 @@ end module
!
! PR25124 - would happily ignore the declaration of foo in the main program.
program test
-real :: foo, x ! { dg-error "explicit interface and must not have attributes declared" }
+real :: foo, x
x = bar () ! This is OK because it is a regular reference.
x = foo ()
contains
- function foo () ! { dg-error "explicit interface and must not have attributes declared" }
+ function foo () ! { dg-error "explicit interface from a previous" }
foo = 1.0
end function foo
function bar ()
bar = 1.0
end function bar
end program test
+
diff --git a/gcc/testsuite/gfortran.dg/matmul_rank_1.f90 b/gcc/testsuite/gfortran.dg/matmul_rank_1.f90
new file mode 100644
index 00000000000..f111b26018f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/matmul_rank_1.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-additional-options "-ffrontend-optimize" }
+! PR 85044 - used to die on allocating a negative amount of memory.
+! Test case by Gerhard Steinmetz.
+program p
+ real :: a(3,3) = 1.0
+ real :: b(33)
+ b = matmul(a, a) ! { dg-error "Incompatible ranks" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr38351.f90 b/gcc/testsuite/gfortran.dg/pr38351.f90
new file mode 100644
index 00000000000..08e1724dc0a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr38351.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+module m1
+ type t1
+ integer :: i
+ end type t1
+ interface operator(+)
+ module procedure add
+ end interface
+ contains
+ type(t1) function add(a,b)
+ type(t1), intent(in) :: a,b
+ end function
+end module m1
+
+program foo
+ use m1
+ type(t1), dimension(2,2) :: a = t1(1), b = t1(2)
+ type(t1) :: c=t1(1), d=t1(2)
+ c = c + d
+ a = a + b ! { dg-error "Unexpected derived-type entities" }
+end program foo
diff --git a/gcc/testsuite/gfortran.dg/pr44491.f90 b/gcc/testsuite/gfortran.dg/pr44491.f90
new file mode 100644
index 00000000000..406bb262f71
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr44491.f90
@@ -0,0 +1,5 @@
+! { dg-do compile }
+! { dg-options "-std=gnu" }
+! PR fortran/44491
+ character*2 escape /z'1B'/ ! { dg-error "Incompatible types in DATA" }
+ end
diff --git a/gcc/testsuite/gfortran.dg/pr51434.f90 b/gcc/testsuite/gfortran.dg/pr51434.f90
new file mode 100644
index 00000000000..31679ec5d78
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr51434.f90
@@ -0,0 +1,19 @@
+! { dg-do run }
+! PR fortran/51434
+module foo
+ implicit none
+ integer, parameter :: n = 5
+ character(len=1), parameter :: s(n) = 'a'
+ type :: a
+ integer :: m = n
+ character(len=1):: t(n) = transfer('abcde ', s)
+ end type a
+end module foo
+
+program bar
+ use foo
+ implicit none
+ type(a) c
+ if (c%m /= n) stop 1
+ if (any(c%t /= ['a', 'b', 'c', 'd', 'e'])) stop 2
+end program bar
diff --git a/gcc/testsuite/gfortran.dg/pr63514.f90 b/gcc/testsuite/gfortran.dg/pr63514.f90
new file mode 100644
index 00000000000..389fb92608e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr63514.f90
@@ -0,0 +1,41 @@
+! { dg-do compile }
+! PR fortran/63514.f90
+program foo
+
+ implicit none
+
+ integer, volatile :: n
+
+ n = 0
+
+ call bar
+ call bah
+
+ contains
+
+ subroutine bar
+ integer k
+ integer, volatile :: m
+ block
+ integer, save :: i
+ integer, volatile :: j
+ i = 42
+ j = 2 * i
+ k = i + j + n
+ end block
+ end subroutine bar
+
+ pure subroutine bah
+ integer k
+ integer, volatile :: m ! { dg-error "cannot be specified in a PURE" }
+ block
+ integer, save :: i ! { dg-error "cannot be specified in a PURE" }
+ integer, volatile :: j ! { dg-error "cannot be specified in a PURE" }
+ i = 42 ! { dg-error "has no IMPLICIT type" }
+ j = 2 * i ! { dg-error "has no IMPLICIT type" }
+ k = i + j + n
+ end block
+ m = k * m ! { dg-error "has no IMPLICIT type" }
+ end subroutine bah
+
+end program foo
diff --git a/gcc/testsuite/gfortran.dg/pr64124.f90 b/gcc/testsuite/gfortran.dg/pr64124.f90
new file mode 100644
index 00000000000..349c20de204
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr64124.f90
@@ -0,0 +1,5 @@
+! { dg-do compile }
+! PR fortran/64124.f90
+ character(len=kind(1)) x
+ integer(len(x)) y
+ end
diff --git a/gcc/testsuite/gfortran.dg/pr65453.f90 b/gcc/testsuite/gfortran.dg/pr65453.f90
new file mode 100644
index 00000000000..8d30116b79d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr65453.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR fortran/65453
+! Contributed by Tobias Burnus <burnus at gcc.gnu.org>
+procedure() :: foo ! { dg-error "(1)" }
+ contains
+ subroutine foo() ! { dg-error "clashes with procedure" }
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/pr67803.f90 b/gcc/testsuite/gfortran.dg/pr67803.f90
index 9a8ff309feb..55a1bbf5794 100644
--- a/gcc/testsuite/gfortran.dg/pr67803.f90
+++ b/gcc/testsuite/gfortran.dg/pr67803.f90
@@ -10,5 +10,4 @@ program p
x = '0' // [character :: 1d1] ! { dg-error "Incompatible typespec for" }
x = '0' // [character :: (0.,1.)] ! { dg-error "Incompatible typespec for" }
x = '0' // [character :: .true.] ! { dg-error "Incompatible typespec for" }
- x = '0' // [character :: null()] ! { dg-error "Incompatible typespec for" }
end
diff --git a/gcc/testsuite/gfortran.dg/pr67805.f90 b/gcc/testsuite/gfortran.dg/pr67805.f90
index 7371991717d..2aedde8977b 100644
--- a/gcc/testsuite/gfortran.dg/pr67805.f90
+++ b/gcc/testsuite/gfortran.dg/pr67805.f90
@@ -22,7 +22,6 @@ subroutine p
s = [character([1.]) :: 'x', 'y'] ! { dg-error "INTEGER expression expected" }
s = [character([1d1]) :: 'x', 'y'] ! { dg-error "INTEGER expression expected" }
s = [character([(0.,1.)]) :: 'x', 'y'] ! { dg-error "INTEGER expression expected" }
- s = [character([null()]) :: 'x', 'y'] ! { dg-error "INTEGER expression expected" }
s = [character(null()) :: 'x', 'y'] ! { dg-error "INTEGER expression expected" }
call foo(s)
end subroutine p
diff --git a/gcc/testsuite/gfortran.dg/pr70409.f90 b/gcc/testsuite/gfortran.dg/pr70409.f90
new file mode 100644
index 00000000000..0372f6e9632
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr70409.f90
@@ -0,0 +1,23 @@
+! { dg-do run }
+! PR fortran/70409
+! Contriubted by Harald Anlauf <anlauf at gmx dot de>
+program foo
+ integer, parameter :: huge_1 = huge(0_1)
+ character( huge_1 ), parameter :: x = 'abc'
+ character( huge(0_1) ), parameter :: y = 'abc'
+ character( huge(0_1)+0 ), parameter :: z = 'abcdef'
+ character( huge(0_1) ) :: a = 'abc'
+ integer, parameter :: huge_2 = huge(0_2)
+ character( huge_2 ), parameter :: u = 'abc'
+ character( huge(0_2) ), parameter :: v = 'abc'
+ character(int(huge(0_2),4)), parameter :: w = 'abcdef'
+ character( huge(0_2) ) :: b = 'abc'
+ if (len(x) /= huge_1) stop 1
+ if (len(y) /= huge_1) stop 2
+ if (len(z) /= huge_1) stop 3
+ if (len(a) /= huge_1) stop 4
+ if (len(u) /= huge_2) stop 5
+ if (len(v) /= huge_2) stop 6
+ if (len(w) /= huge_2) stop 7
+ if (len(b) /= huge_2) stop 8
+end program foo
diff --git a/gcc/testsuite/gfortran.dg/pr70870_1.f90 b/gcc/testsuite/gfortran.dg/pr70870_1.f90
new file mode 100644
index 00000000000..0f9584a36db
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr70870_1.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! PR fortran/70870
+! Contributed by Vittorio Zecca <zeccav at gmail dot com >
+ type t
+ integer :: g=0 ! default initialization
+ end type
+ type(t) :: v2
+ data v2/t(2)/ ! { dg-error "default initialization shall not" }
+ end
diff --git a/gcc/testsuite/gfortran.dg/pr71085.f90 b/gcc/testsuite/gfortran.dg/pr71085.f90
new file mode 100644
index 00000000000..11d9850fb90
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr71085.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+! PR 71085
+!
+! Testcase from PR by Vladimir Fuka <vladimir.fuka@gmail.com>
+!
+program pr71085
+ print *, f()
+contains
+ function f()
+ integer :: f(iargc()*10)
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/pr77414.f90 b/gcc/testsuite/gfortran.dg/pr77414.f90
new file mode 100644
index 00000000000..222c1a31542
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr77414.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! PR fortran/77414
+subroutine a(x) ! { dg-error "(1)" }
+ character(*) :: x
+ contains
+ subroutine a(x) ! { dg-error " is already defined at" }
+ character(*) :: x
+ end subroutine a
+end subroutine a
diff --git a/gcc/testsuite/gfortran.dg/pr78278.f90 b/gcc/testsuite/gfortran.dg/pr78278.f90
new file mode 100644
index 00000000000..fd50e3e1c18
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr78278.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+! { dg-options "-std=f95" }
+! PR fortran/78278
+program p
+ character, pointer :: x => null()
+ data x /null()/ ! { dg-error "GNU Extension: re-initialization" }
+ print *, associated(x)
+end
+
+subroutine foo
+ real :: x = 42
+ data x /0/ ! { dg-error "GNU Extension: re-initialization" }
+ print *, x
+end subroutine foo
diff --git a/gcc/testsuite/gfortran.dg/pr78741.f90 b/gcc/testsuite/gfortran.dg/pr78741.f90
new file mode 100644
index 00000000000..6eb85789f94
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr78741.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! PR fortran/78741
+! Contributed by Gerhard Steinmetz <gerhard.steinmetz.fortran at t-online.de>
+subroutine s(n, x)
+ integer :: n
+ character(n) :: x
+ character, pointer :: z(:)
+ x = 'a'
+ return
+entry g(n, x) ! { dg-error "is already defined" }
+ x = 'b'
+contains
+ subroutine g ! { dg-error "(1)" }
+ z(1) = x(1:1)
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/pr83149.f90 b/gcc/testsuite/gfortran.dg/pr83149.f90
new file mode 100644
index 00000000000..fc0607e1369
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr83149.f90
@@ -0,0 +1,14 @@
+! Compiled with pr83149_1.f90
+!
+module mod1
+ integer :: ncells
+end module
+
+module mod2
+contains
+ function get() result(array)
+ use mod1
+ real array(ncells)
+ array = 1.0
+ end function
+end module
diff --git a/gcc/testsuite/gfortran.dg/pr83149_1.f90 b/gcc/testsuite/gfortran.dg/pr83149_1.f90
new file mode 100644
index 00000000000..3a8f5d55d9b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr83149_1.f90
@@ -0,0 +1,24 @@
+! Compiled with pr83149.f90
+! { dg-do run }
+! { dg-options "-fno-whole-file" }
+! { dg-compile-aux-modules "pr83149.f90" }
+! { dg-additional-sources pr83149.f90 }
+!
+! Contributed by Neil Carlson <neil.n.carlson@gmail.com>
+!
+subroutine sub(s)
+ use mod2
+ real :: s
+ s = sum(get())
+end
+
+ use mod1
+ real :: s
+ ncells = 2
+ call sub (s)
+ if (int (s) .ne. ncells) stop 1
+ ncells = 10
+ call sub (s)
+ if (int (s) .ne. ncells) stop 2
+end
+
diff --git a/gcc/testsuite/gfortran.dg/pr83149_a.f90 b/gcc/testsuite/gfortran.dg/pr83149_a.f90
new file mode 100644
index 00000000000..3f15198bfe9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr83149_a.f90
@@ -0,0 +1,11 @@
+! Compiled with pr83149_b.f90
+!
+module mod
+ character(8) string
+contains
+ function get_string() result(s)
+ character(len_trim(string)) s
+ s = string
+ end function
+end module
+
diff --git a/gcc/testsuite/gfortran.dg/pr83149_b.f90 b/gcc/testsuite/gfortran.dg/pr83149_b.f90
new file mode 100644
index 00000000000..f67ffd95159
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr83149_b.f90
@@ -0,0 +1,16 @@
+! Compiled with pr83149_a.f90
+! { dg-do run }
+! { dg-options "-fno-whole-file" }
+! { dg-compile-aux-modules "pr83149_a.f90" }
+! { dg-additional-sources pr83149_a.f90 }
+!
+! Contributed by Neil Carlson <neil.n.carlson@gmail.com>
+!
+ use mod
+ string = 'fubar'
+ select case (get_string())
+ case ('fubar')
+ case default
+ stop 1
+ end select
+end
diff --git a/gcc/testsuite/gfortran.dg/pr83939.f90 b/gcc/testsuite/gfortran.dg/pr83939.f90
new file mode 100644
index 00000000000..dfeaac71630
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr83939.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+elemental function f() result(s) ! { dg-error "shall not have an ALLOCATABLE or POINTER" }
+ allocatable s
+ allocate(s)
+ s = 3.5
+end function
+
+elemental function g() result(s) ! { dg-error "shall not have an ALLOCATABLE or POINTER" }
+ pointer s
+ allocate(s)
+ s = 3.5
+end function
diff --git a/gcc/testsuite/gfortran.dg/pr84734.f90 b/gcc/testsuite/gfortran.dg/pr84734.f90
new file mode 100644
index 00000000000..4b117ae43e7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr84734.f90
@@ -0,0 +1,4 @@
+! { dg-do compile }
+! PR fortran/84734
+ integer :: b(huge(1_8)+1_8) = 0 ! { dg-error "Arithmetic overflow" }
+ end
diff --git a/gcc/testsuite/gfortran.dg/pr85138_1.f90 b/gcc/testsuite/gfortran.dg/pr85138_1.f90
new file mode 100644
index 00000000000..a64d9ce9329
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85138_1.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+module fox_m_fsys_format
+
+ interface len
+ module procedure str_real_sp_len, str_real_sp_fmt_len
+ end interface
+
+contains
+
+ pure function str_real_sp_fmt_len(x, fmt) result(n)
+ real, intent(in) :: x
+ character(len=*), intent(in) :: fmt
+ if (.not.checkFmt(fmt)) then
+ endif
+ end function str_real_sp_fmt_len
+ pure function str_real_sp_len(x) result(n)
+ real, intent(in) :: x
+ n = len(x, "")
+ end function str_real_sp_len
+ pure function str_real_dp_matrix(xa) result(s)
+ real, intent(in) :: xa
+ character(len=len(xa)) :: s
+ end function str_real_dp_matrix
+
+ pure function checkfmt(s) result(a)
+ logical a
+ character(len=*), intent(in) :: s
+ end function checkfmt
+end module fox_m_fsys_format
diff --git a/gcc/testsuite/gfortran.dg/pr85138_2.f90 b/gcc/testsuite/gfortran.dg/pr85138_2.f90
new file mode 100644
index 00000000000..942cc6684d8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85138_2.f90
@@ -0,0 +1,32 @@
+! { dg-do compile }
+module fox_m_fsys_format
+ interface len
+ module procedure str_real_dp_len, str_real_dp_fmt_len
+ end interface
+contains
+ pure function str_real_dp_fmt_len(x, fmt) result(n)
+ real, intent(in) :: x
+ character(len=*), intent(in) :: fmt
+ if (.not.checkFmt(fmt)) then
+ endif
+ end function str_real_dp_fmt_len
+ pure function str_real_dp_len(x) result(n)
+ real, intent(in) :: x
+ end function str_real_dp_len
+ pure function str_real_dp_array_len(xa) result(n)
+ real, dimension(:), intent(in) :: xa
+ end function str_real_dp_array_len
+ pure function str_real_dp_array_fmt_len(xa, fmt) result(n)
+ real, dimension(:), intent(in) :: xa
+ character(len=*), intent(in) :: fmt
+ end function str_real_dp_array_fmt_len
+ pure function str_real_dp_fmt(x, fmt) result(s)
+ real, intent(in) :: x
+ character(len=*), intent(in) :: fmt
+ character(len=len(x, fmt)) :: s
+ end function str_real_dp_fmt
+ pure function checkFmt(fmt) result(good)
+ character(len=*), intent(in) :: fmt
+ logical :: good
+ end function checkFmt
+end module fox_m_fsys_format
diff --git a/gcc/testsuite/gfortran.dg/pr85520.f90 b/gcc/testsuite/gfortran.dg/pr85520.f90
new file mode 100644
index 00000000000..3e66a9020f8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85520.f90
@@ -0,0 +1,7 @@
+! { dg-do run }
+! PR fortran/85520
+! Original code from Gerhard Steinmetz <gscfq at t-online dot de>
+program p
+ character(-huge(1)) :: c = ' '
+ if (len(c) /= 0) stop 1
+end
diff --git a/gcc/testsuite/gfortran.dg/pr85521_1.f90 b/gcc/testsuite/gfortran.dg/pr85521_1.f90
new file mode 100644
index 00000000000..57e4620fe0d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85521_1.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR fortran/85521
+program p
+ character(3) :: c = 'abc'
+ character(3) :: z(1)
+ z = [ c(:-1) ]
+ print *, z
+end
diff --git a/gcc/testsuite/gfortran.dg/pr85521_2.f90 b/gcc/testsuite/gfortran.dg/pr85521_2.f90
new file mode 100644
index 00000000000..737b61a11b9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85521_2.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR fortran/85521
+program p
+ character(3) :: c = 'abc'
+ character(3) :: z(1)
+ z = [ c(:-2) ]
+ print *, z
+end
diff --git a/gcc/testsuite/gfortran.dg/pr85542.f90 b/gcc/testsuite/gfortran.dg/pr85542.f90
new file mode 100644
index 00000000000..f61d2c9beb0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85542.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! PR fortran/85542
+function f(x)
+ character(*), intent(in) :: x
+ character((len((x)))) :: f
+ f = x
+end
diff --git a/gcc/testsuite/gfortran.dg/pr85543.f90 b/gcc/testsuite/gfortran.dg/pr85543.f90
new file mode 100644
index 00000000000..d3f83276a7f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85543.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR fortran/85543
+program p
+ procedure(), pointer :: z
+contains
+ real(z()) function f() ! { dg-error "in initialization expression at" }
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/pr85687.f90 b/gcc/testsuite/gfortran.dg/pr85687.f90
new file mode 100644
index 00000000000..03bc2119364
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85687.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR fortran/85687
+! Code original contributed by Gerhard Steinmetz gscfq at t-oline dot de
+program p
+ type t
+ end type
+ print *, rank(t) ! { dg-error "must be a data object" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr85779_1.f90 b/gcc/testsuite/gfortran.dg/pr85779_1.f90
new file mode 100644
index 00000000000..186568ff124
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85779_1.f90
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! PR fortran/85779
+type(t) function f() ! { dg-error "is not accessible" }
+ type f ! { dg-error "already has a basic type" }
+ end type ! { dg-error "END FUNCTION statement" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr85779_2.f90 b/gcc/testsuite/gfortran.dg/pr85779_2.f90
new file mode 100644
index 00000000000..4cc3c62979c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85779_2.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! PR fortran/85779
+type(t) function f() result(z) ! { dg-error "is not accessible" }
+ type z ! { dg-error "already has a basic type" }
+ end type ! { dg-error "END FUNCTION statement" }
+end
+
diff --git a/gcc/testsuite/gfortran.dg/pr85779_3.f90 b/gcc/testsuite/gfortran.dg/pr85779_3.f90
new file mode 100644
index 00000000000..fba1133b3ea
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85779_3.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! PR fortran/85779
+class(t) function f() ! { dg-error "must be dummy, allocatable or pointer" }
+ type f ! { dg-error "already has a basic type" }
+ end type ! { dg-error "END FUNCTION statement" }
+end
+
diff --git a/gcc/testsuite/gfortran.dg/pr85780.f90 b/gcc/testsuite/gfortran.dg/pr85780.f90
new file mode 100644
index 00000000000..ad6b27fc4db
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85780.f90
@@ -0,0 +1,5 @@
+! { dg-do compile }
+! { dg-options "-std=legacy" }
+! PR fortran/85780
+subroutine s(*) bind(c)
+end
diff --git a/gcc/testsuite/gfortran.dg/pr85895.f90 b/gcc/testsuite/gfortran.dg/pr85895.f90
new file mode 100644
index 00000000000..184266e5ec8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85895.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib" }
+! PR fortran/85895
+subroutine p
+ character(80) :: c(2)
+ sync memory (errmsg=c) ! { dg-error "scalar CHARACTER variable" }
+end subroutine p
+
+subroutine q
+ character(80) :: c(2)
+ sync memory (errmsg=c(1:2)) ! { dg-error "scalar CHARACTER variable" }
+end subroutine q
+
+subroutine r
+ character(80) :: c(2)
+ sync memory (errmsg=c(1))
+end subroutine r
diff --git a/gcc/testsuite/gfortran.dg/pr85996.f90 b/gcc/testsuite/gfortran.dg/pr85996.f90
new file mode 100644
index 00000000000..e594d6771c8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85996.f90
@@ -0,0 +1,69 @@
+! { dg-do compile }
+module strings
+
+ type string
+ integer :: len = 0, size = 0
+ character, pointer :: chars(:) => null()
+ end type string
+
+ interface length
+ module procedure len_s
+ end interface
+
+ interface char
+ module procedure s_to_c, s_to_slc
+ end interface
+
+ interface uppercase
+ module procedure uppercase_c
+ end interface
+
+ interface replace
+ module procedure replace_ccs
+ end interface
+
+ contains
+
+ elemental function len_s(s)
+ type(string), intent(in) :: s
+ integer :: len_s
+ end function len_s
+
+ pure function s_to_c(s)
+ type(string),intent(in) :: s
+ character(length(s)) :: s_to_c
+ end function s_to_c
+
+ pure function s_to_slc(s,long)
+ type(string),intent(in) :: s
+ integer, intent(in) :: long
+ character(long) :: s_to_slc
+ end function s_to_slc
+
+ pure function lr_sc_s(s,start,ss) result(l)
+ type(string), intent(in) :: s
+ character(*), intent(in) :: ss
+ integer, intent(in) :: start
+ integer :: l
+ end function lr_sc_s
+
+ pure function lr_ccc(s,tgt,ss,action) result(l)
+ character(*), intent(in) :: s,tgt,ss,action
+ integer :: l
+ select case(uppercase(action))
+ case default
+ end select
+ end function lr_ccc
+
+ function replace_ccs(s,tgt,ss) result(r)
+ character(*), intent(in) :: s,tgt
+ type(string), intent(in) :: ss
+ character(lr_ccc(s,tgt,char(ss),'first')) :: r
+ end function replace_ccs
+
+ pure function uppercase_c(c)
+ character(*), intent(in) :: c
+ character(len(c)) :: uppercase_c
+ end function uppercase_c
+
+end module strings
diff --git a/gcc/testsuite/gfortran.dg/pr86045.f90 b/gcc/testsuite/gfortran.dg/pr86045.f90
new file mode 100644
index 00000000000..685672f1dbd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr86045.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+program p
+ logical :: a(2) = (mod([2,3],0) == 0) ! { dg-error "shall not be zero" }
+ integer :: b = count(mod([2,3],0) == 0) ! { dg-error "shall not be zero" }
+ integer :: c = all(mod([2,3],0) == 0) ! { dg-error "shall not be zero" }
+ integer :: d = any(mod([2,3],0) == 0) ! { dg-error "shall not be zero" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr86059.f90 b/gcc/testsuite/gfortran.dg/pr86059.f90
new file mode 100644
index 00000000000..e0caed102d7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr86059.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR fortran/86059
+program foo
+ integer :: i(2) = [ null(), 1 ] ! { dg-error "cannot appear in an array constructor" }
+ integer :: j(2) = [ (null(), n = 1, 2) ] ! { dg-error "cannot appear in an array constructor" }
+ integer k(2)
+ k = 42 + [1, null()] ! { dg-error "cannot appear in an array constructor" }
+end program foo
diff --git a/gcc/testsuite/gfortran.dg/pr86110.f90 b/gcc/testsuite/gfortran.dg/pr86110.f90
new file mode 100644
index 00000000000..890670f5854
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr86110.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! PR fortran/86110
+program p
+ character(:), allocatable :: x, y
+ x = 'abc'
+ y = [x(:)] ! { dg-error "Incompatible ranks 0 and 1" }
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_50.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_50.f90
new file mode 100644
index 00000000000..14f0c0a7935
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_50.f90
@@ -0,0 +1,68 @@
+! { dg-do compile }
+!
+! Test the fix for PR86242, in which the procedure pointer in 'tester'
+! was being copied as if it were an allocatable class component.
+!
+! Contributed by <cfd@mnet-mail.de>
+!
+module test
+
+ implicit none
+
+ private
+ public :: tester
+
+ type :: wrapper
+ integer(4) :: n
+ end type wrapper
+
+ type :: output
+ real(8) :: dummy
+ end type output
+
+ type :: tester
+ class(wrapper), allocatable :: wrap
+ procedure(proc1), pointer :: ptr => null()
+ end type tester
+
+ abstract interface
+ function proc1(self) result(uc)
+ import :: tester, output
+ class(tester), intent(in) :: self
+ class(output), allocatable :: uc
+ end function proc1
+ end interface
+
+end module test
+
+! Comment #2 from Janus Weil <janus@gcc.gnu.org>
+module test1
+
+ implicit none
+
+ type :: output
+ end type
+
+ type :: tester
+ integer, allocatable :: wrap
+ procedure(proc1), pointer, nopass :: ptr
+ end type
+
+ interface ! Originally abstract
+ function proc1() result(uc)
+ import :: output
+ class(output), allocatable :: uc ! Works if a pointer
+ end function
+ end interface
+
+! PR82969 from Gerhard Steinmetz <gscfq@t-online.de>
+ type t
+ real, allocatable :: x(:)
+ procedure(f), nopass, pointer :: g
+ end type
+contains
+ function f() result(z)
+ class(t), allocatable :: z
+ end
+
+end module test1
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_30.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_30.f90
new file mode 100644
index 00000000000..4e7eb4ba220
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_30.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! PR 85641 - this used to ICE due do infinite recursion.
+! Test case by Antony Lewis.
+program tester
+character(LEN=:), allocatable :: fields
+integer j
+character(LEN=4), parameter :: CMB_CL_Fields = 'TEBP'
+
+fields = ''
+j=1
+fields = fields // CMB_CL_Fields(j:j)
+
+end program tester
diff --git a/gcc/testsuite/gfortran.dg/select_type_41.f90 b/gcc/testsuite/gfortran.dg/select_type_41.f90
new file mode 100644
index 00000000000..eebb87922bd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_type_41.f90
@@ -0,0 +1,30 @@
+! { dg-do compile }
+! { dg-options "-O2" }
+!
+! Tests the fix for PR80965 in which the use of the name 'loc'
+! for the dummy argument of 'xyz' caused an ICE. If the module
+! was used, the error "DUMMY attribute conflicts with INTRINSIC
+! attribute in ‘loc’ at (1)" was emitted. Note that although 'loc'
+! is a GNU extension and so can be over-ridden, this is not very
+! good practice.
+!
+! Contributed by David Sagan <david.sagan@gmail.com>
+!
+module mode3_mod
+contains
+ subroutine xyz (loc)
+ implicit none
+ class(*) :: loc
+ real x(6)
+ integer ix_use
+ select type (loc)
+ type is (integer)
+ x = 0
+ print *, "integer"
+ type is (real)
+ ix_use = 0
+ print *, "real"
+ end select
+ end subroutine xyz
+end module mode3_mod
+
diff --git a/gcc/testsuite/gfortran.dg/select_type_42.f90 b/gcc/testsuite/gfortran.dg/select_type_42.f90
new file mode 100644
index 00000000000..ff73e6c7858
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_type_42.f90
@@ -0,0 +1,26 @@
+! { dg-do run }
+!
+! Tests the fix for PR82275.
+! Associating a name with a reduced-dimension section of a
+! multidimensional array precluded subsequent use of the name
+! with the appropriately reduced dimensionality and instead
+! required use of the (invalid) full set of original dimensions.
+!
+! Contributed by Damian Rouson <damian@sourceryinstitute.org>
+!
+ type component
+ integer :: i
+ end type
+ type container
+ class(component), allocatable :: component_array(:,:)
+ end type
+ type(container) bag
+ type(component) section_copy
+ allocate(bag%component_array, source = reshape ([component(10), component (100)], [1,2]))
+ select type(associate_name=>bag%component_array(1,:))
+ type is (component)
+ section_copy = associate_name(2) ! gfortran rejected valid
+! section_copy = associate_name(1,1)! gfortran accepted invalid
+ end select
+ if (section_copy%i .ne. 100) stop 1
+end
diff --git a/gcc/testsuite/gfortran.dg/submodule_31.f08 b/gcc/testsuite/gfortran.dg/submodule_31.f08
new file mode 100644
index 00000000000..72594d05df3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/submodule_31.f08
@@ -0,0 +1,54 @@
+! { dg-do run }
+!
+! Test the fix for PR82814 in which an ICE occurred for the submodule allocation.
+!
+! Contributed by "Werner Blokbuster" <werner.blokbuster@gmail.com>
+!
+module u
+
+ implicit none
+
+ interface unique
+ module function uniq_char(input) result(uniq)
+ character(*), intent(in) :: input(:)
+ character(size(input)), allocatable :: uniq(:)
+ end function uniq_char
+ end interface unique
+
+contains
+
+ module function uniq2(input) result(uniq)
+ character(*), intent(in) :: input(:)
+ character(size(input)), allocatable :: uniq(:)
+ allocate(uniq(1))
+ uniq = 'A'
+ end function uniq2
+
+end module u
+
+
+submodule (u) z
+
+ implicit none
+
+contains
+
+ module function uniq_char(input) result(uniq)
+ character(*), intent(in) :: input(:)
+ character(size(input)), allocatable :: uniq(:)
+ allocate(uniq(1)) ! This used to ICE
+ uniq = 'A'
+ end function uniq_char
+
+end submodule z
+
+
+program test_uniq
+ use u
+ implicit none
+ character(1), dimension(4) :: chr = ['1','2','1','2']
+
+ write(*,*) unique(chr)
+ write(*,*) uniq2(chr)
+
+end program test_uniq
diff --git a/gcc/testsuite/gfortran.dg/temporary_2.f90 b/gcc/testsuite/gfortran.dg/temporary_2.f90
new file mode 100644
index 00000000000..0598ea54f28
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/temporary_2.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+!
+! Tests the fix for PR70864 in which compiler generated temporaries received
+! the attributes of a dummy argument. This is the original testcase.
+! The simplified version by Gerhard Steinmetz is gratefully acknowledged.
+!
+! Contributed by Weiqun Zhang <weiqun.zhang@gmail.com>
+!
+module boxarray_module
+ implicit none
+ type :: BoxArray
+ integer :: i = 0
+ contains
+ procedure :: boxarray_assign
+ generic :: assignment(=) => boxarray_assign
+ end type BoxArray
+contains
+ subroutine boxarray_assign (dst, src)
+ class(BoxArray), intent(inout) :: dst
+ type (BoxArray), intent(in ) :: src
+ dst%i =src%i
+ end subroutine boxarray_assign
+end module boxarray_module
+
+module multifab_module
+ use boxarray_module
+ implicit none
+ type, public :: MultiFab
+ type(BoxArray) :: ba
+ end type MultiFab
+contains
+ subroutine multifab_swap(mf1, mf2)
+ type(MultiFab), intent(inout) :: mf1, mf2
+ type(MultiFab) :: tmp
+ tmp = mf1
+ mf1 = mf2 ! Generated an ICE in trans-decl.c.
+ mf2 = tmp
+ end subroutine multifab_swap
+end module multifab_module
diff --git a/gcc/testsuite/gfortran.dg/temporary_3.f90 b/gcc/testsuite/gfortran.dg/temporary_3.f90
new file mode 100644
index 00000000000..84b300a38d9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/temporary_3.f90
@@ -0,0 +1,121 @@
+! { dg-do run }
+!
+! Tests the fix for PR68846 in which compiler generated temporaries were
+! receiving the attributes of dummy arguments. This test is the original.
+! The simplified versions by Gerhard Steinmetz are gratefully acknowledged.
+!
+! Contributed by Mirco Valentini <mirco.valentini@polimi.it>
+!
+MODULE grid
+ IMPLICIT NONE
+ PRIVATE
+ REAL(KIND=8), DIMENSION(100,100), TARGET :: WORKSPACE
+ TYPE, PUBLIC :: grid_t
+ REAL(KIND=8), DIMENSION(:,:), POINTER :: P => NULL ()
+ END TYPE
+ PUBLIC :: INIT
+CONTAINS
+ SUBROUTINE INIT (DAT)
+ IMPLICIT NONE
+ TYPE(grid_t), INTENT(INOUT) :: DAT
+ INTEGER :: I, J
+ DAT%P => WORKSPACE
+ DO I = 1, 100
+ DO J = 1, 100
+ DAT%P(I,J) = REAL ((I-1)*100+J-1)
+ END DO
+ ENDDO
+ END SUBROUTINE INIT
+END MODULE grid
+
+MODULE subgrid
+ USE :: grid, ONLY: grid_t
+ IMPLICIT NONE
+ PRIVATE
+ TYPE, PUBLIC :: subgrid_t
+ INTEGER, DIMENSION(4) :: range
+ CLASS(grid_t), POINTER :: grd => NULL ()
+ CONTAINS
+ PROCEDURE, PASS :: INIT => LVALUE_INIT
+ PROCEDURE, PASS :: JMP => LVALUE_JMP
+ END TYPE
+CONTAINS
+ SUBROUTINE LVALUE_INIT (HOBJ, P, D)
+ IMPLICIT NONE
+ CLASS(subgrid_t), INTENT(INOUT) :: HOBJ
+ TYPE(grid_t), POINTER, INTENT(INOUT) :: P
+ INTEGER, DIMENSION(4), INTENT(IN) :: D
+ HOBJ%range = D
+ HOBJ%grd => P
+ END SUBROUTINE LVALUE_INIT
+
+ FUNCTION LVALUE_JMP(HOBJ, I, J) RESULT(P)
+ IMPLICIT NONE
+ CLASS(subgrid_t), INTENT(INOUT) :: HOBJ
+ INTEGER, INTENT(IN) :: I, J
+ REAL(KIND=8), POINTER :: P
+ P => HOBJ%grd%P(HOBJ%range(1)+I-1, HOBJ%range(3)+J-1)
+ END FUNCTION LVALUE_JMP
+END MODULE subgrid
+
+MODULE geom
+ IMPLICIT NONE
+CONTAINS
+ SUBROUTINE fillgeom_03( subgrid, value )
+ USE :: subgrid, ONLY: subgrid_t
+ IMPLICIT NONE
+ TYPE(subgrid_T), intent(inout) :: subgrid
+ REAL(kind=8), intent(in) :: value
+ INTEGER :: I, J
+ DO i = 1, 3
+ DO J = 1, 4
+ subgrid%jmp(i,j) = value ! Dummy argument '_F.DA0' with INTENT(IN)
+ ! in pointer association context or ICE
+ ! in trans_decl.c, depending on INTENT of
+ ! 'VALUE'
+ ENDDO
+ ENDDO
+ END SUBROUTINE fillgeom_03
+END MODULE geom
+
+PROGRAM test_lvalue
+ USE :: grid
+ USE :: subgrid
+ USE :: geom
+ IMPLICIT NONE
+ TYPE(grid_t), POINTER :: GRD => NULL()
+ TYPE(subgrid_t) :: STENCIL
+ REAL(KIND=8), POINTER :: real_tmp_ptr
+ REAL(KIND=8), DIMENSION(10,10), TARGET :: AA
+ REAL(KIND=8), DIMENSION(3,4) :: VAL
+ INTEGER :: I, J, chksum
+ integer, parameter :: r1 = 50
+ integer, parameter :: r2 = 52
+ integer, parameter :: r3 = 50
+ integer, parameter :: r4 = 53
+ DO I = 1, 3
+ DO J = 1, 4
+ VAL(I,J) = dble(I)*dble(J)
+ ENDDO
+ ENDDO
+
+ ALLOCATE (GRD)
+ CALL INIT (GRD)
+ chksum = sum([([((i-1)*100 + j -1, j=1,100)], i = 1,100)])
+ if (int(sum(grd%p)) .ne. chksum) stop 1
+
+ CALL STENCIL%INIT (GRD, [r1, r2, r3, r4])
+ if (.not.associated (stencil%grd, grd)) stop 2
+ if (int(sum(grd%p)) .ne. chksum) stop 3
+
+ CALL fillgeom_03(stencil, 42.0_8)
+ if (any (int (grd%p(r1:r2,r3:r4)) .ne. 42)) stop 4
+
+ chksum = chksum - sum([([((i - 1) * 100 + j -1, j=r3,r4)], i = r1,r2)]) &
+ + (r4 - r3 + 1) * (r2 - r1 +1) * 42
+ if (int(sum(grd%p)) .ne. chksum) stop 5
+
+ deallocate (grd)
+END PROGRAM test_lvalue
+
+
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_4.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_4.f03
index 836505bba3d..cd0e8f602ae 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_4.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_4.f03
@@ -84,6 +84,6 @@ PROGRAM main
TYPE(myint) :: x
x = 0 ! { dg-error "Can't convert" }
- x = x + 42 ! { dg-error "Operands of" }
+ x = x + 42 ! { dg-error "binary intrinsic numeric operator" }
x = x .PLUS. 5 ! { dg-error "Unknown operator" }
END PROGRAM main
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_29.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_29.f90
new file mode 100644
index 00000000000..d4ad39cda1e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_29.f90
@@ -0,0 +1,84 @@
+! { dg-do run }
+!
+! Test the fix for PR84546 in which the failing cases would
+! have x%vec = ['foo','b '].
+!
+! Contributed by Neil Carlson <neil.n.carlson@gmail.com>
+!
+module any_vector_type
+
+ type :: any_vector
+ class(*), allocatable :: vec(:)
+ end type
+
+ interface any_vector
+ procedure any_vector1
+ end interface
+
+contains
+
+ function any_vector1(vec) result(this)
+ class(*), intent(in) :: vec(:)
+ type(any_vector) :: this
+ allocate(this%vec, source=vec)
+ end function
+
+end module
+
+program main
+
+ use any_vector_type
+ implicit none
+
+ class(*), allocatable :: x
+ character(*), parameter :: vec(2) = ['foo','bar']
+ integer :: vec1(3) = [7,8,9]
+
+ call foo1
+ call foo2
+ call foo3
+ call foo4
+
+contains
+
+ subroutine foo1 ! This always worked
+ allocate (any_vector :: x)
+ select type (x)
+ type is (any_vector)
+ x = any_vector(vec)
+ end select
+ call bar(1)
+ deallocate (x)
+ end
+
+ subroutine foo2 ! Failure found during diagnosis
+ x = any_vector (vec)
+ call bar(2)
+ deallocate (x)
+ end
+
+ subroutine foo3 ! Original failure
+ allocate (x, source = any_vector (vec))
+ call bar(3)
+ deallocate (x)
+ end
+
+ subroutine foo4 ! This always worked
+ allocate (x, source = any_vector (vec1))
+ call bar(4)
+ deallocate (x)
+ end
+
+ subroutine bar (stop_flag)
+ integer :: stop_flag
+ select type (x)
+ type is (any_vector)
+ select type (xvec => x%vec)
+ type is (character(*))
+ if (any(xvec /= vec)) stop stop_flag
+ type is (integer)
+ if (any(xvec /= (vec1))) stop stop_flag
+ end select
+ end select
+ end
+end program
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_30.f03 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_30.f03
new file mode 100644
index 00000000000..4d0c2e7250b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_30.f03
@@ -0,0 +1,38 @@
+! { dg-do run }
+!
+! Test the fix for PR83318.
+!
+! Contributed by Neil Carlson <neil.n.carlson@gmail.com>
+!
+type :: any_vector
+ class(*), allocatable :: v(:)
+end type
+type(any_vector) :: x, y
+
+! This did not work correctly
+ x%v = ['foo','bar']
+ call foo (x, 1)
+
+! This was reported as not working correctly but was OK before the above was fixed
+ y = x
+ call foo (y, 2)
+
+ x%v = [1_4,2_4]
+ call foo (x, 3)
+
+ y = x
+ call foo (y, 4)
+
+contains
+
+ subroutine foo (arg, n)
+ type (any_vector) :: arg
+ integer :: n
+ select type (v => arg%v)
+ type is (character(*))
+ if (any (v .ne. ["foo","bar"])) stop n
+ type is (integer(4))
+ if (any (v .ne. [1_4,2_4])) stop n
+ end select
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/pr85878.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/pr85878.f90
new file mode 100644
index 00000000000..e52e95faa00
--- /dev/null
+++ b/gcc/testsuite/gfortran.fortran-torture/compile/pr85878.f90
@@ -0,0 +1,8 @@
+! PR middle-end/85878
+
+program pr85878
+ real :: a
+ complex :: c = (2.0, 3.0)
+ print *, c
+ print *, transfer (a, c)
+end
diff --git a/gcc/testsuite/gnat.dg/aggr24.adb b/gcc/testsuite/gnat.dg/aggr24.adb
new file mode 100644
index 00000000000..b739c54fdc4
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/aggr24.adb
@@ -0,0 +1,13 @@
+-- { dg-do run }
+
+with Aggr24_Pkg; use Aggr24_Pkg;
+
+procedure Aggr24 is
+ V : Rec;
+begin
+ V.S := "Hello";
+ Init (V);
+ if V.S /= "Hello" then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/aggr24_pkg.adb b/gcc/testsuite/gnat.dg/aggr24_pkg.adb
new file mode 100644
index 00000000000..2ae3e79e322
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/aggr24_pkg.adb
@@ -0,0 +1,15 @@
+package body Aggr24_Pkg is
+
+ procedure Init (R : out Rec) is
+ begin
+ R := (I1 => 0,
+ I2 => 0,
+ I3 => 0,
+ I4 => 0,
+ I5 => 0,
+ I6 => 0,
+ I7 => 0,
+ S => <>);
+ end;
+
+end Aggr24_Pkg;
diff --git a/gcc/testsuite/gnat.dg/aggr24_pkg.ads b/gcc/testsuite/gnat.dg/aggr24_pkg.ads
new file mode 100644
index 00000000000..5918f5e8bd4
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/aggr24_pkg.ads
@@ -0,0 +1,16 @@
+package Aggr24_Pkg is
+
+ type Rec is record
+ I1 : Integer;
+ I2 : Integer;
+ I3 : Integer;
+ I4 : Integer;
+ I5 : Integer;
+ I6 : Integer;
+ I7 : Integer;
+ S : String (1 .. 5);
+ end record;
+
+ procedure Init (R : out Rec);
+
+end Aggr24_Pkg;
diff --git a/gcc/testsuite/gnat.dg/discr53.adb b/gcc/testsuite/gnat.dg/discr53.adb
new file mode 100644
index 00000000000..2e362a7fd29
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr53.adb
@@ -0,0 +1,19 @@
+-- { dg-do compile }
+
+package body Discr53 is
+
+ function F return Rec is
+ Data : Rec;
+ begin
+ return Data;
+ end;
+
+ type Ptr is access Rec;
+
+ procedure Proc is
+ Local : Ptr;
+ begin
+ Local := new Rec'(F);
+ end;
+
+end Discr53;
diff --git a/gcc/testsuite/gnat.dg/discr53.ads b/gcc/testsuite/gnat.dg/discr53.ads
new file mode 100644
index 00000000000..3fa9f0f4845
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr53.ads
@@ -0,0 +1,16 @@
+with Discr53_Pkg;
+
+package Discr53 is
+
+ type Rec (D : Boolean := False) is record
+ case D is
+ when True => S : String (1 .. Discr53_Pkg.Max);
+ when False => null;
+ end case;
+ end record;
+
+ function F return Rec;
+
+ procedure Proc;
+
+end Discr53;
diff --git a/gcc/testsuite/gnat.dg/discr53_pkg.ads b/gcc/testsuite/gnat.dg/discr53_pkg.ads
new file mode 100644
index 00000000000..d36e1ba2a12
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr53_pkg.ads
@@ -0,0 +1,5 @@
+package Discr53_Pkg is
+
+ function Max return Natural;
+
+end Discr53_Pkg;
diff --git a/gcc/testsuite/gnat.dg/prot3.adb b/gcc/testsuite/gnat.dg/prot3.adb
new file mode 100644
index 00000000000..25390659238
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/prot3.adb
@@ -0,0 +1,8 @@
+-- { dg-do run }
+
+with Prot3_Pkg; use Prot3_Pkg;
+
+procedure Prot3 is
+begin
+ P.Foo (4);
+end;
diff --git a/gcc/testsuite/gnat.dg/prot3_pkg.adb b/gcc/testsuite/gnat.dg/prot3_pkg.adb
new file mode 100644
index 00000000000..07ae1829f60
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/prot3_pkg.adb
@@ -0,0 +1,17 @@
+package body Prot3_Pkg is
+
+ protected body Prot is
+ function Fn (J : Short_Integer) return Rec
+ is
+ begin
+ return (V1 => J * J,
+ V2 => J);
+ end;
+
+ procedure Foo (J : Short_Integer) is
+ begin
+ Val := Fn (J);
+ end;
+ end Prot;
+
+end Prot3_Pkg;
diff --git a/gcc/testsuite/gnat.dg/prot3_pkg.ads b/gcc/testsuite/gnat.dg/prot3_pkg.ads
new file mode 100644
index 00000000000..b4cce90a543
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/prot3_pkg.ads
@@ -0,0 +1,16 @@
+package Prot3_Pkg is
+
+ type Rec is record
+ V1 : Short_Integer;
+ V2 : Short_Integer;
+ end record with Volatile_Full_Access;
+
+ protected type Prot is
+ procedure Foo (J : Short_Integer);
+ private
+ Val : Rec;
+ end Prot;
+
+ P : Prot;
+
+end Prot3_Pkg;
diff --git a/gcc/testsuite/gnat.dg/specs/opt3.ads b/gcc/testsuite/gnat.dg/specs/opt3.ads
new file mode 100644
index 00000000000..531cf59eae3
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/opt3.ads
@@ -0,0 +1,13 @@
+-- { dg-do compile }
+-- { dg-options "-O3" }
+
+with Ada.Containers.Vectors;
+with Opt3_Pkg;
+
+package Opt3 is
+
+ type Arr is array (1 .. Opt3_Pkg.Max) of Integer;
+
+ package Arr_Container is new Ada.Containers.Vectors (Natural, Arr);
+
+end Opt3;
diff --git a/gcc/testsuite/gnat.dg/specs/opt3_pkg.ads b/gcc/testsuite/gnat.dg/specs/opt3_pkg.ads
new file mode 100644
index 00000000000..4145ac4abaa
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/opt3_pkg.ads
@@ -0,0 +1,7 @@
+-- { dg-excess-errors "no code generated" }
+
+package Opt3_Pkg is
+
+ function Max return Natural;
+
+end Opt3_Pkg;
diff --git a/gcc/testsuite/go.dg/pr85436.go b/gcc/testsuite/go.dg/pr85436.go
new file mode 100644
index 00000000000..225c2734561
--- /dev/null
+++ b/gcc/testsuite/go.dg/pr85436.go
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -mcpu=power9" { target { powerpc*-*-* } } } */
+
+package main
+import (
+ "go/ast"
+ "go/parser"
+ "go/token"
+)
+type testFuncs struct { }
+func (t *testFuncs) load(filename, pkg string, doImport, seen *bool) {
+ var testFileSet = token.NewFileSet()
+ f, err := parser.ParseFile(testFileSet, filename, nil, parser.ParseComments)
+ if err != nil { }
+ for _, d := range f.Decls {
+ n, ok := d.(*ast.FuncDecl)
+ if !ok { }
+ ptr := n.Type.Params.List[0].Type.(*ast.StarExpr)
+ if sel := ptr.X.(*ast.SelectorExpr); sel.Sel.Name == "M" { }
+ }
+}
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index ee0b432ef2e..3cc569ed3cc 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5940,7 +5940,8 @@ proc check_effective_target_vect_load_lanes { } {
verbose "check_effective_target_vect_load_lanes: using cached result" 2
} else {
set et_vect_load_lanes 0
- if { ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok])
+ # We don't support load_lanes correctly on big-endian arm.
+ if { ([check_effective_target_arm_little_endian] && [check_effective_target_arm_neon_ok])
|| [istarget aarch64*-*-*] } {
set et_vect_load_lanes 1
}
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index 4e47be1dc05..645db9e1459 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -438,7 +438,7 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
referenced the last field of a struct or a union member
then we have to adjust maxsize by the padding at the end
of our field. */
- if (seen_variable_array_ref && maxsize != -1)
+ if (seen_variable_array_ref)
{
tree stype = TREE_TYPE (TREE_OPERAND (exp, 0));
tree next = DECL_CHAIN (field);
@@ -454,7 +454,7 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
|| ssize == NULL
|| TREE_CODE (ssize) != INTEGER_CST)
maxsize = -1;
- else
+ else if (maxsize != -1)
{
offset_int tem = (wi::to_offset (ssize)
- wi::to_offset (fsize));
@@ -463,6 +463,11 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
maxsize += tem;
}
}
+ /* An component ref with an adjacent field up in the
+ structure hierarchy constrains the size of any variable
+ array ref lower in the access hierarchy. */
+ else
+ seen_variable_array_ref = false;
}
}
else
@@ -617,7 +622,9 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
if (DECL_P (exp))
{
- if (flag_unconstrained_commons && VAR_P (exp) && DECL_COMMON (exp))
+ if (VAR_P (exp)
+ && ((flag_unconstrained_commons && DECL_COMMON (exp))
+ || (DECL_EXTERNAL (exp) && seen_variable_array_ref)))
{
tree sz_tree = TYPE_SIZE (TREE_TYPE (exp));
/* If size is unknown, or we have read to the end, assume there
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 92c861383a2..eae7953a660 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1183,6 +1183,7 @@ copy_tree_body_r (tree *tp, int *walk_subtrees, void *data)
*tp = gimple_fold_indirect_ref (ptr);
if (! *tp)
{
+ type = remap_type (type, id);
if (TREE_CODE (ptr) == ADDR_EXPR)
{
*tp
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 6b829cc4d79..3f51cb98788 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -2320,11 +2320,11 @@ number_of_iterations_exit_assumptions (struct loop *loop, edge exit,
tree iv0_niters = NULL_TREE;
if (!simple_iv_with_niters (loop, loop_containing_stmt (stmt),
- op0, &iv0, &iv0_niters, false))
+ op0, &iv0, safe ? &iv0_niters : NULL, false))
return false;
tree iv1_niters = NULL_TREE;
if (!simple_iv_with_niters (loop, loop_containing_stmt (stmt),
- op1, &iv1, &iv1_niters, false))
+ op1, &iv1, safe ? &iv1_niters : NULL, false))
return false;
/* Give up on complicated case. */
if (iv0_niters && iv1_niters)
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 443193dca78..b0524233669 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -2787,11 +2787,7 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
unsigned int operand = 1;
vn_reference_op_t currop = &ref->operands[0];
tree sc = NULL_TREE;
- tree fn;
- if (TREE_CODE (currop->op0) == FUNCTION_DECL)
- fn = currop->op0;
- else
- fn = find_or_generate_expression (block, currop->op0, stmts);
+ tree fn = find_or_generate_expression (block, currop->op0, stmts);
if (!fn)
return NULL_TREE;
if (currop->op1)
@@ -2809,14 +2805,27 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
return NULL_TREE;
args.quick_push (arg);
}
- gcall *call
- = gimple_build_call_vec ((TREE_CODE (fn) == FUNCTION_DECL
- ? build_fold_addr_expr (fn) : fn), args);
+ gcall *call = gimple_build_call_vec (fn, args);
gimple_call_set_with_bounds (call, currop->with_bounds);
if (sc)
gimple_call_set_chain (call, sc);
tree forcedname = make_ssa_name (currop->type);
gimple_call_set_lhs (call, forcedname);
+ /* There's no CCP pass after PRE which would re-compute alignment
+ information so make sure we re-materialize this here. */
+ if (gimple_call_builtin_p (call, BUILT_IN_ASSUME_ALIGNED)
+ && args.length () - 2 <= 1
+ && tree_fits_uhwi_p (args[1])
+ && (args.length () != 3 || tree_fits_uhwi_p (args[2])))
+ {
+ unsigned HOST_WIDE_INT halign = tree_to_uhwi (args[1]);
+ unsigned HOST_WIDE_INT hmisalign
+ = args.length () == 3 ? tree_to_uhwi (args[2]) : 0;
+ if ((halign & (halign - 1)) == 0
+ && (hmisalign & ~(halign - 1)) == 0)
+ set_ptr_info_alignment (get_ptr_info (forcedname),
+ halign, hmisalign);
+ }
gimple_set_vuse (call, BB_LIVE_VOP_ON_EXIT (block));
gimple_seq_add_stmt_without_update (&forced_stmts, call);
folded = forcedname;
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index e57a343c532..e6562c6c9ba 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -470,7 +470,8 @@ get_rank (tree e)
/* We want integer ones to end up last no matter what, since they are
the ones we can do the most with. */
-#define INTEGER_CONST_TYPE 1 << 3
+#define INTEGER_CONST_TYPE 1 << 4
+#define FLOAT_ONE_CONST_TYPE 1 << 3
#define FLOAT_CONST_TYPE 1 << 2
#define OTHER_CONST_TYPE 1 << 1
@@ -482,7 +483,14 @@ constant_type (tree t)
if (INTEGRAL_TYPE_P (TREE_TYPE (t)))
return INTEGER_CONST_TYPE;
else if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (t)))
- return FLOAT_CONST_TYPE;
+ {
+ /* Sort -1.0 and 1.0 constants last, while in some cases
+ const_binop can't optimize some inexact operations, multiplication
+ by -1.0 or 1.0 can be always merged with others. */
+ if (real_onep (t) || real_minus_onep (t))
+ return FLOAT_ONE_CONST_TYPE;
+ return FLOAT_CONST_TYPE;
+ }
else
return OTHER_CONST_TYPE;
}
@@ -501,7 +509,7 @@ sort_by_operand_rank (const void *pa, const void *pb)
if (oeb->rank == 0 && oea->rank == 0)
{
if (constant_type (oeb->op) != constant_type (oea->op))
- return constant_type (oeb->op) - constant_type (oea->op);
+ return constant_type (oea->op) - constant_type (oeb->op);
else
/* To make sorting result stable, we use unique IDs to determine
order. */
@@ -2870,7 +2878,8 @@ optimize_range_tests_to_bit_test (enum tree_code opcode, int first, int length,
static bool
optimize_range_tests_var_bound (enum tree_code opcode, int first, int length,
vec<operand_entry *> *ops,
- struct range_entry *ranges)
+ struct range_entry *ranges,
+ basic_block first_bb)
{
int i;
bool any_changes = false;
@@ -2967,6 +2976,60 @@ optimize_range_tests_var_bound (enum tree_code opcode, int first, int length,
if (idx == NULL)
continue;
+ /* maybe_optimize_range_tests allows statements without side-effects
+ in the basic blocks as long as they are consumed in the same bb.
+ Make sure rhs2's def stmt is not among them, otherwise we can't
+ use safely get_nonzero_bits on it. E.g. in:
+ # RANGE [-83, 1] NONZERO 173
+ # k_32 = PHI <k_47(13), k_12(9)>
+ ...
+ if (k_32 >= 0)
+ goto <bb 5>; [26.46%]
+ else
+ goto <bb 9>; [73.54%]
+
+ <bb 5> [local count: 140323371]:
+ # RANGE [0, 1] NONZERO 1
+ _5 = (int) k_32;
+ # RANGE [0, 4] NONZERO 4
+ _21 = _5 << 2;
+ # RANGE [0, 4] NONZERO 4
+ iftmp.0_44 = (char) _21;
+ if (k_32 < iftmp.0_44)
+ goto <bb 6>; [84.48%]
+ else
+ goto <bb 9>; [15.52%]
+ the ranges on _5/_21/iftmp.0_44 are flow sensitive, assume that
+ k_32 >= 0. If we'd optimize k_32 >= 0 to true and k_32 < iftmp.0_44
+ to (unsigned) k_32 < (unsigned) iftmp.0_44, then we would execute
+ those stmts even for negative k_32 and the value ranges would be no
+ longer guaranteed and so the optimization would be invalid. */
+ if (opcode == ERROR_MARK)
+ {
+ gimple *g = SSA_NAME_DEF_STMT (rhs2);
+ basic_block bb2 = gimple_bb (g);
+ if (bb2
+ && bb2 != first_bb
+ && dominated_by_p (CDI_DOMINATORS, bb2, first_bb))
+ {
+ /* As an exception, handle a few common cases. */
+ if (gimple_assign_cast_p (g)
+ && INTEGRAL_TYPE_P (TREE_TYPE (gimple_assign_rhs1 (g)))
+ && TYPE_UNSIGNED (TREE_TYPE (gimple_assign_rhs1 (g)))
+ && (TYPE_PRECISION (TREE_TYPE (rhs2))
+ > TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (g)))))
+ /* Zero-extension is always ok. */ ;
+ else if (is_gimple_assign (g)
+ && gimple_assign_rhs_code (g) == BIT_AND_EXPR
+ && TREE_CODE (gimple_assign_rhs2 (g)) == INTEGER_CST
+ && !wi::neg_p (gimple_assign_rhs2 (g)))
+ /* Masking with INTEGER_CST with MSB clear is always ok
+ too. */ ;
+ else
+ continue;
+ }
+ }
+
wide_int nz = get_nonzero_bits (rhs2);
if (wi::neg_p (nz))
continue;
@@ -3093,11 +3156,12 @@ optimize_range_tests_var_bound (enum tree_code opcode, int first, int length,
maybe_optimize_range_tests for inter-bb range optimization.
In that case if oe->op is NULL, oe->id is bb->index whose
GIMPLE_COND is && or ||ed into the test, and oe->rank says
- the actual opcode. */
+ the actual opcode.
+ FIRST_BB is the first basic block if OPCODE is ERROR_MARK. */
static bool
optimize_range_tests (enum tree_code opcode,
- vec<operand_entry *> *ops)
+ vec<operand_entry *> *ops, basic_block first_bb)
{
unsigned int length = ops->length (), i, j, first;
operand_entry *oe;
@@ -3175,7 +3239,7 @@ optimize_range_tests (enum tree_code opcode,
any_changes |= optimize_range_tests_to_bit_test (opcode, first, length,
ops, ranges);
any_changes |= optimize_range_tests_var_bound (opcode, first, length, ops,
- ranges);
+ ranges, first_bb);
if (any_changes && opcode != ERROR_MARK)
{
@@ -3922,7 +3986,7 @@ maybe_optimize_range_tests (gimple *stmt)
break;
}
if (ops.length () > 1)
- any_changes = optimize_range_tests (ERROR_MARK, &ops);
+ any_changes = optimize_range_tests (ERROR_MARK, &ops, first_bb);
if (any_changes)
{
unsigned int idx, max_idx = 0;
@@ -5674,7 +5738,7 @@ reassociate_bb (basic_block bb)
if (is_vector)
optimize_vec_cond_expr (rhs_code, &ops);
else
- optimize_range_tests (rhs_code, &ops);
+ optimize_range_tests (rhs_code, &ops, NULL);
}
if (rhs_code == MULT_EXPR && !is_vector)
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 01e060b6690..00bb229b4a2 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1245,7 +1245,9 @@ vn_reference_maybe_forwprop_address (vec<vn_reference_op_s> *ops,
return true;
}
if (!addr_base
- || TREE_CODE (addr_base) != MEM_REF)
+ || TREE_CODE (addr_base) != MEM_REF
+ || (TREE_CODE (TREE_OPERAND (addr_base, 0)) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (TREE_OPERAND (addr_base, 0))))
return false;
off += addr_offset;
@@ -1258,6 +1260,7 @@ vn_reference_maybe_forwprop_address (vec<vn_reference_op_s> *ops,
ptr = gimple_assign_rhs1 (def_stmt);
ptroff = gimple_assign_rhs2 (def_stmt);
if (TREE_CODE (ptr) != SSA_NAME
+ || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (ptr)
|| TREE_CODE (ptroff) != INTEGER_CST)
return false;
@@ -1978,8 +1981,9 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_,
if (TREE_CODE (rhs) == SSA_NAME)
rhs = SSA_VAL (rhs);
len = native_encode_expr (gimple_assign_rhs1 (def_stmt),
- buffer, sizeof (buffer));
- if (len > 0)
+ buffer, sizeof (buffer),
+ (offset - offset2) / BITS_PER_UNIT);
+ if (len > 0 && len * BITS_PER_UNIT >= ref->size)
{
tree type = vr->type;
/* Make sure to interpret in a type that has a range
@@ -1988,10 +1992,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_,
&& ref->size != TYPE_PRECISION (vr->type))
type = build_nonstandard_integer_type (ref->size,
TYPE_UNSIGNED (type));
- tree val = native_interpret_expr (type,
- buffer
- + ((offset - offset2)
- / BITS_PER_UNIT),
+ tree val = native_interpret_expr (type, buffer,
ref->size / BITS_PER_UNIT);
/* If we chop off bits because the types precision doesn't
match the memory access size this is ok when optimizing
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c
index 01c25d43e0d..1a0ac316c53 100644
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -1454,7 +1454,8 @@ find_clusters_1 (same_succ *same_succ)
/* TODO: handle blocks with phi-nodes. We'll have to find corresponding
phi-nodes in bb1 and bb2, with the same alternatives for the same
preds. */
- if (bb_has_non_vop_phi (bb1) || bb_has_eh_pred (bb1))
+ if (bb_has_non_vop_phi (bb1) || bb_has_eh_pred (bb1)
+ || bb_has_abnormal_pred (bb1))
continue;
nr_comparisons = 0;
@@ -1462,7 +1463,8 @@ find_clusters_1 (same_succ *same_succ)
{
bb2 = BASIC_BLOCK_FOR_FN (cfun, j);
- if (bb_has_non_vop_phi (bb2) || bb_has_eh_pred (bb2))
+ if (bb_has_non_vop_phi (bb2) || bb_has_eh_pred (bb2)
+ || bb_has_abnormal_pred (bb2))
continue;
if (BB_CLUSTER (bb1) != NULL && BB_CLUSTER (bb1) == BB_CLUSTER (bb2))
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index f586edcd730..ed443fa0883 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -473,7 +473,7 @@ find_tail_calls (basic_block bb, struct tailcall **ret)
{
tree arg;
- for (param = DECL_ARGUMENTS (func), idx = 0;
+ for (param = DECL_ARGUMENTS (current_function_decl), idx = 0;
param && idx < gimple_call_num_args (call);
param = DECL_CHAIN (param), idx ++)
{
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index ccaa945bffb..f0e97060d7b 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -394,6 +394,16 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
}
}
+ unsigned int step_prec = TYPE_PRECISION (TREE_TYPE (DR_STEP (dra)));
+ if (loop->safelen < 2
+ && !expr_not_equal_to (DR_STEP (dra), wi::zero (step_prec)))
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "step could be zero.\n");
+ return true;
+ }
+
continue;
}
@@ -2515,7 +2525,7 @@ vect_analyze_data_ref_access (struct data_reference *dr)
/* Allow references with zero step for outer loops marked
with pragma omp simd only - it guarantees absence of
loop-carried dependencies between inner loop iterations. */
- if (!loop->force_vectorize)
+ if (!loop->force_vectorize || loop->safelen < 2)
{
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index b5601727c53..04237dbb9fe 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -5479,15 +5479,34 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
/* Handle uses. */
if (j == 0)
{
- if (op_type == binary_op || op_type == ternary_op)
+ if (op_type == binary_op)
vect_get_vec_defs (op0, op1, stmt, &vec_oprnds0, &vec_oprnds1,
slp_node, -1);
+ else if (op_type == ternary_op)
+ {
+ if (slp_node)
+ {
+ auto_vec<tree> ops(3);
+ ops.quick_push (op0);
+ ops.quick_push (op1);
+ ops.quick_push (op2);
+ auto_vec<vec<tree> > vec_defs(3);
+ vect_get_slp_defs (ops, slp_node, &vec_defs, -1);
+ vec_oprnds0 = vec_defs[0];
+ vec_oprnds1 = vec_defs[1];
+ vec_oprnds2 = vec_defs[2];
+ }
+ else
+ {
+ vect_get_vec_defs (op0, op1, stmt, &vec_oprnds0, &vec_oprnds1,
+ NULL, -1);
+ vect_get_vec_defs (op2, NULL_TREE, stmt, &vec_oprnds2, NULL,
+ NULL, -1);
+ }
+ }
else
vect_get_vec_defs (op0, NULL_TREE, stmt, &vec_oprnds0, NULL,
slp_node, -1);
- if (op_type == ternary_op)
- vect_get_vec_defs (op2, NULL_TREE, stmt, &vec_oprnds2, NULL,
- slp_node, -1);
}
else
{
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 9431b90cf52..b5424befc78 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -8671,9 +8671,9 @@ union_ranges (enum value_range_type *vr0type,
if (TREE_CODE (*vr0min) == INTEGER_CST)
{
*vr0type = vr1type;
- *vr0min = vr1min;
*vr0max = int_const_binop (MINUS_EXPR, *vr0min,
build_int_cst (TREE_TYPE (*vr0min), 1));
+ *vr0min = vr1min;
}
else
goto give_up;
diff --git a/gcc/tree.c b/gcc/tree.c
index 698213c3501..c28f87606ab 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5454,9 +5454,10 @@ free_lang_data_in_decl (tree decl)
At this point, it is not needed anymore. */
DECL_SAVED_TREE (decl) = NULL_TREE;
- /* Clear the abstract origin if it refers to a method. Otherwise
- dwarf2out.c will ICE as we clear TYPE_METHODS and thus the
- origin will not be output correctly. */
+ /* Clear the abstract origin if it refers to a method.
+ Otherwise dwarf2out.c will ICE as we splice functions out of
+ TYPE_FIELDS and thus the origin will not be output
+ correctly. */
if (DECL_ABSTRACT_ORIGIN (decl)
&& DECL_CONTEXT (DECL_ABSTRACT_ORIGIN (decl))
&& RECORD_OR_UNION_TYPE_P
@@ -7887,6 +7888,9 @@ add_expr (const_tree t, inchash::hash &hstate, unsigned int flags)
for (i = 0; i < TREE_VEC_LENGTH (t); ++i)
inchash::add_expr (TREE_VEC_ELT (t, i), hstate, flags);
return;
+ case IDENTIFIER_NODE:
+ hstate.add_object (IDENTIFIER_HASH_VALUE (t));
+ return;
case FUNCTION_DECL:
/* When referring to a built-in FUNCTION_DECL, use the __builtin__ form.
Otherwise nodes that compare equal according to operand_equal_p might
diff --git a/gcc/varasm.c b/gcc/varasm.c
index e240ba77430..9ffef8abe38 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1241,10 +1241,9 @@ use_blocks_for_decl_p (tree decl)
if (!VAR_P (decl) && TREE_CODE (decl) != CONST_DECL)
return false;
- /* Detect decls created by dw2_force_const_mem. Such decls are
- special because DECL_INITIAL doesn't specify the decl's true value.
- dw2_output_indirect_constants will instead call assemble_variable
- with dont_output_data set to 1 and then print the contents itself. */
+ /* DECL_INITIAL (decl) set to decl is a hack used for some decls that
+ are never used from code directly and we never want object block handling
+ for those. */
if (DECL_INITIAL (decl) == decl)
return false;
diff --git a/libada/ChangeLog b/libada/ChangeLog
index 6a950729892..452a58a4d48 100644
--- a/libada/ChangeLog
+++ b/libada/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libada/configure b/libada/configure
index 17a52c81db2..13e267a7f4e 100755
--- a/libada/configure
+++ b/libada/configure
@@ -3018,7 +3018,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog
index 77297253a79..5faddcc6a7a 100644
--- a/libatomic/ChangeLog
+++ b/libatomic/ChangeLog
@@ -1,3 +1,19 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
+2018-03-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2018-03-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * config/s390/exch_n.c: New file.
+ * configure.tgt: Add the config directory for s390.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libatomic/config/s390/exch_n.c b/libatomic/config/s390/exch_n.c
new file mode 100644
index 00000000000..b2340b4aa6a
--- /dev/null
+++ b/libatomic/config/s390/exch_n.c
@@ -0,0 +1,69 @@
+/* Copyright (C) 2018 Free Software Foundation, Inc.
+ Contributed by Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ This file is part of the GNU Atomic Library (libatomic).
+
+ Libatomic is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ Libatomic is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <libatomic_i.h>
+
+
+/* The compiler builtin will use the hardware instruction cdsg if the
+ memory operand is properly aligned and will fall back to the
+ library call otherwise.
+
+ In case the compiler for one part is able to detect that the
+ location is aligned and fails to do so for another usage of the hw
+ instruction and the sw fall back would be mixed on the same memory
+ location. To avoid this the library fall back also has to use the
+ hardware instruction if possible. */
+
+#if !DONE && N == 16
+UTYPE
+SIZE(libat_exchange) (UTYPE *mptr, UTYPE newval, int smodel UNUSED)
+{
+ if (!((uintptr_t)mptr & 0xf))
+ {
+ /* Use the builtin only if the memory operand is 16 byte
+ aligned. */
+ return __atomic_exchange_n ((UTYPE *)__builtin_assume_aligned (mptr, 16),
+ newval, __ATOMIC_SEQ_CST);
+ }
+ else
+ {
+ UTYPE oldval;
+ UWORD magic;
+
+ pre_seq_barrier (smodel);
+ magic = protect_start (mptr);
+
+ oldval = *mptr;
+ *mptr = newval;
+
+ protect_end (mptr, magic);
+ post_seq_barrier (smodel);
+
+ return oldval;
+ }
+}
+#define DONE 1
+#endif /* N == 16 */
+
+#include "../../exch_n.c"
diff --git a/libatomic/configure b/libatomic/configure
index c05fc9d1141..2ae9b8d40f3 100755
--- a/libatomic/configure
+++ b/libatomic/configure
@@ -12333,6 +12333,7 @@ _ACEOF
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 2" >&5
$as_echo_n "checking for __atomic_load/store for size 2... " >&6; }
if test "${libat_cv_have_at_ldst_2+set}" = set; then :
@@ -12400,6 +12401,7 @@ _ACEOF
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 4" >&5
$as_echo_n "checking for __atomic_load/store for size 4... " >&6; }
if test "${libat_cv_have_at_ldst_4+set}" = set; then :
@@ -12467,6 +12469,7 @@ _ACEOF
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 8" >&5
$as_echo_n "checking for __atomic_load/store for size 8... " >&6; }
if test "${libat_cv_have_at_ldst_8+set}" = set; then :
@@ -12534,6 +12537,7 @@ _ACEOF
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 16" >&5
$as_echo_n "checking for __atomic_load/store for size 16... " >&6; }
if test "${libat_cv_have_at_ldst_16+set}" = set; then :
@@ -12602,6 +12606,7 @@ _ACEOF
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_test_and_set for size 1" >&5
$as_echo_n "checking for __atomic_test_and_set for size 1... " >&6; }
if test "${libat_cv_have_at_tas_1+set}" = set; then :
@@ -15267,7 +15272,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
index b8af3ab2546..30ae29248cd 100644
--- a/libatomic/configure.tgt
+++ b/libatomic/configure.tgt
@@ -114,6 +114,11 @@ case "${target}" in
config_path="${config_path} linux/arm posix"
;;
+ s390*-*-linux*)
+ # OS support for atomic primitives.
+ config_path="${config_path} s390 posix"
+ ;;
+
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \
| *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* \
| *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
diff --git a/libcc1/ChangeLog b/libcc1/ChangeLog
index c61190f7a7f..98501d05276 100644
--- a/libcc1/ChangeLog
+++ b/libcc1/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libcc1/configure b/libcc1/configure
index d6f480fe930..962d34d9271 100755
--- a/libcc1/configure
+++ b/libcc1/configure
@@ -14315,7 +14315,7 @@ _ACEOF
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libcilkrts/ChangeLog b/libcilkrts/ChangeLog
index ec16da84f00..1893d0dfbfb 100644
--- a/libcilkrts/ChangeLog
+++ b/libcilkrts/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libcilkrts/configure b/libcilkrts/configure
index 3cc8c999733..503337dc4b4 100644
--- a/libcilkrts/configure
+++ b/libcilkrts/configure
@@ -15413,7 +15413,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 097c78002cb..e0fb9e822c4 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
{
vc m_nl, m_cr, m_bs, m_qm;
- data = *((const vc *)s);
+ data = __builtin_vec_vsx_ld (0, s);
s += 16;
m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index ec5dc75d463..f3136eabbc2 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libffi/configure b/libffi/configure
index 74b747b3b7e..790a291011f 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -16444,7 +16444,7 @@ $as_echo "$as_me: versioning on shared library symbols is $enable_symvers" >&6;}
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 9136ce680c3..49ea1aec0ed 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,45 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
+2018-06-22 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ Backport from mainline
+ 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
+
+ * config/arm/cmse.c (cmse_check_address_range): Replace
+ UINTPTR_MAX with __UINTPTR_MAX__ and uintptr_t with __UINTPTR_TYPE__.
+
+2018-04-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from mainline
+ 2018-03-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/85100
+ * config/i386/cpuinfo.c (XCR_XFEATURE_ENABLED_MASK): New.
+ (XSTATE_FP): Likewise.
+ (XSTATE_SSE): Likewise.
+ (XSTATE_YMM): Likewise.
+ (XSTATE_OPMASK): Likewise.
+ (XSTATE_ZMM): Likewise.
+ (XSTATE_HI_ZMM): Likewise.
+ (XCR_AVX_ENABLED_MASK): Likewise.
+ (XCR_AVX512F_ENABLED_MASK): Likewise.
+ (get_available_features): Enable AVX and AVX512 features only
+ if their states are supported by OSXSAVE.
+
+2018-03-11 John David Anglin <danglin@gcc.gnu.org>
+
+ Backport from mainline
+ 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
+
+ * config/pa/fptr.c (_dl_read_access_allowed): New.
+ (__canonicalize_funcptr_for_compare): Use it.
+
2018-02-20 Max Filippov <jcmvbkbc@gmail.com>
Backport from mainline
diff --git a/libgcc/config/arm/cmse.c b/libgcc/config/arm/cmse.c
index 4ef7102064e..e284bae4293 100644
--- a/libgcc/config/arm/cmse.c
+++ b/libgcc/config/arm/cmse.c
@@ -36,7 +36,7 @@ cmse_check_address_range (void *p, size_t size, int flags)
char *pb = (char *) p, *pe;
/* Check if the range wraps around. */
- if (UINTPTR_MAX - (uintptr_t) p < size)
+ if (__UINTPTR_MAX__ - (__UINTPTR_TYPE__) p < size)
return NULL;
/* Check if an unknown flag is present. */
@@ -51,7 +51,8 @@ cmse_check_address_range (void *p, size_t size, int flags)
/* Execute the right variant of the TT instructions. */
pe = pb + size - 1;
- const int singleCheck = (((uintptr_t) pb ^ (uintptr_t) pe) < 32);
+ const int singleCheck
+ = (((__UINTPTR_TYPE__) pb ^ (__UINTPTR_TYPE__) pe) < 32);
switch (flags & known_secure_level)
{
case 0:
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index a1dc011525f..29a1f80b1ad 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
@@ -220,6 +220,40 @@ get_available_features (unsigned int ecx, unsigned int edx,
unsigned int features = 0;
+ /* Get XCR_XFEATURE_ENABLED_MASK register with xgetbv. */
+#define XCR_XFEATURE_ENABLED_MASK 0x0
+#define XSTATE_FP 0x1
+#define XSTATE_SSE 0x2
+#define XSTATE_YMM 0x4
+#define XSTATE_OPMASK 0x20
+#define XSTATE_ZMM 0x40
+#define XSTATE_HI_ZMM 0x80
+
+#define XCR_AVX_ENABLED_MASK \
+ (XSTATE_SSE | XSTATE_YMM)
+#define XCR_AVX512F_ENABLED_MASK \
+ (XSTATE_SSE | XSTATE_YMM | XSTATE_OPMASK | XSTATE_ZMM | XSTATE_HI_ZMM)
+
+ /* Check if AVX and AVX512 are usable. */
+ int avx_usable = 0;
+ int avx512_usable = 0;
+ if ((ecx & bit_OSXSAVE))
+ {
+ /* Check if XMM, YMM, OPMASK, upper 256 bits of ZMM0-ZMM15 and
+ ZMM16-ZMM31 states are supported by OSXSAVE. */
+ unsigned int xcrlow;
+ unsigned int xcrhigh;
+ asm (".byte 0x0f, 0x01, 0xd0"
+ : "=a" (xcrlow), "=d" (xcrhigh)
+ : "c" (XCR_XFEATURE_ENABLED_MASK));
+ if ((xcrlow & XCR_AVX_ENABLED_MASK) == XCR_AVX_ENABLED_MASK)
+ {
+ avx_usable = 1;
+ avx512_usable = ((xcrlow & XCR_AVX512F_ENABLED_MASK)
+ == XCR_AVX512F_ENABLED_MASK);
+ }
+ }
+
if (edx & bit_CMOV)
features |= (1 << FEATURE_CMOV);
if (edx & bit_MMX)
@@ -242,10 +276,13 @@ get_available_features (unsigned int ecx, unsigned int edx,
features |= (1 << FEATURE_SSE4_1);
if (ecx & bit_SSE4_2)
features |= (1 << FEATURE_SSE4_2);
- if (ecx & bit_AVX)
- features |= (1 << FEATURE_AVX);
- if (ecx & bit_FMA)
- features |= (1 << FEATURE_FMA);
+ if (avx_usable)
+ {
+ if (ecx & bit_AVX)
+ features |= (1 << FEATURE_AVX);
+ if (ecx & bit_FMA)
+ features |= (1 << FEATURE_FMA);
+ }
/* Get Advanced Features at level 7 (eax = 7, ecx = 0). */
if (max_cpuid_level >= 7)
@@ -253,34 +290,40 @@ get_available_features (unsigned int ecx, unsigned int edx,
__cpuid_count (7, 0, eax, ebx, ecx, edx);
if (ebx & bit_BMI)
features |= (1 << FEATURE_BMI);
- if (ebx & bit_AVX2)
- features |= (1 << FEATURE_AVX2);
+ if (avx_usable)
+ {
+ if (ebx & bit_AVX2)
+ features |= (1 << FEATURE_AVX2);
+ }
if (ebx & bit_BMI2)
features |= (1 << FEATURE_BMI2);
- if (ebx & bit_AVX512F)
- features |= (1 << FEATURE_AVX512F);
- if (ebx & bit_AVX512VL)
- features |= (1 << FEATURE_AVX512VL);
- if (ebx & bit_AVX512BW)
- features |= (1 << FEATURE_AVX512BW);
- if (ebx & bit_AVX512DQ)
- features |= (1 << FEATURE_AVX512DQ);
- if (ebx & bit_AVX512CD)
- features |= (1 << FEATURE_AVX512CD);
- if (ebx & bit_AVX512PF)
- features |= (1 << FEATURE_AVX512PF);
- if (ebx & bit_AVX512ER)
- features |= (1 << FEATURE_AVX512ER);
- if (ebx & bit_AVX512IFMA)
- features |= (1 << FEATURE_AVX512IFMA);
- if (ecx & bit_AVX512VBMI)
- features |= (1 << FEATURE_AVX512VBMI);
- if (ecx & bit_AVX512VPOPCNTDQ)
- features |= (1 << FEATURE_AVX512VPOPCNTDQ);
- if (edx & bit_AVX5124VNNIW)
- features |= (1 << FEATURE_AVX5124VNNIW);
- if (edx & bit_AVX5124FMAPS)
- features |= (1 << FEATURE_AVX5124FMAPS);
+ if (avx512_usable)
+ {
+ if (ebx & bit_AVX512F)
+ features |= (1 << FEATURE_AVX512F);
+ if (ebx & bit_AVX512VL)
+ features |= (1 << FEATURE_AVX512VL);
+ if (ebx & bit_AVX512BW)
+ features |= (1 << FEATURE_AVX512BW);
+ if (ebx & bit_AVX512DQ)
+ features |= (1 << FEATURE_AVX512DQ);
+ if (ebx & bit_AVX512CD)
+ features |= (1 << FEATURE_AVX512CD);
+ if (ebx & bit_AVX512PF)
+ features |= (1 << FEATURE_AVX512PF);
+ if (ebx & bit_AVX512ER)
+ features |= (1 << FEATURE_AVX512ER);
+ if (ebx & bit_AVX512IFMA)
+ features |= (1 << FEATURE_AVX512IFMA);
+ if (ecx & bit_AVX512VBMI)
+ features |= (1 << FEATURE_AVX512VBMI);
+ if (ecx & bit_AVX512VPOPCNTDQ)
+ features |= (1 << FEATURE_AVX512VPOPCNTDQ);
+ if (edx & bit_AVX5124VNNIW)
+ features |= (1 << FEATURE_AVX5124VNNIW);
+ if (edx & bit_AVX5124FMAPS)
+ features |= (1 << FEATURE_AVX5124FMAPS);
+ }
}
/* Check cpuid level of extended features. */
@@ -292,10 +335,13 @@ get_available_features (unsigned int ecx, unsigned int edx,
if (ecx & bit_SSE4a)
features |= (1 << FEATURE_SSE4_A);
- if (ecx & bit_FMA4)
- features |= (1 << FEATURE_FMA4);
- if (ecx & bit_XOP)
- features |= (1 << FEATURE_XOP);
+ if (avx_usable)
+ {
+ if (ecx & bit_FMA4)
+ features |= (1 << FEATURE_FMA4);
+ if (ecx & bit_XOP)
+ features |= (1 << FEATURE_XOP);
+ }
}
__cpu_model.__cpu_features[0] = features;
diff --git a/libgcc/config/pa/fptr.c b/libgcc/config/pa/fptr.c
index 645fa5d833a..e145026df3e 100644
--- a/libgcc/config/pa/fptr.c
+++ b/libgcc/config/pa/fptr.c
@@ -52,6 +52,16 @@ typedef int (*fptr_t) (void);
typedef int (*fixup_t) (struct link_map *, unsigned int);
extern unsigned int _GLOBAL_OFFSET_TABLE_;
+static inline int
+_dl_read_access_allowed (unsigned int *addr)
+{
+ int result;
+
+ asm ("proberi (%1),3,%0" : "=r" (result) : "r" (addr) : );
+
+ return result;
+}
+
/* __canonicalize_funcptr_for_compare must be hidden so that it is not
placed in the dynamic symbol table. Like millicode functions, it
must be linked into all binaries in order access the got table of
@@ -82,6 +92,16 @@ __canonicalize_funcptr_for_compare (fptr_t fptr)
The second word in the plabel contains the relocation offset for the
function. */
plabel = (unsigned int *) ((unsigned int) fptr & ~3);
+ if (!_dl_read_access_allowed (plabel))
+ return (unsigned int) fptr;
+
+ /* Load first word of candidate descriptor. It should be a pointer
+ with word alignment and point to memory that can be read. */
+ got = (unsigned int *) plabel[0];
+ if (((unsigned int) got & 3) != 0
+ || !_dl_read_access_allowed (got))
+ return (unsigned int) fptr;
+
got = (unsigned int *) (plabel[0] + GOT_FROM_PLT_STUB);
/* Return the address of the function if the plabel has been resolved. */
diff --git a/libgcc/configure b/libgcc/configure
index 9a7eb8446bb..441601a1f76 100644
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -5298,7 +5298,7 @@ esac
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 798a50ea85b..afe561b2162 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,25 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
+2018-06-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ Backport from trunk.
+ PR libgfortran/86070
+ * io/write_float.def (build_float_string): Initialize *len.
+
+2018-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ Backport from trunk.
+ PR libgfortran/85840
+ * io/write.c (write_float_0, write_real, write_real_g0,
+ write_complex): Use separate local variables for the float
+ string length.
+
2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
diff --git a/libgfortran/configure b/libgfortran/configure
index 81238fcb79c..1db8f5f5224 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -26370,7 +26370,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c
index a7307a8f762..70af7703b7e 100644
--- a/libgfortran/io/write.c
+++ b/libgfortran/io/write.c
@@ -1483,7 +1483,7 @@ write_character (st_parameter_dt *dtp, const char *source, int kind, int length,
/* Floating point helper functions. */
-#define BUF_STACK_SZ 256
+#define BUF_STACK_SZ 384
static int
get_precision (st_parameter_dt *dtp, const fnode *f, const char *source, int kind)
@@ -1584,7 +1584,7 @@ write_float_0 (st_parameter_dt *dtp, const fnode *f, const char *source, int kin
char buf_stack[BUF_STACK_SZ];
char str_buf[BUF_STACK_SZ];
char *buffer, *result;
- size_t buf_size, res_len;
+ size_t buf_size, res_len, flt_str_len;
/* Precision for snprintf call. */
int precision = get_precision (dtp, f, source, kind);
@@ -1595,8 +1595,8 @@ write_float_0 (st_parameter_dt *dtp, const fnode *f, const char *source, int kin
buffer = select_buffer (dtp, f, precision, buf_stack, &buf_size, kind);
get_float_string (dtp, f, source , kind, 0, buffer,
- precision, buf_size, result, &res_len);
- write_float_string (dtp, result, res_len);
+ precision, buf_size, result, &flt_str_len);
+ write_float_string (dtp, result, flt_str_len);
if (buf_size > BUF_STACK_SZ)
free (buffer);
@@ -1699,7 +1699,7 @@ write_real (st_parameter_dt *dtp, const char *source, int kind)
char buf_stack[BUF_STACK_SZ];
char str_buf[BUF_STACK_SZ];
char *buffer, *result;
- size_t buf_size, res_len;
+ size_t buf_size, res_len, flt_str_len;
int orig_scale = dtp->u.p.scale_factor;
dtp->u.p.scale_factor = 1;
set_fnode_default (dtp, &f, kind);
@@ -1714,8 +1714,8 @@ write_real (st_parameter_dt *dtp, const char *source, int kind)
buffer = select_buffer (dtp, &f, precision, buf_stack, &buf_size, kind);
get_float_string (dtp, &f, source , kind, 1, buffer,
- precision, buf_size, result, &res_len);
- write_float_string (dtp, result, res_len);
+ precision, buf_size, result, &flt_str_len);
+ write_float_string (dtp, result, flt_str_len);
dtp->u.p.scale_factor = orig_scale;
if (buf_size > BUF_STACK_SZ)
@@ -1734,7 +1734,7 @@ write_real_g0 (st_parameter_dt *dtp, const char *source, int kind, int d)
char buf_stack[BUF_STACK_SZ];
char str_buf[BUF_STACK_SZ];
char *buffer, *result;
- size_t buf_size, res_len;
+ size_t buf_size, res_len, flt_str_len;
int comp_d;
set_fnode_default (dtp, &f, kind);
@@ -1758,8 +1758,8 @@ write_real_g0 (st_parameter_dt *dtp, const char *source, int kind, int d)
buffer = select_buffer (dtp, &f, precision, buf_stack, &buf_size, kind);
get_float_string (dtp, &f, source , kind, comp_d, buffer,
- precision, buf_size, result, &res_len);
- write_float_string (dtp, result, res_len);
+ precision, buf_size, result, &flt_str_len);
+ write_float_string (dtp, result, flt_str_len);
dtp->u.p.g0_no_blanks = 0;
if (buf_size > BUF_STACK_SZ)
@@ -1784,7 +1784,7 @@ write_complex (st_parameter_dt *dtp, const char *source, int kind, size_t size)
char str1_buf[BUF_STACK_SZ];
char str2_buf[BUF_STACK_SZ];
char *buffer, *result1, *result2;
- size_t buf_size, res_len1, res_len2;
+ size_t buf_size, res_len1, res_len2, flt_str_len1, flt_str_len2;
int width, lblanks, orig_scale = dtp->u.p.scale_factor;
dtp->u.p.scale_factor = 1;
@@ -1807,18 +1807,18 @@ write_complex (st_parameter_dt *dtp, const char *source, int kind, size_t size)
buffer = select_buffer (dtp, &f, precision, buf_stack, &buf_size, kind);
get_float_string (dtp, &f, source , kind, 0, buffer,
- precision, buf_size, result1, &res_len1);
+ precision, buf_size, result1, &flt_str_len1);
get_float_string (dtp, &f, source + size / 2 , kind, 0, buffer,
- precision, buf_size, result2, &res_len2);
+ precision, buf_size, result2, &flt_str_len2);
if (!dtp->u.p.namelist_mode)
{
- lblanks = width - res_len1 - res_len2 - 3;
+ lblanks = width - flt_str_len1 - flt_str_len2 - 3;
write_x (dtp, lblanks, lblanks);
}
write_char (dtp, '(');
- write_float_string (dtp, result1, res_len1);
+ write_float_string (dtp, result1, flt_str_len1);
write_char (dtp, semi_comma);
- write_float_string (dtp, result2, res_len2);
+ write_float_string (dtp, result2, flt_str_len2);
write_char (dtp, ')');
dtp->u.p.scale_factor = orig_scale;
diff --git a/libgfortran/io/write_float.def b/libgfortran/io/write_float.def
index 7f0aa1d6143..b4971fd335e 100644
--- a/libgfortran/io/write_float.def
+++ b/libgfortran/io/write_float.def
@@ -135,6 +135,7 @@ build_float_string (st_parameter_dt *dtp, const fnode *f, char *buffer,
w = f->u.real.w;
d = f->u.real.d;
p = dtp->u.p.scale_factor;
+ *len = 0;
rchar = '5';
diff --git a/libgo/config.h.in b/libgo/config.h.in
index a7b1d47ac9b..312da8b2837 100644
--- a/libgo/config.h.in
+++ b/libgo/config.h.in
@@ -340,9 +340,6 @@
/* Define to 1 if you have the `unshare' function. */
#undef HAVE_UNSHARE
-/* Define to 1 if you have the <ustat.h> header file and it works. */
-#undef HAVE_USTAT_H
-
/* Define to 1 if you have the `utimensat' function. */
#undef HAVE_UTIMENSAT
diff --git a/libgo/configure b/libgo/configure
index 1d3d714fc05..94c42f67e82 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -14784,39 +14784,6 @@ fi
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <ustat.h> can be used" >&5
-$as_echo_n "checking whether <ustat.h> can be used... " >&6; }
-if test "${libgo_cv_c_ustat_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- CFLAGS_hold=$CFLAGS
-CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $OSCFLAGS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#ifdef HAVE_LINUX_FILTER_H
-#include <linux/filter.h>
-#endif
-#include <ustat.h>
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- libgo_cv_c_ustat_h=yes
-else
- libgo_cv_c_ustat_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CFLAGS=$CFLAGS_hold
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_c_ustat_h" >&5
-$as_echo "$libgo_cv_c_ustat_h" >&6; }
-if test $libgo_cv_c_ustat_h = yes; then
-
-$as_echo "#define HAVE_USTAT_H 1" >>confdefs.h
-
-fi
-
if test "$ac_cv_header_sys_mman_h" = yes; then
HAVE_SYS_MMAN_H_TRUE=
HAVE_SYS_MMAN_H_FALSE='#'
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 51b2c161846..0adbadf20d4 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -572,24 +572,6 @@ AC_CHECK_HEADERS([linux/filter.h linux/if_addr.h linux/if_ether.h linux/if_tun.h
#endif
])
-AC_CACHE_CHECK([whether <ustat.h> can be used],
-[libgo_cv_c_ustat_h],
-[CFLAGS_hold=$CFLAGS
-CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $OSCFLAGS"
-AC_COMPILE_IFELSE(
-[AC_LANG_SOURCE([
-#include <sys/types.h>
-#ifdef HAVE_LINUX_FILTER_H
-#include <linux/filter.h>
-#endif
-#include <ustat.h>
-])], [libgo_cv_c_ustat_h=yes], [libgo_cv_c_ustat_h=no])
-CFLAGS=$CFLAGS_hold])
-if test $libgo_cv_c_ustat_h = yes; then
- AC_DEFINE(HAVE_USTAT_H, 1,
- [Define to 1 if you have the <ustat.h> header file and it works.])
-fi
-
AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes)
AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv unsetenv dl_iterate_phdr)
diff --git a/libgo/go/os/wait_waitid.go b/libgo/go/os/wait_waitid.go
index 3337395510e..6eb487b11af 100644
--- a/libgo/go/os/wait_waitid.go
+++ b/libgo/go/os/wait_waitid.go
@@ -25,9 +25,12 @@ func (p *Process) blockUntilWaitable() (bool, error) {
// We don't care about the values it returns.
var siginfo [16]uint64
psig := &siginfo[0]
- _, _, e := syscall.Syscall6(syscall.SYS_WAITID, _P_PID, uintptr(p.Pid), uintptr(unsafe.Pointer(psig)), syscall.WEXITED|syscall.WNOWAIT, 0, 0)
+ r, _, e := syscall.Syscall6(syscall.SYS_WAITID, _P_PID, uintptr(p.Pid), uintptr(unsafe.Pointer(psig)), syscall.WEXITED|syscall.WNOWAIT, 0, 0)
runtime.KeepAlive(p)
- if e != 0 {
+ // Check r as well as e because syscall.Syscall6 currently
+ // just returns errno, and the SIGCHLD signal handler may
+ // change errno. See https://gcc.gnu.org/PR86331.
+ if r != 0 && e != 0 {
// waitid has been available since Linux 2.6.9, but
// reportedly is not available in Ubuntu on Windows.
// See issue 16610.
diff --git a/libgo/go/syscall/libcall_linux_ustat.go b/libgo/go/syscall/libcall_linux_ustat.go
deleted file mode 100644
index 261f086f47e..00000000000
--- a/libgo/go/syscall/libcall_linux_ustat.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// GNU/Linux library ustat call.
-// This is not supported on some kernels, such as arm64.
-// +build !arm64
-
-package syscall
-
-//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//ustat(dev _dev_t, ubuf *Ustat_t) _C_int
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 61d39d7e2dd..2284928ae53 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -1107,20 +1107,6 @@ grep '^type _sysinfo ' gen-sysinfo.go | \
-e 's/mem_unit/Unit/' \
>> ${OUT}
-# The ustat struct.
-grep '^type _ustat ' gen-sysinfo.go | \
- sed -e 's/_ustat/Ustat_t/' \
- -e 's/f_tfree/Tfree/' \
- -e 's/f_tinode/Tinoe/' \
- -e 's/f_fname/Fname/' \
- -e 's/f_fpack/Fpack/' \
- >> ${OUT}
-# Force it to be defined, as on some older GNU/Linux systems the
-# header file fails when using with <linux/filter.h>.
-if ! grep 'type _ustat ' gen-sysinfo.go >/dev/null 2>&1; then
- echo 'type Ustat_t struct { Tfree int32; Tinoe uint64; Fname [5+1]int8; Fpack [5+1]int8; }' >> ${OUT}
-fi
-
# The utimbuf struct.
grep '^type _utimbuf ' gen-sysinfo.go | \
sed -e 's/_utimbuf/Utimbuf/' \
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
index a1afc7d119c..7ff721816f9 100644
--- a/libgo/sysinfo.c
+++ b/libgo/sysinfo.c
@@ -135,9 +135,6 @@
#if defined(HAVE_SYS_SYSINFO_H)
#include <sys/sysinfo.h>
#endif
-#if defined(HAVE_USTAT_H)
-#include <ustat.h>
-#endif
#if defined(HAVE_UTIME_H)
#include <utime.h>
#endif
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index c3a640a0689..f020f1b040e 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,26 @@
+2018-06-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/86291
+ * testsuite/libgomp.c++/pr86291.C: New test.
+
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
+2018-05-01 Tom de Vries <tom@codesourcery.com>
+
+ backport from trunk:
+ 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
+ Tom de Vries <tom@codesourcery.com>
+
+ PR middle-end/84955
+ * testsuite/libgomp.oacc-c-c++-common/pr84955.c: New test.
+ * testsuite/libgomp.oacc-fortran/pr84955.f90: New test.
+
2018-03-03 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/libgomp/configure b/libgomp/configure
index b7e9f40b852..06166c66120 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -16823,7 +16823,7 @@ CFLAGS="$save_CFLAGS"
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libgomp/testsuite/libgomp.c++/pr86291.C b/libgomp/testsuite/libgomp.c++/pr86291.C
new file mode 100644
index 00000000000..89c4b2d37cd
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/pr86291.C
@@ -0,0 +1,51 @@
+// PR c++/86291
+// { dg-do run }
+// { dg-additional-options "-std=c++11" }
+
+extern "C" void abort ();
+
+struct I
+{
+ using size_type = __SIZE_TYPE__;
+ using difference_type = __PTRDIFF_TYPE__;
+ using value_type = int;
+ using reference = int &;
+ using pointer = int *;
+ static I begin () { return I{}; }
+ static I end () { I res; res.pos = res.num; return res; }
+ I &operator++ () { ++pos; return *this; }
+ reference operator* () const { return val; }
+ I &operator+= (size_type diff) { pos += diff; return *this; }
+ friend bool operator< (const I &a, const I &b) { return a.pos < b.pos; }
+ friend difference_type operator- (const I &a, const I &b) { return a.pos - b.pos; }
+ size_type pos = 0;
+ size_type num = 1;
+ mutable int val = 0;
+};
+
+int c;
+
+int
+main ()
+{
+#pragma omp parallel for collapse(10)
+ for (auto i = I::begin (); i < I::end (); ++i)
+ for (auto j = I::begin (); j < I::end (); ++j)
+ for (auto k = I::begin (); k < I::end (); ++k)
+ for (auto l = I::begin (); l < I::end (); ++l)
+ for (auto m = I::begin (); m < I::end (); ++m)
+ for (auto n = I::begin (); n < I::end (); ++n)
+ for (auto o = I::begin (); o < I::end (); ++o)
+ for (auto p = I::begin (); p < I::end (); ++p)
+ for (auto q = I::begin (); q < I::end (); ++q)
+ for (auto r = I::begin (); r < I::end (); ++r)
+ {
+ if (*i != 0 || *j != 0 || *k != 0 || *l != 0 || *m != 0
+ || *n != 0 || *o != 0 || *p != 0 || *q != 0 || *r != 0)
+ abort ();
+ #pragma omp atomic
+ c++;
+ }
+ if (c != 1)
+ abort ();
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84955.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84955.c
new file mode 100644
index 00000000000..e528faad0c4
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84955.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+int
+main (void)
+{
+ int i, j;
+
+#pragma acc parallel loop tile(2,3)
+ for (i = 1; i < 10; i++)
+ for (j = 1; j < 10; j++)
+ for (;;)
+ ;
+
+ return i + j;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/pr84955.f90 b/libgomp/testsuite/libgomp.oacc-fortran/pr84955.f90
new file mode 100644
index 00000000000..dc858653808
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-fortran/pr84955.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+
+subroutine s
+ integer :: i, j
+ !$acc parallel loop tile(2,3)
+ do i = 1, 10
+ do j = 1, 10
+ do
+ end do
+ end do
+ end do
+ !$acc end parallel loop
+end subroutine s
diff --git a/libhsail-rt/ChangeLog b/libhsail-rt/ChangeLog
index ae7bfb6854c..5d18dbb66b4 100644
--- a/libhsail-rt/ChangeLog
+++ b/libhsail-rt/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libhsail-rt/configure b/libhsail-rt/configure
index a490125f5b3..a4fcc10c1f9 100755
--- a/libhsail-rt/configure
+++ b/libhsail-rt/configure
@@ -14414,7 +14414,7 @@ _ACEOF
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libitm/ChangeLog b/libitm/ChangeLog
index f66dd31b03a..2d2fee851d0 100644
--- a/libitm/ChangeLog
+++ b/libitm/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libitm/configure b/libitm/configure
index 775f370fbb5..96c494d4a3f 100644
--- a/libitm/configure
+++ b/libitm/configure
@@ -17647,7 +17647,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libmpx/ChangeLog b/libmpx/ChangeLog
index af0595017c9..e10a10c719b 100644
--- a/libmpx/ChangeLog
+++ b/libmpx/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libmpx/configure b/libmpx/configure
index 853993a522f..2fd71ca89f6 100644
--- a/libmpx/configure
+++ b/libmpx/configure
@@ -11596,7 +11596,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 78121927ba0..1f1e198cc45 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libobjc/configure b/libobjc/configure
index abf5aed71cf..84862a82864 100755
--- a/libobjc/configure
+++ b/libobjc/configure
@@ -11708,7 +11708,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/liboffloadmic/ChangeLog b/liboffloadmic/ChangeLog
index 42d03b2e7be..2b20f8a3f1a 100644
--- a/liboffloadmic/ChangeLog
+++ b/liboffloadmic/ChangeLog
@@ -1,3 +1,12 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+ * plugin/confugure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/liboffloadmic/configure b/liboffloadmic/configure
index e22b214ddbc..f873716991b 100644
--- a/liboffloadmic/configure
+++ b/liboffloadmic/configure
@@ -14492,7 +14492,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/liboffloadmic/plugin/configure b/liboffloadmic/plugin/configure
index 8b8c041d2bf..c031eb3e7fa 100644
--- a/liboffloadmic/plugin/configure
+++ b/liboffloadmic/plugin/configure
@@ -14187,7 +14187,7 @@ hardcode_into_libs=no
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog
index 4c66b338b2c..004c808fb3d 100644
--- a/libquadmath/ChangeLog
+++ b/libquadmath/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libquadmath/configure b/libquadmath/configure
index d2f13bf7751..76a2c20b7e1 100755
--- a/libquadmath/configure
+++ b/libquadmath/configure
@@ -12929,7 +12929,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index 2c213f18e0c..a127bb0c2d6 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -1,3 +1,48 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
+2018-06-07 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/84761
+ * sanitizer_common/sanitizer_linux_libcdep.cc (__GLIBC_PREREQ):
+ Define if not defined.
+ (DL_INTERNAL_FUNCTION): Don't define.
+ (InitTlsSize): For __i386__ if not compiled against glibc 2.27+
+ determine at runtime whether to use regparm(3), stdcall calling
+ convention for older glibcs or normal calling convention for
+ newer glibcs for call to _dl_get_tls_static_info.
+
+2018-05-31 Matthias Klose <doko@ubuntu.com>
+
+ PR sanitizer/86012
+ * sanitizer_common/sanitizer_platform_limits_posix.cc: Define
+ SIZEOF_STRUCT_USTAT for 32bit sparc.
+
+2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR sanitizer/85835
+ * sanitizer_common/sanitizer_platform_limits_posix.cc: Don't
+ include <sys/ustat.h> for Linux.
+ (SIZEOF_STRUCT_USTAT): New.
+ (struct_ustat_sz): Use SIZEOF_STRUCT_USTAT for Linux.
+
+2018-04-24 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-04-18 Bill Seurer <seurer@linux.vnet.ibm.com>
+
+ PR sanitizer/85389
+ * asan/asan_allocator.h (kAllocatorSpace): For __powerpc64__ change
+ from 0xa0000000000ULL to ~(uptr)0.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libsanitizer/asan/asan_allocator.h b/libsanitizer/asan/asan_allocator.h
index 7eeddadd547..dacfddd5ddf 100644
--- a/libsanitizer/asan/asan_allocator.h
+++ b/libsanitizer/asan/asan_allocator.h
@@ -115,7 +115,7 @@ struct AsanMapUnmapCallback {
#if SANITIZER_CAN_USE_ALLOCATOR64
# if defined(__powerpc64__)
-const uptr kAllocatorSpace = 0xa0000000000ULL;
+const uptr kAllocatorSpace = ~(uptr)0;
const uptr kAllocatorSize = 0x20000000000ULL; // 2T.
typedef DefaultSizeClassMap SizeClassMap;
# elif defined(__aarch64__) && SANITIZER_ANDROID
diff --git a/libsanitizer/configure b/libsanitizer/configure
index 8e0c47ea838..a3a08d635f4 100755
--- a/libsanitizer/configure
+++ b/libsanitizer/configure
@@ -16511,7 +16511,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
index 63e70660cf3..dc342de6e10 100644
--- a/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
@@ -153,28 +153,43 @@ bool SanitizerGetThreadName(char *name, int max_len) {
#endif
}
+#ifndef __GLIBC_PREREQ
+#define __GLIBC_PREREQ(x, y) 0
+#endif
+
#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO
static uptr g_tls_size;
-#ifdef __i386__
-# define DL_INTERNAL_FUNCTION __attribute__((regparm(3), stdcall))
-#else
-# define DL_INTERNAL_FUNCTION
-#endif
-
void InitTlsSize() {
// all current supported platforms have 16 bytes stack alignment
const size_t kStackAlign = 16;
- typedef void (*get_tls_func)(size_t*, size_t*) DL_INTERNAL_FUNCTION;
- get_tls_func get_tls;
- void *get_tls_static_info_ptr = dlsym(RTLD_NEXT, "_dl_get_tls_static_info");
- CHECK_EQ(sizeof(get_tls), sizeof(get_tls_static_info_ptr));
- internal_memcpy(&get_tls, &get_tls_static_info_ptr,
- sizeof(get_tls_static_info_ptr));
- CHECK_NE(get_tls, 0);
size_t tls_size = 0;
size_t tls_align = 0;
- get_tls(&tls_size, &tls_align);
+ void *get_tls_static_info_ptr = dlsym(RTLD_NEXT, "_dl_get_tls_static_info");
+#if defined(__i386__) && !__GLIBC_PREREQ(2, 27)
+ /* On i?86, _dl_get_tls_static_info used to be internal_function, i.e.
+ __attribute__((regparm(3), stdcall)) before glibc 2.27 and is normal
+ function in 2.27 and later. */
+ if (!dlvsym(RTLD_NEXT, "glob", "GLIBC_2.27")) {
+ typedef void (*get_tls_func)(size_t*, size_t*)
+ __attribute__((regparm(3), stdcall));
+ get_tls_func get_tls;
+ CHECK_EQ(sizeof(get_tls), sizeof(get_tls_static_info_ptr));
+ internal_memcpy(&get_tls, &get_tls_static_info_ptr,
+ sizeof(get_tls_static_info_ptr));
+ CHECK_NE(get_tls, 0);
+ get_tls(&tls_size, &tls_align);
+ } else
+#endif
+ {
+ typedef void (*get_tls_func)(size_t*, size_t*);
+ get_tls_func get_tls;
+ CHECK_EQ(sizeof(get_tls), sizeof(get_tls_static_info_ptr));
+ internal_memcpy(&get_tls, &get_tls_static_info_ptr,
+ sizeof(get_tls_static_info_ptr));
+ CHECK_NE(get_tls, 0);
+ get_tls(&tls_size, &tls_align);
+ }
if (tls_align < kStackAlign)
tls_align = kStackAlign;
g_tls_size = RoundUpTo(tls_size, tls_align);
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
index 31a5e697eae..97eae3fc7bc 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -154,7 +154,6 @@ typedef struct user_fpregs elf_fpregset_t;
# include <sys/procfs.h>
#endif
#include <sys/user.h>
-#include <sys/ustat.h>
#include <linux/cyclades.h>
#include <linux/if_eql.h>
#include <linux/if_plip.h>
@@ -247,7 +246,19 @@ namespace __sanitizer {
#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
#if SANITIZER_LINUX && !SANITIZER_ANDROID
- unsigned struct_ustat_sz = sizeof(struct ustat);
+ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
+ // has been removed from glibc 2.28.
+#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
+ || defined(__x86_64__)
+#define SIZEOF_STRUCT_USTAT 32
+#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
+ || defined(__powerpc__) || defined(__s390__) || defined(__sparc__)
+#define SIZEOF_STRUCT_USTAT 20
+#else
+#error Unknown size of struct ustat
+#endif
+ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID
diff --git a/libssp/ChangeLog b/libssp/ChangeLog
index 299029f8521..9ae263e73ba 100644
--- a/libssp/ChangeLog
+++ b/libssp/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libssp/configure b/libssp/configure
index b14e922e6f1..ee1751d20db 100755
--- a/libssp/configure
+++ b/libssp/configure
@@ -11082,7 +11082,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index bb2d01ff659..88b54b41622 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,330 @@
+2018-07-05 François Dumont <fdumont@gcc.gnu.org>
+
+ Backport from mainline
+ 2018-07-04 François Dumont <fdumont@gcc.gnu.org>
+
+ PR libstdc++/86272
+ * include/debug/string
+ (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
+ Use __glibcxx_check_insert_range.
+
+2018-07-04 Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
+
+ src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
+
+ Backport from mainline
+ 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
+
+ LWG 3050 Fix cv-qualification of convertibility constraints
+ * include/std/chrono (duration, operator*, operator/, operator%): Use
+ const-qualified type as source type in is_convertible constraints.
+ * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
+ * testsuite/20_util/duration/cons/dr3050.cc: New.
+ * testsuite/20_util/duration/literals/range.cc: Rename to...
+ * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
+ dg-error lineno.
+
+ Backport from mainline
+ 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/86127
+ * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
+ unused typedef.
+ (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
+ Use node allocator to create and destroy elements.
+ (forward_list::_Tp_alloc_type): Remove unused typedef.
+ (forward_list::_Alloc_traits): Use allocator_traits instead of
+ __gnu_cxx::__alloc_traits.
+ * include/bits/forward_list.tcc (_Fwd_list_base::_M_erase_after):
+ Use node allocator to create and destroy elements.
+
+ Backport from mainline
+ 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/std/variant (__erased_dtor): Qualify call to __get.
+
+ Backport from mainline
+ 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
+ __invoke to prevent ADL.
+
+ Backport from mainline
+ 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
+ __get calls to avoid ADL and avoid ambiguity due to Clang bug.
+
+ Backport from mainline
+ 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/std/variant (__get): Qualify calls to avoid ADL.
+ (__select_index): Adjust whitespace.
+ (variant): Add using-declaration to workaround Clang bug.
+
+ Backport from mainline
+ 2018-05-24 Maya Rashish <coypu@sdf.org>
+
+ PR target/85904
+ * crossconfig.m4: Test for aligned_alloc on netbsd.
+ * configure: Regenerate.
+
+ Backport from mainline
+ 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/85098
+ * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
+ (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
+ (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
+ (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
+ definitions.
+ * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
+ whitespace.
+ * testsuite/28_regex/basic_regex/85098.cc: New
+
+ Backport from mainline
+ 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/85671
+ * include/experimental/bits/fs_path.h (operator/): Likewise.
+
+ Backport from mainline
+ 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
+ Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/83982
+ * include/bits/vector.tcc (vector::_M_default_append(size_type)):
+ Default-construct new elements before moving existing ones.
+ * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
+ New.
+
+ Backport from mainline
+ 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/84087 LWG DR 2268 basic_string default arguments
+ * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
+ (append(const basic_string&, size_type, size_type)
+ (assign(const basic_string&, size_type, size_type)
+ (insert(size_type, const basic_string&, size_type, size_type)
+ (replace(size_type,size_type,const basic_string&,size_type,size_type)
+ (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
+ Add default arguments (LWG 2268).
+ [_GLIBCXX_USE_CXX11_ABI=0]
+ (append(const basic_string&, size_type, size_type)
+ (assign(const basic_string&, size_type, size_type)
+ (insert(size_type, const basic_string&, size_type, size_type)
+ (replace(size_type,size_type,const basic_string&,size_type,size_type)
+ (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
+ Likewise.
+ * testsuite/21_strings/basic_string/dr2268.cc: New test.
+
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
+2018-06-22 Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2018-06-22 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/86138
+ * include/bits/basic_string.tcc:
+ [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
+ (basic_string<char>::_Rep::_S_empty_rep_storage)
+ (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
+ instantiation declarations.
+ [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
+ explicit instantiation declarations.
+ * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
+ * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
+
+2018-06-21 Jonathan Wakely <jwakely@redhat.com>
+
+ * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
+
+2018-06-19 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/std/utility: Remove unused <exception> header.
+
+2018-06-15 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/86169
+ * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
+ (basic_string::data()): Unshare string.
+ * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
+ New.
+
+2018-06-15 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
+ define for C++17 and above.
+
+2018-05-17 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/85812
+ * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
+ * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
+ Refactor to separate non-throwing and throwing implementations.
+ [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
+ if constructing the object throws.
+
+2018-05-14 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/67554
+ * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
+ (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
+
+ PR libstdc++/82966
+ * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
+ instead of type.
+ * testsuite/23_containers/set/modifiers/node_swap.cc: New.
+
+2018-05-10 Jonathan Wakely <jwakely@redhat.com>
+
+ * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
+ * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
+ of C++11 containers with Debug Mode support.
+ * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
+ * doc/html/*: Regenerate.
+
+2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
+ Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ PR libstdc++/80506
+ * include/bits/random.tcc (gamma_distribution::operator()): Fix magic
+ number used in loop condition.
+ (gamma_distribution::__generate_impl()): Ditto.
+
+2018-05-03 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/84769
+ * include/std/variant (visit): Qualify std::get call.
+
+ PR libstdc++/85632 use uintmax_t for arithmetic
+ * src/filesystem/ops.cc (experimental::filesystem::space): Perform
+ arithmetic in result type.
+ * testsuite/experimental/filesystem/operations/space.cc: New.
+
+2018-04-30 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ PR libstdc++/pr66689 - comp_ellint_3 and ellint_3 return garbage values
+ * include/tr1/ell_integral.tcc: Correct the nu sign convention
+ in ellint_3 and comp_ellint_3.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 06_comp_ellint_3/check_value.cc: Regen with correct values.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 14_ellint_3/check_value.cc: Ditto.
+ * testsuite/special_functions/06_comp_ellint_3/check_value.cc: Ditto.
+ * testsuite/special_functions/13_ellint_3/check_value.cc: Ditto.
+ * testsuite/special_functions/06_comp_ellint_3/pr66689.cc: New.
+ * testsuite/special_functions/13_ellint_3/pr66689.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 06_comp_ellint_3/pr66689.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 14_ellint_3/pr66689.cc: New.
+
+2018-04-30 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ PR libstdc++/68397 std::tr1::expint fails ... long double arguments.
+ * include/tr1/exp_integral.tcc: Increase iteration limits.
+ * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
+ pr68397.cc: New test.
+ * testsuite/special_functions/14_expint/pr68397.cc: New test.
+
+2018-04-18 Jonathan Wakely <jwakely@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR libstdc++/85442
+ * src/c++11/Makefile.am: Don't generate debuginfo again for
+ cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
+ * src/c++11/Makefile.in: Regenerate.
+
+2018-04-13 Jonathan Wakely <jwakely@redhat.com>
+
+ * src/c++11/Makefile.am: Fix sed command.
+ * src/c++11/Makefile.in: Regenerate.
+
+ * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
+ handle mangled names starting with double underscores on darwin.
+ * src/c++11/Makefile.in: Regenerate.
+
+2018-04-12 Jonathan Wakely <jwakely@redhat.com>
+
+ * src/c++11/Makefile.am: Fix comment.
+ * src/c++11/Makefile.in: Regenerate.
+ * src/c++11/cxx11-ios_failure.cc: Fix comment.
+ * src/c++98/ios_failure.cc: Likewise.
+
+ Backport from mainline
+ 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/85222
+ * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
+ cxx11-ios_failure.cc to rewrite type info for __ios_failure.
+ * src/c++11/Makefile.in: Regenerate.
+ * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
+ New types.
+ [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
+ * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
+ (_GLIBCXX_USE_CXX11_ABI): Don't define here.
+ * src/c++98/ios_failure.cc (__construct_ios_failure)
+ (__destroy_ios_failure, is_ios_failure_handler): New functions.
+ [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
+ * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
+ * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
+ handler types, to always catch std::ios_base::failure.
+ * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/
+ exceptions_failbit.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
+ exceptions_failbit.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_other/char/
+ exceptions_null.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_other/wchar_t/
+ exceptions_null.cc: Likewise.
+ * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
+ * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_other/char/
+ exceptions_null.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
+ exceptions_null.cc: Likewise.
+ * testsuite/27_io/ios_base/storage/2.cc: Likewise.
+
+2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR libstdc++/77691
+ * testsuite/experimental/memory_resource/resource_adaptor.cc:
+ xfail execution on 32-bit Solaris/x86.
+
+2018-03-13 Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/84769
+ * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
+ Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
+
+2018-03-12 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/84773
+ PR libstdc++/83662
+ * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
+ * configure: Regenerate.
+ * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
+ (aligned_alloc): Add using-declaration.
+ * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
+
2018-03-02 Jonathan Wakely <jwakely@redhat.com>
Backport from mainline
diff --git a/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt
index a31597e906f..06c61236f34 100644
--- a/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt
+++ b/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt
@@ -4004,6 +4004,7 @@ OBJECT:0:GLIBCXX_3.4.20
OBJECT:0:GLIBCXX_3.4.21
OBJECT:0:GLIBCXX_3.4.22
OBJECT:0:GLIBCXX_3.4.23
+OBJECT:0:GLIBCXX_3.4.24
OBJECT:0:GLIBCXX_3.4.3
OBJECT:0:GLIBCXX_3.4.4
OBJECT:0:GLIBCXX_3.4.5
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index fdbf7bea876..d352918884b 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -53329,6 +53329,19 @@ _ACEOF
fi
done
+ for ac_func in aligned_alloc posix_memalign memalign _aligned_malloc
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
;;
*-fuchsia*)
@@ -66079,6 +66092,19 @@ done
CXXFLAGS="$ac_save_CXXFLAGS"
+ for ac_func in aligned_alloc posix_memalign memalign _aligned_malloc
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
;;
*-netbsd*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
@@ -66246,6 +66272,19 @@ $as_echo "$ac_ld_relro" >&6; }
$as_echo "#define HAVE_ISNANL 1" >>confdefs.h
fi
+ for ac_func in aligned_alloc posix_memalign memalign _aligned_malloc
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
;;
*-qnx6.1* | *-qnx6.2*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
@@ -81671,7 +81710,7 @@ $as_echo "$gxx_include_dir" >&6; }
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
index 77c9828fe91..830a00b5d2a 100644
--- a/libstdc++-v3/crossconfig.m4
+++ b/libstdc++-v3/crossconfig.m4
@@ -133,6 +133,7 @@ case "${host}" in
AC_DEFINE(HAVE_ISNANL)
fi
AC_CHECK_FUNCS(__cxa_thread_atexit)
+ AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
;;
*-fuchsia*)
@@ -197,6 +198,7 @@ case "${host}" in
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
+ AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
;;
*-netbsd*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
@@ -215,6 +217,7 @@ case "${host}" in
AC_DEFINE(HAVE_ISINFL)
AC_DEFINE(HAVE_ISNANL)
fi
+ AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
;;
*-qnx6.1* | *-qnx6.2*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
diff --git a/libstdc++-v3/doc/html/faq.html b/libstdc++-v3/doc/html/faq.html
index f78d63cd61e..9e3924f8a60 100644
--- a/libstdc++-v3/doc/html/faq.html
+++ b/libstdc++-v3/doc/html/faq.html
@@ -534,14 +534,15 @@
except for some corner cases. Support for localization
in <code class="classname">locale</code> may be incomplete on some non-GNU
platforms. Also dependent on the underlying platform is support
- for <span class="type">wchar_t</span> and <span class="type">long
- long</span> specializations, and details of thread support.
+ for <span class="type">wchar_t</span> and <span class="type">long long</span> specializations,
+ and details of thread support.
</p><p>
Long answer: See the implementation status pages for
<a class="link" href="manual/status.html#status.iso.1998" title="C++ 1998/2003">C++98</a>,
- <a class="link" href="manual/status.html#status.iso.tr1" title="C++ TR1">TR1</a>, and
- <a class="link" href="manual/status.html#status.iso.2011" title="C++ 2011">C++11</a>.
- <a class="link" href="manual/status.html#status.iso.2014" title="C++ 2014">C++14</a>.
+ <a class="link" href="manual/status.html#status.iso.tr1" title="C++ TR1">TR1</a>,
+ <a class="link" href="manual/status.html#status.iso.2011" title="C++ 2011">C++11</a>,
+ <a class="link" href="manual/status.html#status.iso.2014" title="C++ 2014">C++14</a>, and
+ <a class="link" href="manual/status.html#status.iso.2017" title="C++ 2017">C++17</a>.
</p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.standard_bugs"></a><a id="q-standard_bugs"></a><p><strong>5.2.</strong></p></td><td align="left" valign="top"><p>
Bugs in the ISO C++ language or library specification
</p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-standard_bugs"></a></td><td align="left" valign="top"><p>
@@ -633,7 +634,7 @@
without other drawbacks, send us a patch.
</p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.ambiguous_overloads"></a><a id="q-ambiguous_overloads"></a><p><strong>6.3.</strong></p></td><td align="left" valign="top"><p>
Ambiguous overloads after including an old-style header
- </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-ambiguous_overloads"></a></td><td align="left" valign="top"><p>
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-ambiguous_overloads"></a></td><td align="left" valign="top"><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This answer is old and probably no longer be relevant.</p></div><p>
Another problem is the <code class="literal">rel_ops</code> namespace and the template
comparison operator functions contained therein. If they become
visible in the same namespace as other comparison functions
diff --git a/libstdc++-v3/doc/html/manual/debug_mode_using.html b/libstdc++-v3/doc/html/manual/debug_mode_using.html
index 99142903dfb..e4f7ea54d22 100644
--- a/libstdc++-v3/doc/html/manual/debug_mode_using.html
+++ b/libstdc++-v3/doc/html/manual/debug_mode_using.html
@@ -20,4 +20,4 @@
containers:
</p><div class="table"><a id="table.debug_mode_containers"></a><p class="title"><strong>Table 17.1. Debugging Containers</strong></p><div class="table-contents"><table class="table" summary="Debugging Containers" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">&lt;debug/bitset&gt;</code></td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">&lt;debug/deque&gt;</code></td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">&lt;debug/list&gt;</code></td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">&lt;debug/map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">&lt;debug/map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">&lt;debug/set&gt;</code></td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">&lt;debug/set&gt;</code></td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">&lt;debug/string&gt;</code></td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">&lt;debug/string&gt;</code></td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">&lt;debug/string&gt;</code></td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">&lt;debug/vector&gt;</code></td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++11 mode, these additional
containers have additional debug capability.
-</p><div class="table"><a id="table.debug_mode_containers_cxx11"></a><p class="title"><strong>Table 17.2. Debugging Containers C++11</strong></p><div class="table-contents"><table class="table" summary="Debugging Containers C++11" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">&lt;debug/unordered_map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">&lt;debug/unordered_map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">&lt;debug/unordered_set&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">&lt;debug/unordered_set&gt;</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug_mode_semantics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="debug_mode_design.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html> \ No newline at end of file
+</p><div class="table"><a id="table.debug_mode_containers_cxx11"></a><p class="title"><strong>Table 17.2. Debugging Containers C++11</strong></p><div class="table-contents"><table class="table" summary="Debugging Containers C++11" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::array</code></td><td align="left"><code class="filename">array</code></td><td align="left"><code class="classname">__gnu_debug::array</code></td><td align="left"><code class="filename">&lt;debug/array&gt;</code></td></tr><tr><td align="left"><code class="classname">std::forward_list</code></td><td align="left"><code class="filename">forward_list</code></td><td align="left"><code class="classname">__gnu_debug::forward_list</code></td><td align="left"><code class="filename">&lt;debug/forward_list&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">&lt;debug/unordered_map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">&lt;debug/unordered_map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">&lt;debug/unordered_set&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">&lt;debug/unordered_set&gt;</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug_mode_semantics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="debug_mode_design.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html> \ No newline at end of file
diff --git a/libstdc++-v3/doc/html/manual/using_dual_abi.html b/libstdc++-v3/doc/html/manual/using_dual_abi.html
index 4a62c0267be..916ac575f64 100644
--- a/libstdc++-v3/doc/html/manual/using_dual_abi.html
+++ b/libstdc++-v3/doc/html/manual/using_dual_abi.html
@@ -14,7 +14,7 @@
for the new implementations have different names the definitions for both
versions can be present in the same library.
</p><p> The <span class="symbol">_GLIBCXX_USE_CXX11_ABI</span> macro (see
-<a class="xref" href="using_macros.html" title="Macros">Macros</a>) controls whether
+ <a class="xref" href="using_macros.html" title="Macros">Macros</a>) controls whether
the declarations in the library headers use the old or new ABI.
So the decision of which ABI to use can be made separately for each
source file being compiled.
@@ -43,10 +43,35 @@
facet that derives from one or other version of
<code class="classname">time_get</code> is installed in the locale).
</p><p> Although the standard exception types defined in
- <code class="filename">&lt;stdexcept&gt;</code> use strings, they
+ <code class="filename">&lt;stdexcept&gt;</code> use strings, most
are not defined twice, so that a <code class="classname">std::out_of_range</code>
exception thrown in one file can always be caught by a suitable handler in
another file, even if the two files are compiled with different ABIs.
+</p><p> One exception type does change when using the new ABI, namely
+ <code class="classname">std::ios_base::failure</code>.
+ This is necessary because the 2011 standard changed its base class from
+ <code class="classname">std::exception</code> to
+ <code class="classname">std::system_error</code>, which causes its layout to change.
+ Exceptions due to iostream errors are thrown by a function inside
+ <code class="filename">libstdc++.so</code>, so whether the thrown
+ exception uses the old <code class="classname">std::ios_base::failure</code> type
+ or the new one depends on the ABI that was active when
+ <code class="filename">libstdc++.so</code> was built,
+ <span class="emphasis"><em>not</em></span> the ABI active in the user code that is using
+ iostreams.
+ This means that for a given build of GCC the type thrown is fixed.
+ In current releases the library throws a special type that can be caught
+ by handlers for either the old or new type,
+ but for GCC 7.1, 7.2 and 7.3 the library throws the new
+ <code class="classname">std::ios_base::failure</code> type,
+ and for GCC 5.x and 6.x the library throws the old type.
+ Catch handlers of type <code class="classname">std::ios_base::failure</code>
+ will only catch the exceptions if using a newer release,
+ or if the handler is compiled with the same ABI as the type thrown by
+ the library.
+ Handlers for <code class="classname">std::exception</code> will always catch
+ iostreams exceptions, because the old and new type both inherit from
+ <code class="classname">std::exception</code>.
</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.abi.trouble"></a>Troubleshooting</h3></div></div></div><p> If you get linker errors about undefined references to symbols
that involve types in the <code class="code">std::__cxx11</code> namespace or the tag
<code class="code">[abi:cxx11]</code> then it probably indicates that you are trying to
diff --git a/libstdc++-v3/doc/xml/faq.xml b/libstdc++-v3/doc/xml/faq.xml
index 8041c1428e6..9f0c5c9e661 100644
--- a/libstdc++-v3/doc/xml/faq.xml
+++ b/libstdc++-v3/doc/xml/faq.xml
@@ -734,15 +734,16 @@
except for some corner cases. Support for localization
in <classname>locale</classname> may be incomplete on some non-GNU
platforms. Also dependent on the underlying platform is support
- for <type>wchar_t</type> and <type>long
- long</type> specializations, and details of thread support.
+ for <type>wchar_t</type> and <type>long long</type> specializations,
+ and details of thread support.
</para>
<para>
Long answer: See the implementation status pages for
<link linkend="status.iso.1998">C++98</link>,
- <link linkend="status.iso.tr1">TR1</link>, and
- <link linkend="status.iso.2011">C++11</link>.
- <link linkend="status.iso.2014">C++14</link>.
+ <link linkend="status.iso.tr1">TR1</link>,
+ <link linkend="status.iso.2011">C++11</link>,
+ <link linkend="status.iso.2014">C++14</link>, and
+ <link linkend="status.iso.2017">C++17</link>.
</para>
</answer>
</qandaentry>
@@ -875,6 +876,9 @@
</para>
</question>
<answer xml:id="a-ambiguous_overloads">
+ <note>
+ <para>This answer is old and probably no longer be relevant.</para>
+ </note>
<para>
Another problem is the <literal>rel_ops</literal> namespace and the template
comparison operator functions contained therein. If they become
diff --git a/libstdc++-v3/doc/xml/manual/debug_mode.xml b/libstdc++-v3/doc/xml/manual/debug_mode.xml
index 65abf051674..1031171871d 100644
--- a/libstdc++-v3/doc/xml/manual/debug_mode.xml
+++ b/libstdc++-v3/doc/xml/manual/debug_mode.xml
@@ -285,7 +285,19 @@ containers have additional debug capability.
</row>
</thead>
<tbody>
- <row>
+ <row>
+ <entry><classname>std::array</classname></entry>
+ <entry><filename class="headerfile">array</filename></entry>
+ <entry><classname>__gnu_debug::array</classname></entry>
+ <entry><filename class="headerfile">&lt;debug/array&gt;</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::forward_list</classname></entry>
+ <entry><filename class="headerfile">forward_list</filename></entry>
+ <entry><classname>__gnu_debug::forward_list</classname></entry>
+ <entry><filename class="headerfile">&lt;debug/forward_list&gt;</filename></entry>
+ </row>
+ <row>
<entry><classname>std::unordered_map</classname></entry>
<entry><filename class="headerfile">unordered_map</filename></entry>
<entry><classname>__gnu_debug::unordered_map</classname></entry>
diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml
index 5c0e1b9f8c1..992e4ecea8d 100644
--- a/libstdc++-v3/doc/xml/manual/using.xml
+++ b/libstdc++-v3/doc/xml/manual/using.xml
@@ -1016,7 +1016,7 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
</para>
<para> The <symbol>_GLIBCXX_USE_CXX11_ABI</symbol> macro (see
-<xref linkend="manual.intro.using.macros"/>) controls whether
+ <xref linkend="manual.intro.using.macros"/>) controls whether
the declarations in the library headers use the old or new ABI.
So the decision of which ABI to use can be made separately for each
source file being compiled.
@@ -1051,12 +1051,39 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
</para>
<para> Although the standard exception types defined in
- <filename class="headerfile">&lt;stdexcept&gt;</filename> use strings, they
+ <filename class="headerfile">&lt;stdexcept&gt;</filename> use strings, most
are not defined twice, so that a <classname>std::out_of_range</classname>
exception thrown in one file can always be caught by a suitable handler in
another file, even if the two files are compiled with different ABIs.
</para>
+<para> One exception type does change when using the new ABI, namely
+ <classname>std::ios_base::failure</classname>.
+ This is necessary because the 2011 standard changed its base class from
+ <classname>std::exception</classname> to
+ <classname>std::system_error</classname>, which causes its layout to change.
+ Exceptions due to iostream errors are thrown by a function inside
+ <filename class="libraryfile">libstdc++.so</filename>, so whether the thrown
+ exception uses the old <classname>std::ios_base::failure</classname> type
+ or the new one depends on the ABI that was active when
+ <filename class="libraryfile">libstdc++.so</filename> was built,
+ <emphasis>not</emphasis> the ABI active in the user code that is using
+ iostreams.
+ This means that for a given build of GCC the type thrown is fixed.
+ In current releases the library throws a special type that can be caught
+ by handlers for either the old or new type,
+ but for GCC 7.1, 7.2 and 7.3 the library throws the new
+ <classname>std::ios_base::failure</classname> type,
+ and for GCC 5.x and 6.x the library throws the old type.
+ Catch handlers of type <classname>std::ios_base::failure</classname>
+ will only catch the exceptions if using a newer release,
+ or if the handler is compiled with the same ABI as the type thrown by
+ the library.
+ Handlers for <classname>std::exception</classname> will always catch
+ iostreams exceptions, because the old and new type both inherit from
+ <classname>std::exception</classname>.
+</para>
+
<section xml:id="manual.intro.using.abi.trouble" xreflabel="Dual ABI Troubleshooting"><info><title>Troubleshooting</title></info>
<para> If you get linker errors about undefined references to symbols
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index 7df39685ad3..abc57fd3905 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -1216,7 +1216,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
* remainder of @a __str is appended.
*/
basic_string&
- append(const basic_string& __str, size_type __pos, size_type __n)
+ append(const basic_string& __str, size_type __pos, size_type __n = npos)
{ return _M_append(__str._M_data()
+ __str._M_check(__pos, "basic_string::append"),
__str._M_limit(__pos, __n)); }
@@ -1381,7 +1381,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
* __str, the remainder of @a __str is used.
*/
basic_string&
- assign(const basic_string& __str, size_type __pos, size_type __n)
+ assign(const basic_string& __str, size_type __pos, size_type __n = npos)
{ return _M_replace(size_type(0), this->size(), __str._M_data()
+ __str._M_check(__pos, "basic_string::assign"),
__str._M_limit(__pos, __n)); }
@@ -1633,7 +1633,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
*/
basic_string&
insert(size_type __pos1, const basic_string& __str,
- size_type __pos2, size_type __n)
+ size_type __pos2, size_type __n = npos)
{ return this->replace(__pos1, size_type(0), __str._M_data()
+ __str._M_check(__pos2, "basic_string::insert"),
__str._M_limit(__pos2, __n)); }
@@ -1881,7 +1881,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
*/
basic_string&
replace(size_type __pos1, size_type __n1, const basic_string& __str,
- size_type __pos2, size_type __n2)
+ size_type __pos2, size_type __n2 = npos)
{ return this->replace(__pos1, __n1, __str._M_data()
+ __str._M_check(__pos2, "basic_string::replace"),
__str._M_limit(__pos2, __n2)); }
@@ -2941,7 +2941,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
*/
int
compare(size_type __pos1, size_type __n1, const basic_string& __str,
- size_type __pos2, size_type __n2) const;
+ size_type __pos2, size_type __n2 = npos) const;
/**
* @brief Compare to a C string.
@@ -4135,7 +4135,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
* remainder of @a __str is appended.
*/
basic_string&
- append(const basic_string& __str, size_type __pos, size_type __n);
+ append(const basic_string& __str, size_type __pos, size_type __n = npos);
/**
* @brief Append a C substring.
@@ -4280,7 +4280,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
* __str, the remainder of @a __str is used.
*/
basic_string&
- assign(const basic_string& __str, size_type __pos, size_type __n)
+ assign(const basic_string& __str, size_type __pos, size_type __n = npos)
{ return this->assign(__str._M_data()
+ __str._M_check(__pos, "basic_string::assign"),
__str._M_limit(__pos, __n)); }
@@ -4468,7 +4468,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
*/
basic_string&
insert(size_type __pos1, const basic_string& __str,
- size_type __pos2, size_type __n)
+ size_type __pos2, size_type __n = npos)
{ return this->insert(__pos1, __str._M_data()
+ __str._M_check(__pos2, "basic_string::insert"),
__str._M_limit(__pos2, __n)); }
@@ -4703,7 +4703,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
*/
basic_string&
replace(size_type __pos1, size_type __n1, const basic_string& __str,
- size_type __pos2, size_type __n2)
+ size_type __pos2, size_type __n2 = npos)
{ return this->replace(__pos1, __n1, __str._M_data()
+ __str._M_check(__pos2, "basic_string::replace"),
__str._M_limit(__pos2, __n2)); }
@@ -5130,7 +5130,10 @@ _GLIBCXX_END_NAMESPACE_CXX11
*/
_CharT*
data() noexcept
- { return _M_data(); }
+ {
+ _M_leak();
+ return _M_data();
+ }
#endif
/**
@@ -5779,7 +5782,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
*/
int
compare(size_type __pos1, size_type __n1, const basic_string& __str,
- size_type __pos2, size_type __n2) const;
+ size_type __pos2, size_type __n2 = npos) const;
/**
* @brief Compare to a C string.
diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc
index 41b7fa196b0..d185a54aaf0 100644
--- a/libstdc++-v3/include/bits/basic_string.tcc
+++ b/libstdc++-v3/include/bits/basic_string.tcc
@@ -1597,8 +1597,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
-#if _GLIBCXX_EXTERN_TEMPLATE > 0 && __cplusplus <= 201402L
+#if _GLIBCXX_EXTERN_TEMPLATE > 0
+ // The explicit instantiations definitions in src/c++11/string-inst.cc
+ // are compiled as C++14, so the new C++17 members aren't instantiated.
+ // Until those definitions are compiled as C++17 suppress the declaration,
+ // so C++17 code will implicitly instantiate std::string and std::wstring
+ // as needed.
+# if __cplusplus <= 201402L
extern template class basic_string<char>;
+# elif ! _GLIBCXX_USE_CXX11_ABI
+ // Still need to prevent implicit instantiation of the COW empty rep,
+ // to ensure the definition in libstdc++.so is unique (PR 86138).
+ extern template basic_string<char>::size_type
+ basic_string<char>::_Rep::_S_empty_rep_storage[];
+# endif
+
extern template
basic_istream<char>&
operator>>(basic_istream<char>&, string&);
@@ -1613,7 +1626,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
getline(basic_istream<char>&, string&);
#ifdef _GLIBCXX_USE_WCHAR_T
+# if __cplusplus <= 201402L
extern template class basic_string<wchar_t>;
+# elif ! _GLIBCXX_USE_CXX11_ABI
+ extern template basic_string<wchar_t>::size_type
+ basic_string<wchar_t>::_Rep::_S_empty_rep_storage[];
+# endif
+
extern template
basic_istream<wchar_t>&
operator>>(basic_istream<wchar_t>&, wstring&);
@@ -1626,8 +1645,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
extern template
basic_istream<wchar_t>&
getline(basic_istream<wchar_t>&, wstring&);
-#endif
-#endif
+#endif // _GLIBCXX_USE_WCHAR_T
+#endif // _GLIBCXX_EXTERN_TEMPLATE > 0
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
diff --git a/libstdc++-v3/include/bits/char_traits.h b/libstdc++-v3/include/bits/char_traits.h
index 3ecc30e46cb..791608ad3db 100644
--- a/libstdc++-v3/include/bits/char_traits.h
+++ b/libstdc++-v3/include/bits/char_traits.h
@@ -143,8 +143,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); }
};
-#define __cpp_lib_constexpr_char_traits 201611
-
template<typename _CharT>
_GLIBCXX14_CONSTEXPR int
char_traits<_CharT>::
@@ -217,6 +215,8 @@ namespace std _GLIBCXX_VISIBILITY(default)
_GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus > 201402
+#define __cpp_lib_constexpr_char_traits 201611
+
/**
* @brief Determine whether the characters of a NULL-terminated
* string are known at compile time.
diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h
index c37bf01345a..338e7b3dc6f 100644
--- a/libstdc++-v3/include/bits/forward_list.h
+++ b/libstdc++-v3/include/bits/forward_list.h
@@ -274,7 +274,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
struct _Fwd_list_base
{
protected:
- typedef __alloc_rebind<_Alloc, _Tp> _Tp_alloc_type;
typedef __alloc_rebind<_Alloc, _Fwd_list_node<_Tp>> _Node_alloc_type;
typedef __gnu_cxx::__alloc_traits<_Node_alloc_type> _Node_alloc_traits;
@@ -345,11 +344,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_Node* __node = this->_M_get_node();
__try
{
- _Tp_alloc_type __a(_M_get_Node_allocator());
- typedef allocator_traits<_Tp_alloc_type> _Alloc_traits;
::new ((void*)__node) _Node;
- _Alloc_traits::construct(__a, __node->_M_valptr(),
- std::forward<_Args>(__args)...);
+ _Node_alloc_traits::construct(_M_get_Node_allocator(),
+ __node->_M_valptr(),
+ std::forward<_Args>(__args)...);
}
__catch(...)
{
@@ -412,10 +410,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
typedef _Fwd_list_base<_Tp, _Alloc> _Base;
typedef _Fwd_list_node<_Tp> _Node;
typedef _Fwd_list_node_base _Node_base;
- typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
typedef typename _Base::_Node_alloc_type _Node_alloc_type;
typedef typename _Base::_Node_alloc_traits _Node_alloc_traits;
- typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits;
+ typedef allocator_traits<__alloc_rebind<_Alloc, _Tp>> _Alloc_traits;
public:
// types:
diff --git a/libstdc++-v3/include/bits/forward_list.tcc b/libstdc++-v3/include/bits/forward_list.tcc
index b823b09e1af..c852aa1b716 100644
--- a/libstdc++-v3/include/bits/forward_list.tcc
+++ b/libstdc++-v3/include/bits/forward_list.tcc
@@ -69,8 +69,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{
_Node* __curr = static_cast<_Node*>(__pos->_M_next);
__pos->_M_next = __curr->_M_next;
- _Tp_alloc_type __a(_M_get_Node_allocator());
- allocator_traits<_Tp_alloc_type>::destroy(__a, __curr->_M_valptr());
+ _Node_alloc_traits::destroy(_M_get_Node_allocator(),
+ __curr->_M_valptr());
__curr->~_Node();
_M_put_node(__curr);
return __pos->_M_next;
@@ -87,8 +87,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{
_Node* __temp = __curr;
__curr = static_cast<_Node*>(__curr->_M_next);
- _Tp_alloc_type __a(_M_get_Node_allocator());
- allocator_traits<_Tp_alloc_type>::destroy(__a, __temp->_M_valptr());
+ _Node_alloc_traits::destroy(_M_get_Node_allocator(),
+ __temp->_M_valptr());
__temp->~_Node();
_M_put_node(__temp);
}
diff --git a/libstdc++-v3/include/bits/node_handle.h b/libstdc++-v3/include/bits/node_handle.h
index f75f7425f47..b4f732a36f0 100644
--- a/libstdc++-v3/include/bits/node_handle.h
+++ b/libstdc++-v3/include/bits/node_handle.h
@@ -105,7 +105,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
using std::swap;
swap(_M_ptr, __nh._M_ptr);
- if (_AllocTraits::propagate_on_container_swap
+ if (_AllocTraits::propagate_on_container_swap::value
|| !_M_alloc || !__nh._M_alloc)
_M_alloc.swap(__nh._M_alloc);
else
diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc
index df05ebea6e9..c43d85551c3 100644
--- a/libstdc++-v3/include/bits/random.tcc
+++ b/libstdc++-v3/include/bits/random.tcc
@@ -2356,7 +2356,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__v = __v * __v * __v;
__u = __aurng();
}
- while (__u > result_type(1.0) - 0.331 * __n * __n * __n * __n
+ while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n
&& (std::log(__u) > (0.5 * __n * __n + __a1
* (1.0 - __v + std::log(__v)))));
@@ -2405,7 +2405,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__v = __v * __v * __v;
__u = __aurng();
}
- while (__u > result_type(1.0) - 0.331 * __n * __n * __n * __n
+ while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n
&& (std::log(__u) > (0.5 * __n * __n + __a1
* (1.0 - __v + std::log(__v)))));
@@ -2426,7 +2426,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__v = __v * __v * __v;
__u = __aurng();
}
- while (__u > result_type(1.0) - 0.331 * __n * __n * __n * __n
+ while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n
&& (std::log(__u) > (0.5 * __n * __n + __a1
* (1.0 - __v + std::log(__v)))));
diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h
index 14a1ae6f61d..c8e6bfcaea4 100644
--- a/libstdc++-v3/include/bits/regex.h
+++ b/libstdc++-v3/include/bits/regex.h
@@ -785,6 +785,48 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
_AutomatonPtr _M_automaton;
};
+#if __cplusplus < 201703L
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::icase;
+
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::nosubs;
+
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::optimize;
+
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::collate;
+
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::ECMAScript;
+
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::basic;
+
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::extended;
+
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::awk;
+
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::grep;
+
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::egrep;
+#endif // ! C++17
+
/** @brief Standard regular expressions. */
typedef basic_regex<char> regex;
diff --git a/libstdc++-v3/include/bits/regex_automaton.h b/libstdc++-v3/include/bits/regex_automaton.h
index a5fab6356cc..99b846dffc0 100644
--- a/libstdc++-v3/include/bits/regex_automaton.h
+++ b/libstdc++-v3/include/bits/regex_automaton.h
@@ -333,7 +333,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
"Number of NFA states exceeds limit. Please use shorter regex "
"string, or use smaller brace expression, or make "
"_GLIBCXX_REGEX_STATE_LIMIT larger.");
- return this->size()-1;
+ return this->size() - 1;
}
// Eliminate dummy node in this NFA to make it compact.
diff --git a/libstdc++-v3/include/bits/valarray_array.h b/libstdc++-v3/include/bits/valarray_array.h
index f169edd9728..bb32d7ac188 100644
--- a/libstdc++-v3/include/bits/valarray_array.h
+++ b/libstdc++-v3/include/bits/valarray_array.h
@@ -152,7 +152,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
inline static void
_S_do_it(const _Tp* __b, const _Tp* __e, _Tp* __restrict__ __o)
- { __builtin_memcpy(__o, __b, (__e - __b) * sizeof(_Tp)); }
+ {
+ if (__b)
+ __builtin_memcpy(__o, __b, (__e - __b) * sizeof(_Tp));
+ }
};
template<typename _Tp>
@@ -258,7 +261,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
inline static void
_S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
- { __builtin_memcpy(__b, __a, __n * sizeof (_Tp)); }
+ {
+ if (__n != 0)
+ __builtin_memcpy(__b, __a, __n * sizeof (_Tp));
+ }
};
// Copy a plain array __a[<__n>] into a play array __b[<>]
diff --git a/libstdc++-v3/include/bits/vector.tcc b/libstdc++-v3/include/bits/vector.tcc
index 8d688661c82..a2cc0cbf30f 100644
--- a/libstdc++-v3/include/bits/vector.tcc
+++ b/libstdc++-v3/include/bits/vector.tcc
@@ -567,23 +567,23 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{
const size_type __len =
_M_check_len(__n, "vector::_M_default_append");
- const size_type __old_size = this->size();
+ const size_type __size = this->size();
pointer __new_start(this->_M_allocate(__len));
- pointer __new_finish(__new_start);
+ pointer __destroy_from = pointer();
__try
{
- __new_finish
- = std::__uninitialized_move_if_noexcept_a
- (this->_M_impl._M_start, this->_M_impl._M_finish,
- __new_start, _M_get_Tp_allocator());
- __new_finish =
- std::__uninitialized_default_n_a(__new_finish, __n,
- _M_get_Tp_allocator());
+ std::__uninitialized_default_n_a(__new_start + __size,
+ __n, _M_get_Tp_allocator());
+ __destroy_from = __new_start + __size;
+ std::__uninitialized_move_if_noexcept_a(
+ this->_M_impl._M_start, this->_M_impl._M_finish,
+ __new_start, _M_get_Tp_allocator());
}
__catch(...)
{
- std::_Destroy(__new_start, __new_finish,
- _M_get_Tp_allocator());
+ if (__destroy_from)
+ std::_Destroy(__destroy_from, __destroy_from + __n,
+ _M_get_Tp_allocator());
_M_deallocate(__new_start, __len);
__throw_exception_again;
}
@@ -593,7 +593,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
this->_M_impl._M_end_of_storage
- this->_M_impl._M_start);
this->_M_impl._M_start = __new_start;
- this->_M_impl._M_finish = __new_finish;
+ this->_M_impl._M_finish = __new_start + __size + __n;
this->_M_impl._M_end_of_storage = __new_start + __len;
}
}
diff --git a/libstdc++-v3/include/c_global/cstdlib b/libstdc++-v3/include/c_global/cstdlib
index 006ac689763..52d5255592f 100644
--- a/libstdc++-v3/include/c_global/cstdlib
+++ b/libstdc++-v3/include/c_global/cstdlib
@@ -78,6 +78,9 @@ namespace std
// Get rid of those macros defined in <stdlib.h> in lieu of real functions.
#undef abort
+#if __cplusplus >= 201703L && defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
+# undef aligned_alloc
+#endif
#undef atexit
#if __cplusplus >= 201103L
# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
@@ -125,6 +128,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using ::ldiv_t;
using ::abort;
+#if __cplusplus >= 201703L && defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
+ using ::aligned_alloc;
+#endif
using ::atexit;
#if __cplusplus >= 201103L
# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
diff --git a/libstdc++-v3/include/debug/string b/libstdc++-v3/include/debug/string
index 9d4057b7d43..2c4f1aa3963 100644
--- a/libstdc++-v3/include/debug/string
+++ b/libstdc++-v3/include/debug/string
@@ -565,7 +565,7 @@ template<typename _CharT, typename _Traits = std::char_traits<_CharT>,
insert(iterator __p, _InputIterator __first, _InputIterator __last)
{
typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist;
- __glibcxx_check_insert_range2(__p, __first, __last, __dist);
+ __glibcxx_check_insert_range(__p, __first, __last, __dist);
if (__dist.second >= __dp_sign)
_Base::insert(__p.base(), __gnu_debug::__unsafe(__first),
diff --git a/libstdc++-v3/include/experimental/bits/fs_path.h b/libstdc++-v3/include/experimental/bits/fs_path.h
index 512167f6f2d..aa4949c5e24 100644
--- a/libstdc++-v3/include/experimental/bits/fs_path.h
+++ b/libstdc++-v3/include/experimental/bits/fs_path.h
@@ -509,7 +509,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
/// Append one path to another
inline path operator/(const path& __lhs, const path& __rhs)
- { return path(__lhs) /= __rhs; }
+ {
+ path __result(__lhs);
+ __result /= __rhs;
+ return __result;
+ }
/// Write a path to a stream
template<typename _CharT, typename _Traits>
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index 5d0151857e7..2138ff027e4 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -318,8 +318,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
// constexpr copy constructor will be ill-formed.
duration(const duration&) = default;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 3050. Conversion specification problem in chrono::duration
template<typename _Rep2, typename = typename
- enable_if<is_convertible<_Rep2, rep>::value
+ enable_if<is_convertible<const _Rep2&, rep>::value
&& (treat_as_floating_point<rep>::value
|| !treat_as_floating_point<_Rep2>::value)>::type>
constexpr explicit duration(const _Rep2& __rep)
@@ -463,8 +465,12 @@ _GLIBCXX_END_NAMESPACE_VERSION
return __cd(__cd(__lhs).count() - __cd(__rhs).count());
}
+ // SFINAE helper to obtain common_type<_Rep1, _Rep2> only if _Rep2
+ // is implicitly convertible to it.
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 3050. Conversion specification problem in chrono::duration constructor
template<typename _Rep1, typename _Rep2, bool =
- is_convertible<_Rep2,
+ is_convertible<const _Rep2&,
typename common_type<_Rep1, _Rep2>::type>::value>
struct __common_rep_type { };
diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility
index 978acb747e9..847e5184c5b 100644
--- a/libstdc++-v3/include/std/utility
+++ b/libstdc++-v3/include/std/utility
@@ -75,10 +75,6 @@
#include <bits/move.h>
#include <initializer_list>
-#if __cplusplus > 201402L
-#include <exception>
-#endif
-
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant
index 1f1a8492323..2efe62cfe7c 100644
--- a/libstdc++-v3/include/std/variant
+++ b/libstdc++-v3/include/std/variant
@@ -229,13 +229,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<size_t _Np, typename _Union>
constexpr decltype(auto) __get(in_place_index_t<_Np>, _Union&& __u)
- { return __get(in_place_index<_Np-1>, std::forward<_Union>(__u)._M_rest); }
+ {
+ return __variant::__get(in_place_index<_Np-1>,
+ std::forward<_Union>(__u)._M_rest);
+ }
// Returns the typed storage for __v.
template<size_t _Np, typename _Variant>
constexpr decltype(auto) __get(_Variant&& __v)
{
- return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u);
+ return __variant::__get(std::in_place_index<_Np>,
+ std::forward<_Variant>(__v)._M_u);
}
// Various functions as "vtable" entries, where those vtables are used by
@@ -251,7 +255,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Variant, size_t _Np>
void
__erased_dtor(_Variant&& __v)
- { std::_Destroy(std::__addressof(__get<_Np>(__v))); }
+ { std::_Destroy(std::__addressof(__variant::__get<_Np>(__v))); }
template<typename _Lhs, typename _Rhs>
void
@@ -274,8 +278,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr bool \
__erased_##__NAME(const _Variant& __lhs, const _Variant& __rhs) \
{ \
- return __get<_Np>(std::forward<_Variant>(__lhs)) \
- __OP __get<_Np>(std::forward<_Variant>(__rhs)); \
+ return __variant::__get<_Np>(std::forward<_Variant>(__lhs)) \
+ __OP __variant::__get<_Np>(std::forward<_Variant>(__rhs)); \
}
_VARIANT_RELATION_FUNCTION_TEMPLATE(<, less)
@@ -324,10 +328,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template <typename... _Types>
using __select_index =
- typename __select_int::_Select_int_base<sizeof...(_Types)+1,
+ typename __select_int::_Select_int_base<sizeof...(_Types) + 1,
unsigned char,
- unsigned short>
- ::type::value_type;
+ unsigned short>::type::value_type;
template<typename... _Types>
struct _Variant_storage<false, _Types...>
@@ -681,9 +684,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
decltype(auto)
static constexpr __visit_invoke(_Visitor&& __visitor, _Variants... __vars)
{
- return __invoke(std::forward<_Visitor>(__visitor),
- std::get<__indices>(
- std::forward<_Variants>(__vars))...);
+ return std::__invoke(std::forward<_Visitor>(__visitor),
+ std::get<__indices>(std::forward<_Variants>(__vars))...);
}
static constexpr auto
@@ -741,7 +743,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
static_assert(!is_void_v<_Tp>, "_Tp should not be void");
- return get<__detail::__variant::__index_of_v<_Tp, _Types...>>(__v);
+ return std::get<__detail::__variant::__index_of_v<_Tp, _Types...>>(__v);
}
template<typename _Tp, typename... _Types>
@@ -750,7 +752,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
static_assert(!is_void_v<_Tp>, "_Tp should not be void");
- return get<__detail::__variant::__index_of_v<_Tp, _Types...>>(
+ return std::get<__detail::__variant::__index_of_v<_Tp, _Types...>>(
std::move(__v));
}
@@ -760,7 +762,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
static_assert(!is_void_v<_Tp>, "_Tp should not be void");
- return get<__detail::__variant::__index_of_v<_Tp, _Types...>>(__v);
+ return std::get<__detail::__variant::__index_of_v<_Tp, _Types...>>(__v);
}
template<typename _Tp, typename... _Types>
@@ -769,7 +771,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
static_assert(!is_void_v<_Tp>, "_Tp should not be void");
- return get<__detail::__variant::__index_of_v<_Tp, _Types...>>(
+ return std::get<__detail::__variant::__index_of_v<_Tp, _Types...>>(
std::move(__v));
}
@@ -808,7 +810,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
static_assert(!is_void_v<_Tp>, "_Tp should not be void");
- return get_if<__detail::__variant::__index_of_v<_Tp, _Types...>>(__ptr);
+ return std::get_if<__detail::__variant::__index_of_v<_Tp, _Types...>>(
+ __ptr);
}
template<typename _Tp, typename... _Types>
@@ -819,7 +822,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
static_assert(!is_void_v<_Tp>, "_Tp should not be void");
- return get_if<__detail::__variant::__index_of_v<_Tp, _Types...>>(__ptr);
+ return std::get_if<__detail::__variant::__index_of_v<_Tp, _Types...>>(
+ __ptr);
}
struct monostate { };
@@ -1157,6 +1161,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#undef _VARIANT_RELATION_FUNCTION_TEMPLATE
+#ifdef __clang__
+ public:
+ using _Base::_M_u; // See https://bugs.llvm.org/show_bug.cgi?id=31852
+ private:
+#endif
+
template<size_t _Np, typename _Vp>
friend constexpr decltype(auto) __detail::__variant::
#if _GLIBCXX_INLINE_VERSION
@@ -1240,7 +1250,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using _Result_type =
decltype(std::forward<_Visitor>(__visitor)(
- get<0>(std::forward<_Variants>(__variants))...));
+ std::get<0>(std::forward<_Variants>(__variants))...));
constexpr auto& __vtable = __detail::__variant::__gen_vtable<
_Result_type, _Visitor&&, _Variants&&...>::_S_vtable;
diff --git a/libstdc++-v3/include/tr1/ell_integral.tcc b/libstdc++-v3/include/tr1/ell_integral.tcc
index 01f9313a256..99a6b9ce691 100644
--- a/libstdc++-v3/include/tr1/ell_integral.tcc
+++ b/libstdc++-v3/include/tr1/ell_integral.tcc
@@ -685,8 +685,8 @@ namespace tr1
const _Tp __kk = __k * __k;
return __ellint_rf(_Tp(0), _Tp(1) - __kk, _Tp(1))
- - __nu
- * __ellint_rj(_Tp(0), _Tp(1) - __kk, _Tp(1), _Tp(1) + __nu)
+ + __nu
+ * __ellint_rj(_Tp(0), _Tp(1) - __kk, _Tp(1), _Tp(1) - __nu)
/ _Tp(3);
}
}
@@ -735,9 +735,9 @@ namespace tr1
const _Tp __Pi = __s
* __ellint_rf(__cc, _Tp(1) - __kk * __ss, _Tp(1))
- - __nu * __sss
+ + __nu * __sss
* __ellint_rj(__cc, _Tp(1) - __kk * __ss, _Tp(1),
- _Tp(1) + __nu * __ss) / _Tp(3);
+ _Tp(1) - __nu * __ss) / _Tp(3);
if (__n == 0)
return __Pi;
diff --git a/libstdc++-v3/include/tr1/exp_integral.tcc b/libstdc++-v3/include/tr1/exp_integral.tcc
index f33f234e6f6..8e6f55178e7 100644
--- a/libstdc++-v3/include/tr1/exp_integral.tcc
+++ b/libstdc++-v3/include/tr1/exp_integral.tcc
@@ -86,7 +86,7 @@ namespace tr1
_Tp __term = _Tp(1);
_Tp __esum = _Tp(0);
_Tp __osum = _Tp(0);
- const unsigned int __max_iter = 100;
+ const unsigned int __max_iter = 1000;
for (unsigned int __i = 1; __i < __max_iter; ++__i)
{
__term *= - __x / __i;
@@ -156,7 +156,7 @@ namespace tr1
_Tp
__expint_En_series(unsigned int __n, _Tp __x)
{
- const unsigned int __max_iter = 100;
+ const unsigned int __max_iter = 1000;
const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
const int __nm1 = __n - 1;
_Tp __ans = (__nm1 != 0
@@ -202,7 +202,7 @@ namespace tr1
_Tp
__expint_En_cont_frac(unsigned int __n, _Tp __x)
{
- const unsigned int __max_iter = 100;
+ const unsigned int __max_iter = 1000;
const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
const _Tp __fp_min = std::numeric_limits<_Tp>::min();
const int __nm1 = __n - 1;
diff --git a/libstdc++-v3/libsupc++/cxxabi_init_exception.h b/libstdc++-v3/libsupc++/cxxabi_init_exception.h
index bf7b4bada81..2cf2c257ea8 100644
--- a/libstdc++-v3/libsupc++/cxxabi_init_exception.h
+++ b/libstdc++-v3/libsupc++/cxxabi_init_exception.h
@@ -62,6 +62,9 @@ namespace __cxxabiv1
void*
__cxa_allocate_exception(size_t) _GLIBCXX_NOTHROW;
+ void
+ __cxa_free_exception(void*) _GLIBCXX_NOTHROW;
+
// Initialize exception (this is a GNU extension)
__cxa_refcounted_exception*
__cxa_init_primary_exception(void *object, std::type_info *tinfo,
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index 0ece81d8137..faae9b77cb3 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -178,25 +178,31 @@ namespace std
exception_ptr
make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT
{
-#if __cpp_exceptions
+#if __cpp_exceptions && __cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI
+ void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex));
+ (void) __cxxabiv1::__cxa_init_primary_exception(
+ __e, const_cast<std::type_info*>(&typeid(__ex)),
+ __exception_ptr::__dest_thunk<_Ex>);
try
{
-#if __cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI
- void *__e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex));
- (void)__cxxabiv1::__cxa_init_primary_exception(
- __e, const_cast<std::type_info*>(&typeid(__ex)),
- __exception_ptr::__dest_thunk<_Ex>);
::new (__e) _Ex(__ex);
return exception_ptr(__e);
-#else
+ }
+ catch(...)
+ {
+ __cxxabiv1::__cxa_free_exception(__e);
+ return current_exception();
+ }
+#elif __cpp_exceptions
+ try
+ {
throw __ex;
-#endif
}
catch(...)
{
return current_exception();
}
-#else
+#else // no RTTI and no exceptions
return exception_ptr();
#endif
}
diff --git a/libstdc++-v3/src/c++11/Makefile.am b/libstdc++-v3/src/c++11/Makefile.am
index cf73d4d5c4c..776a4ba36e3 100644
--- a/libstdc++-v3/src/c++11/Makefile.am
+++ b/libstdc++-v3/src/c++11/Makefile.am
@@ -126,6 +126,26 @@ hashtable_c++0x.lo: hashtable_c++0x.cc
hashtable_c++0x.o: hashtable_c++0x.cc
$(CXXCOMPILE) -fimplicit-templates -c $<
+if ENABLE_DUAL_ABI
+# Rewrite the type info for __ios_failure.
+rewrite_ios_failure_typeinfo = sed -e '/^_*_ZTISt13__ios_failure:/,/_ZTVN10__cxxabiv120__si_class_type_infoE/s/_ZTVN10__cxxabiv120__si_class_type_infoE/_ZTVSt19__iosfail_type_info/'
+
+cxx11-ios_failure-lt.s: cxx11-ios_failure.cc
+ $(LTCXXCOMPILE) -S $< -o tmp-cxx11-ios_failure-lt.s
+ -test -f tmp-cxx11-ios_failure-lt.o && mv -f tmp-cxx11-ios_failure-lt.o tmp-cxx11-ios_failure-lt.s
+ $(rewrite_ios_failure_typeinfo) tmp-$@ > $@
+ -rm -f tmp-$@
+cxx11-ios_failure.s: cxx11-ios_failure.cc
+ $(CXXCOMPILE) -S $< -o tmp-$@
+ $(rewrite_ios_failure_typeinfo) tmp-$@ > $@
+ -rm -f tmp-$@
+
+cxx11-ios_failure.lo: cxx11-ios_failure-lt.s
+ $(LTCXXCOMPILE) -g0 -c $< -o $@
+cxx11-ios_failure.o: cxx11-ios_failure.s
+ $(CXXCOMPILE) -g0 -c $<
+endif
+
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in
index 295d915b436..6d78fd81f50 100644
--- a/libstdc++-v3/src/c++11/Makefile.in
+++ b/libstdc++-v3/src/c++11/Makefile.in
@@ -433,6 +433,9 @@ sources = \
libc__11convenience_la_SOURCES = $(sources) $(inst_sources)
+# Rewrite the type info for __ios_failure.
+@ENABLE_DUAL_ABI_TRUE@rewrite_ios_failure_typeinfo = sed -e '/^_*_ZTISt13__ios_failure:/,/_ZTVN10__cxxabiv120__si_class_type_infoE/s/_ZTVN10__cxxabiv120__si_class_type_infoE/_ZTVSt19__iosfail_type_info/'
+
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
@@ -748,6 +751,21 @@ hashtable_c++0x.lo: hashtable_c++0x.cc
hashtable_c++0x.o: hashtable_c++0x.cc
$(CXXCOMPILE) -fimplicit-templates -c $<
+@ENABLE_DUAL_ABI_TRUE@cxx11-ios_failure-lt.s: cxx11-ios_failure.cc
+@ENABLE_DUAL_ABI_TRUE@ $(LTCXXCOMPILE) -S $< -o tmp-cxx11-ios_failure-lt.s
+@ENABLE_DUAL_ABI_TRUE@ -test -f tmp-cxx11-ios_failure-lt.o && mv -f tmp-cxx11-ios_failure-lt.o tmp-cxx11-ios_failure-lt.s
+@ENABLE_DUAL_ABI_TRUE@ $(rewrite_ios_failure_typeinfo) tmp-$@ > $@
+@ENABLE_DUAL_ABI_TRUE@ -rm -f tmp-$@
+@ENABLE_DUAL_ABI_TRUE@cxx11-ios_failure.s: cxx11-ios_failure.cc
+@ENABLE_DUAL_ABI_TRUE@ $(CXXCOMPILE) -S $< -o tmp-$@
+@ENABLE_DUAL_ABI_TRUE@ $(rewrite_ios_failure_typeinfo) tmp-$@ > $@
+@ENABLE_DUAL_ABI_TRUE@ -rm -f tmp-$@
+
+@ENABLE_DUAL_ABI_TRUE@cxx11-ios_failure.lo: cxx11-ios_failure-lt.s
+@ENABLE_DUAL_ABI_TRUE@ $(LTCXXCOMPILE) -g0 -c $< -o $@
+@ENABLE_DUAL_ABI_TRUE@cxx11-ios_failure.o: cxx11-ios_failure.s
+@ENABLE_DUAL_ABI_TRUE@ $(CXXCOMPILE) -g0 -c $<
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/libstdc++-v3/src/c++11/cxx11-ios_failure.cc b/libstdc++-v3/src/c++11/cxx11-ios_failure.cc
index 2f60408782e..8833ba8c91a 100644
--- a/libstdc++-v3/src/c++11/cxx11-ios_failure.cc
+++ b/libstdc++-v3/src/c++11/cxx11-ios_failure.cc
@@ -28,6 +28,15 @@
#define _GLIBCXX_USE_CXX11_ABI 1
#include <ios>
+#include <bits/functexcept.h>
+#include <cxxabi.h>
+
+#ifdef _GLIBCXX_USE_NLS
+# include <libintl.h>
+# define _(msgid) gettext (msgid)
+#else
+# define _(msgid) (msgid)
+#endif
#if ! _GLIBCXX_USE_DUAL_ABI
# error This file should not be compiled for this configuration.
@@ -91,5 +100,66 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
ios_base::failure::what() const throw()
{ return runtime_error::what(); }
+#if __cpp_rtti
+ // These functions are defined in src/c++98/ios_failure.cc
+ extern void __construct_ios_failure(void*, const char*);
+ extern void __destroy_ios_failure(void*);
+ extern bool __is_ios_failure_handler(const __cxxabiv1::__class_type_info*);
+
+ // The type thrown to report errors during stream buffer operations.
+ // In addition to the ios::failure[abi:cxx11] base class it also has a
+ // member of the gcc4-compatible ios::failure type (in an opaque buffer).
+ struct __ios_failure : std::ios::failure
+ {
+ __ios_failure(const char* s) : failure(s)
+ { __construct_ios_failure(buf, runtime_error::what()); }
+
+ ~__ios_failure()
+ { __destroy_ios_failure(buf); }
+
+ // Use std::runtime_error as a proxy for the gcc4-compatible ios::failure
+ // (which can't be declared here because _GLIBCXX_USE_CXX11_ABI == 1).
+ // There are assertions in src/c++98/ios_failure.cc to ensure the size
+ // and alignment assumptions are valid.
+ alignas(runtime_error) unsigned char buf[sizeof(runtime_error)];
+ };
+
+ // Custom type info for __ios_failure.
+ class __iosfail_type_info : __cxxabiv1::__si_class_type_info
+ {
+ ~__iosfail_type_info();
+
+ bool
+ __do_upcast (const __class_type_info *dst_type,
+ void **obj_ptr) const override;
+ };
+
+ __iosfail_type_info::~__iosfail_type_info() = default;
+
+ // This function gets called to see if an exception of type
+ // __ios_failure can be upcast to the type in a catch handler.
+ bool
+ __iosfail_type_info::__do_upcast(const __class_type_info *dst_type,
+ void **obj_ptr) const
+ {
+ // If the handler is for the gcc4-compatible ios::failure type then
+ // catch the object stored in __ios_failure::buf instead of
+ // the __ios_failure exception object itself.
+ if (__is_ios_failure_handler(dst_type))
+ {
+ *obj_ptr = static_cast<__ios_failure*>(*obj_ptr)->buf;
+ return true;
+ }
+ // Otherwise proceed as normal to see if the handler matches.
+ return __class_type_info::__do_upcast(dst_type, obj_ptr);
+ }
+#else // ! __cpp_rtti
+ using __ios_failure = ios::failure;
+#endif
+
+ void
+ __throw_ios_failure(const char* __s __attribute__((unused)))
+ { _GLIBCXX_THROW_OR_ABORT(__ios_failure(_(__s))); }
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
diff --git a/libstdc++-v3/src/c++11/ios.cc b/libstdc++-v3/src/c++11/ios.cc
index 9061989f806..ef0da960007 100644
--- a/libstdc++-v3/src/c++11/ios.cc
+++ b/libstdc++-v3/src/c++11/ios.cc
@@ -26,29 +26,13 @@
// ISO C++ 14882: 27.4 Iostreams base classes
//
-// Determines the version of ios_base::failure thrown by __throw_ios_failure.
-// If !_GLIBCXX_USE_DUAL_ABI this will get undefined automatically.
-#define _GLIBCXX_USE_CXX11_ABI 1
-
#include <ios>
#include <limits>
-#include <bits/functexcept.h>
-
-#ifdef _GLIBCXX_USE_NLS
-# include <libintl.h>
-# define _(msgid) gettext (msgid)
-#else
-# define _(msgid) (msgid)
-#endif
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
- void
- __throw_ios_failure(const char* __s __attribute__((unused)))
- { _GLIBCXX_THROW_OR_ABORT(ios_base::failure(_(__s))); }
-
// Definitions for static const members of ios_base.
const ios_base::fmtflags ios_base::boolalpha;
const ios_base::fmtflags ios_base::dec;
diff --git a/libstdc++-v3/src/c++98/ios_failure.cc b/libstdc++-v3/src/c++98/ios_failure.cc
index 3ba25f81279..e7f35e21e2c 100644
--- a/libstdc++-v3/src/c++98/ios_failure.cc
+++ b/libstdc++-v3/src/c++98/ios_failure.cc
@@ -29,6 +29,18 @@
#define _GLIBCXX_USE_CXX11_ABI 0
#include <ios>
+#if _GLIBCXX_USE_DUAL_ABI && __cpp_rtti
+#include <cxxabi.h>
+#include <typeinfo>
+#endif
+
+#ifdef _GLIBCXX_USE_NLS
+# include <libintl.h>
+# define _(msgid) gettext (msgid)
+#else
+# define _(msgid) (msgid)
+#endif
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -43,5 +55,40 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
ios_base::failure::what() const throw()
{ return _M_msg.c_str(); }
+#if _GLIBCXX_USE_DUAL_ABI
+ // When the dual ABI is enabled __throw_ios_failure() is defined in
+ // src/c++11/cxx11-ios_failure.cc
+#if __cpp_rtti
+ // If RTTI is enabled the exception type thrown will use these functions to
+ // construct/destroy a gcc4-compatible ios::failure object in a buffer,
+ // and to catch that object via a handler of the gcc4-compatible type.
+ void
+ __construct_ios_failure(void* buf, const char* msg)
+ { ::new(buf) ios_base::failure(msg); }
+
+ void
+ __destroy_ios_failure(void* buf)
+ { static_cast<ios_base::failure*>(buf)->~failure(); }
+
+ bool
+ __is_ios_failure_handler(const __cxxabiv1::__class_type_info* type)
+ { return *type == typeid(ios::failure); }
+
+ namespace {
+ // C++98-style static assertions to ensure ios::failure fits in a buffer
+ // with the same size and alignment as runtime_error:
+ typedef char S[1 / (sizeof(ios::failure) <= sizeof(runtime_error))];
+ typedef char A[1 / (__alignof(ios::failure) <= __alignof(runtime_error))];
+ }
+#endif // __cpp_rtti
+
+#else // ! _GLIBCXX_USE_DUAL_ABI
+
+ void
+ __throw_ios_failure(const char* __s __attribute__((unused)))
+ { _GLIBCXX_THROW_OR_ABORT(ios::failure(_(__s))); }
+
+#endif
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc
index 8de3511346e..397a8d7ffe7 100644
--- a/libstdc++-v3/src/filesystem/ops.cc
+++ b/libstdc++-v3/src/filesystem/ops.cc
@@ -720,10 +720,8 @@ namespace
if (::mkdir(p.c_str(), mode))
{
const int err = errno;
- if (err != EEXIST || !is_directory(p))
+ if (err != EEXIST || !is_directory(p, ec))
ec.assign(err, std::generic_category());
- else
- ec.clear();
}
else
{
@@ -1391,10 +1389,11 @@ fs::space(const path& p, error_code& ec) noexcept
ec.assign(errno, std::generic_category());
else
{
+ uintmax_t fragment_size = f.f_frsize;
info = space_info{
- f.f_blocks * f.f_frsize,
- f.f_bfree * f.f_frsize,
- f.f_bavail * f.f_frsize
+ f.f_blocks * fragment_size,
+ f.f_bfree * fragment_size,
+ f.f_bavail * fragment_size
};
ec.clear();
}
diff --git a/libstdc++-v3/testsuite/18_support/aligned_alloc/aligned_alloc.cc b/libstdc++-v3/testsuite/18_support/aligned_alloc/aligned_alloc.cc
new file mode 100644
index 00000000000..1700df8fdda
--- /dev/null
+++ b/libstdc++-v3/testsuite/18_support/aligned_alloc/aligned_alloc.cc
@@ -0,0 +1,42 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++17" }
+// { dg-do run { target c++1z } }
+
+#include <cstdlib>
+#include <cstdint>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+#ifdef _GLIBCXX_HAVE_ALIGNED_ALLOC
+ void* p = std::aligned_alloc(256, 1);
+ if (p)
+ {
+ VERIFY( (reinterpret_cast<std::uintptr_t>(p) % 256) == 0 );
+ std::free(p);
+ }
+#endif
+}
+
+int
+main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/20_util/duration/cons/dr3050.cc b/libstdc++-v3/testsuite/20_util/duration/cons/dr3050.cc
new file mode 100644
index 00000000000..a4f57a38c30
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/duration/cons/dr3050.cc
@@ -0,0 +1,24 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-do compile { target c++11 } }
+
+#include <chrono>
+
+struct X { operator int64_t() /* not const */; };
+static_assert(!std::is_constructible<std::chrono::seconds, X>::value,
+ "LWG 3050");
diff --git a/libstdc++-v3/testsuite/20_util/duration/literals/range.cc b/libstdc++-v3/testsuite/20_util/duration/literals/range_neg.cc
index 531b53c42ec..bccff767ef7 100644
--- a/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
+++ b/libstdc++-v3/testsuite/20_util/duration/literals/range_neg.cc
@@ -26,6 +26,6 @@ test01()
// std::numeric_limits<int64_t>::max() == 9223372036854775807;
auto h = 9223372036854775808h;
- // { dg-error "cannot be represented" "" { target *-*-* } 893 }
+ // { dg-error "cannot be represented" "" { target *-*-* } 899 }
}
// { dg-prune-output "in constexpr expansion" } // needed for -O0
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
new file mode 100644
index 00000000000..a85fd9c82c9
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
@@ -0,0 +1,30 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++17" }
+// { dg-do compile { target c++1z } }
+// { dg-final { scan-assembler-not "_ZNSs4_Rep20_S_empty_rep_storageE:" } }
+
+#undef _GLIBCXX_USE_CXX11_ABI
+#define _GLIBCXX_USE_CXX11_ABI 0
+#include <string>
+
+void
+test01(std::string* s)
+{
+ s->~basic_string();
+}
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
new file mode 100644
index 00000000000..d77922976d0
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
@@ -0,0 +1,30 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++17" }
+// { dg-do compile { target c++1z } }
+// { dg-final { scan-assembler-not "_ZNSbIwSt11char_traitsIwESaIwEE4_Rep20_S_empty_rep_storageE:" } }
+
+#undef _GLIBCXX_USE_CXX11_ABI
+#define _GLIBCXX_USE_CXX11_ABI 0
+#include <string>
+
+void
+test01(std::wstring* s)
+{
+ s->~basic_string();
+}
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/dr2268.cc b/libstdc++-v3/testsuite/21_strings/basic_string/dr2268.cc
new file mode 100644
index 00000000000..3ad6860d81f
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/dr2268.cc
@@ -0,0 +1,45 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-do run { target c++11 } }
+
+#include <string>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ // PR libstdc++/84087
+
+ std::string s0 = "string";
+ std::string s;
+ s.append(s0, 2);
+ VERIFY( s == "ring" );
+ s.assign(s0, 3);
+ VERIFY( s == "ing" );
+ s.insert(2, s0, 4);
+ VERIFY( s == "inngg" );
+ s.replace(2, 3, s0, 2);
+ VERIFY( s == "inring" );
+ VERIFY( s.compare(2, 4, s0, 2) == 0 );
+}
+
+int
+main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/86169.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/86169.cc
new file mode 100644
index 00000000000..a8b0ff4aa3f
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/86169.cc
@@ -0,0 +1,37 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++17" }
+// { dg-do run { target c++1z } }
+
+// PR libstdc++/86169
+
+#ifndef _GLIBCXX_USE_CXX11_ABI
+# define _GLIBCXX_USE_CXX11_ABI 0
+#endif
+
+#include <string>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ const std::string s0{"hello world"};
+ std::string s1 {s0};
+ char* p = s1.data();
+ *p = ' ';
+ VERIFY(s0.compare("hello world") == 0);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/modifiers/node_swap.cc b/libstdc++-v3/testsuite/23_containers/set/modifiers/node_swap.cc
new file mode 100644
index 00000000000..32c7d496428
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/set/modifiers/node_swap.cc
@@ -0,0 +1,48 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++17" }
+// { dg-do run { target c++1z } }
+
+#include <set>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ // PR libstdc++/82966
+ std::set<int>::node_type n1, n2;
+ n1.swap(n2);
+ VERIFY( n1.empty() );
+ VERIFY( n2.empty() );
+}
+
+void
+test02()
+{
+ std::set<int> s{1, 2};
+ std::set<int>::node_type n1 = s.extract(1), n2;
+ swap(n1, n2);
+ VERIFY( n1.empty() );
+ VERIFY( !n2.empty() );
+}
+
+int main()
+{
+ test01();
+ test02();
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc
new file mode 100644
index 00000000000..b209d76867a
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc
@@ -0,0 +1,60 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <vector>
+#include <testsuite_hooks.h>
+
+struct X
+{
+ X() : data(1)
+ {
+ if (fail)
+ throw 1;
+ }
+
+ static bool fail;
+
+ std::vector<int> data;
+};
+
+bool X::fail = false;
+
+void
+test01()
+{
+ std::vector<X> v(2);
+ X* const addr = &v[0];
+ bool caught = false;
+ try {
+ X::fail = true;
+ v.resize(v.capacity() + 1); // force reallocation
+ } catch (int) {
+ caught = true;
+ }
+ VERIFY( caught );
+ VERIFY( v.size() == 2 );
+ VERIFY( &v[0] == addr );
+ // PR libstdc++/83982
+ VERIFY( ! v[0].data.empty() );
+ VERIFY( ! v[1].data.empty() );
+}
+
+int
+main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc
index 840017e4e85..aa05679ddbe 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc
@@ -46,13 +46,6 @@ void test02()
}
{
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
std::ios ios_01(0);
std::ios ios_02(0);
ios_01.clear(std::ios_base::eofbit);
@@ -62,7 +55,7 @@ void test02()
ios_01.copyfmt(ios_02);
VERIFY( false );
}
- catch(exception_type&) {
+ catch(std::ios_base::failure&) {
VERIFY( true );
}
catch(...) {
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc
index 152e783640a..89342d9ffe3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc
@@ -50,20 +50,13 @@ void test01()
}
{
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
std::ios ios_01(0);
ios_01.clear(std::ios_base::eofbit);
try {
ios_01.exceptions(std::ios_base::eofbit);
VERIFY( false );
}
- catch(exception_type&) {
+ catch(std::ios_base::failure&) {
iostate02 = ios_01.exceptions();
VERIFY( static_cast<bool>(iostate02 & std::ios_base::eofbit) );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/exceptions_failbit.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/exceptions_failbit.cc
index 5fa3f1f34a0..b4dde2047f6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/exceptions_failbit.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/exceptions_failbit.cc
@@ -27,20 +27,13 @@ void test_failbit()
istringstream stream("jaylib - champion sound");
stream.exceptions(ios_base::failbit);
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
try
{
T i;
stream >> i;
VERIFY( false );
}
- catch (const exception_type&)
+ catch (const std::ios_base::failure&)
{
// stream should set failbit and throw ios_base::failure.
VERIFY( stream.fail() );
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/exceptions_failbit.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/exceptions_failbit.cc
index 4ff48f73712..41d2f1fc24a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/exceptions_failbit.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/exceptions_failbit.cc
@@ -27,20 +27,13 @@ void test_failbit()
wistringstream stream(L"jaylib - champion sound");
stream.exceptions(ios_base::failbit);
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
try
{
T i;
stream >> i;
VERIFY( false );
}
- catch (const exception_type&)
+ catch (const std::ios_base::failure&)
{
// stream should set failbit and throw ios_base::failure.
VERIFY( stream.fail() );
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc
index 088aaa42808..1d146ddd5dd 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc
@@ -35,19 +35,12 @@ void test4()
istringstream stream;
stream.exceptions(ios_base::failbit);
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
try
{
stream >> static_cast<streambuf*>(0);
VERIFY(false);
}
- catch (exception_type&)
+ catch (std::ios_base::failure&)
{
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc
index fd6322b4cdb..d51bcd5e469 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc
@@ -35,19 +35,12 @@ void test4()
wistringstream stream;
stream.exceptions(ios_base::failbit);
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
try
{
stream >> static_cast<wstreambuf*>(0);
VERIFY( false );
}
- catch (exception_type&)
+ catch (std::ios_base::failure&)
{
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/12297.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/12297.cc
index 0900a70d148..708f343dd37 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/12297.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/12297.cc
@@ -26,19 +26,12 @@ int main()
istringstream stream;
stream.exceptions(ios_base::eofbit);
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
try
{
istream::sentry sentry(stream, false);
VERIFY( false );
}
- catch (exception_type&)
+ catch (std::ios_base::failure&)
{
VERIFY( stream.rdstate() == (ios_base::eofbit | ios_base::failbit) );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc
index e72fe1a03a0..6e572cc653d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc
@@ -26,19 +26,12 @@ int main()
wistringstream stream;
stream.exceptions(ios_base::eofbit);
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
try
{
wistream::sentry sentry(stream, false);
VERIFY( false );
}
- catch (exception_type&)
+ catch (std::ios_base::failure&)
{
VERIFY( stream.rdstate() == (ios_base::eofbit | ios_base::failbit) );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc
index 9a7bd06f21a..481f04e588c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc
@@ -37,19 +37,12 @@ void test3()
ostringstream stream;
stream.exceptions(ios_base::badbit);
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
try
{
stream << static_cast<streambuf*>(0);
VERIFY( false );
}
- catch (exception_type&)
+ catch (std::ios_base::failure&)
{
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc
index fcfb37d2dac..177cecb2edf 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc
@@ -37,19 +37,12 @@ void test3()
wostringstream stream;
stream.exceptions(ios_base::badbit);
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
try
{
stream << static_cast<wstreambuf*>(0);
VERIFY( false );
}
- catch (exception_type&)
+ catch (std::ios_base::failure&)
{
}
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/failure/dual_abi.cc b/libstdc++-v3/testsuite/27_io/ios_base/failure/dual_abi.cc
new file mode 100644
index 00000000000..9bd72a1baf9
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/ios_base/failure/dual_abi.cc
@@ -0,0 +1,99 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
+// { dg-do run { target c++11 } }
+
+#include <fstream>
+#include <system_error>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ using std::ios;
+ bool caught_ios_failure = false;
+ bool rethrown = false;
+ bool caught_system_error = false;
+ try {
+ std::ifstream f;
+ f.exceptions(ios::failbit | ios::badbit | ios::eofbit);
+ try {
+ f.get();
+ }
+ catch (const ios::failure&) // catch as old ABI type
+ {
+ caught_ios_failure = true;
+#if _GLIBCXX_USE_DUAL_ABI || _GLIBCXX_USE_CXX11_ABI == 1
+ rethrown = true;
+ throw; // re-throw, to catch as new ABI type
+#endif
+ }
+ }
+ catch (const std::system_error& e)
+ {
+ caught_system_error = true;
+ }
+
+ VERIFY( caught_ios_failure );
+ if (rethrown)
+ VERIFY( caught_system_error );
+}
+
+void
+test02()
+{
+ using std::ios;
+ const std::exception* p = nullptr;
+ bool caught_ios_failure = false;
+ bool caught_exception = false;
+ try {
+ std::ifstream f;
+ f.exceptions(ios::failbit | ios::badbit | ios::eofbit);
+ try {
+ f.get();
+ }
+ catch (const std::exception& e1)
+ {
+ caught_exception = true;
+ p = &e1;
+ throw;
+ }
+ }
+ catch (const ios::failure& e2)
+ {
+ caught_ios_failure = true;
+#if _GLIBCXX_USE_DUAL_ABI
+ // If the Dual ABI is active the library throws the new type,
+ // so e1 was an object of that new type and so &e1 != &e2.
+ VERIFY( p != &e2 );
+#else
+ // Otherwise there's only one type of ios::failure, so &e1 == &e2.
+ VERIFY( p == &e2 );
+#endif
+ }
+
+ VERIFY( caught_exception );
+ VERIFY( caught_ios_failure );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+}
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc b/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc
index 8fa306f61a2..2ec234a1bfb 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc
@@ -50,18 +50,11 @@ void test02()
ios.pword(1) = v;
VERIFY( ios.pword(1) == v );
- // The library throws the new definition of std::ios::failure
-#if _GLIBCXX_USE_CXX11_ABI
- typedef std::ios_base::failure exception_type;
-#else
- typedef std::exception exception_type;
-#endif
-
try
{
v = ios.pword(max);
}
- catch(exception_type&)
+ catch(std::ios_base::failure&)
{
// Ok.
VERIFY( ios.bad() );
@@ -80,7 +73,7 @@ void test02()
{
v = ios.pword(std::numeric_limits<int>::max());
}
- catch(exception_type&)
+ catch(std::ios_base::failure&)
{
// Ok.
VERIFY( ios.bad() );
@@ -99,7 +92,7 @@ void test02()
{
l = ios.iword(max);
}
- catch(exception_type&)
+ catch(std::ios_base::failure&)
{
// Ok.
VERIFY( ios.bad() );
@@ -118,7 +111,7 @@ void test02()
{
l = ios.iword(std::numeric_limits<int>::max());
}
- catch(exception_type&)
+ catch(std::ios_base::failure&)
{
// Ok.
VERIFY( ios.bad() );
diff --git a/libstdc++-v3/testsuite/28_regex/basic_regex/85098.cc b/libstdc++-v3/testsuite/28_regex/basic_regex/85098.cc
new file mode 100644
index 00000000000..173b1901a7c
--- /dev/null
+++ b/libstdc++-v3/testsuite/28_regex/basic_regex/85098.cc
@@ -0,0 +1,45 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-O0" }
+// { dg-do link { target c++11 } }
+
+#include <regex>
+
+void f(const std::regex_constants::syntax_option_type&) { }
+
+void
+test01()
+{
+ f(std::regex::icase);
+ f(std::regex::nosubs);
+ f(std::regex::optimize);
+ f(std::regex::collate);
+ f(std::regex::ECMAScript);
+ f(std::regex::basic);
+ f(std::regex::extended);
+ f(std::regex::awk);
+ f(std::regex::grep);
+ f(std::regex::egrep);
+ // f(std::regex::multiline);
+}
+
+int
+main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
new file mode 100644
index 00000000000..aa6a6aeaa60
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
@@ -0,0 +1,57 @@
+// Copyright (C) 2017-2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
+// { dg-do run { target c++11 } }
+// { dg-require-filesystem-ts "" }
+
+// 30.10.14.3 Permissions [fs.op.space]
+
+#include <experimental/filesystem>
+#include <testsuite_fs.h>
+#include <testsuite_hooks.h>
+
+namespace fs = std::experimental::filesystem;
+
+void
+test01()
+{
+ fs::space_info s = fs::space("/");
+ std::error_code ec = make_error_code(std::errc::invalid_argument);
+ s = fs::space("/", ec);
+ VERIFY( !ec );
+
+ s = fs::space(__gnu_test::nonexistent_path(), ec);
+ VERIFY( ec );
+ VERIFY( s.capacity == static_cast<uintmax_t>(-1) );
+ VERIFY( s.free == static_cast<uintmax_t>(-1) );
+ VERIFY( s.available == static_cast<uintmax_t>(-1) );
+}
+
+void
+test02()
+{
+ fs::space_info s = fs::space(".");
+ VERIFY( s.capacity >= s.free );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory_resource/resource_adaptor.cc b/libstdc++-v3/testsuite/experimental/memory_resource/resource_adaptor.cc
index 8e639f22380..b85c5c8be45 100644
--- a/libstdc++-v3/testsuite/experimental/memory_resource/resource_adaptor.cc
+++ b/libstdc++-v3/testsuite/experimental/memory_resource/resource_adaptor.cc
@@ -1,4 +1,5 @@
// { dg-do run { target c++14 } }
+// { dg-xfail-run-if "PR libstdc++/77691" { { i?86-*-solaris2.* x86_64-*-solaris2.* } && ilp32 } }
// Copyright (C) 2016-2017 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/special_functions/06_comp_ellint_3/check_value.cc b/libstdc++-v3/testsuite/special_functions/06_comp_ellint_3/check_value.cc
index 1a3dbac3d2d..60f6addf008 100644
--- a/libstdc++-v3/testsuite/special_functions/06_comp_ellint_3/check_value.cc
+++ b/libstdc++-v3/testsuite/special_functions/06_comp_ellint_3/check_value.cc
@@ -1,7 +1,7 @@
// { dg-do run { target c++11 } }
// { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
//
-// Copyright (C) 2016-2017 Free Software Foundation, Inc.
+// Copyright (C) 2016-2018 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -37,387 +37,444 @@
#endif
#include <specfun_testcase.h>
-
// Test data for k=-0.90000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 2.6751587294384150e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 5
+// max(|f - f_Boost| / |f_Boost|): 1.2838262090802751e-16
+// mean(f - f_Boost): 4.4408920985006264e-17
+// variance(f - f_Boost): 2.4347558803117648e-34
+// stddev(f - f_Boost): 1.5603704304785339e-17
const testcase_comp_ellint_3<double>
data001[10] =
{
{ 2.2805491384227703, -0.90000000000000002, 0.0000000000000000 },
- { 2.1537868513875287, -0.90000000000000002, 0.10000000000000001 },
- { 2.0443194576468890, -0.90000000000000002, 0.20000000000000001 },
- { 1.9486280260314426, -0.90000000000000002, 0.29999999999999999 },
- { 1.8641114227238349, -0.90000000000000002, 0.40000000000000002 },
- { 1.7888013241937861, -0.90000000000000002, 0.50000000000000000 },
- { 1.7211781128919523, -0.90000000000000002, 0.59999999999999998 },
- { 1.6600480747670940, -0.90000000000000002, 0.69999999999999996 },
- { 1.6044591960982202, -0.90000000000000002, 0.80000000000000004 },
- { 1.5536420236310946, -0.90000000000000002, 0.90000000000000002 },
+ { 2.4295011187834885, -0.90000000000000002, 0.10000000000000001 },
+ { 2.6076835743348412, -0.90000000000000002, 0.20000000000000001 },
+ { 2.8256506968858512, -0.90000000000000002, 0.30000000000000004 },
+ { 3.1000689868578619, -0.90000000000000002, 0.40000000000000002 },
+ { 3.4591069002104677, -0.90000000000000002, 0.50000000000000000 },
+ { 3.9549939883570229, -0.90000000000000002, 0.60000000000000009 },
+ { 4.6985482312992435, -0.90000000000000002, 0.70000000000000007 },
+ { 5.9820740813645710, -0.90000000000000002, 0.80000000000000004 },
+ { 8.9942562031858699, -0.90000000000000002, 0.90000000000000002 },
};
const double toler001 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 1.5960830388244336e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.1949393471095187e-16
+// mean(f - f_Boost): 9.5479180117763459e-16
+// variance(f - f_Boost): 5.4782007307014711e-34
+// stddev(f - f_Boost): 2.3405556457178006e-17
const testcase_comp_ellint_3<double>
data002[10] =
{
- { 1.9953027776647296, -0.80000000000000004, 0.0000000000000000 },
- { 1.8910755418379521, -0.80000000000000004, 0.10000000000000001 },
- { 1.8007226661734588, -0.80000000000000004, 0.20000000000000001 },
- { 1.7214611048717301, -0.80000000000000004, 0.29999999999999999 },
- { 1.6512267838651289, -0.80000000000000004, 0.40000000000000002 },
- { 1.5884528947755532, -0.80000000000000004, 0.50000000000000000 },
- { 1.5319262547427865, -0.80000000000000004, 0.59999999999999998 },
- { 1.4806912324625332, -0.80000000000000004, 0.69999999999999996 },
- { 1.4339837018309471, -0.80000000000000004, 0.80000000000000004 },
- { 1.3911845406776222, -0.80000000000000004, 0.90000000000000002 },
+ { 1.9953027776647294, -0.80000000000000004, 0.0000000000000000 },
+ { 2.1172616484005085, -0.80000000000000004, 0.10000000000000001 },
+ { 2.2624789434186798, -0.80000000000000004, 0.20000000000000001 },
+ { 2.4392042002725698, -0.80000000000000004, 0.30000000000000004 },
+ { 2.6604037035529728, -0.80000000000000004, 0.40000000000000002 },
+ { 2.9478781158239751, -0.80000000000000004, 0.50000000000000000 },
+ { 3.3418121892288055, -0.80000000000000004, 0.60000000000000009 },
+ { 3.9268876980046397, -0.80000000000000004, 0.70000000000000007 },
+ { 4.9246422058196071, -0.80000000000000004, 0.80000000000000004 },
+ { 7.2263259298637132, -0.80000000000000004, 0.90000000000000002 },
};
const double toler002 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3074070916136724e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 3
+// max(|f - f_Boost| / |f_Boost|): 1.9832236886714888e-16
+// mean(f - f_Boost): -1.5543122344752191e-16
+// variance(f - f_Boost): 2.9825759533819119e-33
+// stddev(f - f_Boost): 5.4612965066748680e-17
const testcase_comp_ellint_3<double>
data003[10] =
{
- { 1.8456939983747236, -0.69999999999999996, 0.0000000000000000 },
- { 1.7528050171757608, -0.69999999999999996, 0.10000000000000001 },
- { 1.6721098780092145, -0.69999999999999996, 0.20000000000000001 },
- { 1.6011813647733213, -0.69999999999999996, 0.29999999999999999 },
- { 1.5382162002954762, -0.69999999999999996, 0.40000000000000002 },
- { 1.4818433192178544, -0.69999999999999996, 0.50000000000000000 },
- { 1.4309994736080540, -0.69999999999999996, 0.59999999999999998 },
- { 1.3848459188329196, -0.69999999999999996, 0.69999999999999996 },
- { 1.3427110650397531, -0.69999999999999996, 0.80000000000000004 },
- { 1.3040500499695913, -0.69999999999999996, 0.90000000000000002 },
+ { 1.8456939983747234, -0.69999999999999996, 0.0000000000000000 },
+ { 1.9541347343119564, -0.69999999999999996, 0.10000000000000001 },
+ { 2.0829290325820202, -0.69999999999999996, 0.20000000000000001 },
+ { 2.2392290510988535, -0.69999999999999996, 0.30000000000000004 },
+ { 2.4342502915307880, -0.69999999999999996, 0.40000000000000002 },
+ { 2.6868019968236996, -0.69999999999999996, 0.50000000000000000 },
+ { 3.0314573496746742, -0.69999999999999996, 0.60000000000000009 },
+ { 3.5408408771788564, -0.69999999999999996, 0.70000000000000007 },
+ { 4.4042405729076961, -0.69999999999999996, 0.80000000000000004 },
+ { 6.3796094177887754, -0.69999999999999996, 0.90000000000000002 },
};
const double toler003 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1891472451898755e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 2
+// max(|f - f_Boost| / |f_Boost|): 2.2547200163366559e-16
+// mean(f - f_Boost): -1.9984014443252818e-16
+// variance(f - f_Boost): 4.9303806576313241e-33
+// stddev(f - f_Boost): 7.0216669371534022e-17
const testcase_comp_ellint_3<double>
data004[10] =
{
{ 1.7507538029157526, -0.59999999999999998, 0.0000000000000000 },
- { 1.6648615773343014, -0.59999999999999998, 0.10000000000000001 },
- { 1.5901418016279374, -0.59999999999999998, 0.20000000000000001 },
- { 1.5243814243493585, -0.59999999999999998, 0.29999999999999999 },
- { 1.4659345278069984, -0.59999999999999998, 0.40000000000000002 },
- { 1.4135484285693078, -0.59999999999999998, 0.50000000000000000 },
- { 1.3662507535812816, -0.59999999999999998, 0.59999999999999998 },
- { 1.3232737468822813, -0.59999999999999998, 0.69999999999999996 },
- { 1.2840021261752192, -0.59999999999999998, 0.80000000000000004 },
- { 1.2479362973851875, -0.59999999999999998, 0.90000000000000002 },
+ { 1.8508766487100685, -0.59999999999999998, 0.10000000000000001 },
+ { 1.9695980282802217, -0.59999999999999998, 0.20000000000000001 },
+ { 2.1134154405060599, -0.59999999999999998, 0.30000000000000004 },
+ { 2.2925036420985130, -0.59999999999999998, 0.40000000000000002 },
+ { 2.5239007084492711, -0.59999999999999998, 0.50000000000000000 },
+ { 2.8388723099514972, -0.59999999999999998, 0.60000000000000009 },
+ { 3.3029735898397159, -0.59999999999999998, 0.70000000000000007 },
+ { 4.0867036409261832, -0.59999999999999998, 0.80000000000000004 },
+ { 5.8709993116265604, -0.59999999999999998, 0.90000000000000002 },
};
const double toler004 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 1.7857620325589816e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 3
+// max(|f - f_Boost| / |f_Boost|): 2.1900131385114407e-16
+// mean(f - f_Boost): 2.4424906541753446e-16
+// variance(f - f_Boost): 7.3651365379430888e-33
+// stddev(f - f_Boost): 8.5820373676319358e-17
const testcase_comp_ellint_3<double>
data005[10] =
{
- { 1.6857503548125963, -0.50000000000000000, 0.0000000000000000 },
- { 1.6045524936084892, -0.50000000000000000, 0.10000000000000001 },
- { 1.5338490483665983, -0.50000000000000000, 0.20000000000000001 },
- { 1.4715681939859637, -0.50000000000000000, 0.29999999999999999 },
- { 1.4161679518465340, -0.50000000000000000, 0.40000000000000002 },
- { 1.3664739530045971, -0.50000000000000000, 0.50000000000000000 },
- { 1.3215740290190876, -0.50000000000000000, 0.59999999999999998 },
- { 1.2807475181182502, -0.50000000000000000, 0.69999999999999996 },
- { 1.2434165408189539, -0.50000000000000000, 0.80000000000000004 },
- { 1.2091116095504744, -0.50000000000000000, 0.90000000000000002 },
+ { 1.6857503548125961, -0.50000000000000000, 0.0000000000000000 },
+ { 1.7803034946545482, -0.50000000000000000, 0.10000000000000001 },
+ { 1.8922947612264021, -0.50000000000000000, 0.20000000000000001 },
+ { 2.0277924458111314, -0.50000000000000000, 0.30000000000000004 },
+ { 2.1962905366178065, -0.50000000000000000, 0.40000000000000002 },
+ { 2.4136715042011945, -0.50000000000000000, 0.50000000000000000 },
+ { 2.7090491861753558, -0.50000000000000000, 0.60000000000000009 },
+ { 3.1433945297859229, -0.50000000000000000, 0.70000000000000007 },
+ { 3.8750701888108070, -0.50000000000000000, 0.80000000000000004 },
+ { 5.5355132096026463, -0.50000000000000000, 0.90000000000000002 },
};
const double toler005 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.1925080711125793e-16
+// Test data for k=-0.39999999999999991.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1718164615986397e-16
+// mean(f - f_Boost): 6.2172489379008762e-16
+// variance(f - f_Boost): 1.6458949750907531e-31
+// stddev(f - f_Boost): 4.0569631192441877e-16
const testcase_comp_ellint_3<double>
data006[10] =
{
- { 1.6399998658645112, -0.40000000000000002, 0.0000000000000000 },
- { 1.5620566886683604, -0.40000000000000002, 0.10000000000000001 },
- { 1.4941414344266770, -0.40000000000000002, 0.20000000000000001 },
- { 1.4342789859950078, -0.40000000000000002, 0.29999999999999999 },
- { 1.3809986210732901, -0.40000000000000002, 0.40000000000000002 },
- { 1.3331797176377398, -0.40000000000000002, 0.50000000000000000 },
- { 1.2899514672527024, -0.40000000000000002, 0.59999999999999998 },
- { 1.2506255923253344, -0.40000000000000002, 0.69999999999999996 },
- { 1.2146499565727209, -0.40000000000000002, 0.80000000000000004 },
- { 1.1815758115929846, -0.40000000000000002, 0.90000000000000002 },
+ { 1.6399998658645112, -0.39999999999999991, 0.0000000000000000 },
+ { 1.7306968836847190, -0.39999999999999991, 0.10000000000000001 },
+ { 1.8380358826317627, -0.39999999999999991, 0.20000000000000001 },
+ { 1.9677924132520139, -0.39999999999999991, 0.30000000000000004 },
+ { 2.1289968719280026, -0.39999999999999991, 0.40000000000000002 },
+ { 2.3367461373176512, -0.39999999999999991, 0.50000000000000000 },
+ { 2.6186940209850191, -0.39999999999999991, 0.60000000000000009 },
+ { 3.0327078743873246, -0.39999999999999991, 0.70000000000000007 },
+ { 3.7289548002199902, -0.39999999999999991, 0.80000000000000004 },
+ { 5.3055535102872513, -0.39999999999999991, 0.90000000000000002 },
};
const double toler006 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8209844149902043e-16
+// Test data for k=-0.29999999999999993.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.9274792319434433e-16
+// mean(f - f_Boost): 6.2172489379008762e-16
+// variance(f - f_Boost): 8.7651211691223537e-33
+// stddev(f - f_Boost): 9.3622225828712025e-17
const testcase_comp_ellint_3<double>
data007[10] =
{
- { 1.6080486199305128, -0.30000000000000004, 0.0000000000000000 },
- { 1.5323534693557528, -0.30000000000000004, 0.10000000000000001 },
- { 1.4663658145259877, -0.30000000000000004, 0.20000000000000001 },
- { 1.4081767433479091, -0.30000000000000004, 0.29999999999999999 },
- { 1.3563643538969763, -0.30000000000000004, 0.40000000000000002 },
- { 1.3098448759814962, -0.30000000000000004, 0.50000000000000000 },
- { 1.2677758800420669, -0.30000000000000004, 0.59999999999999998 },
- { 1.2294913236274982, -0.30000000000000004, 0.69999999999999996 },
- { 1.1944567571590048, -0.30000000000000004, 0.80000000000000004 },
- { 1.1622376896064914, -0.30000000000000004, 0.90000000000000002 },
+ { 1.6080486199305128, -0.29999999999999993, 0.0000000000000000 },
+ { 1.6960848815118226, -0.29999999999999993, 0.10000000000000001 },
+ { 1.8002173372290500, -0.29999999999999993, 0.20000000000000001 },
+ { 1.9260216862473254, -0.29999999999999993, 0.30000000000000004 },
+ { 2.0822121773175533, -0.29999999999999993, 0.40000000000000002 },
+ { 2.2833505881933971, -0.29999999999999993, 0.50000000000000000 },
+ { 2.5560975528589065, -0.29999999999999993, 0.60000000000000009 },
+ { 2.9562123549913877, -0.29999999999999993, 0.70000000000000007 },
+ { 3.6283050484567170, -0.29999999999999993, 0.80000000000000004 },
+ { 5.1479514944016795, -0.29999999999999993, 0.90000000000000002 },
};
const double toler007 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8637687241174905e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.9753938705764407e-16
+// mean(f - f_Boost): 3.1086244689504381e-16
+// variance(f - f_Boost): 4.1147374377268827e-32
+// stddev(f - f_Boost): 2.0284815596220939e-16
const testcase_comp_ellint_3<double>
data008[10] =
{
- { 1.5868678474541660, -0.19999999999999996, 0.0000000000000000 },
- { 1.5126513474261087, -0.19999999999999996, 0.10000000000000001 },
- { 1.4479323932249564, -0.19999999999999996, 0.20000000000000001 },
- { 1.3908453514752477, -0.19999999999999996, 0.29999999999999999 },
- { 1.3400002519661005, -0.19999999999999996, 0.40000000000000002 },
- { 1.2943374404397372, -0.19999999999999996, 0.50000000000000000 },
- { 1.2530330675914556, -0.19999999999999996, 0.59999999999999998 },
- { 1.2154356555075863, -0.19999999999999996, 0.69999999999999996 },
- { 1.1810223448909909, -0.19999999999999996, 0.80000000000000004 },
- { 1.1493679916141861, -0.19999999999999996, 0.90000000000000002 },
+ { 1.5868678474541662, -0.19999999999999996, 0.0000000000000000 },
+ { 1.6731552050562593, -0.19999999999999996, 0.10000000000000001 },
+ { 1.7751816279738935, -0.19999999999999996, 0.20000000000000001 },
+ { 1.8983924169967101, -0.19999999999999996, 0.30000000000000004 },
+ { 2.0512956926676806, -0.19999999999999996, 0.40000000000000002 },
+ { 2.2481046259421302, -0.19999999999999996, 0.50000000000000000 },
+ { 2.5148333891629315, -0.19999999999999996, 0.60000000000000009 },
+ { 2.9058704854500967, -0.19999999999999996, 0.70000000000000007 },
+ { 3.5622166386422633, -0.19999999999999996, 0.80000000000000004 },
+ { 5.0448269356200370, -0.19999999999999996, 0.90000000000000002 },
};
const double toler008 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8887517676790089e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 5
+// max(|f - f_Boost| / |f_Boost|): 1.9932308021417639e-16
+// mean(f - f_Boost): 0.0000000000000000
+// variance(f - f_Boost): 6.8368087769470551e-64
+// stddev(f - f_Boost): 2.6147291976315738e-32
const testcase_comp_ellint_3<double>
data009[10] =
{
- { 1.5747455615173562, -0.099999999999999978, 0.0000000000000000 },
- { 1.5013711111199950, -0.099999999999999978, 0.10000000000000001 },
- { 1.4373749386463430, -0.099999999999999978, 0.20000000000000001 },
- { 1.3809159606704959, -0.099999999999999978, 0.29999999999999999 },
- { 1.3306223265207477, -0.099999999999999978, 0.40000000000000002 },
- { 1.2854480708580160, -0.099999999999999978, 0.50000000000000000 },
- { 1.2445798942989255, -0.099999999999999978, 0.59999999999999998 },
- { 1.2073745911083185, -0.099999999999999978, 0.69999999999999996 },
- { 1.1733158866987732, -0.099999999999999978, 0.80000000000000004 },
- { 1.1419839485283374, -0.099999999999999978, 0.90000000000000002 },
+ { 1.5747455615173560, -0.099999999999999978, 0.0000000000000000 },
+ { 1.6600374067558428, -0.099999999999999978, 0.10000000000000001 },
+ { 1.7608656115083421, -0.099999999999999978, 0.20000000000000001 },
+ { 1.8826015946315438, -0.099999999999999978, 0.30000000000000004 },
+ { 2.0336367403076760, -0.099999999999999978, 0.40000000000000002 },
+ { 2.2279868912966849, -0.099999999999999978, 0.50000000000000000 },
+ { 2.4913004919173827, -0.099999999999999978, 0.60000000000000009 },
+ { 2.8771910188009744, -0.099999999999999978, 0.70000000000000007 },
+ { 3.5246199613295617, -0.099999999999999978, 0.80000000000000004 },
+ { 4.9862890417305508, -0.099999999999999978, 0.90000000000000002 },
};
const double toler009 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 1.6725702444488137e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 2.1899085000907084e-16
+// mean(f - f_Boost): -2.2204460492503131e-16
+// variance(f - f_Boost): 5.4782007307014711e-32
+// stddev(f - f_Boost): 2.3405556457178008e-16
const testcase_comp_ellint_3<double>
data010[10] =
{
{ 1.5707963267948966, 0.0000000000000000, 0.0000000000000000 },
- { 1.4976955329233277, 0.0000000000000000, 0.10000000000000001 },
- { 1.4339343023863691, 0.0000000000000000, 0.20000000000000001 },
- { 1.3776795151134889, 0.0000000000000000, 0.29999999999999999 },
- { 1.3275651989026320, 0.0000000000000000, 0.40000000000000002 },
- { 1.2825498301618641, 0.0000000000000000, 0.50000000000000000 },
- { 1.2418235332245127, 0.0000000000000000, 0.59999999999999998 },
- { 1.2047457872617382, 0.0000000000000000, 0.69999999999999996 },
- { 1.1708024551734544, 0.0000000000000000, 0.80000000000000004 },
- { 1.1395754288497419, 0.0000000000000000, 0.90000000000000002 },
+ { 1.6557647109660170, 0.0000000000000000, 0.10000000000000001 },
+ { 1.7562036827601817, 0.0000000000000000, 0.20000000000000001 },
+ { 1.8774607092226381, 0.0000000000000000, 0.30000000000000004 },
+ { 2.0278893379868062, 0.0000000000000000, 0.40000000000000002 },
+ { 2.2214414690791831, 0.0000000000000000, 0.50000000000000000 },
+ { 2.4836470664490258, 0.0000000000000000, 0.60000000000000009 },
+ { 2.8678686047727386, 0.0000000000000000, 0.70000000000000007 },
+ { 3.5124073655203634, 0.0000000000000000, 0.80000000000000004 },
+ { 4.9672941328980516, 0.0000000000000000, 0.90000000000000002 },
};
const double toler010 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8887517676790089e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 5
+// max(|f - f_Boost| / |f_Boost|): 1.9932308021417639e-16
+// mean(f - f_Boost): -2.2204460492503132e-17
+// variance(f - f_Boost): 6.0868897007794120e-35
+// stddev(f - f_Boost): 7.8018521523926693e-18
const testcase_comp_ellint_3<double>
data011[10] =
{
- { 1.5747455615173562, 0.10000000000000009, 0.0000000000000000 },
- { 1.5013711111199950, 0.10000000000000009, 0.10000000000000001 },
- { 1.4373749386463430, 0.10000000000000009, 0.20000000000000001 },
- { 1.3809159606704959, 0.10000000000000009, 0.29999999999999999 },
- { 1.3306223265207477, 0.10000000000000009, 0.40000000000000002 },
- { 1.2854480708580160, 0.10000000000000009, 0.50000000000000000 },
- { 1.2445798942989255, 0.10000000000000009, 0.59999999999999998 },
- { 1.2073745911083185, 0.10000000000000009, 0.69999999999999996 },
- { 1.1733158866987732, 0.10000000000000009, 0.80000000000000004 },
- { 1.1419839485283374, 0.10000000000000009, 0.90000000000000002 },
+ { 1.5747455615173560, 0.10000000000000009, 0.0000000000000000 },
+ { 1.6600374067558428, 0.10000000000000009, 0.10000000000000001 },
+ { 1.7608656115083421, 0.10000000000000009, 0.20000000000000001 },
+ { 1.8826015946315440, 0.10000000000000009, 0.30000000000000004 },
+ { 2.0336367403076760, 0.10000000000000009, 0.40000000000000002 },
+ { 2.2279868912966849, 0.10000000000000009, 0.50000000000000000 },
+ { 2.4913004919173827, 0.10000000000000009, 0.60000000000000009 },
+ { 2.8771910188009744, 0.10000000000000009, 0.70000000000000007 },
+ { 3.5246199613295617, 0.10000000000000009, 0.80000000000000004 },
+ { 4.9862890417305508, 0.10000000000000009, 0.90000000000000002 },
};
const double toler011 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8637687241174905e-16
+// Test data for k=0.20000000000000018.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.9753938705764407e-16
+// mean(f - f_Boost): 3.1086244689504381e-16
+// variance(f - f_Boost): 4.1147374377268827e-32
+// stddev(f - f_Boost): 2.0284815596220939e-16
const testcase_comp_ellint_3<double>
data012[10] =
{
- { 1.5868678474541660, 0.19999999999999996, 0.0000000000000000 },
- { 1.5126513474261087, 0.19999999999999996, 0.10000000000000001 },
- { 1.4479323932249564, 0.19999999999999996, 0.20000000000000001 },
- { 1.3908453514752477, 0.19999999999999996, 0.29999999999999999 },
- { 1.3400002519661005, 0.19999999999999996, 0.40000000000000002 },
- { 1.2943374404397372, 0.19999999999999996, 0.50000000000000000 },
- { 1.2530330675914556, 0.19999999999999996, 0.59999999999999998 },
- { 1.2154356555075863, 0.19999999999999996, 0.69999999999999996 },
- { 1.1810223448909909, 0.19999999999999996, 0.80000000000000004 },
- { 1.1493679916141861, 0.19999999999999996, 0.90000000000000002 },
+ { 1.5868678474541662, 0.20000000000000018, 0.0000000000000000 },
+ { 1.6731552050562593, 0.20000000000000018, 0.10000000000000001 },
+ { 1.7751816279738935, 0.20000000000000018, 0.20000000000000001 },
+ { 1.8983924169967101, 0.20000000000000018, 0.30000000000000004 },
+ { 2.0512956926676806, 0.20000000000000018, 0.40000000000000002 },
+ { 2.2481046259421302, 0.20000000000000018, 0.50000000000000000 },
+ { 2.5148333891629315, 0.20000000000000018, 0.60000000000000009 },
+ { 2.9058704854500967, 0.20000000000000018, 0.70000000000000007 },
+ { 3.5622166386422633, 0.20000000000000018, 0.80000000000000004 },
+ { 5.0448269356200370, 0.20000000000000018, 0.90000000000000002 },
};
const double toler012 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8209844149902043e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.4585997630846713e-16
+// mean(f - f_Boost): 5.1070259132757197e-16
+// variance(f - f_Boost): 1.7591111235252501e-32
+// stddev(f - f_Boost): 1.3263148659067538e-16
const testcase_comp_ellint_3<double>
data013[10] =
{
{ 1.6080486199305128, 0.30000000000000004, 0.0000000000000000 },
- { 1.5323534693557528, 0.30000000000000004, 0.10000000000000001 },
- { 1.4663658145259877, 0.30000000000000004, 0.20000000000000001 },
- { 1.4081767433479091, 0.30000000000000004, 0.29999999999999999 },
- { 1.3563643538969763, 0.30000000000000004, 0.40000000000000002 },
- { 1.3098448759814962, 0.30000000000000004, 0.50000000000000000 },
- { 1.2677758800420669, 0.30000000000000004, 0.59999999999999998 },
- { 1.2294913236274982, 0.30000000000000004, 0.69999999999999996 },
- { 1.1944567571590048, 0.30000000000000004, 0.80000000000000004 },
- { 1.1622376896064914, 0.30000000000000004, 0.90000000000000002 },
+ { 1.6960848815118228, 0.30000000000000004, 0.10000000000000001 },
+ { 1.8002173372290500, 0.30000000000000004, 0.20000000000000001 },
+ { 1.9260216862473254, 0.30000000000000004, 0.30000000000000004 },
+ { 2.0822121773175533, 0.30000000000000004, 0.40000000000000002 },
+ { 2.2833505881933975, 0.30000000000000004, 0.50000000000000000 },
+ { 2.5560975528589065, 0.30000000000000004, 0.60000000000000009 },
+ { 2.9562123549913877, 0.30000000000000004, 0.70000000000000007 },
+ { 3.6283050484567174, 0.30000000000000004, 0.80000000000000004 },
+ { 5.1479514944016795, 0.30000000000000004, 0.90000000000000002 },
};
const double toler013 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.1925080711125793e-16
+// Test data for k=0.40000000000000013.
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.7696531428672557e-16
+// mean(f - f_Boost): 1.1990408665951691e-15
+// variance(f - f_Boost): 2.6514491536595121e-31
+// stddev(f - f_Boost): 5.1492224205791612e-16
const testcase_comp_ellint_3<double>
data014[10] =
{
- { 1.6399998658645112, 0.39999999999999991, 0.0000000000000000 },
- { 1.5620566886683604, 0.39999999999999991, 0.10000000000000001 },
- { 1.4941414344266770, 0.39999999999999991, 0.20000000000000001 },
- { 1.4342789859950078, 0.39999999999999991, 0.29999999999999999 },
- { 1.3809986210732901, 0.39999999999999991, 0.40000000000000002 },
- { 1.3331797176377398, 0.39999999999999991, 0.50000000000000000 },
- { 1.2899514672527024, 0.39999999999999991, 0.59999999999999998 },
- { 1.2506255923253344, 0.39999999999999991, 0.69999999999999996 },
- { 1.2146499565727209, 0.39999999999999991, 0.80000000000000004 },
- { 1.1815758115929846, 0.39999999999999991, 0.90000000000000002 },
+ { 1.6399998658645112, 0.40000000000000013, 0.0000000000000000 },
+ { 1.7306968836847190, 0.40000000000000013, 0.10000000000000001 },
+ { 1.8380358826317629, 0.40000000000000013, 0.20000000000000001 },
+ { 1.9677924132520141, 0.40000000000000013, 0.30000000000000004 },
+ { 2.1289968719280030, 0.40000000000000013, 0.40000000000000002 },
+ { 2.3367461373176512, 0.40000000000000013, 0.50000000000000000 },
+ { 2.6186940209850196, 0.40000000000000013, 0.60000000000000009 },
+ { 3.0327078743873246, 0.40000000000000013, 0.70000000000000007 },
+ { 3.7289548002199906, 0.40000000000000013, 0.80000000000000004 },
+ { 5.3055535102872522, 0.40000000000000013, 0.90000000000000002 },
};
const double toler014 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 1.7857620325589816e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 3
+// max(|f - f_Boost| / |f_Boost|): 2.1900131385114407e-16
+// mean(f - f_Boost): 2.4424906541753446e-16
+// variance(f - f_Boost): 7.3651365379430888e-33
+// stddev(f - f_Boost): 8.5820373676319358e-17
const testcase_comp_ellint_3<double>
data015[10] =
{
- { 1.6857503548125963, 0.50000000000000000, 0.0000000000000000 },
- { 1.6045524936084892, 0.50000000000000000, 0.10000000000000001 },
- { 1.5338490483665983, 0.50000000000000000, 0.20000000000000001 },
- { 1.4715681939859637, 0.50000000000000000, 0.29999999999999999 },
- { 1.4161679518465340, 0.50000000000000000, 0.40000000000000002 },
- { 1.3664739530045971, 0.50000000000000000, 0.50000000000000000 },
- { 1.3215740290190876, 0.50000000000000000, 0.59999999999999998 },
- { 1.2807475181182502, 0.50000000000000000, 0.69999999999999996 },
- { 1.2434165408189539, 0.50000000000000000, 0.80000000000000004 },
- { 1.2091116095504744, 0.50000000000000000, 0.90000000000000002 },
+ { 1.6857503548125961, 0.50000000000000000, 0.0000000000000000 },
+ { 1.7803034946545482, 0.50000000000000000, 0.10000000000000001 },
+ { 1.8922947612264021, 0.50000000000000000, 0.20000000000000001 },
+ { 2.0277924458111314, 0.50000000000000000, 0.30000000000000004 },
+ { 2.1962905366178065, 0.50000000000000000, 0.40000000000000002 },
+ { 2.4136715042011945, 0.50000000000000000, 0.50000000000000000 },
+ { 2.7090491861753558, 0.50000000000000000, 0.60000000000000009 },
+ { 3.1433945297859229, 0.50000000000000000, 0.70000000000000007 },
+ { 3.8750701888108070, 0.50000000000000000, 0.80000000000000004 },
+ { 5.5355132096026463, 0.50000000000000000, 0.90000000000000002 },
};
const double toler015 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.7124937590522226e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 2
+// max(|f - f_Boost| / |f_Boost|): 2.2547200163366559e-16
+// mean(f - f_Boost): -2.2204460492503131e-16
+// variance(f - f_Boost): 6.0868897007794117e-33
+// stddev(f - f_Boost): 7.8018521523926690e-17
const testcase_comp_ellint_3<double>
data016[10] =
{
{ 1.7507538029157526, 0.60000000000000009, 0.0000000000000000 },
- { 1.6648615773343014, 0.60000000000000009, 0.10000000000000001 },
- { 1.5901418016279374, 0.60000000000000009, 0.20000000000000001 },
- { 1.5243814243493585, 0.60000000000000009, 0.29999999999999999 },
- { 1.4659345278069984, 0.60000000000000009, 0.40000000000000002 },
- { 1.4135484285693078, 0.60000000000000009, 0.50000000000000000 },
- { 1.3662507535812816, 0.60000000000000009, 0.59999999999999998 },
- { 1.3232737468822813, 0.60000000000000009, 0.69999999999999996 },
- { 1.2840021261752192, 0.60000000000000009, 0.80000000000000004 },
- { 1.2479362973851873, 0.60000000000000009, 0.90000000000000002 },
+ { 1.8508766487100687, 0.60000000000000009, 0.10000000000000001 },
+ { 1.9695980282802217, 0.60000000000000009, 0.20000000000000001 },
+ { 2.1134154405060599, 0.60000000000000009, 0.30000000000000004 },
+ { 2.2925036420985130, 0.60000000000000009, 0.40000000000000002 },
+ { 2.5239007084492711, 0.60000000000000009, 0.50000000000000000 },
+ { 2.8388723099514976, 0.60000000000000009, 0.60000000000000009 },
+ { 3.3029735898397159, 0.60000000000000009, 0.70000000000000007 },
+ { 4.0867036409261832, 0.60000000000000009, 0.80000000000000004 },
+ { 5.8709993116265613, 0.60000000000000009, 0.90000000000000002 },
};
const double toler016 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3074070916136724e-16
+// Test data for k=0.70000000000000018.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 2.9298727220933567e-16
+// mean(f - f_Boost): 4.8849813083506892e-16
+// variance(f - f_Boost): 2.0476296953421943e-31
+// stddev(f - f_Boost): 4.5250742483877478e-16
const testcase_comp_ellint_3<double>
data017[10] =
{
- { 1.8456939983747236, 0.69999999999999996, 0.0000000000000000 },
- { 1.7528050171757608, 0.69999999999999996, 0.10000000000000001 },
- { 1.6721098780092145, 0.69999999999999996, 0.20000000000000001 },
- { 1.6011813647733213, 0.69999999999999996, 0.29999999999999999 },
- { 1.5382162002954762, 0.69999999999999996, 0.40000000000000002 },
- { 1.4818433192178544, 0.69999999999999996, 0.50000000000000000 },
- { 1.4309994736080540, 0.69999999999999996, 0.59999999999999998 },
- { 1.3848459188329196, 0.69999999999999996, 0.69999999999999996 },
- { 1.3427110650397531, 0.69999999999999996, 0.80000000000000004 },
- { 1.3040500499695913, 0.69999999999999996, 0.90000000000000002 },
+ { 1.8456939983747238, 0.70000000000000018, 0.0000000000000000 },
+ { 1.9541347343119566, 0.70000000000000018, 0.10000000000000001 },
+ { 2.0829290325820207, 0.70000000000000018, 0.20000000000000001 },
+ { 2.2392290510988540, 0.70000000000000018, 0.30000000000000004 },
+ { 2.4342502915307880, 0.70000000000000018, 0.40000000000000002 },
+ { 2.6868019968237000, 0.70000000000000018, 0.50000000000000000 },
+ { 3.0314573496746746, 0.70000000000000018, 0.60000000000000009 },
+ { 3.5408408771788569, 0.70000000000000018, 0.70000000000000007 },
+ { 4.4042405729076970, 0.70000000000000018, 0.80000000000000004 },
+ { 6.3796094177887763, 0.70000000000000018, 0.90000000000000002 },
};
const double toler017 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 1.5960830388244336e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.1949393471095187e-16
+// mean(f - f_Boost): 9.5479180117763459e-16
+// variance(f - f_Boost): 5.4782007307014711e-34
+// stddev(f - f_Boost): 2.3405556457178006e-17
const testcase_comp_ellint_3<double>
data018[10] =
{
- { 1.9953027776647296, 0.80000000000000004, 0.0000000000000000 },
- { 1.8910755418379521, 0.80000000000000004, 0.10000000000000001 },
- { 1.8007226661734588, 0.80000000000000004, 0.20000000000000001 },
- { 1.7214611048717301, 0.80000000000000004, 0.29999999999999999 },
- { 1.6512267838651289, 0.80000000000000004, 0.40000000000000002 },
- { 1.5884528947755532, 0.80000000000000004, 0.50000000000000000 },
- { 1.5319262547427865, 0.80000000000000004, 0.59999999999999998 },
- { 1.4806912324625332, 0.80000000000000004, 0.69999999999999996 },
- { 1.4339837018309471, 0.80000000000000004, 0.80000000000000004 },
- { 1.3911845406776222, 0.80000000000000004, 0.90000000000000002 },
+ { 1.9953027776647294, 0.80000000000000004, 0.0000000000000000 },
+ { 2.1172616484005085, 0.80000000000000004, 0.10000000000000001 },
+ { 2.2624789434186798, 0.80000000000000004, 0.20000000000000001 },
+ { 2.4392042002725698, 0.80000000000000004, 0.30000000000000004 },
+ { 2.6604037035529728, 0.80000000000000004, 0.40000000000000002 },
+ { 2.9478781158239751, 0.80000000000000004, 0.50000000000000000 },
+ { 3.3418121892288055, 0.80000000000000004, 0.60000000000000009 },
+ { 3.9268876980046397, 0.80000000000000004, 0.70000000000000007 },
+ { 4.9246422058196071, 0.80000000000000004, 0.80000000000000004 },
+ { 7.2263259298637132, 0.80000000000000004, 0.90000000000000002 },
};
const double toler018 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 2.6751587294384150e-16
+// Test data for k=0.90000000000000013.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 3
+// max(|f - f_Boost| / |f_Boost|): 1.5716352001310461e-16
+// mean(f - f_Boost): 4.4408920985006264e-17
+// variance(f - f_Boost): 2.4347558803117648e-34
+// stddev(f - f_Boost): 1.5603704304785339e-17
const testcase_comp_ellint_3<double>
data019[10] =
{
- { 2.2805491384227703, 0.89999999999999991, 0.0000000000000000 },
- { 2.1537868513875287, 0.89999999999999991, 0.10000000000000001 },
- { 2.0443194576468895, 0.89999999999999991, 0.20000000000000001 },
- { 1.9486280260314426, 0.89999999999999991, 0.29999999999999999 },
- { 1.8641114227238351, 0.89999999999999991, 0.40000000000000002 },
- { 1.7888013241937863, 0.89999999999999991, 0.50000000000000000 },
- { 1.7211781128919525, 0.89999999999999991, 0.59999999999999998 },
- { 1.6600480747670940, 0.89999999999999991, 0.69999999999999996 },
- { 1.6044591960982202, 0.89999999999999991, 0.80000000000000004 },
- { 1.5536420236310948, 0.89999999999999991, 0.90000000000000002 },
+ { 2.2805491384227707, 0.90000000000000013, 0.0000000000000000 },
+ { 2.4295011187834890, 0.90000000000000013, 0.10000000000000001 },
+ { 2.6076835743348421, 0.90000000000000013, 0.20000000000000001 },
+ { 2.8256506968858521, 0.90000000000000013, 0.30000000000000004 },
+ { 3.1000689868578628, 0.90000000000000013, 0.40000000000000002 },
+ { 3.4591069002104686, 0.90000000000000013, 0.50000000000000000 },
+ { 3.9549939883570242, 0.90000000000000013, 0.60000000000000009 },
+ { 4.6985482312992453, 0.90000000000000013, 0.70000000000000007 },
+ { 5.9820740813645727, 0.90000000000000013, 0.80000000000000004 },
+ { 8.9942562031858735, 0.90000000000000013, 0.90000000000000002 },
};
const double toler019 = 2.5000000000000020e-13;
-template<typename Tp, unsigned int Num>
+template<typename Ret, unsigned int Num>
void
- test(const testcase_comp_ellint_3<Tp> (&data)[Num], Tp toler)
+ test(const testcase_comp_ellint_3<Ret> (&data)[Num], Ret toler)
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
+ bool test __attribute__((unused)) = true;
+ const Ret eps = std::numeric_limits<Ret>::epsilon();
+ Ret max_abs_diff = -Ret(1);
+ Ret max_abs_frac = -Ret(1);
unsigned int num_datum = Num;
for (unsigned int i = 0; i < num_datum; ++i)
{
- const Tp f = std::comp_ellint_3(data[i].k, data[i].nu);
- const Tp f0 = data[i].f0;
- const Tp diff = f - f0;
+ const Ret f = std::comp_ellint_3(data[i].k, data[i].nu);
+ const Ret f0 = data[i].f0;
+ const Ret diff = f - f0;
if (std::abs(diff) > max_abs_diff)
max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
+ if (std::abs(f0) > Ret(10) * eps
+ && std::abs(f) > Ret(10) * eps)
{
- const Tp frac = diff / f0;
+ const Ret frac = diff / f0;
if (std::abs(frac) > max_abs_frac)
max_abs_frac = std::abs(frac);
}
diff --git a/libstdc++-v3/testsuite/special_functions/06_comp_ellint_3/pr66689.cc b/libstdc++-v3/testsuite/special_functions/06_comp_ellint_3/pr66689.cc
new file mode 100644
index 00000000000..c500f20dfd7
--- /dev/null
+++ b/libstdc++-v3/testsuite/special_functions/06_comp_ellint_3/pr66689.cc
@@ -0,0 +1,24 @@
+// { dg-do run { target c++11 } }
+// { dg-require-c-std "" }
+// { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
+// { dg-add-options ieee }
+
+#include <cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ double Pi1 = std::comp_ellint_3(0.75, 0.0);
+ VERIFY(std::abs(Pi1 - 1.91099) < 0.00001);
+
+ double Pi2 = std::comp_ellint_3(0.75, 0.5);
+ VERIFY(std::abs(Pi2 - 2.80011) < 0.00001);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/special_functions/13_ellint_3/check_value.cc b/libstdc++-v3/testsuite/special_functions/13_ellint_3/check_value.cc
index 8a7202fdb2c..7a948e0f56c 100644
--- a/libstdc++-v3/testsuite/special_functions/13_ellint_3/check_value.cc
+++ b/libstdc++-v3/testsuite/special_functions/13_ellint_3/check_value.cc
@@ -1,7 +1,7 @@
// { dg-do run { target c++11 } }
// { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
//
-// Copyright (C) 2016-2017 Free Software Foundation, Inc.
+// Copyright (C) 2016-2018 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -37,30 +37,32 @@
#endif
#include <specfun_testcase.h>
-
// Test data for k=-0.90000000000000002, nu=0.0000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 2.9686139313362077e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 5.7842011620951154e-16
+// mean(f - f_Boost): 5.8286708792820721e-17
+// variance(f - f_Boost): 4.1942474344433133e-34
+// stddev(f - f_Boost): 2.0479861900030756e-17
const testcase_ellint_3<double>
data001[10] =
{
{ 0.0000000000000000, -0.90000000000000002, 0.0000000000000000,
0.0000000000000000 },
- { 0.17525427376115024, -0.90000000000000002, 0.0000000000000000,
+ { 0.17525427376115027, -0.90000000000000002, 0.0000000000000000,
0.17453292519943295 },
{ 0.35492464591297446, -0.90000000000000002, 0.0000000000000000,
0.34906585039886590 },
- { 0.54388221416157112, -0.90000000000000002, 0.0000000000000000,
+ { 0.54388221416157123, -0.90000000000000002, 0.0000000000000000,
0.52359877559829882 },
- { 0.74797400423532490, -0.90000000000000002, 0.0000000000000000,
+ { 0.74797400423532512, -0.90000000000000002, 0.0000000000000000,
0.69813170079773179 },
- { 0.97463898451966458, -0.90000000000000002, 0.0000000000000000,
+ { 0.97463898451966446, -0.90000000000000002, 0.0000000000000000,
0.87266462599716477 },
- { 1.2334463254523440, -0.90000000000000002, 0.0000000000000000,
+ { 1.2334463254523438, -0.90000000000000002, 0.0000000000000000,
1.0471975511965976 },
{ 1.5355247765594913, -0.90000000000000002, 0.0000000000000000,
1.2217304763960306 },
- { 1.8882928567775121, -0.90000000000000002, 0.0000000000000000,
+ { 1.8882928567775126, -0.90000000000000002, 0.0000000000000000,
1.3962634015954636 },
{ 2.2805491384227703, -0.90000000000000002, 0.0000000000000000,
1.5707963267948966 },
@@ -68,269 +70,299 @@ data001[10] =
const double toler001 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.10000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.0141810743801079e-16
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.1500594295134815e-16
+// mean(f - f_Boost): 1.0269562977782698e-16
+// variance(f - f_Boost): 1.4388836606733082e-32
+// stddev(f - f_Boost): 1.1995347684303728e-16
const testcase_ellint_3<double>
data002[10] =
{
{ 0.0000000000000000, -0.90000000000000002, 0.10000000000000001,
0.0000000000000000 },
- { 0.17507714233254656, -0.90000000000000002, 0.10000000000000001,
+ { 0.17543204932716244, -0.90000000000000002, 0.10000000000000001,
0.17453292519943295 },
- { 0.35350932904326521, -0.90000000000000002, 0.10000000000000001,
+ { 0.35636022898551184, -0.90000000000000002, 0.10000000000000001,
0.34906585039886590 },
- { 0.53911129989870976, -0.90000000000000002, 0.10000000000000001,
+ { 0.54880278898382584, -0.90000000000000002, 0.10000000000000001,
0.52359877559829882 },
- { 0.73666644254508395, -0.90000000000000002, 0.10000000000000001,
+ { 0.75988834774529268, -0.90000000000000002, 0.10000000000000001,
0.69813170079773179 },
- { 0.95250736612100195, -0.90000000000000002, 0.10000000000000001,
+ { 0.99853303003568117, -0.90000000000000002, 0.10000000000000001,
0.87266462599716477 },
- { 1.1950199550905594, -0.90000000000000002, 0.10000000000000001,
+ { 1.2759958823999022, -0.90000000000000002, 0.10000000000000001,
1.0471975511965976 },
- { 1.4741687286340850, -0.90000000000000002, 0.10000000000000001,
+ { 1.6051187364639401, -0.90000000000000002, 0.10000000000000001,
1.2217304763960306 },
- { 1.7968678183506057, -0.90000000000000002, 0.10000000000000001,
+ { 1.9941406879519472, -0.90000000000000002, 0.10000000000000001,
1.3962634015954636 },
- { 2.1537868513875287, -0.90000000000000002, 0.10000000000000001,
+ { 2.4295011187834881, -0.90000000000000002, 0.10000000000000001,
1.5707963267948966 },
};
const double toler002 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.20000000000000001.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.0588292817405780e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 5.2711357908578066e-16
+// mean(f - f_Boost): 8.0491169285323847e-17
+// variance(f - f_Boost): 7.9985534974304465e-34
+// stddev(f - f_Boost): 2.8281714052423424e-17
const testcase_ellint_3<double>
data003[10] =
{
{ 0.0000000000000000, -0.90000000000000002, 0.20000000000000001,
0.0000000000000000 },
- { 0.17490065089140927, -0.90000000000000002, 0.20000000000000001,
+ { 0.17561047321968409, -0.90000000000000002, 0.20000000000000001,
0.17453292519943295 },
- { 0.35211377590661436, -0.90000000000000002, 0.20000000000000001,
+ { 0.35781659944356109, -0.90000000000000002, 0.20000000000000001,
0.34906585039886590 },
- { 0.53448220334204100, -0.90000000000000002, 0.20000000000000001,
+ { 0.55388150905215283, -0.90000000000000002, 0.20000000000000001,
0.52359877559829882 },
- { 0.72591368943179579, -0.90000000000000002, 0.20000000000000001,
+ { 0.77246874123251441, -0.90000000000000002, 0.20000000000000001,
0.69813170079773179 },
- { 0.93192539780038763, -0.90000000000000002, 0.20000000000000001,
+ { 1.0244466254771925, -0.90000000000000002, 0.20000000000000001,
0.87266462599716477 },
- { 1.1600809679692683, -0.90000000000000002, 0.20000000000000001,
+ { 1.3234824077640801, -0.90000000000000002, 0.20000000000000001,
1.0471975511965976 },
- { 1.4195407225882510, -0.90000000000000002, 0.20000000000000001,
+ { 1.6849848968804237, -0.90000000000000002, 0.20000000000000001,
1.2217304763960306 },
- { 1.7168966476424525, -0.90000000000000002, 0.20000000000000001,
+ { 2.1185749045502273, -0.90000000000000002, 0.20000000000000001,
1.3962634015954636 },
- { 2.0443194576468890, -0.90000000000000002, 0.20000000000000001,
+ { 2.6076835743348412, -0.90000000000000002, 0.20000000000000001,
1.5707963267948966 },
};
const double toler003 = 2.5000000000000020e-13;
-// Test data for k=-0.90000000000000002, nu=0.29999999999999999.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.2403611223075570e-16
+// Test data for k=-0.90000000000000002, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.9955372494296814e-16
+// mean(f - f_Boost): 5.8286708792820721e-17
+// variance(f - f_Boost): 4.1942474344433133e-34
+// stddev(f - f_Boost): 2.0479861900030756e-17
const testcase_ellint_3<double>
data004[10] =
{
- { 0.0000000000000000, -0.90000000000000002, 0.29999999999999999,
+ { 0.0000000000000000, -0.90000000000000002, 0.30000000000000004,
0.0000000000000000 },
- { 0.17472479532647531, -0.90000000000000002, 0.29999999999999999,
+ { 0.17578954966746221, -0.90000000000000002, 0.30000000000000004,
0.17453292519943295 },
- { 0.35073750187374114, -0.90000000000000002, 0.29999999999999999,
+ { 0.35929429810867447, -0.90000000000000002, 0.30000000000000004,
0.34906585039886590 },
- { 0.52998766129466957, -0.90000000000000002, 0.29999999999999999,
+ { 0.55912757154240811, -0.90000000000000002, 0.30000000000000004,
0.52359877559829882 },
- { 0.71566993548699553, -0.90000000000000002, 0.29999999999999999,
+ { 0.78578314722025389, -0.90000000000000002, 0.30000000000000004,
0.69813170079773179 },
- { 0.91271517762560195, -0.90000000000000002, 0.29999999999999999,
+ { 1.0526941001131365, -0.90000000000000002, 0.30000000000000004,
0.87266462599716477 },
- { 1.1281241199843370, -0.90000000000000002, 0.29999999999999999,
+ { 1.3769682234538601, -0.90000000000000002, 0.30000000000000004,
1.0471975511965976 },
- { 1.3704929576917451, -0.90000000000000002, 0.29999999999999999,
+ { 1.7779437432911238, -0.90000000000000002, 0.30000000000000004,
1.2217304763960306 },
- { 1.6461981511487713, -0.90000000000000002, 0.29999999999999999,
+ { 2.2676509341813631, -0.90000000000000002, 0.30000000000000004,
1.3962634015954636 },
- { 1.9486280260314426, -0.90000000000000002, 0.29999999999999999,
+ { 2.8256506968858512, -0.90000000000000002, 0.30000000000000004,
1.5707963267948966 },
};
const double toler004 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.40000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3487482375512111e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.7042235432234642e-16
+// mean(f - f_Boost): 2.0261570199409106e-16
+// variance(f - f_Boost): 5.8024227149195491e-32
+// stddev(f - f_Boost): 2.4088218520512364e-16
const testcase_ellint_3<double>
data005[10] =
{
{ 0.0000000000000000, -0.90000000000000002, 0.40000000000000002,
0.0000000000000000 },
- { 0.17454957156468837, -0.90000000000000002, 0.40000000000000002,
+ { 0.17596928293938452, -0.90000000000000002, 0.40000000000000002,
0.17453292519943295 },
- { 0.34938003933330430, -0.90000000000000002, 0.40000000000000002,
+ { 0.36079388642472821, -0.90000000000000002, 0.40000000000000002,
0.34906585039886590 },
- { 0.52562093533067433, -0.90000000000000002, 0.40000000000000002,
+ { 0.56455096667115612, -0.90000000000000002, 0.40000000000000002,
0.52359877559829882 },
- { 0.70589461324915670, -0.90000000000000002, 0.40000000000000002,
+ { 0.79990996997869435, -0.90000000000000002, 0.40000000000000002,
0.69813170079773179 },
- { 0.89472658511942849, -0.90000000000000002, 0.40000000000000002,
+ { 1.0836647913872215, -0.90000000000000002, 0.40000000000000002,
0.87266462599716477 },
- { 1.0987419542323440, -0.90000000000000002, 0.40000000000000002,
+ { 1.4378726836091849, -0.90000000000000002, 0.40000000000000002,
1.0471975511965976 },
- { 1.3261349565496303, -0.90000000000000002, 0.40000000000000002,
+ { 1.8880446720682853, -0.90000000000000002, 0.40000000000000002,
1.2217304763960306 },
- { 1.5831293909853765, -0.90000000000000002, 0.40000000000000002,
+ { 2.4505848932025227, -0.90000000000000002, 0.40000000000000002,
1.3962634015954636 },
- { 1.8641114227238349, -0.90000000000000002, 0.40000000000000002,
+ { 3.1000689868578615, -0.90000000000000002, 0.40000000000000002,
1.5707963267948966 },
};
const double toler005 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.50000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.4538944656036724e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 3.8944086593755267e-16
+// mean(f - f_Boost): 6.9388939039072284e-17
+// variance(f - f_Boost): 1.7333369499485123e-32
+// stddev(f - f_Boost): 1.3165625507162629e-16
const testcase_ellint_3<double>
data006[10] =
{
{ 0.0000000000000000, -0.90000000000000002, 0.50000000000000000,
0.0000000000000000 },
- { 0.17437497557073334, -0.90000000000000002, 0.50000000000000000,
+ { 0.17614967734498183, -0.90000000000000002, 0.50000000000000000,
0.17453292519943295 },
- { 0.34804093691586013, -0.90000000000000002, 0.50000000000000000,
+ { 0.36231594750319435, -0.90000000000000002, 0.50000000000000000,
0.34906585039886590 },
- { 0.52137576320372891, -0.90000000000000002, 0.50000000000000000,
+ { 0.57016256984349567, -0.90000000000000002, 0.50000000000000000,
0.52359877559829882 },
- { 0.69655163996912262, -0.90000000000000002, 0.50000000000000000,
+ { 0.81494025918293422, -0.90000000000000002, 0.50000000000000000,
0.69813170079773179 },
- { 0.87783188683054236, -0.90000000000000002, 0.50000000000000000,
+ { 1.1178482279283477, -0.90000000000000002, 0.50000000000000000,
0.87266462599716477 },
- { 1.0716015959755185, -0.90000000000000002, 0.50000000000000000,
+ { 1.5081455873012106, -0.90000000000000002, 0.50000000000000000,
1.0471975511965976 },
- { 1.2857636916026749, -0.90000000000000002, 0.50000000000000000,
+ { 2.0213599730863998, -0.90000000000000002, 0.50000000000000000,
1.2217304763960306 },
- { 1.5264263913252363, -0.90000000000000002, 0.50000000000000000,
+ { 2.6822467012926827, -0.90000000000000002, 0.50000000000000000,
1.3962634015954636 },
- { 1.7888013241937861, -0.90000000000000002, 0.50000000000000000,
+ { 3.4591069002104677, -0.90000000000000002, 0.50000000000000000,
1.5707963267948966 },
};
const double toler006 = 2.5000000000000020e-13;
-// Test data for k=-0.90000000000000002, nu=0.59999999999999998.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.5560830683344639e-16
+// Test data for k=-0.90000000000000002, nu=0.60000000000000009.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.0602096790645418e-16
+// mean(f - f_Boost): 1.0269562977782698e-16
+// variance(f - f_Boost): 1.4388836606733082e-32
+// stddev(f - f_Boost): 1.1995347684303728e-16
const testcase_ellint_3<double>
data007[10] =
{
- { 0.0000000000000000, -0.90000000000000002, 0.59999999999999998,
+ { 0.0000000000000000, -0.90000000000000002, 0.60000000000000009,
0.0000000000000000 },
- { 0.17420100334657812, -0.90000000000000002, 0.59999999999999998,
+ { 0.17633073723493825, -0.90000000000000002, 0.60000000000000009,
0.17453292519943295 },
- { 0.34671975876122157, -0.90000000000000002, 0.59999999999999998,
+ { 0.36386108723492810, -0.90000000000000002, 0.60000000000000009,
0.34906585039886590 },
- { 0.51724631570707946, -0.90000000000000002, 0.59999999999999998,
+ { 0.57597424744716241, -0.90000000000000002, 0.60000000000000009,
0.52359877559829882 },
- { 0.68760879113743023, -0.90000000000000002, 0.59999999999999998,
+ { 0.83098051948501150, -0.90000000000000002, 0.60000000000000009,
0.69813170079773179 },
- { 0.86192157779698364, -0.90000000000000002, 0.59999999999999998,
+ { 1.1558706545698916, -0.90000000000000002, 0.60000000000000009,
0.87266462599716477 },
- { 1.0464279696166354, -0.90000000000000002, 0.59999999999999998,
+ { 1.5905576379415669, -0.90000000000000002, 0.60000000000000009,
1.0471975511965976 },
- { 1.2488156247094007, -0.90000000000000002, 0.59999999999999998,
+ { 2.1875186010215080, -0.90000000000000002, 0.60000000000000009,
1.2217304763960306 },
- { 1.4750988777188472, -0.90000000000000002, 0.59999999999999998,
+ { 2.9885767771316849, -0.90000000000000002, 0.60000000000000009,
1.3962634015954636 },
- { 1.7211781128919523, -0.90000000000000002, 0.59999999999999998,
+ { 3.9549939883570224, -0.90000000000000002, 0.60000000000000009,
1.5707963267948966 },
};
const double toler007 = 2.5000000000000020e-13;
-// Test data for k=-0.90000000000000002, nu=0.69999999999999996.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.4833366769839281e-16
+// Test data for k=-0.90000000000000002, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.1938610791060186e-16
+// mean(f - f_Boost): 3.0253577421035517e-16
+// variance(f - f_Boost): 4.2342877557562532e-32
+// stddev(f - f_Boost): 2.0577385051935665e-16
const testcase_ellint_3<double>
data008[10] =
{
- { 0.0000000000000000, -0.90000000000000002, 0.69999999999999996,
+ { 0.0000000000000000, -0.90000000000000002, 0.70000000000000007,
0.0000000000000000 },
- { 0.17402765093102207, -0.90000000000000002, 0.69999999999999996,
+ { 0.17651246700160939, -0.90000000000000002, 0.70000000000000007,
0.17453292519943295 },
- { 0.34541608382635131, -0.90000000000000002, 0.69999999999999996,
+ { 0.36542993547358982, -0.90000000000000002, 0.70000000000000007,
0.34906585039886590 },
- { 0.51322715827061682, -0.90000000000000002, 0.69999999999999996,
+ { 0.58199897877674867, -0.90000000000000002, 0.70000000000000007,
0.52359877559829882 },
- { 0.67903717872440272, -0.90000000000000002, 0.69999999999999996,
+ { 0.84815633587352857, -0.90000000000000002, 0.70000000000000007,
0.69813170079773179 },
- { 0.84690113601682671, -0.90000000000000002, 0.69999999999999996,
+ { 1.1985495623872375, -0.90000000000000002, 0.70000000000000007,
0.87266462599716477 },
- { 1.0229914311548418, -0.90000000000000002, 0.69999999999999996,
+ { 1.6892158134027688, -0.90000000000000002, 0.70000000000000007,
1.0471975511965976 },
- { 1.2148329639709381, -0.90000000000000002, 0.69999999999999996,
+ { 2.4029722191094236, -0.90000000000000002, 0.70000000000000007,
1.2217304763960306 },
- { 1.4283586501307803, -0.90000000000000002, 0.69999999999999996,
+ { 3.4201084941340052, -0.90000000000000002, 0.70000000000000007,
1.3962634015954636 },
- { 1.6600480747670940, -0.90000000000000002, 0.69999999999999996,
+ { 4.6985482312992435, -0.90000000000000002, 0.70000000000000007,
1.5707963267948966 },
};
const double toler008 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.7525301941362493e-16
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 6.5091520146032660e-16
+// mean(f - f_Boost): 2.8310687127941490e-16
+// variance(f - f_Boost): 9.8950000698295322e-33
+// stddev(f - f_Boost): 9.9473614943006532e-17
const testcase_ellint_3<double>
data009[10] =
{
{ 0.0000000000000000, -0.90000000000000002, 0.80000000000000004,
0.0000000000000000 },
- { 0.17385491439925146, -0.90000000000000002, 0.80000000000000004,
+ { 0.17669487107954862, -0.90000000000000002, 0.80000000000000004,
0.17453292519943295 },
- { 0.34412950523113928, -0.90000000000000002, 0.80000000000000004,
+ { 0.36702314729628421, -0.90000000000000002, 0.80000000000000004,
0.34906585039886590 },
- { 0.50931321668729590, -0.90000000000000002, 0.80000000000000004,
+ { 0.58825099711365492, -0.90000000000000002, 0.80000000000000004,
0.52359877559829882 },
- { 0.67081081392296327, -0.90000000000000002, 0.80000000000000004,
+ { 0.86661711422209031, -0.90000000000000002, 0.80000000000000004,
0.69813170079773179 },
- { 0.83268846097293259, -0.90000000000000002, 0.80000000000000004,
+ { 1.2469779109884802, -0.90000000000000002, 0.80000000000000004,
0.87266462599716477 },
- { 1.0010985015814027, -0.90000000000000002, 0.80000000000000004,
+ { 1.8105469760531578, -0.90000000000000002, 0.80000000000000004,
1.0471975511965976 },
- { 1.1834394045489680, -0.90000000000000002, 0.80000000000000004,
+ { 2.6989505165893752, -0.90000000000000002, 0.80000000000000004,
1.2217304763960306 },
- { 1.3855695891683186, -0.90000000000000002, 0.80000000000000004,
+ { 4.0935213267757424, -0.90000000000000002, 0.80000000000000004,
1.3962634015954636 },
- { 1.6044591960982202, -0.90000000000000002, 0.80000000000000004,
+ { 5.9820740813645710, -0.90000000000000002, 0.80000000000000004,
1.5707963267948966 },
};
const double toler009 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.90000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8471853989694167e-16
+// max(|f - f_Boost|): 4.4408920985006262e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 8.2628580104449673e-16
+// mean(f - f_Boost): 8.5764728652293339e-16
+// variance(f - f_Boost): 8.9671393318321280e-31
+// stddev(f - f_Boost): 9.4694980499666013e-16
const testcase_ellint_3<double>
data010[10] =
{
{ 0.0000000000000000, -0.90000000000000002, 0.90000000000000002,
0.0000000000000000 },
- { 0.17368278986240135, -0.90000000000000002, 0.90000000000000002,
+ { 0.17687795394604169, -0.90000000000000002, 0.90000000000000002,
0.17453292519943295 },
- { 0.34285962963961397, -0.90000000000000002, 0.90000000000000002,
+ { 0.36864140434751286, -0.90000000000000002, 0.90000000000000002,
0.34906585039886590 },
- { 0.50549974644993312, -0.90000000000000002, 0.90000000000000002,
+ { 0.59474595366817051, -0.90000000000000002, 0.90000000000000002,
0.52359877559829882 },
- { 0.66290623857720876, -0.90000000000000002, 0.90000000000000002,
+ { 0.88654237226056665, -0.90000000000000002, 0.90000000000000002,
0.69813170079773179 },
- { 0.81921183128847175, -0.90000000000000002, 0.90000000000000002,
+ { 1.3026595810616726, -0.90000000000000002, 0.90000000000000002,
0.87266462599716477 },
- { 0.98058481956066390, -0.90000000000000002, 0.90000000000000002,
+ { 1.9653635459278078, -0.90000000000000002, 0.90000000000000002,
1.0471975511965976 },
- { 1.1543223520473569, -0.90000000000000002, 0.90000000000000002,
+ { 3.1451407527189463, -0.90000000000000002, 0.90000000000000002,
1.2217304763960306 },
- { 1.3462119782292938, -0.90000000000000002, 0.90000000000000002,
+ { 5.3745230680316114, -0.90000000000000002, 0.90000000000000002,
1.3962634015954636 },
- { 1.5536420236310946, -0.90000000000000002, 0.90000000000000002,
+ { 8.9942562031858682, -0.90000000000000002, 0.90000000000000002,
1.5707963267948966 },
};
const double toler010 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.0000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1175183168766718e-16
+// max(|f - f_Boost|): 1.5543122344752192e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.7898565163847540e-16
+// mean(f - f_Boost): 2.3869795029440865e-16
+// variance(f - f_Boost): 2.1368406725192426e-31
+// stddev(f - f_Boost): 4.6225974002926564e-16
const testcase_ellint_3<double>
data011[10] =
{
@@ -338,289 +370,319 @@ data011[10] =
0.0000000000000000 },
{ 0.17510154241338899, -0.80000000000000004, 0.0000000000000000,
0.17453292519943295 },
- { 0.35365068839779390, -0.80000000000000004, 0.0000000000000000,
+ { 0.35365068839779396, -0.80000000000000004, 0.0000000000000000,
0.34906585039886590 },
{ 0.53926804409084550, -0.80000000000000004, 0.0000000000000000,
0.52359877559829882 },
- { 0.73587926028070361, -0.80000000000000004, 0.0000000000000000,
+ { 0.73587926028070372, -0.80000000000000004, 0.0000000000000000,
0.69813170079773179 },
{ 0.94770942970071170, -0.80000000000000004, 0.0000000000000000,
0.87266462599716477 },
{ 1.1789022995388236, -0.80000000000000004, 0.0000000000000000,
1.0471975511965976 },
- { 1.4323027881876009, -0.80000000000000004, 0.0000000000000000,
+ { 1.4323027881876012, -0.80000000000000004, 0.0000000000000000,
1.2217304763960306 },
- { 1.7069629739121674, -0.80000000000000004, 0.0000000000000000,
+ { 1.7069629739121677, -0.80000000000000004, 0.0000000000000000,
1.3962634015954636 },
- { 1.9953027776647296, -0.80000000000000004, 0.0000000000000000,
+ { 1.9953027776647294, -0.80000000000000004, 0.0000000000000000,
1.5707963267948966 },
};
const double toler011 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.10000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1537164503193145e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.3898786942190374e-16
+// mean(f - f_Boost): 2.3869795029440865e-16
+// variance(f - f_Boost): 2.9190059990693968e-31
+// stddev(f - f_Boost): 5.4027826155319237e-16
const testcase_ellint_3<double>
data012[10] =
{
{ 0.0000000000000000, -0.80000000000000004, 0.10000000000000001,
0.0000000000000000 },
- { 0.17492468824017163, -0.80000000000000004, 0.10000000000000001,
+ { 0.17527903952342144, -0.80000000000000004, 0.10000000000000001,
0.17453292519943295 },
- { 0.35224443521476911, -0.80000000000000004, 0.10000000000000001,
+ { 0.35507705313548549, -0.80000000000000004, 0.10000000000000001,
0.34906585039886590 },
- { 0.53456851853226950, -0.80000000000000004, 0.10000000000000001,
+ { 0.54411455987643553, -0.80000000000000004, 0.10000000000000001,
0.52359877559829882 },
- { 0.72488875602364922, -0.80000000000000004, 0.10000000000000001,
+ { 0.74745625666804383, -0.80000000000000004, 0.10000000000000001,
0.69813170079773179 },
- { 0.92661354274638952, -0.80000000000000004, 0.10000000000000001,
+ { 0.97046953684238557, -0.80000000000000004, 0.10000000000000001,
0.87266462599716477 },
- { 1.1432651144499075, -0.80000000000000004, 0.10000000000000001,
+ { 1.2183080025184605, -0.80000000000000004, 0.10000000000000001,
1.0471975511965976 },
- { 1.3774479927211429, -0.80000000000000004, 0.10000000000000001,
+ { 1.4943711151994405, -0.80000000000000004, 0.10000000000000001,
1.2217304763960306 },
- { 1.6287092337196041, -0.80000000000000004, 0.10000000000000001,
+ { 1.7972401309544201, -0.80000000000000004, 0.10000000000000001,
1.3962634015954636 },
- { 1.8910755418379521, -0.80000000000000004, 0.10000000000000001,
+ { 2.1172616484005085, -0.80000000000000004, 0.10000000000000001,
1.5707963267948966 },
};
const double toler012 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.20000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1894552974436829e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.8513740186068518e-16
+// mean(f - f_Boost): 2.8310687127941490e-16
+// variance(f - f_Boost): 2.7528339102381189e-31
+// stddev(f - f_Boost): 5.2467455724840699e-16
const testcase_ellint_3<double>
data013[10] =
{
{ 0.0000000000000000, -0.80000000000000004, 0.20000000000000001,
0.0000000000000000 },
- { 0.17474847286224940, -0.80000000000000004, 0.20000000000000001,
+ { 0.17545718375086419, -0.80000000000000004, 0.20000000000000001,
0.17453292519943295 },
- { 0.35085779529084682, -0.80000000000000004, 0.20000000000000001,
+ { 0.35652404627248163, -0.80000000000000004, 0.20000000000000001,
0.34906585039886590 },
- { 0.53000829263059146, -0.80000000000000004, 0.20000000000000001,
+ { 0.54911638512920913, -0.80000000000000004, 0.20000000000000001,
0.52359877559829882 },
- { 0.71443466027453384, -0.80000000000000004, 0.20000000000000001,
+ { 0.75967684282131176, -0.80000000000000004, 0.20000000000000001,
0.69813170079773179 },
- { 0.90698196872715420, -0.80000000000000004, 0.20000000000000001,
+ { 0.99513526893543769, -0.80000000000000004, 0.20000000000000001,
0.87266462599716477 },
- { 1.1108198200558579, -0.80000000000000004, 0.20000000000000001,
+ { 1.2622192109995993, -0.80000000000000004, 0.20000000000000001,
1.0471975511965976 },
- { 1.3284988909963957, -0.80000000000000004, 0.20000000000000001,
+ { 1.5654106676347741, -0.80000000000000004, 0.20000000000000001,
1.2217304763960306 },
- { 1.5600369318140328, -0.80000000000000004, 0.20000000000000001,
+ { 1.9029531718534984, -0.80000000000000004, 0.20000000000000001,
1.3962634015954636 },
- { 1.8007226661734588, -0.80000000000000004, 0.20000000000000001,
+ { 2.2624789434186798, -0.80000000000000004, 0.20000000000000001,
1.5707963267948966 },
};
const double toler013 = 2.5000000000000020e-13;
-// Test data for k=-0.80000000000000004, nu=0.29999999999999999.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2247517409029886e-16
+// Test data for k=-0.80000000000000004, nu=0.30000000000000004.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.2825261583337354e-16
+// mean(f - f_Boost): 2.6367796834847468e-16
+// variance(f - f_Boost): 2.8249350208968825e-31
+// stddev(f - f_Boost): 5.3150117788175054e-16
const testcase_ellint_3<double>
data014[10] =
{
- { 0.0000000000000000, -0.80000000000000004, 0.29999999999999999,
+ { 0.0000000000000000, -0.80000000000000004, 0.30000000000000004,
0.0000000000000000 },
- { 0.17457289217669889, -0.80000000000000004, 0.29999999999999999,
+ { 0.17563597931587369, -0.80000000000000004, 0.30000000000000004,
0.17453292519943295 },
- { 0.34949028801501258, -0.80000000000000004, 0.29999999999999999,
+ { 0.35799220412005128, -0.80000000000000004, 0.30000000000000004,
0.34906585039886590 },
- { 0.52558024362769307, -0.80000000000000004, 0.29999999999999999,
+ { 0.55428253691111318, -0.80000000000000004, 0.30000000000000004,
0.52359877559829882 },
- { 0.70447281740094891, -0.80000000000000004, 0.29999999999999999,
+ { 0.77260647376977365, -0.80000000000000004, 0.30000000000000004,
0.69813170079773179 },
- { 0.88864745641528986, -0.80000000000000004, 0.29999999999999999,
+ { 1.0220015271210958, -0.80000000000000004, 0.30000000000000004,
0.87266462599716477 },
- { 1.0811075819341462, -0.80000000000000004, 0.29999999999999999,
+ { 1.3115965312302671, -0.80000000000000004, 0.30000000000000004,
1.0471975511965976 },
- { 1.2844589654082377, -0.80000000000000004, 0.29999999999999999,
+ { 1.6478518468813512, -0.80000000000000004, 0.30000000000000004,
1.2217304763960306 },
- { 1.4991461361277847, -0.80000000000000004, 0.29999999999999999,
+ { 2.0290458414203481, -0.80000000000000004, 0.30000000000000004,
1.3962634015954636 },
- { 1.7214611048717301, -0.80000000000000004, 0.29999999999999999,
+ { 2.4392042002725693, -0.80000000000000004, 0.30000000000000004,
1.5707963267948966 },
};
const double toler014 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.40000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2596216594752862e-16
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.3462748389836647e-16
+// mean(f - f_Boost): 3.3861802251067273e-16
+// variance(f - f_Boost): 4.3719465706454422e-31
+// stddev(f - f_Boost): 6.6120696991527871e-16
const testcase_ellint_3<double>
data015[10] =
{
{ 0.0000000000000000, -0.80000000000000004, 0.40000000000000002,
0.0000000000000000 },
- { 0.17439794211872175, -0.80000000000000004, 0.40000000000000002,
+ { 0.17581543047866136, -0.80000000000000004, 0.40000000000000002,
0.17453292519943295 },
- { 0.34814144964568972, -0.80000000000000004, 0.40000000000000002,
+ { 0.35948208343061633, -0.80000000000000004, 0.40000000000000002,
0.34906585039886590 },
- { 0.52127776285273064, -0.80000000000000004, 0.40000000000000002,
+ { 0.55962280893702021, -0.80000000000000004, 0.40000000000000002,
0.52359877559829882 },
- { 0.69496411438966588, -0.80000000000000004, 0.40000000000000002,
+ { 0.78632063889234116, -0.80000000000000004, 0.40000000000000002,
0.69813170079773179 },
- { 0.87146878427509589, -0.80000000000000004, 0.40000000000000002,
+ { 1.0514333069550323, -0.80000000000000004, 0.40000000000000002,
0.87266462599716477 },
- { 1.0537579024937762, -0.80000000000000004, 0.40000000000000002,
+ { 1.3677213138838757, -0.80000000000000004, 0.40000000000000002,
1.0471975511965976 },
- { 1.2445534387922637, -0.80000000000000004, 0.40000000000000002,
+ { 1.7451736773665165, -0.80000000000000004, 0.40000000000000002,
1.2217304763960306 },
- { 1.4446769766361993, -0.80000000000000004, 0.40000000000000002,
+ { 2.1830100424586831, -0.80000000000000004, 0.40000000000000002,
1.3962634015954636 },
- { 1.6512267838651289, -0.80000000000000004, 0.40000000000000002,
+ { 2.6604037035529724, -0.80000000000000004, 0.40000000000000002,
1.5707963267948966 },
};
const double toler015 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.50000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2940800093915668e-16
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.0388243828581744e-16
+// mean(f - f_Boost): 3.8580250105724191e-16
+// variance(f - f_Boost): 6.4106456575047741e-31
+// stddev(f - f_Boost): 8.0066507713929764e-16
const testcase_ellint_3<double>
data016[10] =
{
{ 0.0000000000000000, -0.80000000000000004, 0.50000000000000000,
0.0000000000000000 },
- { 0.17422361866118044, -0.80000000000000004, 0.50000000000000000,
+ { 0.17599554153999472, -0.80000000000000004, 0.50000000000000000,
0.17453292519943295 },
- { 0.34681083254170475, -0.80000000000000004, 0.50000000000000000,
+ { 0.36099426243351540, -0.80000000000000004, 0.50000000000000000,
0.34906585039886590 },
- { 0.51709470815494440, -0.80000000000000004, 0.50000000000000000,
+ { 0.56514786174780673, -0.80000000000000004, 0.50000000000000000,
0.52359877559829882 },
- { 0.68587375344080237, -0.80000000000000004, 0.50000000000000000,
+ { 0.80090697622371010, -0.80000000000000004, 0.50000000000000000,
0.69813170079773179 },
- { 0.85532571852810624, -0.80000000000000004, 0.50000000000000000,
+ { 1.0838891627679339, -0.80000000000000004, 0.50000000000000000,
0.87266462599716477 },
- { 1.0284677391874903, -0.80000000000000004, 0.50000000000000000,
+ { 1.4323506654466280, -0.80000000000000004, 0.50000000000000000,
1.0471975511965976 },
- { 1.2081693942686225, -0.80000000000000004, 0.50000000000000000,
+ { 1.8625761085390575, -0.80000000000000004, 0.50000000000000000,
1.2217304763960306 },
- { 1.3955803006426311, -0.80000000000000004, 0.50000000000000000,
+ { 2.3768757305654766, -0.80000000000000004, 0.50000000000000000,
1.3962634015954636 },
- { 1.5884528947755532, -0.80000000000000004, 0.50000000000000000,
+ { 2.9478781158239746, -0.80000000000000004, 0.50000000000000000,
1.5707963267948966 },
};
const double toler016 = 2.5000000000000020e-13;
-// Test data for k=-0.80000000000000004, nu=0.59999999999999998.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3281408974056389e-16
+// Test data for k=-0.80000000000000004, nu=0.60000000000000009.
+// max(|f - f_Boost|): 3.5527136788005009e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.0631099169042069e-15
+// mean(f - f_Boost): 4.8294701571194306e-16
+// variance(f - f_Boost): 1.1633910328160319e-30
+// stddev(f - f_Boost): 1.0786060600682865e-15
const testcase_ellint_3<double>
data017[10] =
{
- { 0.0000000000000000, -0.80000000000000004, 0.59999999999999998,
+ { 0.0000000000000000, -0.80000000000000004, 0.60000000000000009,
0.0000000000000000 },
- { 0.17404991781414089, -0.80000000000000004, 0.59999999999999998,
+ { 0.17617631684170665, -0.80000000000000004, 0.60000000000000009,
0.17453292519943295 },
- { 0.34549800443625167, -0.80000000000000004, 0.59999999999999998,
+ { 0.36252934193666231, -0.80000000000000004, 0.60000000000000009,
0.34906585039886590 },
- { 0.51302536167001545, -0.80000000000000004, 0.59999999999999998,
+ { 0.57086932622945163, -0.80000000000000004, 0.60000000000000009,
0.52359877559829882 },
- { 0.67717065003912236, -0.80000000000000004, 0.59999999999999998,
+ { 0.81646796740150973, -0.80000000000000004, 0.60000000000000009,
0.69813170079773179 },
- { 0.84011512421134416, -0.80000000000000004, 0.59999999999999998,
+ { 1.1199552158519064, -0.80000000000000004, 0.60000000000000009,
0.87266462599716477 },
- { 1.0049863847088740, -0.80000000000000004, 0.59999999999999998,
+ { 1.5079766673336394, -0.80000000000000004, 0.60000000000000009,
1.0471975511965976 },
- { 1.1748145941898920, -0.80000000000000004, 0.59999999999999998,
+ { 2.0082747447038165, -0.80000000000000004, 0.60000000000000009,
1.2217304763960306 },
- { 1.3510319699755071, -0.80000000000000004, 0.59999999999999998,
+ { 2.6315146066775523, -0.80000000000000004, 0.60000000000000009,
1.3962634015954636 },
- { 1.5319262547427865, -0.80000000000000004, 0.59999999999999998,
+ { 3.3418121892288051, -0.80000000000000004, 0.60000000000000009,
1.5707963267948966 },
};
const double toler017 = 2.5000000000000020e-13;
-// Test data for k=-0.80000000000000004, nu=0.69999999999999996.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3618176466061808e-16
+// Test data for k=-0.80000000000000004, nu=0.70000000000000007.
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.6544679145741375e-16
+// mean(f - f_Boost): 3.2751579226442120e-16
+// variance(f - f_Boost): 4.4236851331020672e-31
+// stddev(f - f_Boost): 6.6510789599147505e-16
const testcase_ellint_3<double>
data018[10] =
{
- { 0.0000000000000000, -0.80000000000000004, 0.69999999999999996,
+ { 0.0000000000000000, -0.80000000000000004, 0.70000000000000007,
0.0000000000000000 },
- { 0.17387683562442199, -0.80000000000000004, 0.69999999999999996,
+ { 0.17635776076721221, -0.80000000000000004, 0.70000000000000007,
0.17453292519943295 },
- { 0.34420254775101611, -0.80000000000000004, 0.69999999999999996,
+ { 0.36408794649916976, -0.80000000000000004, 0.70000000000000007,
0.34906585039886590 },
- { 0.50906439222143673, -0.80000000000000004, 0.69999999999999996,
+ { 0.57679992290624138, -0.80000000000000004, 0.70000000000000007,
0.52359877559829882 },
- { 0.66882693152688422, -0.80000000000000004, 0.69999999999999996,
+ { 0.83312441418142813, -0.80000000000000004, 0.70000000000000007,
0.69813170079773179 },
- { 0.82574792844091316, -0.80000000000000004, 0.69999999999999996,
+ { 1.1603958891464856, -0.80000000000000004, 0.70000000000000007,
0.87266462599716477 },
- { 0.98310431309490931, -0.80000000000000004, 0.69999999999999996,
+ { 1.5982855143796213, -0.80000000000000004, 0.70000000000000007,
1.0471975511965976 },
- { 1.1440884535113258, -0.80000000000000004, 0.69999999999999996,
+ { 2.1962484408371821, -0.80000000000000004, 0.70000000000000007,
1.2217304763960306 },
- { 1.3103743938952537, -0.80000000000000004, 0.69999999999999996,
+ { 2.9873281786111869, -0.80000000000000004, 0.70000000000000007,
1.3962634015954636 },
- { 1.4806912324625332, -0.80000000000000004, 0.69999999999999996,
+ { 3.9268876980046397, -0.80000000000000004, 0.70000000000000007,
1.5707963267948966 },
};
const double toler018 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3951228558314112e-16
+// max(|f - f_Boost|): 4.4408920985006262e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.0176949165011079e-16
+// mean(f - f_Boost): 7.0499162063697436e-16
+// variance(f - f_Boost): 1.7230805408026989e-30
+// stddev(f - f_Boost): 1.3126616246400665e-15
const testcase_ellint_3<double>
data019[10] =
{
{ 0.0000000000000000, -0.80000000000000004, 0.80000000000000004,
0.0000000000000000 },
- { 0.17370436817515203, -0.80000000000000004, 0.80000000000000004,
+ { 0.17653987774203392, -0.80000000000000004, 0.80000000000000004,
0.17453292519943295 },
- { 0.34292405894783395, -0.80000000000000004, 0.80000000000000004,
+ { 0.36567072568046877, -0.80000000000000004, 0.80000000000000004,
0.34906585039886590 },
- { 0.50520682176250076, -0.80000000000000004, 0.80000000000000004,
+ { 0.58295359996558616, -0.80000000000000004, 0.80000000000000004,
0.52359877559829882 },
- { 0.66081751679736178, -0.80000000000000004, 0.80000000000000004,
+ { 0.85101998309176108, -0.80000000000000004, 0.80000000000000004,
0.69813170079773179 },
- { 0.81214672249355102, -0.80000000000000004, 0.80000000000000004,
+ { 1.2062322059736537, -0.80000000000000004, 0.80000000000000004,
0.87266462599716477 },
- { 0.96264481387685552, -0.80000000000000004, 0.80000000000000004,
+ { 1.7090321420917429, -0.80000000000000004, 0.80000000000000004,
1.0471975511965976 },
- { 1.1156611352656258, -0.80000000000000004, 0.80000000000000004,
+ { 2.4529058049405066, -0.80000000000000004, 0.80000000000000004,
1.2217304763960306 },
- { 1.2730756225143889, -0.80000000000000004, 0.80000000000000004,
+ { 3.5368893360106948, -0.80000000000000004, 0.80000000000000004,
1.3962634015954636 },
- { 1.4339837018309471, -0.80000000000000004, 0.80000000000000004,
+ { 4.9246422058196062, -0.80000000000000004, 0.80000000000000004,
1.5707963267948966 },
};
const double toler019 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.90000000000000002.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 4.4280684534289690e-16
+// max(|f - f_Boost|): 4.4408920985006262e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.7782721357365268e-16
+// mean(f - f_Boost): 8.9928064994637676e-16
+// variance(f - f_Boost): 1.5485199571025344e-30
+// stddev(f - f_Boost): 1.2443954183066307e-15
const testcase_ellint_3<double>
data020[10] =
{
{ 0.0000000000000000, -0.80000000000000004, 0.90000000000000002,
0.0000000000000000 },
- { 0.17353251158533151, -0.80000000000000004, 0.90000000000000002,
+ { 0.17672267223433513, -0.80000000000000004, 0.90000000000000002,
0.17453292519943295 },
- { 0.34166214791545768, -0.80000000000000004, 0.90000000000000002,
+ { 0.36727835537196063, -0.80000000000000004, 0.90000000000000002,
0.34906585039886590 },
- { 0.50144799535130569, -0.80000000000000004, 0.90000000000000002,
+ { 0.58934569363716649, -0.80000000000000004, 0.90000000000000002,
0.52359877559829882 },
- { 0.65311976193814425, -0.80000000000000004, 0.90000000000000002,
+ { 0.87032723471138851, -0.80000000000000004, 0.90000000000000002,
0.69813170079773179 },
- { 0.79924384892320866, -0.80000000000000004, 0.90000000000000002,
+ { 1.2588676111323349, -0.80000000000000004, 0.90000000000000002,
0.87266462599716477 },
- { 0.94345762353365603, -0.80000000000000004, 0.90000000000000002,
+ { 1.8498731900660019, -0.80000000000000004, 0.90000000000000002,
1.0471975511965976 },
- { 1.0892582069219161, -0.80000000000000004, 0.90000000000000002,
+ { 2.8368381299300420, -0.80000000000000004, 0.90000000000000002,
1.2217304763960306 },
- { 1.2387000876610268, -0.80000000000000004, 0.90000000000000002,
+ { 4.5674844191654058, -0.80000000000000004, 0.90000000000000002,
1.3962634015954636 },
- { 1.3911845406776222, -0.80000000000000004, 0.90000000000000002,
+ { 7.2263259298637115, -0.80000000000000004, 0.90000000000000002,
1.5707963267948966 },
};
const double toler020 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.0000000000000000.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 3.5930208052157665e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.5425633303580569e-16
+// mean(f - f_Boost): 7.7715611723760953e-17
+// variance(f - f_Boost): 7.4564398834547797e-34
+// stddev(f - f_Boost): 2.7306482533374340e-17
const testcase_ellint_3<double>
data021[10] =
{
@@ -628,289 +690,319 @@ data021[10] =
0.0000000000000000 },
{ 0.17496737466916723, -0.69999999999999996, 0.0000000000000000,
0.17453292519943295 },
- { 0.35254687535677925, -0.69999999999999996, 0.0000000000000000,
+ { 0.35254687535677931, -0.69999999999999996, 0.0000000000000000,
0.34906585039886590 },
- { 0.53536740275997119, -0.69999999999999996, 0.0000000000000000,
+ { 0.53536740275997130, -0.69999999999999996, 0.0000000000000000,
0.52359877559829882 },
{ 0.72603797651684454, -0.69999999999999996, 0.0000000000000000,
0.69813170079773179 },
- { 0.92698296348313458, -0.69999999999999996, 0.0000000000000000,
+ { 0.92698296348313447, -0.69999999999999996, 0.0000000000000000,
0.87266462599716477 },
{ 1.1400447527693316, -0.69999999999999996, 0.0000000000000000,
1.0471975511965976 },
- { 1.3657668117194073, -0.69999999999999996, 0.0000000000000000,
+ { 1.3657668117194071, -0.69999999999999996, 0.0000000000000000,
1.2217304763960306 },
- { 1.6024686895959159, -0.69999999999999996, 0.0000000000000000,
+ { 1.6024686895959162, -0.69999999999999996, 0.0000000000000000,
1.3962634015954636 },
- { 1.8456939983747236, -0.69999999999999996, 0.0000000000000000,
+ { 1.8456939983747234, -0.69999999999999996, 0.0000000000000000,
1.5707963267948966 },
};
const double toler021 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.10000000000000001.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 3.6735282577377367e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.2736371663370261e-16
+// mean(f - f_Boost): 8.8817841970012528e-17
+// variance(f - f_Boost): 9.7390235212470591e-34
+// stddev(f - f_Boost): 3.1207408609570677e-17
const testcase_ellint_3<double>
data022[10] =
{
{ 0.0000000000000000, -0.69999999999999996, 0.10000000000000001,
0.0000000000000000 },
- { 0.17479076384884684, -0.69999999999999996, 0.10000000000000001,
+ { 0.17514462737300920, -0.69999999999999996, 0.10000000000000001,
0.17453292519943295 },
- { 0.35114844900396364, -0.69999999999999996, 0.10000000000000001,
+ { 0.35396527997470451, -0.69999999999999996, 0.10000000000000001,
0.34906585039886590 },
- { 0.53072776947527001, -0.69999999999999996, 0.10000000000000001,
+ { 0.54015179589433981, -0.69999999999999996, 0.10000000000000001,
0.52359877559829882 },
- { 0.71530198262386235, -0.69999999999999996, 0.10000000000000001,
+ { 0.73734430854477728, -0.69999999999999996, 0.10000000000000001,
0.69813170079773179 },
- { 0.90666760677828306, -0.69999999999999996, 0.10000000000000001,
+ { 0.94888950796697047, -0.69999999999999996, 0.10000000000000001,
0.87266462599716477 },
- { 1.1063366517438080, -0.69999999999999996, 0.10000000000000001,
+ { 1.1772807959736322, -0.69999999999999996, 0.10000000000000001,
1.0471975511965976 },
- { 1.3149477243092149, -0.69999999999999996, 0.10000000000000001,
+ { 1.4231796401075831, -0.69999999999999996, 0.10000000000000001,
1.2217304763960306 },
- { 1.5314886725038925, -0.69999999999999996, 0.10000000000000001,
+ { 1.6841856799887469, -0.69999999999999996, 0.10000000000000001,
1.3962634015954636 },
- { 1.7528050171757608, -0.69999999999999996, 0.10000000000000001,
+ { 1.9541347343119562, -0.69999999999999996, 0.10000000000000001,
1.5707963267948966 },
};
const double toler022 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.20000000000000001.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 3.7517969287516802e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.9907249355047774e-16
+// mean(f - f_Boost): 3.3306690738754695e-17
+// variance(f - f_Boost): 1.3695501826753678e-34
+// stddev(f - f_Boost): 1.1702778228589003e-17
const testcase_ellint_3<double>
data023[10] =
{
{ 0.0000000000000000, -0.69999999999999996, 0.20000000000000001,
0.0000000000000000 },
- { 0.17461479077791475, -0.69999999999999996, 0.20000000000000001,
+ { 0.17532252613350796, -0.69999999999999996, 0.20000000000000001,
0.17453292519943295 },
- { 0.34976950621407538, -0.69999999999999996, 0.20000000000000001,
+ { 0.35540417596807522, -0.69999999999999996, 0.20000000000000001,
0.34906585039886590 },
- { 0.52622533231350177, -0.69999999999999996, 0.20000000000000001,
+ { 0.54508913033361928, -0.69999999999999996, 0.20000000000000001,
0.52359877559829882 },
- { 0.70508774017895215, -0.69999999999999996, 0.20000000000000001,
+ { 0.74927635777718415, -0.69999999999999996, 0.20000000000000001,
0.69813170079773179 },
- { 0.88775302531730294, -0.69999999999999996, 0.20000000000000001,
+ { 0.97261706337936338, -0.69999999999999996, 0.20000000000000001,
0.87266462599716477 },
- { 1.0756195476149006, -0.69999999999999996, 0.20000000000000001,
+ { 1.2187303976209327, -0.69999999999999996, 0.20000000000000001,
1.0471975511965976 },
- { 1.2695349716654374, -0.69999999999999996, 0.20000000000000001,
+ { 1.4887796709222487, -0.69999999999999996, 0.20000000000000001,
1.2217304763960306 },
- { 1.4690814617070540, -0.69999999999999996, 0.20000000000000001,
+ { 1.7796581281839212, -0.69999999999999996, 0.20000000000000001,
1.3962634015954636 },
- { 1.6721098780092145, -0.69999999999999996, 0.20000000000000001,
+ { 2.0829290325820202, -0.69999999999999996, 0.20000000000000001,
1.5707963267948966 },
};
const double toler023 = 2.5000000000000020e-13;
-// Test data for k=-0.69999999999999996, nu=0.29999999999999999.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8280039841080712e-16
+// Test data for k=-0.69999999999999996, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.6912897610535316e-16
+// mean(f - f_Boost): 1.6653345369377347e-17
+// variance(f - f_Boost): 2.6207864467918357e-32
+// stddev(f - f_Boost): 1.6188843216214787e-16
const testcase_ellint_3<double>
data024[10] =
{
- { 0.0000000000000000, -0.69999999999999996, 0.29999999999999999,
+ { 0.0000000000000000, -0.69999999999999996, 0.30000000000000004,
0.0000000000000000 },
- { 0.17443945136076175, -0.69999999999999996, 0.29999999999999999,
+ { 0.17550107516328570, -0.69999999999999996, 0.30000000000000004,
0.17453292519943295 },
- { 0.34840956983535287, -0.69999999999999996, 0.29999999999999999,
+ { 0.35686409576571959, -0.69999999999999996, 0.30000000000000004,
0.34906585039886590 },
- { 0.52185308551329168, -0.69999999999999996, 0.29999999999999999,
+ { 0.55018827316513352, -0.69999999999999996, 0.30000000000000004,
0.52359877559829882 },
- { 0.69535240431168255, -0.69999999999999996, 0.29999999999999999,
+ { 0.76189759494390275, -0.69999999999999996, 0.30000000000000004,
0.69813170079773179 },
- { 0.87007983473964923, -0.69999999999999996, 0.29999999999999999,
+ { 0.99844623430885615, -0.69999999999999996, 0.30000000000000004,
0.87266462599716477 },
- { 1.0474657975577066, -0.69999999999999996, 0.29999999999999999,
+ { 1.2652862989039833, -0.69999999999999996, 0.30000000000000004,
1.0471975511965976 },
- { 1.2286225419931891, -0.69999999999999996, 0.29999999999999999,
+ { 1.5647666808691361, -0.69999999999999996, 0.30000000000000004,
1.2217304763960306 },
- { 1.4136490671013271, -0.69999999999999996, 0.29999999999999999,
+ { 1.8932499694938163, -0.69999999999999996, 0.30000000000000004,
1.3962634015954636 },
- { 1.6011813647733213, -0.69999999999999996, 0.29999999999999999,
+ { 2.2392290510988535, -0.69999999999999996, 0.30000000000000004,
1.5707963267948966 },
};
const double toler024 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.40000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3472957053482092e-16
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 6.5578567644745380e-16
+// mean(f - f_Boost): 1.4710455076283324e-16
+// variance(f - f_Boost): 2.6715739327327140e-33
+// stddev(f - f_Boost): 5.1687270509601433e-17
const testcase_ellint_3<double>
data025[10] =
{
{ 0.0000000000000000, -0.69999999999999996, 0.40000000000000002,
0.0000000000000000 },
- { 0.17426474153983229, -0.69999999999999996, 0.40000000000000002,
+ { 0.17568027871494424, -0.69999999999999996, 0.40000000000000002,
0.17453292519943295 },
- { 0.34706817945773732, -0.69999999999999996, 0.40000000000000002,
+ { 0.35834559208180261, -0.69999999999999996, 0.40000000000000002,
0.34906585039886590 },
- { 0.51760452851738148, -0.69999999999999996, 0.40000000000000002,
+ { 0.55545885451190613, -0.69999999999999996, 0.40000000000000002,
0.52359877559829882 },
- { 0.68605801534722755, -0.69999999999999996, 0.40000000000000002,
+ { 0.77528120402568101, -0.69999999999999996, 0.40000000000000002,
0.69813170079773179 },
- { 0.85351339387296532, -0.69999999999999996, 0.40000000000000002,
+ { 1.0267241287600319, -0.69999999999999996, 0.40000000000000002,
0.87266462599716477 },
- { 1.0215297967969539, -0.69999999999999996, 0.40000000000000002,
+ { 1.3181380338980246, -0.69999999999999996, 0.40000000000000002,
1.0471975511965976 },
- { 1.1915051074460530, -0.69999999999999996, 0.40000000000000002,
+ { 1.6542840785132085, -0.69999999999999996, 0.40000000000000002,
1.2217304763960306 },
- { 1.3639821911744707, -0.69999999999999996, 0.40000000000000002,
+ { 2.0315595131131818, -0.69999999999999996, 0.40000000000000002,
1.3962634015954636 },
- { 1.5382162002954762, -0.69999999999999996, 0.40000000000000002,
+ { 2.4342502915307875, -0.69999999999999996, 0.40000000000000002,
1.5707963267948966 },
};
const double toler025 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.50000000000000000.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 3.9748346743390620e-16
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 6.0416041815443256e-16
+// mean(f - f_Boost): 1.9151347174783951e-16
+// variance(f - f_Boost): 7.8758646268991113e-33
+// stddev(f - f_Boost): 8.8746068233466605e-17
const testcase_ellint_3<double>
data026[10] =
{
{ 0.0000000000000000, -0.69999999999999996, 0.50000000000000000,
0.0000000000000000 },
- { 0.17409065729516096, -0.69999999999999996, 0.50000000000000000,
+ { 0.17586014108156545, -0.69999999999999996, 0.50000000000000000,
0.17453292519943295 },
- { 0.34574489064986091, -0.69999999999999996, 0.50000000000000000,
+ { 0.35984923894341653, -0.69999999999999996, 0.50000000000000000,
0.34906585039886590 },
- { 0.51347361925579782, -0.69999999999999996, 0.50000000000000000,
+ { 0.56091135606739995, -0.69999999999999996, 0.50000000000000000,
0.52359877559829882 },
- { 0.67717079489579279, -0.69999999999999996, 0.50000000000000000,
+ { 0.78951212635197054, -0.69999999999999996, 0.50000000000000000,
0.69813170079773179 },
- { 0.83793902055292280, -0.69999999999999996, 0.50000000000000000,
+ { 1.0578865732938729, -0.69999999999999996, 0.50000000000000000,
0.87266462599716477 },
- { 0.99752863545289705, -0.69999999999999996, 0.50000000000000000,
+ { 1.3789149005151722, -0.69999999999999996, 0.50000000000000000,
1.0471975511965976 },
- { 1.1576240080401501, -0.69999999999999996, 0.50000000000000000,
+ { 1.7620212286086225, -0.69999999999999996, 0.50000000000000000,
1.2217304763960306 },
- { 1.3191464023923762, -0.69999999999999996, 0.50000000000000000,
+ { 2.2051554347435585, -0.69999999999999996, 0.50000000000000000,
1.3962634015954636 },
- { 1.4818433192178544, -0.69999999999999996, 0.50000000000000000,
+ { 2.6868019968236991, -0.69999999999999996, 0.50000000000000000,
1.5707963267948966 },
};
const double toler026 = 2.5000000000000020e-13;
-// Test data for k=-0.69999999999999996, nu=0.59999999999999998.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 4.0457157538295173e-16
+// Test data for k=-0.69999999999999996, nu=0.60000000000000009.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.6515644573247170e-16
+// mean(f - f_Boost): 9.9920072216264091e-17
+// variance(f - f_Boost): 1.2325951644078310e-33
+// stddev(f - f_Boost): 3.5108334685767011e-17
const testcase_ellint_3<double>
data027[10] =
{
- { 0.0000000000000000, -0.69999999999999996, 0.59999999999999998,
+ { 0.0000000000000000, -0.69999999999999996, 0.60000000000000009,
0.0000000000000000 },
- { 0.17391719464391614, -0.69999999999999996, 0.59999999999999998,
+ { 0.17604066659721918, -0.69999999999999996, 0.60000000000000009,
0.17453292519943295 },
- { 0.34443927423869031, -0.69999999999999996, 0.59999999999999998,
+ { 0.36137563278353424, -0.69999999999999996, 0.60000000000000009,
0.34906585039886590 },
- { 0.50945473266486063, -0.69999999999999996, 0.59999999999999998,
+ { 0.56655721272747606, -0.69999999999999996, 0.60000000000000009,
0.52359877559829882 },
- { 0.66866056326513812, -0.69999999999999996, 0.59999999999999998,
+ { 0.80468966552978305, -0.69999999999999996, 0.60000000000000009,
0.69813170079773179 },
- { 0.82325830002337352, -0.69999999999999996, 0.59999999999999998,
+ { 1.0924902943683852, -0.69999999999999996, 0.60000000000000009,
0.87266462599716477 },
- { 0.97522808245669368, -0.69999999999999996, 0.59999999999999998,
+ { 1.4499247992499797, -0.69999999999999996, 0.60000000000000009,
1.0471975511965976 },
- { 1.1265300613705285, -0.69999999999999996, 0.59999999999999998,
+ { 1.8953714382113815, -0.69999999999999996, 0.60000000000000009,
1.2217304763960306 },
- { 1.2784066076152001, -0.69999999999999996, 0.59999999999999998,
+ { 2.4323229949248670, -0.69999999999999996, 0.60000000000000009,
1.3962634015954636 },
- { 1.4309994736080540, -0.69999999999999996, 0.59999999999999998,
+ { 3.0314573496746742, -0.69999999999999996, 0.60000000000000009,
1.5707963267948966 },
};
const double toler027 = 2.5000000000000020e-13;
-// Test data for k=-0.69999999999999996, nu=0.69999999999999996.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 5.4867405596732161e-16
+// Test data for k=-0.69999999999999996, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.8475278552871384e-16
+// mean(f - f_Boost): 9.9920072216264091e-17
+// variance(f - f_Boost): 1.2325951644078310e-33
+// stddev(f - f_Boost): 3.5108334685767011e-17
const testcase_ellint_3<double>
data028[10] =
{
- { 0.0000000000000000, -0.69999999999999996, 0.69999999999999996,
+ { 0.0000000000000000, -0.69999999999999996, 0.70000000000000007,
0.0000000000000000 },
- { 0.17374434963995031, -0.69999999999999996, 0.69999999999999996,
+ { 0.17622185963747933, -0.69999999999999996, 0.70000000000000007,
0.17453292519943295 },
- { 0.34315091562900674, -0.69999999999999996, 0.69999999999999996,
+ { 0.36292539360435261, -0.69999999999999996, 0.70000000000000007,
0.34906585039886590 },
- { 0.50554262375653347, -0.69999999999999996, 0.69999999999999996,
+ { 0.57240892970150015, -0.69999999999999996, 0.70000000000000007,
0.52359877559829882 },
- { 0.66050025406305801, -0.69999999999999996, 0.69999999999999996,
+ { 0.82093084713182629, -0.69999999999999996, 0.70000000000000007,
0.69813170079773179 },
- { 0.80938620118847404, -0.69999999999999996, 0.69999999999999996,
+ { 1.1312609022179871, -0.69999999999999996, 0.70000000000000007,
0.87266462599716477 },
- { 0.95443223855852144, -0.69999999999999996, 0.69999999999999996,
+ { 1.5345768067715795, -0.69999999999999996, 0.70000000000000007,
1.0471975511965976 },
- { 1.0978573207128304, -0.69999999999999996, 0.69999999999999996,
+ { 2.0668847445934420, -0.69999999999999996, 0.70000000000000007,
1.2217304763960306 },
- { 1.2411754575007123, -0.69999999999999996, 0.69999999999999996,
+ { 2.7483444537551240, -0.69999999999999996, 0.70000000000000007,
1.3962634015954636 },
- { 1.3848459188329196, -0.69999999999999996, 0.69999999999999996,
+ { 3.5408408771788560, -0.69999999999999996, 0.70000000000000007,
1.5707963267948966 },
};
const double toler028 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1829502028913879e-16
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 6.8664526853112274e-16
+// mean(f - f_Boost): 1.6930901125533636e-16
+// variance(f - f_Boost): 3.5389557150937801e-33
+// stddev(f - f_Boost): 5.9489122661994095e-17
const testcase_ellint_3<double>
data029[10] =
{
{ 0.0000000000000000, -0.69999999999999996, 0.80000000000000004,
0.0000000000000000 },
- { 0.17357211837335740, -0.69999999999999996, 0.80000000000000004,
+ { 0.17640372461994805, -0.69999999999999996, 0.80000000000000004,
0.17453292519943295 },
- { 0.34187941416012108, -0.69999999999999996, 0.80000000000000004,
+ { 0.36449916621651091, -0.69999999999999996, 0.80000000000000004,
0.34906585039886590 },
- { 0.50173239465478259, -0.69999999999999996, 0.80000000000000004,
+ { 0.57848021800372573, -0.69999999999999996, 0.80000000000000004,
0.52359877559829882 },
- { 0.65266550725988315, -0.69999999999999996, 0.80000000000000004,
+ { 0.83837480968392586, -0.69999999999999996, 0.80000000000000004,
0.69813170079773179 },
- { 0.79624879865249298, -0.69999999999999996, 0.80000000000000004,
+ { 1.1751669030061143, -0.69999999999999996, 0.80000000000000004,
0.87266462599716477 },
- { 0.93497577043296920, -0.69999999999999996, 0.80000000000000004,
+ { 1.6381851899173601, -0.69999999999999996, 0.80000000000000004,
1.0471975511965976 },
- { 1.0713041566930750, -0.69999999999999996, 0.80000000000000004,
+ { 2.3002065924302197, -0.69999999999999996, 0.80000000000000004,
1.2217304763960306 },
- { 1.2069772023255654, -0.69999999999999996, 0.80000000000000004,
+ { 3.2337600665337862, -0.69999999999999996, 0.80000000000000004,
1.3962634015954636 },
- { 1.3427110650397531, -0.69999999999999996, 0.80000000000000004,
+ { 4.4042405729076961, -0.69999999999999996, 0.80000000000000004,
1.5707963267948966 },
};
const double toler029 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.90000000000000002.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2494869624129105e-16
+// max(|f - f_Boost|): 3.5527136788005009e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 8.5869439826269878e-16
+// mean(f - f_Boost): 6.7723604502134545e-16
+// variance(f - f_Boost): 4.8757508225668289e-31
+// stddev(f - f_Boost): 6.9826576763914390e-16
const testcase_ellint_3<double>
data030[10] =
{
{ 0.0000000000000000, -0.69999999999999996, 0.90000000000000002,
0.0000000000000000 },
- { 0.17340049697003637, -0.69999999999999996, 0.90000000000000002,
+ { 0.17658626600478800, -0.69999999999999996, 0.90000000000000002,
0.17453292519943295 },
- { 0.34062438249741556, -0.69999999999999996, 0.90000000000000002,
+ { 0.36609762156017206, -0.69999999999999996, 0.90000000000000002,
0.34906585039886590 },
- { 0.49801946510076867, -0.69999999999999996, 0.90000000000000002,
+ { 0.58478615187842409, -0.69999999999999996, 0.90000000000000002,
0.52359877559829882 },
- { 0.64513432604750476, -0.69999999999999996, 0.90000000000000002,
+ { 0.85718862878291846, -0.69999999999999996, 0.90000000000000002,
0.69813170079773179 },
- { 0.78378145487573758, -0.69999999999999996, 0.90000000000000002,
+ { 1.2255385617397643, -0.69999999999999996, 0.90000000000000002,
0.87266462599716477 },
- { 0.91671799500854623, -0.69999999999999996, 0.90000000000000002,
+ { 1.7696521899992939, -0.69999999999999996, 0.90000000000000002,
1.0471975511965976 },
- { 1.0466193579463123, -0.69999999999999996, 0.90000000000000002,
+ { 2.6476314987883502, -0.69999999999999996, 0.90000000000000002,
1.2217304763960306 },
- { 1.1754218079199146, -0.69999999999999996, 0.90000000000000002,
+ { 4.1373434902898083, -0.69999999999999996, 0.90000000000000002,
1.3962634015954636 },
- { 1.3040500499695913, -0.69999999999999996, 0.90000000000000002,
+ { 6.3796094177887746, -0.69999999999999996, 0.90000000000000002,
1.5707963267948966 },
};
const double toler030 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.0000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 2.8964816695821429e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.3664899092028927e-16
+// mean(f - f_Boost): 5.2735593669694933e-17
+// variance(f - f_Boost): 3.4333862218458872e-34
+// stddev(f - f_Boost): 1.8529398861932589e-17
const testcase_ellint_3<double>
data031[10] =
{
@@ -918,289 +1010,319 @@ data031[10] =
0.0000000000000000 },
{ 0.17485154362988359, -0.59999999999999998, 0.0000000000000000,
0.17453292519943295 },
- { 0.35160509865544326, -0.59999999999999998, 0.0000000000000000,
+ { 0.35160509865544320, -0.59999999999999998, 0.0000000000000000,
0.34906585039886590 },
{ 0.53210652578446138, -0.59999999999999998, 0.0000000000000000,
0.52359877559829882 },
{ 0.71805304664485659, -0.59999999999999998, 0.0000000000000000,
0.69813170079773179 },
- { 0.91082759030195970, -0.59999999999999998, 0.0000000000000000,
+ { 0.91082759030195981, -0.59999999999999998, 0.0000000000000000,
0.87266462599716477 },
{ 1.1112333229323361, -0.59999999999999998, 0.0000000000000000,
1.0471975511965976 },
{ 1.3191461190365270, -0.59999999999999998, 0.0000000000000000,
1.2217304763960306 },
- { 1.5332022105084773, -0.59999999999999998, 0.0000000000000000,
+ { 1.5332022105084779, -0.59999999999999998, 0.0000000000000000,
1.3962634015954636 },
- { 1.7507538029157526, -0.59999999999999998, 0.0000000000000000,
+ { 1.7507538029157523, -0.59999999999999998, 0.0000000000000000,
1.5707963267948966 },
};
const double toler031 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.10000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 2.6674242225057385e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.2335247010355137e-16
+// mean(f - f_Boost): 8.6042284408449634e-17
+// variance(f - f_Boost): 2.2835347143080263e-33
+// stddev(f - f_Boost): 4.7786344433405099e-17
const testcase_ellint_3<double>
data032[10] =
{
{ 0.0000000000000000, -0.59999999999999998, 0.10000000000000001,
0.0000000000000000 },
- { 0.17467514275022011, -0.59999999999999998, 0.10000000000000001,
+ { 0.17502858548476194, -0.59999999999999998, 0.10000000000000001,
0.17453292519943295 },
- { 0.35021333086258255, -0.59999999999999998, 0.10000000000000001,
+ { 0.35301673150537388, -0.59999999999999998, 0.10000000000000001,
0.34906585039886590 },
- { 0.52751664092962691, -0.59999999999999998, 0.10000000000000001,
+ { 0.53683932476326812, -0.59999999999999998, 0.10000000000000001,
0.52359877559829882 },
- { 0.70752126971957874, -0.59999999999999998, 0.10000000000000001,
+ { 0.72914228589586771, -0.59999999999999998, 0.10000000000000001,
0.69813170079773179 },
- { 0.89111058756112871, -0.59999999999999998, 0.10000000000000001,
+ { 0.93208036718354692, -0.59999999999999998, 0.10000000000000001,
0.87266462599716477 },
- { 1.0789241202877768, -0.59999999999999998, 0.10000000000000001,
+ { 1.1468984688863377, -0.59999999999999998, 0.10000000000000001,
1.0471975511965976 },
- { 1.2710800210399946, -0.59999999999999998, 0.10000000000000001,
+ { 1.3733904977062528, -0.59999999999999998, 0.10000000000000001,
1.2217304763960306 },
- { 1.4669060574440276, -0.59999999999999998, 0.10000000000000001,
+ { 1.6094225663372157, -0.59999999999999998, 0.10000000000000001,
1.3962634015954636 },
- { 1.6648615773343014, -0.59999999999999998, 0.10000000000000001,
+ { 1.8508766487100685, -0.59999999999999998, 0.10000000000000001,
1.5707963267948966 },
};
const double toler032 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.20000000000000001.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1891472451898755e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.0940560416437693e-16
+// mean(f - f_Boost): 4.1633363423443370e-17
+// variance(f - f_Boost): 8.5834655546147173e-33
+// stddev(f - f_Boost): 9.2646994309662939e-17
const testcase_ellint_3<double>
data033[10] =
{
{ 0.0000000000000000, -0.59999999999999998, 0.20000000000000001,
0.0000000000000000 },
- { 0.17449937871800650, -0.59999999999999998, 0.20000000000000001,
+ { 0.17520627248155893, -0.59999999999999998, 0.20000000000000001,
0.17453292519943295 },
- { 0.34884093647346553, -0.59999999999999998, 0.20000000000000001,
+ { 0.35444873935437748, -0.59999999999999998, 0.20000000000000001,
0.34906585039886590 },
- { 0.52306221119844087, -0.59999999999999998, 0.20000000000000001,
+ { 0.54172310557682524, -0.59999999999999998, 0.20000000000000001,
0.52359877559829882 },
- { 0.69749955678982223, -0.59999999999999998, 0.20000000000000001,
+ { 0.74084300280734672, -0.59999999999999998, 0.20000000000000001,
0.69813170079773179 },
- { 0.87274610682416853, -0.59999999999999998, 0.20000000000000001,
+ { 0.95509001527006121, -0.59999999999999998, 0.20000000000000001,
0.87266462599716477 },
- { 1.0494620540750792, -0.59999999999999998, 0.20000000000000001,
+ { 1.1865688084431796, -0.59999999999999998, 0.20000000000000001,
1.0471975511965976 },
- { 1.2280847305507339, -0.59999999999999998, 0.20000000000000001,
+ { 1.4352978868932598, -0.59999999999999998, 0.20000000000000001,
1.2217304763960306 },
- { 1.4085436279696886, -0.59999999999999998, 0.20000000000000001,
+ { 1.6983400371331816, -0.59999999999999998, 0.20000000000000001,
1.3962634015954636 },
- { 1.5901418016279374, -0.59999999999999998, 0.20000000000000001,
+ { 1.9695980282802215, -0.59999999999999998, 0.20000000000000001,
1.5707963267948966 },
};
const double toler033 = 2.5000000000000020e-13;
-// Test data for k=-0.59999999999999998, nu=0.29999999999999999.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 2.9132420715478757e-16
+// Test data for k=-0.59999999999999998, nu=0.30000000000000004.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.9470074709717020e-16
+// mean(f - f_Boost): 7.4940054162198071e-17
+// variance(f - f_Boost): 1.6823592487044846e-32
+// stddev(f - f_Boost): 1.2970579203352812e-16
const testcase_ellint_3<double>
data034[10] =
{
- { 0.0000000000000000, -0.59999999999999998, 0.29999999999999999,
+ { 0.0000000000000000, -0.59999999999999998, 0.30000000000000004,
0.0000000000000000 },
- { 0.17432424744393932, -0.59999999999999998, 0.29999999999999999,
+ { 0.17538460882640122, -0.59999999999999998, 0.30000000000000004,
0.17453292519943295 },
- { 0.34748744127146447, -0.59999999999999998, 0.29999999999999999,
+ { 0.35590165133735557, -0.59999999999999998, 0.30000000000000004,
0.34906585039886590 },
- { 0.51873632743924825, -0.59999999999999998, 0.29999999999999999,
+ { 0.54676661152254535, -0.59999999999999998, 0.30000000000000004,
0.52359877559829882 },
- { 0.68794610396313116, -0.59999999999999998, 0.29999999999999999,
+ { 0.75321709418305305, -0.59999999999999998, 0.30000000000000004,
0.69813170079773179 },
- { 0.85558070175468726, -0.59999999999999998, 0.29999999999999999,
+ { 0.98012637808992920, -0.59999999999999998, 0.30000000000000004,
0.87266462599716477 },
- { 1.0224416343605653, -0.59999999999999998, 0.29999999999999999,
+ { 1.2310891277158875, -0.59999999999999998, 0.30000000000000004,
1.0471975511965976 },
- { 1.1893144457936788, -0.59999999999999998, 0.29999999999999999,
+ { 1.5069157924585623, -0.59999999999999998, 0.30000000000000004,
1.2217304763960306 },
- { 1.3566435377982575, -0.59999999999999998, 0.29999999999999999,
+ { 1.8039583598337940, -0.59999999999999998, 0.30000000000000004,
1.3962634015954636 },
- { 1.5243814243493585, -0.59999999999999998, 0.29999999999999999,
+ { 2.1134154405060599, -0.59999999999999998, 0.30000000000000004,
1.5707963267948966 },
};
const double toler034 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.40000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3897581541285558e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.7909659715991921e-16
+// mean(f - f_Boost): -2.7755575615628915e-18
+// variance(f - f_Boost): 2.4044165394594425e-32
+// stddev(f - f_Boost): 1.5506181152880429e-16
const testcase_ellint_3<double>
data035[10] =
{
{ 0.0000000000000000, -0.59999999999999998, 0.40000000000000002,
0.0000000000000000 },
- { 0.17414974487670717, -0.59999999999999998, 0.40000000000000002,
+ { 0.17556359876533037, -0.59999999999999998, 0.40000000000000002,
0.17453292519943295 },
- { 0.34615238767335027, -0.59999999999999998, 0.40000000000000002,
+ { 0.35737601674244679, -0.59999999999999998, 0.40000000000000002,
0.34906585039886590 },
- { 0.51453257838108557, -0.59999999999999998, 0.40000000000000002,
+ { 0.55197933771320218, -0.59999999999999998, 0.40000000000000002,
0.52359877559829882 },
- { 0.67882386787534399, -0.59999999999999998, 0.40000000000000002,
+ { 0.76633591620002894, -0.59999999999999998, 0.40000000000000002,
0.69813170079773179 },
- { 0.83948470233173578, -0.59999999999999998, 0.40000000000000002,
+ { 1.0075231136019616, -0.59999999999999998, 0.40000000000000002,
0.87266462599716477 },
- { 0.99753496200073977, -0.59999999999999998, 0.40000000000000002,
+ { 1.2815842073813450, -0.59999999999999998, 0.40000000000000002,
1.0471975511965976 },
- { 1.1541101404388487, -0.59999999999999998, 0.40000000000000002,
+ { 1.5911666941449827, -0.59999999999999998, 0.40000000000000002,
1.2217304763960306 },
- { 1.3100911323398814, -0.59999999999999998, 0.40000000000000002,
+ { 1.9323227566025762, -0.59999999999999998, 0.40000000000000002,
1.3962634015954636 },
- { 1.4659345278069984, -0.59999999999999998, 0.40000000000000002,
+ { 2.2925036420985130, -0.59999999999999998, 0.40000000000000002,
1.5707963267948966 },
};
const double toler035 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.50000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.5022138270566200e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.6240126899196213e-16
+// mean(f - f_Boost): 9.1593399531575410e-17
+// variance(f - f_Boost): 1.0357223256482469e-33
+// stddev(f - f_Boost): 3.2182640128619758e-17
const testcase_ellint_3<double>
data036[10] =
{
{ 0.0000000000000000, -0.59999999999999998, 0.50000000000000000,
0.0000000000000000 },
- { 0.17397586700252807, -0.59999999999999998, 0.50000000000000000,
+ { 0.17574324658480217, -0.59999999999999998, 0.50000000000000000,
0.17453292519943295 },
- { 0.34483533397138516, -0.59999999999999998, 0.50000000000000000,
+ { 0.35887240603169313, -0.59999999999999998, 0.50000000000000000,
0.34906585039886590 },
- { 0.51044500461706477, -0.59999999999999998, 0.50000000000000000,
+ { 0.55737161826345261, -0.59999999999999998, 0.50000000000000000,
0.52359877559829882 },
- { 0.67009988034712664, -0.59999999999999998, 0.50000000000000000,
+ { 0.78028227313077458, -0.59999999999999998, 0.50000000000000000,
0.69813170079773179 },
- { 0.82434762375735193, -0.59999999999999998, 0.50000000000000000,
+ { 1.0376989776486290, -0.59999999999999998, 0.50000000000000000,
0.87266462599716477 },
- { 0.97447346702798998, -0.59999999999999998, 0.50000000000000000,
+ { 1.3395933991042925, -0.59999999999999998, 0.50000000000000000,
1.0471975511965976 },
- { 1.1219494000522143, -0.59999999999999998, 0.50000000000000000,
+ { 1.6924049626591782, -0.59999999999999998, 0.50000000000000000,
1.2217304763960306 },
- { 1.2680242605954484, -0.59999999999999998, 0.50000000000000000,
+ { 2.0931011856518920, -0.59999999999999998, 0.50000000000000000,
1.3962634015954636 },
- { 1.4135484285693078, -0.59999999999999998, 0.50000000000000000,
+ { 2.5239007084492706, -0.59999999999999998, 0.50000000000000000,
1.5707963267948966 },
};
const double toler036 = 2.5000000000000020e-13;
-// Test data for k=-0.59999999999999998, nu=0.59999999999999998.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.2504224329684343e-16
+// Test data for k=-0.59999999999999998, nu=0.60000000000000009.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.6651378277398083e-16
+// mean(f - f_Boost): 1.1934897514720432e-16
+// variance(f - f_Boost): 1.7585404776158019e-33
+// stddev(f - f_Boost): 4.1934955319110598e-17
const testcase_ellint_3<double>
data037[10] =
{
- { 0.0000000000000000, -0.59999999999999998, 0.59999999999999998,
+ { 0.0000000000000000, -0.59999999999999998, 0.60000000000000009,
0.0000000000000000 },
- { 0.17380260984469353, -0.59999999999999998, 0.59999999999999998,
+ { 0.17592355661219386, -0.59999999999999998, 0.60000000000000009,
0.17453292519943295 },
- { 0.34353585361777839, -0.59999999999999998, 0.59999999999999998,
+ { 0.36039141192661606, -0.59999999999999998, 0.60000000000000009,
0.34906585039886590 },
- { 0.50646805774321380, -0.59999999999999998, 0.59999999999999998,
+ { 0.56295472636903854, -0.59999999999999998, 0.60000000000000009,
0.52359877559829882 },
- { 0.66174468108625506, -0.59999999999999998, 0.59999999999999998,
+ { 0.79515295130165986, -0.59999999999999998, 0.60000000000000009,
0.69813170079773179 },
- { 0.81007462280278408, -0.59999999999999998, 0.59999999999999998,
+ { 1.0711886441942242, -0.59999999999999998, 0.60000000000000009,
0.87266462599716477 },
- { 0.95303466945718729, -0.59999999999999998, 0.59999999999999998,
+ { 1.4072952835139891, -0.59999999999999998, 0.60000000000000009,
1.0471975511965976 },
- { 1.0924118588677505, -0.59999999999999998, 0.59999999999999998,
+ { 1.8174863977376825, -0.59999999999999998, 0.60000000000000009,
1.2217304763960306 },
- { 1.2297640574847937, -0.59999999999999998, 0.59999999999999998,
+ { 2.3029921578542232, -0.59999999999999998, 0.60000000000000009,
1.3962634015954636 },
- { 1.3662507535812816, -0.59999999999999998, 0.59999999999999998,
+ { 2.8388723099514972, -0.59999999999999998, 0.60000000000000009,
1.5707963267948966 },
};
const double toler037 = 2.5000000000000020e-13;
-// Test data for k=-0.59999999999999998, nu=0.69999999999999996.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3559889697529752e-16
+// Test data for k=-0.59999999999999998, nu=0.70000000000000007.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.2451074234797436e-16
+// mean(f - f_Boost): 5.2735593669694933e-17
+// variance(f - f_Boost): 3.4333862218458872e-34
+// stddev(f - f_Boost): 1.8529398861932589e-17
const testcase_ellint_3<double>
data038[10] =
{
- { 0.0000000000000000, -0.59999999999999998, 0.69999999999999996,
+ { 0.0000000000000000, -0.59999999999999998, 0.70000000000000007,
0.0000000000000000 },
- { 0.17362996946312007, -0.59999999999999998, 0.69999999999999996,
+ { 0.17610453321631936, -0.59999999999999998, 0.70000000000000007,
0.17453292519943295 },
- { 0.34225353454870588, -0.59999999999999998, 0.69999999999999996,
+ { 0.36193365056369764, -0.59999999999999998, 0.70000000000000007,
0.34906585039886590 },
- { 0.50259656397799524, -0.59999999999999998, 0.69999999999999996,
+ { 0.56874098962268527, -0.59999999999999998, 0.70000000000000007,
0.52359877559829882 },
- { 0.65373184496628933, -0.59999999999999998, 0.69999999999999996,
+ { 0.81106198671477181, -0.59999999999999998, 0.70000000000000007,
0.69813170079773179 },
- { 0.79658372884056439, -0.59999999999999998, 0.69999999999999996,
+ { 1.1086886419010082, -0.59999999999999998, 0.70000000000000007,
0.87266462599716477 },
- { 0.93303240100245421, -0.59999999999999998, 0.69999999999999996,
+ { 1.4879048567239257, -0.59999999999999998, 0.70000000000000007,
1.0471975511965976 },
- { 1.0651547944716557, -0.59999999999999998, 0.69999999999999996,
+ { 1.9780310073615923, -0.59999999999999998, 0.70000000000000007,
1.2217304763960306 },
- { 1.1947676204853441, -0.59999999999999998, 0.69999999999999996,
+ { 2.5941545586772712, -0.59999999999999998, 0.70000000000000007,
1.3962634015954636 },
- { 1.3232737468822813, -0.59999999999999998, 0.69999999999999996,
+ { 3.3029735898397155, -0.59999999999999998, 0.70000000000000007,
1.5707963267948966 },
};
const double toler038 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.80000000000000004.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.1879494682720725e-16
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.3826960061025914e-16
+// mean(f - f_Boost): 2.7478019859472625e-16
+// variance(f - f_Boost): 4.6451528105588637e-32
+// stddev(f - f_Boost): 2.1552616570984749e-16
const testcase_ellint_3<double>
data039[10] =
{
{ 0.0000000000000000, -0.59999999999999998, 0.80000000000000004,
0.0000000000000000 },
- { 0.17345794195390685, -0.59999999999999998, 0.80000000000000004,
+ { 0.17628618080795252, -0.59999999999999998, 0.80000000000000004,
0.17453292519943295 },
- { 0.34098797854531027, -0.59999999999999998, 0.80000000000000004,
+ { 0.36349976272521012, -0.59999999999999998, 0.80000000000000004,
0.34906585039886590 },
- { 0.49882569168826213, -0.59999999999999998, 0.80000000000000004,
+ { 0.57474392342151914, -0.59999999999999998, 0.80000000000000004,
0.52359877559829882 },
- { 0.64603758566475511, -0.59999999999999998, 0.80000000000000004,
+ { 0.82814493499158159, -0.59999999999999998, 0.80000000000000004,
0.69813170079773179 },
- { 0.78380365594769730, -0.59999999999999998, 0.80000000000000004,
+ { 1.1511281795998280, -0.59999999999999998, 0.80000000000000004,
0.87266462599716477 },
- { 0.91430946255611190, -0.59999999999999998, 0.80000000000000004,
+ { 1.5864286332503075, -0.59999999999999998, 0.80000000000000004,
1.0471975511965976 },
- { 1.0398955217270607, -0.59999999999999998, 0.80000000000000004,
+ { 2.1958944866494527, -0.59999999999999998, 0.80000000000000004,
1.2217304763960306 },
- { 1.1625948314277679, -0.59999999999999998, 0.80000000000000004,
+ { 3.0398358172574604, -0.59999999999999998, 0.80000000000000004,
1.3962634015954636 },
- { 1.2840021261752192, -0.59999999999999998, 0.80000000000000004,
+ { 4.0867036409261832, -0.59999999999999998, 0.80000000000000004,
1.5707963267948966 },
};
const double toler039 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.90000000000000002.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.4768329326726447e-16
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.7440178400898422e-16
+// mean(f - f_Boost): 5.0792703376600914e-16
+// variance(f - f_Boost): 1.9863137923719990e-31
+// stddev(f - f_Boost): 4.4568080420543122e-16
const testcase_ellint_3<double>
data040[10] =
{
{ 0.0000000000000000, -0.59999999999999998, 0.90000000000000002,
0.0000000000000000 },
- { 0.17328652344890030, -0.59999999999999998, 0.90000000000000002,
+ { 0.17646850384035848, -0.59999999999999998, 0.90000000000000002,
0.17453292519943295 },
- { 0.33973880062929018, -0.59999999999999998, 0.90000000000000002,
+ { 0.36509041515134105, -0.59999999999999998, 0.90000000000000002,
0.34906585039886590 },
- { 0.49515092233122743, -0.59999999999999998, 0.90000000000000002,
+ { 0.58097838596260631, -0.59999999999999998, 0.90000000000000002,
0.52359877559829882 },
- { 0.63864042139737043, -0.59999999999999998, 0.90000000000000002,
+ { 0.84656453396163722, -0.59999999999999998, 0.90000000000000002,
0.69813170079773179 },
- { 0.77167205646538850, -0.59999999999999998, 0.90000000000000002,
+ { 1.1997828426963724, -0.59999999999999998, 0.90000000000000002,
0.87266462599716477 },
- { 0.89673202848034383, -0.59999999999999998, 0.90000000000000002,
+ { 1.7112436789225605, -0.59999999999999998, 0.90000000000000002,
1.0471975511965976 },
- { 1.0163984492661304, -0.59999999999999998, 0.90000000000000002,
+ { 2.5193168553672312, -0.59999999999999998, 0.90000000000000002,
1.2217304763960306 },
- { 1.1328845785162431, -0.59999999999999998, 0.90000000000000002,
+ { 3.8656670488606686, -0.59999999999999998, 0.90000000000000002,
1.3962634015954636 },
- { 1.2479362973851875, -0.59999999999999998, 0.90000000000000002,
+ { 5.8709993116265595, -0.59999999999999998, 0.90000000000000002,
1.5707963267948966 },
};
const double toler040 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.0000000000000000.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.1201497220602069e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.4551389361831220e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 2.5893058141206173e-32
+// stddev(f - f_Boost): 1.6091320064309879e-16
const testcase_ellint_3<double>
data041[10] =
{
@@ -1208,1469 +1330,1619 @@ data041[10] =
0.0000000000000000 },
{ 0.17475385514035785, -0.50000000000000000, 0.0000000000000000,
0.17453292519943295 },
- { 0.35081868470101585, -0.50000000000000000, 0.0000000000000000,
+ { 0.35081868470101579, -0.50000000000000000, 0.0000000000000000,
0.34906585039886590 },
{ 0.52942862705190574, -0.50000000000000000, 0.0000000000000000,
0.52359877559829882 },
- { 0.71164727562630314, -0.50000000000000000, 0.0000000000000000,
+ { 0.71164727562630326, -0.50000000000000000, 0.0000000000000000,
0.69813170079773179 },
{ 0.89824523594227768, -0.50000000000000000, 0.0000000000000000,
0.87266462599716477 },
- { 1.0895506700518851, -0.50000000000000000, 0.0000000000000000,
+ { 1.0895506700518853, -0.50000000000000000, 0.0000000000000000,
1.0471975511965976 },
- { 1.2853005857432931, -0.50000000000000000, 0.0000000000000000,
+ { 1.2853005857432933, -0.50000000000000000, 0.0000000000000000,
1.2217304763960306 },
- { 1.4845545520549484, -0.50000000000000000, 0.0000000000000000,
+ { 1.4845545520549488, -0.50000000000000000, 0.0000000000000000,
1.3962634015954636 },
- { 1.6857503548125963, -0.50000000000000000, 0.0000000000000000,
+ { 1.6857503548125961, -0.50000000000000000, 0.0000000000000000,
1.5707963267948966 },
};
const double toler041 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.10000000000000001.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.1662857256911530e-16
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.7416868347177582e-16
+// mean(f - f_Boost): 2.7755575615628915e-18
+// variance(f - f_Boost): 5.4326441655972001e-32
+// stddev(f - f_Boost): 2.3308033305273100e-16
const testcase_ellint_3<double>
data042[10] =
{
{ 0.0000000000000000, -0.50000000000000000, 0.10000000000000001,
0.0000000000000000 },
- { 0.17457763120814676, -0.50000000000000000, 0.10000000000000001,
+ { 0.17493071928248824, -0.50000000000000000, 0.10000000000000001,
0.17453292519943295 },
- { 0.34943246340849154, -0.50000000000000000, 0.10000000000000001,
+ { 0.35222467688034798, -0.50000000000000000, 0.10000000000000001,
0.34906585039886590 },
- { 0.52487937869610790, -0.50000000000000000, 0.10000000000000001,
+ { 0.53411928652008112, -0.50000000000000000, 0.10000000000000001,
0.52359877559829882 },
- { 0.70127785096388384, -0.50000000000000000, 0.10000000000000001,
+ { 0.72256398117177589, -0.50000000000000000, 0.10000000000000001,
0.69813170079773179 },
- { 0.87898815988624479, -0.50000000000000000, 0.10000000000000001,
+ { 0.91899583232771009, -0.50000000000000000, 0.10000000000000001,
0.87266462599716477 },
- { 1.0582764576094172, -0.50000000000000000, 0.10000000000000001,
+ { 1.1240549163055360, -0.50000000000000000, 0.10000000000000001,
1.0471975511965976 },
- { 1.2391936844060205, -0.50000000000000000, 0.10000000000000001,
+ { 1.3372938086286021, -0.50000000000000000, 0.10000000000000001,
1.2217304763960306 },
- { 1.4214793542995841, -0.50000000000000000, 0.10000000000000001,
+ { 1.5570024469132429, -0.50000000000000000, 0.10000000000000001,
1.3962634015954636 },
- { 1.6045524936084892, -0.50000000000000000, 0.10000000000000001,
+ { 1.7803034946545480, -0.50000000000000000, 0.10000000000000001,
1.5707963267948966 },
};
const double toler042 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.20000000000000001.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.2114786773102175e-16
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1198767993730867e-16
+// mean(f - f_Boost): 2.7755575615628914e-17
+// variance(f - f_Boost): 5.0311947683004831e-32
+// stddev(f - f_Boost): 2.2430324938128922e-16
const testcase_ellint_3<double>
data043[10] =
{
{ 0.0000000000000000, -0.50000000000000000, 0.20000000000000001,
0.0000000000000000 },
- { 0.17440204336345433, -0.50000000000000000, 0.20000000000000001,
+ { 0.17510822779582402, -0.50000000000000000, 0.20000000000000001,
0.17453292519943295 },
- { 0.34806552388338824, -0.50000000000000000, 0.20000000000000001,
+ { 0.35365094725531487, -0.50000000000000000, 0.20000000000000001,
0.34906585039886590 },
- { 0.52046416757129810, -0.50000000000000000, 0.20000000000000001,
+ { 0.53895933237328697, -0.50000000000000000, 0.20000000000000001,
0.52359877559829882 },
- { 0.69140924550993865, -0.50000000000000000, 0.20000000000000001,
+ { 0.73408090840070794, -0.50000000000000000, 0.20000000000000001,
0.69813170079773179 },
- { 0.86104678636125520, -0.50000000000000000, 0.20000000000000001,
+ { 0.94145442818535396, -0.50000000000000000, 0.20000000000000001,
0.87266462599716477 },
- { 1.0297439459053981, -0.50000000000000000, 0.20000000000000001,
+ { 1.1624120186296487, -0.50000000000000000, 0.20000000000000001,
1.0471975511965976 },
- { 1.1979214112912033, -0.50000000000000000, 0.20000000000000001,
+ { 1.3965823372867114, -0.50000000000000000, 0.20000000000000001,
1.2217304763960306 },
- { 1.3659033858648930, -0.50000000000000000, 0.20000000000000001,
+ { 1.6414308440430099, -0.50000000000000000, 0.20000000000000001,
1.3962634015954636 },
- { 1.5338490483665983, -0.50000000000000000, 0.20000000000000001,
+ { 1.8922947612264018, -0.50000000000000000, 0.20000000000000001,
1.5707963267948966 },
};
const double toler043 = 2.5000000000000020e-13;
-// Test data for k=-0.50000000000000000, nu=0.29999999999999999.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.2557837230041312e-16
+// Test data for k=-0.50000000000000000, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.3800262770228813e-16
+// mean(f - f_Boost): 5.8286708792820721e-17
+// variance(f - f_Boost): 8.5027191584278157e-32
+// stddev(f - f_Boost): 2.9159422419567599e-16
const testcase_ellint_3<double>
data044[10] =
{
- { 0.0000000000000000, -0.50000000000000000, 0.29999999999999999,
+ { 0.0000000000000000, -0.50000000000000000, 0.30000000000000004,
0.0000000000000000 },
- { 0.17422708752228896, -0.50000000000000000, 0.29999999999999999,
+ { 0.17528638488102041, -0.50000000000000000, 0.30000000000000004,
0.17453292519943295 },
- { 0.34671739434855858, -0.50000000000000000, 0.29999999999999999,
+ { 0.35509802222332720, -0.50000000000000000, 0.30000000000000004,
0.34906585039886590 },
- { 0.51617616305641878, -0.50000000000000000, 0.29999999999999999,
+ { 0.54395740731866193, -0.50000000000000000, 0.30000000000000004,
0.52359877559829882 },
- { 0.68200047612545167, -0.50000000000000000, 0.29999999999999999,
+ { 0.74625871438752667, -0.50000000000000000, 0.30000000000000004,
0.69813170079773179 },
- { 0.84427217869498372, -0.50000000000000000, 0.29999999999999999,
+ { 0.96588271186092023, -0.50000000000000000, 0.30000000000000004,
0.87266462599716477 },
- { 1.0035637821389782, -0.50000000000000000, 0.29999999999999999,
+ { 1.2054319584357329, -0.50000000000000000, 0.30000000000000004,
1.0471975511965976 },
- { 1.1606800483933111, -0.50000000000000000, 0.29999999999999999,
+ { 1.4651077994832871, -0.50000000000000000, 0.30000000000000004,
1.2217304763960306 },
- { 1.3164407134643459, -0.50000000000000000, 0.29999999999999999,
+ { 1.7416018368052644, -0.50000000000000000, 0.30000000000000004,
1.3962634015954636 },
- { 1.4715681939859637, -0.50000000000000000, 0.29999999999999999,
+ { 2.0277924458111314, -0.50000000000000000, 0.30000000000000004,
1.5707963267948966 },
};
const double toler044 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.40000000000000002.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.2992508582900068e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.0439932918341581e-16
+// mean(f - f_Boost): 3.0531133177191807e-17
+// variance(f - f_Boost): 9.0809736800018602e-32
+// stddev(f - f_Boost): 3.0134653938616686e-16
const testcase_ellint_3<double>
data045[10] =
{
{ 0.0000000000000000, -0.50000000000000000, 0.40000000000000002,
0.0000000000000000 },
- { 0.17405275963859917, -0.50000000000000000, 0.40000000000000002,
+ { 0.17546519477859268, -0.50000000000000000, 0.40000000000000002,
0.17453292519943295 },
- { 0.34538761957029329, -0.50000000000000000, 0.40000000000000002,
+ { 0.35656644822531680, -0.50000000000000000, 0.40000000000000002,
0.34906585039886590 },
- { 0.51200902646603907, -0.50000000000000000, 0.40000000000000002,
+ { 0.54912289677411319, -0.50000000000000000, 0.40000000000000002,
0.52359877559829882 },
- { 0.67301522212868792, -0.50000000000000000, 0.40000000000000002,
+ { 0.75916731611690047, -0.50000000000000000, 0.40000000000000002,
0.69813170079773179 },
- { 0.82853844466313320, -0.50000000000000000, 0.40000000000000002,
+ { 0.99260415631328214, -0.50000000000000000, 0.40000000000000002,
0.87266462599716477 },
- { 0.97942097862681488, -0.50000000000000000, 0.40000000000000002,
+ { 1.2541925856918670, -0.50000000000000000, 0.40000000000000002,
1.0471975511965976 },
- { 1.1268429801220614, -0.50000000000000000, 0.40000000000000002,
+ { 1.5456393705347609, -0.50000000000000000, 0.40000000000000002,
1.2217304763960306 },
- { 1.2720406704533922, -0.50000000000000000, 0.40000000000000002,
+ { 1.8631904972952076, -0.50000000000000000, 0.40000000000000002,
1.3962634015954636 },
- { 1.4161679518465340, -0.50000000000000000, 0.40000000000000002,
+ { 2.1962905366178065, -0.50000000000000000, 0.40000000000000002,
1.5707963267948966 },
};
const double toler045 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.50000000000000000.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3419255755184137e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.6797816859260978e-16
+// mean(f - f_Boost): 9.4368957093138303e-17
+// variance(f - f_Boost): 7.7794254682023874e-32
+// stddev(f - f_Boost): 2.7891621444803792e-16
const testcase_ellint_3<double>
data046[10] =
{
{ 0.0000000000000000, -0.50000000000000000, 0.50000000000000000,
0.0000000000000000 },
- { 0.17387905570381157, -0.50000000000000000, 0.50000000000000000,
+ { 0.17564466176941509, -0.50000000000000000, 0.50000000000000000,
0.17453292519943295 },
- { 0.34407576010465207, -0.50000000000000000, 0.50000000000000000,
+ { 0.35805679276065394, -0.50000000000000000, 0.50000000000000000,
0.34906585039886590 },
- { 0.50795686560160824, -0.50000000000000000, 0.50000000000000000,
+ { 0.55446601496200032, -0.50000000000000000, 0.50000000000000000,
0.52359877559829882 },
- { 0.66442115453330164, -0.50000000000000000, 0.50000000000000000,
+ { 0.77288783578259013, -0.50000000000000000, 0.50000000000000000,
0.69813170079773179 },
- { 0.81373829119355345, -0.50000000000000000, 0.50000000000000000,
+ { 1.0220246013918972, -0.50000000000000000, 0.50000000000000000,
0.87266462599716477 },
- { 0.95705743313235825, -0.50000000000000000, 0.50000000000000000,
+ { 1.3101681612463965, -0.50000000000000000, 0.50000000000000000,
1.0471975511965976 },
- { 1.0959131991362554, -0.50000000000000000, 0.50000000000000000,
+ { 1.6422994881851025, -0.50000000000000000, 0.50000000000000000,
1.2217304763960306 },
- { 1.2318900529754597, -0.50000000000000000, 0.50000000000000000,
+ { 2.0152636030998816, -0.50000000000000000, 0.50000000000000000,
1.3962634015954636 },
- { 1.3664739530045971, -0.50000000000000000, 0.50000000000000000,
+ { 2.4136715042011945, -0.50000000000000000, 0.50000000000000000,
1.5707963267948966 },
};
const double toler046 = 2.5000000000000020e-13;
-// Test data for k=-0.50000000000000000, nu=0.59999999999999998.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3838494104749599e-16
+// Test data for k=-0.50000000000000000, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.9178421578645735e-16
+// mean(f - f_Boost): 1.3322676295501878e-16
+// variance(f - f_Boost): 1.7749370367472766e-31
+// stddev(f - f_Boost): 4.2130001622920411e-16
const testcase_ellint_3<double>
data047[10] =
{
- { 0.0000000000000000, -0.50000000000000000, 0.59999999999999998,
+ { 0.0000000000000000, -0.50000000000000000, 0.60000000000000009,
0.0000000000000000 },
- { 0.17370597174637581, -0.50000000000000000, 0.59999999999999998,
+ { 0.17582479017522740, -0.50000000000000000, 0.60000000000000009,
0.17453292519943295 },
- { 0.34278139158591414, -0.50000000000000000, 0.59999999999999998,
+ { 0.35956964546660036, -0.50000000000000000, 0.60000000000000009,
0.34906585039886590 },
- { 0.50401419439302708, -0.50000000000000000, 0.59999999999999998,
+ { 0.55999790372984193, -0.50000000000000000, 0.60000000000000009,
0.52359877559829882 },
- { 0.65618938076167210, -0.50000000000000000, 0.59999999999999998,
+ { 0.78751507911209895, -0.50000000000000000, 0.60000000000000009,
0.69813170079773179 },
- { 0.79977959248855424, -0.50000000000000000, 0.59999999999999998,
+ { 1.0546620505035220, -0.50000000000000000, 0.60000000000000009,
0.87266462599716477 },
- { 0.93625925190753545, -0.50000000000000000, 0.59999999999999998,
+ { 1.3754438357425935, -0.50000000000000000, 0.60000000000000009,
1.0471975511965976 },
- { 1.0674905658379708, -0.50000000000000000, 0.59999999999999998,
+ { 1.7615727400820127, -0.50000000000000000, 0.60000000000000009,
1.2217304763960306 },
- { 1.1953481298023050, -0.50000000000000000, 0.59999999999999998,
+ { 2.2134638067565242, -0.50000000000000000, 0.60000000000000009,
1.3962634015954636 },
- { 1.3215740290190876, -0.50000000000000000, 0.59999999999999998,
+ { 2.7090491861753558, -0.50000000000000000, 0.60000000000000009,
1.5707963267948966 },
};
const double toler047 = 2.5000000000000020e-13;
-// Test data for k=-0.50000000000000000, nu=0.69999999999999996.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.4250604066951477e-16
+// Test data for k=-0.50000000000000000, nu=0.70000000000000007.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.0745105182189226e-16
+// mean(f - f_Boost): 4.1633363423443370e-17
+// variance(f - f_Boost): 1.9996383743576116e-32
+// stddev(f - f_Boost): 1.4140857026211713e-16
const testcase_ellint_3<double>
data048[10] =
{
- { 0.0000000000000000, -0.50000000000000000, 0.69999999999999996,
+ { 0.0000000000000000, -0.50000000000000000, 0.70000000000000007,
0.0000000000000000 },
- { 0.17353350383131641, -0.50000000000000000, 0.69999999999999996,
+ { 0.17600558435914915, -0.50000000000000000, 0.70000000000000007,
0.17453292519943295 },
- { 0.34150410405436771, -0.50000000000000000, 0.69999999999999996,
+ { 0.36110561926726259, -0.50000000000000000, 0.70000000000000007,
0.34906585039886590 },
- { 0.50017589696443487, -0.50000000000000000, 0.69999999999999996,
+ { 0.56573074641137111, -0.50000000000000000, 0.70000000000000007,
0.52359877559829882 },
- { 0.64829398188419951, -0.50000000000000000, 0.69999999999999996,
+ { 0.80316073084237205, -0.50000000000000000, 0.70000000000000007,
0.69813170079773179 },
- { 0.78658270782402073, -0.50000000000000000, 0.69999999999999996,
+ { 1.0911910688131461, -0.50000000000000000, 0.70000000000000007,
0.87266462599716477 },
- { 0.91684738336675053, -0.50000000000000000, 0.69999999999999996,
+ { 1.4530946406380640, -0.50000000000000000, 0.70000000000000007,
1.0471975511965976 },
- { 1.0412486789555935, -0.50000000000000000, 0.69999999999999996,
+ { 1.9144386536785372, -0.50000000000000000, 0.70000000000000007,
1.2217304763960306 },
- { 1.1619021847612001, -0.50000000000000000, 0.69999999999999996,
+ { 2.4878788958234970, -0.50000000000000000, 0.70000000000000007,
1.3962634015954636 },
- { 1.2807475181182502, -0.50000000000000000, 0.69999999999999996,
+ { 3.1433945297859225, -0.50000000000000000, 0.70000000000000007,
1.5707963267948966 },
};
const double toler048 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.5715240651179632e-16
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.4380477375534667e-16
+// mean(f - f_Boost): 2.3037127760972000e-16
+// variance(f - f_Boost): 1.4989821857033475e-31
+// stddev(f - f_Boost): 3.8716691306248618e-16
const testcase_ellint_3<double>
data049[10] =
{
{ 0.0000000000000000, -0.50000000000000000, 0.80000000000000004,
0.0000000000000000 },
- { 0.17336164805979126, -0.50000000000000000, 0.80000000000000004,
+ { 0.17618704872620228, -0.50000000000000000, 0.80000000000000004,
0.17453292519943295 },
- { 0.34024350132086773, -0.50000000000000000, 0.80000000000000004,
+ { 0.36266535159745827, -0.50000000000000000, 0.80000000000000004,
0.34906585039886590 },
- { 0.49643719555734073, -0.50000000000000000, 0.80000000000000004,
+ { 0.57167789954529158, -0.50000000000000000, 0.80000000000000004,
0.52359877559829882 },
- { 0.64071162456976150, -0.50000000000000000, 0.80000000000000004,
+ { 0.81995752984315018, -0.50000000000000000, 0.80000000000000004,
0.69813170079773179 },
- { 0.77407836177211908, -0.50000000000000000, 0.80000000000000004,
+ { 1.1325112162158122, -0.50000000000000000, 0.80000000000000004,
0.87266462599716477 },
- { 0.89867058251905652, -0.50000000000000000, 0.80000000000000004,
+ { 1.5479055930718042, -0.50000000000000000, 0.80000000000000004,
1.0471975511965976 },
- { 1.0169181822134910, -0.50000000000000000, 0.80000000000000004,
+ { 2.1215243941010486, -0.50000000000000000, 0.80000000000000004,
1.2217304763960306 },
- { 1.1311363312779448, -0.50000000000000000, 0.80000000000000004,
+ { 2.9069405767650132, -0.50000000000000000, 0.80000000000000004,
1.3962634015954636 },
- { 1.2434165408189539, -0.50000000000000000, 0.80000000000000004,
+ { 3.8750701888108066, -0.50000000000000000, 0.80000000000000004,
1.5707963267948966 },
};
const double toler049 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.90000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.4664649039489274e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.6192315188521289e-16
+// mean(f - f_Boost): 3.5249581031848718e-16
+// variance(f - f_Boost): 2.5029385557256515e-31
+// stddev(f - f_Boost): 5.0029376927217987e-16
const testcase_ellint_3<double>
data050[10] =
{
{ 0.0000000000000000, -0.50000000000000000, 0.90000000000000002,
0.0000000000000000 },
- { 0.17319040056865681, -0.50000000000000000, 0.90000000000000002,
+ { 0.17636918772384180, -0.50000000000000000, 0.90000000000000002,
0.17453292519943295 },
- { 0.33899920036578557, -0.50000000000000000, 0.90000000000000002,
+ { 0.36424950570740700, -0.50000000000000000, 0.90000000000000002,
0.34906585039886590 },
- { 0.49279362182695174, -0.50000000000000000, 0.90000000000000002,
+ { 0.57785404590231426, -0.50000000000000000, 0.90000000000000002,
0.52359877559829882 },
- { 0.63342123379746151, -0.50000000000000000, 0.90000000000000002,
+ { 0.83806480521716531, -0.50000000000000000, 0.90000000000000002,
0.69813170079773179 },
- { 0.76220595179550321, -0.50000000000000000, 0.90000000000000002,
+ { 1.1798568683069752, -0.50000000000000000, 0.90000000000000002,
0.87266462599716477 },
- { 0.88160004743532294, -0.50000000000000000, 0.90000000000000002,
+ { 1.6678766243739607, -0.50000000000000000, 0.90000000000000002,
1.0471975511965976 },
- { 0.99427448642310123, -0.50000000000000000, 0.90000000000000002,
+ { 2.4282976450693483, -0.50000000000000000, 0.90000000000000002,
1.2217304763960306 },
- { 1.1027091512470095, -0.50000000000000000, 0.90000000000000002,
+ { 3.6810787666126656, -0.50000000000000000, 0.90000000000000002,
1.3962634015954636 },
- { 1.2091116095504744, -0.50000000000000000, 0.90000000000000002,
+ { 5.5355132096026454, -0.50000000000000000, 0.90000000000000002,
1.5707963267948966 },
};
const double toler050 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002, nu=0.0000000000000000.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.0617918857203532e-16
+// Test data for k=-0.39999999999999991, nu=0.0000000000000000.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.1423314994346225e-16
+// mean(f - f_Boost): 1.9428902930940238e-17
+// variance(f - f_Boost): 2.2263750157116445e-32
+// stddev(f - f_Boost): 1.4921042241450980e-16
const testcase_ellint_3<double>
data051[10] =
{
- { 0.0000000000000000, -0.40000000000000002, 0.0000000000000000,
+ { 0.0000000000000000, -0.39999999999999991, 0.0000000000000000,
0.0000000000000000 },
- { 0.17467414669441528, -0.40000000000000002, 0.0000000000000000,
+ { 0.17467414669441528, -0.39999999999999991, 0.0000000000000000,
0.17453292519943295 },
- { 0.35018222772483443, -0.40000000000000002, 0.0000000000000000,
+ { 0.35018222772483443, -0.39999999999999991, 0.0000000000000000,
0.34906585039886590 },
- { 0.52729015917508737, -0.40000000000000002, 0.0000000000000000,
+ { 0.52729015917508748, -0.39999999999999991, 0.0000000000000000,
0.52359877559829882 },
- { 0.70662374407341244, -0.40000000000000002, 0.0000000000000000,
+ { 0.70662374407341244, -0.39999999999999991, 0.0000000000000000,
0.69813170079773179 },
- { 0.88859210497602170, -0.40000000000000002, 0.0000000000000000,
+ { 0.88859210497602159, -0.39999999999999991, 0.0000000000000000,
0.87266462599716477 },
- { 1.0733136290471379, -0.40000000000000002, 0.0000000000000000,
+ { 1.0733136290471381, -0.39999999999999991, 0.0000000000000000,
1.0471975511965976 },
- { 1.2605612170157061, -0.40000000000000002, 0.0000000000000000,
+ { 1.2605612170157066, -0.39999999999999991, 0.0000000000000000,
1.2217304763960306 },
- { 1.4497513956433439, -0.40000000000000002, 0.0000000000000000,
+ { 1.4497513956433439, -0.39999999999999991, 0.0000000000000000,
1.3962634015954636 },
- { 1.6399998658645112, -0.40000000000000002, 0.0000000000000000,
+ { 1.6399998658645112, -0.39999999999999991, 0.0000000000000000,
1.5707963267948966 },
};
const double toler051 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002, nu=0.10000000000000001.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2644663257577874e-16
+// Test data for k=-0.39999999999999991, nu=0.10000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.8489340395463703e-16
+// mean(f - f_Boost): 6.3837823915946496e-17
+// variance(f - f_Boost): 4.4785242050000272e-32
+// stddev(f - f_Boost): 2.1162523963365114e-16
const testcase_ellint_3<double>
data052[10] =
{
- { 0.0000000000000000, -0.40000000000000002, 0.10000000000000001,
+ { 0.0000000000000000, -0.39999999999999991, 0.10000000000000001,
0.0000000000000000 },
- { 0.17449806706684670, -0.40000000000000002, 0.10000000000000001,
+ { 0.17485086590796767, -0.39999999999999991, 0.10000000000000001,
0.17453292519943295 },
- { 0.34880048623856075, -0.40000000000000002, 0.10000000000000001,
+ { 0.35158366412506992, -0.39999999999999991, 0.10000000000000001,
0.34906585039886590 },
- { 0.52277322065757392, -0.40000000000000002, 0.10000000000000001,
+ { 0.53194731675711726, -0.39999999999999991, 0.10000000000000001,
0.52359877559829882 },
- { 0.69638072056918365, -0.40000000000000002, 0.10000000000000001,
+ { 0.71740615528010931, -0.39999999999999991, 0.10000000000000001,
0.69813170079773179 },
- { 0.86968426619831540, -0.40000000000000002, 0.10000000000000001,
+ { 0.90896157773487030, -0.39999999999999991, 0.10000000000000001,
0.87266462599716477 },
- { 1.0428044206578095, -0.40000000000000002, 0.10000000000000001,
+ { 1.1069605483834348, -0.39999999999999991, 0.10000000000000001,
1.0471975511965976 },
- { 1.2158651158274378, -0.40000000000000002, 0.10000000000000001,
+ { 1.3109353428823001, -0.39999999999999991, 0.10000000000000001,
1.2217304763960306 },
- { 1.3889447129893324, -0.40000000000000002, 0.10000000000000001,
+ { 1.5195460789903448, -0.39999999999999991, 0.10000000000000001,
1.3962634015954636 },
- { 1.5620566886683604, -0.40000000000000002, 0.10000000000000001,
+ { 1.7306968836847187, -0.39999999999999991, 0.10000000000000001,
1.5707963267948966 },
};
const double toler052 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002, nu=0.20000000000000001.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.4583049464169287e-16
+// Test data for k=-0.39999999999999991, nu=0.20000000000000001.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.0467985583872730e-16
+// mean(f - f_Boost): 8.6042284408449634e-17
+// variance(f - f_Boost): 1.5826864298542218e-32
+// stddev(f - f_Boost): 1.2580486595733180e-16
const testcase_ellint_3<double>
data053[10] =
{
- { 0.0000000000000000, -0.40000000000000002, 0.20000000000000001,
+ { 0.0000000000000000, -0.39999999999999991, 0.20000000000000001,
0.0000000000000000 },
- { 0.17432262290723397, -0.40000000000000002, 0.20000000000000001,
+ { 0.17502822886437389, -0.39999999999999991, 0.20000000000000001,
0.17453292519943295 },
- { 0.34743795258968596, -0.40000000000000002, 0.20000000000000001,
+ { 0.35300530062530805, -0.39999999999999991, 0.20000000000000001,
0.34906585039886590 },
- { 0.51838919472805101, -0.40000000000000002, 0.20000000000000001,
+ { 0.53675259548210896, -0.39999999999999991, 0.20000000000000001,
0.52359877559829882 },
- { 0.68663134739057907, -0.40000000000000002, 0.20000000000000001,
+ { 0.72878006428676934, -0.39999999999999991, 0.20000000000000001,
0.69813170079773179 },
- { 0.85206432981833979, -0.40000000000000002, 0.20000000000000001,
+ { 0.93100219010583563, -0.39999999999999991, 0.20000000000000001,
0.87266462599716477 },
- { 1.0149595349004430, -0.40000000000000002, 0.20000000000000001,
+ { 1.1443487271187609, -0.39999999999999991, 0.20000000000000001,
1.0471975511965976 },
- { 1.1758349405464676, -0.40000000000000002, 0.20000000000000001,
+ { 1.3683427764108813, -0.39999999999999991, 0.20000000000000001,
1.2217304763960306 },
- { 1.3353337673882637, -0.40000000000000002, 0.20000000000000001,
+ { 1.6008221459300933, -0.39999999999999991, 0.20000000000000001,
1.3962634015954636 },
- { 1.4941414344266770, -0.40000000000000002, 0.20000000000000001,
+ { 1.8380358826317627, -0.39999999999999991, 0.20000000000000001,
1.5707963267948966 },
};
const double toler053 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002, nu=0.29999999999999999.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.1925080711125793e-16
+// Test data for k=-0.39999999999999991, nu=0.30000000000000004.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 2.9973414591826100e-16
+// mean(f - f_Boost): 8.6042284408449634e-17
+// variance(f - f_Boost): 1.5826864298542218e-32
+// stddev(f - f_Boost): 1.2580486595733180e-16
const testcase_ellint_3<double>
data054[10] =
{
- { 0.0000000000000000, -0.40000000000000002, 0.29999999999999999,
+ { 0.0000000000000000, -0.39999999999999991, 0.30000000000000004,
0.0000000000000000 },
- { 0.17414781013591540, -0.40000000000000002, 0.29999999999999999,
+ { 0.17520623975982899, -0.39999999999999991, 0.30000000000000004,
0.17453292519943295 },
- { 0.34609415696777285, -0.40000000000000002, 0.29999999999999999,
+ { 0.35444766141612105, -0.39999999999999991, 0.30000000000000004,
0.34906585039886590 },
- { 0.51413131295862535, -0.40000000000000002, 0.29999999999999999,
+ { 0.54171455841536009, -0.39999999999999991, 0.30000000000000004,
0.52359877559829882 },
- { 0.67733527622935630, -0.40000000000000002, 0.29999999999999999,
+ { 0.74080517001084012, -0.39999999999999991, 0.30000000000000004,
0.69813170079773179 },
- { 0.83558675182733266, -0.40000000000000002, 0.29999999999999999,
+ { 0.95496950509296563, -0.39999999999999991, 0.30000000000000004,
0.87266462599716477 },
- { 0.98940140808865906, -0.40000000000000002, 0.29999999999999999,
+ { 1.1862627879844718, -0.39999999999999991, 0.30000000000000004,
1.0471975511965976 },
- { 1.1396968797728058, -0.40000000000000002, 0.29999999999999999,
+ { 1.4346501803799458, -0.39999999999999991, 0.30000000000000004,
1.2217304763960306 },
- { 1.2875920037865090, -0.40000000000000002, 0.29999999999999999,
+ { 1.6971744798077697, -0.39999999999999991, 0.30000000000000004,
1.3962634015954636 },
- { 1.4342789859950078, -0.40000000000000002, 0.29999999999999999,
+ { 1.9677924132520139, -0.39999999999999991, 0.30000000000000004,
1.5707963267948966 },
};
const double toler054 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002, nu=0.40000000000000002.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.8235661108581362e-16
+// Test data for k=-0.39999999999999991, nu=0.40000000000000002.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.2577246923979600e-16
+// mean(f - f_Boost): 1.8596235662471373e-16
+// variance(f - f_Boost): 1.6222417021441306e-31
+// stddev(f - f_Boost): 4.0277061736727151e-16
const testcase_ellint_3<double>
data055[10] =
{
- { 0.0000000000000000, -0.40000000000000002, 0.40000000000000002,
+ { 0.0000000000000000, -0.39999999999999991, 0.40000000000000002,
0.0000000000000000 },
- { 0.17397362471112707, -0.40000000000000002, 0.40000000000000002,
+ { 0.17538490283034375, -0.39999999999999991, 0.40000000000000002,
0.17453292519943295 },
- { 0.34476864603333196, -0.40000000000000002, 0.40000000000000002,
+ { 0.35591129064319948, -0.39999999999999991, 0.40000000000000002,
0.34906585039886590 },
- { 0.50999329415379346, -0.40000000000000002, 0.40000000000000002,
+ { 0.54684250413264535, -0.39999999999999991, 0.40000000000000002,
0.52359877559829882 },
- { 0.66845674551396006, -0.40000000000000002, 0.40000000000000002,
+ { 0.75355027742668290, -0.39999999999999991, 0.40000000000000002,
0.69813170079773179 },
- { 0.82012848346231748, -0.40000000000000002, 0.40000000000000002,
+ { 0.98117935026780634, -0.39999999999999991, 0.40000000000000002,
0.87266462599716477 },
- { 0.96582449258349057, -0.40000000000000002, 0.40000000000000002,
+ { 1.2337464222030734, -0.39999999999999991, 0.40000000000000002,
1.0471975511965976 },
- { 1.1068473749476286, -0.40000000000000002, 0.40000000000000002,
+ { 1.5125183419289221, -0.39999999999999991, 0.40000000000000002,
1.2217304763960306 },
- { 1.2447132729159989, -0.40000000000000002, 0.40000000000000002,
+ { 1.8140224451130311, -0.39999999999999991, 0.40000000000000002,
1.3962634015954636 },
- { 1.3809986210732901, -0.40000000000000002, 0.40000000000000002,
+ { 2.1289968719280026, -0.39999999999999991, 0.40000000000000002,
1.5707963267948966 },
};
const double toler055 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002, nu=0.50000000000000000.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.9965792755639576e-16
+// Test data for k=-0.39999999999999991, nu=0.50000000000000000.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.8009196014748294e-16
+// mean(f - f_Boost): 1.6375789613221060e-16
+// variance(f - f_Boost): 6.4788283329186610e-32
+// stddev(f - f_Boost): 2.5453542647181080e-16
const testcase_ellint_3<double>
data056[10] =
{
- { 0.0000000000000000, -0.40000000000000002, 0.50000000000000000,
+ { 0.0000000000000000, -0.39999999999999991, 0.50000000000000000,
0.0000000000000000 },
- { 0.17380006262854136, -0.40000000000000002, 0.50000000000000000,
+ { 0.17556422235224273, -0.39999999999999991, 0.50000000000000000,
0.17453292519943295 },
- { 0.34346098216756610, -0.40000000000000002, 0.50000000000000000,
+ { 0.35739675341763921, -0.39999999999999991, 0.50000000000000000,
0.34906585039886590 },
- { 0.50596929935059420, -0.40000000000000002, 0.50000000000000000,
+ { 0.55214655195037188, -0.39999999999999991, 0.50000000000000000,
0.52359877559829882 },
- { 0.65996392089131251, -0.40000000000000002, 0.50000000000000000,
+ { 0.76709520942047438, -0.39999999999999991, 0.50000000000000000,
0.69813170079773179 },
- { 0.80558463511364786, -0.40000000000000002, 0.50000000000000000,
+ { 1.0100278761577499, -0.39999999999999991, 0.50000000000000000,
0.87266462599716477 },
- { 0.94397834522857704, -0.40000000000000002, 0.50000000000000000,
+ { 1.2882265661384342, -0.39999999999999991, 0.50000000000000000,
1.0471975511965976 },
- { 1.0768075114108115, -0.40000000000000002, 0.50000000000000000,
+ { 1.6059059780051874, -0.39999999999999991, 0.50000000000000000,
1.2217304763960306 },
- { 1.2059184624251333, -0.40000000000000002, 0.50000000000000000,
+ { 1.9600182740224081, -0.39999999999999991, 0.50000000000000000,
1.3962634015954636 },
- { 1.3331797176377398, -0.40000000000000002, 0.50000000000000000,
+ { 2.3367461373176508, -0.39999999999999991, 0.50000000000000000,
1.5707963267948966 },
};
const double toler056 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002, nu=0.59999999999999998.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.1640223038298069e-16
+// Test data for k=-0.39999999999999991, nu=0.60000000000000009.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 2.8411408870840790e-16
+// mean(f - f_Boost): 9.7144514654701197e-17
+// variance(f - f_Boost): 1.4860570558543486e-32
+// stddev(f - f_Boost): 1.2190393988113545e-16
const testcase_ellint_3<double>
data057[10] =
{
- { 0.0000000000000000, -0.40000000000000002, 0.59999999999999998,
+ { 0.0000000000000000, -0.39999999999999991, 0.60000000000000009,
0.0000000000000000 },
- { 0.17362711992081245, -0.40000000000000002, 0.59999999999999998,
+ { 0.17574420264267029, -0.39999999999999991, 0.60000000000000009,
0.17453292519943295 },
- { 0.34217074276403953, -0.40000000000000002, 0.59999999999999998,
+ { 0.35890463689046265, -0.39999999999999991, 0.60000000000000009,
0.34906585039886590 },
- { 0.50205389185761606, -0.40000000000000002, 0.59999999999999998,
+ { 0.55763773975194486, -0.39999999999999991, 0.60000000000000009,
0.52359877559829882 },
- { 0.65182834920372734, -0.40000000000000002, 0.59999999999999998,
+ { 0.78153324227761267, -0.39999999999999991, 0.60000000000000009,
0.69813170079773179 },
- { 0.79186512820565136, -0.40000000000000002, 0.59999999999999998,
+ { 1.0420205885765887, -0.39999999999999991, 0.60000000000000009,
0.87266462599716477 },
- { 0.92365535916287134, -0.40000000000000002, 0.59999999999999998,
+ { 1.3517205230381770, -0.39999999999999991, 0.60000000000000009,
1.0471975511965976 },
- { 1.0491915663957907, -0.40000000000000002, 0.59999999999999998,
+ { 1.7210360970313896, -0.39999999999999991, 0.60000000000000009,
1.2217304763960306 },
- { 1.1705934291745106, -0.40000000000000002, 0.59999999999999998,
+ { 2.1500780510169242, -0.39999999999999991, 0.60000000000000009,
1.3962634015954636 },
- { 1.2899514672527024, -0.40000000000000002, 0.59999999999999998,
+ { 2.6186940209850191, -0.39999999999999991, 0.60000000000000009,
1.5707963267948966 },
};
const double toler057 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002, nu=0.69999999999999996.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.3264047918332349e-16
+// Test data for k=-0.39999999999999991, nu=0.70000000000000007.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.1553900340611668e-16
+// mean(f - f_Boost): 1.1657341758564144e-16
+// variance(f - f_Boost): 1.3242789405258207e-32
+// stddev(f - f_Boost): 1.1507731924779187e-16
const testcase_ellint_3<double>
data058[10] =
{
- { 0.0000000000000000, -0.40000000000000002, 0.69999999999999996,
+ { 0.0000000000000000, -0.39999999999999991, 0.70000000000000007,
0.0000000000000000 },
- { 0.17345479265712868, -0.40000000000000002, 0.69999999999999996,
+ { 0.17592484806010436, -0.39999999999999991, 0.70000000000000007,
0.17453292519943295 },
- { 0.34089751955950354, -0.40000000000000002, 0.69999999999999996,
+ { 0.36043555139631439, -0.39999999999999991, 0.70000000000000007,
0.34906585039886590 },
- { 0.49824200167361332, -0.40000000000000002, 0.69999999999999996,
+ { 0.56332813669944881, -0.39999999999999991, 0.70000000000000007,
0.52359877559829882 },
- { 0.64402450341199402, -0.40000000000000002, 0.69999999999999996,
+ { 0.79697424562157548, -0.39999999999999991, 0.70000000000000007,
0.69813170079773179 },
- { 0.77889207804122873, -0.40000000000000002, 0.69999999999999996,
+ { 1.0778155987523672, -0.39999999999999991, 0.70000000000000007,
0.87266462599716477 },
- { 0.90468169720957992, -0.40000000000000002, 0.69999999999999996,
+ { 1.4272018169896268, -0.39999999999999991, 0.70000000000000007,
1.0471975511965976 },
- { 1.0236847823692916, -0.40000000000000002, 0.69999999999999996,
+ { 1.8684377907453380, -0.39999999999999991, 0.70000000000000007,
1.2217304763960306 },
- { 1.1382465247425166, -0.40000000000000002, 0.69999999999999996,
+ { 2.4128677409207469, -0.39999999999999991, 0.70000000000000007,
1.3962634015954636 },
- { 1.2506255923253344, -0.40000000000000002, 0.69999999999999996,
+ { 3.0327078743873241, -0.39999999999999991, 0.70000000000000007,
1.5707963267948966 },
};
const double toler058 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002, nu=0.80000000000000004.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 6.6611561645571024e-16
+// Test data for k=-0.39999999999999991, nu=0.80000000000000004.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.5727642219519274e-16
+// mean(f - f_Boost): 2.1926904736346843e-16
+// variance(f - f_Boost): 1.5293405480859847e-31
+// stddev(f - f_Boost): 3.9106783913868252e-16
const testcase_ellint_3<double>
data059[10] =
{
- { 0.0000000000000000, -0.40000000000000002, 0.80000000000000004,
+ { 0.0000000000000000, -0.39999999999999991, 0.80000000000000004,
0.0000000000000000 },
- { 0.17328307694277154, -0.40000000000000002, 0.80000000000000004,
+ { 0.17610616300487833, -0.39999999999999991, 0.80000000000000004,
0.17453292519943295 },
- { 0.33964091800132007, -0.40000000000000002, 0.80000000000000004,
+ { 0.36199013167171978, -0.39999999999999991, 0.80000000000000004,
0.34906585039886590 },
- { 0.49452889372467440, -0.40000000000000002, 0.80000000000000004,
+ { 0.56923097361842423, -0.39999999999999991, 0.80000000000000004,
0.52359877559829882 },
- { 0.63652940095937316, -0.40000000000000002, 0.80000000000000004,
+ { 0.81354878456624347, -0.39999999999999991, 0.80000000000000004,
0.69813170079773179 },
- { 0.76659772511159097, -0.40000000000000002, 0.80000000000000004,
+ { 1.1182902719261825, -0.39999999999999991, 0.80000000000000004,
0.87266462599716477 },
- { 0.88691047977338111, -0.40000000000000002, 0.80000000000000004,
+ { 1.5192950589409022, -0.39999999999999991, 0.80000000000000004,
1.0471975511965976 },
- { 1.0000273200611638, -0.40000000000000002, 0.80000000000000004,
+ { 2.0678761710223981, -0.39999999999999991, 0.80000000000000004,
1.2217304763960306 },
- { 1.1084787902188009, -0.40000000000000002, 0.80000000000000004,
+ { 2.8135222249879783, -0.39999999999999991, 0.80000000000000004,
1.3962634015954636 },
- { 1.2146499565727209, -0.40000000000000002, 0.80000000000000004,
+ { 3.7289548002199902, -0.39999999999999991, 0.80000000000000004,
1.5707963267948966 },
};
const double toler059 = 2.5000000000000020e-13;
-// Test data for k=-0.40000000000000002, nu=0.90000000000000002.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.6376730823308004e-16
+// Test data for k=-0.39999999999999991, nu=0.90000000000000002.
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.0221626338023938e-16
+// mean(f - f_Boost): 4.1910919179599658e-16
+// variance(f - f_Boost): 6.2246150910247033e-31
+// stddev(f - f_Boost): 7.8896229891070860e-16
const testcase_ellint_3<double>
data060[10] =
{
- { 0.0000000000000000, -0.40000000000000002, 0.90000000000000002,
+ { 0.0000000000000000, -0.39999999999999991, 0.90000000000000002,
0.0000000000000000 },
- { 0.17311196891868127, -0.40000000000000002, 0.90000000000000002,
+ { 0.17628815191971123, -0.39999999999999991, 0.90000000000000002,
0.17453292519943295 },
- { 0.33840055664911906, -0.40000000000000002, 0.90000000000000002,
+ { 0.36356903815378772, -0.39999999999999991, 0.90000000000000002,
0.34906585039886590 },
- { 0.49091013944075329, -0.40000000000000002, 0.90000000000000002,
+ { 0.57536079447000310, -0.39999999999999991, 0.90000000000000002,
0.52359877559829882 },
- { 0.62932228186809580, -0.40000000000000002, 0.90000000000000002,
+ { 0.83141355850172571, -0.39999999999999991, 0.90000000000000002,
0.69813170079773179 },
- { 0.75492278323019801, -0.40000000000000002, 0.90000000000000002,
+ { 1.1646481598721361, -0.39999999999999991, 0.90000000000000002,
0.87266462599716477 },
- { 0.87021659043854294, -0.40000000000000002, 0.90000000000000002,
+ { 1.6357275034001995, -0.39999999999999991, 0.90000000000000002,
1.0471975511965976 },
- { 0.97800245228239246, -0.40000000000000002, 0.90000000000000002,
+ { 2.3628787566572398, -0.39999999999999991, 0.90000000000000002,
1.2217304763960306 },
- { 1.0809625773173697, -0.40000000000000002, 0.90000000000000002,
+ { 3.5521010369134958, -0.39999999999999991, 0.90000000000000002,
1.3962634015954636 },
- { 1.1815758115929846, -0.40000000000000002, 0.90000000000000002,
+ { 5.3055535102872513, -0.39999999999999991, 0.90000000000000002,
1.5707963267948966 },
};
const double toler060 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004, nu=0.0000000000000000.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.3361874537309281e-16
+// Test data for k=-0.29999999999999993, nu=0.0000000000000000.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.2241249691539529e-16
+// mean(f - f_Boost): 4.9960036108132046e-17
+// variance(f - f_Boost): 4.6872855002064458e-32
+// stddev(f - f_Boost): 2.1650139722889657e-16
const testcase_ellint_3<double>
data061[10] =
{
- { 0.0000000000000000, -0.30000000000000004, 0.0000000000000000,
+ { 0.0000000000000000, -0.29999999999999993, 0.0000000000000000,
0.0000000000000000 },
- { 0.17461228653000099, -0.30000000000000004, 0.0000000000000000,
+ { 0.17461228653000099, -0.29999999999999993, 0.0000000000000000,
0.17453292519943295 },
- { 0.34969146102798415, -0.30000000000000004, 0.0000000000000000,
+ { 0.34969146102798421, -0.29999999999999993, 0.0000000000000000,
0.34906585039886590 },
- { 0.52565822873726320, -0.30000000000000004, 0.0000000000000000,
+ { 0.52565822873726309, -0.29999999999999993, 0.0000000000000000,
0.52359877559829882 },
- { 0.70284226512408532, -0.30000000000000004, 0.0000000000000000,
+ { 0.70284226512408543, -0.29999999999999993, 0.0000000000000000,
0.69813170079773179 },
- { 0.88144139195111182, -0.30000000000000004, 0.0000000000000000,
+ { 0.88144139195111171, -0.29999999999999993, 0.0000000000000000,
0.87266462599716477 },
- { 1.0614897067260520, -0.30000000000000004, 0.0000000000000000,
+ { 1.0614897067260520, -0.29999999999999993, 0.0000000000000000,
1.0471975511965976 },
- { 1.2428416824174218, -0.30000000000000004, 0.0000000000000000,
+ { 1.2428416824174220, -0.29999999999999993, 0.0000000000000000,
1.2217304763960306 },
- { 1.4251795877015927, -0.30000000000000004, 0.0000000000000000,
+ { 1.4251795877015929, -0.29999999999999993, 0.0000000000000000,
1.3962634015954636 },
- { 1.6080486199305128, -0.30000000000000004, 0.0000000000000000,
+ { 1.6080486199305126, -0.29999999999999993, 0.0000000000000000,
1.5707963267948966 },
};
const double toler061 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004, nu=0.10000000000000001.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.3908043711907203e-16
+// Test data for k=-0.29999999999999993, nu=0.10000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1872304407982844e-16
+// mean(f - f_Boost): 9.4368957093138303e-17
+// variance(f - f_Boost): 4.0359883022230488e-32
+// stddev(f - f_Boost): 2.0089769292411121e-16
const testcase_ellint_3<double>
data062[10] =
{
- { 0.0000000000000000, -0.30000000000000004, 0.10000000000000001,
+ { 0.0000000000000000, -0.29999999999999993, 0.10000000000000001,
0.0000000000000000 },
- { 0.17443631884814376, -0.30000000000000004, 0.10000000000000001,
+ { 0.17478889331392972, -0.29999999999999993, 0.10000000000000001,
0.17453292519943295 },
- { 0.34831316835124926, -0.30000000000000004, 0.10000000000000001,
+ { 0.35108939018329183, -0.29999999999999993, 0.10000000000000001,
0.34906585039886590 },
- { 0.52116586276523857, -0.30000000000000004, 0.10000000000000001,
+ { 0.53028990896115835, -0.29999999999999993, 0.10000000000000001,
0.52359877559829882 },
- { 0.69269385837910036, -0.30000000000000004, 0.10000000000000001,
+ { 0.71352417052371409, -0.29999999999999993, 0.10000000000000001,
0.69813170079773179 },
- { 0.86279023163070856, -0.30000000000000004, 0.10000000000000001,
+ { 0.90153086032405894, -0.29999999999999993, 0.10000000000000001,
0.87266462599716477 },
- { 1.0315321461438263, -0.30000000000000004, 0.10000000000000001,
+ { 1.0945187977283313, -0.29999999999999993, 0.10000000000000001,
1.0471975511965976 },
- { 1.1991449111869024, -0.30000000000000004, 0.10000000000000001,
+ { 1.2920699268385680, -0.29999999999999993, 0.10000000000000001,
1.2217304763960306 },
- { 1.3659561780923213, -0.30000000000000004, 0.10000000000000001,
+ { 1.4931243665896394, -0.29999999999999993, 0.10000000000000001,
1.3962634015954636 },
- { 1.5323534693557528, -0.30000000000000004, 0.10000000000000001,
+ { 1.6960848815118226, -0.29999999999999993, 0.10000000000000001,
1.5707963267948966 },
};
const double toler062 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004, nu=0.20000000000000001.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.4447238179454079e-16
+// Test data for k=-0.29999999999999993, nu=0.20000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.2247497610332889e-16
+// mean(f - f_Boost): 1.1102230246251565e-16
+// variance(f - f_Boost): 3.8043060629871325e-32
+// stddev(f - f_Boost): 1.9504630380981672e-16
const testcase_ellint_3<double>
data063[10] =
{
- { 0.0000000000000000, -0.30000000000000004, 0.20000000000000001,
+ { 0.0000000000000000, -0.29999999999999993, 0.20000000000000001,
0.0000000000000000 },
- { 0.17426098615372088, -0.30000000000000004, 0.20000000000000001,
+ { 0.17496614335337535, -0.29999999999999993, 0.20000000000000001,
0.17453292519943295 },
- { 0.34695402664689923, -0.30000000000000004, 0.20000000000000001,
+ { 0.35250745937139372, -0.29999999999999993, 0.20000000000000001,
0.34906585039886590 },
- { 0.51680555567038933, -0.30000000000000004, 0.20000000000000001,
+ { 0.53506875002836884, -0.29999999999999993, 0.20000000000000001,
0.52359877559829882 },
- { 0.68303375225260210, -0.30000000000000004, 0.20000000000000001,
+ { 0.72479106622248191, -0.29999999999999993, 0.20000000000000001,
0.69813170079773179 },
- { 0.84540662891295026, -0.30000000000000004, 0.20000000000000001,
+ { 0.92326451535891607, -0.29999999999999993, 0.20000000000000001,
0.87266462599716477 },
- { 1.0041834051646927, -0.30000000000000004, 0.20000000000000001,
+ { 1.1312092060698349, -0.29999999999999993, 0.20000000000000001,
1.0471975511965976 },
- { 1.1599952702345711, -0.30000000000000004, 0.20000000000000001,
+ { 1.3481473154592321, -0.29999999999999993, 0.20000000000000001,
1.2217304763960306 },
- { 1.3137179520499165, -0.30000000000000004, 0.20000000000000001,
+ { 1.5722049569662748, -0.29999999999999993, 0.20000000000000001,
1.3962634015954636 },
- { 1.4663658145259877, -0.30000000000000004, 0.20000000000000001,
+ { 1.8002173372290498, -0.29999999999999993, 0.20000000000000001,
1.5707963267948966 },
};
const double toler063 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004, nu=0.29999999999999999.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.4979715256503266e-16
+// Test data for k=-0.29999999999999993, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.1678685180047551e-16
+// mean(f - f_Boost): 1.0547118733938987e-16
+// variance(f - f_Boost): 7.5633408838247182e-32
+// stddev(f - f_Boost): 2.7501528837184157e-16
const testcase_ellint_3<double>
data064[10] =
{
- { 0.0000000000000000, -0.30000000000000004, 0.29999999999999999,
+ { 0.0000000000000000, -0.29999999999999993, 0.30000000000000004,
0.0000000000000000 },
- { 0.17408628437042842, -0.30000000000000004, 0.29999999999999999,
+ { 0.17514404084107435, -0.29999999999999993, 0.30000000000000004,
0.17453292519943295 },
- { 0.34561356761638401, -0.30000000000000004, 0.29999999999999999,
+ { 0.35394619108645647, -0.29999999999999993, 0.30000000000000004,
0.34906585039886590 },
- { 0.51257058617875850, -0.30000000000000004, 0.29999999999999999,
+ { 0.54000325463372689, -0.29999999999999993, 0.30000000000000004,
0.52359877559829882 },
- { 0.67382207124602878, -0.30000000000000004, 0.29999999999999999,
+ { 0.73670193794067651, -0.29999999999999993, 0.30000000000000004,
0.69813170079773179 },
- { 0.82914751587825131, -0.30000000000000004, 0.29999999999999999,
+ { 0.94689345491722177, -0.29999999999999993, 0.30000000000000004,
0.87266462599716477 },
- { 0.97907434814374938, -0.30000000000000004, 0.29999999999999999,
+ { 1.1723274608389140, -0.29999999999999993, 0.30000000000000004,
1.0471975511965976 },
- { 1.1246399297351584, -0.30000000000000004, 0.29999999999999999,
+ { 1.4128880552936287, -0.29999999999999993, 0.30000000000000004,
1.2217304763960306 },
- { 1.2671793970398149, -0.30000000000000004, 0.29999999999999999,
+ { 1.6659010047449661, -0.29999999999999993, 0.30000000000000004,
1.3962634015954636 },
- { 1.4081767433479091, -0.30000000000000004, 0.29999999999999999,
+ { 1.9260216862473254, -0.29999999999999993, 0.30000000000000004,
1.5707963267948966 },
};
const double toler064 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004, nu=0.40000000000000002.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.5505716921759864e-16
+// Test data for k=-0.29999999999999993, nu=0.40000000000000002.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.3983279132797385e-16
+// mean(f - f_Boost): 1.1657341758564144e-16
+// variance(f - f_Boost): 1.8245832308692586e-31
+// stddev(f - f_Boost): 4.2715140534349863e-16
const testcase_ellint_3<double>
data065[10] =
{
- { 0.0000000000000000, -0.30000000000000004, 0.40000000000000002,
+ { 0.0000000000000000, -0.29999999999999993, 0.40000000000000002,
0.0000000000000000 },
- { 0.17391220945982727, -0.30000000000000004, 0.40000000000000002,
+ { 0.17532259000954434, -0.29999999999999993, 0.40000000000000002,
0.17453292519943295 },
- { 0.34429133937639689, -0.30000000000000004, 0.40000000000000002,
+ { 0.35540612770983693, -0.29999999999999993, 0.40000000000000002,
0.34906585039886590 },
- { 0.50845471668581632, -0.30000000000000004, 0.40000000000000002,
+ { 0.54510265552938919, -0.29999999999999993, 0.40000000000000002,
0.52359877559829882 },
- { 0.66502347027873854, -0.30000000000000004, 0.40000000000000002,
+ { 0.74932476310965057, -0.29999999999999993, 0.40000000000000002,
0.69813170079773179 },
- { 0.81389191978012254, -0.30000000000000004, 0.40000000000000002,
+ { 0.97272793583093109, -0.29999999999999993, 0.40000000000000002,
0.87266462599716477 },
- { 0.95590618002140570, -0.30000000000000004, 0.40000000000000002,
+ { 1.2188928987074241, -0.29999999999999993, 0.40000000000000002,
1.0471975511965976 },
- { 1.0924915195213121, -0.30000000000000004, 0.40000000000000002,
+ { 1.4888771674085941, -0.29999999999999993, 0.40000000000000002,
1.2217304763960306 },
- { 1.2253651604038061, -0.30000000000000004, 0.40000000000000002,
+ { 1.7794558498219191, -0.29999999999999993, 0.40000000000000002,
1.3962634015954636 },
- { 1.3563643538969763, -0.30000000000000004, 0.40000000000000002,
+ { 2.0822121773175528, -0.29999999999999993, 0.40000000000000002,
1.5707963267948966 },
};
const double toler065 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004, nu=0.50000000000000000.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.7807908859023716e-16
+// Test data for k=-0.29999999999999993, nu=0.50000000000000000.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.0516138451673425e-16
+// mean(f - f_Boost): 4.7184478546569152e-17
+// variance(f - f_Boost): 1.9448563670505968e-32
+// stddev(f - f_Boost): 1.3945810722401896e-16
const testcase_ellint_3<double>
data066[10] =
{
- { 0.0000000000000000, -0.30000000000000004, 0.50000000000000000,
+ { 0.0000000000000000, -0.29999999999999993, 0.50000000000000000,
0.0000000000000000 },
- { 0.17373875742088232, -0.30000000000000004, 0.50000000000000000,
+ { 0.17550179513158179, -0.29999999999999993, 0.50000000000000000,
0.17453292519943295 },
- { 0.34298690571124157, -0.30000000000000004, 0.50000000000000000,
+ { 0.35688783251681200, -0.29999999999999993, 0.50000000000000000,
0.34906585039886590 },
- { 0.50445214859646936, -0.30000000000000004, 0.50000000000000000,
+ { 0.55037700010142798, -0.29999999999999993, 0.50000000000000000,
0.52359877559829882 },
- { 0.65660648352418516, -0.30000000000000004, 0.50000000000000000,
+ { 0.76273839789895992, -0.29999999999999993, 0.50000000000000000,
0.69813170079773179 },
- { 0.79953670639287289, -0.30000000000000004, 0.50000000000000000,
+ { 1.0011570518830419, -0.29999999999999993, 0.50000000000000000,
0.87266462599716477 },
- { 0.93443393926588536, -0.30000000000000004, 0.50000000000000000,
+ { 1.2722987414055109, -0.29999999999999993, 0.50000000000000000,
1.0471975511965976 },
- { 1.0630838369016911, -0.30000000000000004, 0.50000000000000000,
+ { 1.5799590511080066, -0.29999999999999993, 0.50000000000000000,
1.2217304763960306 },
- { 1.1875197325653029, -0.30000000000000004, 0.50000000000000000,
+ { 1.9212367220124293, -0.29999999999999993, 0.50000000000000000,
1.3962634015954636 },
- { 1.3098448759814962, -0.30000000000000004, 0.50000000000000000,
+ { 2.2833505881933971, -0.29999999999999993, 0.50000000000000000,
1.5707963267948966 },
};
const double toler066 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004, nu=0.59999999999999998.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.0057999499931649e-16
+// Test data for k=-0.29999999999999993, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.2121157428443725e-16
+// mean(f - f_Boost): 1.9428902930940239e-16
+// variance(f - f_Boost): 1.5987596229703424e-31
+// stddev(f - f_Boost): 3.9984492281012430e-16
const testcase_ellint_3<double>
data067[10] =
{
- { 0.0000000000000000, -0.30000000000000004, 0.59999999999999998,
+ { 0.0000000000000000, -0.29999999999999993, 0.60000000000000009,
0.0000000000000000 },
- { 0.17356592428950823, -0.30000000000000004, 0.59999999999999998,
+ { 0.17568166052076745, -0.29999999999999993, 0.60000000000000009,
0.17453292519943295 },
- { 0.34169984536697379, -0.30000000000000004, 0.59999999999999998,
+ { 0.35839189074731181, -0.29999999999999993, 0.60000000000000009,
0.34906585039886590 },
- { 0.50055748266498457, -0.30000000000000004, 0.59999999999999998,
+ { 0.55583724744367558, -0.29999999999999993, 0.60000000000000009,
0.52359877559829882 },
- { 0.64854298527106768, -0.30000000000000004, 0.59999999999999998,
+ { 0.77703498090888223, -0.29999999999999993, 0.60000000000000009,
0.69813170079773179 },
- { 0.78599329284207431, -0.30000000000000004, 0.59999999999999998,
+ { 1.0326772113675962, -0.29999999999999993, 0.60000000000000009,
0.87266462599716477 },
- { 0.91445452089128199, -0.30000000000000004, 0.59999999999999998,
+ { 1.3345139983717369, -0.29999999999999993, 0.60000000000000009,
1.0471975511965976 },
- { 1.0360412952290587, -0.30000000000000004, 0.59999999999999998,
+ { 1.6921742922838403, -0.29999999999999993, 0.60000000000000009,
1.2217304763960306 },
- { 1.1530473919778641, -0.30000000000000004, 0.59999999999999998,
+ { 2.1056608968472186, -0.29999999999999993, 0.60000000000000009,
1.3962634015954636 },
- { 1.2677758800420669, -0.30000000000000004, 0.59999999999999998,
+ { 2.5560975528589061, -0.29999999999999993, 0.60000000000000009,
1.5707963267948966 },
};
const double toler067 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004, nu=0.69999999999999996.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.2239502844122443e-16
+// Test data for k=-0.29999999999999993, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.0088945789059381e-16
+// mean(f - f_Boost): 1.6653345369377348e-16
+// variance(f - f_Boost): 3.1994213989721786e-31
+// stddev(f - f_Boost): 5.6563428104846852e-16
const testcase_ellint_3<double>
data068[10] =
{
- { 0.0000000000000000, -0.30000000000000004, 0.69999999999999996,
+ { 0.0000000000000000, -0.29999999999999993, 0.70000000000000007,
0.0000000000000000 },
- { 0.17339370613812224, -0.30000000000000004, 0.69999999999999996,
+ { 0.17586219053197988, -0.29999999999999993, 0.70000000000000007,
0.17453292519943295 },
- { 0.34042975138455933, -0.30000000000000004, 0.69999999999999996,
+ { 0.35991891074557669, -0.29999999999999993, 0.70000000000000007,
0.34906585039886590 },
- { 0.49676568368075985, -0.30000000000000004, 0.69999999999999996,
+ { 0.56149538019961731, -0.29999999999999993, 0.70000000000000007,
0.52359877559829882 },
- { 0.64080774055753720, -0.30000000000000004, 0.69999999999999996,
+ { 0.79232303189667685, -0.29999999999999993, 0.70000000000000007,
0.69813170079773179 },
- { 0.77318507779667278, -0.30000000000000004, 0.69999999999999996,
+ { 1.0679345542878826, -0.29999999999999993, 0.70000000000000007,
0.87266462599716477 },
- { 0.89579782346548609, -0.30000000000000004, 0.69999999999999996,
+ { 1.4084400085913955, -0.29999999999999993, 0.70000000000000007,
1.0471975511965976 },
- { 1.0110573286052202, -0.30000000000000004, 0.69999999999999996,
+ { 1.8357382859296454, -0.29999999999999993, 0.70000000000000007,
1.2217304763960306 },
- { 1.1214710972949635, -0.30000000000000004, 0.69999999999999996,
+ { 2.3604197996171519, -0.29999999999999993, 0.70000000000000007,
1.3962634015954636 },
- { 1.2294913236274982, -0.30000000000000004, 0.69999999999999996,
+ { 2.9562123549913872, -0.29999999999999993, 0.70000000000000007,
1.5707963267948966 },
};
const double toler068 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004, nu=0.80000000000000004.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.4358357000101250e-16
+// Test data for k=-0.29999999999999993, nu=0.80000000000000004.
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.1197887707781618e-16
+// mean(f - f_Boost): 3.4416913763379854e-16
+// variance(f - f_Boost): 4.3461914185990199e-31
+// stddev(f - f_Boost): 6.5925650687718054e-16
const testcase_ellint_3<double>
data069[10] =
{
- { 0.0000000000000000, -0.30000000000000004, 0.80000000000000004,
+ { 0.0000000000000000, -0.29999999999999993, 0.80000000000000004,
0.0000000000000000 },
- { 0.17322209907520358, -0.30000000000000004, 0.80000000000000004,
+ { 0.17604338956191670, -0.29999999999999993, 0.80000000000000004,
0.17453292519943295 },
- { 0.33917623046949996, -0.30000000000000004, 0.80000000000000004,
+ { 0.36146952517410791, -0.29999999999999993, 0.80000000000000004,
0.34906585039886590 },
- { 0.49307204894329176, -0.30000000000000004, 0.80000000000000004,
+ { 0.56736453393774644, -0.29999999999999993, 0.80000000000000004,
0.52359877559829882 },
- { 0.63337802830291734, -0.30000000000000004, 0.80000000000000004,
+ { 0.80873149979001091, -0.29999999999999993, 0.80000000000000004,
0.69813170079773179 },
- { 0.76104540997689407, -0.30000000000000004, 0.80000000000000004,
+ { 1.1077903069860620, -0.29999999999999993, 0.80000000000000004,
0.87266462599716477 },
- { 0.87832009635450714, -0.30000000000000004, 0.80000000000000004,
+ { 1.4985874311132998, -0.29999999999999993, 0.80000000000000004,
1.0471975511965976 },
- { 0.98787879723171790, -0.30000000000000004, 0.80000000000000004,
+ { 2.0298167266724954, -0.29999999999999993, 0.80000000000000004,
1.2217304763960306 },
- { 1.0924036340069339, -0.30000000000000004, 0.80000000000000004,
+ { 2.7483929054985432, -0.29999999999999993, 0.80000000000000004,
1.3962634015954636 },
- { 1.1944567571590048, -0.30000000000000004, 0.80000000000000004,
+ { 3.6283050484567170, -0.29999999999999993, 0.80000000000000004,
1.5707963267948966 },
};
const double toler069 = 2.5000000000000020e-13;
-// Test data for k=-0.30000000000000004, nu=0.90000000000000002.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.6419688299804087e-16
+// Test data for k=-0.29999999999999993, nu=0.90000000000000002.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.1301806687926828e-16
+// mean(f - f_Boost): 4.1633363423443370e-16
+// variance(f - f_Boost): 2.2835347143080263e-31
+// stddev(f - f_Boost): 4.7786344433405093e-16
const testcase_ellint_3<double>
data070[10] =
{
- { 0.0000000000000000, -0.30000000000000004, 0.90000000000000002,
+ { 0.0000000000000000, -0.29999999999999993, 0.90000000000000002,
0.0000000000000000 },
- { 0.17305109924485945, -0.30000000000000004, 0.90000000000000002,
+ { 0.17622526204962433, -0.29999999999999993, 0.90000000000000002,
0.17453292519943295 },
- { 0.33793890239556984, -0.30000000000000004, 0.90000000000000002,
+ { 0.36304439230777141, -0.29999999999999993, 0.90000000000000002,
0.34906585039886590 },
- { 0.48947218005089738, -0.30000000000000004, 0.90000000000000002,
+ { 0.57345914744719195, -0.29999999999999993, 0.90000000000000002,
0.52359877559829882 },
- { 0.62623332340775151, -0.30000000000000004, 0.90000000000000002,
+ { 0.82641512928845162, -0.29999999999999993, 0.90000000000000002,
0.69813170079773179 },
- { 0.74951596581511148, -0.30000000000000004, 0.90000000000000002,
+ { 1.1534256210757743, -0.29999999999999993, 0.90000000000000002,
0.87266462599716477 },
- { 0.86189886597755994, -0.30000000000000004, 0.90000000000000002,
+ { 1.6124900353411677, -0.29999999999999993, 0.90000000000000002,
1.0471975511965976 },
- { 0.96629451153092005, -0.30000000000000004, 0.90000000000000002,
+ { 2.3165905514845089, -0.29999999999999993, 0.90000000000000002,
1.2217304763960306 },
- { 1.0655269133492682, -0.30000000000000004, 0.90000000000000002,
+ { 3.4625619526539824, -0.29999999999999993, 0.90000000000000002,
1.3962634015954636 },
- { 1.1622376896064914, -0.30000000000000004, 0.90000000000000002,
+ { 5.1479514944016787, -0.29999999999999993, 0.90000000000000002,
1.5707963267948966 },
};
const double toler070 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.0000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2156475739151676e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 4.2156475739151676e-16
+// mean(f - f_Boost): -5.2735593669694933e-17
+// variance(f - f_Boost): 3.0473442641042680e-32
+// stddev(f - f_Boost): 1.7456644190978597e-16
const testcase_ellint_3<double>
data071[10] =
{
{ 0.0000000000000000, -0.19999999999999996, 0.0000000000000000,
0.0000000000000000 },
- { 0.17456817290292809, -0.19999999999999996, 0.0000000000000000,
+ { 0.17456817290292806, -0.19999999999999996, 0.0000000000000000,
0.17453292519943295 },
- { 0.34934315932086801, -0.19999999999999996, 0.0000000000000000,
+ { 0.34934315932086796, -0.19999999999999996, 0.0000000000000000,
0.34906585039886590 },
{ 0.52450880529443988, -0.19999999999999996, 0.0000000000000000,
0.52359877559829882 },
- { 0.70020491009844876, -0.19999999999999996, 0.0000000000000000,
+ { 0.70020491009844887, -0.19999999999999996, 0.0000000000000000,
0.69813170079773179 },
- { 0.87651006649967955, -0.19999999999999996, 0.0000000000000000,
+ { 0.87651006649967977, -0.19999999999999996, 0.0000000000000000,
0.87266462599716477 },
{ 1.0534305870298994, -0.19999999999999996, 0.0000000000000000,
1.0471975511965976 },
- { 1.2308975521670784, -0.19999999999999996, 0.0000000000000000,
+ { 1.2308975521670789, -0.19999999999999996, 0.0000000000000000,
1.2217304763960306 },
{ 1.4087733584990738, -0.19999999999999996, 0.0000000000000000,
1.3962634015954636 },
- { 1.5868678474541660, -0.19999999999999996, 0.0000000000000000,
+ { 1.5868678474541662, -0.19999999999999996, 0.0000000000000000,
1.5707963267948966 },
};
const double toler071 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.10000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3374593253183472e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 4.0890622182605400e-16
+// mean(f - f_Boost): -3.8857805861880476e-17
+// variance(f - f_Boost): 2.8794792590749608e-32
+// stddev(f - f_Boost): 1.6969028431454054e-16
const testcase_ellint_3<double>
data072[10] =
{
{ 0.0000000000000000, -0.19999999999999996, 0.10000000000000001,
0.0000000000000000 },
- { 0.17439228502691748, -0.19999999999999996, 0.10000000000000001,
+ { 0.17474469953608965, -0.19999999999999996, 0.10000000000000001,
0.17453292519943295 },
- { 0.34796731137565740, -0.19999999999999996, 0.10000000000000001,
+ { 0.35073860234984255, -0.19999999999999996, 0.10000000000000001,
0.34906585039886590 },
- { 0.52003370294544848, -0.19999999999999996, 0.10000000000000001,
+ { 0.52912258712951521, -0.19999999999999996, 0.10000000000000001,
0.52359877559829882 },
- { 0.69012222258631462, -0.19999999999999996, 0.10000000000000001,
+ { 0.71081701558898069, -0.19999999999999996, 0.10000000000000001,
0.69813170079773179 },
- { 0.85803491465566772, -0.19999999999999996, 0.10000000000000001,
+ { 0.89640758521169384, -0.19999999999999996, 0.10000000000000001,
0.87266462599716477 },
- { 1.0238463961099364, -0.19999999999999996, 0.10000000000000001,
+ { 1.0860417038089853, -0.19999999999999996, 0.10000000000000001,
1.0471975511965976 },
- { 1.1878691059202153, -0.19999999999999996, 0.10000000000000001,
+ { 1.2793599255528623, -0.19999999999999996, 0.10000000000000001,
1.2217304763960306 },
- { 1.3505985031831940, -0.19999999999999996, 0.10000000000000001,
+ { 1.4754938544089076, -0.19999999999999996, 0.10000000000000001,
1.3962634015954636 },
- { 1.5126513474261087, -0.19999999999999996, 0.10000000000000001,
+ { 1.6731552050562593, -0.19999999999999996, 0.10000000000000001,
1.5707963267948966 },
};
const double toler072 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.20000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.4549984059502760e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 3.9570963716579749e-16
+// mean(f - f_Boost): -5.8286708792820721e-17
+// variance(f - f_Boost): 3.1158217732380362e-32
+// stddev(f - f_Boost): 1.7651690494788412e-16
const testcase_ellint_3<double>
data073[10] =
{
{ 0.0000000000000000, -0.19999999999999996, 0.20000000000000001,
0.0000000000000000 },
- { 0.17421703179583747, -0.19999999999999996, 0.20000000000000001,
+ { 0.17492186907740698, -0.19999999999999996, 0.20000000000000001,
0.17453292519943295 },
- { 0.34661057411998791, -0.19999999999999996, 0.20000000000000001,
+ { 0.35215414286134267, -0.19999999999999996, 0.20000000000000001,
0.34906585039886590 },
- { 0.51569006052647393, -0.19999999999999996, 0.20000000000000001,
+ { 0.53388285615182440, -0.19999999999999996, 0.20000000000000001,
0.52359877559829882 },
- { 0.68052412821107244, -0.19999999999999996, 0.20000000000000001,
+ { 0.72200960282688265, -0.19999999999999996, 0.20000000000000001,
0.69813170079773179 },
- { 0.84081341263313825, -0.19999999999999996, 0.20000000000000001,
+ { 0.91793087614428526, -0.19999999999999996, 0.20000000000000001,
0.87266462599716477 },
- { 0.99683359988842890, -0.19999999999999996, 0.20000000000000001,
+ { 1.1222602841587976, -0.19999999999999996, 0.20000000000000001,
1.0471975511965976 },
- { 1.1493086715118852, -0.19999999999999996, 0.20000000000000001,
+ { 1.3345489407496247, -0.19999999999999996, 0.20000000000000001,
1.2217304763960306 },
- { 1.2992699693957541, -0.19999999999999996, 0.20000000000000001,
+ { 1.5531225705475502, -0.19999999999999996, 0.20000000000000001,
1.3962634015954636 },
- { 1.4479323932249564, -0.19999999999999996, 0.20000000000000001,
+ { 1.7751816279738935, -0.19999999999999996, 0.20000000000000001,
1.5707963267948966 },
};
const double toler073 = 2.5000000000000020e-13;
-// Test data for k=-0.19999999999999996, nu=0.29999999999999999.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.3140668101543467e-16
+// Test data for k=-0.19999999999999996, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.6785817924053817e-16
+// mean(f - f_Boost): -1.1102230246251566e-17
+// variance(f - f_Boost): 9.9840208317034302e-32
+// stddev(f - f_Boost): 3.1597501217190311e-16
const testcase_ellint_3<double>
data074[10] =
{
- { 0.0000000000000000, -0.19999999999999996, 0.29999999999999999,
+ { 0.0000000000000000, -0.19999999999999996, 0.30000000000000004,
0.0000000000000000 },
- { 0.17404240913577704, -0.19999999999999996, 0.29999999999999999,
+ { 0.17509968571715159, -0.19999999999999996, 0.30000000000000004,
0.17453292519943295 },
- { 0.34527248032587193, -0.19999999999999996, 0.29999999999999999,
+ { 0.35359030214835629, -0.19999999999999996, 0.30000000000000004,
0.34906585039886590 },
- { 0.51147118981668416, -0.19999999999999996, 0.29999999999999999,
+ { 0.53879807274537084, -0.19999999999999996, 0.30000000000000004,
0.52359877559829882 },
- { 0.67137107867777601, -0.19999999999999996, 0.29999999999999999,
+ { 0.73384116418059731, -0.19999999999999996, 0.30000000000000004,
0.69813170079773179 },
- { 0.82470418188668893, -0.19999999999999996, 0.29999999999999999,
+ { 0.94132799329524031, -0.19999999999999996, 0.30000000000000004,
0.87266462599716477 },
- { 0.97202873223594299, -0.19999999999999996, 0.29999999999999999,
+ { 1.1628407021801439, -0.19999999999999996, 0.30000000000000004,
1.0471975511965976 },
- { 1.1144773569375266, -0.19999999999999996, 0.29999999999999999,
+ { 1.3982440216739438, -0.19999999999999996, 0.30000000000000004,
1.2217304763960306 },
- { 1.2535292433701000, -0.19999999999999996, 0.29999999999999999,
+ { 1.6450634983653640, -0.19999999999999996, 0.30000000000000004,
1.3962634015954636 },
- { 1.3908453514752477, -0.19999999999999996, 0.29999999999999999,
+ { 1.8983924169967099, -0.19999999999999996, 0.30000000000000004,
1.5707963267948966 },
};
const double toler074 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.40000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.6788709752760483e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.3298410018355870e-16
+// mean(f - f_Boost): 1.3877787807814457e-17
+// variance(f - f_Boost): 9.4370567274974557e-32
+// stddev(f - f_Boost): 3.0719792850046133e-16
const testcase_ellint_3<double>
data075[10] =
{
{ 0.0000000000000000, -0.19999999999999996, 0.40000000000000002,
0.0000000000000000 },
- { 0.17386841301066674, -0.19999999999999996, 0.40000000000000002,
+ { 0.17527815368535152, -0.19999999999999996, 0.40000000000000002,
0.17453292519943295 },
- { 0.34395257914113253, -0.19999999999999996, 0.40000000000000002,
+ { 0.35504762134297801, -0.19999999999999996, 0.40000000000000002,
0.34906585039886590 },
- { 0.50737088376869466, -0.19999999999999996, 0.40000000000000002,
+ { 0.54387742353211344, -0.19999999999999996, 0.40000000000000002,
0.52359877559829882 },
- { 0.66262801717277631, -0.19999999999999996, 0.40000000000000002,
+ { 0.74637910471804259, -0.19999999999999996, 0.40000000000000002,
0.69813170079773179 },
- { 0.80958766645079094, -0.19999999999999996, 0.40000000000000002,
+ { 0.96690539714174639, -0.19999999999999996, 0.40000000000000002,
0.87266462599716477 },
- { 0.94913754236162040, -0.19999999999999996, 0.40000000000000002,
+ { 1.2087859420184757, -0.19999999999999996, 0.40000000000000002,
1.0471975511965976 },
- { 1.0827985514222997, -0.19999999999999996, 0.40000000000000002,
+ { 1.4729799844168852, -0.19999999999999996, 0.40000000000000002,
1.2217304763960306 },
- { 1.2124212429050478, -0.19999999999999996, 0.40000000000000002,
+ { 1.7564445064596661, -0.19999999999999996, 0.40000000000000002,
1.3962634015954636 },
- { 1.3400002519661005, -0.19999999999999996, 0.40000000000000002,
+ { 2.0512956926676802, -0.19999999999999996, 0.40000000000000002,
1.5707963267948966 },
};
const double toler075 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.50000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.7788201301356829e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.3841806057292116e-16
+// mean(f - f_Boost): 8.0491169285323847e-17
+// variance(f - f_Boost): 8.0538110429953348e-32
+// stddev(f - f_Boost): 2.8379237204328335e-16
const testcase_ellint_3<double>
data076[10] =
{
{ 0.0000000000000000, -0.19999999999999996, 0.50000000000000000,
0.0000000000000000 },
- { 0.17369503942181799, -0.19999999999999996, 0.50000000000000000,
+ { 0.17545727725228877, -0.19999999999999996, 0.50000000000000000,
0.17453292519943295 },
- { 0.34265043534362660, -0.19999999999999996, 0.50000000000000000,
+ { 0.35652666242062175, -0.19999999999999996, 0.50000000000000000,
0.34906585039886590 },
- { 0.50338337208655415, -0.19999999999999996, 0.50000000000000000,
+ { 0.54913090549102406, -0.19999999999999996, 0.50000000000000000,
0.52359877559829882 },
- { 0.65426373297163609, -0.19999999999999996, 0.50000000000000000,
+ { 0.75970161209211551, -0.19999999999999996, 0.50000000000000000,
0.69813170079773179 },
- { 0.79536193036145808, -0.19999999999999996, 0.50000000000000000,
+ { 0.99504737401590326, -0.19999999999999996, 0.50000000000000000,
0.87266462599716477 },
- { 0.92791875910061605, -0.19999999999999996, 0.50000000000000000,
+ { 1.2614666007124373, -0.19999999999999996, 0.50000000000000000,
1.0471975511965976 },
- { 1.0538145052725829, -0.19999999999999996, 0.50000000000000000,
+ { 1.5625255355205496, -0.19999999999999996, 0.50000000000000000,
1.2217304763960306 },
- { 1.1752060022875899, -0.19999999999999996, 0.50000000000000000,
+ { 1.8954460255613343, -0.19999999999999996, 0.50000000000000000,
1.3962634015954636 },
- { 1.2943374404397372, -0.19999999999999996, 0.50000000000000000,
+ { 2.2481046259421302, -0.19999999999999996, 0.50000000000000000,
1.5707963267948966 },
};
const double toler076 = 2.5000000000000020e-13;
-// Test data for k=-0.19999999999999996, nu=0.59999999999999998.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.8899223779598256e-16
+// Test data for k=-0.19999999999999996, nu=0.60000000000000009.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.5317584994994743e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 1.0045745697575397e-31
+// stddev(f - f_Boost): 3.1695024369095219e-16
const testcase_ellint_3<double>
data077[10] =
{
- { 0.0000000000000000, -0.19999999999999996, 0.59999999999999998,
+ { 0.0000000000000000, -0.19999999999999996, 0.60000000000000009,
0.0000000000000000 },
- { 0.17352228440746925, -0.19999999999999996, 0.59999999999999998,
+ { 0.17563706072900442, -0.19999999999999996, 0.60000000000000009,
0.17453292519943295 },
- { 0.34136562863713626, -0.19999999999999996, 0.59999999999999998,
+ { 0.35802800926807238, -0.19999999999999996, 0.60000000000000009,
0.34906585039886590 },
- { 0.49950328177638481, -0.19999999999999996, 0.59999999999999998,
+ { 0.55456942250515051, -0.19999999999999996, 0.60000000000000009,
0.52359877559829882 },
- { 0.64625032705690799, -0.19999999999999996, 0.59999999999999998,
+ { 0.77390003828438203, -0.19999999999999996, 0.60000000000000009,
0.69813170079773179 },
- { 0.78193941198403083, -0.19999999999999996, 0.59999999999999998,
+ { 1.0262441366366397, -0.19999999999999996, 0.60000000000000009,
0.87266462599716477 },
- { 0.90817230934317128, -0.19999999999999996, 0.59999999999999998,
+ { 1.3228192988439669, -0.19999999999999996, 0.60000000000000009,
1.0471975511965976 },
- { 1.0271563751276462, -0.19999999999999996, 0.59999999999999998,
+ { 1.6728005754680795, -0.19999999999999996, 0.60000000000000009,
1.2217304763960306 },
- { 1.1412999379040518, -0.19999999999999996, 0.59999999999999998,
+ { 2.0761587107468511, -0.19999999999999996, 0.60000000000000009,
1.3962634015954636 },
- { 1.2530330675914556, -0.19999999999999996, 0.59999999999999998,
+ { 2.5148333891629315, -0.19999999999999996, 0.60000000000000009,
1.5707963267948966 },
};
const double toler077 = 2.5000000000000020e-13;
-// Test data for k=-0.19999999999999996, nu=0.69999999999999996.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.9999318361775115e-16
+// Test data for k=-0.19999999999999996, nu=0.70000000000000007.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.1818454249546518e-16
+// mean(f - f_Boost): 3.6082248300317589e-17
+// variance(f - f_Boost): 8.9638010532618564e-32
+// stddev(f - f_Boost): 2.9939607634806868e-16
const testcase_ellint_3<double>
data078[10] =
{
- { 0.0000000000000000, -0.19999999999999996, 0.69999999999999996,
+ { 0.0000000000000000, -0.19999999999999996, 0.70000000000000007,
0.0000000000000000 },
- { 0.17335014404233895, -0.19999999999999996, 0.69999999999999996,
+ { 0.17581750846781172, -0.19999999999999996, 0.70000000000000007,
0.17453292519943295 },
- { 0.34009775298617811, -0.19999999999999996, 0.69999999999999996,
+ { 0.35955226882028513, -0.19999999999999996, 0.70000000000000007,
0.34906585039886590 },
- { 0.49572560201923810, -0.19999999999999996, 0.69999999999999996,
+ { 0.56020489659466499, -0.19999999999999996, 0.70000000000000007,
0.52359877559829882 },
- { 0.63856276669886503, -0.19999999999999996, 0.69999999999999996,
+ { 0.78908196988531487, -0.19999999999999996, 0.70000000000000007,
0.69813170079773179 },
- { 0.76924438644867565, -0.19999999999999996, 0.69999999999999996,
+ { 1.0611336754143517, -0.19999999999999996, 0.70000000000000007,
0.87266462599716477 },
- { 0.88973060843856466, -0.19999999999999996, 0.69999999999999996,
+ { 1.3956969951058884, -0.19999999999999996, 0.70000000000000007,
1.0471975511965976 },
- { 1.0025230471636377, -0.19999999999999996, 0.69999999999999996,
+ { 1.8138131612209609, -0.19999999999999996, 0.70000000000000007,
1.2217304763960306 },
- { 1.1102356376093103, -0.19999999999999996, 0.69999999999999996,
+ { 2.3256365528879561, -0.19999999999999996, 0.70000000000000007,
1.3962634015954636 },
- { 1.2154356555075863, -0.19999999999999996, 0.69999999999999996,
+ { 2.9058704854500963, -0.19999999999999996, 0.70000000000000007,
1.5707963267948966 },
};
const double toler078 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 5.0901276230707249e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.9866614515542431e-16
+// mean(f - f_Boost): 1.8318679906315082e-16
+// variance(f - f_Boost): 3.1335688610218711e-31
+// stddev(f - f_Boost): 5.5978289193417400e-16
const testcase_ellint_3<double>
data079[10] =
{
{ 0.0000000000000000, -0.19999999999999996, 0.80000000000000004,
0.0000000000000000 },
- { 0.17317861443718538, -0.19999999999999996, 0.80000000000000004,
+ { 0.17599862486281712, -0.19999999999999996, 0.80000000000000004,
0.17453292519943295 },
- { 0.33884641598718701, -0.19999999999999996, 0.80000000000000004,
+ { 0.36110007227128776, -0.19999999999999996, 0.80000000000000004,
0.34906585039886590 },
- { 0.49204565281259494, -0.19999999999999996, 0.80000000000000004,
+ { 0.56605039658567224, -0.19999999999999996, 0.80000000000000004,
0.52359877559829882 },
- { 0.63117851188220320, -0.19999999999999996, 0.80000000000000004,
+ { 0.80537523874517691, -0.19999999999999996, 0.80000000000000004,
0.69813170079773179 },
- { 0.75721095949544170, -0.19999999999999996, 0.80000000000000004,
+ { 1.1005662342414086, -0.19999999999999996, 0.80000000000000004,
0.87266462599716477 },
- { 0.87245201443919118, -0.19999999999999996, 0.80000000000000004,
+ { 1.4845340298105778, -0.19999999999999996, 0.80000000000000004,
1.0471975511965976 },
- { 0.97966584238831089, -0.19999999999999996, 0.80000000000000004,
+ { 2.0043332244969392, -0.19999999999999996, 0.80000000000000004,
1.2217304763960306 },
- { 1.0816336325174360, -0.19999999999999996, 0.80000000000000004,
+ { 2.7052856676744761, -0.19999999999999996, 0.80000000000000004,
1.3962634015954636 },
- { 1.1810223448909909, -0.19999999999999996, 0.80000000000000004,
+ { 3.5622166386422629, -0.19999999999999996, 0.80000000000000004,
1.5707963267948966 },
};
const double toler079 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.90000000000000002.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 6.4833128442756722e-16
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.2817178727913890e-16
+// mean(f - f_Boost): 3.4694469519536142e-16
+// variance(f - f_Boost): 6.6311432369155086e-31
+// stddev(f - f_Boost): 8.1431831840598485e-16
const testcase_ellint_3<double>
data080[10] =
{
{ 0.0000000000000000, -0.19999999999999996, 0.90000000000000002,
0.0000000000000000 },
- { 0.17300769173837277, -0.19999999999999996, 0.90000000000000002,
+ { 0.17618041435044951, -0.19999999999999996, 0.90000000000000002,
0.17453292519943295 },
- { 0.33761123827372508, -0.19999999999999996, 0.90000000000000002,
+ { 0.36267207636502929, -0.19999999999999996, 0.90000000000000002,
0.34906585039886590 },
- { 0.48845905690769426, -0.19999999999999996, 0.90000000000000002,
+ { 0.57212028758237743, -0.19999999999999996, 0.90000000000000002,
0.52359877559829882 },
- { 0.62407720017324952, -0.19999999999999996, 0.90000000000000002,
+ { 0.82293323876704483, -0.19999999999999996, 0.90000000000000002,
0.69813170079773179 },
- { 0.74578146525124289, -0.19999999999999996, 0.90000000000000002,
+ { 1.1457077279880385, -0.19999999999999996, 0.90000000000000002,
0.87266462599716477 },
- { 0.85621583540073076, -0.19999999999999996, 0.90000000000000002,
+ { 1.5967346899325681, -0.19999999999999996, 0.90000000000000002,
1.0471975511965976 },
- { 0.95837725988001199, -0.19999999999999996, 0.90000000000000002,
+ { 2.2856537353421724, -0.19999999999999996, 0.90000000000000002,
1.2217304763960306 },
- { 1.0551821412633928, -0.19999999999999996, 0.90000000000000002,
+ { 3.4034714304613902, -0.19999999999999996, 0.90000000000000002,
1.3962634015954636 },
- { 1.1493679916141861, -0.19999999999999996, 0.90000000000000002,
+ { 5.0448269356200361, -0.19999999999999996, 0.90000000000000002,
1.5707963267948966 },
};
const double toler080 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.0000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.1735566504509650e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.1735566504509645e-16
+// mean(f - f_Boost): -3.6082248300317589e-17
+// variance(f - f_Boost): 8.2258607846939269e-33
+// stddev(f - f_Boost): 9.0696531271564778e-17
const testcase_ellint_3<double>
data081[10] =
{
{ 0.0000000000000000, -0.099999999999999978, 0.0000000000000000,
0.0000000000000000 },
- { 0.17454173353063659, -0.099999999999999978, 0.0000000000000000,
+ { 0.17454173353063662, -0.099999999999999978, 0.0000000000000000,
0.17453292519943295 },
- { 0.34913506721468091, -0.099999999999999978, 0.0000000000000000,
+ { 0.34913506721468096, -0.099999999999999978, 0.0000000000000000,
0.34906585039886590 },
- { 0.52382550016538942, -0.099999999999999978, 0.0000000000000000,
+ { 0.52382550016538953, -0.099999999999999978, 0.0000000000000000,
0.52359877559829882 },
{ 0.69864700854177020, -0.099999999999999978, 0.0000000000000000,
0.69813170079773179 },
- { 0.87361792586964870, -0.099999999999999978, 0.0000000000000000,
+ { 0.87361792586964859, -0.099999999999999978, 0.0000000000000000,
0.87266462599716477 },
- { 1.0487386319621683, -0.099999999999999978, 0.0000000000000000,
+ { 1.0487386319621685, -0.099999999999999978, 0.0000000000000000,
1.0471975511965976 },
- { 1.2239913752078757, -0.099999999999999978, 0.0000000000000000,
+ { 1.2239913752078759, -0.099999999999999978, 0.0000000000000000,
1.2217304763960306 },
- { 1.3993423113684049, -0.099999999999999978, 0.0000000000000000,
+ { 1.3993423113684051, -0.099999999999999978, 0.0000000000000000,
1.3962634015954636 },
- { 1.5747455615173562, -0.099999999999999978, 0.0000000000000000,
+ { 1.5747455615173558, -0.099999999999999978, 0.0000000000000000,
1.5707963267948966 },
};
const double toler081 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.10000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3097339877269682e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.0305747373482148e-16
+// mean(f - f_Boost): -3.0531133177191807e-17
+// variance(f - f_Boost): 1.1508025840536076e-34
+// stddev(f - f_Boost): 1.0727546709539920e-17
const testcase_ellint_3<double>
data082[10] =
{
{ 0.0000000000000000, -0.099999999999999978, 0.10000000000000001,
0.0000000000000000 },
- { 0.17436589347616613, -0.099999999999999978, 0.10000000000000001,
+ { 0.17471821213559732, -0.099999999999999978, 0.10000000000000001,
0.17453292519943295 },
- { 0.34776067871237359, -0.099999999999999978, 0.10000000000000001,
+ { 0.35052902610011138, -0.099999999999999978, 0.10000000000000001,
0.34906585039886590 },
- { 0.51936064354727796, -0.099999999999999978, 0.10000000000000001,
+ { 0.52842865990255727, -0.099999999999999978, 0.10000000000000001,
0.52359877559829882 },
- { 0.68860303749364349, -0.099999999999999978, 0.10000000000000001,
+ { 0.70921799731166713, -0.099999999999999978, 0.10000000000000001,
0.69813170079773179 },
- { 0.85524561882332051, -0.099999999999999978, 0.10000000000000001,
+ { 0.89340330535868662, -0.099999999999999978, 0.10000000000000001,
0.87266462599716477 },
- { 1.0193708301908335, -0.099999999999999978, 0.10000000000000001,
+ { 1.0811075784236857, -0.099999999999999978, 0.10000000000000001,
1.0471975511965976 },
- { 1.1813474067123044, -0.099999999999999978, 0.10000000000000001,
+ { 1.2720133232666426, -0.099999999999999978, 0.10000000000000001,
1.2217304763960306 },
- { 1.3417670770424983, -0.099999999999999978, 0.10000000000000001,
+ { 1.4653630031861395, -0.099999999999999978, 0.10000000000000001,
1.3962634015954636 },
- { 1.5013711111199950, -0.099999999999999978, 0.10000000000000001,
+ { 1.6600374067558428, -0.099999999999999978, 0.10000000000000001,
1.5707963267948966 },
};
const double toler082 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.20000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.4399947764827574e-16
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 1.6736714959992433e-16
+// mean(f - f_Boost): 5.5511151231257830e-18
+// variance(f - f_Boost): 3.8043060629871325e-36
+// stddev(f - f_Boost): 1.9504630380981673e-18
const testcase_ellint_3<double>
data083[10] =
{
{ 0.0000000000000000, -0.099999999999999978, 0.20000000000000001,
0.0000000000000000 },
- { 0.17419068786141340, -0.099999999999999978, 0.20000000000000001,
+ { 0.17489533344059083, -0.099999999999999978, 0.20000000000000001,
0.17453292519943295 },
- { 0.34640537686230133, -0.099999999999999978, 0.20000000000000001,
+ { 0.35194305707815038, -0.099999999999999978, 0.20000000000000001,
0.34906585039886590 },
- { 0.51502689171753946, -0.099999999999999978, 0.20000000000000001,
+ { 0.53317790741512527, -0.099999999999999978, 0.20000000000000001,
0.52359877559829882 },
- { 0.67904147863672715, -0.099999999999999978, 0.20000000000000001,
+ { 0.72036681615081222, -0.099999999999999978, 0.20000000000000001,
0.69813170079773179 },
- { 0.83811885126105179, -0.099999999999999978, 0.20000000000000001,
+ { 0.91480372268244303, -0.099999999999999978, 0.20000000000000001,
0.87266462599716477 },
- { 0.99255278555742787, -0.099999999999999978, 0.20000000000000001,
+ { 1.1170528708071514, -0.099999999999999978, 0.20000000000000001,
1.0471975511965976 },
- { 1.1431260546194930, -0.099999999999999978, 0.20000000000000001,
+ { 1.3266916802718358, -0.099999999999999978, 0.20000000000000001,
1.2217304763960306 },
- { 1.2909589656532101, -0.099999999999999978, 0.20000000000000001,
+ { 1.5421622241831547, -0.099999999999999978, 0.20000000000000001,
1.3962634015954636 },
- { 1.4373749386463430, -0.099999999999999978, 0.20000000000000001,
+ { 1.7608656115083421, -0.099999999999999978, 0.20000000000000001,
1.5707963267948966 },
};
const double toler083 = 2.5000000000000020e-13;
-// Test data for k=-0.099999999999999978, nu=0.29999999999999999.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.5650492137236872e-16
+// Test data for k=-0.099999999999999978, nu=0.30000000000000004.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 1.9186071760326645e-16
+// mean(f - f_Boost): -1.6653345369377347e-17
+// variance(f - f_Boost): 3.4238754566884194e-35
+// stddev(f - f_Boost): 5.8513891142945016e-18
const testcase_ellint_3<double>
data084[10] =
{
- { 0.0000000000000000, -0.099999999999999978, 0.29999999999999999,
+ { 0.0000000000000000, -0.099999999999999978, 0.30000000000000004,
0.0000000000000000 },
- { 0.17401611261390104, -0.099999999999999978, 0.29999999999999999,
+ { 0.17507310163441189, -0.099999999999999978, 0.30000000000000004,
0.17453292519943295 },
- { 0.34506869507511773, -0.099999999999999978, 0.29999999999999999,
+ { 0.35337768072524217, -0.099999999999999978, 0.30000000000000004,
0.34906585039886590 },
- { 0.51081757604259859, -0.099999999999999978, 0.29999999999999999,
+ { 0.53808167801629170, -0.099999999999999978, 0.30000000000000004,
0.52359877559829882 },
- { 0.66992297597712303, -0.099999999999999978, 0.29999999999999999,
+ { 0.73215166755955019, -0.099999999999999978, 0.30000000000000004,
0.69813170079773179 },
- { 0.82209722856174228, -0.099999999999999978, 0.29999999999999999,
+ { 0.93806546000201219, -0.099999999999999978, 0.30000000000000004,
0.87266462599716477 },
- { 0.96792430487669590, -0.099999999999999978, 0.29999999999999999,
+ { 1.1573218723395986, -0.099999999999999978, 0.30000000000000004,
1.0471975511965976 },
- { 1.1085964108954092, -0.099999999999999978, 0.29999999999999999,
+ { 1.3897859679542097, -0.099999999999999978, 0.30000000000000004,
1.2217304763960306 },
- { 1.2456748370836999, -0.099999999999999978, 0.29999999999999999,
+ { 1.6331009404328622, -0.099999999999999978, 0.30000000000000004,
1.3962634015954636 },
- { 1.3809159606704959, -0.099999999999999978, 0.29999999999999999,
+ { 1.8826015946315438, -0.099999999999999978, 0.30000000000000004,
1.5707963267948966 },
};
const double toler084 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.40000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.6854758534459740e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.0338059536914377e-16
+// mean(f - f_Boost): 2.7755575615628914e-17
+// variance(f - f_Boost): 9.5107651574678308e-35
+// stddev(f - f_Boost): 9.7523151904908362e-18
const testcase_ellint_3<double>
data085[10] =
{
{ 0.0000000000000000, -0.099999999999999978, 0.40000000000000002,
0.0000000000000000 },
- { 0.17384216369897931, -0.099999999999999978, 0.40000000000000002,
+ { 0.17525152094559704, -0.099999999999999978, 0.40000000000000002,
0.17453292519943295 },
- { 0.34375018311376787, -0.099999999999999978, 0.40000000000000002,
+ { 0.35483343742825979, -0.099999999999999978, 0.40000000000000002,
0.34906585039886590 },
- { 0.50672650758380455, -0.099999999999999978, 0.40000000000000002,
+ { 0.54314913099505446, -0.099999999999999978, 0.40000000000000002,
0.52359877559829882 },
- { 0.66121264213337616, -0.099999999999999978, 0.40000000000000002,
+ { 0.74463962034766862, -0.099999999999999978, 0.40000000000000002,
0.69813170079773179 },
- { 0.80706202005774441, -0.099999999999999978, 0.40000000000000002,
+ { 0.96349276837570441, -0.099999999999999978, 0.40000000000000002,
0.87266462599716477 },
- { 0.94519376138245870, -0.099999999999999978, 0.40000000000000002,
+ { 1.2029081382746343, -0.099999999999999978, 0.40000000000000002,
1.0471975511965976 },
- { 1.0771880300759584, -0.099999999999999978, 0.40000000000000002,
+ { 1.4638022887050806, -0.099999999999999978, 0.40000000000000002,
1.2217304763960306 },
- { 1.2049711557188272, -0.099999999999999978, 0.40000000000000002,
+ { 1.7432413830105224, -0.099999999999999978, 0.40000000000000002,
1.3962634015954636 },
- { 1.3306223265207477, -0.099999999999999978, 0.40000000000000002,
+ { 2.0336367403076760, -0.099999999999999978, 0.40000000000000002,
1.5707963267948966 },
};
const double toler085 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.50000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8017534281650347e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.9864616042835278e-16
+// mean(f - f_Boost): 1.0547118733938987e-16
+// variance(f - f_Boost): 7.5633408838247182e-32
+// stddev(f - f_Boost): 2.7501528837184157e-16
const testcase_ellint_3<double>
data086[10] =
{
{ 0.0000000000000000, -0.099999999999999978, 0.50000000000000000,
0.0000000000000000 },
- { 0.17366883711936548, -0.099999999999999978, 0.50000000000000000,
+ { 0.17543059564292182, -0.099999999999999978, 0.50000000000000000,
0.17453292519943295 },
- { 0.34244940634881882, -0.099999999999999978, 0.50000000000000000,
+ { 0.35631088838721664, -0.099999999999999978, 0.50000000000000000,
0.34906585039886590 },
- { 0.50274793281634367, -0.099999999999999978, 0.50000000000000000,
+ { 0.54839023346436444, -0.099999999999999978, 0.50000000000000000,
0.52359877559829882 },
- { 0.65287941633275082, -0.099999999999999978, 0.50000000000000000,
+ { 0.75790846946088830, -0.099999999999999978, 0.50000000000000000,
0.69813170079773179 },
- { 0.79291198790315398, -0.099999999999999978, 0.50000000000000000,
+ { 0.99146713686720678, -0.099999999999999978, 0.50000000000000000,
0.87266462599716477 },
- { 0.92412201537880323, -0.099999999999999978, 0.50000000000000000,
+ { 1.2551692247937198, -0.099999999999999978, 0.50000000000000000,
1.0471975511965976 },
- { 1.0484480076799372, -0.099999999999999978, 0.50000000000000000,
+ { 1.5524660788146873, -0.099999999999999978, 0.50000000000000000,
1.2217304763960306 },
- { 1.1681168130475206, -0.099999999999999978, 0.50000000000000000,
+ { 1.8806578570830670, -0.099999999999999978, 0.50000000000000000,
1.3962634015954636 },
- { 1.2854480708580160, -0.099999999999999978, 0.50000000000000000,
+ { 2.2279868912966849, -0.099999999999999978, 0.50000000000000000,
1.5707963267948966 },
};
const double toler086 = 2.5000000000000020e-13;
-// Test data for k=-0.099999999999999978, nu=0.59999999999999998.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.9142834151672032e-16
+// Test data for k=-0.099999999999999978, nu=0.60000000000000009.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.6726146516228014e-16
+// mean(f - f_Boost): -3.6082248300317589e-17
+// variance(f - f_Boost): 1.6073193116120635e-34
+// stddev(f - f_Boost): 1.2678009747638087e-17
const testcase_ellint_3<double>
data087[10] =
{
- { 0.0000000000000000, -0.099999999999999978, 0.59999999999999998,
+ { 0.0000000000000000, -0.099999999999999978, 0.60000000000000009,
0.0000000000000000 },
- { 0.17349612891469013, -0.099999999999999978, 0.59999999999999998,
+ { 0.17561033003590576, -0.099999999999999978, 0.60000000000000009,
0.17453292519943295 },
- { 0.34116594505539444, -0.099999999999999978, 0.59999999999999998,
+ { 0.35781061668171932, -0.099999999999999978, 0.60000000000000009,
0.34906585039886590 },
- { 0.49887649430466674, -0.099999999999999978, 0.59999999999999998,
+ { 0.55381585659629196, -0.099999999999999978, 0.60000000000000009,
0.52359877559829882 },
- { 0.64489553282165146, -0.099999999999999978, 0.59999999999999998,
+ { 0.77204910484575640, -0.099999999999999978, 0.60000000000000009,
0.69813170079773179 },
- { 0.77956016553782437, -0.099999999999999978, 0.59999999999999998,
+ { 1.0224751740393108, -0.099999999999999978, 0.60000000000000009,
0.87266462599716477 },
- { 0.90451074530096287, -0.099999999999999978, 0.59999999999999998,
+ { 1.3160230906351114, -0.099999999999999978, 0.60000000000000009,
1.0471975511965976 },
- { 1.0220113666961632, -0.099999999999999978, 0.59999999999999998,
+ { 1.6616282844233206, -0.099999999999999978, 0.60000000000000009,
1.2217304763960306 },
- { 1.1345351441065563, -0.099999999999999978, 0.59999999999999998,
+ { 2.0592555664850392, -0.099999999999999978, 0.60000000000000009,
1.3962634015954636 },
- { 1.2445798942989255, -0.099999999999999978, 0.59999999999999998,
+ { 2.4913004919173822, -0.099999999999999978, 0.60000000000000009,
1.5707963267948966 },
};
const double toler087 = 2.5000000000000020e-13;
-// Test data for k=-0.099999999999999978, nu=0.69999999999999996.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.5172091551439012e-16
+// Test data for k=-0.099999999999999978, nu=0.70000000000000007.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 5
+// max(|f - f_Boost| / |f_Boost|): 2.1004074871280821e-16
+// mean(f - f_Boost): 3.3306690738754695e-17
+// variance(f - f_Boost): 1.3695501826753678e-34
+// stddev(f - f_Boost): 1.1702778228589003e-17
const testcase_ellint_3<double>
data088[10] =
{
- { 0.0000000000000000, -0.099999999999999978, 0.69999999999999996,
+ { 0.0000000000000000, -0.099999999999999978, 0.70000000000000007,
0.0000000000000000 },
- { 0.17332403516105047, -0.099999999999999978, 0.69999999999999996,
+ { 0.17579072847532518, -0.099999999999999978, 0.70000000000000007,
0.17453292519943295 },
- { 0.33989939374896883, -0.099999999999999978, 0.69999999999999996,
+ { 0.35933322840606297, -0.099999999999999978, 0.70000000000000007,
0.34906585039886590 },
- { 0.49510719568614070, -0.099999999999999978, 0.69999999999999996,
+ { 0.55943788649460324, -0.099999999999999978, 0.70000000000000007,
0.52359877559829882 },
- { 0.63723607776354974, -0.099999999999999978, 0.69999999999999996,
+ { 0.78716856504031707, -0.099999999999999978, 0.70000000000000007,
0.69813170079773179 },
- { 0.76693133887935327, -0.099999999999999978, 0.69999999999999996,
+ { 1.0571501305617423, -0.099999999999999978, 0.70000000000000007,
0.87266462599716477 },
- { 0.88619382078823805, -0.099999999999999978, 0.69999999999999996,
+ { 1.3882948301743525, -0.099999999999999978, 0.70000000000000007,
1.0471975511965976 },
- { 0.99758012018676490, -0.099999999999999978, 0.69999999999999996,
+ { 1.8011785680114223, -0.099999999999999978, 0.70000000000000007,
1.2217304763960306 },
- { 1.1037642270814410, -0.099999999999999978, 0.69999999999999996,
+ { 2.3057268183616464, -0.099999999999999978, 0.70000000000000007,
1.3962634015954636 },
- { 1.2073745911083185, -0.099999999999999978, 0.69999999999999996,
+ { 2.8771910188009739, -0.099999999999999978, 0.70000000000000007,
1.5707963267948966 },
};
const double toler088 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1294144515772258e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.3133043868392355e-16
+// mean(f - f_Boost): 1.8041124150158794e-16
+// variance(f - f_Boost): 6.1843750436434569e-32
+// stddev(f - f_Boost): 2.4868403735751633e-16
const testcase_ellint_3<double>
data089[10] =
{
{ 0.0000000000000000, -0.099999999999999978, 0.80000000000000004,
0.0000000000000000 },
- { 0.17315255197057014, -0.099999999999999978, 0.80000000000000004,
+ { 0.17597179535373417, -0.099999999999999978, 0.80000000000000004,
0.17453292519943295 },
- { 0.33864936055747991, -0.099999999999999978, 0.80000000000000004,
+ { 0.36087935387831499, -0.099999999999999978, 0.80000000000000004,
0.34906585039886590 },
- { 0.49143537041117613, -0.099999999999999978, 0.80000000000000004,
+ { 0.56526935244526444, -0.099999999999999978, 0.80000000000000004,
0.52359877559829882 },
- { 0.62987861760047492, -0.099999999999999978, 0.80000000000000004,
+ { 0.80339402590612397, -0.099999999999999978, 0.80000000000000004,
0.69813170079773179 },
- { 0.75496005490917517, -0.099999999999999978, 0.80000000000000004,
+ { 1.0963358646374459, -0.099999999999999978, 0.80000000000000004,
0.87266462599716477 },
- { 0.86903081862701881, -0.099999999999999978, 0.80000000000000004,
+ { 1.4763748483246868, -0.099999999999999978, 0.80000000000000004,
1.0471975511965976 },
- { 0.97490814820725591, -0.099999999999999978, 0.80000000000000004,
+ { 1.9896610222794102, -0.099999999999999978, 0.80000000000000004,
1.2217304763960306 },
- { 1.0754290107171083, -0.099999999999999978, 0.80000000000000004,
+ { 2.6806423920122024, -0.099999999999999978, 0.80000000000000004,
1.3962634015954636 },
- { 1.1733158866987732, -0.099999999999999978, 0.80000000000000004,
+ { 3.5246199613295612, -0.099999999999999978, 0.80000000000000004,
1.5707963267948966 },
};
const double toler089 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.90000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2325599449457852e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.5624826890976725e-16
+// mean(f - f_Boost): 2.3314683517128288e-16
+// variance(f - f_Boost): 2.9401198977189756e-31
+// stddev(f - f_Boost): 5.4222872459129045e-16
const testcase_ellint_3<double>
data090[10] =
{
{ 0.0000000000000000, -0.099999999999999978, 0.90000000000000002,
0.0000000000000000 },
- { 0.17298167549096563, -0.099999999999999978, 0.90000000000000002,
+ { 0.17615353510599349, -0.099999999999999978, 0.90000000000000002,
0.17453292519943295 },
- { 0.33741546662741589, -0.099999999999999978, 0.90000000000000002,
+ { 0.36244964892922371, -0.099999999999999978, 0.90000000000000002,
0.34906585039886590 },
- { 0.48785665376856868, -0.099999999999999978, 0.90000000000000002,
+ { 0.57132457590110530, -0.099999999999999978, 0.90000000000000002,
0.52359877559829882 },
- { 0.62280288554518959, -0.099999999999999978, 0.90000000000000002,
+ { 0.82087808820385000, -0.099999999999999978, 0.90000000000000002,
0.69813170079773179 },
- { 0.74358903115455188, -0.099999999999999978, 0.90000000000000002,
+ { 1.1411894342144451, -0.099999999999999978, 0.90000000000000002,
0.87266462599716477 },
- { 0.85290207679298335, -0.099999999999999978, 0.90000000000000002,
+ { 1.5875929286844597, -0.099999999999999978, 0.90000000000000002,
1.0471975511965976 },
- { 0.95379006645397379, -0.099999999999999978, 0.90000000000000002,
+ { 2.2678622986596659, -0.099999999999999978, 0.90000000000000002,
1.2217304763960306 },
- { 1.0492213119872327, -0.099999999999999978, 0.90000000000000002,
+ { 3.3697528941897903, -0.099999999999999978, 0.90000000000000002,
1.3962634015954636 },
- { 1.1419839485283374, -0.099999999999999978, 0.90000000000000002,
+ { 4.9862890417305499, -0.099999999999999978, 0.90000000000000002,
1.5707963267948966 },
};
const double toler090 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.0000000000000000.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 2.1203697876423452e-16
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.1203697876423447e-16
+// mean(f - f_Boost): -1.9428902930940238e-17
+// variance(f - f_Boost): 4.6602749271592373e-35
+// stddev(f - f_Boost): 6.8266206333435850e-18
const testcase_ellint_3<double>
data091[10] =
{
{ 0.0000000000000000, 0.0000000000000000, 0.0000000000000000,
0.0000000000000000 },
- { 0.17453292519943292, 0.0000000000000000, 0.0000000000000000,
+ { 0.17453292519943295, 0.0000000000000000, 0.0000000000000000,
0.17453292519943295 },
- { 0.34906585039886584, 0.0000000000000000, 0.0000000000000000,
+ { 0.34906585039886590, 0.0000000000000000, 0.0000000000000000,
0.34906585039886590 },
- { 0.52359877559829870, 0.0000000000000000, 0.0000000000000000,
+ { 0.52359877559829882, 0.0000000000000000, 0.0000000000000000,
0.52359877559829882 },
- { 0.69813170079773168, 0.0000000000000000, 0.0000000000000000,
+ { 0.69813170079773179, 0.0000000000000000, 0.0000000000000000,
0.69813170079773179 },
{ 0.87266462599716477, 0.0000000000000000, 0.0000000000000000,
0.87266462599716477 },
- { 1.0471975511965974, 0.0000000000000000, 0.0000000000000000,
+ { 1.0471975511965976, 0.0000000000000000, 0.0000000000000000,
1.0471975511965976 },
- { 1.2217304763960304, 0.0000000000000000, 0.0000000000000000,
+ { 1.2217304763960306, 0.0000000000000000, 0.0000000000000000,
1.2217304763960306 },
- { 1.3962634015954631, 0.0000000000000000, 0.0000000000000000,
+ { 1.3962634015954636, 0.0000000000000000, 0.0000000000000000,
1.3962634015954636 },
{ 1.5707963267948966, 0.0000000000000000, 0.0000000000000000,
1.5707963267948966 },
@@ -2678,849 +2950,939 @@ data091[10] =
const double toler091 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.10000000000000001.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 2.1813975824747021e-16
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.1019052604815601e-16
+// mean(f - f_Boost): 2.7755575615628915e-18
+// variance(f - f_Boost): 9.5107651574678312e-37
+// stddev(f - f_Boost): 9.7523151904908366e-19
const testcase_ellint_3<double>
data092[10] =
{
{ 0.0000000000000000, 0.0000000000000000, 0.10000000000000001,
0.0000000000000000 },
- { 0.17435710107516605, 0.0000000000000000, 0.10000000000000001,
+ { 0.17470938780535167, 0.0000000000000000, 0.10000000000000001,
0.17453292519943295 },
- { 0.34769194715329604, 0.0000000000000000, 0.10000000000000001,
+ { 0.35045931581655582, 0.0000000000000000, 0.10000000000000001,
0.34906585039886590 },
- { 0.51913731575866107, 0.0000000000000000, 0.10000000000000001,
+ { 0.52819841383849875, 0.0000000000000000, 0.10000000000000001,
0.52359877559829882 },
- { 0.68810051897078450, 0.0000000000000000, 0.10000000000000001,
+ { 0.70868910807992958, 0.0000000000000000, 0.10000000000000001,
0.69813170079773179 },
- { 0.85432615661706823, 0.0000000000000000, 0.10000000000000001,
+ { 0.89241311307249638, 0.0000000000000000, 0.10000000000000001,
0.87266462599716477 },
- { 1.0179006647340794, 0.0000000000000000, 0.10000000000000001,
+ { 1.0794871444666669, 0.0000000000000000, 0.10000000000000001,
1.0471975511965976 },
- { 1.1792120640746322, 0.0000000000000000, 0.10000000000000001,
+ { 1.2696086247356864, 0.0000000000000000, 0.10000000000000001,
1.2217304763960306 },
- { 1.3388834245070498, 0.0000000000000000, 0.10000000000000001,
+ { 1.4620562617494721, 0.0000000000000000, 0.10000000000000001,
1.3962634015954636 },
- { 1.4976955329233277, 0.0000000000000000, 0.10000000000000001,
+ { 1.6557647109660167, 0.0000000000000000, 0.10000000000000001,
1.5707963267948966 },
};
const double toler092 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.20000000000000001.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 2.2402804784409065e-16
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.0831888697465320e-16
+// mean(f - f_Boost): -1.9428902930940238e-17
+// variance(f - f_Boost): 4.6602749271592373e-35
+// stddev(f - f_Boost): 6.8266206333435850e-18
const testcase_ellint_3<double>
data093[10] =
{
{ 0.0000000000000000, 0.0000000000000000, 0.20000000000000001,
0.0000000000000000 },
- { 0.17418191132226074, 0.0000000000000000, 0.20000000000000001,
+ { 0.17488649304197776, 0.0000000000000000, 0.20000000000000001,
0.17453292519943295 },
- { 0.34633712256943405, 0.0000000000000000, 0.20000000000000001,
+ { 0.35187284488675424, 0.0000000000000000, 0.20000000000000001,
0.34906585039886590 },
- { 0.51480684302043700, 0.0000000000000000, 0.20000000000000001,
+ { 0.53294400750146131, 0.0000000000000000, 0.20000000000000001,
0.52359877559829882 },
- { 0.67855102942481937, 0.0000000000000000, 0.20000000000000001,
+ { 0.71982347021822823, 0.0000000000000000, 0.20000000000000001,
0.69813170079773179 },
- { 0.83723056090326253, 0.0000000000000000, 0.20000000000000001,
+ { 0.91377311030258745, 0.0000000000000000, 0.20000000000000001,
0.87266462599716477 },
- { 0.99114645269578161, 0.0000000000000000, 0.20000000000000001,
+ { 1.1153429007215137, 0.0000000000000000, 0.20000000000000001,
1.0471975511965976 },
- { 1.1411014627915537, 0.0000000000000000, 0.20000000000000001,
+ { 1.3241202847784086, 0.0000000000000000, 0.20000000000000001,
1.2217304763960306 },
- { 1.2882448138013969, 0.0000000000000000, 0.20000000000000001,
+ { 1.5385854914338242, 0.0000000000000000, 0.20000000000000001,
1.3962634015954636 },
- { 1.4339343023863691, 0.0000000000000000, 0.20000000000000001,
+ { 1.7562036827601815, 0.0000000000000000, 0.20000000000000001,
1.5707963267948966 },
};
const double toler093 = 2.5000000000000020e-13;
-// Test data for k=0.0000000000000000, nu=0.29999999999999999.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 2.2972291118632678e-16
+// Test data for k=0.0000000000000000, nu=0.30000000000000004.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.0642101770923591e-16
+// mean(f - f_Boost): -1.9428902930940238e-17
+// variance(f - f_Boost): 4.6602749271592373e-35
+// stddev(f - f_Boost): 6.8266206333435850e-18
const testcase_ellint_3<double>
data094[10] =
{
- { 0.0000000000000000, 0.0000000000000000, 0.29999999999999999,
+ { 0.0000000000000000, 0.0000000000000000, 0.30000000000000004,
0.0000000000000000 },
- { 0.17400735186871724, 0.0000000000000000, 0.29999999999999999,
+ { 0.17506424509761404, 0.0000000000000000, 0.30000000000000004,
0.17453292519943295 },
- { 0.34500091027020219, 0.0000000000000000, 0.29999999999999999,
+ { 0.35330695794774630, 0.0000000000000000, 0.30000000000000004,
0.34906585039886590 },
- { 0.51060069523901530, 0.0000000000000000, 0.29999999999999999,
+ { 0.53784398359522367, 0.0000000000000000, 0.30000000000000004,
0.52359877559829882 },
- { 0.66944393961375448, 0.0000000000000000, 0.29999999999999999,
+ { 0.73159289408687844, 0.0000000000000000, 0.30000000000000004,
0.69813170079773179 },
- { 0.82123776744538157, 0.0000000000000000, 0.29999999999999999,
+ { 0.93699031797084975, 0.0000000000000000, 0.30000000000000004,
0.87266462599716477 },
- { 0.96657579245516501, 0.0000000000000000, 0.29999999999999999,
+ { 1.1555098909390267, 0.0000000000000000, 0.30000000000000004,
1.0471975511965976 },
- { 1.1066703663542414, 0.0000000000000000, 0.29999999999999999,
+ { 1.3870184960144325, 0.0000000000000000, 0.30000000000000004,
1.2217304763960306 },
- { 1.2431094251944901, 0.0000000000000000, 0.29999999999999999,
+ { 1.6291980835772994, 0.0000000000000000, 0.30000000000000004,
1.3962634015954636 },
- { 1.3776795151134889, 0.0000000000000000, 0.29999999999999999,
+ { 1.8774607092226381, 0.0000000000000000, 0.30000000000000004,
1.5707963267948966 },
};
const double toler094 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.40000000000000002.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 2.3524218164111537e-16
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.0449580089795878e-16
+// mean(f - f_Boost): -1.9428902930940238e-17
+// variance(f - f_Boost): 4.6602749271592373e-35
+// stddev(f - f_Boost): 6.8266206333435850e-18
const testcase_ellint_3<double>
data095[10] =
{
{ 0.0000000000000000, 0.0000000000000000, 0.40000000000000002,
0.0000000000000000 },
- { 0.17383341868035862, 0.0000000000000000, 0.40000000000000002,
+ { 0.17524264820030025, 0.0000000000000000, 0.40000000000000002,
0.17453292519943295 },
- { 0.34368286022299821, 0.0000000000000000, 0.40000000000000002,
+ { 0.35476219513871499, 0.0000000000000000, 0.40000000000000002,
0.34906585039886590 },
- { 0.50651268947499395, 0.0000000000000000, 0.40000000000000002,
+ { 0.54290749235440094, 0.0000000000000000, 0.40000000000000002,
0.52359877559829882 },
- { 0.66074441806097539, 0.0000000000000000, 0.40000000000000002,
+ { 0.74406433757109913, 0.0000000000000000, 0.40000000000000002,
0.69813170079773179 },
- { 0.80622931670113474, 0.0000000000000000, 0.40000000000000002,
+ { 0.96236826162553313, 0.0000000000000000, 0.40000000000000002,
0.87266462599716477 },
- { 0.94389791565435210, 0.0000000000000000, 0.40000000000000002,
+ { 1.2009785880262487, 0.0000000000000000, 0.40000000000000002,
1.0471975511965976 },
- { 1.0753503387899728, 0.0000000000000000, 0.40000000000000002,
+ { 1.4608000106167567, 0.0000000000000000, 0.40000000000000002,
1.2217304763960306 },
- { 1.2025374759127518, 0.0000000000000000, 0.40000000000000002,
+ { 1.7389349574753439, 0.0000000000000000, 0.40000000000000002,
1.3962634015954636 },
- { 1.3275651989026320, 0.0000000000000000, 0.40000000000000002,
+ { 2.0278893379868057, 0.0000000000000000, 0.40000000000000002,
1.5707963267948966 },
};
const double toler095 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.50000000000000000.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 3.6090167266677240e-16
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.0254203825026289e-16
+// mean(f - f_Boost): -1.9428902930940238e-17
+// variance(f - f_Boost): 4.6602749271592373e-35
+// stddev(f - f_Boost): 6.8266206333435850e-18
const testcase_ellint_3<double>
data096[10] =
{
{ 0.0000000000000000, 0.0000000000000000, 0.50000000000000000,
0.0000000000000000 },
- { 0.17366010776037044, 0.0000000000000000, 0.50000000000000000,
+ { 0.17542170661831016, 0.0000000000000000, 0.50000000000000000,
0.17453292519943295 },
- { 0.34238253799539309, 0.0000000000000000, 0.50000000000000000,
+ { 0.35623911740195419, 0.0000000000000000, 0.50000000000000000,
0.34906585039886590 },
- { 0.50253707775976397, 0.0000000000000000, 0.50000000000000000,
+ { 0.54814449099863127, 0.0000000000000000, 0.50000000000000000,
0.52359877559829882 },
- { 0.65242145347295766, 0.0000000000000000, 0.50000000000000000,
+ { 0.75731546607718081, 0.0000000000000000, 0.50000000000000000,
0.69813170079773179 },
- { 0.79210420018698058, 0.0000000000000000, 0.50000000000000000,
+ { 0.99028751188233310, 0.0000000000000000, 0.50000000000000000,
0.87266462599716477 },
- { 0.92287437995632171, 0.0000000000000000, 0.50000000000000000,
+ { 1.2531022857760581, 0.0000000000000000, 0.50000000000000000,
1.0471975511965976 },
- { 1.0466900550798659, 0.0000000000000000, 0.50000000000000000,
+ { 1.5491761777615785, 0.0000000000000000, 0.50000000000000000,
1.2217304763960306 },
- { 1.1658007366618623, 0.0000000000000000, 0.50000000000000000,
+ { 1.8758359693666533, 0.0000000000000000, 0.50000000000000000,
1.3962634015954636 },
- { 1.2825498301618641, 0.0000000000000000, 0.50000000000000000,
+ { 2.2214414690791831, 0.0000000000000000, 0.50000000000000000,
1.5707963267948966 },
};
const double toler096 = 2.5000000000000020e-13;
-// Test data for k=0.0000000000000000, nu=0.59999999999999998.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 2.4581288258006758e-16
+// Test data for k=0.0000000000000000, nu=0.60000000000000009.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 2.1742785192400269e-16
+// mean(f - f_Boost): 1.3877787807814457e-17
+// variance(f - f_Boost): 2.3776912893669577e-35
+// stddev(f - f_Boost): 4.8761575952454181e-18
const testcase_ellint_3<double>
data097[10] =
{
- { 0.0000000000000000, 0.0000000000000000, 0.59999999999999998,
+ { 0.0000000000000000, 0.0000000000000000, 0.60000000000000009,
0.0000000000000000 },
- { 0.17348741514884700, 0.0000000000000000, 0.59999999999999998,
+ { 0.17560142466065651, 0.0000000000000000, 0.60000000000000009,
0.17453292519943295 },
- { 0.34109952405241289, 0.0000000000000000, 0.59999999999999998,
+ { 0.35773830754879005, 0.0000000000000000, 0.60000000000000009,
0.34906585039886590 },
- { 0.49866850781226285, 0.0000000000000000, 0.59999999999999998,
+ { 0.55356583986445973, 0.0000000000000000, 0.60000000000000009,
0.52359877559829882 },
- { 0.64444732407062499, 0.0000000000000000, 0.59999999999999998,
+ { 0.77143701715151514, 0.0000000000000000, 0.60000000000000009,
0.69813170079773179 },
- { 0.77877564686544720, 0.0000000000000000, 0.59999999999999998,
+ { 1.0212334940541210, 0.0000000000000000, 0.60000000000000009,
0.87266462599716477 },
- { 0.90330743691883475, 0.0000000000000000, 0.59999999999999998,
+ { 1.3137928444460387, 0.0000000000000000, 0.60000000000000009,
1.0471975511965976 },
- { 1.0203257987604104, 0.0000000000000000, 0.59999999999999998,
+ { 1.6579755004159076, 0.0000000000000000, 0.60000000000000009,
1.2217304763960306 },
- { 1.1323247918768629, 0.0000000000000000, 0.59999999999999998,
+ { 2.0537461418295506, 0.0000000000000000, 0.60000000000000009,
1.3962634015954636 },
- { 1.2418235332245127, 0.0000000000000000, 0.59999999999999998,
+ { 2.4836470664490253, 0.0000000000000000, 0.60000000000000009,
1.5707963267948966 },
};
const double toler097 = 2.5000000000000020e-13;
-// Test data for k=0.0000000000000000, nu=0.69999999999999996.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 2.5088894797856263e-16
+// Test data for k=0.0000000000000000, nu=0.70000000000000007.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 4
+// max(|f - f_Boost| / |f_Boost|): 3.0903019454022601e-16
+// mean(f - f_Boost): -6.9388939039072284e-17
+// variance(f - f_Boost): 5.9442282234173945e-34
+// stddev(f - f_Boost): 2.4380787976227090e-17
const testcase_ellint_3<double>
data098[10] =
{
- { 0.0000000000000000, 0.0000000000000000, 0.69999999999999996,
+ { 0.0000000000000000, 0.0000000000000000, 0.70000000000000007,
0.0000000000000000 },
- { 0.17331533692234474, 0.0000000000000000, 0.69999999999999996,
+ { 0.17578180667760368, 0.0000000000000000, 0.70000000000000007,
0.17453292519943295 },
- { 0.33983341309265935, 0.0000000000000000, 0.69999999999999996,
+ { 0.35926037139410999, 0.0000000000000000, 0.70000000000000007,
0.34906585039886590 },
- { 0.49490198805931979, 0.0000000000000000, 0.69999999999999996,
+ { 0.55918341315855080, 0.0000000000000000, 0.70000000000000007,
0.52359877559829882 },
- { 0.63679715525145297, 0.0000000000000000, 0.69999999999999996,
+ { 0.78653584856932546, 0.0000000000000000, 0.70000000000000007,
0.69813170079773179 },
- { 0.76616861049481944, 0.0000000000000000, 0.69999999999999996,
+ { 1.0558379029273324, 0.0000000000000000, 0.70000000000000007,
0.87266462599716477 },
- { 0.88503143209004198, 0.0000000000000000, 0.69999999999999996,
+ { 1.3858662544850615, 0.0000000000000000, 0.70000000000000007,
1.0471975511965976 },
- { 0.99596060249112173, 0.0000000000000000, 0.69999999999999996,
+ { 1.7970491170359040, 0.0000000000000000, 0.70000000000000007,
1.2217304763960306 },
- { 1.1016495050260424, 0.0000000000000000, 0.69999999999999996,
+ { 2.2992404490153917, 0.0000000000000000, 0.70000000000000007,
1.3962634015954636 },
- { 1.2047457872617382, 0.0000000000000000, 0.69999999999999996,
+ { 2.8678686047727382, 0.0000000000000000, 0.70000000000000007,
1.5707963267948966 },
};
const double toler098 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.80000000000000004.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8375904358197891e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.2373744057922657e-16
+// mean(f - f_Boost): 1.0269562977782698e-16
+// variance(f - f_Boost): 1.4388836606733082e-32
+// stddev(f - f_Boost): 1.1995347684303728e-16
const testcase_ellint_3<double>
data099[10] =
{
{ 0.0000000000000000, 0.0000000000000000, 0.80000000000000004,
0.0000000000000000 },
- { 0.17314386919344210, 0.0000000000000000, 0.80000000000000004,
+ { 0.17596285706118869, 0.0000000000000000, 0.80000000000000004,
0.17453292519943295 },
- { 0.33858381342073240, 0.0000000000000000, 0.80000000000000004,
+ { 0.36080593896484231, 0.0000000000000000, 0.80000000000000004,
0.34906585039886590 },
- { 0.49123285640844727, 0.0000000000000000, 0.80000000000000004,
+ { 0.56501022706967863, 0.0000000000000000, 0.80000000000000004,
0.52359877559829882 },
- { 0.62944854858904509, 0.0000000000000000, 0.80000000000000004,
+ { 0.80273891984116930, 0.0000000000000000, 0.80000000000000004,
0.69813170079773179 },
- { 0.75421778305499343, 0.0000000000000000, 0.80000000000000004,
+ { 1.0949425007763358, 0.0000000000000000, 0.80000000000000004,
0.87266462599716477 },
- { 0.86790634112156617, 0.0000000000000000, 0.80000000000000004,
+ { 1.4736985692253419, 0.0000000000000000, 0.80000000000000004,
1.0471975511965976 },
- { 0.97334918087427558, 0.0000000000000000, 0.80000000000000004,
+ { 1.9848676587180696, 0.0000000000000000, 0.80000000000000004,
1.2217304763960306 },
- { 1.0734012615283985, 0.0000000000000000, 0.80000000000000004,
+ { 2.6726187823193546, 0.0000000000000000, 0.80000000000000004,
1.3962634015954636 },
- { 1.1708024551734544, 0.0000000000000000, 0.80000000000000004,
+ { 3.5124073655203634, 0.0000000000000000, 0.80000000000000004,
1.5707963267948966 },
};
const double toler099 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.90000000000000002.
-// max(|f - f_GSL|): 1.1102230246251565e-16
-// max(|f - f_GSL| / |f_GSL|): 1.7838310376154469e-16
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 6.6108624815885066e-16
+// mean(f - f_Boost): 2.1371793224034264e-16
+// variance(f - f_Boost): 5.6389326618626776e-33
+// stddev(f - f_Boost): 7.5092826966779442e-17
const testcase_ellint_3<double>
data100[10] =
{
{ 0.0000000000000000, 0.0000000000000000, 0.90000000000000002,
0.0000000000000000 },
- { 0.17297300811030597, 0.0000000000000000, 0.90000000000000002,
+ { 0.17614458024574997, 0.0000000000000000, 0.90000000000000002,
0.17453292519943295 },
- { 0.33735034635360817, 0.0000000000000000, 0.90000000000000002,
+ { 0.36237566578821978, 0.0000000000000000, 0.90000000000000002,
0.34906585039886590 },
- { 0.48765675230233130, 0.0000000000000000, 0.90000000000000002,
+ { 0.57106058859196640, 0.0000000000000000, 0.90000000000000002,
0.52359877559829882 },
- { 0.62238126886123568, 0.0000000000000000, 0.90000000000000002,
+ { 0.82019857015755915, 0.0000000000000000, 0.90000000000000002,
0.69813170079773179 },
- { 0.74286600807269243, 0.0000000000000000, 0.90000000000000002,
+ { 1.1397014388908147, 0.0000000000000000, 0.90000000000000002,
0.87266462599716477 },
- { 0.85181283909264949, 0.0000000000000000, 0.90000000000000002,
+ { 1.5845952415154960, 0.0000000000000000, 0.90000000000000002,
1.0471975511965976 },
- { 0.95228683995371133, 0.0000000000000000, 0.90000000000000002,
+ { 2.2620531413370775, 0.0000000000000000, 0.90000000000000002,
1.2217304763960306 },
- { 1.0472730487412552, 0.0000000000000000, 0.90000000000000002,
+ { 3.3587842061975066, 0.0000000000000000, 0.90000000000000002,
1.3962634015954636 },
- { 1.1395754288497419, 0.0000000000000000, 0.90000000000000002,
+ { 4.9672941328980507, 0.0000000000000000, 0.90000000000000002,
1.5707963267948966 },
};
const double toler100 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.0000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.1735566504509650e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.1735566504509645e-16
+// mean(f - f_Boost): -5.8286708792820721e-17
+// variance(f - f_Boost): 4.1942474344433133e-34
+// stddev(f - f_Boost): 2.0479861900030756e-17
const testcase_ellint_3<double>
data101[10] =
{
{ 0.0000000000000000, 0.10000000000000009, 0.0000000000000000,
0.0000000000000000 },
- { 0.17454173353063659, 0.10000000000000009, 0.0000000000000000,
+ { 0.17454173353063662, 0.10000000000000009, 0.0000000000000000,
0.17453292519943295 },
- { 0.34913506721468091, 0.10000000000000009, 0.0000000000000000,
+ { 0.34913506721468096, 0.10000000000000009, 0.0000000000000000,
0.34906585039886590 },
- { 0.52382550016538942, 0.10000000000000009, 0.0000000000000000,
+ { 0.52382550016538953, 0.10000000000000009, 0.0000000000000000,
0.52359877559829882 },
{ 0.69864700854177020, 0.10000000000000009, 0.0000000000000000,
0.69813170079773179 },
- { 0.87361792586964870, 0.10000000000000009, 0.0000000000000000,
+ { 0.87361792586964859, 0.10000000000000009, 0.0000000000000000,
0.87266462599716477 },
- { 1.0487386319621683, 0.10000000000000009, 0.0000000000000000,
+ { 1.0487386319621685, 0.10000000000000009, 0.0000000000000000,
1.0471975511965976 },
- { 1.2239913752078757, 0.10000000000000009, 0.0000000000000000,
+ { 1.2239913752078759, 0.10000000000000009, 0.0000000000000000,
1.2217304763960306 },
- { 1.3993423113684049, 0.10000000000000009, 0.0000000000000000,
+ { 1.3993423113684051, 0.10000000000000009, 0.0000000000000000,
1.3962634015954636 },
- { 1.5747455615173562, 0.10000000000000009, 0.0000000000000000,
+ { 1.5747455615173560, 0.10000000000000009, 0.0000000000000000,
1.5707963267948966 },
};
const double toler101 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.10000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3097339877269682e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.0305747373482148e-16
+// mean(f - f_Boost): -3.0531133177191807e-17
+// variance(f - f_Boost): 1.1508025840536076e-34
+// stddev(f - f_Boost): 1.0727546709539920e-17
const testcase_ellint_3<double>
data102[10] =
{
{ 0.0000000000000000, 0.10000000000000009, 0.10000000000000001,
0.0000000000000000 },
- { 0.17436589347616613, 0.10000000000000009, 0.10000000000000001,
+ { 0.17471821213559732, 0.10000000000000009, 0.10000000000000001,
0.17453292519943295 },
- { 0.34776067871237359, 0.10000000000000009, 0.10000000000000001,
+ { 0.35052902610011138, 0.10000000000000009, 0.10000000000000001,
0.34906585039886590 },
- { 0.51936064354727796, 0.10000000000000009, 0.10000000000000001,
+ { 0.52842865990255727, 0.10000000000000009, 0.10000000000000001,
0.52359877559829882 },
- { 0.68860303749364349, 0.10000000000000009, 0.10000000000000001,
+ { 0.70921799731166713, 0.10000000000000009, 0.10000000000000001,
0.69813170079773179 },
- { 0.85524561882332051, 0.10000000000000009, 0.10000000000000001,
+ { 0.89340330535868662, 0.10000000000000009, 0.10000000000000001,
0.87266462599716477 },
- { 1.0193708301908335, 0.10000000000000009, 0.10000000000000001,
+ { 1.0811075784236857, 0.10000000000000009, 0.10000000000000001,
1.0471975511965976 },
- { 1.1813474067123044, 0.10000000000000009, 0.10000000000000001,
+ { 1.2720133232666426, 0.10000000000000009, 0.10000000000000001,
1.2217304763960306 },
- { 1.3417670770424983, 0.10000000000000009, 0.10000000000000001,
+ { 1.4653630031861395, 0.10000000000000009, 0.10000000000000001,
1.3962634015954636 },
- { 1.5013711111199950, 0.10000000000000009, 0.10000000000000001,
+ { 1.6600374067558428, 0.10000000000000009, 0.10000000000000001,
1.5707963267948966 },
};
const double toler102 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.20000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.4399947764827574e-16
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 1.6736714959992433e-16
+// mean(f - f_Boost): 5.5511151231257830e-18
+// variance(f - f_Boost): 3.8043060629871325e-36
+// stddev(f - f_Boost): 1.9504630380981673e-18
const testcase_ellint_3<double>
data103[10] =
{
{ 0.0000000000000000, 0.10000000000000009, 0.20000000000000001,
0.0000000000000000 },
- { 0.17419068786141340, 0.10000000000000009, 0.20000000000000001,
+ { 0.17489533344059083, 0.10000000000000009, 0.20000000000000001,
0.17453292519943295 },
- { 0.34640537686230133, 0.10000000000000009, 0.20000000000000001,
+ { 0.35194305707815038, 0.10000000000000009, 0.20000000000000001,
0.34906585039886590 },
- { 0.51502689171753946, 0.10000000000000009, 0.20000000000000001,
+ { 0.53317790741512527, 0.10000000000000009, 0.20000000000000001,
0.52359877559829882 },
- { 0.67904147863672715, 0.10000000000000009, 0.20000000000000001,
+ { 0.72036681615081222, 0.10000000000000009, 0.20000000000000001,
0.69813170079773179 },
- { 0.83811885126105179, 0.10000000000000009, 0.20000000000000001,
+ { 0.91480372268244303, 0.10000000000000009, 0.20000000000000001,
0.87266462599716477 },
- { 0.99255278555742787, 0.10000000000000009, 0.20000000000000001,
+ { 1.1170528708071514, 0.10000000000000009, 0.20000000000000001,
1.0471975511965976 },
- { 1.1431260546194930, 0.10000000000000009, 0.20000000000000001,
+ { 1.3266916802718358, 0.10000000000000009, 0.20000000000000001,
1.2217304763960306 },
- { 1.2909589656532101, 0.10000000000000009, 0.20000000000000001,
+ { 1.5421622241831547, 0.10000000000000009, 0.20000000000000001,
1.3962634015954636 },
- { 1.4373749386463430, 0.10000000000000009, 0.20000000000000001,
+ { 1.7608656115083421, 0.10000000000000009, 0.20000000000000001,
1.5707963267948966 },
};
const double toler103 = 2.5000000000000020e-13;
-// Test data for k=0.10000000000000009, nu=0.29999999999999999.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.5650492137236872e-16
+// Test data for k=0.10000000000000009, nu=0.30000000000000004.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 1.9186071760326645e-16
+// mean(f - f_Boost): -1.6653345369377347e-17
+// variance(f - f_Boost): 3.4238754566884194e-35
+// stddev(f - f_Boost): 5.8513891142945016e-18
const testcase_ellint_3<double>
data104[10] =
{
- { 0.0000000000000000, 0.10000000000000009, 0.29999999999999999,
+ { 0.0000000000000000, 0.10000000000000009, 0.30000000000000004,
0.0000000000000000 },
- { 0.17401611261390104, 0.10000000000000009, 0.29999999999999999,
+ { 0.17507310163441189, 0.10000000000000009, 0.30000000000000004,
0.17453292519943295 },
- { 0.34506869507511773, 0.10000000000000009, 0.29999999999999999,
+ { 0.35337768072524217, 0.10000000000000009, 0.30000000000000004,
0.34906585039886590 },
- { 0.51081757604259859, 0.10000000000000009, 0.29999999999999999,
+ { 0.53808167801629170, 0.10000000000000009, 0.30000000000000004,
0.52359877559829882 },
- { 0.66992297597712303, 0.10000000000000009, 0.29999999999999999,
+ { 0.73215166755955019, 0.10000000000000009, 0.30000000000000004,
0.69813170079773179 },
- { 0.82209722856174228, 0.10000000000000009, 0.29999999999999999,
+ { 0.93806546000201219, 0.10000000000000009, 0.30000000000000004,
0.87266462599716477 },
- { 0.96792430487669590, 0.10000000000000009, 0.29999999999999999,
+ { 1.1573218723395986, 0.10000000000000009, 0.30000000000000004,
1.0471975511965976 },
- { 1.1085964108954092, 0.10000000000000009, 0.29999999999999999,
+ { 1.3897859679542097, 0.10000000000000009, 0.30000000000000004,
1.2217304763960306 },
- { 1.2456748370836999, 0.10000000000000009, 0.29999999999999999,
+ { 1.6331009404328622, 0.10000000000000009, 0.30000000000000004,
1.3962634015954636 },
- { 1.3809159606704959, 0.10000000000000009, 0.29999999999999999,
+ { 1.8826015946315438, 0.10000000000000009, 0.30000000000000004,
1.5707963267948966 },
};
const double toler104 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.40000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.6854758534459740e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.0338059536914377e-16
+// mean(f - f_Boost): 2.7755575615628914e-17
+// variance(f - f_Boost): 9.5107651574678308e-35
+// stddev(f - f_Boost): 9.7523151904908362e-18
const testcase_ellint_3<double>
data105[10] =
{
{ 0.0000000000000000, 0.10000000000000009, 0.40000000000000002,
0.0000000000000000 },
- { 0.17384216369897931, 0.10000000000000009, 0.40000000000000002,
+ { 0.17525152094559704, 0.10000000000000009, 0.40000000000000002,
0.17453292519943295 },
- { 0.34375018311376787, 0.10000000000000009, 0.40000000000000002,
+ { 0.35483343742825979, 0.10000000000000009, 0.40000000000000002,
0.34906585039886590 },
- { 0.50672650758380455, 0.10000000000000009, 0.40000000000000002,
+ { 0.54314913099505446, 0.10000000000000009, 0.40000000000000002,
0.52359877559829882 },
- { 0.66121264213337616, 0.10000000000000009, 0.40000000000000002,
+ { 0.74463962034766862, 0.10000000000000009, 0.40000000000000002,
0.69813170079773179 },
- { 0.80706202005774441, 0.10000000000000009, 0.40000000000000002,
+ { 0.96349276837570441, 0.10000000000000009, 0.40000000000000002,
0.87266462599716477 },
- { 0.94519376138245870, 0.10000000000000009, 0.40000000000000002,
+ { 1.2029081382746343, 0.10000000000000009, 0.40000000000000002,
1.0471975511965976 },
- { 1.0771880300759584, 0.10000000000000009, 0.40000000000000002,
+ { 1.4638022887050806, 0.10000000000000009, 0.40000000000000002,
1.2217304763960306 },
- { 1.2049711557188272, 0.10000000000000009, 0.40000000000000002,
+ { 1.7432413830105224, 0.10000000000000009, 0.40000000000000002,
1.3962634015954636 },
- { 1.3306223265207477, 0.10000000000000009, 0.40000000000000002,
+ { 2.0336367403076760, 0.10000000000000009, 0.40000000000000002,
1.5707963267948966 },
};
const double toler105 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.50000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8017534281650347e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.9864616042835278e-16
+// mean(f - f_Boost): 9.4368957093138303e-17
+// variance(f - f_Boost): 7.7794254682023874e-32
+// stddev(f - f_Boost): 2.7891621444803792e-16
const testcase_ellint_3<double>
data106[10] =
{
{ 0.0000000000000000, 0.10000000000000009, 0.50000000000000000,
0.0000000000000000 },
- { 0.17366883711936548, 0.10000000000000009, 0.50000000000000000,
+ { 0.17543059564292182, 0.10000000000000009, 0.50000000000000000,
0.17453292519943295 },
- { 0.34244940634881882, 0.10000000000000009, 0.50000000000000000,
+ { 0.35631088838721664, 0.10000000000000009, 0.50000000000000000,
0.34906585039886590 },
- { 0.50274793281634367, 0.10000000000000009, 0.50000000000000000,
+ { 0.54839023346436455, 0.10000000000000009, 0.50000000000000000,
0.52359877559829882 },
- { 0.65287941633275082, 0.10000000000000009, 0.50000000000000000,
+ { 0.75790846946088830, 0.10000000000000009, 0.50000000000000000,
0.69813170079773179 },
- { 0.79291198790315398, 0.10000000000000009, 0.50000000000000000,
+ { 0.99146713686720678, 0.10000000000000009, 0.50000000000000000,
0.87266462599716477 },
- { 0.92412201537880323, 0.10000000000000009, 0.50000000000000000,
+ { 1.2551692247937198, 0.10000000000000009, 0.50000000000000000,
1.0471975511965976 },
- { 1.0484480076799372, 0.10000000000000009, 0.50000000000000000,
+ { 1.5524660788146873, 0.10000000000000009, 0.50000000000000000,
1.2217304763960306 },
- { 1.1681168130475206, 0.10000000000000009, 0.50000000000000000,
+ { 1.8806578570830670, 0.10000000000000009, 0.50000000000000000,
1.3962634015954636 },
- { 1.2854480708580160, 0.10000000000000009, 0.50000000000000000,
+ { 2.2279868912966849, 0.10000000000000009, 0.50000000000000000,
1.5707963267948966 },
};
const double toler106 = 2.5000000000000020e-13;
-// Test data for k=0.10000000000000009, nu=0.59999999999999998.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.9142834151672032e-16
+// Test data for k=0.10000000000000009, nu=0.60000000000000009.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.6726146516228014e-16
+// mean(f - f_Boost): -3.6082248300317589e-17
+// variance(f - f_Boost): 1.6073193116120635e-34
+// stddev(f - f_Boost): 1.2678009747638087e-17
const testcase_ellint_3<double>
data107[10] =
{
- { 0.0000000000000000, 0.10000000000000009, 0.59999999999999998,
+ { 0.0000000000000000, 0.10000000000000009, 0.60000000000000009,
0.0000000000000000 },
- { 0.17349612891469013, 0.10000000000000009, 0.59999999999999998,
+ { 0.17561033003590576, 0.10000000000000009, 0.60000000000000009,
0.17453292519943295 },
- { 0.34116594505539444, 0.10000000000000009, 0.59999999999999998,
+ { 0.35781061668171932, 0.10000000000000009, 0.60000000000000009,
0.34906585039886590 },
- { 0.49887649430466674, 0.10000000000000009, 0.59999999999999998,
+ { 0.55381585659629196, 0.10000000000000009, 0.60000000000000009,
0.52359877559829882 },
- { 0.64489553282165146, 0.10000000000000009, 0.59999999999999998,
+ { 0.77204910484575640, 0.10000000000000009, 0.60000000000000009,
0.69813170079773179 },
- { 0.77956016553782437, 0.10000000000000009, 0.59999999999999998,
+ { 1.0224751740393108, 0.10000000000000009, 0.60000000000000009,
0.87266462599716477 },
- { 0.90451074530096287, 0.10000000000000009, 0.59999999999999998,
+ { 1.3160230906351114, 0.10000000000000009, 0.60000000000000009,
1.0471975511965976 },
- { 1.0220113666961632, 0.10000000000000009, 0.59999999999999998,
+ { 1.6616282844233206, 0.10000000000000009, 0.60000000000000009,
1.2217304763960306 },
- { 1.1345351441065563, 0.10000000000000009, 0.59999999999999998,
+ { 2.0592555664850392, 0.10000000000000009, 0.60000000000000009,
1.3962634015954636 },
- { 1.2445798942989255, 0.10000000000000009, 0.59999999999999998,
+ { 2.4913004919173822, 0.10000000000000009, 0.60000000000000009,
1.5707963267948966 },
};
const double toler107 = 2.5000000000000020e-13;
-// Test data for k=0.10000000000000009, nu=0.69999999999999996.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.5172091551439012e-16
+// Test data for k=0.10000000000000009, nu=0.70000000000000007.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 5
+// max(|f - f_Boost| / |f_Boost|): 2.1004074871280821e-16
+// mean(f - f_Boost): 3.3306690738754695e-17
+// variance(f - f_Boost): 1.3695501826753678e-34
+// stddev(f - f_Boost): 1.1702778228589003e-17
const testcase_ellint_3<double>
data108[10] =
{
- { 0.0000000000000000, 0.10000000000000009, 0.69999999999999996,
+ { 0.0000000000000000, 0.10000000000000009, 0.70000000000000007,
0.0000000000000000 },
- { 0.17332403516105047, 0.10000000000000009, 0.69999999999999996,
+ { 0.17579072847532518, 0.10000000000000009, 0.70000000000000007,
0.17453292519943295 },
- { 0.33989939374896883, 0.10000000000000009, 0.69999999999999996,
+ { 0.35933322840606297, 0.10000000000000009, 0.70000000000000007,
0.34906585039886590 },
- { 0.49510719568614070, 0.10000000000000009, 0.69999999999999996,
+ { 0.55943788649460324, 0.10000000000000009, 0.70000000000000007,
0.52359877559829882 },
- { 0.63723607776354974, 0.10000000000000009, 0.69999999999999996,
+ { 0.78716856504031707, 0.10000000000000009, 0.70000000000000007,
0.69813170079773179 },
- { 0.76693133887935327, 0.10000000000000009, 0.69999999999999996,
+ { 1.0571501305617423, 0.10000000000000009, 0.70000000000000007,
0.87266462599716477 },
- { 0.88619382078823805, 0.10000000000000009, 0.69999999999999996,
+ { 1.3882948301743525, 0.10000000000000009, 0.70000000000000007,
1.0471975511965976 },
- { 0.99758012018676490, 0.10000000000000009, 0.69999999999999996,
+ { 1.8011785680114223, 0.10000000000000009, 0.70000000000000007,
1.2217304763960306 },
- { 1.1037642270814410, 0.10000000000000009, 0.69999999999999996,
+ { 2.3057268183616464, 0.10000000000000009, 0.70000000000000007,
1.3962634015954636 },
- { 1.2073745911083185, 0.10000000000000009, 0.69999999999999996,
+ { 2.8771910188009739, 0.10000000000000009, 0.70000000000000007,
1.5707963267948966 },
};
const double toler108 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1294144515772258e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.3133043868392355e-16
+// mean(f - f_Boost): 1.8041124150158794e-16
+// variance(f - f_Boost): 6.1843750436434569e-32
+// stddev(f - f_Boost): 2.4868403735751633e-16
const testcase_ellint_3<double>
data109[10] =
{
{ 0.0000000000000000, 0.10000000000000009, 0.80000000000000004,
0.0000000000000000 },
- { 0.17315255197057014, 0.10000000000000009, 0.80000000000000004,
+ { 0.17597179535373417, 0.10000000000000009, 0.80000000000000004,
0.17453292519943295 },
- { 0.33864936055747991, 0.10000000000000009, 0.80000000000000004,
+ { 0.36087935387831499, 0.10000000000000009, 0.80000000000000004,
0.34906585039886590 },
- { 0.49143537041117613, 0.10000000000000009, 0.80000000000000004,
+ { 0.56526935244526444, 0.10000000000000009, 0.80000000000000004,
0.52359877559829882 },
- { 0.62987861760047492, 0.10000000000000009, 0.80000000000000004,
+ { 0.80339402590612397, 0.10000000000000009, 0.80000000000000004,
0.69813170079773179 },
- { 0.75496005490917517, 0.10000000000000009, 0.80000000000000004,
+ { 1.0963358646374459, 0.10000000000000009, 0.80000000000000004,
0.87266462599716477 },
- { 0.86903081862701881, 0.10000000000000009, 0.80000000000000004,
+ { 1.4763748483246868, 0.10000000000000009, 0.80000000000000004,
1.0471975511965976 },
- { 0.97490814820725591, 0.10000000000000009, 0.80000000000000004,
+ { 1.9896610222794102, 0.10000000000000009, 0.80000000000000004,
1.2217304763960306 },
- { 1.0754290107171083, 0.10000000000000009, 0.80000000000000004,
+ { 2.6806423920122024, 0.10000000000000009, 0.80000000000000004,
1.3962634015954636 },
- { 1.1733158866987732, 0.10000000000000009, 0.80000000000000004,
+ { 3.5246199613295612, 0.10000000000000009, 0.80000000000000004,
1.5707963267948966 },
};
const double toler109 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.90000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2325599449457852e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.5624826890976725e-16
+// mean(f - f_Boost): 2.3314683517128288e-16
+// variance(f - f_Boost): 2.9401198977189756e-31
+// stddev(f - f_Boost): 5.4222872459129045e-16
const testcase_ellint_3<double>
data110[10] =
{
{ 0.0000000000000000, 0.10000000000000009, 0.90000000000000002,
0.0000000000000000 },
- { 0.17298167549096563, 0.10000000000000009, 0.90000000000000002,
+ { 0.17615353510599349, 0.10000000000000009, 0.90000000000000002,
0.17453292519943295 },
- { 0.33741546662741589, 0.10000000000000009, 0.90000000000000002,
+ { 0.36244964892922371, 0.10000000000000009, 0.90000000000000002,
0.34906585039886590 },
- { 0.48785665376856868, 0.10000000000000009, 0.90000000000000002,
+ { 0.57132457590110530, 0.10000000000000009, 0.90000000000000002,
0.52359877559829882 },
- { 0.62280288554518959, 0.10000000000000009, 0.90000000000000002,
+ { 0.82087808820385000, 0.10000000000000009, 0.90000000000000002,
0.69813170079773179 },
- { 0.74358903115455188, 0.10000000000000009, 0.90000000000000002,
+ { 1.1411894342144451, 0.10000000000000009, 0.90000000000000002,
0.87266462599716477 },
- { 0.85290207679298335, 0.10000000000000009, 0.90000000000000002,
+ { 1.5875929286844597, 0.10000000000000009, 0.90000000000000002,
1.0471975511965976 },
- { 0.95379006645397379, 0.10000000000000009, 0.90000000000000002,
+ { 2.2678622986596659, 0.10000000000000009, 0.90000000000000002,
1.2217304763960306 },
- { 1.0492213119872327, 0.10000000000000009, 0.90000000000000002,
+ { 3.3697528941897903, 0.10000000000000009, 0.90000000000000002,
1.3962634015954636 },
- { 1.1419839485283374, 0.10000000000000009, 0.90000000000000002,
+ { 4.9862890417305499, 0.10000000000000009, 0.90000000000000002,
1.5707963267948966 },
};
const double toler110 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996, nu=0.0000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2156475739151676e-16
+// Test data for k=0.20000000000000018, nu=0.0000000000000000.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 4.2156475739151676e-16
+// mean(f - f_Boost): -5.2735593669694933e-17
+// variance(f - f_Boost): 3.0473442641042680e-32
+// stddev(f - f_Boost): 1.7456644190978597e-16
const testcase_ellint_3<double>
data111[10] =
{
- { 0.0000000000000000, 0.19999999999999996, 0.0000000000000000,
+ { 0.0000000000000000, 0.20000000000000018, 0.0000000000000000,
0.0000000000000000 },
- { 0.17456817290292809, 0.19999999999999996, 0.0000000000000000,
+ { 0.17456817290292806, 0.20000000000000018, 0.0000000000000000,
0.17453292519943295 },
- { 0.34934315932086801, 0.19999999999999996, 0.0000000000000000,
+ { 0.34934315932086796, 0.20000000000000018, 0.0000000000000000,
0.34906585039886590 },
- { 0.52450880529443988, 0.19999999999999996, 0.0000000000000000,
+ { 0.52450880529443988, 0.20000000000000018, 0.0000000000000000,
0.52359877559829882 },
- { 0.70020491009844876, 0.19999999999999996, 0.0000000000000000,
+ { 0.70020491009844887, 0.20000000000000018, 0.0000000000000000,
0.69813170079773179 },
- { 0.87651006649967955, 0.19999999999999996, 0.0000000000000000,
+ { 0.87651006649967977, 0.20000000000000018, 0.0000000000000000,
0.87266462599716477 },
- { 1.0534305870298994, 0.19999999999999996, 0.0000000000000000,
+ { 1.0534305870298994, 0.20000000000000018, 0.0000000000000000,
1.0471975511965976 },
- { 1.2308975521670784, 0.19999999999999996, 0.0000000000000000,
+ { 1.2308975521670789, 0.20000000000000018, 0.0000000000000000,
1.2217304763960306 },
- { 1.4087733584990738, 0.19999999999999996, 0.0000000000000000,
+ { 1.4087733584990738, 0.20000000000000018, 0.0000000000000000,
1.3962634015954636 },
- { 1.5868678474541660, 0.19999999999999996, 0.0000000000000000,
+ { 1.5868678474541662, 0.20000000000000018, 0.0000000000000000,
1.5707963267948966 },
};
const double toler111 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996, nu=0.10000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3374593253183472e-16
+// Test data for k=0.20000000000000018, nu=0.10000000000000001.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 4.0890622182605400e-16
+// mean(f - f_Boost): -3.8857805861880476e-17
+// variance(f - f_Boost): 2.8794792590749608e-32
+// stddev(f - f_Boost): 1.6969028431454054e-16
const testcase_ellint_3<double>
data112[10] =
{
- { 0.0000000000000000, 0.19999999999999996, 0.10000000000000001,
+ { 0.0000000000000000, 0.20000000000000018, 0.10000000000000001,
0.0000000000000000 },
- { 0.17439228502691748, 0.19999999999999996, 0.10000000000000001,
+ { 0.17474469953608965, 0.20000000000000018, 0.10000000000000001,
0.17453292519943295 },
- { 0.34796731137565740, 0.19999999999999996, 0.10000000000000001,
+ { 0.35073860234984255, 0.20000000000000018, 0.10000000000000001,
0.34906585039886590 },
- { 0.52003370294544848, 0.19999999999999996, 0.10000000000000001,
+ { 0.52912258712951521, 0.20000000000000018, 0.10000000000000001,
0.52359877559829882 },
- { 0.69012222258631462, 0.19999999999999996, 0.10000000000000001,
+ { 0.71081701558898069, 0.20000000000000018, 0.10000000000000001,
0.69813170079773179 },
- { 0.85803491465566772, 0.19999999999999996, 0.10000000000000001,
+ { 0.89640758521169384, 0.20000000000000018, 0.10000000000000001,
0.87266462599716477 },
- { 1.0238463961099364, 0.19999999999999996, 0.10000000000000001,
+ { 1.0860417038089853, 0.20000000000000018, 0.10000000000000001,
1.0471975511965976 },
- { 1.1878691059202153, 0.19999999999999996, 0.10000000000000001,
+ { 1.2793599255528623, 0.20000000000000018, 0.10000000000000001,
1.2217304763960306 },
- { 1.3505985031831940, 0.19999999999999996, 0.10000000000000001,
+ { 1.4754938544089076, 0.20000000000000018, 0.10000000000000001,
1.3962634015954636 },
- { 1.5126513474261087, 0.19999999999999996, 0.10000000000000001,
+ { 1.6731552050562593, 0.20000000000000018, 0.10000000000000001,
1.5707963267948966 },
};
const double toler112 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996, nu=0.20000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.4549984059502760e-16
+// Test data for k=0.20000000000000018, nu=0.20000000000000001.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 3.9570963716579749e-16
+// mean(f - f_Boost): -5.8286708792820721e-17
+// variance(f - f_Boost): 3.1158217732380362e-32
+// stddev(f - f_Boost): 1.7651690494788412e-16
const testcase_ellint_3<double>
data113[10] =
{
- { 0.0000000000000000, 0.19999999999999996, 0.20000000000000001,
+ { 0.0000000000000000, 0.20000000000000018, 0.20000000000000001,
0.0000000000000000 },
- { 0.17421703179583747, 0.19999999999999996, 0.20000000000000001,
+ { 0.17492186907740698, 0.20000000000000018, 0.20000000000000001,
0.17453292519943295 },
- { 0.34661057411998791, 0.19999999999999996, 0.20000000000000001,
+ { 0.35215414286134267, 0.20000000000000018, 0.20000000000000001,
0.34906585039886590 },
- { 0.51569006052647393, 0.19999999999999996, 0.20000000000000001,
+ { 0.53388285615182440, 0.20000000000000018, 0.20000000000000001,
0.52359877559829882 },
- { 0.68052412821107244, 0.19999999999999996, 0.20000000000000001,
+ { 0.72200960282688265, 0.20000000000000018, 0.20000000000000001,
0.69813170079773179 },
- { 0.84081341263313825, 0.19999999999999996, 0.20000000000000001,
+ { 0.91793087614428526, 0.20000000000000018, 0.20000000000000001,
0.87266462599716477 },
- { 0.99683359988842890, 0.19999999999999996, 0.20000000000000001,
+ { 1.1222602841587976, 0.20000000000000018, 0.20000000000000001,
1.0471975511965976 },
- { 1.1493086715118852, 0.19999999999999996, 0.20000000000000001,
+ { 1.3345489407496247, 0.20000000000000018, 0.20000000000000001,
1.2217304763960306 },
- { 1.2992699693957541, 0.19999999999999996, 0.20000000000000001,
+ { 1.5531225705475502, 0.20000000000000018, 0.20000000000000001,
1.3962634015954636 },
- { 1.4479323932249564, 0.19999999999999996, 0.20000000000000001,
+ { 1.7751816279738935, 0.20000000000000018, 0.20000000000000001,
1.5707963267948966 },
};
const double toler113 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996, nu=0.29999999999999999.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.3140668101543467e-16
+// Test data for k=0.20000000000000018, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.6785817924053817e-16
+// mean(f - f_Boost): -1.1102230246251566e-17
+// variance(f - f_Boost): 9.9840208317034302e-32
+// stddev(f - f_Boost): 3.1597501217190311e-16
const testcase_ellint_3<double>
data114[10] =
{
- { 0.0000000000000000, 0.19999999999999996, 0.29999999999999999,
+ { 0.0000000000000000, 0.20000000000000018, 0.30000000000000004,
0.0000000000000000 },
- { 0.17404240913577704, 0.19999999999999996, 0.29999999999999999,
+ { 0.17509968571715159, 0.20000000000000018, 0.30000000000000004,
0.17453292519943295 },
- { 0.34527248032587193, 0.19999999999999996, 0.29999999999999999,
+ { 0.35359030214835629, 0.20000000000000018, 0.30000000000000004,
0.34906585039886590 },
- { 0.51147118981668416, 0.19999999999999996, 0.29999999999999999,
+ { 0.53879807274537084, 0.20000000000000018, 0.30000000000000004,
0.52359877559829882 },
- { 0.67137107867777601, 0.19999999999999996, 0.29999999999999999,
+ { 0.73384116418059731, 0.20000000000000018, 0.30000000000000004,
0.69813170079773179 },
- { 0.82470418188668893, 0.19999999999999996, 0.29999999999999999,
+ { 0.94132799329524031, 0.20000000000000018, 0.30000000000000004,
0.87266462599716477 },
- { 0.97202873223594299, 0.19999999999999996, 0.29999999999999999,
+ { 1.1628407021801439, 0.20000000000000018, 0.30000000000000004,
1.0471975511965976 },
- { 1.1144773569375266, 0.19999999999999996, 0.29999999999999999,
+ { 1.3982440216739438, 0.20000000000000018, 0.30000000000000004,
1.2217304763960306 },
- { 1.2535292433701000, 0.19999999999999996, 0.29999999999999999,
+ { 1.6450634983653640, 0.20000000000000018, 0.30000000000000004,
1.3962634015954636 },
- { 1.3908453514752477, 0.19999999999999996, 0.29999999999999999,
+ { 1.8983924169967099, 0.20000000000000018, 0.30000000000000004,
1.5707963267948966 },
};
const double toler114 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996, nu=0.40000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.6788709752760483e-16
+// Test data for k=0.20000000000000018, nu=0.40000000000000002.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 3.6738449250038925e-16
+// mean(f - f_Boost): -3.0531133177191807e-17
+// variance(f - f_Boost): 2.7810428396951687e-32
+// stddev(f - f_Boost): 1.6676458975739331e-16
const testcase_ellint_3<double>
data115[10] =
{
- { 0.0000000000000000, 0.19999999999999996, 0.40000000000000002,
+ { 0.0000000000000000, 0.20000000000000018, 0.40000000000000002,
0.0000000000000000 },
- { 0.17386841301066674, 0.19999999999999996, 0.40000000000000002,
+ { 0.17527815368535152, 0.20000000000000018, 0.40000000000000002,
0.17453292519943295 },
- { 0.34395257914113253, 0.19999999999999996, 0.40000000000000002,
+ { 0.35504762134297801, 0.20000000000000018, 0.40000000000000002,
0.34906585039886590 },
- { 0.50737088376869466, 0.19999999999999996, 0.40000000000000002,
+ { 0.54387742353211344, 0.20000000000000018, 0.40000000000000002,
0.52359877559829882 },
- { 0.66262801717277631, 0.19999999999999996, 0.40000000000000002,
+ { 0.74637910471804259, 0.20000000000000018, 0.40000000000000002,
0.69813170079773179 },
- { 0.80958766645079094, 0.19999999999999996, 0.40000000000000002,
+ { 0.96690539714174639, 0.20000000000000018, 0.40000000000000002,
0.87266462599716477 },
- { 0.94913754236162040, 0.19999999999999996, 0.40000000000000002,
+ { 1.2087859420184757, 0.20000000000000018, 0.40000000000000002,
1.0471975511965976 },
- { 1.0827985514222997, 0.19999999999999996, 0.40000000000000002,
+ { 1.4729799844168852, 0.20000000000000018, 0.40000000000000002,
1.2217304763960306 },
- { 1.2124212429050478, 0.19999999999999996, 0.40000000000000002,
+ { 1.7564445064596661, 0.20000000000000018, 0.40000000000000002,
1.3962634015954636 },
- { 1.3400002519661005, 0.19999999999999996, 0.40000000000000002,
+ { 2.0512956926676806, 0.20000000000000018, 0.40000000000000002,
1.5707963267948966 },
};
const double toler115 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996, nu=0.50000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.7788201301356829e-16
+// Test data for k=0.20000000000000018, nu=0.50000000000000000.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.3841806057292116e-16
+// mean(f - f_Boost): 3.6082248300317589e-17
+// variance(f - f_Boost): 8.9638010532618564e-32
+// stddev(f - f_Boost): 2.9939607634806868e-16
const testcase_ellint_3<double>
data116[10] =
{
- { 0.0000000000000000, 0.19999999999999996, 0.50000000000000000,
+ { 0.0000000000000000, 0.20000000000000018, 0.50000000000000000,
0.0000000000000000 },
- { 0.17369503942181799, 0.19999999999999996, 0.50000000000000000,
+ { 0.17545727725228877, 0.20000000000000018, 0.50000000000000000,
0.17453292519943295 },
- { 0.34265043534362660, 0.19999999999999996, 0.50000000000000000,
+ { 0.35652666242062175, 0.20000000000000018, 0.50000000000000000,
0.34906585039886590 },
- { 0.50338337208655415, 0.19999999999999996, 0.50000000000000000,
+ { 0.54913090549102406, 0.20000000000000018, 0.50000000000000000,
0.52359877559829882 },
- { 0.65426373297163609, 0.19999999999999996, 0.50000000000000000,
+ { 0.75970161209211551, 0.20000000000000018, 0.50000000000000000,
0.69813170079773179 },
- { 0.79536193036145808, 0.19999999999999996, 0.50000000000000000,
+ { 0.99504737401590326, 0.20000000000000018, 0.50000000000000000,
0.87266462599716477 },
- { 0.92791875910061605, 0.19999999999999996, 0.50000000000000000,
+ { 1.2614666007124373, 0.20000000000000018, 0.50000000000000000,
1.0471975511965976 },
- { 1.0538145052725829, 0.19999999999999996, 0.50000000000000000,
+ { 1.5625255355205498, 0.20000000000000018, 0.50000000000000000,
1.2217304763960306 },
- { 1.1752060022875899, 0.19999999999999996, 0.50000000000000000,
+ { 1.8954460255613346, 0.20000000000000018, 0.50000000000000000,
1.3962634015954636 },
- { 1.2943374404397372, 0.19999999999999996, 0.50000000000000000,
+ { 2.2481046259421302, 0.20000000000000018, 0.50000000000000000,
1.5707963267948966 },
};
const double toler116 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996, nu=0.59999999999999998.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.8899223779598256e-16
+// Test data for k=0.20000000000000018, nu=0.60000000000000009.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.5317584994994743e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 1.0045745697575397e-31
+// stddev(f - f_Boost): 3.1695024369095219e-16
const testcase_ellint_3<double>
data117[10] =
{
- { 0.0000000000000000, 0.19999999999999996, 0.59999999999999998,
+ { 0.0000000000000000, 0.20000000000000018, 0.60000000000000009,
0.0000000000000000 },
- { 0.17352228440746925, 0.19999999999999996, 0.59999999999999998,
+ { 0.17563706072900442, 0.20000000000000018, 0.60000000000000009,
0.17453292519943295 },
- { 0.34136562863713626, 0.19999999999999996, 0.59999999999999998,
+ { 0.35802800926807238, 0.20000000000000018, 0.60000000000000009,
0.34906585039886590 },
- { 0.49950328177638481, 0.19999999999999996, 0.59999999999999998,
+ { 0.55456942250515051, 0.20000000000000018, 0.60000000000000009,
0.52359877559829882 },
- { 0.64625032705690799, 0.19999999999999996, 0.59999999999999998,
+ { 0.77390003828438203, 0.20000000000000018, 0.60000000000000009,
0.69813170079773179 },
- { 0.78193941198403083, 0.19999999999999996, 0.59999999999999998,
+ { 1.0262441366366397, 0.20000000000000018, 0.60000000000000009,
0.87266462599716477 },
- { 0.90817230934317128, 0.19999999999999996, 0.59999999999999998,
+ { 1.3228192988439669, 0.20000000000000018, 0.60000000000000009,
1.0471975511965976 },
- { 1.0271563751276462, 0.19999999999999996, 0.59999999999999998,
+ { 1.6728005754680795, 0.20000000000000018, 0.60000000000000009,
1.2217304763960306 },
- { 1.1412999379040518, 0.19999999999999996, 0.59999999999999998,
+ { 2.0761587107468511, 0.20000000000000018, 0.60000000000000009,
1.3962634015954636 },
- { 1.2530330675914556, 0.19999999999999996, 0.59999999999999998,
+ { 2.5148333891629315, 0.20000000000000018, 0.60000000000000009,
1.5707963267948966 },
};
const double toler117 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996, nu=0.69999999999999996.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 5.9999318361775115e-16
+// Test data for k=0.20000000000000018, nu=0.70000000000000007.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.2209418045118284e-16
+// mean(f - f_Boost): 2.4980018054066023e-17
+// variance(f - f_Boost): 9.1989071679544611e-32
+// stddev(f - f_Boost): 3.0329700242426498e-16
const testcase_ellint_3<double>
data118[10] =
{
- { 0.0000000000000000, 0.19999999999999996, 0.69999999999999996,
+ { 0.0000000000000000, 0.20000000000000018, 0.70000000000000007,
0.0000000000000000 },
- { 0.17335014404233895, 0.19999999999999996, 0.69999999999999996,
+ { 0.17581750846781172, 0.20000000000000018, 0.70000000000000007,
0.17453292519943295 },
- { 0.34009775298617811, 0.19999999999999996, 0.69999999999999996,
+ { 0.35955226882028513, 0.20000000000000018, 0.70000000000000007,
0.34906585039886590 },
- { 0.49572560201923810, 0.19999999999999996, 0.69999999999999996,
+ { 0.56020489659466499, 0.20000000000000018, 0.70000000000000007,
0.52359877559829882 },
- { 0.63856276669886503, 0.19999999999999996, 0.69999999999999996,
+ { 0.78908196988531498, 0.20000000000000018, 0.70000000000000007,
0.69813170079773179 },
- { 0.76924438644867565, 0.19999999999999996, 0.69999999999999996,
+ { 1.0611336754143517, 0.20000000000000018, 0.70000000000000007,
0.87266462599716477 },
- { 0.88973060843856466, 0.19999999999999996, 0.69999999999999996,
+ { 1.3956969951058884, 0.20000000000000018, 0.70000000000000007,
1.0471975511965976 },
- { 1.0025230471636377, 0.19999999999999996, 0.69999999999999996,
+ { 1.8138131612209609, 0.20000000000000018, 0.70000000000000007,
1.2217304763960306 },
- { 1.1102356376093103, 0.19999999999999996, 0.69999999999999996,
+ { 2.3256365528879561, 0.20000000000000018, 0.70000000000000007,
1.3962634015954636 },
- { 1.2154356555075863, 0.19999999999999996, 0.69999999999999996,
+ { 2.9058704854500963, 0.20000000000000018, 0.70000000000000007,
1.5707963267948966 },
};
const double toler118 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 5.0901276230707249e-16
+// Test data for k=0.20000000000000018, nu=0.80000000000000004.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.7399960886656824e-16
+// mean(f - f_Boost): 1.3877787807814457e-16
+// variance(f - f_Boost): 1.7585404776158019e-31
+// stddev(f - f_Boost): 4.1934955319110593e-16
const testcase_ellint_3<double>
data119[10] =
{
- { 0.0000000000000000, 0.19999999999999996, 0.80000000000000004,
+ { 0.0000000000000000, 0.20000000000000018, 0.80000000000000004,
0.0000000000000000 },
- { 0.17317861443718538, 0.19999999999999996, 0.80000000000000004,
+ { 0.17599862486281712, 0.20000000000000018, 0.80000000000000004,
0.17453292519943295 },
- { 0.33884641598718701, 0.19999999999999996, 0.80000000000000004,
+ { 0.36110007227128776, 0.20000000000000018, 0.80000000000000004,
0.34906585039886590 },
- { 0.49204565281259494, 0.19999999999999996, 0.80000000000000004,
+ { 0.56605039658567224, 0.20000000000000018, 0.80000000000000004,
0.52359877559829882 },
- { 0.63117851188220320, 0.19999999999999996, 0.80000000000000004,
+ { 0.80537523874517691, 0.20000000000000018, 0.80000000000000004,
0.69813170079773179 },
- { 0.75721095949544170, 0.19999999999999996, 0.80000000000000004,
+ { 1.1005662342414086, 0.20000000000000018, 0.80000000000000004,
0.87266462599716477 },
- { 0.87245201443919118, 0.19999999999999996, 0.80000000000000004,
+ { 1.4845340298105778, 0.20000000000000018, 0.80000000000000004,
1.0471975511965976 },
- { 0.97966584238831089, 0.19999999999999996, 0.80000000000000004,
+ { 2.0043332244969392, 0.20000000000000018, 0.80000000000000004,
1.2217304763960306 },
- { 1.0816336325174360, 0.19999999999999996, 0.80000000000000004,
+ { 2.7052856676744761, 0.20000000000000018, 0.80000000000000004,
1.3962634015954636 },
- { 1.1810223448909909, 0.19999999999999996, 0.80000000000000004,
+ { 3.5622166386422633, 0.20000000000000018, 0.80000000000000004,
1.5707963267948966 },
};
const double toler119 = 2.5000000000000020e-13;
-// Test data for k=0.19999999999999996, nu=0.90000000000000002.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 6.4833128442756722e-16
+// Test data for k=0.20000000000000018, nu=0.90000000000000002.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1718503329017390e-16
+// mean(f - f_Boost): 2.3592239273284576e-16
+// variance(f - f_Boost): 2.9295534376290287e-31
+// stddev(f - f_Boost): 5.4125349307224141e-16
const testcase_ellint_3<double>
data120[10] =
{
- { 0.0000000000000000, 0.19999999999999996, 0.90000000000000002,
+ { 0.0000000000000000, 0.20000000000000018, 0.90000000000000002,
0.0000000000000000 },
- { 0.17300769173837277, 0.19999999999999996, 0.90000000000000002,
+ { 0.17618041435044951, 0.20000000000000018, 0.90000000000000002,
0.17453292519943295 },
- { 0.33761123827372508, 0.19999999999999996, 0.90000000000000002,
+ { 0.36267207636502929, 0.20000000000000018, 0.90000000000000002,
0.34906585039886590 },
- { 0.48845905690769426, 0.19999999999999996, 0.90000000000000002,
+ { 0.57212028758237743, 0.20000000000000018, 0.90000000000000002,
0.52359877559829882 },
- { 0.62407720017324952, 0.19999999999999996, 0.90000000000000002,
+ { 0.82293323876704483, 0.20000000000000018, 0.90000000000000002,
0.69813170079773179 },
- { 0.74578146525124289, 0.19999999999999996, 0.90000000000000002,
+ { 1.1457077279880388, 0.20000000000000018, 0.90000000000000002,
0.87266462599716477 },
- { 0.85621583540073076, 0.19999999999999996, 0.90000000000000002,
+ { 1.5967346899325681, 0.20000000000000018, 0.90000000000000002,
1.0471975511965976 },
- { 0.95837725988001199, 0.19999999999999996, 0.90000000000000002,
+ { 2.2856537353421724, 0.20000000000000018, 0.90000000000000002,
1.2217304763960306 },
- { 1.0551821412633928, 0.19999999999999996, 0.90000000000000002,
+ { 3.4034714304613902, 0.20000000000000018, 0.90000000000000002,
1.3962634015954636 },
- { 1.1493679916141861, 0.19999999999999996, 0.90000000000000002,
+ { 5.0448269356200370, 0.20000000000000018, 0.90000000000000002,
1.5707963267948966 },
};
const double toler120 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.0000000000000000.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.3361874537309281e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.2241249691539529e-16
+// mean(f - f_Boost): 2.7755575615628914e-17
+// variance(f - f_Boost): 2.1399221604302621e-32
+// stddev(f - f_Boost): 1.4628472785736254e-16
const testcase_ellint_3<double>
data121[10] =
{
@@ -3528,19 +3890,19 @@ data121[10] =
0.0000000000000000 },
{ 0.17461228653000099, 0.30000000000000004, 0.0000000000000000,
0.17453292519943295 },
- { 0.34969146102798415, 0.30000000000000004, 0.0000000000000000,
+ { 0.34969146102798421, 0.30000000000000004, 0.0000000000000000,
0.34906585039886590 },
- { 0.52565822873726320, 0.30000000000000004, 0.0000000000000000,
+ { 0.52565822873726309, 0.30000000000000004, 0.0000000000000000,
0.52359877559829882 },
- { 0.70284226512408532, 0.30000000000000004, 0.0000000000000000,
+ { 0.70284226512408543, 0.30000000000000004, 0.0000000000000000,
0.69813170079773179 },
- { 0.88144139195111182, 0.30000000000000004, 0.0000000000000000,
+ { 0.88144139195111171, 0.30000000000000004, 0.0000000000000000,
0.87266462599716477 },
{ 1.0614897067260520, 0.30000000000000004, 0.0000000000000000,
1.0471975511965976 },
- { 1.2428416824174218, 0.30000000000000004, 0.0000000000000000,
+ { 1.2428416824174220, 0.30000000000000004, 0.0000000000000000,
1.2217304763960306 },
- { 1.4251795877015927, 0.30000000000000004, 0.0000000000000000,
+ { 1.4251795877015929, 0.30000000000000004, 0.0000000000000000,
1.3962634015954636 },
{ 1.6080486199305128, 0.30000000000000004, 0.0000000000000000,
1.5707963267948966 },
@@ -3548,559 +3910,619 @@ data121[10] =
const double toler121 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.10000000000000001.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.3908043711907203e-16
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1872304407982844e-16
+// mean(f - f_Boost): 7.2164496600635178e-17
+// variance(f - f_Boost): 4.3555500115139682e-32
+// stddev(f - f_Boost): 2.0869954507650391e-16
const testcase_ellint_3<double>
data122[10] =
{
{ 0.0000000000000000, 0.30000000000000004, 0.10000000000000001,
0.0000000000000000 },
- { 0.17443631884814376, 0.30000000000000004, 0.10000000000000001,
+ { 0.17478889331392972, 0.30000000000000004, 0.10000000000000001,
0.17453292519943295 },
- { 0.34831316835124926, 0.30000000000000004, 0.10000000000000001,
+ { 0.35108939018329183, 0.30000000000000004, 0.10000000000000001,
0.34906585039886590 },
- { 0.52116586276523857, 0.30000000000000004, 0.10000000000000001,
+ { 0.53028990896115835, 0.30000000000000004, 0.10000000000000001,
0.52359877559829882 },
- { 0.69269385837910036, 0.30000000000000004, 0.10000000000000001,
+ { 0.71352417052371409, 0.30000000000000004, 0.10000000000000001,
0.69813170079773179 },
- { 0.86279023163070856, 0.30000000000000004, 0.10000000000000001,
+ { 0.90153086032405894, 0.30000000000000004, 0.10000000000000001,
0.87266462599716477 },
- { 1.0315321461438263, 0.30000000000000004, 0.10000000000000001,
+ { 1.0945187977283313, 0.30000000000000004, 0.10000000000000001,
1.0471975511965976 },
- { 1.1991449111869024, 0.30000000000000004, 0.10000000000000001,
+ { 1.2920699268385683, 0.30000000000000004, 0.10000000000000001,
1.2217304763960306 },
- { 1.3659561780923213, 0.30000000000000004, 0.10000000000000001,
+ { 1.4931243665896394, 0.30000000000000004, 0.10000000000000001,
1.3962634015954636 },
- { 1.5323534693557528, 0.30000000000000004, 0.10000000000000001,
+ { 1.6960848815118226, 0.30000000000000004, 0.10000000000000001,
1.5707963267948966 },
};
const double toler122 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.20000000000000001.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.4447238179454079e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.2247497610332889e-16
+// mean(f - f_Boost): 6.6613381477509390e-17
+// variance(f - f_Boost): 1.7591111235252501e-32
+// stddev(f - f_Boost): 1.3263148659067538e-16
const testcase_ellint_3<double>
data123[10] =
{
{ 0.0000000000000000, 0.30000000000000004, 0.20000000000000001,
0.0000000000000000 },
- { 0.17426098615372088, 0.30000000000000004, 0.20000000000000001,
+ { 0.17496614335337535, 0.30000000000000004, 0.20000000000000001,
0.17453292519943295 },
- { 0.34695402664689923, 0.30000000000000004, 0.20000000000000001,
+ { 0.35250745937139372, 0.30000000000000004, 0.20000000000000001,
0.34906585039886590 },
- { 0.51680555567038933, 0.30000000000000004, 0.20000000000000001,
+ { 0.53506875002836884, 0.30000000000000004, 0.20000000000000001,
0.52359877559829882 },
- { 0.68303375225260210, 0.30000000000000004, 0.20000000000000001,
+ { 0.72479106622248191, 0.30000000000000004, 0.20000000000000001,
0.69813170079773179 },
- { 0.84540662891295026, 0.30000000000000004, 0.20000000000000001,
+ { 0.92326451535891607, 0.30000000000000004, 0.20000000000000001,
0.87266462599716477 },
- { 1.0041834051646927, 0.30000000000000004, 0.20000000000000001,
+ { 1.1312092060698349, 0.30000000000000004, 0.20000000000000001,
1.0471975511965976 },
- { 1.1599952702345711, 0.30000000000000004, 0.20000000000000001,
+ { 1.3481473154592321, 0.30000000000000004, 0.20000000000000001,
1.2217304763960306 },
- { 1.3137179520499165, 0.30000000000000004, 0.20000000000000001,
+ { 1.5722049569662750, 0.30000000000000004, 0.20000000000000001,
1.3962634015954636 },
- { 1.4663658145259877, 0.30000000000000004, 0.20000000000000001,
+ { 1.8002173372290500, 0.30000000000000004, 0.20000000000000001,
1.5707963267948966 },
};
const double toler123 = 2.5000000000000020e-13;
-// Test data for k=0.30000000000000004, nu=0.29999999999999999.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.4979715256503266e-16
+// Test data for k=0.30000000000000004, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.1678685180047551e-16
+// mean(f - f_Boost): 1.0547118733938987e-16
+// variance(f - f_Boost): 7.5633408838247182e-32
+// stddev(f - f_Boost): 2.7501528837184157e-16
const testcase_ellint_3<double>
data124[10] =
{
- { 0.0000000000000000, 0.30000000000000004, 0.29999999999999999,
+ { 0.0000000000000000, 0.30000000000000004, 0.30000000000000004,
0.0000000000000000 },
- { 0.17408628437042842, 0.30000000000000004, 0.29999999999999999,
+ { 0.17514404084107435, 0.30000000000000004, 0.30000000000000004,
0.17453292519943295 },
- { 0.34561356761638401, 0.30000000000000004, 0.29999999999999999,
+ { 0.35394619108645647, 0.30000000000000004, 0.30000000000000004,
0.34906585039886590 },
- { 0.51257058617875850, 0.30000000000000004, 0.29999999999999999,
+ { 0.54000325463372689, 0.30000000000000004, 0.30000000000000004,
0.52359877559829882 },
- { 0.67382207124602878, 0.30000000000000004, 0.29999999999999999,
+ { 0.73670193794067651, 0.30000000000000004, 0.30000000000000004,
0.69813170079773179 },
- { 0.82914751587825131, 0.30000000000000004, 0.29999999999999999,
+ { 0.94689345491722177, 0.30000000000000004, 0.30000000000000004,
0.87266462599716477 },
- { 0.97907434814374938, 0.30000000000000004, 0.29999999999999999,
+ { 1.1723274608389140, 0.30000000000000004, 0.30000000000000004,
1.0471975511965976 },
- { 1.1246399297351584, 0.30000000000000004, 0.29999999999999999,
+ { 1.4128880552936287, 0.30000000000000004, 0.30000000000000004,
1.2217304763960306 },
- { 1.2671793970398149, 0.30000000000000004, 0.29999999999999999,
+ { 1.6659010047449661, 0.30000000000000004, 0.30000000000000004,
1.3962634015954636 },
- { 1.4081767433479091, 0.30000000000000004, 0.29999999999999999,
+ { 1.9260216862473254, 0.30000000000000004, 0.30000000000000004,
1.5707963267948966 },
};
const double toler124 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.40000000000000002.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.5505716921759864e-16
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.3983279132797385e-16
+// mean(f - f_Boost): 1.1657341758564144e-16
+// variance(f - f_Boost): 1.8245832308692586e-31
+// stddev(f - f_Boost): 4.2715140534349863e-16
const testcase_ellint_3<double>
data125[10] =
{
{ 0.0000000000000000, 0.30000000000000004, 0.40000000000000002,
0.0000000000000000 },
- { 0.17391220945982727, 0.30000000000000004, 0.40000000000000002,
+ { 0.17532259000954434, 0.30000000000000004, 0.40000000000000002,
0.17453292519943295 },
- { 0.34429133937639689, 0.30000000000000004, 0.40000000000000002,
+ { 0.35540612770983693, 0.30000000000000004, 0.40000000000000002,
0.34906585039886590 },
- { 0.50845471668581632, 0.30000000000000004, 0.40000000000000002,
+ { 0.54510265552938919, 0.30000000000000004, 0.40000000000000002,
0.52359877559829882 },
- { 0.66502347027873854, 0.30000000000000004, 0.40000000000000002,
+ { 0.74932476310965057, 0.30000000000000004, 0.40000000000000002,
0.69813170079773179 },
- { 0.81389191978012254, 0.30000000000000004, 0.40000000000000002,
+ { 0.97272793583093109, 0.30000000000000004, 0.40000000000000002,
0.87266462599716477 },
- { 0.95590618002140570, 0.30000000000000004, 0.40000000000000002,
+ { 1.2188928987074241, 0.30000000000000004, 0.40000000000000002,
1.0471975511965976 },
- { 1.0924915195213121, 0.30000000000000004, 0.40000000000000002,
+ { 1.4888771674085941, 0.30000000000000004, 0.40000000000000002,
1.2217304763960306 },
- { 1.2253651604038061, 0.30000000000000004, 0.40000000000000002,
+ { 1.7794558498219191, 0.30000000000000004, 0.40000000000000002,
1.3962634015954636 },
- { 1.3563643538969763, 0.30000000000000004, 0.40000000000000002,
+ { 2.0822121773175528, 0.30000000000000004, 0.40000000000000002,
1.5707963267948966 },
};
const double toler125 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.50000000000000000.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.7807908859023716e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.0516138451673425e-16
+// mean(f - f_Boost): 4.7184478546569152e-17
+// variance(f - f_Boost): 1.9448563670505968e-32
+// stddev(f - f_Boost): 1.3945810722401896e-16
const testcase_ellint_3<double>
data126[10] =
{
{ 0.0000000000000000, 0.30000000000000004, 0.50000000000000000,
0.0000000000000000 },
- { 0.17373875742088232, 0.30000000000000004, 0.50000000000000000,
+ { 0.17550179513158179, 0.30000000000000004, 0.50000000000000000,
0.17453292519943295 },
- { 0.34298690571124157, 0.30000000000000004, 0.50000000000000000,
+ { 0.35688783251681200, 0.30000000000000004, 0.50000000000000000,
0.34906585039886590 },
- { 0.50445214859646936, 0.30000000000000004, 0.50000000000000000,
+ { 0.55037700010142798, 0.30000000000000004, 0.50000000000000000,
0.52359877559829882 },
- { 0.65660648352418516, 0.30000000000000004, 0.50000000000000000,
+ { 0.76273839789895992, 0.30000000000000004, 0.50000000000000000,
0.69813170079773179 },
- { 0.79953670639287289, 0.30000000000000004, 0.50000000000000000,
+ { 1.0011570518830419, 0.30000000000000004, 0.50000000000000000,
0.87266462599716477 },
- { 0.93443393926588536, 0.30000000000000004, 0.50000000000000000,
+ { 1.2722987414055109, 0.30000000000000004, 0.50000000000000000,
1.0471975511965976 },
- { 1.0630838369016911, 0.30000000000000004, 0.50000000000000000,
+ { 1.5799590511080066, 0.30000000000000004, 0.50000000000000000,
1.2217304763960306 },
- { 1.1875197325653029, 0.30000000000000004, 0.50000000000000000,
+ { 1.9212367220124293, 0.30000000000000004, 0.50000000000000000,
1.3962634015954636 },
- { 1.3098448759814962, 0.30000000000000004, 0.50000000000000000,
+ { 2.2833505881933971, 0.30000000000000004, 0.50000000000000000,
1.5707963267948966 },
};
const double toler126 = 2.5000000000000020e-13;
-// Test data for k=0.30000000000000004, nu=0.59999999999999998.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.0057999499931649e-16
+// Test data for k=0.30000000000000004, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.2121157428443725e-16
+// mean(f - f_Boost): 1.9428902930940239e-16
+// variance(f - f_Boost): 1.5987596229703424e-31
+// stddev(f - f_Boost): 3.9984492281012430e-16
const testcase_ellint_3<double>
data127[10] =
{
- { 0.0000000000000000, 0.30000000000000004, 0.59999999999999998,
+ { 0.0000000000000000, 0.30000000000000004, 0.60000000000000009,
0.0000000000000000 },
- { 0.17356592428950823, 0.30000000000000004, 0.59999999999999998,
+ { 0.17568166052076745, 0.30000000000000004, 0.60000000000000009,
0.17453292519943295 },
- { 0.34169984536697379, 0.30000000000000004, 0.59999999999999998,
+ { 0.35839189074731181, 0.30000000000000004, 0.60000000000000009,
0.34906585039886590 },
- { 0.50055748266498457, 0.30000000000000004, 0.59999999999999998,
+ { 0.55583724744367558, 0.30000000000000004, 0.60000000000000009,
0.52359877559829882 },
- { 0.64854298527106768, 0.30000000000000004, 0.59999999999999998,
+ { 0.77703498090888223, 0.30000000000000004, 0.60000000000000009,
0.69813170079773179 },
- { 0.78599329284207431, 0.30000000000000004, 0.59999999999999998,
+ { 1.0326772113675962, 0.30000000000000004, 0.60000000000000009,
0.87266462599716477 },
- { 0.91445452089128199, 0.30000000000000004, 0.59999999999999998,
+ { 1.3345139983717369, 0.30000000000000004, 0.60000000000000009,
1.0471975511965976 },
- { 1.0360412952290587, 0.30000000000000004, 0.59999999999999998,
+ { 1.6921742922838403, 0.30000000000000004, 0.60000000000000009,
1.2217304763960306 },
- { 1.1530473919778641, 0.30000000000000004, 0.59999999999999998,
+ { 2.1056608968472186, 0.30000000000000004, 0.60000000000000009,
1.3962634015954636 },
- { 1.2677758800420669, 0.30000000000000004, 0.59999999999999998,
+ { 2.5560975528589061, 0.30000000000000004, 0.60000000000000009,
1.5707963267948966 },
};
const double toler127 = 2.5000000000000020e-13;
-// Test data for k=0.30000000000000004, nu=0.69999999999999996.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.2239502844122443e-16
+// Test data for k=0.30000000000000004, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.0088945789059381e-16
+// mean(f - f_Boost): 2.1094237467877973e-16
+// variance(f - f_Boost): 3.0253363535298873e-31
+// stddev(f - f_Boost): 5.5003057674368314e-16
const testcase_ellint_3<double>
data128[10] =
{
- { 0.0000000000000000, 0.30000000000000004, 0.69999999999999996,
+ { 0.0000000000000000, 0.30000000000000004, 0.70000000000000007,
0.0000000000000000 },
- { 0.17339370613812224, 0.30000000000000004, 0.69999999999999996,
+ { 0.17586219053197988, 0.30000000000000004, 0.70000000000000007,
0.17453292519943295 },
- { 0.34042975138455933, 0.30000000000000004, 0.69999999999999996,
+ { 0.35991891074557669, 0.30000000000000004, 0.70000000000000007,
0.34906585039886590 },
- { 0.49676568368075985, 0.30000000000000004, 0.69999999999999996,
+ { 0.56149538019961731, 0.30000000000000004, 0.70000000000000007,
0.52359877559829882 },
- { 0.64080774055753720, 0.30000000000000004, 0.69999999999999996,
+ { 0.79232303189667685, 0.30000000000000004, 0.70000000000000007,
0.69813170079773179 },
- { 0.77318507779667278, 0.30000000000000004, 0.69999999999999996,
+ { 1.0679345542878826, 0.30000000000000004, 0.70000000000000007,
0.87266462599716477 },
- { 0.89579782346548609, 0.30000000000000004, 0.69999999999999996,
+ { 1.4084400085913955, 0.30000000000000004, 0.70000000000000007,
1.0471975511965976 },
- { 1.0110573286052202, 0.30000000000000004, 0.69999999999999996,
+ { 1.8357382859296454, 0.30000000000000004, 0.70000000000000007,
1.2217304763960306 },
- { 1.1214710972949635, 0.30000000000000004, 0.69999999999999996,
+ { 2.3604197996171519, 0.30000000000000004, 0.70000000000000007,
1.3962634015954636 },
- { 1.2294913236274982, 0.30000000000000004, 0.69999999999999996,
+ { 2.9562123549913872, 0.30000000000000004, 0.70000000000000007,
1.5707963267948966 },
};
const double toler128 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.80000000000000004.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.4358357000101250e-16
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.1197887707781618e-16
+// mean(f - f_Boost): 3.4416913763379854e-16
+// variance(f - f_Boost): 4.3461914185990199e-31
+// stddev(f - f_Boost): 6.5925650687718054e-16
const testcase_ellint_3<double>
data129[10] =
{
{ 0.0000000000000000, 0.30000000000000004, 0.80000000000000004,
0.0000000000000000 },
- { 0.17322209907520358, 0.30000000000000004, 0.80000000000000004,
+ { 0.17604338956191670, 0.30000000000000004, 0.80000000000000004,
0.17453292519943295 },
- { 0.33917623046949996, 0.30000000000000004, 0.80000000000000004,
+ { 0.36146952517410791, 0.30000000000000004, 0.80000000000000004,
0.34906585039886590 },
- { 0.49307204894329176, 0.30000000000000004, 0.80000000000000004,
+ { 0.56736453393774644, 0.30000000000000004, 0.80000000000000004,
0.52359877559829882 },
- { 0.63337802830291734, 0.30000000000000004, 0.80000000000000004,
+ { 0.80873149979001091, 0.30000000000000004, 0.80000000000000004,
0.69813170079773179 },
- { 0.76104540997689407, 0.30000000000000004, 0.80000000000000004,
+ { 1.1077903069860620, 0.30000000000000004, 0.80000000000000004,
0.87266462599716477 },
- { 0.87832009635450714, 0.30000000000000004, 0.80000000000000004,
+ { 1.4985874311132998, 0.30000000000000004, 0.80000000000000004,
1.0471975511965976 },
- { 0.98787879723171790, 0.30000000000000004, 0.80000000000000004,
+ { 2.0298167266724954, 0.30000000000000004, 0.80000000000000004,
1.2217304763960306 },
- { 1.0924036340069339, 0.30000000000000004, 0.80000000000000004,
+ { 2.7483929054985432, 0.30000000000000004, 0.80000000000000004,
1.3962634015954636 },
- { 1.1944567571590048, 0.30000000000000004, 0.80000000000000004,
+ { 3.6283050484567170, 0.30000000000000004, 0.80000000000000004,
1.5707963267948966 },
};
const double toler129 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.90000000000000002.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.6419688299804087e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.1301806687926828e-16
+// mean(f - f_Boost): 4.1633363423443370e-16
+// variance(f - f_Boost): 2.2835347143080263e-31
+// stddev(f - f_Boost): 4.7786344433405093e-16
const testcase_ellint_3<double>
data130[10] =
{
{ 0.0000000000000000, 0.30000000000000004, 0.90000000000000002,
0.0000000000000000 },
- { 0.17305109924485945, 0.30000000000000004, 0.90000000000000002,
+ { 0.17622526204962433, 0.30000000000000004, 0.90000000000000002,
0.17453292519943295 },
- { 0.33793890239556984, 0.30000000000000004, 0.90000000000000002,
+ { 0.36304439230777141, 0.30000000000000004, 0.90000000000000002,
0.34906585039886590 },
- { 0.48947218005089738, 0.30000000000000004, 0.90000000000000002,
+ { 0.57345914744719195, 0.30000000000000004, 0.90000000000000002,
0.52359877559829882 },
- { 0.62623332340775151, 0.30000000000000004, 0.90000000000000002,
+ { 0.82641512928845162, 0.30000000000000004, 0.90000000000000002,
0.69813170079773179 },
- { 0.74951596581511148, 0.30000000000000004, 0.90000000000000002,
+ { 1.1534256210757743, 0.30000000000000004, 0.90000000000000002,
0.87266462599716477 },
- { 0.86189886597755994, 0.30000000000000004, 0.90000000000000002,
+ { 1.6124900353411677, 0.30000000000000004, 0.90000000000000002,
1.0471975511965976 },
- { 0.96629451153092005, 0.30000000000000004, 0.90000000000000002,
+ { 2.3165905514845089, 0.30000000000000004, 0.90000000000000002,
1.2217304763960306 },
- { 1.0655269133492682, 0.30000000000000004, 0.90000000000000002,
+ { 3.4625619526539824, 0.30000000000000004, 0.90000000000000002,
1.3962634015954636 },
- { 1.1622376896064914, 0.30000000000000004, 0.90000000000000002,
+ { 5.1479514944016787, 0.30000000000000004, 0.90000000000000002,
1.5707963267948966 },
};
const double toler130 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991, nu=0.0000000000000000.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 5.4157225142938039e-16
+// Test data for k=0.40000000000000013, nu=0.0000000000000000.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.0831445028587608e-15
+// mean(f - f_Boost): 1.7486012637846215e-16
+// variance(f - f_Boost): 3.1664095331106078e-31
+// stddev(f - f_Boost): 5.6270858649132121e-16
const testcase_ellint_3<double>
data131[10] =
{
- { 0.0000000000000000, 0.39999999999999991, 0.0000000000000000,
+ { 0.0000000000000000, 0.40000000000000013, 0.0000000000000000,
0.0000000000000000 },
- { 0.17467414669441528, 0.39999999999999991, 0.0000000000000000,
+ { 0.17467414669441528, 0.40000000000000013, 0.0000000000000000,
0.17453292519943295 },
- { 0.35018222772483443, 0.39999999999999991, 0.0000000000000000,
+ { 0.35018222772483443, 0.40000000000000013, 0.0000000000000000,
0.34906585039886590 },
- { 0.52729015917508737, 0.39999999999999991, 0.0000000000000000,
+ { 0.52729015917508748, 0.40000000000000013, 0.0000000000000000,
0.52359877559829882 },
- { 0.70662374407341244, 0.39999999999999991, 0.0000000000000000,
+ { 0.70662374407341244, 0.40000000000000013, 0.0000000000000000,
0.69813170079773179 },
- { 0.88859210497602170, 0.39999999999999991, 0.0000000000000000,
+ { 0.88859210497602159, 0.40000000000000013, 0.0000000000000000,
0.87266462599716477 },
- { 1.0733136290471379, 0.39999999999999991, 0.0000000000000000,
+ { 1.0733136290471381, 0.40000000000000013, 0.0000000000000000,
1.0471975511965976 },
- { 1.2605612170157061, 0.39999999999999991, 0.0000000000000000,
+ { 1.2605612170157066, 0.40000000000000013, 0.0000000000000000,
1.2217304763960306 },
- { 1.4497513956433439, 0.39999999999999991, 0.0000000000000000,
+ { 1.4497513956433439, 0.40000000000000013, 0.0000000000000000,
1.3962634015954636 },
- { 1.6399998658645112, 0.39999999999999991, 0.0000000000000000,
+ { 1.6399998658645112, 0.40000000000000013, 0.0000000000000000,
1.5707963267948966 },
};
const double toler131 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991, nu=0.10000000000000001.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 5.6859551010103832e-16
+// Test data for k=0.40000000000000013, nu=0.10000000000000001.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.0263824105456986e-15
+// mean(f - f_Boost): 1.7486012637846215e-16
+// variance(f - f_Boost): 3.1664095331106078e-31
+// stddev(f - f_Boost): 5.6270858649132121e-16
const testcase_ellint_3<double>
data132[10] =
{
- { 0.0000000000000000, 0.39999999999999991, 0.10000000000000001,
+ { 0.0000000000000000, 0.40000000000000013, 0.10000000000000001,
0.0000000000000000 },
- { 0.17449806706684670, 0.39999999999999991, 0.10000000000000001,
+ { 0.17485086590796767, 0.40000000000000013, 0.10000000000000001,
0.17453292519943295 },
- { 0.34880048623856075, 0.39999999999999991, 0.10000000000000001,
+ { 0.35158366412506992, 0.40000000000000013, 0.10000000000000001,
0.34906585039886590 },
- { 0.52277322065757392, 0.39999999999999991, 0.10000000000000001,
+ { 0.53194731675711726, 0.40000000000000013, 0.10000000000000001,
0.52359877559829882 },
- { 0.69638072056918365, 0.39999999999999991, 0.10000000000000001,
+ { 0.71740615528010931, 0.40000000000000013, 0.10000000000000001,
0.69813170079773179 },
- { 0.86968426619831540, 0.39999999999999991, 0.10000000000000001,
+ { 0.90896157773487030, 0.40000000000000013, 0.10000000000000001,
0.87266462599716477 },
- { 1.0428044206578095, 0.39999999999999991, 0.10000000000000001,
+ { 1.1069605483834348, 0.40000000000000013, 0.10000000000000001,
1.0471975511965976 },
- { 1.2158651158274378, 0.39999999999999991, 0.10000000000000001,
+ { 1.3109353428823001, 0.40000000000000013, 0.10000000000000001,
1.2217304763960306 },
- { 1.3889447129893324, 0.39999999999999991, 0.10000000000000001,
+ { 1.5195460789903450, 0.40000000000000013, 0.10000000000000001,
1.3962634015954636 },
- { 1.5620566886683604, 0.39999999999999991, 0.10000000000000001,
+ { 1.7306968836847190, 0.40000000000000013, 0.10000000000000001,
1.5707963267948966 },
};
const double toler132 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991, nu=0.20000000000000001.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 5.9444065952225719e-16
+// Test data for k=0.40000000000000013, nu=0.20000000000000001.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.6644296021947179e-16
+// mean(f - f_Boost): 2.0816681711721685e-16
+// variance(f - f_Boost): 3.0360740073926687e-31
+// stddev(f - f_Boost): 5.5100580826273227e-16
const testcase_ellint_3<double>
data133[10] =
{
- { 0.0000000000000000, 0.39999999999999991, 0.20000000000000001,
+ { 0.0000000000000000, 0.40000000000000013, 0.20000000000000001,
0.0000000000000000 },
- { 0.17432262290723397, 0.39999999999999991, 0.20000000000000001,
+ { 0.17502822886437389, 0.40000000000000013, 0.20000000000000001,
0.17453292519943295 },
- { 0.34743795258968596, 0.39999999999999991, 0.20000000000000001,
+ { 0.35300530062530805, 0.40000000000000013, 0.20000000000000001,
0.34906585039886590 },
- { 0.51838919472805112, 0.39999999999999991, 0.20000000000000001,
+ { 0.53675259548210896, 0.40000000000000013, 0.20000000000000001,
0.52359877559829882 },
- { 0.68663134739057907, 0.39999999999999991, 0.20000000000000001,
+ { 0.72878006428676934, 0.40000000000000013, 0.20000000000000001,
0.69813170079773179 },
- { 0.85206432981833979, 0.39999999999999991, 0.20000000000000001,
+ { 0.93100219010583574, 0.40000000000000013, 0.20000000000000001,
0.87266462599716477 },
- { 1.0149595349004430, 0.39999999999999991, 0.20000000000000001,
+ { 1.1443487271187611, 0.40000000000000013, 0.20000000000000001,
1.0471975511965976 },
- { 1.1758349405464676, 0.39999999999999991, 0.20000000000000001,
+ { 1.3683427764108813, 0.40000000000000013, 0.20000000000000001,
1.2217304763960306 },
- { 1.3353337673882637, 0.39999999999999991, 0.20000000000000001,
+ { 1.6008221459300933, 0.40000000000000013, 0.20000000000000001,
1.3962634015954636 },
- { 1.4941414344266770, 0.39999999999999991, 0.20000000000000001,
+ { 1.8380358826317627, 0.40000000000000013, 0.20000000000000001,
1.5707963267948966 },
};
const double toler133 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991, nu=0.29999999999999999.
-// max(|f - f_GSL|): 1.1102230246251565e-15
-// max(|f - f_GSL| / |f_GSL|): 7.7406350888907249e-16
+// Test data for k=0.40000000000000013, nu=0.30000000000000004.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.0271556462838835e-16
+// mean(f - f_Boost): 2.0816681711721685e-16
+// variance(f - f_Boost): 3.0360740073926687e-31
+// stddev(f - f_Boost): 5.5100580826273227e-16
const testcase_ellint_3<double>
data134[10] =
{
- { 0.0000000000000000, 0.39999999999999991, 0.29999999999999999,
+ { 0.0000000000000000, 0.40000000000000013, 0.30000000000000004,
0.0000000000000000 },
- { 0.17414781013591540, 0.39999999999999991, 0.29999999999999999,
+ { 0.17520623975982899, 0.40000000000000013, 0.30000000000000004,
0.17453292519943295 },
- { 0.34609415696777285, 0.39999999999999991, 0.29999999999999999,
+ { 0.35444766141612105, 0.40000000000000013, 0.30000000000000004,
0.34906585039886590 },
- { 0.51413131295862535, 0.39999999999999991, 0.29999999999999999,
+ { 0.54171455841536009, 0.40000000000000013, 0.30000000000000004,
0.52359877559829882 },
- { 0.67733527622935630, 0.39999999999999991, 0.29999999999999999,
+ { 0.74080517001084012, 0.40000000000000013, 0.30000000000000004,
0.69813170079773179 },
- { 0.83558675182733266, 0.39999999999999991, 0.29999999999999999,
+ { 0.95496950509296574, 0.40000000000000013, 0.30000000000000004,
0.87266462599716477 },
- { 0.98940140808865906, 0.39999999999999991, 0.29999999999999999,
+ { 1.1862627879844718, 0.40000000000000013, 0.30000000000000004,
1.0471975511965976 },
- { 1.1396968797728058, 0.39999999999999991, 0.29999999999999999,
+ { 1.4346501803799458, 0.40000000000000013, 0.30000000000000004,
1.2217304763960306 },
- { 1.2875920037865090, 0.39999999999999991, 0.29999999999999999,
+ { 1.6971744798077699, 0.40000000000000013, 0.30000000000000004,
1.3962634015954636 },
- { 1.4342789859950078, 0.39999999999999991, 0.29999999999999999,
+ { 1.9677924132520139, 0.40000000000000013, 0.30000000000000004,
1.5707963267948966 },
};
const double toler134 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991, nu=0.40000000000000002.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.4314214811441816e-16
+// Test data for k=0.40000000000000013, nu=0.40000000000000002.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.3436329231972794e-16
+// mean(f - f_Boost): 2.3037127760972000e-16
+// variance(f - f_Boost): 2.9507053793392374e-31
+// stddev(f - f_Boost): 5.4320395611033958e-16
const testcase_ellint_3<double>
data135[10] =
{
- { 0.0000000000000000, 0.39999999999999991, 0.40000000000000002,
+ { 0.0000000000000000, 0.40000000000000013, 0.40000000000000002,
0.0000000000000000 },
- { 0.17397362471112707, 0.39999999999999991, 0.40000000000000002,
+ { 0.17538490283034375, 0.40000000000000013, 0.40000000000000002,
0.17453292519943295 },
- { 0.34476864603333196, 0.39999999999999991, 0.40000000000000002,
+ { 0.35591129064319948, 0.40000000000000013, 0.40000000000000002,
0.34906585039886590 },
- { 0.50999329415379346, 0.39999999999999991, 0.40000000000000002,
+ { 0.54684250413264535, 0.40000000000000013, 0.40000000000000002,
0.52359877559829882 },
- { 0.66845674551396006, 0.39999999999999991, 0.40000000000000002,
+ { 0.75355027742668290, 0.40000000000000013, 0.40000000000000002,
0.69813170079773179 },
- { 0.82012848346231748, 0.39999999999999991, 0.40000000000000002,
+ { 0.98117935026780634, 0.40000000000000013, 0.40000000000000002,
0.87266462599716477 },
- { 0.96582449258349057, 0.39999999999999991, 0.40000000000000002,
+ { 1.2337464222030736, 0.40000000000000013, 0.40000000000000002,
1.0471975511965976 },
- { 1.1068473749476286, 0.39999999999999991, 0.40000000000000002,
+ { 1.5125183419289221, 0.40000000000000013, 0.40000000000000002,
1.2217304763960306 },
- { 1.2447132729159989, 0.39999999999999991, 0.40000000000000002,
+ { 1.8140224451130313, 0.40000000000000013, 0.40000000000000002,
1.3962634015954636 },
- { 1.3809986210732901, 0.39999999999999991, 0.40000000000000002,
+ { 2.1289968719280026, 0.40000000000000013, 0.40000000000000002,
1.5707963267948966 },
};
const double toler135 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991, nu=0.50000000000000000.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.6621057007519435e-16
+// Test data for k=0.40000000000000013, nu=0.50000000000000000.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.7013794022122431e-16
+// mean(f - f_Boost): 2.3037127760972000e-16
+// variance(f - f_Boost): 1.4989821857033475e-31
+// stddev(f - f_Boost): 3.8716691306248618e-16
const testcase_ellint_3<double>
data136[10] =
{
- { 0.0000000000000000, 0.39999999999999991, 0.50000000000000000,
+ { 0.0000000000000000, 0.40000000000000013, 0.50000000000000000,
0.0000000000000000 },
- { 0.17380006262854136, 0.39999999999999991, 0.50000000000000000,
+ { 0.17556422235224273, 0.40000000000000013, 0.50000000000000000,
0.17453292519943295 },
- { 0.34346098216756610, 0.39999999999999991, 0.50000000000000000,
+ { 0.35739675341763921, 0.40000000000000013, 0.50000000000000000,
0.34906585039886590 },
- { 0.50596929935059420, 0.39999999999999991, 0.50000000000000000,
+ { 0.55214655195037188, 0.40000000000000013, 0.50000000000000000,
0.52359877559829882 },
- { 0.65996392089131251, 0.39999999999999991, 0.50000000000000000,
+ { 0.76709520942047438, 0.40000000000000013, 0.50000000000000000,
0.69813170079773179 },
- { 0.80558463511364786, 0.39999999999999991, 0.50000000000000000,
+ { 1.0100278761577499, 0.40000000000000013, 0.50000000000000000,
0.87266462599716477 },
- { 0.94397834522857704, 0.39999999999999991, 0.50000000000000000,
+ { 1.2882265661384342, 0.40000000000000013, 0.50000000000000000,
1.0471975511965976 },
- { 1.0768075114108115, 0.39999999999999991, 0.50000000000000000,
+ { 1.6059059780051876, 0.40000000000000013, 0.50000000000000000,
1.2217304763960306 },
- { 1.2059184624251333, 0.39999999999999991, 0.50000000000000000,
+ { 1.9600182740224081, 0.40000000000000013, 0.50000000000000000,
1.3962634015954636 },
- { 1.3331797176377398, 0.39999999999999991, 0.50000000000000000,
+ { 2.3367461373176512, 0.40000000000000013, 0.50000000000000000,
1.5707963267948966 },
};
const double toler136 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991, nu=0.59999999999999998.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 6.8853630717730749e-16
+// Test data for k=0.40000000000000013, nu=0.60000000000000009.
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.4792115132836117e-16
+// mean(f - f_Boost): 2.3037127760972000e-16
+// variance(f - f_Boost): 4.8893797490374802e-31
+// stddev(f - f_Boost): 6.9924099915819294e-16
const testcase_ellint_3<double>
data137[10] =
{
- { 0.0000000000000000, 0.39999999999999991, 0.59999999999999998,
+ { 0.0000000000000000, 0.40000000000000013, 0.60000000000000009,
0.0000000000000000 },
- { 0.17362711992081245, 0.39999999999999991, 0.59999999999999998,
+ { 0.17574420264267029, 0.40000000000000013, 0.60000000000000009,
0.17453292519943295 },
- { 0.34217074276403953, 0.39999999999999991, 0.59999999999999998,
+ { 0.35890463689046265, 0.40000000000000013, 0.60000000000000009,
0.34906585039886590 },
- { 0.50205389185761606, 0.39999999999999991, 0.59999999999999998,
+ { 0.55763773975194486, 0.40000000000000013, 0.60000000000000009,
0.52359877559829882 },
- { 0.65182834920372734, 0.39999999999999991, 0.59999999999999998,
+ { 0.78153324227761267, 0.40000000000000013, 0.60000000000000009,
0.69813170079773179 },
- { 0.79186512820565136, 0.39999999999999991, 0.59999999999999998,
+ { 1.0420205885765887, 0.40000000000000013, 0.60000000000000009,
0.87266462599716477 },
- { 0.92365535916287134, 0.39999999999999991, 0.59999999999999998,
+ { 1.3517205230381770, 0.40000000000000013, 0.60000000000000009,
1.0471975511965976 },
- { 1.0491915663957907, 0.39999999999999991, 0.59999999999999998,
+ { 1.7210360970313896, 0.40000000000000013, 0.60000000000000009,
1.2217304763960306 },
- { 1.1705934291745106, 0.39999999999999991, 0.59999999999999998,
+ { 2.1500780510169246, 0.40000000000000013, 0.60000000000000009,
1.3962634015954636 },
- { 1.2899514672527024, 0.39999999999999991, 0.59999999999999998,
+ { 2.6186940209850191, 0.40000000000000013, 0.60000000000000009,
1.5707963267948966 },
};
const double toler137 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991, nu=0.69999999999999996.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.1018730557776469e-16
+// Test data for k=0.40000000000000013, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.8573292020719759e-16
+// mean(f - f_Boost): 2.2759572004815707e-16
+// variance(f - f_Boost): 2.9613098824898137e-31
+// stddev(f - f_Boost): 5.4417918762938862e-16
const testcase_ellint_3<double>
data138[10] =
{
- { 0.0000000000000000, 0.39999999999999991, 0.69999999999999996,
+ { 0.0000000000000000, 0.40000000000000013, 0.70000000000000007,
0.0000000000000000 },
- { 0.17345479265712868, 0.39999999999999991, 0.69999999999999996,
+ { 0.17592484806010436, 0.40000000000000013, 0.70000000000000007,
0.17453292519943295 },
- { 0.34089751955950354, 0.39999999999999991, 0.69999999999999996,
+ { 0.36043555139631439, 0.40000000000000013, 0.70000000000000007,
0.34906585039886590 },
- { 0.49824200167361332, 0.39999999999999991, 0.69999999999999996,
+ { 0.56332813669944881, 0.40000000000000013, 0.70000000000000007,
0.52359877559829882 },
- { 0.64402450341199402, 0.39999999999999991, 0.69999999999999996,
+ { 0.79697424562157548, 0.40000000000000013, 0.70000000000000007,
0.69813170079773179 },
- { 0.77889207804122873, 0.39999999999999991, 0.69999999999999996,
+ { 1.0778155987523672, 0.40000000000000013, 0.70000000000000007,
0.87266462599716477 },
- { 0.90468169720957992, 0.39999999999999991, 0.69999999999999996,
+ { 1.4272018169896268, 0.40000000000000013, 0.70000000000000007,
1.0471975511965976 },
- { 1.0236847823692916, 0.39999999999999991, 0.69999999999999996,
+ { 1.8684377907453382, 0.40000000000000013, 0.70000000000000007,
1.2217304763960306 },
- { 1.1382465247425166, 0.39999999999999991, 0.69999999999999996,
+ { 2.4128677409207473, 0.40000000000000013, 0.70000000000000007,
1.3962634015954636 },
- { 1.2506255923253344, 0.39999999999999991, 0.69999999999999996,
+ { 3.0327078743873246, 0.40000000000000013, 0.70000000000000007,
1.5707963267948966 },
};
const double toler138 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991, nu=0.80000000000000004.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.3122171115555478e-16
+// Test data for k=0.40000000000000013, nu=0.80000000000000004.
+// max(|f - f_Boost|): 3.5527136788005009e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.5273712585384737e-16
+// mean(f - f_Boost): 4.5241588253475131e-16
+// variance(f - f_Boost): 1.1866477068555882e-30
+// stddev(f - f_Boost): 1.0893336067778265e-15
const testcase_ellint_3<double>
data139[10] =
{
- { 0.0000000000000000, 0.39999999999999991, 0.80000000000000004,
+ { 0.0000000000000000, 0.40000000000000013, 0.80000000000000004,
0.0000000000000000 },
- { 0.17328307694277154, 0.39999999999999991, 0.80000000000000004,
+ { 0.17610616300487833, 0.40000000000000013, 0.80000000000000004,
0.17453292519943295 },
- { 0.33964091800132007, 0.39999999999999991, 0.80000000000000004,
+ { 0.36199013167171978, 0.40000000000000013, 0.80000000000000004,
0.34906585039886590 },
- { 0.49452889372467440, 0.39999999999999991, 0.80000000000000004,
+ { 0.56923097361842434, 0.40000000000000013, 0.80000000000000004,
0.52359877559829882 },
- { 0.63652940095937316, 0.39999999999999991, 0.80000000000000004,
+ { 0.81354878456624347, 0.40000000000000013, 0.80000000000000004,
0.69813170079773179 },
- { 0.76659772511159097, 0.39999999999999991, 0.80000000000000004,
+ { 1.1182902719261825, 0.40000000000000013, 0.80000000000000004,
0.87266462599716477 },
- { 0.88691047977338111, 0.39999999999999991, 0.80000000000000004,
+ { 1.5192950589409022, 0.40000000000000013, 0.80000000000000004,
1.0471975511965976 },
- { 1.0000273200611638, 0.39999999999999991, 0.80000000000000004,
+ { 2.0678761710223981, 0.40000000000000013, 0.80000000000000004,
1.2217304763960306 },
- { 1.1084787902188009, 0.39999999999999991, 0.80000000000000004,
+ { 2.8135222249879788, 0.40000000000000013, 0.80000000000000004,
1.3962634015954636 },
- { 1.2146499565727209, 0.39999999999999991, 0.80000000000000004,
+ { 3.7289548002199902, 0.40000000000000013, 0.80000000000000004,
1.5707963267948966 },
};
const double toler139 = 2.5000000000000020e-13;
-// Test data for k=0.39999999999999991, nu=0.90000000000000002.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 7.5168974431077345e-16
+// Test data for k=0.40000000000000013, nu=0.90000000000000002.
+// max(|f - f_Boost|): 6.2172489379008766e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.1718379478872251e-15
+// mean(f - f_Boost): 8.4099394115355610e-16
+// variance(f - f_Boost): 3.5684096037099424e-30
+// stddev(f - f_Boost): 1.8890234523980751e-15
const testcase_ellint_3<double>
data140[10] =
{
- { 0.0000000000000000, 0.39999999999999991, 0.90000000000000002,
+ { 0.0000000000000000, 0.40000000000000013, 0.90000000000000002,
0.0000000000000000 },
- { 0.17311196891868127, 0.39999999999999991, 0.90000000000000002,
+ { 0.17628815191971123, 0.40000000000000013, 0.90000000000000002,
0.17453292519943295 },
- { 0.33840055664911906, 0.39999999999999991, 0.90000000000000002,
+ { 0.36356903815378772, 0.40000000000000013, 0.90000000000000002,
0.34906585039886590 },
- { 0.49091013944075329, 0.39999999999999991, 0.90000000000000002,
+ { 0.57536079447000310, 0.40000000000000013, 0.90000000000000002,
0.52359877559829882 },
- { 0.62932228186809580, 0.39999999999999991, 0.90000000000000002,
+ { 0.83141355850172571, 0.40000000000000013, 0.90000000000000002,
0.69813170079773179 },
- { 0.75492278323019801, 0.39999999999999991, 0.90000000000000002,
+ { 1.1646481598721361, 0.40000000000000013, 0.90000000000000002,
0.87266462599716477 },
- { 0.87021659043854294, 0.39999999999999991, 0.90000000000000002,
+ { 1.6357275034001995, 0.40000000000000013, 0.90000000000000002,
1.0471975511965976 },
- { 0.97800245228239246, 0.39999999999999991, 0.90000000000000002,
+ { 2.3628787566572402, 0.40000000000000013, 0.90000000000000002,
1.2217304763960306 },
- { 1.0809625773173697, 0.39999999999999991, 0.90000000000000002,
+ { 3.5521010369134962, 0.40000000000000013, 0.90000000000000002,
1.3962634015954636 },
- { 1.1815758115929846, 0.39999999999999991, 0.90000000000000002,
+ { 5.3055535102872513, 0.40000000000000013, 0.90000000000000002,
1.5707963267948966 },
};
const double toler140 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.0000000000000000.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.1201497220602069e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.4551389361831220e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 2.5893058141206173e-32
+// stddev(f - f_Boost): 1.6091320064309879e-16
const testcase_ellint_3<double>
data141[10] =
{
@@ -4108,289 +4530,319 @@ data141[10] =
0.0000000000000000 },
{ 0.17475385514035785, 0.50000000000000000, 0.0000000000000000,
0.17453292519943295 },
- { 0.35081868470101585, 0.50000000000000000, 0.0000000000000000,
+ { 0.35081868470101579, 0.50000000000000000, 0.0000000000000000,
0.34906585039886590 },
{ 0.52942862705190574, 0.50000000000000000, 0.0000000000000000,
0.52359877559829882 },
- { 0.71164727562630314, 0.50000000000000000, 0.0000000000000000,
+ { 0.71164727562630326, 0.50000000000000000, 0.0000000000000000,
0.69813170079773179 },
{ 0.89824523594227768, 0.50000000000000000, 0.0000000000000000,
0.87266462599716477 },
- { 1.0895506700518851, 0.50000000000000000, 0.0000000000000000,
+ { 1.0895506700518853, 0.50000000000000000, 0.0000000000000000,
1.0471975511965976 },
- { 1.2853005857432931, 0.50000000000000000, 0.0000000000000000,
+ { 1.2853005857432933, 0.50000000000000000, 0.0000000000000000,
1.2217304763960306 },
- { 1.4845545520549484, 0.50000000000000000, 0.0000000000000000,
+ { 1.4845545520549488, 0.50000000000000000, 0.0000000000000000,
1.3962634015954636 },
- { 1.6857503548125963, 0.50000000000000000, 0.0000000000000000,
+ { 1.6857503548125961, 0.50000000000000000, 0.0000000000000000,
1.5707963267948966 },
};
const double toler141 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.10000000000000001.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.1662857256911530e-16
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.7416868347177582e-16
+// mean(f - f_Boost): 2.7755575615628915e-18
+// variance(f - f_Boost): 5.4326441655972001e-32
+// stddev(f - f_Boost): 2.3308033305273100e-16
const testcase_ellint_3<double>
data142[10] =
{
{ 0.0000000000000000, 0.50000000000000000, 0.10000000000000001,
0.0000000000000000 },
- { 0.17457763120814676, 0.50000000000000000, 0.10000000000000001,
+ { 0.17493071928248824, 0.50000000000000000, 0.10000000000000001,
0.17453292519943295 },
- { 0.34943246340849154, 0.50000000000000000, 0.10000000000000001,
+ { 0.35222467688034798, 0.50000000000000000, 0.10000000000000001,
0.34906585039886590 },
- { 0.52487937869610790, 0.50000000000000000, 0.10000000000000001,
+ { 0.53411928652008112, 0.50000000000000000, 0.10000000000000001,
0.52359877559829882 },
- { 0.70127785096388384, 0.50000000000000000, 0.10000000000000001,
+ { 0.72256398117177589, 0.50000000000000000, 0.10000000000000001,
0.69813170079773179 },
- { 0.87898815988624479, 0.50000000000000000, 0.10000000000000001,
+ { 0.91899583232771009, 0.50000000000000000, 0.10000000000000001,
0.87266462599716477 },
- { 1.0582764576094172, 0.50000000000000000, 0.10000000000000001,
+ { 1.1240549163055360, 0.50000000000000000, 0.10000000000000001,
1.0471975511965976 },
- { 1.2391936844060205, 0.50000000000000000, 0.10000000000000001,
+ { 1.3372938086286021, 0.50000000000000000, 0.10000000000000001,
1.2217304763960306 },
- { 1.4214793542995841, 0.50000000000000000, 0.10000000000000001,
+ { 1.5570024469132429, 0.50000000000000000, 0.10000000000000001,
1.3962634015954636 },
- { 1.6045524936084892, 0.50000000000000000, 0.10000000000000001,
+ { 1.7803034946545480, 0.50000000000000000, 0.10000000000000001,
1.5707963267948966 },
};
const double toler142 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.20000000000000001.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.2114786773102175e-16
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1198767993730867e-16
+// mean(f - f_Boost): 2.7755575615628914e-17
+// variance(f - f_Boost): 5.0311947683004831e-32
+// stddev(f - f_Boost): 2.2430324938128922e-16
const testcase_ellint_3<double>
data143[10] =
{
{ 0.0000000000000000, 0.50000000000000000, 0.20000000000000001,
0.0000000000000000 },
- { 0.17440204336345433, 0.50000000000000000, 0.20000000000000001,
+ { 0.17510822779582402, 0.50000000000000000, 0.20000000000000001,
0.17453292519943295 },
- { 0.34806552388338824, 0.50000000000000000, 0.20000000000000001,
+ { 0.35365094725531487, 0.50000000000000000, 0.20000000000000001,
0.34906585039886590 },
- { 0.52046416757129810, 0.50000000000000000, 0.20000000000000001,
+ { 0.53895933237328697, 0.50000000000000000, 0.20000000000000001,
0.52359877559829882 },
- { 0.69140924550993865, 0.50000000000000000, 0.20000000000000001,
+ { 0.73408090840070794, 0.50000000000000000, 0.20000000000000001,
0.69813170079773179 },
- { 0.86104678636125520, 0.50000000000000000, 0.20000000000000001,
+ { 0.94145442818535396, 0.50000000000000000, 0.20000000000000001,
0.87266462599716477 },
- { 1.0297439459053981, 0.50000000000000000, 0.20000000000000001,
+ { 1.1624120186296487, 0.50000000000000000, 0.20000000000000001,
1.0471975511965976 },
- { 1.1979214112912033, 0.50000000000000000, 0.20000000000000001,
+ { 1.3965823372867114, 0.50000000000000000, 0.20000000000000001,
1.2217304763960306 },
- { 1.3659033858648930, 0.50000000000000000, 0.20000000000000001,
+ { 1.6414308440430099, 0.50000000000000000, 0.20000000000000001,
1.3962634015954636 },
- { 1.5338490483665983, 0.50000000000000000, 0.20000000000000001,
+ { 1.8922947612264018, 0.50000000000000000, 0.20000000000000001,
1.5707963267948966 },
};
const double toler143 = 2.5000000000000020e-13;
-// Test data for k=0.50000000000000000, nu=0.29999999999999999.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.2557837230041312e-16
+// Test data for k=0.50000000000000000, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.3800262770228813e-16
+// mean(f - f_Boost): 5.8286708792820721e-17
+// variance(f - f_Boost): 8.5027191584278157e-32
+// stddev(f - f_Boost): 2.9159422419567599e-16
const testcase_ellint_3<double>
data144[10] =
{
- { 0.0000000000000000, 0.50000000000000000, 0.29999999999999999,
+ { 0.0000000000000000, 0.50000000000000000, 0.30000000000000004,
0.0000000000000000 },
- { 0.17422708752228896, 0.50000000000000000, 0.29999999999999999,
+ { 0.17528638488102041, 0.50000000000000000, 0.30000000000000004,
0.17453292519943295 },
- { 0.34671739434855858, 0.50000000000000000, 0.29999999999999999,
+ { 0.35509802222332720, 0.50000000000000000, 0.30000000000000004,
0.34906585039886590 },
- { 0.51617616305641878, 0.50000000000000000, 0.29999999999999999,
+ { 0.54395740731866193, 0.50000000000000000, 0.30000000000000004,
0.52359877559829882 },
- { 0.68200047612545167, 0.50000000000000000, 0.29999999999999999,
+ { 0.74625871438752667, 0.50000000000000000, 0.30000000000000004,
0.69813170079773179 },
- { 0.84427217869498372, 0.50000000000000000, 0.29999999999999999,
+ { 0.96588271186092023, 0.50000000000000000, 0.30000000000000004,
0.87266462599716477 },
- { 1.0035637821389782, 0.50000000000000000, 0.29999999999999999,
+ { 1.2054319584357329, 0.50000000000000000, 0.30000000000000004,
1.0471975511965976 },
- { 1.1606800483933111, 0.50000000000000000, 0.29999999999999999,
+ { 1.4651077994832871, 0.50000000000000000, 0.30000000000000004,
1.2217304763960306 },
- { 1.3164407134643459, 0.50000000000000000, 0.29999999999999999,
+ { 1.7416018368052644, 0.50000000000000000, 0.30000000000000004,
1.3962634015954636 },
- { 1.4715681939859637, 0.50000000000000000, 0.29999999999999999,
+ { 2.0277924458111314, 0.50000000000000000, 0.30000000000000004,
1.5707963267948966 },
};
const double toler144 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.40000000000000002.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.2992508582900068e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.0439932918341581e-16
+// mean(f - f_Boost): 3.0531133177191807e-17
+// variance(f - f_Boost): 9.0809736800018602e-32
+// stddev(f - f_Boost): 3.0134653938616686e-16
const testcase_ellint_3<double>
data145[10] =
{
{ 0.0000000000000000, 0.50000000000000000, 0.40000000000000002,
0.0000000000000000 },
- { 0.17405275963859917, 0.50000000000000000, 0.40000000000000002,
+ { 0.17546519477859268, 0.50000000000000000, 0.40000000000000002,
0.17453292519943295 },
- { 0.34538761957029329, 0.50000000000000000, 0.40000000000000002,
+ { 0.35656644822531680, 0.50000000000000000, 0.40000000000000002,
0.34906585039886590 },
- { 0.51200902646603907, 0.50000000000000000, 0.40000000000000002,
+ { 0.54912289677411319, 0.50000000000000000, 0.40000000000000002,
0.52359877559829882 },
- { 0.67301522212868792, 0.50000000000000000, 0.40000000000000002,
+ { 0.75916731611690047, 0.50000000000000000, 0.40000000000000002,
0.69813170079773179 },
- { 0.82853844466313320, 0.50000000000000000, 0.40000000000000002,
+ { 0.99260415631328214, 0.50000000000000000, 0.40000000000000002,
0.87266462599716477 },
- { 0.97942097862681488, 0.50000000000000000, 0.40000000000000002,
+ { 1.2541925856918670, 0.50000000000000000, 0.40000000000000002,
1.0471975511965976 },
- { 1.1268429801220614, 0.50000000000000000, 0.40000000000000002,
+ { 1.5456393705347609, 0.50000000000000000, 0.40000000000000002,
1.2217304763960306 },
- { 1.2720406704533922, 0.50000000000000000, 0.40000000000000002,
+ { 1.8631904972952076, 0.50000000000000000, 0.40000000000000002,
1.3962634015954636 },
- { 1.4161679518465340, 0.50000000000000000, 0.40000000000000002,
+ { 2.1962905366178065, 0.50000000000000000, 0.40000000000000002,
1.5707963267948966 },
};
const double toler145 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.50000000000000000.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3419255755184137e-16
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.6797816859260978e-16
+// mean(f - f_Boost): 9.4368957093138303e-17
+// variance(f - f_Boost): 7.7794254682023874e-32
+// stddev(f - f_Boost): 2.7891621444803792e-16
const testcase_ellint_3<double>
data146[10] =
{
{ 0.0000000000000000, 0.50000000000000000, 0.50000000000000000,
0.0000000000000000 },
- { 0.17387905570381157, 0.50000000000000000, 0.50000000000000000,
+ { 0.17564466176941509, 0.50000000000000000, 0.50000000000000000,
0.17453292519943295 },
- { 0.34407576010465207, 0.50000000000000000, 0.50000000000000000,
+ { 0.35805679276065394, 0.50000000000000000, 0.50000000000000000,
0.34906585039886590 },
- { 0.50795686560160824, 0.50000000000000000, 0.50000000000000000,
+ { 0.55446601496200032, 0.50000000000000000, 0.50000000000000000,
0.52359877559829882 },
- { 0.66442115453330164, 0.50000000000000000, 0.50000000000000000,
+ { 0.77288783578259013, 0.50000000000000000, 0.50000000000000000,
0.69813170079773179 },
- { 0.81373829119355345, 0.50000000000000000, 0.50000000000000000,
+ { 1.0220246013918972, 0.50000000000000000, 0.50000000000000000,
0.87266462599716477 },
- { 0.95705743313235825, 0.50000000000000000, 0.50000000000000000,
+ { 1.3101681612463965, 0.50000000000000000, 0.50000000000000000,
1.0471975511965976 },
- { 1.0959131991362554, 0.50000000000000000, 0.50000000000000000,
+ { 1.6422994881851025, 0.50000000000000000, 0.50000000000000000,
1.2217304763960306 },
- { 1.2318900529754597, 0.50000000000000000, 0.50000000000000000,
+ { 2.0152636030998816, 0.50000000000000000, 0.50000000000000000,
1.3962634015954636 },
- { 1.3664739530045971, 0.50000000000000000, 0.50000000000000000,
+ { 2.4136715042011945, 0.50000000000000000, 0.50000000000000000,
1.5707963267948966 },
};
const double toler146 = 2.5000000000000020e-13;
-// Test data for k=0.50000000000000000, nu=0.59999999999999998.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3838494104749599e-16
+// Test data for k=0.50000000000000000, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.9178421578645735e-16
+// mean(f - f_Boost): 1.3322676295501878e-16
+// variance(f - f_Boost): 1.7749370367472766e-31
+// stddev(f - f_Boost): 4.2130001622920411e-16
const testcase_ellint_3<double>
data147[10] =
{
- { 0.0000000000000000, 0.50000000000000000, 0.59999999999999998,
+ { 0.0000000000000000, 0.50000000000000000, 0.60000000000000009,
0.0000000000000000 },
- { 0.17370597174637581, 0.50000000000000000, 0.59999999999999998,
+ { 0.17582479017522740, 0.50000000000000000, 0.60000000000000009,
0.17453292519943295 },
- { 0.34278139158591414, 0.50000000000000000, 0.59999999999999998,
+ { 0.35956964546660036, 0.50000000000000000, 0.60000000000000009,
0.34906585039886590 },
- { 0.50401419439302708, 0.50000000000000000, 0.59999999999999998,
+ { 0.55999790372984193, 0.50000000000000000, 0.60000000000000009,
0.52359877559829882 },
- { 0.65618938076167210, 0.50000000000000000, 0.59999999999999998,
+ { 0.78751507911209895, 0.50000000000000000, 0.60000000000000009,
0.69813170079773179 },
- { 0.79977959248855424, 0.50000000000000000, 0.59999999999999998,
+ { 1.0546620505035220, 0.50000000000000000, 0.60000000000000009,
0.87266462599716477 },
- { 0.93625925190753545, 0.50000000000000000, 0.59999999999999998,
+ { 1.3754438357425935, 0.50000000000000000, 0.60000000000000009,
1.0471975511965976 },
- { 1.0674905658379708, 0.50000000000000000, 0.59999999999999998,
+ { 1.7615727400820127, 0.50000000000000000, 0.60000000000000009,
1.2217304763960306 },
- { 1.1953481298023050, 0.50000000000000000, 0.59999999999999998,
+ { 2.2134638067565242, 0.50000000000000000, 0.60000000000000009,
1.3962634015954636 },
- { 1.3215740290190876, 0.50000000000000000, 0.59999999999999998,
+ { 2.7090491861753558, 0.50000000000000000, 0.60000000000000009,
1.5707963267948966 },
};
const double toler147 = 2.5000000000000020e-13;
-// Test data for k=0.50000000000000000, nu=0.69999999999999996.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 3.4250604066951477e-16
+// Test data for k=0.50000000000000000, nu=0.70000000000000007.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.0745105182189226e-16
+// mean(f - f_Boost): 4.1633363423443370e-17
+// variance(f - f_Boost): 1.9996383743576116e-32
+// stddev(f - f_Boost): 1.4140857026211713e-16
const testcase_ellint_3<double>
data148[10] =
{
- { 0.0000000000000000, 0.50000000000000000, 0.69999999999999996,
+ { 0.0000000000000000, 0.50000000000000000, 0.70000000000000007,
0.0000000000000000 },
- { 0.17353350383131641, 0.50000000000000000, 0.69999999999999996,
+ { 0.17600558435914915, 0.50000000000000000, 0.70000000000000007,
0.17453292519943295 },
- { 0.34150410405436771, 0.50000000000000000, 0.69999999999999996,
+ { 0.36110561926726259, 0.50000000000000000, 0.70000000000000007,
0.34906585039886590 },
- { 0.50017589696443487, 0.50000000000000000, 0.69999999999999996,
+ { 0.56573074641137111, 0.50000000000000000, 0.70000000000000007,
0.52359877559829882 },
- { 0.64829398188419951, 0.50000000000000000, 0.69999999999999996,
+ { 0.80316073084237205, 0.50000000000000000, 0.70000000000000007,
0.69813170079773179 },
- { 0.78658270782402073, 0.50000000000000000, 0.69999999999999996,
+ { 1.0911910688131461, 0.50000000000000000, 0.70000000000000007,
0.87266462599716477 },
- { 0.91684738336675053, 0.50000000000000000, 0.69999999999999996,
+ { 1.4530946406380640, 0.50000000000000000, 0.70000000000000007,
1.0471975511965976 },
- { 1.0412486789555935, 0.50000000000000000, 0.69999999999999996,
+ { 1.9144386536785372, 0.50000000000000000, 0.70000000000000007,
1.2217304763960306 },
- { 1.1619021847612001, 0.50000000000000000, 0.69999999999999996,
+ { 2.4878788958234970, 0.50000000000000000, 0.70000000000000007,
1.3962634015954636 },
- { 1.2807475181182502, 0.50000000000000000, 0.69999999999999996,
+ { 3.1433945297859225, 0.50000000000000000, 0.70000000000000007,
1.5707963267948966 },
};
const double toler148 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.5715240651179632e-16
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.4380477375534667e-16
+// mean(f - f_Boost): 2.3037127760972000e-16
+// variance(f - f_Boost): 1.4989821857033475e-31
+// stddev(f - f_Boost): 3.8716691306248618e-16
const testcase_ellint_3<double>
data149[10] =
{
{ 0.0000000000000000, 0.50000000000000000, 0.80000000000000004,
0.0000000000000000 },
- { 0.17336164805979126, 0.50000000000000000, 0.80000000000000004,
+ { 0.17618704872620228, 0.50000000000000000, 0.80000000000000004,
0.17453292519943295 },
- { 0.34024350132086773, 0.50000000000000000, 0.80000000000000004,
+ { 0.36266535159745827, 0.50000000000000000, 0.80000000000000004,
0.34906585039886590 },
- { 0.49643719555734073, 0.50000000000000000, 0.80000000000000004,
+ { 0.57167789954529158, 0.50000000000000000, 0.80000000000000004,
0.52359877559829882 },
- { 0.64071162456976150, 0.50000000000000000, 0.80000000000000004,
+ { 0.81995752984315018, 0.50000000000000000, 0.80000000000000004,
0.69813170079773179 },
- { 0.77407836177211908, 0.50000000000000000, 0.80000000000000004,
+ { 1.1325112162158122, 0.50000000000000000, 0.80000000000000004,
0.87266462599716477 },
- { 0.89867058251905652, 0.50000000000000000, 0.80000000000000004,
+ { 1.5479055930718042, 0.50000000000000000, 0.80000000000000004,
1.0471975511965976 },
- { 1.0169181822134910, 0.50000000000000000, 0.80000000000000004,
+ { 2.1215243941010486, 0.50000000000000000, 0.80000000000000004,
1.2217304763960306 },
- { 1.1311363312779448, 0.50000000000000000, 0.80000000000000004,
+ { 2.9069405767650132, 0.50000000000000000, 0.80000000000000004,
1.3962634015954636 },
- { 1.2434165408189539, 0.50000000000000000, 0.80000000000000004,
+ { 3.8750701888108066, 0.50000000000000000, 0.80000000000000004,
1.5707963267948966 },
};
const double toler149 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.90000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.4664649039489274e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.6192315188521289e-16
+// mean(f - f_Boost): 3.5249581031848718e-16
+// variance(f - f_Boost): 2.5029385557256515e-31
+// stddev(f - f_Boost): 5.0029376927217987e-16
const testcase_ellint_3<double>
data150[10] =
{
{ 0.0000000000000000, 0.50000000000000000, 0.90000000000000002,
0.0000000000000000 },
- { 0.17319040056865681, 0.50000000000000000, 0.90000000000000002,
+ { 0.17636918772384180, 0.50000000000000000, 0.90000000000000002,
0.17453292519943295 },
- { 0.33899920036578557, 0.50000000000000000, 0.90000000000000002,
+ { 0.36424950570740700, 0.50000000000000000, 0.90000000000000002,
0.34906585039886590 },
- { 0.49279362182695174, 0.50000000000000000, 0.90000000000000002,
+ { 0.57785404590231426, 0.50000000000000000, 0.90000000000000002,
0.52359877559829882 },
- { 0.63342123379746151, 0.50000000000000000, 0.90000000000000002,
+ { 0.83806480521716531, 0.50000000000000000, 0.90000000000000002,
0.69813170079773179 },
- { 0.76220595179550321, 0.50000000000000000, 0.90000000000000002,
+ { 1.1798568683069752, 0.50000000000000000, 0.90000000000000002,
0.87266462599716477 },
- { 0.88160004743532294, 0.50000000000000000, 0.90000000000000002,
+ { 1.6678766243739607, 0.50000000000000000, 0.90000000000000002,
1.0471975511965976 },
- { 0.99427448642310123, 0.50000000000000000, 0.90000000000000002,
+ { 2.4282976450693483, 0.50000000000000000, 0.90000000000000002,
1.2217304763960306 },
- { 1.1027091512470095, 0.50000000000000000, 0.90000000000000002,
+ { 3.6810787666126656, 0.50000000000000000, 0.90000000000000002,
1.3962634015954636 },
- { 1.2091116095504744, 0.50000000000000000, 0.90000000000000002,
+ { 5.5355132096026454, 0.50000000000000000, 0.90000000000000002,
1.5707963267948966 },
};
const double toler150 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.0000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3664899092028927e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.3664899092028927e-16
+// mean(f - f_Boost): 3.0531133177191807e-17
+// variance(f - f_Boost): 7.8758646268991113e-33
+// stddev(f - f_Boost): 8.8746068233466605e-17
const testcase_ellint_3<double>
data151[10] =
{
@@ -4398,19 +4850,19 @@ data151[10] =
0.0000000000000000 },
{ 0.17485154362988359, 0.60000000000000009, 0.0000000000000000,
0.17453292519943295 },
- { 0.35160509865544326, 0.60000000000000009, 0.0000000000000000,
+ { 0.35160509865544320, 0.60000000000000009, 0.0000000000000000,
0.34906585039886590 },
{ 0.53210652578446138, 0.60000000000000009, 0.0000000000000000,
0.52359877559829882 },
{ 0.71805304664485659, 0.60000000000000009, 0.0000000000000000,
0.69813170079773179 },
- { 0.91082759030195970, 0.60000000000000009, 0.0000000000000000,
+ { 0.91082759030195981, 0.60000000000000009, 0.0000000000000000,
0.87266462599716477 },
{ 1.1112333229323361, 0.60000000000000009, 0.0000000000000000,
1.0471975511965976 },
{ 1.3191461190365270, 0.60000000000000009, 0.0000000000000000,
1.2217304763960306 },
- { 1.5332022105084775, 0.60000000000000009, 0.0000000000000000,
+ { 1.5332022105084779, 0.60000000000000009, 0.0000000000000000,
1.3962634015954636 },
{ 1.7507538029157526, 0.60000000000000009, 0.0000000000000000,
1.5707963267948966 },
@@ -4418,559 +4870,619 @@ data151[10] =
const double toler151 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.10000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.4937942733669112e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.2335247010355137e-16
+// mean(f - f_Boost): 8.6042284408449634e-17
+// variance(f - f_Boost): 2.2835347143080263e-33
+// stddev(f - f_Boost): 4.7786344433405099e-17
const testcase_ellint_3<double>
data152[10] =
{
{ 0.0000000000000000, 0.60000000000000009, 0.10000000000000001,
0.0000000000000000 },
- { 0.17467514275022011, 0.60000000000000009, 0.10000000000000001,
+ { 0.17502858548476194, 0.60000000000000009, 0.10000000000000001,
0.17453292519943295 },
- { 0.35021333086258255, 0.60000000000000009, 0.10000000000000001,
+ { 0.35301673150537388, 0.60000000000000009, 0.10000000000000001,
0.34906585039886590 },
- { 0.52751664092962691, 0.60000000000000009, 0.10000000000000001,
+ { 0.53683932476326812, 0.60000000000000009, 0.10000000000000001,
0.52359877559829882 },
- { 0.70752126971957874, 0.60000000000000009, 0.10000000000000001,
+ { 0.72914228589586771, 0.60000000000000009, 0.10000000000000001,
0.69813170079773179 },
- { 0.89111058756112871, 0.60000000000000009, 0.10000000000000001,
+ { 0.93208036718354692, 0.60000000000000009, 0.10000000000000001,
0.87266462599716477 },
- { 1.0789241202877768, 0.60000000000000009, 0.10000000000000001,
+ { 1.1468984688863377, 0.60000000000000009, 0.10000000000000001,
1.0471975511965976 },
- { 1.2710800210399946, 0.60000000000000009, 0.10000000000000001,
+ { 1.3733904977062528, 0.60000000000000009, 0.10000000000000001,
1.2217304763960306 },
- { 1.4669060574440276, 0.60000000000000009, 0.10000000000000001,
+ { 1.6094225663372157, 0.60000000000000009, 0.10000000000000001,
1.3962634015954636 },
- { 1.6648615773343014, 0.60000000000000009, 0.10000000000000001,
+ { 1.8508766487100685, 0.60000000000000009, 0.10000000000000001,
1.5707963267948966 },
};
const double toler152 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.20000000000000001.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1891472451898755e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 2.2547200163366559e-16
+// mean(f - f_Boost): -2.4980018054066023e-17
+// variance(f - f_Boost): 2.1685495635542404e-32
+// stddev(f - f_Boost): 1.4725995937641163e-16
const testcase_ellint_3<double>
data153[10] =
{
{ 0.0000000000000000, 0.60000000000000009, 0.20000000000000001,
0.0000000000000000 },
- { 0.17449937871800650, 0.60000000000000009, 0.20000000000000001,
+ { 0.17520627248155893, 0.60000000000000009, 0.20000000000000001,
0.17453292519943295 },
- { 0.34884093647346553, 0.60000000000000009, 0.20000000000000001,
+ { 0.35444873935437748, 0.60000000000000009, 0.20000000000000001,
0.34906585039886590 },
- { 0.52306221119844087, 0.60000000000000009, 0.20000000000000001,
+ { 0.54172310557682524, 0.60000000000000009, 0.20000000000000001,
0.52359877559829882 },
- { 0.69749955678982223, 0.60000000000000009, 0.20000000000000001,
+ { 0.74084300280734672, 0.60000000000000009, 0.20000000000000001,
0.69813170079773179 },
- { 0.87274610682416853, 0.60000000000000009, 0.20000000000000001,
+ { 0.95509001527006121, 0.60000000000000009, 0.20000000000000001,
0.87266462599716477 },
- { 1.0494620540750792, 0.60000000000000009, 0.20000000000000001,
+ { 1.1865688084431796, 0.60000000000000009, 0.20000000000000001,
1.0471975511965976 },
- { 1.2280847305507339, 0.60000000000000009, 0.20000000000000001,
+ { 1.4352978868932600, 0.60000000000000009, 0.20000000000000001,
1.2217304763960306 },
- { 1.4085436279696888, 0.60000000000000009, 0.20000000000000001,
+ { 1.6983400371331818, 0.60000000000000009, 0.20000000000000001,
1.3962634015954636 },
- { 1.5901418016279374, 0.60000000000000009, 0.20000000000000001,
+ { 1.9695980282802217, 0.60000000000000009, 0.20000000000000001,
1.5707963267948966 },
};
const double toler153 = 2.5000000000000020e-13;
-// Test data for k=0.60000000000000009, nu=0.29999999999999999.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.7339932380431439e-16
+// Test data for k=0.60000000000000009, nu=0.30000000000000004.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.9470074709717020e-16
+// mean(f - f_Boost): 3.0531133177191807e-17
+// variance(f - f_Boost): 1.1508025840536076e-34
+// stddev(f - f_Boost): 1.0727546709539920e-17
const testcase_ellint_3<double>
data154[10] =
{
- { 0.0000000000000000, 0.60000000000000009, 0.29999999999999999,
+ { 0.0000000000000000, 0.60000000000000009, 0.30000000000000004,
0.0000000000000000 },
- { 0.17432424744393932, 0.60000000000000009, 0.29999999999999999,
+ { 0.17538460882640122, 0.60000000000000009, 0.30000000000000004,
0.17453292519943295 },
- { 0.34748744127146447, 0.60000000000000009, 0.29999999999999999,
+ { 0.35590165133735557, 0.60000000000000009, 0.30000000000000004,
0.34906585039886590 },
- { 0.51873632743924825, 0.60000000000000009, 0.29999999999999999,
+ { 0.54676661152254535, 0.60000000000000009, 0.30000000000000004,
0.52359877559829882 },
- { 0.68794610396313116, 0.60000000000000009, 0.29999999999999999,
+ { 0.75321709418305305, 0.60000000000000009, 0.30000000000000004,
0.69813170079773179 },
- { 0.85558070175468726, 0.60000000000000009, 0.29999999999999999,
+ { 0.98012637808992920, 0.60000000000000009, 0.30000000000000004,
0.87266462599716477 },
- { 1.0224416343605653, 0.60000000000000009, 0.29999999999999999,
+ { 1.2310891277158875, 0.60000000000000009, 0.30000000000000004,
1.0471975511965976 },
- { 1.1893144457936788, 0.60000000000000009, 0.29999999999999999,
+ { 1.5069157924585623, 0.60000000000000009, 0.30000000000000004,
1.2217304763960306 },
- { 1.3566435377982575, 0.60000000000000009, 0.29999999999999999,
+ { 1.8039583598337940, 0.60000000000000009, 0.30000000000000004,
1.3962634015954636 },
- { 1.5243814243493585, 0.60000000000000009, 0.29999999999999999,
+ { 2.1134154405060599, 0.60000000000000009, 0.30000000000000004,
1.5707963267948966 },
};
const double toler154 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.40000000000000002.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.5440898085101625e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.8974839914337670e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 2.2849613290816465e-32
+// stddev(f - f_Boost): 1.5116088545260797e-16
const testcase_ellint_3<double>
data155[10] =
{
{ 0.0000000000000000, 0.60000000000000009, 0.40000000000000002,
0.0000000000000000 },
- { 0.17414974487670717, 0.60000000000000009, 0.40000000000000002,
+ { 0.17556359876533037, 0.60000000000000009, 0.40000000000000002,
0.17453292519943295 },
- { 0.34615238767335027, 0.60000000000000009, 0.40000000000000002,
+ { 0.35737601674244679, 0.60000000000000009, 0.40000000000000002,
0.34906585039886590 },
- { 0.51453257838108557, 0.60000000000000009, 0.40000000000000002,
+ { 0.55197933771320218, 0.60000000000000009, 0.40000000000000002,
0.52359877559829882 },
- { 0.67882386787534399, 0.60000000000000009, 0.40000000000000002,
+ { 0.76633591620002905, 0.60000000000000009, 0.40000000000000002,
0.69813170079773179 },
- { 0.83948470233173578, 0.60000000000000009, 0.40000000000000002,
+ { 1.0075231136019616, 0.60000000000000009, 0.40000000000000002,
0.87266462599716477 },
- { 0.99753496200073977, 0.60000000000000009, 0.40000000000000002,
+ { 1.2815842073813450, 0.60000000000000009, 0.40000000000000002,
1.0471975511965976 },
- { 1.1541101404388487, 0.60000000000000009, 0.40000000000000002,
+ { 1.5911666941449827, 0.60000000000000009, 0.40000000000000002,
1.2217304763960306 },
- { 1.3100911323398816, 0.60000000000000009, 0.40000000000000002,
+ { 1.9323227566025762, 0.60000000000000009, 0.40000000000000002,
1.3962634015954636 },
- { 1.4659345278069984, 0.60000000000000009, 0.40000000000000002,
+ { 2.2925036420985130, 0.60000000000000009, 0.40000000000000002,
1.5707963267948966 },
};
const double toler155 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.50000000000000000.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 4.7124937590522226e-16
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 2.1397785842303966e-16
+// mean(f - f_Boost): 9.1593399531575410e-17
+// variance(f - f_Boost): 1.5339913122479866e-32
+// stddev(f - f_Boost): 1.2385440291923362e-16
const testcase_ellint_3<double>
data156[10] =
{
{ 0.0000000000000000, 0.60000000000000009, 0.50000000000000000,
0.0000000000000000 },
- { 0.17397586700252807, 0.60000000000000009, 0.50000000000000000,
+ { 0.17574324658480217, 0.60000000000000009, 0.50000000000000000,
0.17453292519943295 },
- { 0.34483533397138516, 0.60000000000000009, 0.50000000000000000,
+ { 0.35887240603169313, 0.60000000000000009, 0.50000000000000000,
0.34906585039886590 },
- { 0.51044500461706477, 0.60000000000000009, 0.50000000000000000,
+ { 0.55737161826345261, 0.60000000000000009, 0.50000000000000000,
0.52359877559829882 },
- { 0.67009988034712664, 0.60000000000000009, 0.50000000000000000,
+ { 0.78028227313077458, 0.60000000000000009, 0.50000000000000000,
0.69813170079773179 },
- { 0.82434762375735193, 0.60000000000000009, 0.50000000000000000,
+ { 1.0376989776486290, 0.60000000000000009, 0.50000000000000000,
0.87266462599716477 },
- { 0.97447346702798998, 0.60000000000000009, 0.50000000000000000,
+ { 1.3395933991042928, 0.60000000000000009, 0.50000000000000000,
1.0471975511965976 },
- { 1.1219494000522143, 0.60000000000000009, 0.50000000000000000,
+ { 1.6924049626591784, 0.60000000000000009, 0.50000000000000000,
1.2217304763960306 },
- { 1.2680242605954486, 0.60000000000000009, 0.50000000000000000,
+ { 2.0931011856518920, 0.60000000000000009, 0.50000000000000000,
1.3962634015954636 },
- { 1.4135484285693078, 0.60000000000000009, 0.50000000000000000,
+ { 2.5239007084492711, 0.60000000000000009, 0.50000000000000000,
1.5707963267948966 },
};
const double toler156 = 2.5000000000000020e-13;
-// Test data for k=0.60000000000000009, nu=0.59999999999999998.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.0652177678695900e-16
+// Test data for k=0.60000000000000009, nu=0.60000000000000009.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.6651378277398083e-16
+// mean(f - f_Boost): 1.1934897514720432e-16
+// variance(f - f_Boost): 1.7585404776158019e-33
+// stddev(f - f_Boost): 4.1934955319110598e-17
const testcase_ellint_3<double>
data157[10] =
{
- { 0.0000000000000000, 0.60000000000000009, 0.59999999999999998,
+ { 0.0000000000000000, 0.60000000000000009, 0.60000000000000009,
0.0000000000000000 },
- { 0.17380260984469353, 0.60000000000000009, 0.59999999999999998,
+ { 0.17592355661219386, 0.60000000000000009, 0.60000000000000009,
0.17453292519943295 },
- { 0.34353585361777839, 0.60000000000000009, 0.59999999999999998,
+ { 0.36039141192661606, 0.60000000000000009, 0.60000000000000009,
0.34906585039886590 },
- { 0.50646805774321380, 0.60000000000000009, 0.59999999999999998,
+ { 0.56295472636903854, 0.60000000000000009, 0.60000000000000009,
0.52359877559829882 },
- { 0.66174468108625506, 0.60000000000000009, 0.59999999999999998,
+ { 0.79515295130165986, 0.60000000000000009, 0.60000000000000009,
0.69813170079773179 },
- { 0.81007462280278408, 0.60000000000000009, 0.59999999999999998,
+ { 1.0711886441942242, 0.60000000000000009, 0.60000000000000009,
0.87266462599716477 },
- { 0.95303466945718729, 0.60000000000000009, 0.59999999999999998,
+ { 1.4072952835139891, 0.60000000000000009, 0.60000000000000009,
1.0471975511965976 },
- { 1.0924118588677505, 0.60000000000000009, 0.59999999999999998,
+ { 1.8174863977376825, 0.60000000000000009, 0.60000000000000009,
1.2217304763960306 },
- { 1.2297640574847937, 0.60000000000000009, 0.59999999999999998,
+ { 2.3029921578542232, 0.60000000000000009, 0.60000000000000009,
1.3962634015954636 },
- { 1.3662507535812816, 0.60000000000000009, 0.59999999999999998,
+ { 2.8388723099514972, 0.60000000000000009, 0.60000000000000009,
1.5707963267948966 },
};
const double toler157 = 2.5000000000000020e-13;
-// Test data for k=0.60000000000000009, nu=0.69999999999999996.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1692457486457856e-16
+// Test data for k=0.60000000000000009, nu=0.70000000000000007.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 2.0027679235921772e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 2.2849613290816465e-32
+// stddev(f - f_Boost): 1.5116088545260797e-16
const testcase_ellint_3<double>
data158[10] =
{
- { 0.0000000000000000, 0.60000000000000009, 0.69999999999999996,
+ { 0.0000000000000000, 0.60000000000000009, 0.70000000000000007,
0.0000000000000000 },
- { 0.17362996946312007, 0.60000000000000009, 0.69999999999999996,
+ { 0.17610453321631936, 0.60000000000000009, 0.70000000000000007,
0.17453292519943295 },
- { 0.34225353454870588, 0.60000000000000009, 0.69999999999999996,
+ { 0.36193365056369764, 0.60000000000000009, 0.70000000000000007,
0.34906585039886590 },
- { 0.50259656397799524, 0.60000000000000009, 0.69999999999999996,
+ { 0.56874098962268527, 0.60000000000000009, 0.70000000000000007,
0.52359877559829882 },
- { 0.65373184496628933, 0.60000000000000009, 0.69999999999999996,
+ { 0.81106198671477181, 0.60000000000000009, 0.70000000000000007,
0.69813170079773179 },
- { 0.79658372884056439, 0.60000000000000009, 0.69999999999999996,
+ { 1.1086886419010082, 0.60000000000000009, 0.70000000000000007,
0.87266462599716477 },
- { 0.93303240100245421, 0.60000000000000009, 0.69999999999999996,
+ { 1.4879048567239257, 0.60000000000000009, 0.70000000000000007,
1.0471975511965976 },
- { 1.0651547944716557, 0.60000000000000009, 0.69999999999999996,
+ { 1.9780310073615925, 0.60000000000000009, 0.70000000000000007,
1.2217304763960306 },
- { 1.1947676204853441, 0.60000000000000009, 0.69999999999999996,
+ { 2.5941545586772712, 0.60000000000000009, 0.70000000000000007,
1.3962634015954636 },
- { 1.3232737468822813, 0.60000000000000009, 0.69999999999999996,
+ { 3.3029735898397159, 0.60000000000000009, 0.70000000000000007,
1.5707963267948966 },
};
const double toler158 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2705175719241326e-16
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 7.3044933435043190e-16
+// mean(f - f_Boost): 2.6367796834847468e-16
+// variance(f - f_Boost): 8.5834655546147173e-33
+// stddev(f - f_Boost): 9.2646994309662939e-17
const testcase_ellint_3<double>
data159[10] =
{
{ 0.0000000000000000, 0.60000000000000009, 0.80000000000000004,
0.0000000000000000 },
- { 0.17345794195390685, 0.60000000000000009, 0.80000000000000004,
+ { 0.17628618080795252, 0.60000000000000009, 0.80000000000000004,
0.17453292519943295 },
- { 0.34098797854531027, 0.60000000000000009, 0.80000000000000004,
+ { 0.36349976272521012, 0.60000000000000009, 0.80000000000000004,
0.34906585039886590 },
- { 0.49882569168826213, 0.60000000000000009, 0.80000000000000004,
+ { 0.57474392342151914, 0.60000000000000009, 0.80000000000000004,
0.52359877559829882 },
- { 0.64603758566475511, 0.60000000000000009, 0.80000000000000004,
+ { 0.82814493499158170, 0.60000000000000009, 0.80000000000000004,
0.69813170079773179 },
- { 0.78380365594769730, 0.60000000000000009, 0.80000000000000004,
+ { 1.1511281795998280, 0.60000000000000009, 0.80000000000000004,
0.87266462599716477 },
- { 0.91430946255611190, 0.60000000000000009, 0.80000000000000004,
+ { 1.5864286332503075, 0.60000000000000009, 0.80000000000000004,
1.0471975511965976 },
- { 1.0398955217270607, 0.60000000000000009, 0.80000000000000004,
+ { 2.1958944866494527, 0.60000000000000009, 0.80000000000000004,
1.2217304763960306 },
- { 1.1625948314277679, 0.60000000000000009, 0.80000000000000004,
+ { 3.0398358172574604, 0.60000000000000009, 0.80000000000000004,
1.3962634015954636 },
- { 1.2840021261752192, 0.60000000000000009, 0.80000000000000004,
+ { 4.0867036409261832, 0.60000000000000009, 0.80000000000000004,
1.5707963267948966 },
};
const double toler159 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.90000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.5585887739668036e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.5952142720718732e-16
+// mean(f - f_Boost): 4.6351811278100284e-16
+// variance(f - f_Boost): 2.1278339779151204e-31
+// stddev(f - f_Boost): 4.6128450851021651e-16
const testcase_ellint_3<double>
data160[10] =
{
{ 0.0000000000000000, 0.60000000000000009, 0.90000000000000002,
0.0000000000000000 },
- { 0.17328652344890030, 0.60000000000000009, 0.90000000000000002,
+ { 0.17646850384035848, 0.60000000000000009, 0.90000000000000002,
0.17453292519943295 },
- { 0.33973880062929018, 0.60000000000000009, 0.90000000000000002,
+ { 0.36509041515134105, 0.60000000000000009, 0.90000000000000002,
0.34906585039886590 },
- { 0.49515092233122743, 0.60000000000000009, 0.90000000000000002,
+ { 0.58097838596260631, 0.60000000000000009, 0.90000000000000002,
0.52359877559829882 },
- { 0.63864042139737043, 0.60000000000000009, 0.90000000000000002,
+ { 0.84656453396163722, 0.60000000000000009, 0.90000000000000002,
0.69813170079773179 },
- { 0.77167205646538850, 0.60000000000000009, 0.90000000000000002,
+ { 1.1997828426963724, 0.60000000000000009, 0.90000000000000002,
0.87266462599716477 },
- { 0.89673202848034383, 0.60000000000000009, 0.90000000000000002,
+ { 1.7112436789225605, 0.60000000000000009, 0.90000000000000002,
1.0471975511965976 },
- { 1.0163984492661304, 0.60000000000000009, 0.90000000000000002,
+ { 2.5193168553672312, 0.60000000000000009, 0.90000000000000002,
1.2217304763960306 },
- { 1.1328845785162431, 0.60000000000000009, 0.90000000000000002,
+ { 3.8656670488606690, 0.60000000000000009, 0.90000000000000002,
1.3962634015954636 },
- { 1.2479362973851873, 0.60000000000000009, 0.90000000000000002,
+ { 5.8709993116265604, 0.60000000000000009, 0.90000000000000002,
1.5707963267948966 },
};
const double toler160 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996, nu=0.0000000000000000.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 3.5930208052157665e-16
+// Test data for k=0.70000000000000018, nu=0.0000000000000000.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.1569224977685422e-16
+// mean(f - f_Boost): 7.7715611723760953e-17
+// variance(f - f_Boost): 1.6571557210371951e-32
+// stddev(f - f_Boost): 1.2873056051447903e-16
const testcase_ellint_3<double>
data161[10] =
{
- { 0.0000000000000000, 0.69999999999999996, 0.0000000000000000,
+ { 0.0000000000000000, 0.70000000000000018, 0.0000000000000000,
0.0000000000000000 },
- { 0.17496737466916723, 0.69999999999999996, 0.0000000000000000,
+ { 0.17496737466916723, 0.70000000000000018, 0.0000000000000000,
0.17453292519943295 },
- { 0.35254687535677925, 0.69999999999999996, 0.0000000000000000,
+ { 0.35254687535677931, 0.70000000000000018, 0.0000000000000000,
0.34906585039886590 },
- { 0.53536740275997119, 0.69999999999999996, 0.0000000000000000,
+ { 0.53536740275997130, 0.70000000000000018, 0.0000000000000000,
0.52359877559829882 },
- { 0.72603797651684454, 0.69999999999999996, 0.0000000000000000,
+ { 0.72603797651684454, 0.70000000000000018, 0.0000000000000000,
0.69813170079773179 },
- { 0.92698296348313458, 0.69999999999999996, 0.0000000000000000,
+ { 0.92698296348313447, 0.70000000000000018, 0.0000000000000000,
0.87266462599716477 },
- { 1.1400447527693316, 0.69999999999999996, 0.0000000000000000,
+ { 1.1400447527693318, 0.70000000000000018, 0.0000000000000000,
1.0471975511965976 },
- { 1.3657668117194073, 0.69999999999999996, 0.0000000000000000,
+ { 1.3657668117194073, 0.70000000000000018, 0.0000000000000000,
1.2217304763960306 },
- { 1.6024686895959159, 0.69999999999999996, 0.0000000000000000,
+ { 1.6024686895959164, 0.70000000000000018, 0.0000000000000000,
1.3962634015954636 },
- { 1.8456939983747236, 0.69999999999999996, 0.0000000000000000,
+ { 1.8456939983747236, 0.70000000000000018, 0.0000000000000000,
1.5707963267948966 },
};
const double toler161 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996, nu=0.10000000000000001.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 3.6735282577377367e-16
+// Test data for k=0.70000000000000018, nu=0.10000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.9552278747527691e-16
+// mean(f - f_Boost): 1.1102230246251565e-16
+// variance(f - f_Boost): 1.3695501826753678e-32
+// stddev(f - f_Boost): 1.1702778228589004e-16
const testcase_ellint_3<double>
data162[10] =
{
- { 0.0000000000000000, 0.69999999999999996, 0.10000000000000001,
+ { 0.0000000000000000, 0.70000000000000018, 0.10000000000000001,
0.0000000000000000 },
- { 0.17479076384884684, 0.69999999999999996, 0.10000000000000001,
+ { 0.17514462737300920, 0.70000000000000018, 0.10000000000000001,
0.17453292519943295 },
- { 0.35114844900396364, 0.69999999999999996, 0.10000000000000001,
+ { 0.35396527997470451, 0.70000000000000018, 0.10000000000000001,
0.34906585039886590 },
- { 0.53072776947527001, 0.69999999999999996, 0.10000000000000001,
+ { 0.54015179589433981, 0.70000000000000018, 0.10000000000000001,
0.52359877559829882 },
- { 0.71530198262386235, 0.69999999999999996, 0.10000000000000001,
+ { 0.73734430854477728, 0.70000000000000018, 0.10000000000000001,
0.69813170079773179 },
- { 0.90666760677828306, 0.69999999999999996, 0.10000000000000001,
+ { 0.94888950796697047, 0.70000000000000018, 0.10000000000000001,
0.87266462599716477 },
- { 1.1063366517438080, 0.69999999999999996, 0.10000000000000001,
+ { 1.1772807959736322, 0.70000000000000018, 0.10000000000000001,
1.0471975511965976 },
- { 1.3149477243092149, 0.69999999999999996, 0.10000000000000001,
+ { 1.4231796401075834, 0.70000000000000018, 0.10000000000000001,
1.2217304763960306 },
- { 1.5314886725038925, 0.69999999999999996, 0.10000000000000001,
+ { 1.6841856799887471, 0.70000000000000018, 0.10000000000000001,
1.3962634015954636 },
- { 1.7528050171757608, 0.69999999999999996, 0.10000000000000001,
+ { 1.9541347343119564, 0.70000000000000018, 0.10000000000000001,
1.5707963267948966 },
};
const double toler162 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996, nu=0.20000000000000001.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 3.7517969287516802e-16
+// Test data for k=0.70000000000000018, nu=0.20000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.7430437016285820e-16
+// mean(f - f_Boost): 3.3306690738754695e-17
+// variance(f - f_Boost): 1.3695501826753678e-34
+// stddev(f - f_Boost): 1.1702778228589003e-17
const testcase_ellint_3<double>
data163[10] =
{
- { 0.0000000000000000, 0.69999999999999996, 0.20000000000000001,
+ { 0.0000000000000000, 0.70000000000000018, 0.20000000000000001,
0.0000000000000000 },
- { 0.17461479077791475, 0.69999999999999996, 0.20000000000000001,
+ { 0.17532252613350796, 0.70000000000000018, 0.20000000000000001,
0.17453292519943295 },
- { 0.34976950621407538, 0.69999999999999996, 0.20000000000000001,
+ { 0.35540417596807522, 0.70000000000000018, 0.20000000000000001,
0.34906585039886590 },
- { 0.52622533231350177, 0.69999999999999996, 0.20000000000000001,
+ { 0.54508913033361928, 0.70000000000000018, 0.20000000000000001,
0.52359877559829882 },
- { 0.70508774017895215, 0.69999999999999996, 0.20000000000000001,
+ { 0.74927635777718415, 0.70000000000000018, 0.20000000000000001,
0.69813170079773179 },
- { 0.88775302531730294, 0.69999999999999996, 0.20000000000000001,
+ { 0.97261706337936338, 0.70000000000000018, 0.20000000000000001,
0.87266462599716477 },
- { 1.0756195476149006, 0.69999999999999996, 0.20000000000000001,
+ { 1.2187303976209327, 0.70000000000000018, 0.20000000000000001,
1.0471975511965976 },
- { 1.2695349716654374, 0.69999999999999996, 0.20000000000000001,
+ { 1.4887796709222487, 0.70000000000000018, 0.20000000000000001,
1.2217304763960306 },
- { 1.4690814617070540, 0.69999999999999996, 0.20000000000000001,
+ { 1.7796581281839214, 0.70000000000000018, 0.20000000000000001,
1.3962634015954636 },
- { 1.6721098780092145, 0.69999999999999996, 0.20000000000000001,
+ { 2.0829290325820207, 0.70000000000000018, 0.20000000000000001,
1.5707963267948966 },
};
const double toler163 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996, nu=0.29999999999999999.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8280039841080712e-16
+// Test data for k=0.70000000000000018, nu=0.30000000000000004.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.2570807706941696e-16
+// mean(f - f_Boost): 8.8817841970012528e-17
+// variance(f - f_Boost): 1.5582437633995295e-32
+// stddev(f - f_Boost): 1.2482963443828271e-16
const testcase_ellint_3<double>
data164[10] =
{
- { 0.0000000000000000, 0.69999999999999996, 0.29999999999999999,
+ { 0.0000000000000000, 0.70000000000000018, 0.30000000000000004,
0.0000000000000000 },
- { 0.17443945136076175, 0.69999999999999996, 0.29999999999999999,
+ { 0.17550107516328570, 0.70000000000000018, 0.30000000000000004,
0.17453292519943295 },
- { 0.34840956983535287, 0.69999999999999996, 0.29999999999999999,
+ { 0.35686409576571965, 0.70000000000000018, 0.30000000000000004,
0.34906585039886590 },
- { 0.52185308551329168, 0.69999999999999996, 0.29999999999999999,
+ { 0.55018827316513352, 0.70000000000000018, 0.30000000000000004,
0.52359877559829882 },
- { 0.69535240431168255, 0.69999999999999996, 0.29999999999999999,
+ { 0.76189759494390275, 0.70000000000000018, 0.30000000000000004,
0.69813170079773179 },
- { 0.87007983473964923, 0.69999999999999996, 0.29999999999999999,
+ { 0.99844623430885626, 0.70000000000000018, 0.30000000000000004,
0.87266462599716477 },
- { 1.0474657975577066, 0.69999999999999996, 0.29999999999999999,
+ { 1.2652862989039833, 0.70000000000000018, 0.30000000000000004,
1.0471975511965976 },
- { 1.2286225419931891, 0.69999999999999996, 0.29999999999999999,
+ { 1.5647666808691361, 0.70000000000000018, 0.30000000000000004,
1.2217304763960306 },
- { 1.4136490671013271, 0.69999999999999996, 0.29999999999999999,
+ { 1.8932499694938165, 0.70000000000000018, 0.30000000000000004,
1.3962634015954636 },
- { 1.6011813647733213, 0.69999999999999996, 0.29999999999999999,
+ { 2.2392290510988535, 0.70000000000000018, 0.30000000000000004,
1.5707963267948966 },
};
const double toler164 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996, nu=0.40000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3472957053482092e-16
+// Test data for k=0.70000000000000018, nu=0.40000000000000002.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.3719045096496910e-16
+// mean(f - f_Boost): 1.3600232051658169e-16
+// variance(f - f_Boost): 1.1718213750516114e-32
+// stddev(f - f_Boost): 1.0825069861444829e-16
const testcase_ellint_3<double>
data165[10] =
{
- { 0.0000000000000000, 0.69999999999999996, 0.40000000000000002,
+ { 0.0000000000000000, 0.70000000000000018, 0.40000000000000002,
0.0000000000000000 },
- { 0.17426474153983229, 0.69999999999999996, 0.40000000000000002,
+ { 0.17568027871494424, 0.70000000000000018, 0.40000000000000002,
0.17453292519943295 },
- { 0.34706817945773732, 0.69999999999999996, 0.40000000000000002,
+ { 0.35834559208180261, 0.70000000000000018, 0.40000000000000002,
0.34906585039886590 },
- { 0.51760452851738148, 0.69999999999999996, 0.40000000000000002,
+ { 0.55545885451190613, 0.70000000000000018, 0.40000000000000002,
0.52359877559829882 },
- { 0.68605801534722755, 0.69999999999999996, 0.40000000000000002,
+ { 0.77528120402568113, 0.70000000000000018, 0.40000000000000002,
0.69813170079773179 },
- { 0.85351339387296532, 0.69999999999999996, 0.40000000000000002,
+ { 1.0267241287600322, 0.70000000000000018, 0.40000000000000002,
0.87266462599716477 },
- { 1.0215297967969539, 0.69999999999999996, 0.40000000000000002,
+ { 1.3181380338980246, 0.70000000000000018, 0.40000000000000002,
1.0471975511965976 },
- { 1.1915051074460530, 0.69999999999999996, 0.40000000000000002,
+ { 1.6542840785132087, 0.70000000000000018, 0.40000000000000002,
1.2217304763960306 },
- { 1.3639821911744707, 0.69999999999999996, 0.40000000000000002,
+ { 2.0315595131131823, 0.70000000000000018, 0.40000000000000002,
1.3962634015954636 },
- { 1.5382162002954762, 0.69999999999999996, 0.40000000000000002,
+ { 2.4342502915307880, 0.70000000000000018, 0.40000000000000002,
1.5707963267948966 },
};
const double toler165 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996, nu=0.50000000000000000.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 3.9748346743390620e-16
+// Test data for k=0.70000000000000018, nu=0.50000000000000000.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.0277361210295499e-16
+// mean(f - f_Boost): 1.6930901125533636e-16
+// variance(f - f_Boost): 6.3799163752809956e-32
+// stddev(f - f_Boost): 2.5258496343371268e-16
const testcase_ellint_3<double>
data166[10] =
{
- { 0.0000000000000000, 0.69999999999999996, 0.50000000000000000,
+ { 0.0000000000000000, 0.70000000000000018, 0.50000000000000000,
0.0000000000000000 },
- { 0.17409065729516096, 0.69999999999999996, 0.50000000000000000,
+ { 0.17586014108156545, 0.70000000000000018, 0.50000000000000000,
0.17453292519943295 },
- { 0.34574489064986091, 0.69999999999999996, 0.50000000000000000,
+ { 0.35984923894341653, 0.70000000000000018, 0.50000000000000000,
0.34906585039886590 },
- { 0.51347361925579782, 0.69999999999999996, 0.50000000000000000,
+ { 0.56091135606739995, 0.70000000000000018, 0.50000000000000000,
0.52359877559829882 },
- { 0.67717079489579279, 0.69999999999999996, 0.50000000000000000,
+ { 0.78951212635197054, 0.70000000000000018, 0.50000000000000000,
0.69813170079773179 },
- { 0.83793902055292280, 0.69999999999999996, 0.50000000000000000,
+ { 1.0578865732938731, 0.70000000000000018, 0.50000000000000000,
0.87266462599716477 },
- { 0.99752863545289705, 0.69999999999999996, 0.50000000000000000,
+ { 1.3789149005151722, 0.70000000000000018, 0.50000000000000000,
1.0471975511965976 },
- { 1.1576240080401501, 0.69999999999999996, 0.50000000000000000,
+ { 1.7620212286086228, 0.70000000000000018, 0.50000000000000000,
1.2217304763960306 },
- { 1.3191464023923762, 0.69999999999999996, 0.50000000000000000,
+ { 2.2051554347435589, 0.70000000000000018, 0.50000000000000000,
1.3962634015954636 },
- { 1.4818433192178544, 0.69999999999999996, 0.50000000000000000,
+ { 2.6868019968236996, 0.70000000000000018, 0.50000000000000000,
1.5707963267948966 },
};
const double toler166 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996, nu=0.59999999999999998.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 4.0457157538295173e-16
+// Test data for k=0.70000000000000018, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.8597454441867134e-16
+// mean(f - f_Boost): 2.5535129566378598e-16
+// variance(f - f_Boost): 2.8561208198482198e-31
+// stddev(f - f_Boost): 5.3442687243889785e-16
const testcase_ellint_3<double>
data167[10] =
{
- { 0.0000000000000000, 0.69999999999999996, 0.59999999999999998,
+ { 0.0000000000000000, 0.70000000000000018, 0.60000000000000009,
0.0000000000000000 },
- { 0.17391719464391614, 0.69999999999999996, 0.59999999999999998,
+ { 0.17604066659721918, 0.70000000000000018, 0.60000000000000009,
0.17453292519943295 },
- { 0.34443927423869031, 0.69999999999999996, 0.59999999999999998,
+ { 0.36137563278353424, 0.70000000000000018, 0.60000000000000009,
0.34906585039886590 },
- { 0.50945473266486063, 0.69999999999999996, 0.59999999999999998,
+ { 0.56655721272747606, 0.70000000000000018, 0.60000000000000009,
0.52359877559829882 },
- { 0.66866056326513812, 0.69999999999999996, 0.59999999999999998,
+ { 0.80468966552978305, 0.70000000000000018, 0.60000000000000009,
0.69813170079773179 },
- { 0.82325830002337352, 0.69999999999999996, 0.59999999999999998,
+ { 1.0924902943683852, 0.70000000000000018, 0.60000000000000009,
0.87266462599716477 },
- { 0.97522808245669368, 0.69999999999999996, 0.59999999999999998,
+ { 1.4499247992499800, 0.70000000000000018, 0.60000000000000009,
1.0471975511965976 },
- { 1.1265300613705285, 0.69999999999999996, 0.59999999999999998,
+ { 1.8953714382113818, 0.70000000000000018, 0.60000000000000009,
1.2217304763960306 },
- { 1.2784066076152001, 0.69999999999999996, 0.59999999999999998,
+ { 2.4323229949248670, 0.70000000000000018, 0.60000000000000009,
1.3962634015954636 },
- { 1.4309994736080540, 0.69999999999999996, 0.59999999999999998,
+ { 3.0314573496746746, 0.70000000000000018, 0.60000000000000009,
1.5707963267948966 },
};
const double toler167 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996, nu=0.69999999999999996.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 5.4867405596732161e-16
+// Test data for k=0.70000000000000018, nu=0.70000000000000007.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.2316852368580916e-16
+// mean(f - f_Boost): 7.7715611723760953e-17
+// variance(f - f_Boost): 7.4564398834547797e-34
+// stddev(f - f_Boost): 2.7306482533374340e-17
const testcase_ellint_3<double>
data168[10] =
{
- { 0.0000000000000000, 0.69999999999999996, 0.69999999999999996,
+ { 0.0000000000000000, 0.70000000000000018, 0.70000000000000007,
0.0000000000000000 },
- { 0.17374434963995031, 0.69999999999999996, 0.69999999999999996,
+ { 0.17622185963747933, 0.70000000000000018, 0.70000000000000007,
0.17453292519943295 },
- { 0.34315091562900674, 0.69999999999999996, 0.69999999999999996,
+ { 0.36292539360435261, 0.70000000000000018, 0.70000000000000007,
0.34906585039886590 },
- { 0.50554262375653347, 0.69999999999999996, 0.69999999999999996,
+ { 0.57240892970150015, 0.70000000000000018, 0.70000000000000007,
0.52359877559829882 },
- { 0.66050025406305801, 0.69999999999999996, 0.69999999999999996,
+ { 0.82093084713182629, 0.70000000000000018, 0.70000000000000007,
0.69813170079773179 },
- { 0.80938620118847404, 0.69999999999999996, 0.69999999999999996,
+ { 1.1312609022179871, 0.70000000000000018, 0.70000000000000007,
0.87266462599716477 },
- { 0.95443223855852144, 0.69999999999999996, 0.69999999999999996,
+ { 1.5345768067715795, 0.70000000000000018, 0.70000000000000007,
1.0471975511965976 },
- { 1.0978573207128304, 0.69999999999999996, 0.69999999999999996,
+ { 2.0668847445934424, 0.70000000000000018, 0.70000000000000007,
1.2217304763960306 },
- { 1.2411754575007123, 0.69999999999999996, 0.69999999999999996,
+ { 2.7483444537551245, 0.70000000000000018, 0.70000000000000007,
1.3962634015954636 },
- { 1.3848459188329196, 0.69999999999999996, 0.69999999999999996,
+ { 3.5408408771788569, 0.70000000000000018, 0.70000000000000007,
1.5707963267948966 },
};
const double toler168 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1829502028913879e-16
+// Test data for k=0.70000000000000018, nu=0.80000000000000004.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.1198716111867353e-16
+// mean(f - f_Boost): 2.2482016248659419e-16
+// variance(f - f_Boost): 5.4326441655972001e-32
+// stddev(f - f_Boost): 2.3308033305273100e-16
const testcase_ellint_3<double>
data169[10] =
{
- { 0.0000000000000000, 0.69999999999999996, 0.80000000000000004,
+ { 0.0000000000000000, 0.70000000000000018, 0.80000000000000004,
0.0000000000000000 },
- { 0.17357211837335740, 0.69999999999999996, 0.80000000000000004,
+ { 0.17640372461994805, 0.70000000000000018, 0.80000000000000004,
0.17453292519943295 },
- { 0.34187941416012108, 0.69999999999999996, 0.80000000000000004,
+ { 0.36449916621651091, 0.70000000000000018, 0.80000000000000004,
0.34906585039886590 },
- { 0.50173239465478259, 0.69999999999999996, 0.80000000000000004,
+ { 0.57848021800372584, 0.70000000000000018, 0.80000000000000004,
0.52359877559829882 },
- { 0.65266550725988315, 0.69999999999999996, 0.80000000000000004,
+ { 0.83837480968392586, 0.70000000000000018, 0.80000000000000004,
0.69813170079773179 },
- { 0.79624879865249298, 0.69999999999999996, 0.80000000000000004,
+ { 1.1751669030061143, 0.70000000000000018, 0.80000000000000004,
0.87266462599716477 },
- { 0.93497577043296920, 0.69999999999999996, 0.80000000000000004,
+ { 1.6381851899173603, 0.70000000000000018, 0.80000000000000004,
1.0471975511965976 },
- { 1.0713041566930750, 0.69999999999999996, 0.80000000000000004,
+ { 2.3002065924302197, 0.70000000000000018, 0.80000000000000004,
1.2217304763960306 },
- { 1.2069772023255654, 0.69999999999999996, 0.80000000000000004,
+ { 3.2337600665337871, 0.70000000000000018, 0.80000000000000004,
1.3962634015954636 },
- { 1.3427110650397531, 0.69999999999999996, 0.80000000000000004,
+ { 4.4042405729076970, 0.70000000000000018, 0.80000000000000004,
1.5707963267948966 },
};
const double toler169 = 2.5000000000000020e-13;
-// Test data for k=0.69999999999999996, nu=0.90000000000000002.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2494869624129105e-16
+// Test data for k=0.70000000000000018, nu=0.90000000000000002.
+// max(|f - f_Boost|): 3.5527136788005009e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 8.5869439826269878e-16
+// mean(f - f_Boost): 7.4384942649885490e-16
+// variance(f - f_Boost): 9.7403930714297352e-31
+// stddev(f - f_Boost): 9.8693429727767263e-16
const testcase_ellint_3<double>
data170[10] =
{
- { 0.0000000000000000, 0.69999999999999996, 0.90000000000000002,
+ { 0.0000000000000000, 0.70000000000000018, 0.90000000000000002,
0.0000000000000000 },
- { 0.17340049697003637, 0.69999999999999996, 0.90000000000000002,
+ { 0.17658626600478800, 0.70000000000000018, 0.90000000000000002,
0.17453292519943295 },
- { 0.34062438249741556, 0.69999999999999996, 0.90000000000000002,
+ { 0.36609762156017206, 0.70000000000000018, 0.90000000000000002,
0.34906585039886590 },
- { 0.49801946510076867, 0.69999999999999996, 0.90000000000000002,
+ { 0.58478615187842409, 0.70000000000000018, 0.90000000000000002,
0.52359877559829882 },
- { 0.64513432604750476, 0.69999999999999996, 0.90000000000000002,
+ { 0.85718862878291846, 0.70000000000000018, 0.90000000000000002,
0.69813170079773179 },
- { 0.78378145487573758, 0.69999999999999996, 0.90000000000000002,
+ { 1.2255385617397643, 0.70000000000000018, 0.90000000000000002,
0.87266462599716477 },
- { 0.91671799500854623, 0.69999999999999996, 0.90000000000000002,
+ { 1.7696521899992941, 0.70000000000000018, 0.90000000000000002,
1.0471975511965976 },
- { 1.0466193579463123, 0.69999999999999996, 0.90000000000000002,
+ { 2.6476314987883507, 0.70000000000000018, 0.90000000000000002,
1.2217304763960306 },
- { 1.1754218079199146, 0.69999999999999996, 0.90000000000000002,
+ { 4.1373434902898083, 0.70000000000000018, 0.90000000000000002,
1.3962634015954636 },
- { 1.3040500499695913, 0.69999999999999996, 0.90000000000000002,
+ { 6.3796094177887763, 0.70000000000000018, 0.90000000000000002,
1.5707963267948966 },
};
const double toler170 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.0000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1175183168766718e-16
+// max(|f - f_Boost|): 1.5543122344752192e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.7898565163847540e-16
+// mean(f - f_Boost): 2.3869795029440865e-16
+// variance(f - f_Boost): 2.1368406725192426e-31
+// stddev(f - f_Boost): 4.6225974002926564e-16
const testcase_ellint_3<double>
data171[10] =
{
@@ -4978,596 +5490,654 @@ data171[10] =
0.0000000000000000 },
{ 0.17510154241338899, 0.80000000000000004, 0.0000000000000000,
0.17453292519943295 },
- { 0.35365068839779390, 0.80000000000000004, 0.0000000000000000,
+ { 0.35365068839779396, 0.80000000000000004, 0.0000000000000000,
0.34906585039886590 },
{ 0.53926804409084550, 0.80000000000000004, 0.0000000000000000,
0.52359877559829882 },
- { 0.73587926028070361, 0.80000000000000004, 0.0000000000000000,
+ { 0.73587926028070372, 0.80000000000000004, 0.0000000000000000,
0.69813170079773179 },
{ 0.94770942970071170, 0.80000000000000004, 0.0000000000000000,
0.87266462599716477 },
{ 1.1789022995388236, 0.80000000000000004, 0.0000000000000000,
1.0471975511965976 },
- { 1.4323027881876009, 0.80000000000000004, 0.0000000000000000,
+ { 1.4323027881876012, 0.80000000000000004, 0.0000000000000000,
1.2217304763960306 },
- { 1.7069629739121674, 0.80000000000000004, 0.0000000000000000,
+ { 1.7069629739121677, 0.80000000000000004, 0.0000000000000000,
1.3962634015954636 },
- { 1.9953027776647296, 0.80000000000000004, 0.0000000000000000,
+ { 1.9953027776647294, 0.80000000000000004, 0.0000000000000000,
1.5707963267948966 },
};
const double toler171 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.10000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1537164503193145e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.3898786942190374e-16
+// mean(f - f_Boost): 2.3869795029440865e-16
+// variance(f - f_Boost): 2.9190059990693968e-31
+// stddev(f - f_Boost): 5.4027826155319237e-16
const testcase_ellint_3<double>
data172[10] =
{
{ 0.0000000000000000, 0.80000000000000004, 0.10000000000000001,
0.0000000000000000 },
- { 0.17492468824017163, 0.80000000000000004, 0.10000000000000001,
+ { 0.17527903952342144, 0.80000000000000004, 0.10000000000000001,
0.17453292519943295 },
- { 0.35224443521476911, 0.80000000000000004, 0.10000000000000001,
+ { 0.35507705313548549, 0.80000000000000004, 0.10000000000000001,
0.34906585039886590 },
- { 0.53456851853226950, 0.80000000000000004, 0.10000000000000001,
+ { 0.54411455987643553, 0.80000000000000004, 0.10000000000000001,
0.52359877559829882 },
- { 0.72488875602364922, 0.80000000000000004, 0.10000000000000001,
+ { 0.74745625666804383, 0.80000000000000004, 0.10000000000000001,
0.69813170079773179 },
- { 0.92661354274638952, 0.80000000000000004, 0.10000000000000001,
+ { 0.97046953684238557, 0.80000000000000004, 0.10000000000000001,
0.87266462599716477 },
- { 1.1432651144499075, 0.80000000000000004, 0.10000000000000001,
+ { 1.2183080025184605, 0.80000000000000004, 0.10000000000000001,
1.0471975511965976 },
- { 1.3774479927211429, 0.80000000000000004, 0.10000000000000001,
+ { 1.4943711151994405, 0.80000000000000004, 0.10000000000000001,
1.2217304763960306 },
- { 1.6287092337196041, 0.80000000000000004, 0.10000000000000001,
+ { 1.7972401309544201, 0.80000000000000004, 0.10000000000000001,
1.3962634015954636 },
- { 1.8910755418379521, 0.80000000000000004, 0.10000000000000001,
+ { 2.1172616484005085, 0.80000000000000004, 0.10000000000000001,
1.5707963267948966 },
};
const double toler172 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.20000000000000001.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1894552974436829e-16
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.8513740186068518e-16
+// mean(f - f_Boost): 2.8310687127941490e-16
+// variance(f - f_Boost): 2.7528339102381189e-31
+// stddev(f - f_Boost): 5.2467455724840699e-16
const testcase_ellint_3<double>
data173[10] =
{
{ 0.0000000000000000, 0.80000000000000004, 0.20000000000000001,
0.0000000000000000 },
- { 0.17474847286224940, 0.80000000000000004, 0.20000000000000001,
+ { 0.17545718375086419, 0.80000000000000004, 0.20000000000000001,
0.17453292519943295 },
- { 0.35085779529084682, 0.80000000000000004, 0.20000000000000001,
+ { 0.35652404627248163, 0.80000000000000004, 0.20000000000000001,
0.34906585039886590 },
- { 0.53000829263059146, 0.80000000000000004, 0.20000000000000001,
+ { 0.54911638512920913, 0.80000000000000004, 0.20000000000000001,
0.52359877559829882 },
- { 0.71443466027453384, 0.80000000000000004, 0.20000000000000001,
+ { 0.75967684282131176, 0.80000000000000004, 0.20000000000000001,
0.69813170079773179 },
- { 0.90698196872715420, 0.80000000000000004, 0.20000000000000001,
+ { 0.99513526893543769, 0.80000000000000004, 0.20000000000000001,
0.87266462599716477 },
- { 1.1108198200558579, 0.80000000000000004, 0.20000000000000001,
+ { 1.2622192109995993, 0.80000000000000004, 0.20000000000000001,
1.0471975511965976 },
- { 1.3284988909963957, 0.80000000000000004, 0.20000000000000001,
+ { 1.5654106676347741, 0.80000000000000004, 0.20000000000000001,
1.2217304763960306 },
- { 1.5600369318140328, 0.80000000000000004, 0.20000000000000001,
+ { 1.9029531718534984, 0.80000000000000004, 0.20000000000000001,
1.3962634015954636 },
- { 1.8007226661734588, 0.80000000000000004, 0.20000000000000001,
+ { 2.2624789434186798, 0.80000000000000004, 0.20000000000000001,
1.5707963267948966 },
};
const double toler173 = 2.5000000000000020e-13;
-// Test data for k=0.80000000000000004, nu=0.29999999999999999.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2247517409029886e-16
+// Test data for k=0.80000000000000004, nu=0.30000000000000004.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.2825261583337354e-16
+// mean(f - f_Boost): 2.6367796834847468e-16
+// variance(f - f_Boost): 2.8249350208968825e-31
+// stddev(f - f_Boost): 5.3150117788175054e-16
const testcase_ellint_3<double>
data174[10] =
{
- { 0.0000000000000000, 0.80000000000000004, 0.29999999999999999,
+ { 0.0000000000000000, 0.80000000000000004, 0.30000000000000004,
0.0000000000000000 },
- { 0.17457289217669889, 0.80000000000000004, 0.29999999999999999,
+ { 0.17563597931587369, 0.80000000000000004, 0.30000000000000004,
0.17453292519943295 },
- { 0.34949028801501258, 0.80000000000000004, 0.29999999999999999,
+ { 0.35799220412005128, 0.80000000000000004, 0.30000000000000004,
0.34906585039886590 },
- { 0.52558024362769307, 0.80000000000000004, 0.29999999999999999,
+ { 0.55428253691111318, 0.80000000000000004, 0.30000000000000004,
0.52359877559829882 },
- { 0.70447281740094891, 0.80000000000000004, 0.29999999999999999,
+ { 0.77260647376977365, 0.80000000000000004, 0.30000000000000004,
0.69813170079773179 },
- { 0.88864745641528986, 0.80000000000000004, 0.29999999999999999,
+ { 1.0220015271210958, 0.80000000000000004, 0.30000000000000004,
0.87266462599716477 },
- { 1.0811075819341462, 0.80000000000000004, 0.29999999999999999,
+ { 1.3115965312302671, 0.80000000000000004, 0.30000000000000004,
1.0471975511965976 },
- { 1.2844589654082377, 0.80000000000000004, 0.29999999999999999,
+ { 1.6478518468813512, 0.80000000000000004, 0.30000000000000004,
1.2217304763960306 },
- { 1.4991461361277847, 0.80000000000000004, 0.29999999999999999,
+ { 2.0290458414203481, 0.80000000000000004, 0.30000000000000004,
1.3962634015954636 },
- { 1.7214611048717301, 0.80000000000000004, 0.29999999999999999,
+ { 2.4392042002725693, 0.80000000000000004, 0.30000000000000004,
1.5707963267948966 },
};
const double toler174 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.40000000000000002.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2596216594752862e-16
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.3462748389836647e-16
+// mean(f - f_Boost): 3.3861802251067273e-16
+// variance(f - f_Boost): 4.3719465706454422e-31
+// stddev(f - f_Boost): 6.6120696991527871e-16
const testcase_ellint_3<double>
data175[10] =
{
{ 0.0000000000000000, 0.80000000000000004, 0.40000000000000002,
0.0000000000000000 },
- { 0.17439794211872175, 0.80000000000000004, 0.40000000000000002,
+ { 0.17581543047866136, 0.80000000000000004, 0.40000000000000002,
0.17453292519943295 },
- { 0.34814144964568972, 0.80000000000000004, 0.40000000000000002,
+ { 0.35948208343061633, 0.80000000000000004, 0.40000000000000002,
0.34906585039886590 },
- { 0.52127776285273064, 0.80000000000000004, 0.40000000000000002,
+ { 0.55962280893702021, 0.80000000000000004, 0.40000000000000002,
0.52359877559829882 },
- { 0.69496411438966588, 0.80000000000000004, 0.40000000000000002,
+ { 0.78632063889234116, 0.80000000000000004, 0.40000000000000002,
0.69813170079773179 },
- { 0.87146878427509589, 0.80000000000000004, 0.40000000000000002,
+ { 1.0514333069550323, 0.80000000000000004, 0.40000000000000002,
0.87266462599716477 },
- { 1.0537579024937762, 0.80000000000000004, 0.40000000000000002,
+ { 1.3677213138838757, 0.80000000000000004, 0.40000000000000002,
1.0471975511965976 },
- { 1.2445534387922637, 0.80000000000000004, 0.40000000000000002,
+ { 1.7451736773665165, 0.80000000000000004, 0.40000000000000002,
1.2217304763960306 },
- { 1.4446769766361993, 0.80000000000000004, 0.40000000000000002,
+ { 2.1830100424586831, 0.80000000000000004, 0.40000000000000002,
1.3962634015954636 },
- { 1.6512267838651289, 0.80000000000000004, 0.40000000000000002,
+ { 2.6604037035529724, 0.80000000000000004, 0.40000000000000002,
1.5707963267948966 },
};
const double toler175 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.50000000000000000.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.2940800093915668e-16
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.0388243828581744e-16
+// mean(f - f_Boost): 3.8580250105724191e-16
+// variance(f - f_Boost): 6.4106456575047741e-31
+// stddev(f - f_Boost): 8.0066507713929764e-16
const testcase_ellint_3<double>
data176[10] =
{
{ 0.0000000000000000, 0.80000000000000004, 0.50000000000000000,
0.0000000000000000 },
- { 0.17422361866118044, 0.80000000000000004, 0.50000000000000000,
+ { 0.17599554153999472, 0.80000000000000004, 0.50000000000000000,
0.17453292519943295 },
- { 0.34681083254170475, 0.80000000000000004, 0.50000000000000000,
+ { 0.36099426243351540, 0.80000000000000004, 0.50000000000000000,
0.34906585039886590 },
- { 0.51709470815494440, 0.80000000000000004, 0.50000000000000000,
+ { 0.56514786174780673, 0.80000000000000004, 0.50000000000000000,
0.52359877559829882 },
- { 0.68587375344080237, 0.80000000000000004, 0.50000000000000000,
+ { 0.80090697622371010, 0.80000000000000004, 0.50000000000000000,
0.69813170079773179 },
- { 0.85532571852810624, 0.80000000000000004, 0.50000000000000000,
+ { 1.0838891627679339, 0.80000000000000004, 0.50000000000000000,
0.87266462599716477 },
- { 1.0284677391874903, 0.80000000000000004, 0.50000000000000000,
+ { 1.4323506654466280, 0.80000000000000004, 0.50000000000000000,
1.0471975511965976 },
- { 1.2081693942686225, 0.80000000000000004, 0.50000000000000000,
+ { 1.8625761085390575, 0.80000000000000004, 0.50000000000000000,
1.2217304763960306 },
- { 1.3955803006426311, 0.80000000000000004, 0.50000000000000000,
+ { 2.3768757305654766, 0.80000000000000004, 0.50000000000000000,
1.3962634015954636 },
- { 1.5884528947755532, 0.80000000000000004, 0.50000000000000000,
+ { 2.9478781158239746, 0.80000000000000004, 0.50000000000000000,
1.5707963267948966 },
};
const double toler176 = 2.5000000000000020e-13;
-// Test data for k=0.80000000000000004, nu=0.59999999999999998.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3281408974056389e-16
+// Test data for k=0.80000000000000004, nu=0.60000000000000009.
+// max(|f - f_Boost|): 3.5527136788005009e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.0631099169042069e-15
+// mean(f - f_Boost): 4.8294701571194306e-16
+// variance(f - f_Boost): 1.1633910328160319e-30
+// stddev(f - f_Boost): 1.0786060600682865e-15
const testcase_ellint_3<double>
data177[10] =
{
- { 0.0000000000000000, 0.80000000000000004, 0.59999999999999998,
+ { 0.0000000000000000, 0.80000000000000004, 0.60000000000000009,
0.0000000000000000 },
- { 0.17404991781414089, 0.80000000000000004, 0.59999999999999998,
+ { 0.17617631684170665, 0.80000000000000004, 0.60000000000000009,
0.17453292519943295 },
- { 0.34549800443625167, 0.80000000000000004, 0.59999999999999998,
+ { 0.36252934193666231, 0.80000000000000004, 0.60000000000000009,
0.34906585039886590 },
- { 0.51302536167001545, 0.80000000000000004, 0.59999999999999998,
+ { 0.57086932622945163, 0.80000000000000004, 0.60000000000000009,
0.52359877559829882 },
- { 0.67717065003912236, 0.80000000000000004, 0.59999999999999998,
+ { 0.81646796740150973, 0.80000000000000004, 0.60000000000000009,
0.69813170079773179 },
- { 0.84011512421134416, 0.80000000000000004, 0.59999999999999998,
+ { 1.1199552158519064, 0.80000000000000004, 0.60000000000000009,
0.87266462599716477 },
- { 1.0049863847088740, 0.80000000000000004, 0.59999999999999998,
+ { 1.5079766673336394, 0.80000000000000004, 0.60000000000000009,
1.0471975511965976 },
- { 1.1748145941898920, 0.80000000000000004, 0.59999999999999998,
+ { 2.0082747447038165, 0.80000000000000004, 0.60000000000000009,
1.2217304763960306 },
- { 1.3510319699755071, 0.80000000000000004, 0.59999999999999998,
+ { 2.6315146066775523, 0.80000000000000004, 0.60000000000000009,
1.3962634015954636 },
- { 1.5319262547427865, 0.80000000000000004, 0.59999999999999998,
+ { 3.3418121892288051, 0.80000000000000004, 0.60000000000000009,
1.5707963267948966 },
};
const double toler177 = 2.5000000000000020e-13;
-// Test data for k=0.80000000000000004, nu=0.69999999999999996.
-// max(|f - f_GSL|): 2.2204460492503131e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3618176466061808e-16
+// Test data for k=0.80000000000000004, nu=0.70000000000000007.
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.6544679145741375e-16
+// mean(f - f_Boost): 3.2751579226442120e-16
+// variance(f - f_Boost): 4.4236851331020672e-31
+// stddev(f - f_Boost): 6.6510789599147505e-16
const testcase_ellint_3<double>
data178[10] =
{
- { 0.0000000000000000, 0.80000000000000004, 0.69999999999999996,
+ { 0.0000000000000000, 0.80000000000000004, 0.70000000000000007,
0.0000000000000000 },
- { 0.17387683562442199, 0.80000000000000004, 0.69999999999999996,
+ { 0.17635776076721221, 0.80000000000000004, 0.70000000000000007,
0.17453292519943295 },
- { 0.34420254775101611, 0.80000000000000004, 0.69999999999999996,
+ { 0.36408794649916976, 0.80000000000000004, 0.70000000000000007,
0.34906585039886590 },
- { 0.50906439222143673, 0.80000000000000004, 0.69999999999999996,
+ { 0.57679992290624138, 0.80000000000000004, 0.70000000000000007,
0.52359877559829882 },
- { 0.66882693152688422, 0.80000000000000004, 0.69999999999999996,
+ { 0.83312441418142813, 0.80000000000000004, 0.70000000000000007,
0.69813170079773179 },
- { 0.82574792844091316, 0.80000000000000004, 0.69999999999999996,
+ { 1.1603958891464856, 0.80000000000000004, 0.70000000000000007,
0.87266462599716477 },
- { 0.98310431309490931, 0.80000000000000004, 0.69999999999999996,
+ { 1.5982855143796213, 0.80000000000000004, 0.70000000000000007,
1.0471975511965976 },
- { 1.1440884535113258, 0.80000000000000004, 0.69999999999999996,
+ { 2.1962484408371821, 0.80000000000000004, 0.70000000000000007,
1.2217304763960306 },
- { 1.3103743938952537, 0.80000000000000004, 0.69999999999999996,
+ { 2.9873281786111869, 0.80000000000000004, 0.70000000000000007,
1.3962634015954636 },
- { 1.4806912324625332, 0.80000000000000004, 0.69999999999999996,
+ { 3.9268876980046397, 0.80000000000000004, 0.70000000000000007,
1.5707963267948966 },
};
const double toler178 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3951228558314112e-16
+// max(|f - f_Boost|): 4.4408920985006262e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.0176949165011079e-16
+// mean(f - f_Boost): 7.0499162063697436e-16
+// variance(f - f_Boost): 1.7230805408026989e-30
+// stddev(f - f_Boost): 1.3126616246400665e-15
const testcase_ellint_3<double>
data179[10] =
{
{ 0.0000000000000000, 0.80000000000000004, 0.80000000000000004,
0.0000000000000000 },
- { 0.17370436817515203, 0.80000000000000004, 0.80000000000000004,
+ { 0.17653987774203392, 0.80000000000000004, 0.80000000000000004,
0.17453292519943295 },
- { 0.34292405894783395, 0.80000000000000004, 0.80000000000000004,
+ { 0.36567072568046877, 0.80000000000000004, 0.80000000000000004,
0.34906585039886590 },
- { 0.50520682176250076, 0.80000000000000004, 0.80000000000000004,
+ { 0.58295359996558616, 0.80000000000000004, 0.80000000000000004,
0.52359877559829882 },
- { 0.66081751679736178, 0.80000000000000004, 0.80000000000000004,
+ { 0.85101998309176108, 0.80000000000000004, 0.80000000000000004,
0.69813170079773179 },
- { 0.81214672249355102, 0.80000000000000004, 0.80000000000000004,
+ { 1.2062322059736537, 0.80000000000000004, 0.80000000000000004,
0.87266462599716477 },
- { 0.96264481387685552, 0.80000000000000004, 0.80000000000000004,
+ { 1.7090321420917429, 0.80000000000000004, 0.80000000000000004,
1.0471975511965976 },
- { 1.1156611352656258, 0.80000000000000004, 0.80000000000000004,
+ { 2.4529058049405066, 0.80000000000000004, 0.80000000000000004,
1.2217304763960306 },
- { 1.2730756225143889, 0.80000000000000004, 0.80000000000000004,
+ { 3.5368893360106948, 0.80000000000000004, 0.80000000000000004,
1.3962634015954636 },
- { 1.4339837018309471, 0.80000000000000004, 0.80000000000000004,
+ { 4.9246422058196062, 0.80000000000000004, 0.80000000000000004,
1.5707963267948966 },
};
const double toler179 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.90000000000000002.
-// max(|f - f_GSL|): 3.3306690738754696e-16
-// max(|f - f_GSL| / |f_GSL|): 4.4280684534289690e-16
+// max(|f - f_Boost|): 4.4408920985006262e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.7782721357365268e-16
+// mean(f - f_Boost): 8.9928064994637676e-16
+// variance(f - f_Boost): 1.5485199571025344e-30
+// stddev(f - f_Boost): 1.2443954183066307e-15
const testcase_ellint_3<double>
data180[10] =
{
{ 0.0000000000000000, 0.80000000000000004, 0.90000000000000002,
0.0000000000000000 },
- { 0.17353251158533151, 0.80000000000000004, 0.90000000000000002,
+ { 0.17672267223433513, 0.80000000000000004, 0.90000000000000002,
0.17453292519943295 },
- { 0.34166214791545768, 0.80000000000000004, 0.90000000000000002,
+ { 0.36727835537196063, 0.80000000000000004, 0.90000000000000002,
0.34906585039886590 },
- { 0.50144799535130569, 0.80000000000000004, 0.90000000000000002,
+ { 0.58934569363716649, 0.80000000000000004, 0.90000000000000002,
0.52359877559829882 },
- { 0.65311976193814425, 0.80000000000000004, 0.90000000000000002,
+ { 0.87032723471138851, 0.80000000000000004, 0.90000000000000002,
0.69813170079773179 },
- { 0.79924384892320866, 0.80000000000000004, 0.90000000000000002,
+ { 1.2588676111323349, 0.80000000000000004, 0.90000000000000002,
0.87266462599716477 },
- { 0.94345762353365603, 0.80000000000000004, 0.90000000000000002,
+ { 1.8498731900660019, 0.80000000000000004, 0.90000000000000002,
1.0471975511965976 },
- { 1.0892582069219161, 0.80000000000000004, 0.90000000000000002,
+ { 2.8368381299300420, 0.80000000000000004, 0.90000000000000002,
1.2217304763960306 },
- { 1.2387000876610268, 0.80000000000000004, 0.90000000000000002,
+ { 4.5674844191654058, 0.80000000000000004, 0.90000000000000002,
1.3962634015954636 },
- { 1.3911845406776222, 0.80000000000000004, 0.90000000000000002,
+ { 7.2263259298637115, 0.80000000000000004, 0.90000000000000002,
1.5707963267948966 },
};
const double toler180 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991, nu=0.0000000000000000.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8945813740035884e-16
+// Test data for k=0.90000000000000013, nu=0.0000000000000000.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.3381508715713360e-16
+// mean(f - f_Boost): 5.8286708792820721e-17
+// variance(f - f_Boost): 4.1942474344433133e-34
+// stddev(f - f_Boost): 2.0479861900030756e-17
const testcase_ellint_3<double>
data181[10] =
{
- { 0.0000000000000000, 0.89999999999999991, 0.0000000000000000,
+ { 0.0000000000000000, 0.90000000000000013, 0.0000000000000000,
0.0000000000000000 },
- { 0.17525427376115024, 0.89999999999999991, 0.0000000000000000,
+ { 0.17525427376115027, 0.90000000000000013, 0.0000000000000000,
0.17453292519943295 },
- { 0.35492464591297446, 0.89999999999999991, 0.0000000000000000,
+ { 0.35492464591297446, 0.90000000000000013, 0.0000000000000000,
0.34906585039886590 },
- { 0.54388221416157112, 0.89999999999999991, 0.0000000000000000,
+ { 0.54388221416157123, 0.90000000000000013, 0.0000000000000000,
0.52359877559829882 },
- { 0.74797400423532490, 0.89999999999999991, 0.0000000000000000,
+ { 0.74797400423532512, 0.90000000000000013, 0.0000000000000000,
0.69813170079773179 },
- { 0.97463898451966458, 0.89999999999999991, 0.0000000000000000,
+ { 0.97463898451966446, 0.90000000000000013, 0.0000000000000000,
0.87266462599716477 },
- { 1.2334463254523440, 0.89999999999999991, 0.0000000000000000,
+ { 1.2334463254523440, 0.90000000000000013, 0.0000000000000000,
1.0471975511965976 },
- { 1.5355247765594910, 0.89999999999999991, 0.0000000000000000,
+ { 1.5355247765594915, 0.90000000000000013, 0.0000000000000000,
1.2217304763960306 },
- { 1.8882928567775117, 0.89999999999999991, 0.0000000000000000,
+ { 1.8882928567775128, 0.90000000000000013, 0.0000000000000000,
1.3962634015954636 },
- { 2.2805491384227703, 0.89999999999999991, 0.0000000000000000,
+ { 2.2805491384227707, 0.90000000000000013, 0.0000000000000000,
1.5707963267948966 },
};
const double toler181 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991, nu=0.10000000000000001.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 4.1237990617685137e-16
+// Test data for k=0.90000000000000013, nu=0.10000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.1500594295134815e-16
+// mean(f - f_Boost): 9.1593399531575410e-17
+// variance(f - f_Boost): 1.0357223256482469e-33
+// stddev(f - f_Boost): 3.2182640128619758e-17
const testcase_ellint_3<double>
data182[10] =
{
- { 0.0000000000000000, 0.89999999999999991, 0.10000000000000001,
+ { 0.0000000000000000, 0.90000000000000013, 0.10000000000000001,
0.0000000000000000 },
- { 0.17507714233254656, 0.89999999999999991, 0.10000000000000001,
+ { 0.17543204932716244, 0.90000000000000013, 0.10000000000000001,
0.17453292519943295 },
- { 0.35350932904326521, 0.89999999999999991, 0.10000000000000001,
+ { 0.35636022898551184, 0.90000000000000013, 0.10000000000000001,
0.34906585039886590 },
- { 0.53911129989870976, 0.89999999999999991, 0.10000000000000001,
+ { 0.54880278898382595, 0.90000000000000013, 0.10000000000000001,
0.52359877559829882 },
- { 0.73666644254508395, 0.89999999999999991, 0.10000000000000001,
+ { 0.75988834774529268, 0.90000000000000013, 0.10000000000000001,
0.69813170079773179 },
- { 0.95250736612100195, 0.89999999999999991, 0.10000000000000001,
+ { 0.99853303003568117, 0.90000000000000013, 0.10000000000000001,
0.87266462599716477 },
- { 1.1950199550905594, 0.89999999999999991, 0.10000000000000001,
+ { 1.2759958823999022, 0.90000000000000013, 0.10000000000000001,
1.0471975511965976 },
- { 1.4741687286340848, 0.89999999999999991, 0.10000000000000001,
+ { 1.6051187364639401, 0.90000000000000013, 0.10000000000000001,
1.2217304763960306 },
- { 1.7968678183506053, 0.89999999999999991, 0.10000000000000001,
+ { 1.9941406879519474, 0.90000000000000013, 0.10000000000000001,
1.3962634015954636 },
- { 2.1537868513875287, 0.89999999999999991, 0.10000000000000001,
+ { 2.4295011187834890, 0.90000000000000013, 0.10000000000000001,
1.5707963267948966 },
};
const double toler182 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991, nu=0.20000000000000001.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3446165733924066e-16
+// Test data for k=0.90000000000000013, nu=0.20000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.9533518431433547e-16
+// mean(f - f_Boost): 1.0269562977782698e-16
+// variance(f - f_Boost): 1.4388836606733082e-32
+// stddev(f - f_Boost): 1.1995347684303728e-16
const testcase_ellint_3<double>
data183[10] =
{
- { 0.0000000000000000, 0.89999999999999991, 0.20000000000000001,
+ { 0.0000000000000000, 0.90000000000000013, 0.20000000000000001,
0.0000000000000000 },
- { 0.17490065089140927, 0.89999999999999991, 0.20000000000000001,
+ { 0.17561047321968409, 0.90000000000000013, 0.20000000000000001,
0.17453292519943295 },
- { 0.35211377590661436, 0.89999999999999991, 0.20000000000000001,
+ { 0.35781659944356109, 0.90000000000000013, 0.20000000000000001,
0.34906585039886590 },
- { 0.53448220334204100, 0.89999999999999991, 0.20000000000000001,
+ { 0.55388150905215283, 0.90000000000000013, 0.20000000000000001,
0.52359877559829882 },
- { 0.72591368943179579, 0.89999999999999991, 0.20000000000000001,
+ { 0.77246874123251441, 0.90000000000000013, 0.20000000000000001,
0.69813170079773179 },
- { 0.93192539780038763, 0.89999999999999991, 0.20000000000000001,
+ { 1.0244466254771925, 0.90000000000000013, 0.20000000000000001,
0.87266462599716477 },
- { 1.1600809679692683, 0.89999999999999991, 0.20000000000000001,
+ { 1.3234824077640801, 0.90000000000000013, 0.20000000000000001,
1.0471975511965976 },
- { 1.4195407225882508, 0.89999999999999991, 0.20000000000000001,
+ { 1.6849848968804240, 0.90000000000000013, 0.20000000000000001,
1.2217304763960306 },
- { 1.7168966476424521, 0.89999999999999991, 0.20000000000000001,
+ { 2.1185749045502278, 0.90000000000000013, 0.20000000000000001,
1.3962634015954636 },
- { 2.0443194576468895, 0.89999999999999991, 0.20000000000000001,
+ { 2.6076835743348417, 0.90000000000000013, 0.20000000000000001,
1.5707963267948966 },
};
const double toler183 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991, nu=0.29999999999999999.
-// max(|f - f_GSL|): 1.1102230246251565e-15
-// max(|f - f_GSL| / |f_GSL|): 5.6974600067013622e-16
+// Test data for k=0.90000000000000013, nu=0.30000000000000004.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.9712691025502371e-16
+// mean(f - f_Boost): 6.9388939039072284e-17
+// variance(f - f_Boost): 5.9442282234173945e-34
+// stddev(f - f_Boost): 2.4380787976227090e-17
const testcase_ellint_3<double>
data184[10] =
{
- { 0.0000000000000000, 0.89999999999999991, 0.29999999999999999,
+ { 0.0000000000000000, 0.90000000000000013, 0.30000000000000004,
0.0000000000000000 },
- { 0.17472479532647531, 0.89999999999999991, 0.29999999999999999,
+ { 0.17578954966746221, 0.90000000000000013, 0.30000000000000004,
0.17453292519943295 },
- { 0.35073750187374114, 0.89999999999999991, 0.29999999999999999,
+ { 0.35929429810867447, 0.90000000000000013, 0.30000000000000004,
0.34906585039886590 },
- { 0.52998766129466957, 0.89999999999999991, 0.29999999999999999,
+ { 0.55912757154240822, 0.90000000000000013, 0.30000000000000004,
0.52359877559829882 },
- { 0.71566993548699553, 0.89999999999999991, 0.29999999999999999,
+ { 0.78578314722025389, 0.90000000000000013, 0.30000000000000004,
0.69813170079773179 },
- { 0.91271517762560195, 0.89999999999999991, 0.29999999999999999,
+ { 1.0526941001131365, 0.90000000000000013, 0.30000000000000004,
0.87266462599716477 },
- { 1.1281241199843370, 0.89999999999999991, 0.29999999999999999,
+ { 1.3769682234538601, 0.90000000000000013, 0.30000000000000004,
1.0471975511965976 },
- { 1.3704929576917448, 0.89999999999999991, 0.29999999999999999,
+ { 1.7779437432911240, 0.90000000000000013, 0.30000000000000004,
1.2217304763960306 },
- { 1.6461981511487711, 0.89999999999999991, 0.29999999999999999,
+ { 2.2676509341813635, 0.90000000000000013, 0.30000000000000004,
1.3962634015954636 },
- { 1.9486280260314426, 0.89999999999999991, 0.29999999999999999,
+ { 2.8256506968858517, 0.90000000000000013, 0.30000000000000004,
1.5707963267948966 },
};
const double toler184 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991, nu=0.40000000000000002.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 4.7646208744449464e-16
+// Test data for k=0.90000000000000013, nu=0.40000000000000002.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.7042235432234642e-16
+// mean(f - f_Boost): 1.8041124150158794e-16
+// variance(f - f_Boost): 8.5834655546147173e-33
+// stddev(f - f_Boost): 9.2646994309662939e-17
const testcase_ellint_3<double>
data185[10] =
{
- { 0.0000000000000000, 0.89999999999999991, 0.40000000000000002,
+ { 0.0000000000000000, 0.90000000000000013, 0.40000000000000002,
0.0000000000000000 },
- { 0.17454957156468837, 0.89999999999999991, 0.40000000000000002,
+ { 0.17596928293938452, 0.90000000000000013, 0.40000000000000002,
0.17453292519943295 },
- { 0.34938003933330430, 0.89999999999999991, 0.40000000000000002,
+ { 0.36079388642472821, 0.90000000000000013, 0.40000000000000002,
0.34906585039886590 },
- { 0.52562093533067433, 0.89999999999999991, 0.40000000000000002,
+ { 0.56455096667115612, 0.90000000000000013, 0.40000000000000002,
0.52359877559829882 },
- { 0.70589461324915670, 0.89999999999999991, 0.40000000000000002,
+ { 0.79990996997869435, 0.90000000000000013, 0.40000000000000002,
0.69813170079773179 },
- { 0.89472658511942849, 0.89999999999999991, 0.40000000000000002,
+ { 1.0836647913872215, 0.90000000000000013, 0.40000000000000002,
0.87266462599716477 },
- { 1.0987419542323440, 0.89999999999999991, 0.40000000000000002,
+ { 1.4378726836091849, 0.90000000000000013, 0.40000000000000002,
1.0471975511965976 },
- { 1.3261349565496301, 0.89999999999999991, 0.40000000000000002,
+ { 1.8880446720682853, 0.90000000000000013, 0.40000000000000002,
1.2217304763960306 },
- { 1.5831293909853763, 0.89999999999999991, 0.40000000000000002,
+ { 2.4505848932025232, 0.90000000000000013, 0.40000000000000002,
1.3962634015954636 },
- { 1.8641114227238351, 0.89999999999999991, 0.40000000000000002,
+ { 3.1000689868578624, 0.90000000000000013, 0.40000000000000002,
1.5707963267948966 },
};
const double toler185 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991, nu=0.50000000000000000.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 4.9652155758573562e-16
+// Test data for k=0.90000000000000013, nu=0.50000000000000000.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.3939646155354115e-16
+// mean(f - f_Boost): 1.5820678100908481e-16
+// variance(f - f_Boost): 1.0089970755557622e-32
+// stddev(f - f_Boost): 1.0044884646205561e-16
const testcase_ellint_3<double>
data186[10] =
{
- { 0.0000000000000000, 0.89999999999999991, 0.50000000000000000,
+ { 0.0000000000000000, 0.90000000000000013, 0.50000000000000000,
0.0000000000000000 },
- { 0.17437497557073334, 0.89999999999999991, 0.50000000000000000,
+ { 0.17614967734498183, 0.90000000000000013, 0.50000000000000000,
0.17453292519943295 },
- { 0.34804093691586013, 0.89999999999999991, 0.50000000000000000,
+ { 0.36231594750319435, 0.90000000000000013, 0.50000000000000000,
0.34906585039886590 },
- { 0.52137576320372891, 0.89999999999999991, 0.50000000000000000,
+ { 0.57016256984349567, 0.90000000000000013, 0.50000000000000000,
0.52359877559829882 },
- { 0.69655163996912262, 0.89999999999999991, 0.50000000000000000,
+ { 0.81494025918293422, 0.90000000000000013, 0.50000000000000000,
0.69813170079773179 },
- { 0.87783188683054236, 0.89999999999999991, 0.50000000000000000,
+ { 1.1178482279283477, 0.90000000000000013, 0.50000000000000000,
0.87266462599716477 },
- { 1.0716015959755185, 0.89999999999999991, 0.50000000000000000,
+ { 1.5081455873012106, 0.90000000000000013, 0.50000000000000000,
1.0471975511965976 },
- { 1.2857636916026749, 0.89999999999999991, 0.50000000000000000,
+ { 2.0213599730863998, 0.90000000000000013, 0.50000000000000000,
1.2217304763960306 },
- { 1.5264263913252358, 0.89999999999999991, 0.50000000000000000,
+ { 2.6822467012926832, 0.90000000000000013, 0.50000000000000000,
1.3962634015954636 },
- { 1.7888013241937863, 0.89999999999999991, 0.50000000000000000,
+ { 3.4591069002104686, 0.90000000000000013, 0.50000000000000000,
1.5707963267948966 },
};
const double toler186 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991, nu=0.59999999999999998.
-// max(|f - f_GSL|): 6.6613381477509392e-16
-// max(|f - f_GSL| / |f_GSL|): 3.8702201113622378e-16
+// Test data for k=0.90000000000000013, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.4914274070443813e-16
+// mean(f - f_Boost): 3.4694469519536142e-16
+// variance(f - f_Boost): 2.5224926888894056e-31
+// stddev(f - f_Boost): 5.0224423231027804e-16
const testcase_ellint_3<double>
data187[10] =
{
- { 0.0000000000000000, 0.89999999999999991, 0.59999999999999998,
+ { 0.0000000000000000, 0.90000000000000013, 0.60000000000000009,
0.0000000000000000 },
- { 0.17420100334657812, 0.89999999999999991, 0.59999999999999998,
+ { 0.17633073723493825, 0.90000000000000013, 0.60000000000000009,
0.17453292519943295 },
- { 0.34671975876122157, 0.89999999999999991, 0.59999999999999998,
+ { 0.36386108723492810, 0.90000000000000013, 0.60000000000000009,
0.34906585039886590 },
- { 0.51724631570707946, 0.89999999999999991, 0.59999999999999998,
+ { 0.57597424744716241, 0.90000000000000013, 0.60000000000000009,
0.52359877559829882 },
- { 0.68760879113743023, 0.89999999999999991, 0.59999999999999998,
+ { 0.83098051948501150, 0.90000000000000013, 0.60000000000000009,
0.69813170079773179 },
- { 0.86192157779698364, 0.89999999999999991, 0.59999999999999998,
+ { 1.1558706545698916, 0.90000000000000013, 0.60000000000000009,
0.87266462599716477 },
- { 1.0464279696166354, 0.89999999999999991, 0.59999999999999998,
+ { 1.5905576379415669, 0.90000000000000013, 0.60000000000000009,
1.0471975511965976 },
- { 1.2488156247094004, 0.89999999999999991, 0.59999999999999998,
+ { 2.1875186010215084, 0.90000000000000013, 0.60000000000000009,
1.2217304763960306 },
- { 1.4750988777188470, 0.89999999999999991, 0.59999999999999998,
+ { 2.9885767771316853, 0.90000000000000013, 0.60000000000000009,
1.3962634015954636 },
- { 1.7211781128919525, 0.89999999999999991, 0.59999999999999998,
+ { 3.9549939883570238, 0.90000000000000013, 0.60000000000000009,
1.5707963267948966 },
};
const double toler187 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991, nu=0.69999999999999996.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 4.3410843563834748e-16
+// Test data for k=0.90000000000000013, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.5442489886293633e-16
+// mean(f - f_Boost): 4.3576253716537392e-16
+// variance(f - f_Boost): 2.2187568928205130e-31
+// stddev(f - f_Boost): 4.7103682370070737e-16
const testcase_ellint_3<double>
data188[10] =
{
- { 0.0000000000000000, 0.89999999999999991, 0.69999999999999996,
+ { 0.0000000000000000, 0.90000000000000013, 0.70000000000000007,
0.0000000000000000 },
- { 0.17402765093102207, 0.89999999999999991, 0.69999999999999996,
+ { 0.17651246700160939, 0.90000000000000013, 0.70000000000000007,
0.17453292519943295 },
- { 0.34541608382635131, 0.89999999999999991, 0.69999999999999996,
+ { 0.36542993547358982, 0.90000000000000013, 0.70000000000000007,
0.34906585039886590 },
- { 0.51322715827061682, 0.89999999999999991, 0.69999999999999996,
+ { 0.58199897877674867, 0.90000000000000013, 0.70000000000000007,
0.52359877559829882 },
- { 0.67903717872440272, 0.89999999999999991, 0.69999999999999996,
+ { 0.84815633587352857, 0.90000000000000013, 0.70000000000000007,
0.69813170079773179 },
- { 0.84690113601682671, 0.89999999999999991, 0.69999999999999996,
+ { 1.1985495623872375, 0.90000000000000013, 0.70000000000000007,
0.87266462599716477 },
- { 1.0229914311548418, 0.89999999999999991, 0.69999999999999996,
+ { 1.6892158134027691, 0.90000000000000013, 0.70000000000000007,
1.0471975511965976 },
- { 1.2148329639709381, 0.89999999999999991, 0.69999999999999996,
+ { 2.4029722191094236, 0.90000000000000013, 0.70000000000000007,
1.2217304763960306 },
- { 1.4283586501307799, 0.89999999999999991, 0.69999999999999996,
+ { 3.4201084941340061, 0.90000000000000013, 0.70000000000000007,
1.3962634015954636 },
- { 1.6600480747670940, 0.89999999999999991, 0.69999999999999996,
+ { 4.6985482312992444, 0.90000000000000013, 0.70000000000000007,
1.5707963267948966 },
};
const double toler188 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991, nu=0.80000000000000004.
-// max(|f - f_GSL|): 4.4408920985006262e-16
-// max(|f - f_GSL| / |f_GSL|): 3.3100928058463168e-16
+// Test data for k=0.90000000000000013, nu=0.80000000000000004.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.9362432595976420e-16
+// mean(f - f_Boost): 3.0531133177191805e-16
+// variance(f - f_Boost): 1.1508025840536076e-32
+// stddev(f - f_Boost): 1.0727546709539920e-16
const testcase_ellint_3<double>
data189[10] =
{
- { 0.0000000000000000, 0.89999999999999991, 0.80000000000000004,
+ { 0.0000000000000000, 0.90000000000000013, 0.80000000000000004,
0.0000000000000000 },
- { 0.17385491439925146, 0.89999999999999991, 0.80000000000000004,
+ { 0.17669487107954862, 0.90000000000000013, 0.80000000000000004,
0.17453292519943295 },
- { 0.34412950523113928, 0.89999999999999991, 0.80000000000000004,
+ { 0.36702314729628421, 0.90000000000000013, 0.80000000000000004,
0.34906585039886590 },
- { 0.50931321668729590, 0.89999999999999991, 0.80000000000000004,
+ { 0.58825099711365492, 0.90000000000000013, 0.80000000000000004,
0.52359877559829882 },
- { 0.67081081392296327, 0.89999999999999991, 0.80000000000000004,
+ { 0.86661711422209031, 0.90000000000000013, 0.80000000000000004,
0.69813170079773179 },
- { 0.83268846097293259, 0.89999999999999991, 0.80000000000000004,
+ { 1.2469779109884802, 0.90000000000000013, 0.80000000000000004,
0.87266462599716477 },
- { 1.0010985015814027, 0.89999999999999991, 0.80000000000000004,
+ { 1.8105469760531578, 0.90000000000000013, 0.80000000000000004,
1.0471975511965976 },
- { 1.1834394045489678, 0.89999999999999991, 0.80000000000000004,
+ { 2.6989505165893752, 0.90000000000000013, 0.80000000000000004,
1.2217304763960306 },
- { 1.3855695891683182, 0.89999999999999991, 0.80000000000000004,
+ { 4.0935213267757433, 0.90000000000000013, 0.80000000000000004,
1.3962634015954636 },
- { 1.6044591960982202, 0.89999999999999991, 0.80000000000000004,
+ { 5.9820740813645727, 0.90000000000000013, 0.80000000000000004,
1.5707963267948966 },
};
const double toler189 = 2.5000000000000020e-13;
-// Test data for k=0.89999999999999991, nu=0.90000000000000002.
-// max(|f - f_GSL|): 8.8817841970012523e-16
-// max(|f - f_GSL| / |f_GSL|): 5.7167507456081732e-16
+// Test data for k=0.90000000000000013, nu=0.90000000000000002.
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.9577148062669782e-16
+// mean(f - f_Boost): 5.9119376061289588e-16
+// variance(f - f_Boost): 1.7340883003959522e-31
+// stddev(f - f_Boost): 4.1642385863395872e-16
const testcase_ellint_3<double>
data190[10] =
{
- { 0.0000000000000000, 0.89999999999999991, 0.90000000000000002,
+ { 0.0000000000000000, 0.90000000000000013, 0.90000000000000002,
0.0000000000000000 },
- { 0.17368278986240135, 0.89999999999999991, 0.90000000000000002,
+ { 0.17687795394604169, 0.90000000000000013, 0.90000000000000002,
0.17453292519943295 },
- { 0.34285962963961397, 0.89999999999999991, 0.90000000000000002,
+ { 0.36864140434751286, 0.90000000000000013, 0.90000000000000002,
0.34906585039886590 },
- { 0.50549974644993312, 0.89999999999999991, 0.90000000000000002,
+ { 0.59474595366817051, 0.90000000000000013, 0.90000000000000002,
0.52359877559829882 },
- { 0.66290623857720876, 0.89999999999999991, 0.90000000000000002,
+ { 0.88654237226056665, 0.90000000000000013, 0.90000000000000002,
0.69813170079773179 },
- { 0.81921183128847175, 0.89999999999999991, 0.90000000000000002,
+ { 1.3026595810616726, 0.90000000000000013, 0.90000000000000002,
0.87266462599716477 },
- { 0.98058481956066390, 0.89999999999999991, 0.90000000000000002,
+ { 1.9653635459278080, 0.90000000000000013, 0.90000000000000002,
1.0471975511965976 },
- { 1.1543223520473569, 0.89999999999999991, 0.90000000000000002,
+ { 3.1451407527189468, 0.90000000000000013, 0.90000000000000002,
1.2217304763960306 },
- { 1.3462119782292934, 0.89999999999999991, 0.90000000000000002,
+ { 5.3745230680316132, 0.90000000000000013, 0.90000000000000002,
1.3962634015954636 },
- { 1.5536420236310948, 0.89999999999999991, 0.90000000000000002,
+ { 8.9942562031858717, 0.90000000000000013, 0.90000000000000002,
1.5707963267948966 },
};
const double toler190 = 2.5000000000000020e-13;
-template<typename Tp, unsigned int Num>
+template<typename Ret, unsigned int Num>
void
- test(const testcase_ellint_3<Tp> (&data)[Num], Tp toler)
+ test(const testcase_ellint_3<Ret> (&data)[Num], Ret toler)
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
+ bool test __attribute__((unused)) = true;
+ const Ret eps = std::numeric_limits<Ret>::epsilon();
+ Ret max_abs_diff = -Ret(1);
+ Ret max_abs_frac = -Ret(1);
unsigned int num_datum = Num;
for (unsigned int i = 0; i < num_datum; ++i)
{
- const Tp f = std::ellint_3(data[i].k, data[i].nu,
+ const Ret f = std::ellint_3(data[i].k, data[i].nu,
data[i].phi);
- const Tp f0 = data[i].f0;
- const Tp diff = f - f0;
+ const Ret f0 = data[i].f0;
+ const Ret diff = f - f0;
if (std::abs(diff) > max_abs_diff)
max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
+ if (std::abs(f0) > Ret(10) * eps
+ && std::abs(f) > Ret(10) * eps)
{
- const Tp frac = diff / f0;
+ const Ret frac = diff / f0;
if (std::abs(frac) > max_abs_frac)
max_abs_frac = std::abs(frac);
}
diff --git a/libstdc++-v3/testsuite/special_functions/13_ellint_3/pr66689.cc b/libstdc++-v3/testsuite/special_functions/13_ellint_3/pr66689.cc
new file mode 100644
index 00000000000..e261003592d
--- /dev/null
+++ b/libstdc++-v3/testsuite/special_functions/13_ellint_3/pr66689.cc
@@ -0,0 +1,26 @@
+// { dg-do run { target c++11 } }
+// { dg-require-c-std "" }
+// { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
+// { dg-add-options ieee }
+
+#include <cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ const double pi = 3.141592654;
+
+ double Pi1 = std::ellint_3(0.75, 0.0, pi / 2.0);
+ VERIFY(std::abs(Pi1 - 1.91099) < 0.00001);
+
+ double Pi2 = std::ellint_3(0.75, 0.5, pi / 2.0);
+ VERIFY(std::abs(Pi2 - 2.80011) < 0.00001);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/special_functions/14_expint/pr68397.cc b/libstdc++-v3/testsuite/special_functions/14_expint/pr68397.cc
new file mode 100644
index 00000000000..8da16d1fc69
--- /dev/null
+++ b/libstdc++-v3/testsuite/special_functions/14_expint/pr68397.cc
@@ -0,0 +1,47 @@
+// { dg-do run { target c++11 } }
+// { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
+// Copyright (C) 2017 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// PR libstdc++/68397 - std::tr1::expint fails in __expint_En_cont_frac
+// for some long double arguments due to low __max_iter value
+
+#include <cmath>
+#include <testsuite_hooks.h>
+
+int
+test01()
+{
+ // Answers from Wolfram Alpha.
+ long double ans_ok = -0.10001943365331651406888645149537315243646135979573L;
+ long double ans_bomb = -0.10777727809650077516264612749163100483995270163783L;
+
+ auto Ei_ok = std::expint(-1.500001L);
+ auto diff_ok = Ei_ok - ans_ok;
+ VERIFY(std::abs(diff_ok) < 1.0e-15);
+
+ auto Ei_bomb = std::expint(-1.450001L);
+ auto diff_bomb = Ei_bomb - ans_bomb;
+ VERIFY(std::abs(diff_bomb) < 1.0e-15);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_value.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_value.cc
index 0c187d71188..ed11917401f 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_value.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_value.cc
@@ -1,6 +1,7 @@
-// 2007-02-04 Edward Smith-Rowland <3dw4rd@verizon.net>
+// { dg-do run { target c++11 } }
+// { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
//
-// Copyright (C) 2007-2017 Free Software Foundation, Inc.
+// Copyright (C) 2016-2018 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -18,826 +19,490 @@
// <http://www.gnu.org/licenses/>.
// comp_ellint_3
-
-
// Compare against values generated by the GNU Scientific Library.
// The GSL can be found on the web: http://www.gnu.org/software/gsl/
-
+#include <limits>
#include <tr1/cmath>
#if defined(__TEST_DEBUG)
-#include <iostream>
-#define VERIFY(A) \
-if (!(A)) \
- { \
- std::cout << "line " << __LINE__ \
- << " max_abs_frac = " << max_abs_frac \
- << std::endl; \
- }
+# include <iostream>
+# define VERIFY(A) \
+ if (!(A)) \
+ { \
+ std::cout << "line " << __LINE__ \
+ << " max_abs_frac = " << max_abs_frac \
+ << std::endl; \
+ }
#else
-#include <testsuite_hooks.h>
+# include <testsuite_hooks.h>
#endif
-#include "../testcase.h"
-
+#include <specfun_testcase.h>
// Test data for k=-0.90000000000000002.
-testcase_comp_ellint_3<double> data001[] = {
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 5
+// max(|f - f_Boost| / |f_Boost|): 1.2838262090802751e-16
+// mean(f - f_Boost): 4.4408920985006264e-17
+// variance(f - f_Boost): 2.4347558803117648e-34
+// stddev(f - f_Boost): 1.5603704304785339e-17
+const testcase_comp_ellint_3<double>
+data001[10] =
+{
{ 2.2805491384227703, -0.90000000000000002, 0.0000000000000000 },
- { 2.1537868513875287, -0.90000000000000002, 0.10000000000000001 },
- { 2.0443194576468890, -0.90000000000000002, 0.20000000000000001 },
- { 1.9486280260314426, -0.90000000000000002, 0.29999999999999999 },
- { 1.8641114227238349, -0.90000000000000002, 0.40000000000000002 },
- { 1.7888013241937861, -0.90000000000000002, 0.50000000000000000 },
- { 1.7211781128919523, -0.90000000000000002, 0.59999999999999998 },
- { 1.6600480747670938, -0.90000000000000002, 0.69999999999999996 },
- { 1.6044591960982204, -0.90000000000000002, 0.80000000000000004 },
- { 1.5536420236310946, -0.90000000000000002, 0.90000000000000002 },
+ { 2.4295011187834885, -0.90000000000000002, 0.10000000000000001 },
+ { 2.6076835743348412, -0.90000000000000002, 0.20000000000000001 },
+ { 2.8256506968858512, -0.90000000000000002, 0.30000000000000004 },
+ { 3.1000689868578619, -0.90000000000000002, 0.40000000000000002 },
+ { 3.4591069002104677, -0.90000000000000002, 0.50000000000000000 },
+ { 3.9549939883570229, -0.90000000000000002, 0.60000000000000009 },
+ { 4.6985482312992435, -0.90000000000000002, 0.70000000000000007 },
+ { 5.9820740813645710, -0.90000000000000002, 0.80000000000000004 },
+ { 8.9942562031858699, -0.90000000000000002, 0.90000000000000002 },
};
-
-// Test function for k=-0.90000000000000002.
-template <typename Tp>
-void test001()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data001)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data001[i].k), Tp(data001[i].nu));
- const Tp f0 = data001[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+const double toler001 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004.
-testcase_comp_ellint_3<double> data002[] = {
- { 1.9953027776647296, -0.80000000000000004, 0.0000000000000000 },
- { 1.8910755418379521, -0.80000000000000004, 0.10000000000000001 },
- { 1.8007226661734588, -0.80000000000000004, 0.20000000000000001 },
- { 1.7214611048717301, -0.80000000000000004, 0.29999999999999999 },
- { 1.6512267838651289, -0.80000000000000004, 0.40000000000000002 },
- { 1.5884528947755532, -0.80000000000000004, 0.50000000000000000 },
- { 1.5319262547427865, -0.80000000000000004, 0.59999999999999998 },
- { 1.4806912324625332, -0.80000000000000004, 0.69999999999999996 },
- { 1.4339837018309474, -0.80000000000000004, 0.80000000000000004 },
- { 1.3911845406776222, -0.80000000000000004, 0.90000000000000002 },
-};
-
-// Test function for k=-0.80000000000000004.
-template <typename Tp>
-void test002()
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.1949393471095187e-16
+// mean(f - f_Boost): 9.5479180117763459e-16
+// variance(f - f_Boost): 5.4782007307014711e-34
+// stddev(f - f_Boost): 2.3405556457178006e-17
+const testcase_comp_ellint_3<double>
+data002[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data002)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data002[i].k), Tp(data002[i].nu));
- const Tp f0 = data002[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.69999999999999996.
-testcase_comp_ellint_3<double> data003[] = {
- { 1.8456939983747236, -0.69999999999999996, 0.0000000000000000 },
- { 1.7528050171757608, -0.69999999999999996, 0.10000000000000001 },
- { 1.6721098780092147, -0.69999999999999996, 0.20000000000000001 },
- { 1.6011813647733213, -0.69999999999999996, 0.29999999999999999 },
- { 1.5382162002954762, -0.69999999999999996, 0.40000000000000002 },
- { 1.4818433192178544, -0.69999999999999996, 0.50000000000000000 },
- { 1.4309994736080540, -0.69999999999999996, 0.59999999999999998 },
- { 1.3848459188329196, -0.69999999999999996, 0.69999999999999996 },
- { 1.3427110650397533, -0.69999999999999996, 0.80000000000000004 },
- { 1.3040500499695911, -0.69999999999999996, 0.90000000000000002 },
+ { 1.9953027776647294, -0.80000000000000004, 0.0000000000000000 },
+ { 2.1172616484005085, -0.80000000000000004, 0.10000000000000001 },
+ { 2.2624789434186798, -0.80000000000000004, 0.20000000000000001 },
+ { 2.4392042002725698, -0.80000000000000004, 0.30000000000000004 },
+ { 2.6604037035529728, -0.80000000000000004, 0.40000000000000002 },
+ { 2.9478781158239751, -0.80000000000000004, 0.50000000000000000 },
+ { 3.3418121892288055, -0.80000000000000004, 0.60000000000000009 },
+ { 3.9268876980046397, -0.80000000000000004, 0.70000000000000007 },
+ { 4.9246422058196071, -0.80000000000000004, 0.80000000000000004 },
+ { 7.2263259298637132, -0.80000000000000004, 0.90000000000000002 },
};
+const double toler002 = 2.5000000000000020e-13;
-// Test function for k=-0.69999999999999996.
-template <typename Tp>
-void test003()
+// Test data for k=-0.69999999999999996.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 3
+// max(|f - f_Boost| / |f_Boost|): 1.9832236886714888e-16
+// mean(f - f_Boost): -1.5543122344752191e-16
+// variance(f - f_Boost): 2.9825759533819119e-33
+// stddev(f - f_Boost): 5.4612965066748680e-17
+const testcase_comp_ellint_3<double>
+data003[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data003)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data003[i].k), Tp(data003[i].nu));
- const Tp f0 = data003[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+ { 1.8456939983747234, -0.69999999999999996, 0.0000000000000000 },
+ { 1.9541347343119564, -0.69999999999999996, 0.10000000000000001 },
+ { 2.0829290325820202, -0.69999999999999996, 0.20000000000000001 },
+ { 2.2392290510988535, -0.69999999999999996, 0.30000000000000004 },
+ { 2.4342502915307880, -0.69999999999999996, 0.40000000000000002 },
+ { 2.6868019968236996, -0.69999999999999996, 0.50000000000000000 },
+ { 3.0314573496746742, -0.69999999999999996, 0.60000000000000009 },
+ { 3.5408408771788564, -0.69999999999999996, 0.70000000000000007 },
+ { 4.4042405729076961, -0.69999999999999996, 0.80000000000000004 },
+ { 6.3796094177887754, -0.69999999999999996, 0.90000000000000002 },
+};
+const double toler003 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998.
-testcase_comp_ellint_3<double> data004[] = {
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 2
+// max(|f - f_Boost| / |f_Boost|): 2.2547200163366559e-16
+// mean(f - f_Boost): -1.9984014443252818e-16
+// variance(f - f_Boost): 4.9303806576313241e-33
+// stddev(f - f_Boost): 7.0216669371534022e-17
+const testcase_comp_ellint_3<double>
+data004[10] =
+{
{ 1.7507538029157526, -0.59999999999999998, 0.0000000000000000 },
- { 1.6648615773343014, -0.59999999999999998, 0.10000000000000001 },
- { 1.5901418016279374, -0.59999999999999998, 0.20000000000000001 },
- { 1.5243814243493585, -0.59999999999999998, 0.29999999999999999 },
- { 1.4659345278069984, -0.59999999999999998, 0.40000000000000002 },
- { 1.4135484285693078, -0.59999999999999998, 0.50000000000000000 },
- { 1.3662507535812816, -0.59999999999999998, 0.59999999999999998 },
- { 1.3232737468822811, -0.59999999999999998, 0.69999999999999996 },
- { 1.2840021261752192, -0.59999999999999998, 0.80000000000000004 },
- { 1.2479362973851875, -0.59999999999999998, 0.90000000000000002 },
+ { 1.8508766487100685, -0.59999999999999998, 0.10000000000000001 },
+ { 1.9695980282802217, -0.59999999999999998, 0.20000000000000001 },
+ { 2.1134154405060599, -0.59999999999999998, 0.30000000000000004 },
+ { 2.2925036420985130, -0.59999999999999998, 0.40000000000000002 },
+ { 2.5239007084492711, -0.59999999999999998, 0.50000000000000000 },
+ { 2.8388723099514972, -0.59999999999999998, 0.60000000000000009 },
+ { 3.3029735898397159, -0.59999999999999998, 0.70000000000000007 },
+ { 4.0867036409261832, -0.59999999999999998, 0.80000000000000004 },
+ { 5.8709993116265604, -0.59999999999999998, 0.90000000000000002 },
};
-
-// Test function for k=-0.59999999999999998.
-template <typename Tp>
-void test004()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data004)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data004[i].k), Tp(data004[i].nu));
- const Tp f0 = data004[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+const double toler004 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000.
-testcase_comp_ellint_3<double> data005[] = {
- { 1.6857503548125963, -0.50000000000000000, 0.0000000000000000 },
- { 1.6045524936084892, -0.50000000000000000, 0.10000000000000001 },
- { 1.5338490483665983, -0.50000000000000000, 0.20000000000000001 },
- { 1.4715681939859637, -0.50000000000000000, 0.29999999999999999 },
- { 1.4161679518465340, -0.50000000000000000, 0.40000000000000002 },
- { 1.3664739530045971, -0.50000000000000000, 0.50000000000000000 },
- { 1.3215740290190876, -0.50000000000000000, 0.59999999999999998 },
- { 1.2807475181182502, -0.50000000000000000, 0.69999999999999996 },
- { 1.2434165408189539, -0.50000000000000000, 0.80000000000000004 },
- { 1.2091116095504744, -0.50000000000000000, 0.90000000000000002 },
-};
-
-// Test function for k=-0.50000000000000000.
-template <typename Tp>
-void test005()
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 3
+// max(|f - f_Boost| / |f_Boost|): 2.1900131385114407e-16
+// mean(f - f_Boost): 2.4424906541753446e-16
+// variance(f - f_Boost): 7.3651365379430888e-33
+// stddev(f - f_Boost): 8.5820373676319358e-17
+const testcase_comp_ellint_3<double>
+data005[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data005)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data005[i].k), Tp(data005[i].nu));
- const Tp f0 = data005[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002.
-testcase_comp_ellint_3<double> data006[] = {
- { 1.6399998658645112, -0.40000000000000002, 0.0000000000000000 },
- { 1.5620566886683604, -0.40000000000000002, 0.10000000000000001 },
- { 1.4941414344266770, -0.40000000000000002, 0.20000000000000001 },
- { 1.4342789859950078, -0.40000000000000002, 0.29999999999999999 },
- { 1.3809986210732901, -0.40000000000000002, 0.40000000000000002 },
- { 1.3331797176377398, -0.40000000000000002, 0.50000000000000000 },
- { 1.2899514672527024, -0.40000000000000002, 0.59999999999999998 },
- { 1.2506255923253344, -0.40000000000000002, 0.69999999999999996 },
- { 1.2146499565727209, -0.40000000000000002, 0.80000000000000004 },
- { 1.1815758115929846, -0.40000000000000002, 0.90000000000000002 },
+ { 1.6857503548125961, -0.50000000000000000, 0.0000000000000000 },
+ { 1.7803034946545482, -0.50000000000000000, 0.10000000000000001 },
+ { 1.8922947612264021, -0.50000000000000000, 0.20000000000000001 },
+ { 2.0277924458111314, -0.50000000000000000, 0.30000000000000004 },
+ { 2.1962905366178065, -0.50000000000000000, 0.40000000000000002 },
+ { 2.4136715042011945, -0.50000000000000000, 0.50000000000000000 },
+ { 2.7090491861753558, -0.50000000000000000, 0.60000000000000009 },
+ { 3.1433945297859229, -0.50000000000000000, 0.70000000000000007 },
+ { 3.8750701888108070, -0.50000000000000000, 0.80000000000000004 },
+ { 5.5355132096026463, -0.50000000000000000, 0.90000000000000002 },
};
-
-// Test function for k=-0.40000000000000002.
-template <typename Tp>
-void test006()
+const double toler005 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1718164615986397e-16
+// mean(f - f_Boost): 6.2172489379008762e-16
+// variance(f - f_Boost): 1.6458949750907531e-31
+// stddev(f - f_Boost): 4.0569631192441877e-16
+const testcase_comp_ellint_3<double>
+data006[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data006)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data006[i].k), Tp(data006[i].nu));
- const Tp f0 = data006[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004.
-testcase_comp_ellint_3<double> data007[] = {
- { 1.6080486199305126, -0.30000000000000004, 0.0000000000000000 },
- { 1.5323534693557526, -0.30000000000000004, 0.10000000000000001 },
- { 1.4663658145259875, -0.30000000000000004, 0.20000000000000001 },
- { 1.4081767433479089, -0.30000000000000004, 0.29999999999999999 },
- { 1.3563643538969761, -0.30000000000000004, 0.40000000000000002 },
- { 1.3098448759814960, -0.30000000000000004, 0.50000000000000000 },
- { 1.2677758800420666, -0.30000000000000004, 0.59999999999999998 },
- { 1.2294913236274980, -0.30000000000000004, 0.69999999999999996 },
- { 1.1944567571590046, -0.30000000000000004, 0.80000000000000004 },
- { 1.1622376896064912, -0.30000000000000004, 0.90000000000000002 },
+ { 1.6399998658645112, -0.39999999999999991, 0.0000000000000000 },
+ { 1.7306968836847190, -0.39999999999999991, 0.10000000000000001 },
+ { 1.8380358826317627, -0.39999999999999991, 0.20000000000000001 },
+ { 1.9677924132520139, -0.39999999999999991, 0.30000000000000004 },
+ { 2.1289968719280026, -0.39999999999999991, 0.40000000000000002 },
+ { 2.3367461373176512, -0.39999999999999991, 0.50000000000000000 },
+ { 2.6186940209850191, -0.39999999999999991, 0.60000000000000009 },
+ { 3.0327078743873246, -0.39999999999999991, 0.70000000000000007 },
+ { 3.7289548002199902, -0.39999999999999991, 0.80000000000000004 },
+ { 5.3055535102872513, -0.39999999999999991, 0.90000000000000002 },
};
-
-// Test function for k=-0.30000000000000004.
-template <typename Tp>
-void test007()
+const double toler006 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.9274792319434433e-16
+// mean(f - f_Boost): 6.2172489379008762e-16
+// variance(f - f_Boost): 8.7651211691223537e-33
+// stddev(f - f_Boost): 9.3622225828712025e-17
+const testcase_comp_ellint_3<double>
+data007[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data007)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data007[i].k), Tp(data007[i].nu));
- const Tp f0 = data007[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.19999999999999996.
-testcase_comp_ellint_3<double> data008[] = {
- { 1.5868678474541664, -0.19999999999999996, 0.0000000000000000 },
- { 1.5126513474261092, -0.19999999999999996, 0.10000000000000001 },
- { 1.4479323932249568, -0.19999999999999996, 0.20000000000000001 },
- { 1.3908453514752481, -0.19999999999999996, 0.29999999999999999 },
- { 1.3400002519661010, -0.19999999999999996, 0.40000000000000002 },
- { 1.2943374404397376, -0.19999999999999996, 0.50000000000000000 },
- { 1.2530330675914561, -0.19999999999999996, 0.59999999999999998 },
- { 1.2154356555075867, -0.19999999999999996, 0.69999999999999996 },
- { 1.1810223448909913, -0.19999999999999996, 0.80000000000000004 },
- { 1.1493679916141863, -0.19999999999999996, 0.90000000000000002 },
+ { 1.6080486199305128, -0.29999999999999993, 0.0000000000000000 },
+ { 1.6960848815118226, -0.29999999999999993, 0.10000000000000001 },
+ { 1.8002173372290500, -0.29999999999999993, 0.20000000000000001 },
+ { 1.9260216862473254, -0.29999999999999993, 0.30000000000000004 },
+ { 2.0822121773175533, -0.29999999999999993, 0.40000000000000002 },
+ { 2.2833505881933971, -0.29999999999999993, 0.50000000000000000 },
+ { 2.5560975528589065, -0.29999999999999993, 0.60000000000000009 },
+ { 2.9562123549913877, -0.29999999999999993, 0.70000000000000007 },
+ { 3.6283050484567170, -0.29999999999999993, 0.80000000000000004 },
+ { 5.1479514944016795, -0.29999999999999993, 0.90000000000000002 },
};
+const double toler007 = 2.5000000000000020e-13;
-// Test function for k=-0.19999999999999996.
-template <typename Tp>
-void test008()
+// Test data for k=-0.19999999999999996.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.9753938705764407e-16
+// mean(f - f_Boost): 3.1086244689504381e-16
+// variance(f - f_Boost): 4.1147374377268827e-32
+// stddev(f - f_Boost): 2.0284815596220939e-16
+const testcase_comp_ellint_3<double>
+data008[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data008)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data008[i].k), Tp(data008[i].nu));
- const Tp f0 = data008[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.099999999999999978.
-testcase_comp_ellint_3<double> data009[] = {
- { 1.5747455615173562, -0.099999999999999978, 0.0000000000000000 },
- { 1.5013711111199950, -0.099999999999999978, 0.10000000000000001 },
- { 1.4373749386463430, -0.099999999999999978, 0.20000000000000001 },
- { 1.3809159606704959, -0.099999999999999978, 0.29999999999999999 },
- { 1.3306223265207477, -0.099999999999999978, 0.40000000000000002 },
- { 1.2854480708580160, -0.099999999999999978, 0.50000000000000000 },
- { 1.2445798942989255, -0.099999999999999978, 0.59999999999999998 },
- { 1.2073745911083187, -0.099999999999999978, 0.69999999999999996 },
- { 1.1733158866987732, -0.099999999999999978, 0.80000000000000004 },
- { 1.1419839485283374, -0.099999999999999978, 0.90000000000000002 },
+ { 1.5868678474541662, -0.19999999999999996, 0.0000000000000000 },
+ { 1.6731552050562593, -0.19999999999999996, 0.10000000000000001 },
+ { 1.7751816279738935, -0.19999999999999996, 0.20000000000000001 },
+ { 1.8983924169967101, -0.19999999999999996, 0.30000000000000004 },
+ { 2.0512956926676806, -0.19999999999999996, 0.40000000000000002 },
+ { 2.2481046259421302, -0.19999999999999996, 0.50000000000000000 },
+ { 2.5148333891629315, -0.19999999999999996, 0.60000000000000009 },
+ { 2.9058704854500967, -0.19999999999999996, 0.70000000000000007 },
+ { 3.5622166386422633, -0.19999999999999996, 0.80000000000000004 },
+ { 5.0448269356200370, -0.19999999999999996, 0.90000000000000002 },
};
+const double toler008 = 2.5000000000000020e-13;
-// Test function for k=-0.099999999999999978.
-template <typename Tp>
-void test009()
+// Test data for k=-0.099999999999999978.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 5
+// max(|f - f_Boost| / |f_Boost|): 1.9932308021417639e-16
+// mean(f - f_Boost): 0.0000000000000000
+// variance(f - f_Boost): 6.8368087769470551e-64
+// stddev(f - f_Boost): 2.6147291976315738e-32
+const testcase_comp_ellint_3<double>
+data009[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data009)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data009[i].k), Tp(data009[i].nu));
- const Tp f0 = data009[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+ { 1.5747455615173560, -0.099999999999999978, 0.0000000000000000 },
+ { 1.6600374067558428, -0.099999999999999978, 0.10000000000000001 },
+ { 1.7608656115083421, -0.099999999999999978, 0.20000000000000001 },
+ { 1.8826015946315438, -0.099999999999999978, 0.30000000000000004 },
+ { 2.0336367403076760, -0.099999999999999978, 0.40000000000000002 },
+ { 2.2279868912966849, -0.099999999999999978, 0.50000000000000000 },
+ { 2.4913004919173827, -0.099999999999999978, 0.60000000000000009 },
+ { 2.8771910188009744, -0.099999999999999978, 0.70000000000000007 },
+ { 3.5246199613295617, -0.099999999999999978, 0.80000000000000004 },
+ { 4.9862890417305508, -0.099999999999999978, 0.90000000000000002 },
+};
+const double toler009 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000.
-testcase_comp_ellint_3<double> data010[] = {
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 2.1899085000907084e-16
+// mean(f - f_Boost): -2.2204460492503131e-16
+// variance(f - f_Boost): 5.4782007307014711e-32
+// stddev(f - f_Boost): 2.3405556457178008e-16
+const testcase_comp_ellint_3<double>
+data010[10] =
+{
{ 1.5707963267948966, 0.0000000000000000, 0.0000000000000000 },
- { 1.4976955329233277, 0.0000000000000000, 0.10000000000000001 },
- { 1.4339343023863691, 0.0000000000000000, 0.20000000000000001 },
- { 1.3776795151134889, 0.0000000000000000, 0.29999999999999999 },
- { 1.3275651989026322, 0.0000000000000000, 0.40000000000000002 },
- { 1.2825498301618641, 0.0000000000000000, 0.50000000000000000 },
- { 1.2418235332245127, 0.0000000000000000, 0.59999999999999998 },
- { 1.2047457872617382, 0.0000000000000000, 0.69999999999999996 },
- { 1.1708024551734544, 0.0000000000000000, 0.80000000000000004 },
- { 1.1395754288497419, 0.0000000000000000, 0.90000000000000002 },
+ { 1.6557647109660170, 0.0000000000000000, 0.10000000000000001 },
+ { 1.7562036827601817, 0.0000000000000000, 0.20000000000000001 },
+ { 1.8774607092226381, 0.0000000000000000, 0.30000000000000004 },
+ { 2.0278893379868062, 0.0000000000000000, 0.40000000000000002 },
+ { 2.2214414690791831, 0.0000000000000000, 0.50000000000000000 },
+ { 2.4836470664490258, 0.0000000000000000, 0.60000000000000009 },
+ { 2.8678686047727386, 0.0000000000000000, 0.70000000000000007 },
+ { 3.5124073655203634, 0.0000000000000000, 0.80000000000000004 },
+ { 4.9672941328980516, 0.0000000000000000, 0.90000000000000002 },
};
-
-// Test function for k=0.0000000000000000.
-template <typename Tp>
-void test010()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data010)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data010[i].k), Tp(data010[i].nu));
- const Tp f0 = data010[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+const double toler010 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009.
-testcase_comp_ellint_3<double> data011[] = {
- { 1.5747455615173562, 0.10000000000000009, 0.0000000000000000 },
- { 1.5013711111199950, 0.10000000000000009, 0.10000000000000001 },
- { 1.4373749386463430, 0.10000000000000009, 0.20000000000000001 },
- { 1.3809159606704959, 0.10000000000000009, 0.29999999999999999 },
- { 1.3306223265207477, 0.10000000000000009, 0.40000000000000002 },
- { 1.2854480708580160, 0.10000000000000009, 0.50000000000000000 },
- { 1.2445798942989255, 0.10000000000000009, 0.59999999999999998 },
- { 1.2073745911083187, 0.10000000000000009, 0.69999999999999996 },
- { 1.1733158866987732, 0.10000000000000009, 0.80000000000000004 },
- { 1.1419839485283374, 0.10000000000000009, 0.90000000000000002 },
-};
-
-// Test function for k=0.10000000000000009.
-template <typename Tp>
-void test011()
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 5
+// max(|f - f_Boost| / |f_Boost|): 1.9932308021417639e-16
+// mean(f - f_Boost): -2.2204460492503132e-17
+// variance(f - f_Boost): 6.0868897007794120e-35
+// stddev(f - f_Boost): 7.8018521523926693e-18
+const testcase_comp_ellint_3<double>
+data011[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data011)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data011[i].k), Tp(data011[i].nu));
- const Tp f0 = data011[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996.
-testcase_comp_ellint_3<double> data012[] = {
- { 1.5868678474541664, 0.19999999999999996, 0.0000000000000000 },
- { 1.5126513474261092, 0.19999999999999996, 0.10000000000000001 },
- { 1.4479323932249568, 0.19999999999999996, 0.20000000000000001 },
- { 1.3908453514752481, 0.19999999999999996, 0.29999999999999999 },
- { 1.3400002519661010, 0.19999999999999996, 0.40000000000000002 },
- { 1.2943374404397376, 0.19999999999999996, 0.50000000000000000 },
- { 1.2530330675914561, 0.19999999999999996, 0.59999999999999998 },
- { 1.2154356555075867, 0.19999999999999996, 0.69999999999999996 },
- { 1.1810223448909913, 0.19999999999999996, 0.80000000000000004 },
- { 1.1493679916141863, 0.19999999999999996, 0.90000000000000002 },
+ { 1.5747455615173560, 0.10000000000000009, 0.0000000000000000 },
+ { 1.6600374067558428, 0.10000000000000009, 0.10000000000000001 },
+ { 1.7608656115083421, 0.10000000000000009, 0.20000000000000001 },
+ { 1.8826015946315440, 0.10000000000000009, 0.30000000000000004 },
+ { 2.0336367403076760, 0.10000000000000009, 0.40000000000000002 },
+ { 2.2279868912966849, 0.10000000000000009, 0.50000000000000000 },
+ { 2.4913004919173827, 0.10000000000000009, 0.60000000000000009 },
+ { 2.8771910188009744, 0.10000000000000009, 0.70000000000000007 },
+ { 3.5246199613295617, 0.10000000000000009, 0.80000000000000004 },
+ { 4.9862890417305508, 0.10000000000000009, 0.90000000000000002 },
};
-
-// Test function for k=0.19999999999999996.
-template <typename Tp>
-void test012()
+const double toler011 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.9753938705764407e-16
+// mean(f - f_Boost): 3.1086244689504381e-16
+// variance(f - f_Boost): 4.1147374377268827e-32
+// stddev(f - f_Boost): 2.0284815596220939e-16
+const testcase_comp_ellint_3<double>
+data012[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data012)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data012[i].k), Tp(data012[i].nu));
- const Tp f0 = data012[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.30000000000000004.
-testcase_comp_ellint_3<double> data013[] = {
- { 1.6080486199305126, 0.30000000000000004, 0.0000000000000000 },
- { 1.5323534693557526, 0.30000000000000004, 0.10000000000000001 },
- { 1.4663658145259875, 0.30000000000000004, 0.20000000000000001 },
- { 1.4081767433479089, 0.30000000000000004, 0.29999999999999999 },
- { 1.3563643538969761, 0.30000000000000004, 0.40000000000000002 },
- { 1.3098448759814960, 0.30000000000000004, 0.50000000000000000 },
- { 1.2677758800420666, 0.30000000000000004, 0.59999999999999998 },
- { 1.2294913236274980, 0.30000000000000004, 0.69999999999999996 },
- { 1.1944567571590046, 0.30000000000000004, 0.80000000000000004 },
- { 1.1622376896064912, 0.30000000000000004, 0.90000000000000002 },
+ { 1.5868678474541662, 0.20000000000000018, 0.0000000000000000 },
+ { 1.6731552050562593, 0.20000000000000018, 0.10000000000000001 },
+ { 1.7751816279738935, 0.20000000000000018, 0.20000000000000001 },
+ { 1.8983924169967101, 0.20000000000000018, 0.30000000000000004 },
+ { 2.0512956926676806, 0.20000000000000018, 0.40000000000000002 },
+ { 2.2481046259421302, 0.20000000000000018, 0.50000000000000000 },
+ { 2.5148333891629315, 0.20000000000000018, 0.60000000000000009 },
+ { 2.9058704854500967, 0.20000000000000018, 0.70000000000000007 },
+ { 3.5622166386422633, 0.20000000000000018, 0.80000000000000004 },
+ { 5.0448269356200370, 0.20000000000000018, 0.90000000000000002 },
};
+const double toler012 = 2.5000000000000020e-13;
-// Test function for k=0.30000000000000004.
-template <typename Tp>
-void test013()
+// Test data for k=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.4585997630846713e-16
+// mean(f - f_Boost): 5.1070259132757197e-16
+// variance(f - f_Boost): 1.7591111235252501e-32
+// stddev(f - f_Boost): 1.3263148659067538e-16
+const testcase_comp_ellint_3<double>
+data013[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data013)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data013[i].k), Tp(data013[i].nu));
- const Tp f0 = data013[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991.
-testcase_comp_ellint_3<double> data014[] = {
- { 1.6399998658645112, 0.39999999999999991, 0.0000000000000000 },
- { 1.5620566886683604, 0.39999999999999991, 0.10000000000000001 },
- { 1.4941414344266770, 0.39999999999999991, 0.20000000000000001 },
- { 1.4342789859950078, 0.39999999999999991, 0.29999999999999999 },
- { 1.3809986210732901, 0.39999999999999991, 0.40000000000000002 },
- { 1.3331797176377398, 0.39999999999999991, 0.50000000000000000 },
- { 1.2899514672527024, 0.39999999999999991, 0.59999999999999998 },
- { 1.2506255923253344, 0.39999999999999991, 0.69999999999999996 },
- { 1.2146499565727209, 0.39999999999999991, 0.80000000000000004 },
- { 1.1815758115929846, 0.39999999999999991, 0.90000000000000002 },
+ { 1.6080486199305128, 0.30000000000000004, 0.0000000000000000 },
+ { 1.6960848815118228, 0.30000000000000004, 0.10000000000000001 },
+ { 1.8002173372290500, 0.30000000000000004, 0.20000000000000001 },
+ { 1.9260216862473254, 0.30000000000000004, 0.30000000000000004 },
+ { 2.0822121773175533, 0.30000000000000004, 0.40000000000000002 },
+ { 2.2833505881933975, 0.30000000000000004, 0.50000000000000000 },
+ { 2.5560975528589065, 0.30000000000000004, 0.60000000000000009 },
+ { 2.9562123549913877, 0.30000000000000004, 0.70000000000000007 },
+ { 3.6283050484567174, 0.30000000000000004, 0.80000000000000004 },
+ { 5.1479514944016795, 0.30000000000000004, 0.90000000000000002 },
};
-
-// Test function for k=0.39999999999999991.
-template <typename Tp>
-void test014()
+const double toler013 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013.
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.7696531428672557e-16
+// mean(f - f_Boost): 1.1990408665951691e-15
+// variance(f - f_Boost): 2.6514491536595121e-31
+// stddev(f - f_Boost): 5.1492224205791612e-16
+const testcase_comp_ellint_3<double>
+data014[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data014)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data014[i].k), Tp(data014[i].nu));
- const Tp f0 = data014[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.50000000000000000.
-testcase_comp_ellint_3<double> data015[] = {
- { 1.6857503548125963, 0.50000000000000000, 0.0000000000000000 },
- { 1.6045524936084892, 0.50000000000000000, 0.10000000000000001 },
- { 1.5338490483665983, 0.50000000000000000, 0.20000000000000001 },
- { 1.4715681939859637, 0.50000000000000000, 0.29999999999999999 },
- { 1.4161679518465340, 0.50000000000000000, 0.40000000000000002 },
- { 1.3664739530045971, 0.50000000000000000, 0.50000000000000000 },
- { 1.3215740290190876, 0.50000000000000000, 0.59999999999999998 },
- { 1.2807475181182502, 0.50000000000000000, 0.69999999999999996 },
- { 1.2434165408189539, 0.50000000000000000, 0.80000000000000004 },
- { 1.2091116095504744, 0.50000000000000000, 0.90000000000000002 },
+ { 1.6399998658645112, 0.40000000000000013, 0.0000000000000000 },
+ { 1.7306968836847190, 0.40000000000000013, 0.10000000000000001 },
+ { 1.8380358826317629, 0.40000000000000013, 0.20000000000000001 },
+ { 1.9677924132520141, 0.40000000000000013, 0.30000000000000004 },
+ { 2.1289968719280030, 0.40000000000000013, 0.40000000000000002 },
+ { 2.3367461373176512, 0.40000000000000013, 0.50000000000000000 },
+ { 2.6186940209850196, 0.40000000000000013, 0.60000000000000009 },
+ { 3.0327078743873246, 0.40000000000000013, 0.70000000000000007 },
+ { 3.7289548002199906, 0.40000000000000013, 0.80000000000000004 },
+ { 5.3055535102872522, 0.40000000000000013, 0.90000000000000002 },
};
+const double toler014 = 2.5000000000000020e-13;
-// Test function for k=0.50000000000000000.
-template <typename Tp>
-void test015()
+// Test data for k=0.50000000000000000.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 3
+// max(|f - f_Boost| / |f_Boost|): 2.1900131385114407e-16
+// mean(f - f_Boost): 2.4424906541753446e-16
+// variance(f - f_Boost): 7.3651365379430888e-33
+// stddev(f - f_Boost): 8.5820373676319358e-17
+const testcase_comp_ellint_3<double>
+data015[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data015)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data015[i].k), Tp(data015[i].nu));
- const Tp f0 = data015[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+ { 1.6857503548125961, 0.50000000000000000, 0.0000000000000000 },
+ { 1.7803034946545482, 0.50000000000000000, 0.10000000000000001 },
+ { 1.8922947612264021, 0.50000000000000000, 0.20000000000000001 },
+ { 2.0277924458111314, 0.50000000000000000, 0.30000000000000004 },
+ { 2.1962905366178065, 0.50000000000000000, 0.40000000000000002 },
+ { 2.4136715042011945, 0.50000000000000000, 0.50000000000000000 },
+ { 2.7090491861753558, 0.50000000000000000, 0.60000000000000009 },
+ { 3.1433945297859229, 0.50000000000000000, 0.70000000000000007 },
+ { 3.8750701888108070, 0.50000000000000000, 0.80000000000000004 },
+ { 5.5355132096026463, 0.50000000000000000, 0.90000000000000002 },
+};
+const double toler015 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009.
-testcase_comp_ellint_3<double> data016[] = {
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 2
+// max(|f - f_Boost| / |f_Boost|): 2.2547200163366559e-16
+// mean(f - f_Boost): -2.2204460492503131e-16
+// variance(f - f_Boost): 6.0868897007794117e-33
+// stddev(f - f_Boost): 7.8018521523926690e-17
+const testcase_comp_ellint_3<double>
+data016[10] =
+{
{ 1.7507538029157526, 0.60000000000000009, 0.0000000000000000 },
- { 1.6648615773343014, 0.60000000000000009, 0.10000000000000001 },
- { 1.5901418016279374, 0.60000000000000009, 0.20000000000000001 },
- { 1.5243814243493585, 0.60000000000000009, 0.29999999999999999 },
- { 1.4659345278069984, 0.60000000000000009, 0.40000000000000002 },
- { 1.4135484285693078, 0.60000000000000009, 0.50000000000000000 },
- { 1.3662507535812816, 0.60000000000000009, 0.59999999999999998 },
- { 1.3232737468822811, 0.60000000000000009, 0.69999999999999996 },
- { 1.2840021261752192, 0.60000000000000009, 0.80000000000000004 },
- { 1.2479362973851875, 0.60000000000000009, 0.90000000000000002 },
+ { 1.8508766487100687, 0.60000000000000009, 0.10000000000000001 },
+ { 1.9695980282802217, 0.60000000000000009, 0.20000000000000001 },
+ { 2.1134154405060599, 0.60000000000000009, 0.30000000000000004 },
+ { 2.2925036420985130, 0.60000000000000009, 0.40000000000000002 },
+ { 2.5239007084492711, 0.60000000000000009, 0.50000000000000000 },
+ { 2.8388723099514976, 0.60000000000000009, 0.60000000000000009 },
+ { 3.3029735898397159, 0.60000000000000009, 0.70000000000000007 },
+ { 4.0867036409261832, 0.60000000000000009, 0.80000000000000004 },
+ { 5.8709993116265613, 0.60000000000000009, 0.90000000000000002 },
};
-
-// Test function for k=0.60000000000000009.
-template <typename Tp>
-void test016()
+const double toler016 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 2.9298727220933567e-16
+// mean(f - f_Boost): 4.8849813083506892e-16
+// variance(f - f_Boost): 2.0476296953421943e-31
+// stddev(f - f_Boost): 4.5250742483877478e-16
+const testcase_comp_ellint_3<double>
+data017[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data016)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data016[i].k), Tp(data016[i].nu));
- const Tp f0 = data016[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996.
-testcase_comp_ellint_3<double> data017[] = {
- { 1.8456939983747236, 0.69999999999999996, 0.0000000000000000 },
- { 1.7528050171757608, 0.69999999999999996, 0.10000000000000001 },
- { 1.6721098780092147, 0.69999999999999996, 0.20000000000000001 },
- { 1.6011813647733213, 0.69999999999999996, 0.29999999999999999 },
- { 1.5382162002954762, 0.69999999999999996, 0.40000000000000002 },
- { 1.4818433192178544, 0.69999999999999996, 0.50000000000000000 },
- { 1.4309994736080540, 0.69999999999999996, 0.59999999999999998 },
- { 1.3848459188329196, 0.69999999999999996, 0.69999999999999996 },
- { 1.3427110650397533, 0.69999999999999996, 0.80000000000000004 },
- { 1.3040500499695911, 0.69999999999999996, 0.90000000000000002 },
+ { 1.8456939983747238, 0.70000000000000018, 0.0000000000000000 },
+ { 1.9541347343119566, 0.70000000000000018, 0.10000000000000001 },
+ { 2.0829290325820207, 0.70000000000000018, 0.20000000000000001 },
+ { 2.2392290510988540, 0.70000000000000018, 0.30000000000000004 },
+ { 2.4342502915307880, 0.70000000000000018, 0.40000000000000002 },
+ { 2.6868019968237000, 0.70000000000000018, 0.50000000000000000 },
+ { 3.0314573496746746, 0.70000000000000018, 0.60000000000000009 },
+ { 3.5408408771788569, 0.70000000000000018, 0.70000000000000007 },
+ { 4.4042405729076970, 0.70000000000000018, 0.80000000000000004 },
+ { 6.3796094177887763, 0.70000000000000018, 0.90000000000000002 },
};
-
-// Test function for k=0.69999999999999996.
-template <typename Tp>
-void test017()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data017)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data017[i].k), Tp(data017[i].nu));
- const Tp f0 = data017[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+const double toler017 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004.
-testcase_comp_ellint_3<double> data018[] = {
- { 1.9953027776647296, 0.80000000000000004, 0.0000000000000000 },
- { 1.8910755418379521, 0.80000000000000004, 0.10000000000000001 },
- { 1.8007226661734588, 0.80000000000000004, 0.20000000000000001 },
- { 1.7214611048717301, 0.80000000000000004, 0.29999999999999999 },
- { 1.6512267838651289, 0.80000000000000004, 0.40000000000000002 },
- { 1.5884528947755532, 0.80000000000000004, 0.50000000000000000 },
- { 1.5319262547427865, 0.80000000000000004, 0.59999999999999998 },
- { 1.4806912324625332, 0.80000000000000004, 0.69999999999999996 },
- { 1.4339837018309474, 0.80000000000000004, 0.80000000000000004 },
- { 1.3911845406776222, 0.80000000000000004, 0.90000000000000002 },
-};
-
-// Test function for k=0.80000000000000004.
-template <typename Tp>
-void test018()
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.1949393471095187e-16
+// mean(f - f_Boost): 9.5479180117763459e-16
+// variance(f - f_Boost): 5.4782007307014711e-34
+// stddev(f - f_Boost): 2.3405556457178006e-17
+const testcase_comp_ellint_3<double>
+data018[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data018)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data018[i].k), Tp(data018[i].nu));
- const Tp f0 = data018[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991.
-testcase_comp_ellint_3<double> data019[] = {
- { 2.2805491384227699, 0.89999999999999991, 0.0000000000000000 },
- { 2.1537868513875282, 0.89999999999999991, 0.10000000000000001 },
- { 2.0443194576468890, 0.89999999999999991, 0.20000000000000001 },
- { 1.9486280260314424, 0.89999999999999991, 0.29999999999999999 },
- { 1.8641114227238347, 0.89999999999999991, 0.40000000000000002 },
- { 1.7888013241937859, 0.89999999999999991, 0.50000000000000000 },
- { 1.7211781128919521, 0.89999999999999991, 0.59999999999999998 },
- { 1.6600480747670936, 0.89999999999999991, 0.69999999999999996 },
- { 1.6044591960982200, 0.89999999999999991, 0.80000000000000004 },
- { 1.5536420236310944, 0.89999999999999991, 0.90000000000000002 },
+ { 1.9953027776647294, 0.80000000000000004, 0.0000000000000000 },
+ { 2.1172616484005085, 0.80000000000000004, 0.10000000000000001 },
+ { 2.2624789434186798, 0.80000000000000004, 0.20000000000000001 },
+ { 2.4392042002725698, 0.80000000000000004, 0.30000000000000004 },
+ { 2.6604037035529728, 0.80000000000000004, 0.40000000000000002 },
+ { 2.9478781158239751, 0.80000000000000004, 0.50000000000000000 },
+ { 3.3418121892288055, 0.80000000000000004, 0.60000000000000009 },
+ { 3.9268876980046397, 0.80000000000000004, 0.70000000000000007 },
+ { 4.9246422058196071, 0.80000000000000004, 0.80000000000000004 },
+ { 7.2263259298637132, 0.80000000000000004, 0.90000000000000002 },
};
-
-// Test function for k=0.89999999999999991.
-template <typename Tp>
-void test019()
+const double toler018 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 3
+// max(|f - f_Boost| / |f_Boost|): 1.5716352001310461e-16
+// mean(f - f_Boost): 4.4408920985006264e-17
+// variance(f - f_Boost): 2.4347558803117648e-34
+// stddev(f - f_Boost): 1.5603704304785339e-17
+const testcase_comp_ellint_3<double>
+data019[10] =
{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data019)
- / sizeof(testcase_comp_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::comp_ellint_3(Tp(data019[i].k), Tp(data019[i].nu));
- const Tp f0 = data019[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+ { 2.2805491384227707, 0.90000000000000013, 0.0000000000000000 },
+ { 2.4295011187834890, 0.90000000000000013, 0.10000000000000001 },
+ { 2.6076835743348421, 0.90000000000000013, 0.20000000000000001 },
+ { 2.8256506968858521, 0.90000000000000013, 0.30000000000000004 },
+ { 3.1000689868578628, 0.90000000000000013, 0.40000000000000002 },
+ { 3.4591069002104686, 0.90000000000000013, 0.50000000000000000 },
+ { 3.9549939883570242, 0.90000000000000013, 0.60000000000000009 },
+ { 4.6985482312992453, 0.90000000000000013, 0.70000000000000007 },
+ { 5.9820740813645727, 0.90000000000000013, 0.80000000000000004 },
+ { 8.9942562031858735, 0.90000000000000013, 0.90000000000000002 },
+};
+const double toler019 = 2.5000000000000020e-13;
+
+template<typename Ret, unsigned int Num>
+ void
+ test(const testcase_comp_ellint_3<Ret> (&data)[Num], Ret toler)
+ {
+ bool test __attribute__((unused)) = true;
+ const Ret eps = std::numeric_limits<Ret>::epsilon();
+ Ret max_abs_diff = -Ret(1);
+ Ret max_abs_frac = -Ret(1);
+ unsigned int num_datum = Num;
+ for (unsigned int i = 0; i < num_datum; ++i)
+ {
+ const Ret f = std::tr1::comp_ellint_3(data[i].k, data[i].nu);
+ const Ret f0 = data[i].f0;
+ const Ret diff = f - f0;
+ if (std::abs(diff) > max_abs_diff)
+ max_abs_diff = std::abs(diff);
+ if (std::abs(f0) > Ret(10) * eps
+ && std::abs(f) > Ret(10) * eps)
+ {
+ const Ret frac = diff / f0;
+ if (std::abs(frac) > max_abs_frac)
+ max_abs_frac = std::abs(frac);
+ }
+ }
+ VERIFY(max_abs_frac < toler);
+ }
-int main(int, char**)
+int
+main()
{
- test001<double>();
- test002<double>();
- test003<double>();
- test004<double>();
- test005<double>();
- test006<double>();
- test007<double>();
- test008<double>();
- test009<double>();
- test010<double>();
- test011<double>();
- test012<double>();
- test013<double>();
- test014<double>();
- test015<double>();
- test016<double>();
- test017<double>();
- test018<double>();
- test019<double>();
+ test(data001, toler001);
+ test(data002, toler002);
+ test(data003, toler003);
+ test(data004, toler004);
+ test(data005, toler005);
+ test(data006, toler006);
+ test(data007, toler007);
+ test(data008, toler008);
+ test(data009, toler009);
+ test(data010, toler010);
+ test(data011, toler011);
+ test(data012, toler012);
+ test(data013, toler013);
+ test(data014, toler014);
+ test(data015, toler015);
+ test(data016, toler016);
+ test(data017, toler017);
+ test(data018, toler018);
+ test(data019, toler019);
return 0;
}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/pr66689.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/pr66689.cc
new file mode 100644
index 00000000000..7b274d64d2b
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/pr66689.cc
@@ -0,0 +1,20 @@
+
+#include <tr1/cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ double Pi1 = std::tr1::comp_ellint_3(0.75, 0.0);
+ VERIFY(std::abs(Pi1 - 1.91099) < 0.00001);
+
+ double Pi2 = std::tr1::comp_ellint_3(0.75, 0.5);
+ VERIFY(std::abs(Pi2 - 2.80011) < 0.00001);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_value.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_value.cc
index 2e402c68793..e0bd7037480 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_value.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_value.cc
@@ -1,6 +1,7 @@
-// 2007-02-04 Edward Smith-Rowland <3dw4rd@verizon.net>
+// { dg-do run { target c++11 } }
+// { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
//
-// Copyright (C) 2007-2017 Free Software Foundation, Inc.
+// Copyright (C) 2016-2018 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -18,10098 +19,6324 @@
// <http://www.gnu.org/licenses/>.
// ellint_3
-
-
// Compare against values generated by the GNU Scientific Library.
// The GSL can be found on the web: http://www.gnu.org/software/gsl/
-
+#include <limits>
#include <tr1/cmath>
#if defined(__TEST_DEBUG)
-#include <iostream>
-#define VERIFY(A) \
-if (!(A)) \
- { \
- std::cout << "line " << __LINE__ \
- << " max_abs_frac = " << max_abs_frac \
- << std::endl; \
- }
+# include <iostream>
+# define VERIFY(A) \
+ if (!(A)) \
+ { \
+ std::cout << "line " << __LINE__ \
+ << " max_abs_frac = " << max_abs_frac \
+ << std::endl; \
+ }
#else
-#include <testsuite_hooks.h>
+# include <testsuite_hooks.h>
#endif
-#include "../testcase.h"
-
+#include <specfun_testcase.h>
// Test data for k=-0.90000000000000002, nu=0.0000000000000000.
-testcase_ellint_3<double> data001[] = {
- { -0.0000000000000000, -0.90000000000000002, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17525427376115027, -0.90000000000000002, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35492464591297446, -0.90000000000000002, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.54388221416157134, -0.90000000000000002, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.74797400423532523, -0.90000000000000002, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.97463898451966458, -0.90000000000000002, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.2334463254523440, -0.90000000000000002, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.5355247765594910, -0.90000000000000002, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.8882928567775124, -0.90000000000000002, 0.0000000000000000,
- 1.3962634015954636 },
- { 2.2805491384227703, -0.90000000000000002, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.90000000000000002, nu=0.0000000000000000.
-template <typename Tp>
-void test001()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data001)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data001[i].k), Tp(data001[i].nu),
- Tp(data001[i].phi));
- const Tp f0 = data001[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 5.7842011620951154e-16
+// mean(f - f_Boost): 5.8286708792820721e-17
+// variance(f - f_Boost): 4.1942474344433133e-34
+// stddev(f - f_Boost): 2.0479861900030756e-17
+const testcase_ellint_3<double>
+data001[10] =
+{
+ { 0.0000000000000000, -0.90000000000000002, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17525427376115027, -0.90000000000000002, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35492464591297446, -0.90000000000000002, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.54388221416157123, -0.90000000000000002, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.74797400423532512, -0.90000000000000002, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.97463898451966446, -0.90000000000000002, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.2334463254523438, -0.90000000000000002, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.5355247765594913, -0.90000000000000002, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.8882928567775126, -0.90000000000000002, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 2.2805491384227703, -0.90000000000000002, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler001 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.10000000000000001.
-testcase_ellint_3<double> data002[] = {
- { -0.0000000000000000, -0.90000000000000002, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17507714233254659, -0.90000000000000002, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.35350932904326521, -0.90000000000000002, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.53911129989870998, -0.90000000000000002, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.73666644254508429, -0.90000000000000002, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.95250736612100184, -0.90000000000000002, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.1950199550905594, -0.90000000000000002, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.4741687286340848, -0.90000000000000002, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.7968678183506059, -0.90000000000000002, 0.10000000000000001,
- 1.3962634015954636 },
- { 2.1537868513875287, -0.90000000000000002, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.90000000000000002, nu=0.10000000000000001.
-template <typename Tp>
-void test002()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data002)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data002[i].k), Tp(data002[i].nu),
- Tp(data002[i].phi));
- const Tp f0 = data002[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.1500594295134815e-16
+// mean(f - f_Boost): 1.0269562977782698e-16
+// variance(f - f_Boost): 1.4388836606733082e-32
+// stddev(f - f_Boost): 1.1995347684303728e-16
+const testcase_ellint_3<double>
+data002[10] =
+{
+ { 0.0000000000000000, -0.90000000000000002, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17543204932716244, -0.90000000000000002, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35636022898551184, -0.90000000000000002, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.54880278898382584, -0.90000000000000002, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.75988834774529268, -0.90000000000000002, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.99853303003568117, -0.90000000000000002, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.2759958823999022, -0.90000000000000002, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.6051187364639401, -0.90000000000000002, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.9941406879519472, -0.90000000000000002, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 2.4295011187834881, -0.90000000000000002, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler002 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.20000000000000001.
-testcase_ellint_3<double> data003[] = {
- { -0.0000000000000000, -0.90000000000000002, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17490065089140930, -0.90000000000000002, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.35211377590661436, -0.90000000000000002, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.53448220334204122, -0.90000000000000002, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.72591368943179613, -0.90000000000000002, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.93192539780038763, -0.90000000000000002, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.1600809679692683, -0.90000000000000002, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.4195407225882508, -0.90000000000000002, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.7168966476424528, -0.90000000000000002, 0.20000000000000001,
- 1.3962634015954636 },
- { 2.0443194576468890, -0.90000000000000002, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.90000000000000002, nu=0.20000000000000001.
-template <typename Tp>
-void test003()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data003)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data003[i].k), Tp(data003[i].nu),
- Tp(data003[i].phi));
- const Tp f0 = data003[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.90000000000000002, nu=0.29999999999999999.
-testcase_ellint_3<double> data004[] = {
- { -0.0000000000000000, -0.90000000000000002, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17472479532647534, -0.90000000000000002, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.35073750187374114, -0.90000000000000002, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.52998766129466979, -0.90000000000000002, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.71566993548699587, -0.90000000000000002, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.91271517762560195, -0.90000000000000002, 0.29999999999999999,
- 0.87266462599716477 },
- { 1.1281241199843370, -0.90000000000000002, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.3704929576917448, -0.90000000000000002, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.6461981511487715, -0.90000000000000002, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.9486280260314426, -0.90000000000000002, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.90000000000000002, nu=0.29999999999999999.
-template <typename Tp>
-void test004()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data004)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data004[i].k), Tp(data004[i].nu),
- Tp(data004[i].phi));
- const Tp f0 = data004[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 5.2711357908578066e-16
+// mean(f - f_Boost): 8.0491169285323847e-17
+// variance(f - f_Boost): 7.9985534974304465e-34
+// stddev(f - f_Boost): 2.8281714052423424e-17
+const testcase_ellint_3<double>
+data003[10] =
+{
+ { 0.0000000000000000, -0.90000000000000002, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17561047321968409, -0.90000000000000002, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35781659944356109, -0.90000000000000002, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.55388150905215283, -0.90000000000000002, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.77246874123251441, -0.90000000000000002, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 1.0244466254771925, -0.90000000000000002, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.3234824077640801, -0.90000000000000002, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.6849848968804237, -0.90000000000000002, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 2.1185749045502273, -0.90000000000000002, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 2.6076835743348412, -0.90000000000000002, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler003 = 2.5000000000000020e-13;
+
+// Test data for k=-0.90000000000000002, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.9955372494296814e-16
+// mean(f - f_Boost): 5.8286708792820721e-17
+// variance(f - f_Boost): 4.1942474344433133e-34
+// stddev(f - f_Boost): 2.0479861900030756e-17
+const testcase_ellint_3<double>
+data004[10] =
+{
+ { 0.0000000000000000, -0.90000000000000002, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17578954966746221, -0.90000000000000002, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35929429810867447, -0.90000000000000002, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.55912757154240811, -0.90000000000000002, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.78578314722025389, -0.90000000000000002, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 1.0526941001131365, -0.90000000000000002, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.3769682234538601, -0.90000000000000002, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.7779437432911238, -0.90000000000000002, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 2.2676509341813631, -0.90000000000000002, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 2.8256506968858512, -0.90000000000000002, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler004 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.40000000000000002.
-testcase_ellint_3<double> data005[] = {
- { -0.0000000000000000, -0.90000000000000002, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17454957156468839, -0.90000000000000002, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34938003933330430, -0.90000000000000002, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.52562093533067455, -0.90000000000000002, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.70589461324915703, -0.90000000000000002, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.89472658511942849, -0.90000000000000002, 0.40000000000000002,
- 0.87266462599716477 },
- { 1.0987419542323440, -0.90000000000000002, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.3261349565496301, -0.90000000000000002, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.5831293909853767, -0.90000000000000002, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.8641114227238349, -0.90000000000000002, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.90000000000000002, nu=0.40000000000000002.
-template <typename Tp>
-void test005()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data005)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data005[i].k), Tp(data005[i].nu),
- Tp(data005[i].phi));
- const Tp f0 = data005[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.7042235432234642e-16
+// mean(f - f_Boost): 2.0261570199409106e-16
+// variance(f - f_Boost): 5.8024227149195491e-32
+// stddev(f - f_Boost): 2.4088218520512364e-16
+const testcase_ellint_3<double>
+data005[10] =
+{
+ { 0.0000000000000000, -0.90000000000000002, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17596928293938452, -0.90000000000000002, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.36079388642472821, -0.90000000000000002, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.56455096667115612, -0.90000000000000002, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.79990996997869435, -0.90000000000000002, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 1.0836647913872215, -0.90000000000000002, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.4378726836091849, -0.90000000000000002, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.8880446720682853, -0.90000000000000002, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 2.4505848932025227, -0.90000000000000002, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 3.1000689868578615, -0.90000000000000002, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler005 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.50000000000000000.
-testcase_ellint_3<double> data006[] = {
- { -0.0000000000000000, -0.90000000000000002, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17437497557073336, -0.90000000000000002, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34804093691586013, -0.90000000000000002, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.52137576320372914, -0.90000000000000002, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.69655163996912284, -0.90000000000000002, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.87783188683054236, -0.90000000000000002, 0.50000000000000000,
- 0.87266462599716477 },
- { 1.0716015959755185, -0.90000000000000002, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.2857636916026747, -0.90000000000000002, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.5264263913252365, -0.90000000000000002, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.7888013241937861, -0.90000000000000002, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.90000000000000002, nu=0.50000000000000000.
-template <typename Tp>
-void test006()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data006)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data006[i].k), Tp(data006[i].nu),
- Tp(data006[i].phi));
- const Tp f0 = data006[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.90000000000000002, nu=0.59999999999999998.
-testcase_ellint_3<double> data007[] = {
- { -0.0000000000000000, -0.90000000000000002, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17420100334657815, -0.90000000000000002, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34671975876122157, -0.90000000000000002, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.51724631570707968, -0.90000000000000002, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.68760879113743056, -0.90000000000000002, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.86192157779698364, -0.90000000000000002, 0.59999999999999998,
- 0.87266462599716477 },
- { 1.0464279696166354, -0.90000000000000002, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.2488156247094004, -0.90000000000000002, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.4750988777188474, -0.90000000000000002, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.7211781128919523, -0.90000000000000002, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.90000000000000002, nu=0.59999999999999998.
-template <typename Tp>
-void test007()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data007)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data007[i].k), Tp(data007[i].nu),
- Tp(data007[i].phi));
- const Tp f0 = data007[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.90000000000000002, nu=0.69999999999999996.
-testcase_ellint_3<double> data008[] = {
- { -0.0000000000000000, -0.90000000000000002, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17402765093102210, -0.90000000000000002, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34541608382635131, -0.90000000000000002, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.51322715827061705, -0.90000000000000002, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.67903717872440306, -0.90000000000000002, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.84690113601682671, -0.90000000000000002, 0.69999999999999996,
- 0.87266462599716477 },
- { 1.0229914311548418, -0.90000000000000002, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.2148329639709381, -0.90000000000000002, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.4283586501307806, -0.90000000000000002, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.6600480747670938, -0.90000000000000002, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.90000000000000002, nu=0.69999999999999996.
-template <typename Tp>
-void test008()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data008)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data008[i].k), Tp(data008[i].nu),
- Tp(data008[i].phi));
- const Tp f0 = data008[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 3.8944086593755267e-16
+// mean(f - f_Boost): 6.9388939039072284e-17
+// variance(f - f_Boost): 1.7333369499485123e-32
+// stddev(f - f_Boost): 1.3165625507162629e-16
+const testcase_ellint_3<double>
+data006[10] =
+{
+ { 0.0000000000000000, -0.90000000000000002, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17614967734498183, -0.90000000000000002, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.36231594750319435, -0.90000000000000002, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.57016256984349567, -0.90000000000000002, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.81494025918293422, -0.90000000000000002, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.1178482279283477, -0.90000000000000002, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.5081455873012106, -0.90000000000000002, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 2.0213599730863998, -0.90000000000000002, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 2.6822467012926827, -0.90000000000000002, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 3.4591069002104677, -0.90000000000000002, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler006 = 2.5000000000000020e-13;
+
+// Test data for k=-0.90000000000000002, nu=0.60000000000000009.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.0602096790645418e-16
+// mean(f - f_Boost): 1.0269562977782698e-16
+// variance(f - f_Boost): 1.4388836606733082e-32
+// stddev(f - f_Boost): 1.1995347684303728e-16
+const testcase_ellint_3<double>
+data007[10] =
+{
+ { 0.0000000000000000, -0.90000000000000002, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17633073723493825, -0.90000000000000002, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.36386108723492810, -0.90000000000000002, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.57597424744716241, -0.90000000000000002, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.83098051948501150, -0.90000000000000002, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.1558706545698916, -0.90000000000000002, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.5905576379415669, -0.90000000000000002, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 2.1875186010215080, -0.90000000000000002, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.9885767771316849, -0.90000000000000002, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 3.9549939883570224, -0.90000000000000002, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler007 = 2.5000000000000020e-13;
+
+// Test data for k=-0.90000000000000002, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.1938610791060186e-16
+// mean(f - f_Boost): 3.0253577421035517e-16
+// variance(f - f_Boost): 4.2342877557562532e-32
+// stddev(f - f_Boost): 2.0577385051935665e-16
+const testcase_ellint_3<double>
+data008[10] =
+{
+ { 0.0000000000000000, -0.90000000000000002, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17651246700160939, -0.90000000000000002, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36542993547358982, -0.90000000000000002, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.58199897877674867, -0.90000000000000002, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.84815633587352857, -0.90000000000000002, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.1985495623872375, -0.90000000000000002, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.6892158134027688, -0.90000000000000002, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 2.4029722191094236, -0.90000000000000002, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 3.4201084941340052, -0.90000000000000002, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 4.6985482312992435, -0.90000000000000002, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler008 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.80000000000000004.
-testcase_ellint_3<double> data009[] = {
- { -0.0000000000000000, -0.90000000000000002, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17385491439925149, -0.90000000000000002, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.34412950523113928, -0.90000000000000002, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.50931321668729612, -0.90000000000000002, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.67081081392296349, -0.90000000000000002, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.83268846097293259, -0.90000000000000002, 0.80000000000000004,
- 0.87266462599716477 },
- { 1.0010985015814027, -0.90000000000000002, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.1834394045489678, -0.90000000000000002, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.3855695891683188, -0.90000000000000002, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.6044591960982204, -0.90000000000000002, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.90000000000000002, nu=0.80000000000000004.
-template <typename Tp>
-void test009()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data009)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data009[i].k), Tp(data009[i].nu),
- Tp(data009[i].phi));
- const Tp f0 = data009[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 6.5091520146032660e-16
+// mean(f - f_Boost): 2.8310687127941490e-16
+// variance(f - f_Boost): 9.8950000698295322e-33
+// stddev(f - f_Boost): 9.9473614943006532e-17
+const testcase_ellint_3<double>
+data009[10] =
+{
+ { 0.0000000000000000, -0.90000000000000002, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17669487107954862, -0.90000000000000002, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36702314729628421, -0.90000000000000002, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.58825099711365492, -0.90000000000000002, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.86661711422209031, -0.90000000000000002, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.2469779109884802, -0.90000000000000002, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.8105469760531578, -0.90000000000000002, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.6989505165893752, -0.90000000000000002, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 4.0935213267757424, -0.90000000000000002, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 5.9820740813645710, -0.90000000000000002, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler009 = 2.5000000000000020e-13;
// Test data for k=-0.90000000000000002, nu=0.90000000000000002.
-testcase_ellint_3<double> data010[] = {
- { -0.0000000000000000, -0.90000000000000002, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17368278986240138, -0.90000000000000002, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.34285962963961397, -0.90000000000000002, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.50549974644993323, -0.90000000000000002, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.66290623857720898, -0.90000000000000002, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.81921183128847164, -0.90000000000000002, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.98058481956066390, -0.90000000000000002, 0.90000000000000002,
- 1.0471975511965976 },
- { 1.1543223520473567, -0.90000000000000002, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.3462119782292938, -0.90000000000000002, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.5536420236310946, -0.90000000000000002, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.90000000000000002, nu=0.90000000000000002.
-template <typename Tp>
-void test010()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data010)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data010[i].k), Tp(data010[i].nu),
- Tp(data010[i].phi));
- const Tp f0 = data010[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 8.2628580104449673e-16
+// mean(f - f_Boost): 8.5764728652293339e-16
+// variance(f - f_Boost): 8.9671393318321280e-31
+// stddev(f - f_Boost): 9.4694980499666013e-16
+const testcase_ellint_3<double>
+data010[10] =
+{
+ { 0.0000000000000000, -0.90000000000000002, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17687795394604169, -0.90000000000000002, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36864140434751286, -0.90000000000000002, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.59474595366817051, -0.90000000000000002, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.88654237226056665, -0.90000000000000002, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.3026595810616726, -0.90000000000000002, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.9653635459278078, -0.90000000000000002, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 3.1451407527189463, -0.90000000000000002, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 5.3745230680316114, -0.90000000000000002, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 8.9942562031858682, -0.90000000000000002, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler010 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.0000000000000000.
-testcase_ellint_3<double> data011[] = {
- { -0.0000000000000000, -0.80000000000000004, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17510154241338902, -0.80000000000000004, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35365068839779390, -0.80000000000000004, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.53926804409084561, -0.80000000000000004, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.73587926028070383, -0.80000000000000004, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.94770942970071170, -0.80000000000000004, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.1789022995388239, -0.80000000000000004, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.4323027881876009, -0.80000000000000004, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.7069629739121674, -0.80000000000000004, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.9953027776647296, -0.80000000000000004, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.80000000000000004, nu=0.0000000000000000.
-template <typename Tp>
-void test011()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data011)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data011[i].k), Tp(data011[i].nu),
- Tp(data011[i].phi));
- const Tp f0 = data011[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.5543122344752192e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.7898565163847540e-16
+// mean(f - f_Boost): 2.3869795029440865e-16
+// variance(f - f_Boost): 2.1368406725192426e-31
+// stddev(f - f_Boost): 4.6225974002926564e-16
+const testcase_ellint_3<double>
+data011[10] =
+{
+ { 0.0000000000000000, -0.80000000000000004, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17510154241338899, -0.80000000000000004, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35365068839779396, -0.80000000000000004, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.53926804409084550, -0.80000000000000004, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.73587926028070372, -0.80000000000000004, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.94770942970071170, -0.80000000000000004, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.1789022995388236, -0.80000000000000004, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.4323027881876012, -0.80000000000000004, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.7069629739121677, -0.80000000000000004, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.9953027776647294, -0.80000000000000004, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler011 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.10000000000000001.
-testcase_ellint_3<double> data012[] = {
- { -0.0000000000000000, -0.80000000000000004, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17492468824017166, -0.80000000000000004, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.35224443521476911, -0.80000000000000004, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.53456851853226961, -0.80000000000000004, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.72488875602364944, -0.80000000000000004, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.92661354274638952, -0.80000000000000004, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.1432651144499077, -0.80000000000000004, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.3774479927211429, -0.80000000000000004, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.6287092337196041, -0.80000000000000004, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.8910755418379521, -0.80000000000000004, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.80000000000000004, nu=0.10000000000000001.
-template <typename Tp>
-void test012()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data012)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data012[i].k), Tp(data012[i].nu),
- Tp(data012[i].phi));
- const Tp f0 = data012[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.3898786942190374e-16
+// mean(f - f_Boost): 2.3869795029440865e-16
+// variance(f - f_Boost): 2.9190059990693968e-31
+// stddev(f - f_Boost): 5.4027826155319237e-16
+const testcase_ellint_3<double>
+data012[10] =
+{
+ { 0.0000000000000000, -0.80000000000000004, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17527903952342144, -0.80000000000000004, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35507705313548549, -0.80000000000000004, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.54411455987643553, -0.80000000000000004, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.74745625666804383, -0.80000000000000004, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.97046953684238557, -0.80000000000000004, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.2183080025184605, -0.80000000000000004, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.4943711151994405, -0.80000000000000004, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.7972401309544201, -0.80000000000000004, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 2.1172616484005085, -0.80000000000000004, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler012 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.20000000000000001.
-testcase_ellint_3<double> data013[] = {
- { -0.0000000000000000, -0.80000000000000004, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17474847286224943, -0.80000000000000004, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.35085779529084682, -0.80000000000000004, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.53000829263059157, -0.80000000000000004, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.71443466027453406, -0.80000000000000004, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.90698196872715420, -0.80000000000000004, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.1108198200558581, -0.80000000000000004, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.3284988909963957, -0.80000000000000004, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.5600369318140328, -0.80000000000000004, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.8007226661734588, -0.80000000000000004, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.80000000000000004, nu=0.20000000000000001.
-template <typename Tp>
-void test013()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data013)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data013[i].k), Tp(data013[i].nu),
- Tp(data013[i].phi));
- const Tp f0 = data013[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.80000000000000004, nu=0.29999999999999999.
-testcase_ellint_3<double> data014[] = {
- { -0.0000000000000000, -0.80000000000000004, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17457289217669891, -0.80000000000000004, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34949028801501258, -0.80000000000000004, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.52558024362769318, -0.80000000000000004, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.70447281740094914, -0.80000000000000004, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.88864745641528986, -0.80000000000000004, 0.29999999999999999,
- 0.87266462599716477 },
- { 1.0811075819341465, -0.80000000000000004, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.2844589654082377, -0.80000000000000004, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.4991461361277849, -0.80000000000000004, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.7214611048717301, -0.80000000000000004, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.80000000000000004, nu=0.29999999999999999.
-template <typename Tp>
-void test014()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data014)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data014[i].k), Tp(data014[i].nu),
- Tp(data014[i].phi));
- const Tp f0 = data014[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.8513740186068518e-16
+// mean(f - f_Boost): 2.8310687127941490e-16
+// variance(f - f_Boost): 2.7528339102381189e-31
+// stddev(f - f_Boost): 5.2467455724840699e-16
+const testcase_ellint_3<double>
+data013[10] =
+{
+ { 0.0000000000000000, -0.80000000000000004, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17545718375086419, -0.80000000000000004, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35652404627248163, -0.80000000000000004, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.54911638512920913, -0.80000000000000004, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.75967684282131176, -0.80000000000000004, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.99513526893543769, -0.80000000000000004, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.2622192109995993, -0.80000000000000004, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.5654106676347741, -0.80000000000000004, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.9029531718534984, -0.80000000000000004, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 2.2624789434186798, -0.80000000000000004, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler013 = 2.5000000000000020e-13;
+
+// Test data for k=-0.80000000000000004, nu=0.30000000000000004.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.2825261583337354e-16
+// mean(f - f_Boost): 2.6367796834847468e-16
+// variance(f - f_Boost): 2.8249350208968825e-31
+// stddev(f - f_Boost): 5.3150117788175054e-16
+const testcase_ellint_3<double>
+data014[10] =
+{
+ { 0.0000000000000000, -0.80000000000000004, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17563597931587369, -0.80000000000000004, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35799220412005128, -0.80000000000000004, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.55428253691111318, -0.80000000000000004, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.77260647376977365, -0.80000000000000004, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 1.0220015271210958, -0.80000000000000004, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.3115965312302671, -0.80000000000000004, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.6478518468813512, -0.80000000000000004, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 2.0290458414203481, -0.80000000000000004, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 2.4392042002725693, -0.80000000000000004, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler014 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.40000000000000002.
-testcase_ellint_3<double> data015[] = {
- { -0.0000000000000000, -0.80000000000000004, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17439794211872178, -0.80000000000000004, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34814144964568972, -0.80000000000000004, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.52127776285273075, -0.80000000000000004, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.69496411438966599, -0.80000000000000004, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.87146878427509589, -0.80000000000000004, 0.40000000000000002,
- 0.87266462599716477 },
- { 1.0537579024937762, -0.80000000000000004, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.2445534387922637, -0.80000000000000004, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.4446769766361993, -0.80000000000000004, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.6512267838651289, -0.80000000000000004, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.80000000000000004, nu=0.40000000000000002.
-template <typename Tp>
-void test015()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data015)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data015[i].k), Tp(data015[i].nu),
- Tp(data015[i].phi));
- const Tp f0 = data015[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.3462748389836647e-16
+// mean(f - f_Boost): 3.3861802251067273e-16
+// variance(f - f_Boost): 4.3719465706454422e-31
+// stddev(f - f_Boost): 6.6120696991527871e-16
+const testcase_ellint_3<double>
+data015[10] =
+{
+ { 0.0000000000000000, -0.80000000000000004, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17581543047866136, -0.80000000000000004, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35948208343061633, -0.80000000000000004, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.55962280893702021, -0.80000000000000004, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.78632063889234116, -0.80000000000000004, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 1.0514333069550323, -0.80000000000000004, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.3677213138838757, -0.80000000000000004, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.7451736773665165, -0.80000000000000004, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 2.1830100424586831, -0.80000000000000004, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.6604037035529724, -0.80000000000000004, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler015 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.50000000000000000.
-testcase_ellint_3<double> data016[] = {
- { -0.0000000000000000, -0.80000000000000004, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17422361866118047, -0.80000000000000004, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34681083254170475, -0.80000000000000004, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.51709470815494440, -0.80000000000000004, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.68587375344080259, -0.80000000000000004, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.85532571852810624, -0.80000000000000004, 0.50000000000000000,
- 0.87266462599716477 },
- { 1.0284677391874906, -0.80000000000000004, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.2081693942686225, -0.80000000000000004, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.3955803006426311, -0.80000000000000004, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.5884528947755532, -0.80000000000000004, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.80000000000000004, nu=0.50000000000000000.
-template <typename Tp>
-void test016()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data016)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data016[i].k), Tp(data016[i].nu),
- Tp(data016[i].phi));
- const Tp f0 = data016[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.80000000000000004, nu=0.59999999999999998.
-testcase_ellint_3<double> data017[] = {
- { -0.0000000000000000, -0.80000000000000004, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17404991781414092, -0.80000000000000004, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34549800443625167, -0.80000000000000004, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.51302536167001556, -0.80000000000000004, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.67717065003912258, -0.80000000000000004, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.84011512421134416, -0.80000000000000004, 0.59999999999999998,
- 0.87266462599716477 },
- { 1.0049863847088742, -0.80000000000000004, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.1748145941898918, -0.80000000000000004, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.3510319699755071, -0.80000000000000004, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.5319262547427865, -0.80000000000000004, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.80000000000000004, nu=0.59999999999999998.
-template <typename Tp>
-void test017()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data017)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data017[i].k), Tp(data017[i].nu),
- Tp(data017[i].phi));
- const Tp f0 = data017[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.80000000000000004, nu=0.69999999999999996.
-testcase_ellint_3<double> data018[] = {
- { -0.0000000000000000, -0.80000000000000004, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17387683562442202, -0.80000000000000004, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34420254775101611, -0.80000000000000004, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.50906439222143685, -0.80000000000000004, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.66882693152688433, -0.80000000000000004, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.82574792844091316, -0.80000000000000004, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.98310431309490953, -0.80000000000000004, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.1440884535113258, -0.80000000000000004, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.3103743938952537, -0.80000000000000004, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.4806912324625332, -0.80000000000000004, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.80000000000000004, nu=0.69999999999999996.
-template <typename Tp>
-void test018()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data018)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data018[i].k), Tp(data018[i].nu),
- Tp(data018[i].phi));
- const Tp f0 = data018[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.0388243828581744e-16
+// mean(f - f_Boost): 3.8580250105724191e-16
+// variance(f - f_Boost): 6.4106456575047741e-31
+// stddev(f - f_Boost): 8.0066507713929764e-16
+const testcase_ellint_3<double>
+data016[10] =
+{
+ { 0.0000000000000000, -0.80000000000000004, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17599554153999472, -0.80000000000000004, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.36099426243351540, -0.80000000000000004, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.56514786174780673, -0.80000000000000004, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.80090697622371010, -0.80000000000000004, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0838891627679339, -0.80000000000000004, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.4323506654466280, -0.80000000000000004, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.8625761085390575, -0.80000000000000004, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 2.3768757305654766, -0.80000000000000004, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.9478781158239746, -0.80000000000000004, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler016 = 2.5000000000000020e-13;
+
+// Test data for k=-0.80000000000000004, nu=0.60000000000000009.
+// max(|f - f_Boost|): 3.5527136788005009e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.0631099169042069e-15
+// mean(f - f_Boost): 4.8294701571194306e-16
+// variance(f - f_Boost): 1.1633910328160319e-30
+// stddev(f - f_Boost): 1.0786060600682865e-15
+const testcase_ellint_3<double>
+data017[10] =
+{
+ { 0.0000000000000000, -0.80000000000000004, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17617631684170665, -0.80000000000000004, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.36252934193666231, -0.80000000000000004, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.57086932622945163, -0.80000000000000004, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.81646796740150973, -0.80000000000000004, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.1199552158519064, -0.80000000000000004, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.5079766673336394, -0.80000000000000004, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 2.0082747447038165, -0.80000000000000004, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.6315146066775523, -0.80000000000000004, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 3.3418121892288051, -0.80000000000000004, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler017 = 2.5000000000000020e-13;
+
+// Test data for k=-0.80000000000000004, nu=0.70000000000000007.
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.6544679145741375e-16
+// mean(f - f_Boost): 3.2751579226442120e-16
+// variance(f - f_Boost): 4.4236851331020672e-31
+// stddev(f - f_Boost): 6.6510789599147505e-16
+const testcase_ellint_3<double>
+data018[10] =
+{
+ { 0.0000000000000000, -0.80000000000000004, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17635776076721221, -0.80000000000000004, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36408794649916976, -0.80000000000000004, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.57679992290624138, -0.80000000000000004, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.83312441418142813, -0.80000000000000004, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.1603958891464856, -0.80000000000000004, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.5982855143796213, -0.80000000000000004, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 2.1962484408371821, -0.80000000000000004, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.9873281786111869, -0.80000000000000004, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 3.9268876980046397, -0.80000000000000004, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler018 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.80000000000000004.
-testcase_ellint_3<double> data019[] = {
- { -0.0000000000000000, -0.80000000000000004, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17370436817515206, -0.80000000000000004, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.34292405894783395, -0.80000000000000004, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.50520682176250087, -0.80000000000000004, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.66081751679736189, -0.80000000000000004, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.81214672249355102, -0.80000000000000004, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.96264481387685574, -0.80000000000000004, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.1156611352656258, -0.80000000000000004, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.2730756225143889, -0.80000000000000004, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.4339837018309474, -0.80000000000000004, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.80000000000000004, nu=0.80000000000000004.
-template <typename Tp>
-void test019()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data019)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data019[i].k), Tp(data019[i].nu),
- Tp(data019[i].phi));
- const Tp f0 = data019[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.0176949165011079e-16
+// mean(f - f_Boost): 7.0499162063697436e-16
+// variance(f - f_Boost): 1.7230805408026989e-30
+// stddev(f - f_Boost): 1.3126616246400665e-15
+const testcase_ellint_3<double>
+data019[10] =
+{
+ { 0.0000000000000000, -0.80000000000000004, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17653987774203392, -0.80000000000000004, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36567072568046877, -0.80000000000000004, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.58295359996558616, -0.80000000000000004, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.85101998309176108, -0.80000000000000004, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.2062322059736537, -0.80000000000000004, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.7090321420917429, -0.80000000000000004, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.4529058049405066, -0.80000000000000004, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 3.5368893360106948, -0.80000000000000004, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 4.9246422058196062, -0.80000000000000004, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler019 = 2.5000000000000020e-13;
// Test data for k=-0.80000000000000004, nu=0.90000000000000002.
-testcase_ellint_3<double> data020[] = {
- { -0.0000000000000000, -0.80000000000000004, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17353251158533153, -0.80000000000000004, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.34166214791545768, -0.80000000000000004, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.50144799535130580, -0.80000000000000004, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.65311976193814447, -0.80000000000000004, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.79924384892320866, -0.80000000000000004, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.94345762353365625, -0.80000000000000004, 0.90000000000000002,
- 1.0471975511965976 },
- { 1.0892582069219159, -0.80000000000000004, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.2387000876610268, -0.80000000000000004, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.3911845406776222, -0.80000000000000004, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.80000000000000004, nu=0.90000000000000002.
-template <typename Tp>
-void test020()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data020)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data020[i].k), Tp(data020[i].nu),
- Tp(data020[i].phi));
- const Tp f0 = data020[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.7782721357365268e-16
+// mean(f - f_Boost): 8.9928064994637676e-16
+// variance(f - f_Boost): 1.5485199571025344e-30
+// stddev(f - f_Boost): 1.2443954183066307e-15
+const testcase_ellint_3<double>
+data020[10] =
+{
+ { 0.0000000000000000, -0.80000000000000004, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17672267223433513, -0.80000000000000004, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36727835537196063, -0.80000000000000004, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.58934569363716649, -0.80000000000000004, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.87032723471138851, -0.80000000000000004, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.2588676111323349, -0.80000000000000004, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.8498731900660019, -0.80000000000000004, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.8368381299300420, -0.80000000000000004, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 4.5674844191654058, -0.80000000000000004, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 7.2263259298637115, -0.80000000000000004, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler020 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.0000000000000000.
-testcase_ellint_3<double> data021[] = {
- { -0.0000000000000000, -0.69999999999999996, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17496737466916720, -0.69999999999999996, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35254687535677925, -0.69999999999999996, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.53536740275997130, -0.69999999999999996, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.72603797651684465, -0.69999999999999996, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.92698296348313458, -0.69999999999999996, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.1400447527693316, -0.69999999999999996, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.3657668117194071, -0.69999999999999996, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.6024686895959159, -0.69999999999999996, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.8456939983747236, -0.69999999999999996, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.69999999999999996, nu=0.0000000000000000.
-template <typename Tp>
-void test021()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data021)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data021[i].k), Tp(data021[i].nu),
- Tp(data021[i].phi));
- const Tp f0 = data021[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.5425633303580569e-16
+// mean(f - f_Boost): 7.7715611723760953e-17
+// variance(f - f_Boost): 7.4564398834547797e-34
+// stddev(f - f_Boost): 2.7306482533374340e-17
+const testcase_ellint_3<double>
+data021[10] =
+{
+ { 0.0000000000000000, -0.69999999999999996, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17496737466916723, -0.69999999999999996, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35254687535677931, -0.69999999999999996, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.53536740275997130, -0.69999999999999996, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.72603797651684454, -0.69999999999999996, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.92698296348313447, -0.69999999999999996, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.1400447527693316, -0.69999999999999996, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.3657668117194071, -0.69999999999999996, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.6024686895959162, -0.69999999999999996, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.8456939983747234, -0.69999999999999996, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler021 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.10000000000000001.
-testcase_ellint_3<double> data022[] = {
- { -0.0000000000000000, -0.69999999999999996, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17479076384884681, -0.69999999999999996, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.35114844900396364, -0.69999999999999996, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.53072776947527012, -0.69999999999999996, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.71530198262386246, -0.69999999999999996, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.90666760677828306, -0.69999999999999996, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.1063366517438080, -0.69999999999999996, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.3149477243092147, -0.69999999999999996, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.5314886725038925, -0.69999999999999996, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.7528050171757608, -0.69999999999999996, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.69999999999999996, nu=0.10000000000000001.
-template <typename Tp>
-void test022()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data022)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data022[i].k), Tp(data022[i].nu),
- Tp(data022[i].phi));
- const Tp f0 = data022[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.2736371663370261e-16
+// mean(f - f_Boost): 8.8817841970012528e-17
+// variance(f - f_Boost): 9.7390235212470591e-34
+// stddev(f - f_Boost): 3.1207408609570677e-17
+const testcase_ellint_3<double>
+data022[10] =
+{
+ { 0.0000000000000000, -0.69999999999999996, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17514462737300920, -0.69999999999999996, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35396527997470451, -0.69999999999999996, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.54015179589433981, -0.69999999999999996, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.73734430854477728, -0.69999999999999996, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.94888950796697047, -0.69999999999999996, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.1772807959736322, -0.69999999999999996, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.4231796401075831, -0.69999999999999996, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.6841856799887469, -0.69999999999999996, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.9541347343119562, -0.69999999999999996, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler022 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.20000000000000001.
-testcase_ellint_3<double> data023[] = {
- { -0.0000000000000000, -0.69999999999999996, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17461479077791472, -0.69999999999999996, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34976950621407538, -0.69999999999999996, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.52622533231350188, -0.69999999999999996, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.70508774017895226, -0.69999999999999996, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.88775302531730294, -0.69999999999999996, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.0756195476149006, -0.69999999999999996, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.2695349716654372, -0.69999999999999996, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.4690814617070540, -0.69999999999999996, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.6721098780092147, -0.69999999999999996, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.69999999999999996, nu=0.20000000000000001.
-template <typename Tp>
-void test023()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data023)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data023[i].k), Tp(data023[i].nu),
- Tp(data023[i].phi));
- const Tp f0 = data023[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.69999999999999996, nu=0.29999999999999999.
-testcase_ellint_3<double> data024[] = {
- { -0.0000000000000000, -0.69999999999999996, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17443945136076172, -0.69999999999999996, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34840956983535287, -0.69999999999999996, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.52185308551329179, -0.69999999999999996, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.69535240431168266, -0.69999999999999996, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.87007983473964923, -0.69999999999999996, 0.29999999999999999,
- 0.87266462599716477 },
- { 1.0474657975577066, -0.69999999999999996, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.2286225419931889, -0.69999999999999996, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.4136490671013271, -0.69999999999999996, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.6011813647733213, -0.69999999999999996, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.69999999999999996, nu=0.29999999999999999.
-template <typename Tp>
-void test024()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data024)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data024[i].k), Tp(data024[i].nu),
- Tp(data024[i].phi));
- const Tp f0 = data024[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.9907249355047774e-16
+// mean(f - f_Boost): 3.3306690738754695e-17
+// variance(f - f_Boost): 1.3695501826753678e-34
+// stddev(f - f_Boost): 1.1702778228589003e-17
+const testcase_ellint_3<double>
+data023[10] =
+{
+ { 0.0000000000000000, -0.69999999999999996, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17532252613350796, -0.69999999999999996, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35540417596807522, -0.69999999999999996, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.54508913033361928, -0.69999999999999996, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.74927635777718415, -0.69999999999999996, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.97261706337936338, -0.69999999999999996, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.2187303976209327, -0.69999999999999996, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.4887796709222487, -0.69999999999999996, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.7796581281839212, -0.69999999999999996, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 2.0829290325820202, -0.69999999999999996, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler023 = 2.5000000000000020e-13;
+
+// Test data for k=-0.69999999999999996, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.6912897610535316e-16
+// mean(f - f_Boost): 1.6653345369377347e-17
+// variance(f - f_Boost): 2.6207864467918357e-32
+// stddev(f - f_Boost): 1.6188843216214787e-16
+const testcase_ellint_3<double>
+data024[10] =
+{
+ { 0.0000000000000000, -0.69999999999999996, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17550107516328570, -0.69999999999999996, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35686409576571959, -0.69999999999999996, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.55018827316513352, -0.69999999999999996, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.76189759494390275, -0.69999999999999996, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.99844623430885615, -0.69999999999999996, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.2652862989039833, -0.69999999999999996, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.5647666808691361, -0.69999999999999996, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.8932499694938163, -0.69999999999999996, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 2.2392290510988535, -0.69999999999999996, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler024 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.40000000000000002.
-testcase_ellint_3<double> data025[] = {
- { -0.0000000000000000, -0.69999999999999996, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17426474153983226, -0.69999999999999996, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34706817945773732, -0.69999999999999996, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.51760452851738159, -0.69999999999999996, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.68605801534722766, -0.69999999999999996, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.85351339387296532, -0.69999999999999996, 0.40000000000000002,
- 0.87266462599716477 },
- { 1.0215297967969537, -0.69999999999999996, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.1915051074460528, -0.69999999999999996, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.3639821911744707, -0.69999999999999996, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.5382162002954762, -0.69999999999999996, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.69999999999999996, nu=0.40000000000000002.
-template <typename Tp>
-void test025()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data025)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data025[i].k), Tp(data025[i].nu),
- Tp(data025[i].phi));
- const Tp f0 = data025[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 6.5578567644745380e-16
+// mean(f - f_Boost): 1.4710455076283324e-16
+// variance(f - f_Boost): 2.6715739327327140e-33
+// stddev(f - f_Boost): 5.1687270509601433e-17
+const testcase_ellint_3<double>
+data025[10] =
+{
+ { 0.0000000000000000, -0.69999999999999996, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17568027871494424, -0.69999999999999996, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35834559208180261, -0.69999999999999996, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.55545885451190613, -0.69999999999999996, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.77528120402568101, -0.69999999999999996, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 1.0267241287600319, -0.69999999999999996, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.3181380338980246, -0.69999999999999996, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.6542840785132085, -0.69999999999999996, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 2.0315595131131818, -0.69999999999999996, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.4342502915307875, -0.69999999999999996, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler025 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.50000000000000000.
-testcase_ellint_3<double> data026[] = {
- { -0.0000000000000000, -0.69999999999999996, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17409065729516093, -0.69999999999999996, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34574489064986091, -0.69999999999999996, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.51347361925579793, -0.69999999999999996, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.67717079489579290, -0.69999999999999996, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.83793902055292280, -0.69999999999999996, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.99752863545289705, -0.69999999999999996, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.1576240080401499, -0.69999999999999996, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.3191464023923762, -0.69999999999999996, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.4818433192178544, -0.69999999999999996, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.69999999999999996, nu=0.50000000000000000.
-template <typename Tp>
-void test026()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data026)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data026[i].k), Tp(data026[i].nu),
- Tp(data026[i].phi));
- const Tp f0 = data026[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.69999999999999996, nu=0.59999999999999998.
-testcase_ellint_3<double> data027[] = {
- { -0.0000000000000000, -0.69999999999999996, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17391719464391611, -0.69999999999999996, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34443927423869031, -0.69999999999999996, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.50945473266486074, -0.69999999999999996, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.66866056326513823, -0.69999999999999996, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.82325830002337352, -0.69999999999999996, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.97522808245669357, -0.69999999999999996, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.1265300613705282, -0.69999999999999996, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.2784066076152003, -0.69999999999999996, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.4309994736080540, -0.69999999999999996, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.69999999999999996, nu=0.59999999999999998.
-template <typename Tp>
-void test027()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data027)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data027[i].k), Tp(data027[i].nu),
- Tp(data027[i].phi));
- const Tp f0 = data027[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.69999999999999996, nu=0.69999999999999996.
-testcase_ellint_3<double> data028[] = {
- { -0.0000000000000000, -0.69999999999999996, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17374434963995028, -0.69999999999999996, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34315091562900674, -0.69999999999999996, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.50554262375653358, -0.69999999999999996, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.66050025406305812, -0.69999999999999996, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.80938620118847404, -0.69999999999999996, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.95443223855852144, -0.69999999999999996, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0978573207128302, -0.69999999999999996, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.2411754575007123, -0.69999999999999996, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.3848459188329196, -0.69999999999999996, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.69999999999999996, nu=0.69999999999999996.
-template <typename Tp>
-void test028()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data028)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data028[i].k), Tp(data028[i].nu),
- Tp(data028[i].phi));
- const Tp f0 = data028[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 6.0416041815443256e-16
+// mean(f - f_Boost): 1.9151347174783951e-16
+// variance(f - f_Boost): 7.8758646268991113e-33
+// stddev(f - f_Boost): 8.8746068233466605e-17
+const testcase_ellint_3<double>
+data026[10] =
+{
+ { 0.0000000000000000, -0.69999999999999996, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17586014108156545, -0.69999999999999996, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35984923894341653, -0.69999999999999996, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.56091135606739995, -0.69999999999999996, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.78951212635197054, -0.69999999999999996, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0578865732938729, -0.69999999999999996, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.3789149005151722, -0.69999999999999996, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.7620212286086225, -0.69999999999999996, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 2.2051554347435585, -0.69999999999999996, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.6868019968236991, -0.69999999999999996, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler026 = 2.5000000000000020e-13;
+
+// Test data for k=-0.69999999999999996, nu=0.60000000000000009.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.6515644573247170e-16
+// mean(f - f_Boost): 9.9920072216264091e-17
+// variance(f - f_Boost): 1.2325951644078310e-33
+// stddev(f - f_Boost): 3.5108334685767011e-17
+const testcase_ellint_3<double>
+data027[10] =
+{
+ { 0.0000000000000000, -0.69999999999999996, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17604066659721918, -0.69999999999999996, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.36137563278353424, -0.69999999999999996, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.56655721272747606, -0.69999999999999996, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.80468966552978305, -0.69999999999999996, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0924902943683852, -0.69999999999999996, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.4499247992499797, -0.69999999999999996, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.8953714382113815, -0.69999999999999996, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.4323229949248670, -0.69999999999999996, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 3.0314573496746742, -0.69999999999999996, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler027 = 2.5000000000000020e-13;
+
+// Test data for k=-0.69999999999999996, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.8475278552871384e-16
+// mean(f - f_Boost): 9.9920072216264091e-17
+// variance(f - f_Boost): 1.2325951644078310e-33
+// stddev(f - f_Boost): 3.5108334685767011e-17
+const testcase_ellint_3<double>
+data028[10] =
+{
+ { 0.0000000000000000, -0.69999999999999996, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17622185963747933, -0.69999999999999996, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36292539360435261, -0.69999999999999996, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.57240892970150015, -0.69999999999999996, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.82093084713182629, -0.69999999999999996, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.1312609022179871, -0.69999999999999996, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.5345768067715795, -0.69999999999999996, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 2.0668847445934420, -0.69999999999999996, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.7483444537551240, -0.69999999999999996, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 3.5408408771788560, -0.69999999999999996, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler028 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.80000000000000004.
-testcase_ellint_3<double> data029[] = {
- { -0.0000000000000000, -0.69999999999999996, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17357211837335737, -0.69999999999999996, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.34187941416012108, -0.69999999999999996, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.50173239465478270, -0.69999999999999996, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.65266550725988315, -0.69999999999999996, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.79624879865249298, -0.69999999999999996, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.93497577043296920, -0.69999999999999996, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.0713041566930748, -0.69999999999999996, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.2069772023255652, -0.69999999999999996, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.3427110650397533, -0.69999999999999996, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.69999999999999996, nu=0.80000000000000004.
-template <typename Tp>
-void test029()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data029)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data029[i].k), Tp(data029[i].nu),
- Tp(data029[i].phi));
- const Tp f0 = data029[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 6.8664526853112274e-16
+// mean(f - f_Boost): 1.6930901125533636e-16
+// variance(f - f_Boost): 3.5389557150937801e-33
+// stddev(f - f_Boost): 5.9489122661994095e-17
+const testcase_ellint_3<double>
+data029[10] =
+{
+ { 0.0000000000000000, -0.69999999999999996, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17640372461994805, -0.69999999999999996, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36449916621651091, -0.69999999999999996, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.57848021800372573, -0.69999999999999996, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.83837480968392586, -0.69999999999999996, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1751669030061143, -0.69999999999999996, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.6381851899173601, -0.69999999999999996, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.3002065924302197, -0.69999999999999996, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 3.2337600665337862, -0.69999999999999996, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 4.4042405729076961, -0.69999999999999996, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler029 = 2.5000000000000020e-13;
// Test data for k=-0.69999999999999996, nu=0.90000000000000002.
-testcase_ellint_3<double> data030[] = {
- { -0.0000000000000000, -0.69999999999999996, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17340049697003634, -0.69999999999999996, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.34062438249741556, -0.69999999999999996, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.49801946510076878, -0.69999999999999996, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.64513432604750487, -0.69999999999999996, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.78378145487573758, -0.69999999999999996, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.91671799500854634, -0.69999999999999996, 0.90000000000000002,
- 1.0471975511965976 },
- { 1.0466193579463123, -0.69999999999999996, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.1754218079199146, -0.69999999999999996, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.3040500499695911, -0.69999999999999996, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.69999999999999996, nu=0.90000000000000002.
-template <typename Tp>
-void test030()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data030)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data030[i].k), Tp(data030[i].nu),
- Tp(data030[i].phi));
- const Tp f0 = data030[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 3.5527136788005009e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 8.5869439826269878e-16
+// mean(f - f_Boost): 6.7723604502134545e-16
+// variance(f - f_Boost): 4.8757508225668289e-31
+// stddev(f - f_Boost): 6.9826576763914390e-16
+const testcase_ellint_3<double>
+data030[10] =
+{
+ { 0.0000000000000000, -0.69999999999999996, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17658626600478800, -0.69999999999999996, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36609762156017206, -0.69999999999999996, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.58478615187842409, -0.69999999999999996, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.85718862878291846, -0.69999999999999996, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.2255385617397643, -0.69999999999999996, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.7696521899992939, -0.69999999999999996, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.6476314987883502, -0.69999999999999996, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 4.1373434902898083, -0.69999999999999996, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 6.3796094177887746, -0.69999999999999996, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler030 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.0000000000000000.
-testcase_ellint_3<double> data031[] = {
- { -0.0000000000000000, -0.59999999999999998, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17485154362988362, -0.59999999999999998, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35160509865544326, -0.59999999999999998, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.53210652578446160, -0.59999999999999998, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.71805304664485670, -0.59999999999999998, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.91082759030195970, -0.59999999999999998, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.1112333229323361, -0.59999999999999998, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.3191461190365270, -0.59999999999999998, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.5332022105084773, -0.59999999999999998, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.7507538029157526, -0.59999999999999998, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.59999999999999998, nu=0.0000000000000000.
-template <typename Tp>
-void test031()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data031)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data031[i].k), Tp(data031[i].nu),
- Tp(data031[i].phi));
- const Tp f0 = data031[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.3664899092028927e-16
+// mean(f - f_Boost): 5.2735593669694933e-17
+// variance(f - f_Boost): 3.4333862218458872e-34
+// stddev(f - f_Boost): 1.8529398861932589e-17
+const testcase_ellint_3<double>
+data031[10] =
+{
+ { 0.0000000000000000, -0.59999999999999998, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17485154362988359, -0.59999999999999998, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35160509865544320, -0.59999999999999998, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.53210652578446138, -0.59999999999999998, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.71805304664485659, -0.59999999999999998, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.91082759030195981, -0.59999999999999998, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.1112333229323361, -0.59999999999999998, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.3191461190365270, -0.59999999999999998, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.5332022105084779, -0.59999999999999998, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.7507538029157523, -0.59999999999999998, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler031 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.10000000000000001.
-testcase_ellint_3<double> data032[] = {
- { -0.0000000000000000, -0.59999999999999998, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17467514275022014, -0.59999999999999998, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.35021333086258255, -0.59999999999999998, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.52751664092962713, -0.59999999999999998, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.70752126971957885, -0.59999999999999998, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.89111058756112871, -0.59999999999999998, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0789241202877768, -0.59999999999999998, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.2710800210399946, -0.59999999999999998, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.4669060574440276, -0.59999999999999998, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.6648615773343014, -0.59999999999999998, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.59999999999999998, nu=0.10000000000000001.
-template <typename Tp>
-void test032()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data032)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data032[i].k), Tp(data032[i].nu),
- Tp(data032[i].phi));
- const Tp f0 = data032[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.2335247010355137e-16
+// mean(f - f_Boost): 8.6042284408449634e-17
+// variance(f - f_Boost): 2.2835347143080263e-33
+// stddev(f - f_Boost): 4.7786344433405099e-17
+const testcase_ellint_3<double>
+data032[10] =
+{
+ { 0.0000000000000000, -0.59999999999999998, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17502858548476194, -0.59999999999999998, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35301673150537388, -0.59999999999999998, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.53683932476326812, -0.59999999999999998, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.72914228589586771, -0.59999999999999998, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.93208036718354692, -0.59999999999999998, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.1468984688863377, -0.59999999999999998, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.3733904977062528, -0.59999999999999998, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.6094225663372157, -0.59999999999999998, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.8508766487100685, -0.59999999999999998, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler032 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.20000000000000001.
-testcase_ellint_3<double> data033[] = {
- { -0.0000000000000000, -0.59999999999999998, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17449937871800653, -0.59999999999999998, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34884093647346553, -0.59999999999999998, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.52306221119844110, -0.59999999999999998, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.69749955678982223, -0.59999999999999998, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.87274610682416853, -0.59999999999999998, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.0494620540750792, -0.59999999999999998, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.2280847305507339, -0.59999999999999998, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.4085436279696886, -0.59999999999999998, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.5901418016279374, -0.59999999999999998, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.59999999999999998, nu=0.20000000000000001.
-template <typename Tp>
-void test033()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data033)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data033[i].k), Tp(data033[i].nu),
- Tp(data033[i].phi));
- const Tp f0 = data033[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.59999999999999998, nu=0.29999999999999999.
-testcase_ellint_3<double> data034[] = {
- { -0.0000000000000000, -0.59999999999999998, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17432424744393935, -0.59999999999999998, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34748744127146447, -0.59999999999999998, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51873632743924847, -0.59999999999999998, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.68794610396313127, -0.59999999999999998, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.85558070175468726, -0.59999999999999998, 0.29999999999999999,
- 0.87266462599716477 },
- { 1.0224416343605653, -0.59999999999999998, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1893144457936788, -0.59999999999999998, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.3566435377982575, -0.59999999999999998, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.5243814243493585, -0.59999999999999998, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.59999999999999998, nu=0.29999999999999999.
-template <typename Tp>
-void test034()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data034)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data034[i].k), Tp(data034[i].nu),
- Tp(data034[i].phi));
- const Tp f0 = data034[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.0940560416437693e-16
+// mean(f - f_Boost): 4.1633363423443370e-17
+// variance(f - f_Boost): 8.5834655546147173e-33
+// stddev(f - f_Boost): 9.2646994309662939e-17
+const testcase_ellint_3<double>
+data033[10] =
+{
+ { 0.0000000000000000, -0.59999999999999998, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17520627248155893, -0.59999999999999998, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35444873935437748, -0.59999999999999998, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.54172310557682524, -0.59999999999999998, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.74084300280734672, -0.59999999999999998, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.95509001527006121, -0.59999999999999998, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1865688084431796, -0.59999999999999998, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.4352978868932598, -0.59999999999999998, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.6983400371331816, -0.59999999999999998, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.9695980282802215, -0.59999999999999998, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler033 = 2.5000000000000020e-13;
+
+// Test data for k=-0.59999999999999998, nu=0.30000000000000004.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.9470074709717020e-16
+// mean(f - f_Boost): 7.4940054162198071e-17
+// variance(f - f_Boost): 1.6823592487044846e-32
+// stddev(f - f_Boost): 1.2970579203352812e-16
+const testcase_ellint_3<double>
+data034[10] =
+{
+ { 0.0000000000000000, -0.59999999999999998, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17538460882640122, -0.59999999999999998, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35590165133735557, -0.59999999999999998, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.54676661152254535, -0.59999999999999998, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.75321709418305305, -0.59999999999999998, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.98012637808992920, -0.59999999999999998, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.2310891277158875, -0.59999999999999998, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.5069157924585623, -0.59999999999999998, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.8039583598337940, -0.59999999999999998, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 2.1134154405060599, -0.59999999999999998, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler034 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.40000000000000002.
-testcase_ellint_3<double> data035[] = {
- { -0.0000000000000000, -0.59999999999999998, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17414974487670720, -0.59999999999999998, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34615238767335027, -0.59999999999999998, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.51453257838108579, -0.59999999999999998, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.67882386787534410, -0.59999999999999998, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.83948470233173578, -0.59999999999999998, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.99753496200073977, -0.59999999999999998, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.1541101404388487, -0.59999999999999998, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.3100911323398814, -0.59999999999999998, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.4659345278069984, -0.59999999999999998, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.59999999999999998, nu=0.40000000000000002.
-template <typename Tp>
-void test035()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data035)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data035[i].k), Tp(data035[i].nu),
- Tp(data035[i].phi));
- const Tp f0 = data035[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.7909659715991921e-16
+// mean(f - f_Boost): -2.7755575615628915e-18
+// variance(f - f_Boost): 2.4044165394594425e-32
+// stddev(f - f_Boost): 1.5506181152880429e-16
+const testcase_ellint_3<double>
+data035[10] =
+{
+ { 0.0000000000000000, -0.59999999999999998, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17556359876533037, -0.59999999999999998, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35737601674244679, -0.59999999999999998, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.55197933771320218, -0.59999999999999998, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.76633591620002894, -0.59999999999999998, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 1.0075231136019616, -0.59999999999999998, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2815842073813450, -0.59999999999999998, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.5911666941449827, -0.59999999999999998, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.9323227566025762, -0.59999999999999998, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.2925036420985130, -0.59999999999999998, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler035 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.50000000000000000.
-testcase_ellint_3<double> data036[] = {
- { -0.0000000000000000, -0.59999999999999998, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17397586700252810, -0.59999999999999998, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34483533397138516, -0.59999999999999998, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.51044500461706499, -0.59999999999999998, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.67009988034712675, -0.59999999999999998, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.82434762375735193, -0.59999999999999998, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.97447346702798998, -0.59999999999999998, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.1219494000522143, -0.59999999999999998, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.2680242605954486, -0.59999999999999998, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.4135484285693078, -0.59999999999999998, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.59999999999999998, nu=0.50000000000000000.
-template <typename Tp>
-void test036()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data036)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data036[i].k), Tp(data036[i].nu),
- Tp(data036[i].phi));
- const Tp f0 = data036[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.59999999999999998, nu=0.59999999999999998.
-testcase_ellint_3<double> data037[] = {
- { -0.0000000000000000, -0.59999999999999998, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17380260984469356, -0.59999999999999998, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34353585361777839, -0.59999999999999998, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.50646805774321402, -0.59999999999999998, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.66174468108625517, -0.59999999999999998, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.81007462280278408, -0.59999999999999998, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.95303466945718729, -0.59999999999999998, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0924118588677503, -0.59999999999999998, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.2297640574847937, -0.59999999999999998, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.3662507535812816, -0.59999999999999998, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.59999999999999998, nu=0.59999999999999998.
-template <typename Tp>
-void test037()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data037)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data037[i].k), Tp(data037[i].nu),
- Tp(data037[i].phi));
- const Tp f0 = data037[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.59999999999999998, nu=0.69999999999999996.
-testcase_ellint_3<double> data038[] = {
- { -0.0000000000000000, -0.59999999999999998, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17362996946312009, -0.59999999999999998, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34225353454870588, -0.59999999999999998, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.50259656397799546, -0.59999999999999998, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.65373184496628944, -0.59999999999999998, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.79658372884056439, -0.59999999999999998, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.93303240100245421, -0.59999999999999998, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0651547944716557, -0.59999999999999998, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1947676204853441, -0.59999999999999998, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.3232737468822811, -0.59999999999999998, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.59999999999999998, nu=0.69999999999999996.
-template <typename Tp>
-void test038()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data038)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data038[i].k), Tp(data038[i].nu),
- Tp(data038[i].phi));
- const Tp f0 = data038[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.6240126899196213e-16
+// mean(f - f_Boost): 9.1593399531575410e-17
+// variance(f - f_Boost): 1.0357223256482469e-33
+// stddev(f - f_Boost): 3.2182640128619758e-17
+const testcase_ellint_3<double>
+data036[10] =
+{
+ { 0.0000000000000000, -0.59999999999999998, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17574324658480217, -0.59999999999999998, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35887240603169313, -0.59999999999999998, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.55737161826345261, -0.59999999999999998, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.78028227313077458, -0.59999999999999998, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0376989776486290, -0.59999999999999998, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.3395933991042925, -0.59999999999999998, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.6924049626591782, -0.59999999999999998, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 2.0931011856518920, -0.59999999999999998, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.5239007084492706, -0.59999999999999998, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler036 = 2.5000000000000020e-13;
+
+// Test data for k=-0.59999999999999998, nu=0.60000000000000009.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.6651378277398083e-16
+// mean(f - f_Boost): 1.1934897514720432e-16
+// variance(f - f_Boost): 1.7585404776158019e-33
+// stddev(f - f_Boost): 4.1934955319110598e-17
+const testcase_ellint_3<double>
+data037[10] =
+{
+ { 0.0000000000000000, -0.59999999999999998, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17592355661219386, -0.59999999999999998, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.36039141192661606, -0.59999999999999998, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.56295472636903854, -0.59999999999999998, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.79515295130165986, -0.59999999999999998, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0711886441942242, -0.59999999999999998, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.4072952835139891, -0.59999999999999998, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.8174863977376825, -0.59999999999999998, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.3029921578542232, -0.59999999999999998, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.8388723099514972, -0.59999999999999998, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler037 = 2.5000000000000020e-13;
+
+// Test data for k=-0.59999999999999998, nu=0.70000000000000007.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.2451074234797436e-16
+// mean(f - f_Boost): 5.2735593669694933e-17
+// variance(f - f_Boost): 3.4333862218458872e-34
+// stddev(f - f_Boost): 1.8529398861932589e-17
+const testcase_ellint_3<double>
+data038[10] =
+{
+ { 0.0000000000000000, -0.59999999999999998, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17610453321631936, -0.59999999999999998, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36193365056369764, -0.59999999999999998, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.56874098962268527, -0.59999999999999998, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.81106198671477181, -0.59999999999999998, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.1086886419010082, -0.59999999999999998, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.4879048567239257, -0.59999999999999998, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.9780310073615923, -0.59999999999999998, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.5941545586772712, -0.59999999999999998, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 3.3029735898397155, -0.59999999999999998, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler038 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.80000000000000004.
-testcase_ellint_3<double> data039[] = {
- { -0.0000000000000000, -0.59999999999999998, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17345794195390687, -0.59999999999999998, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.34098797854531027, -0.59999999999999998, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49882569168826230, -0.59999999999999998, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.64603758566475511, -0.59999999999999998, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.78380365594769730, -0.59999999999999998, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.91430946255611190, -0.59999999999999998, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.0398955217270607, -0.59999999999999998, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.1625948314277676, -0.59999999999999998, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.2840021261752192, -0.59999999999999998, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.59999999999999998, nu=0.80000000000000004.
-template <typename Tp>
-void test039()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data039)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data039[i].k), Tp(data039[i].nu),
- Tp(data039[i].phi));
- const Tp f0 = data039[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.3826960061025914e-16
+// mean(f - f_Boost): 2.7478019859472625e-16
+// variance(f - f_Boost): 4.6451528105588637e-32
+// stddev(f - f_Boost): 2.1552616570984749e-16
+const testcase_ellint_3<double>
+data039[10] =
+{
+ { 0.0000000000000000, -0.59999999999999998, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17628618080795252, -0.59999999999999998, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36349976272521012, -0.59999999999999998, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.57474392342151914, -0.59999999999999998, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.82814493499158159, -0.59999999999999998, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1511281795998280, -0.59999999999999998, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.5864286332503075, -0.59999999999999998, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.1958944866494527, -0.59999999999999998, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 3.0398358172574604, -0.59999999999999998, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 4.0867036409261832, -0.59999999999999998, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler039 = 2.5000000000000020e-13;
// Test data for k=-0.59999999999999998, nu=0.90000000000000002.
-testcase_ellint_3<double> data040[] = {
- { -0.0000000000000000, -0.59999999999999998, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17328652344890033, -0.59999999999999998, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33973880062929018, -0.59999999999999998, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.49515092233122765, -0.59999999999999998, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.63864042139737043, -0.59999999999999998, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.77167205646538850, -0.59999999999999998, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.89673202848034383, -0.59999999999999998, 0.90000000000000002,
- 1.0471975511965976 },
- { 1.0163984492661304, -0.59999999999999998, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.1328845785162431, -0.59999999999999998, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.2479362973851875, -0.59999999999999998, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.59999999999999998, nu=0.90000000000000002.
-template <typename Tp>
-void test040()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data040)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data040[i].k), Tp(data040[i].nu),
- Tp(data040[i].phi));
- const Tp f0 = data040[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.7440178400898422e-16
+// mean(f - f_Boost): 5.0792703376600914e-16
+// variance(f - f_Boost): 1.9863137923719990e-31
+// stddev(f - f_Boost): 4.4568080420543122e-16
+const testcase_ellint_3<double>
+data040[10] =
+{
+ { 0.0000000000000000, -0.59999999999999998, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17646850384035848, -0.59999999999999998, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36509041515134105, -0.59999999999999998, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.58097838596260631, -0.59999999999999998, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.84656453396163722, -0.59999999999999998, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1997828426963724, -0.59999999999999998, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.7112436789225605, -0.59999999999999998, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.5193168553672312, -0.59999999999999998, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.8656670488606686, -0.59999999999999998, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 5.8709993116265595, -0.59999999999999998, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler040 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.0000000000000000.
-testcase_ellint_3<double> data041[] = {
- { -0.0000000000000000, -0.50000000000000000, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17475385514035785, -0.50000000000000000, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35081868470101585, -0.50000000000000000, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52942862705190585, -0.50000000000000000, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.71164727562630326, -0.50000000000000000, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.89824523594227768, -0.50000000000000000, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0895506700518851, -0.50000000000000000, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2853005857432933, -0.50000000000000000, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.4845545520549484, -0.50000000000000000, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.6857503548125963, -0.50000000000000000, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.50000000000000000, nu=0.0000000000000000.
-template <typename Tp>
-void test041()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data041)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data041[i].k), Tp(data041[i].nu),
- Tp(data041[i].phi));
- const Tp f0 = data041[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.4551389361831220e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 2.5893058141206173e-32
+// stddev(f - f_Boost): 1.6091320064309879e-16
+const testcase_ellint_3<double>
+data041[10] =
+{
+ { 0.0000000000000000, -0.50000000000000000, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17475385514035785, -0.50000000000000000, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35081868470101579, -0.50000000000000000, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52942862705190574, -0.50000000000000000, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.71164727562630326, -0.50000000000000000, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.89824523594227768, -0.50000000000000000, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0895506700518853, -0.50000000000000000, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2853005857432933, -0.50000000000000000, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.4845545520549488, -0.50000000000000000, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.6857503548125961, -0.50000000000000000, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler041 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.10000000000000001.
-testcase_ellint_3<double> data042[] = {
- { -0.0000000000000000, -0.50000000000000000, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17457763120814676, -0.50000000000000000, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34943246340849154, -0.50000000000000000, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.52487937869610801, -0.50000000000000000, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.70127785096388395, -0.50000000000000000, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.87898815988624479, -0.50000000000000000, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0582764576094172, -0.50000000000000000, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.2391936844060207, -0.50000000000000000, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.4214793542995841, -0.50000000000000000, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.6045524936084892, -0.50000000000000000, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.50000000000000000, nu=0.10000000000000001.
-template <typename Tp>
-void test042()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data042)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data042[i].k), Tp(data042[i].nu),
- Tp(data042[i].phi));
- const Tp f0 = data042[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.7416868347177582e-16
+// mean(f - f_Boost): 2.7755575615628915e-18
+// variance(f - f_Boost): 5.4326441655972001e-32
+// stddev(f - f_Boost): 2.3308033305273100e-16
+const testcase_ellint_3<double>
+data042[10] =
+{
+ { 0.0000000000000000, -0.50000000000000000, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17493071928248824, -0.50000000000000000, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35222467688034798, -0.50000000000000000, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.53411928652008112, -0.50000000000000000, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.72256398117177589, -0.50000000000000000, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.91899583232771009, -0.50000000000000000, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.1240549163055360, -0.50000000000000000, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.3372938086286021, -0.50000000000000000, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.5570024469132429, -0.50000000000000000, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.7803034946545480, -0.50000000000000000, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler042 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.20000000000000001.
-testcase_ellint_3<double> data043[] = {
- { -0.0000000000000000, -0.50000000000000000, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17440204336345433, -0.50000000000000000, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34806552388338824, -0.50000000000000000, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.52046416757129821, -0.50000000000000000, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.69140924550993876, -0.50000000000000000, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.86104678636125520, -0.50000000000000000, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.0297439459053981, -0.50000000000000000, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1979214112912036, -0.50000000000000000, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.3659033858648930, -0.50000000000000000, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.5338490483665983, -0.50000000000000000, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.50000000000000000, nu=0.20000000000000001.
-template <typename Tp>
-void test043()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data043)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data043[i].k), Tp(data043[i].nu),
- Tp(data043[i].phi));
- const Tp f0 = data043[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.50000000000000000, nu=0.29999999999999999.
-testcase_ellint_3<double> data044[] = {
- { -0.0000000000000000, -0.50000000000000000, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17422708752228896, -0.50000000000000000, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34671739434855858, -0.50000000000000000, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51617616305641889, -0.50000000000000000, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.68200047612545178, -0.50000000000000000, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.84427217869498372, -0.50000000000000000, 0.29999999999999999,
- 0.87266462599716477 },
- { 1.0035637821389782, -0.50000000000000000, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1606800483933113, -0.50000000000000000, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.3164407134643459, -0.50000000000000000, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.4715681939859637, -0.50000000000000000, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.50000000000000000, nu=0.29999999999999999.
-template <typename Tp>
-void test044()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data044)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data044[i].k), Tp(data044[i].nu),
- Tp(data044[i].phi));
- const Tp f0 = data044[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1198767993730867e-16
+// mean(f - f_Boost): 2.7755575615628914e-17
+// variance(f - f_Boost): 5.0311947683004831e-32
+// stddev(f - f_Boost): 2.2430324938128922e-16
+const testcase_ellint_3<double>
+data043[10] =
+{
+ { 0.0000000000000000, -0.50000000000000000, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17510822779582402, -0.50000000000000000, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35365094725531487, -0.50000000000000000, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53895933237328697, -0.50000000000000000, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.73408090840070794, -0.50000000000000000, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.94145442818535396, -0.50000000000000000, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1624120186296487, -0.50000000000000000, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3965823372867114, -0.50000000000000000, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.6414308440430099, -0.50000000000000000, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.8922947612264018, -0.50000000000000000, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler043 = 2.5000000000000020e-13;
+
+// Test data for k=-0.50000000000000000, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.3800262770228813e-16
+// mean(f - f_Boost): 5.8286708792820721e-17
+// variance(f - f_Boost): 8.5027191584278157e-32
+// stddev(f - f_Boost): 2.9159422419567599e-16
+const testcase_ellint_3<double>
+data044[10] =
+{
+ { 0.0000000000000000, -0.50000000000000000, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17528638488102041, -0.50000000000000000, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35509802222332720, -0.50000000000000000, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.54395740731866193, -0.50000000000000000, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.74625871438752667, -0.50000000000000000, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.96588271186092023, -0.50000000000000000, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.2054319584357329, -0.50000000000000000, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.4651077994832871, -0.50000000000000000, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.7416018368052644, -0.50000000000000000, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 2.0277924458111314, -0.50000000000000000, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler044 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.40000000000000002.
-testcase_ellint_3<double> data045[] = {
- { -0.0000000000000000, -0.50000000000000000, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17405275963859917, -0.50000000000000000, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34538761957029329, -0.50000000000000000, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.51200902646603919, -0.50000000000000000, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.67301522212868792, -0.50000000000000000, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.82853844466313320, -0.50000000000000000, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.97942097862681488, -0.50000000000000000, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.1268429801220616, -0.50000000000000000, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2720406704533922, -0.50000000000000000, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.4161679518465340, -0.50000000000000000, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.50000000000000000, nu=0.40000000000000002.
-template <typename Tp>
-void test045()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data045)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data045[i].k), Tp(data045[i].nu),
- Tp(data045[i].phi));
- const Tp f0 = data045[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.0439932918341581e-16
+// mean(f - f_Boost): 3.0531133177191807e-17
+// variance(f - f_Boost): 9.0809736800018602e-32
+// stddev(f - f_Boost): 3.0134653938616686e-16
+const testcase_ellint_3<double>
+data045[10] =
+{
+ { 0.0000000000000000, -0.50000000000000000, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17546519477859268, -0.50000000000000000, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35656644822531680, -0.50000000000000000, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54912289677411319, -0.50000000000000000, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.75916731611690047, -0.50000000000000000, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.99260415631328214, -0.50000000000000000, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2541925856918670, -0.50000000000000000, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.5456393705347609, -0.50000000000000000, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.8631904972952076, -0.50000000000000000, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.1962905366178065, -0.50000000000000000, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler045 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.50000000000000000.
-testcase_ellint_3<double> data046[] = {
- { -0.0000000000000000, -0.50000000000000000, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17387905570381157, -0.50000000000000000, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34407576010465207, -0.50000000000000000, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50795686560160835, -0.50000000000000000, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.66442115453330175, -0.50000000000000000, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.81373829119355345, -0.50000000000000000, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.95705743313235825, -0.50000000000000000, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0959131991362556, -0.50000000000000000, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.2318900529754597, -0.50000000000000000, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.3664739530045971, -0.50000000000000000, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.50000000000000000, nu=0.50000000000000000.
-template <typename Tp>
-void test046()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data046)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data046[i].k), Tp(data046[i].nu),
- Tp(data046[i].phi));
- const Tp f0 = data046[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.50000000000000000, nu=0.59999999999999998.
-testcase_ellint_3<double> data047[] = {
- { -0.0000000000000000, -0.50000000000000000, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17370597174637581, -0.50000000000000000, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34278139158591414, -0.50000000000000000, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.50401419439302719, -0.50000000000000000, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.65618938076167221, -0.50000000000000000, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.79977959248855424, -0.50000000000000000, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.93625925190753545, -0.50000000000000000, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0674905658379710, -0.50000000000000000, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1953481298023048, -0.50000000000000000, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.3215740290190876, -0.50000000000000000, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.50000000000000000, nu=0.59999999999999998.
-template <typename Tp>
-void test047()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data047)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data047[i].k), Tp(data047[i].nu),
- Tp(data047[i].phi));
- const Tp f0 = data047[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.50000000000000000, nu=0.69999999999999996.
-testcase_ellint_3<double> data048[] = {
- { -0.0000000000000000, -0.50000000000000000, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17353350383131641, -0.50000000000000000, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34150410405436771, -0.50000000000000000, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.50017589696443487, -0.50000000000000000, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.64829398188419962, -0.50000000000000000, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.78658270782402073, -0.50000000000000000, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.91684738336675053, -0.50000000000000000, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0412486789555937, -0.50000000000000000, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1619021847612001, -0.50000000000000000, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2807475181182502, -0.50000000000000000, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.50000000000000000, nu=0.69999999999999996.
-template <typename Tp>
-void test048()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data048)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data048[i].k), Tp(data048[i].nu),
- Tp(data048[i].phi));
- const Tp f0 = data048[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.6797816859260978e-16
+// mean(f - f_Boost): 9.4368957093138303e-17
+// variance(f - f_Boost): 7.7794254682023874e-32
+// stddev(f - f_Boost): 2.7891621444803792e-16
+const testcase_ellint_3<double>
+data046[10] =
+{
+ { 0.0000000000000000, -0.50000000000000000, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17564466176941509, -0.50000000000000000, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35805679276065394, -0.50000000000000000, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.55446601496200032, -0.50000000000000000, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.77288783578259013, -0.50000000000000000, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0220246013918972, -0.50000000000000000, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.3101681612463965, -0.50000000000000000, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.6422994881851025, -0.50000000000000000, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 2.0152636030998816, -0.50000000000000000, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.4136715042011945, -0.50000000000000000, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler046 = 2.5000000000000020e-13;
+
+// Test data for k=-0.50000000000000000, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.9178421578645735e-16
+// mean(f - f_Boost): 1.3322676295501878e-16
+// variance(f - f_Boost): 1.7749370367472766e-31
+// stddev(f - f_Boost): 4.2130001622920411e-16
+const testcase_ellint_3<double>
+data047[10] =
+{
+ { 0.0000000000000000, -0.50000000000000000, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17582479017522740, -0.50000000000000000, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35956964546660036, -0.50000000000000000, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55999790372984193, -0.50000000000000000, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.78751507911209895, -0.50000000000000000, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0546620505035220, -0.50000000000000000, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3754438357425935, -0.50000000000000000, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.7615727400820127, -0.50000000000000000, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.2134638067565242, -0.50000000000000000, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.7090491861753558, -0.50000000000000000, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler047 = 2.5000000000000020e-13;
+
+// Test data for k=-0.50000000000000000, nu=0.70000000000000007.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.0745105182189226e-16
+// mean(f - f_Boost): 4.1633363423443370e-17
+// variance(f - f_Boost): 1.9996383743576116e-32
+// stddev(f - f_Boost): 1.4140857026211713e-16
+const testcase_ellint_3<double>
+data048[10] =
+{
+ { 0.0000000000000000, -0.50000000000000000, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17600558435914915, -0.50000000000000000, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36110561926726259, -0.50000000000000000, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.56573074641137111, -0.50000000000000000, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.80316073084237205, -0.50000000000000000, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0911910688131461, -0.50000000000000000, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.4530946406380640, -0.50000000000000000, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.9144386536785372, -0.50000000000000000, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.4878788958234970, -0.50000000000000000, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 3.1433945297859225, -0.50000000000000000, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler048 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.80000000000000004.
-testcase_ellint_3<double> data049[] = {
- { -0.0000000000000000, -0.50000000000000000, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17336164805979126, -0.50000000000000000, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.34024350132086773, -0.50000000000000000, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49643719555734084, -0.50000000000000000, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.64071162456976150, -0.50000000000000000, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.77407836177211908, -0.50000000000000000, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.89867058251905652, -0.50000000000000000, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.0169181822134912, -0.50000000000000000, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.1311363312779448, -0.50000000000000000, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.2434165408189539, -0.50000000000000000, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.50000000000000000, nu=0.80000000000000004.
-template <typename Tp>
-void test049()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data049)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data049[i].k), Tp(data049[i].nu),
- Tp(data049[i].phi));
- const Tp f0 = data049[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.4380477375534667e-16
+// mean(f - f_Boost): 2.3037127760972000e-16
+// variance(f - f_Boost): 1.4989821857033475e-31
+// stddev(f - f_Boost): 3.8716691306248618e-16
+const testcase_ellint_3<double>
+data049[10] =
+{
+ { 0.0000000000000000, -0.50000000000000000, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17618704872620228, -0.50000000000000000, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36266535159745827, -0.50000000000000000, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.57167789954529158, -0.50000000000000000, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.81995752984315018, -0.50000000000000000, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1325112162158122, -0.50000000000000000, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.5479055930718042, -0.50000000000000000, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.1215243941010486, -0.50000000000000000, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.9069405767650132, -0.50000000000000000, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.8750701888108066, -0.50000000000000000, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler049 = 2.5000000000000020e-13;
// Test data for k=-0.50000000000000000, nu=0.90000000000000002.
-testcase_ellint_3<double> data050[] = {
- { -0.0000000000000000, -0.50000000000000000, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17319040056865681, -0.50000000000000000, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33899920036578557, -0.50000000000000000, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.49279362182695186, -0.50000000000000000, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.63342123379746151, -0.50000000000000000, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.76220595179550321, -0.50000000000000000, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.88160004743532294, -0.50000000000000000, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.99427448642310134, -0.50000000000000000, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.1027091512470093, -0.50000000000000000, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.2091116095504744, -0.50000000000000000, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.50000000000000000, nu=0.90000000000000002.
-template <typename Tp>
-void test050()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data050)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data050[i].k), Tp(data050[i].nu),
- Tp(data050[i].phi));
- const Tp f0 = data050[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002, nu=0.0000000000000000.
-testcase_ellint_3<double> data051[] = {
- { -0.0000000000000000, -0.40000000000000002, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17467414669441531, -0.40000000000000002, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35018222772483443, -0.40000000000000002, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52729015917508748, -0.40000000000000002, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.70662374407341255, -0.40000000000000002, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.88859210497602170, -0.40000000000000002, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0733136290471379, -0.40000000000000002, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2605612170157061, -0.40000000000000002, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.4497513956433437, -0.40000000000000002, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.6399998658645112, -0.40000000000000002, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.40000000000000002, nu=0.0000000000000000.
-template <typename Tp>
-void test051()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data051)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data051[i].k), Tp(data051[i].nu),
- Tp(data051[i].phi));
- const Tp f0 = data051[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002, nu=0.10000000000000001.
-testcase_ellint_3<double> data052[] = {
- { -0.0000000000000000, -0.40000000000000002, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17449806706684673, -0.40000000000000002, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34880048623856075, -0.40000000000000002, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.52277322065757403, -0.40000000000000002, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.69638072056918376, -0.40000000000000002, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.86968426619831540, -0.40000000000000002, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0428044206578095, -0.40000000000000002, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.2158651158274378, -0.40000000000000002, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.3889447129893322, -0.40000000000000002, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.5620566886683604, -0.40000000000000002, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.40000000000000002, nu=0.10000000000000001.
-template <typename Tp>
-void test052()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data052)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data052[i].k), Tp(data052[i].nu),
- Tp(data052[i].phi));
- const Tp f0 = data052[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002, nu=0.20000000000000001.
-testcase_ellint_3<double> data053[] = {
- { -0.0000000000000000, -0.40000000000000002, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17432262290723399, -0.40000000000000002, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34743795258968596, -0.40000000000000002, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.51838919472805123, -0.40000000000000002, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.68663134739057918, -0.40000000000000002, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.85206432981833979, -0.40000000000000002, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.0149595349004430, -0.40000000000000002, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1758349405464676, -0.40000000000000002, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.3353337673882635, -0.40000000000000002, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.4941414344266770, -0.40000000000000002, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.40000000000000002, nu=0.20000000000000001.
-template <typename Tp>
-void test053()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data053)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data053[i].k), Tp(data053[i].nu),
- Tp(data053[i].phi));
- const Tp f0 = data053[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002, nu=0.29999999999999999.
-testcase_ellint_3<double> data054[] = {
- { -0.0000000000000000, -0.40000000000000002, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17414781013591543, -0.40000000000000002, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34609415696777285, -0.40000000000000002, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51413131295862546, -0.40000000000000002, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.67733527622935630, -0.40000000000000002, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.83558675182733266, -0.40000000000000002, 0.29999999999999999,
- 0.87266462599716477 },
- { 0.98940140808865906, -0.40000000000000002, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1396968797728058, -0.40000000000000002, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.2875920037865087, -0.40000000000000002, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.4342789859950078, -0.40000000000000002, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.40000000000000002, nu=0.29999999999999999.
-template <typename Tp>
-void test054()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data054)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data054[i].k), Tp(data054[i].nu),
- Tp(data054[i].phi));
- const Tp f0 = data054[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002, nu=0.40000000000000002.
-testcase_ellint_3<double> data055[] = {
- { -0.0000000000000000, -0.40000000000000002, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17397362471112710, -0.40000000000000002, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34476864603333196, -0.40000000000000002, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.50999329415379357, -0.40000000000000002, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.66845674551396017, -0.40000000000000002, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.82012848346231748, -0.40000000000000002, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.96582449258349057, -0.40000000000000002, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.1068473749476286, -0.40000000000000002, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2447132729159986, -0.40000000000000002, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.3809986210732901, -0.40000000000000002, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.40000000000000002, nu=0.40000000000000002.
-template <typename Tp>
-void test055()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data055)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data055[i].k), Tp(data055[i].nu),
- Tp(data055[i].phi));
- const Tp f0 = data055[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002, nu=0.50000000000000000.
-testcase_ellint_3<double> data056[] = {
- { -0.0000000000000000, -0.40000000000000002, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17380006262854139, -0.40000000000000002, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34346098216756610, -0.40000000000000002, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50596929935059420, -0.40000000000000002, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.65996392089131262, -0.40000000000000002, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.80558463511364786, -0.40000000000000002, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.94397834522857704, -0.40000000000000002, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0768075114108115, -0.40000000000000002, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.2059184624251329, -0.40000000000000002, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.3331797176377398, -0.40000000000000002, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.40000000000000002, nu=0.50000000000000000.
-template <typename Tp>
-void test056()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data056)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data056[i].k), Tp(data056[i].nu),
- Tp(data056[i].phi));
- const Tp f0 = data056[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002, nu=0.59999999999999998.
-testcase_ellint_3<double> data057[] = {
- { -0.0000000000000000, -0.40000000000000002, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17362711992081248, -0.40000000000000002, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34217074276403953, -0.40000000000000002, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.50205389185761617, -0.40000000000000002, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.65182834920372745, -0.40000000000000002, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.79186512820565136, -0.40000000000000002, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.92365535916287134, -0.40000000000000002, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0491915663957907, -0.40000000000000002, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1705934291745104, -0.40000000000000002, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.2899514672527024, -0.40000000000000002, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.40000000000000002, nu=0.59999999999999998.
-template <typename Tp>
-void test057()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data057)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data057[i].k), Tp(data057[i].nu),
- Tp(data057[i].phi));
- const Tp f0 = data057[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002, nu=0.69999999999999996.
-testcase_ellint_3<double> data058[] = {
- { -0.0000000000000000, -0.40000000000000002, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17345479265712871, -0.40000000000000002, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34089751955950354, -0.40000000000000002, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.49824200167361343, -0.40000000000000002, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.64402450341199413, -0.40000000000000002, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.77889207804122873, -0.40000000000000002, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.90468169720957992, -0.40000000000000002, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0236847823692916, -0.40000000000000002, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1382465247425164, -0.40000000000000002, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2506255923253344, -0.40000000000000002, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.40000000000000002, nu=0.69999999999999996.
-template <typename Tp>
-void test058()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data058)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data058[i].k), Tp(data058[i].nu),
- Tp(data058[i].phi));
- const Tp f0 = data058[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002, nu=0.80000000000000004.
-testcase_ellint_3<double> data059[] = {
- { -0.0000000000000000, -0.40000000000000002, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17328307694277156, -0.40000000000000002, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.33964091800132007, -0.40000000000000002, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49452889372467451, -0.40000000000000002, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.63652940095937327, -0.40000000000000002, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.76659772511159097, -0.40000000000000002, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.88691047977338111, -0.40000000000000002, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.0000273200611638, -0.40000000000000002, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.1084787902188007, -0.40000000000000002, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.2146499565727209, -0.40000000000000002, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.40000000000000002, nu=0.80000000000000004.
-template <typename Tp>
-void test059()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data059)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data059[i].k), Tp(data059[i].nu),
- Tp(data059[i].phi));
- const Tp f0 = data059[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.40000000000000002, nu=0.90000000000000002.
-testcase_ellint_3<double> data060[] = {
- { -0.0000000000000000, -0.40000000000000002, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17311196891868130, -0.40000000000000002, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33840055664911906, -0.40000000000000002, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.49091013944075340, -0.40000000000000002, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.62932228186809591, -0.40000000000000002, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.75492278323019801, -0.40000000000000002, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.87021659043854294, -0.40000000000000002, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.97800245228239246, -0.40000000000000002, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.0809625773173694, -0.40000000000000002, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.1815758115929846, -0.40000000000000002, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.40000000000000002, nu=0.90000000000000002.
-template <typename Tp>
-void test060()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data060)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data060[i].k), Tp(data060[i].nu),
- Tp(data060[i].phi));
- const Tp f0 = data060[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004, nu=0.0000000000000000.
-testcase_ellint_3<double> data061[] = {
- { -0.0000000000000000, -0.30000000000000004, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17461228653000102, -0.30000000000000004, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.34969146102798415, -0.30000000000000004, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52565822873726320, -0.30000000000000004, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.70284226512408532, -0.30000000000000004, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.88144139195111182, -0.30000000000000004, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0614897067260523, -0.30000000000000004, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2428416824174218, -0.30000000000000004, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.4251795877015925, -0.30000000000000004, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.6080486199305126, -0.30000000000000004, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.30000000000000004, nu=0.0000000000000000.
-template <typename Tp>
-void test061()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data061)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data061[i].k), Tp(data061[i].nu),
- Tp(data061[i].phi));
- const Tp f0 = data061[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004, nu=0.10000000000000001.
-testcase_ellint_3<double> data062[] = {
- { -0.0000000000000000, -0.30000000000000004, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17443631884814378, -0.30000000000000004, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34831316835124926, -0.30000000000000004, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.52116586276523857, -0.30000000000000004, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.69269385837910036, -0.30000000000000004, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.86279023163070856, -0.30000000000000004, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0315321461438265, -0.30000000000000004, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.1991449111869024, -0.30000000000000004, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.3659561780923211, -0.30000000000000004, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.5323534693557526, -0.30000000000000004, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.30000000000000004, nu=0.10000000000000001.
-template <typename Tp>
-void test062()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data062)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data062[i].k), Tp(data062[i].nu),
- Tp(data062[i].phi));
- const Tp f0 = data062[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004, nu=0.20000000000000001.
-testcase_ellint_3<double> data063[] = {
- { -0.0000000000000000, -0.30000000000000004, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17426098615372090, -0.30000000000000004, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34695402664689923, -0.30000000000000004, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.51680555567038933, -0.30000000000000004, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.68303375225260210, -0.30000000000000004, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.84540662891295026, -0.30000000000000004, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.0041834051646927, -0.30000000000000004, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1599952702345711, -0.30000000000000004, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.3137179520499163, -0.30000000000000004, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.4663658145259875, -0.30000000000000004, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.30000000000000004, nu=0.20000000000000001.
-template <typename Tp>
-void test063()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data063)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data063[i].k), Tp(data063[i].nu),
- Tp(data063[i].phi));
- const Tp f0 = data063[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004, nu=0.29999999999999999.
-testcase_ellint_3<double> data064[] = {
- { -0.0000000000000000, -0.30000000000000004, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17408628437042845, -0.30000000000000004, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34561356761638401, -0.30000000000000004, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51257058617875850, -0.30000000000000004, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.67382207124602866, -0.30000000000000004, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.82914751587825131, -0.30000000000000004, 0.29999999999999999,
- 0.87266462599716477 },
- { 0.97907434814374950, -0.30000000000000004, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1246399297351584, -0.30000000000000004, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.2671793970398146, -0.30000000000000004, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.4081767433479089, -0.30000000000000004, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.30000000000000004, nu=0.29999999999999999.
-template <typename Tp>
-void test064()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data064)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data064[i].k), Tp(data064[i].nu),
- Tp(data064[i].phi));
- const Tp f0 = data064[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004, nu=0.40000000000000002.
-testcase_ellint_3<double> data065[] = {
- { -0.0000000000000000, -0.30000000000000004, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17391220945982730, -0.30000000000000004, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34429133937639689, -0.30000000000000004, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.50845471668581632, -0.30000000000000004, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.66502347027873854, -0.30000000000000004, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.81389191978012254, -0.30000000000000004, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.95590618002140593, -0.30000000000000004, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.0924915195213121, -0.30000000000000004, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2253651604038058, -0.30000000000000004, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.3563643538969761, -0.30000000000000004, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.30000000000000004, nu=0.40000000000000002.
-template <typename Tp>
-void test065()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data065)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data065[i].k), Tp(data065[i].nu),
- Tp(data065[i].phi));
- const Tp f0 = data065[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004, nu=0.50000000000000000.
-testcase_ellint_3<double> data066[] = {
- { -0.0000000000000000, -0.30000000000000004, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17373875742088235, -0.30000000000000004, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34298690571124157, -0.30000000000000004, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50445214859646936, -0.30000000000000004, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.65660648352418516, -0.30000000000000004, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.79953670639287289, -0.30000000000000004, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.93443393926588558, -0.30000000000000004, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0630838369016911, -0.30000000000000004, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.1875197325653026, -0.30000000000000004, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.3098448759814960, -0.30000000000000004, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.30000000000000004, nu=0.50000000000000000.
-template <typename Tp>
-void test066()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data066)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data066[i].k), Tp(data066[i].nu),
- Tp(data066[i].phi));
- const Tp f0 = data066[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004, nu=0.59999999999999998.
-testcase_ellint_3<double> data067[] = {
- { -0.0000000000000000, -0.30000000000000004, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17356592428950826, -0.30000000000000004, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34169984536697379, -0.30000000000000004, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.50055748266498457, -0.30000000000000004, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.64854298527106768, -0.30000000000000004, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.78599329284207431, -0.30000000000000004, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.91445452089128221, -0.30000000000000004, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0360412952290587, -0.30000000000000004, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1530473919778639, -0.30000000000000004, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.2677758800420666, -0.30000000000000004, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.30000000000000004, nu=0.59999999999999998.
-template <typename Tp>
-void test067()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data067)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data067[i].k), Tp(data067[i].nu),
- Tp(data067[i].phi));
- const Tp f0 = data067[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004, nu=0.69999999999999996.
-testcase_ellint_3<double> data068[] = {
- { -0.0000000000000000, -0.30000000000000004, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17339370613812227, -0.30000000000000004, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34042975138455933, -0.30000000000000004, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.49676568368075985, -0.30000000000000004, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.64080774055753720, -0.30000000000000004, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.77318507779667278, -0.30000000000000004, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.89579782346548631, -0.30000000000000004, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0110573286052202, -0.30000000000000004, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1214710972949633, -0.30000000000000004, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2294913236274980, -0.30000000000000004, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.30000000000000004, nu=0.69999999999999996.
-template <typename Tp>
-void test068()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data068)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data068[i].k), Tp(data068[i].nu),
- Tp(data068[i].phi));
- const Tp f0 = data068[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004, nu=0.80000000000000004.
-testcase_ellint_3<double> data069[] = {
- { -0.0000000000000000, -0.30000000000000004, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17322209907520361, -0.30000000000000004, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.33917623046949996, -0.30000000000000004, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49307204894329176, -0.30000000000000004, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.63337802830291723, -0.30000000000000004, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.76104540997689407, -0.30000000000000004, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.87832009635450736, -0.30000000000000004, 0.80000000000000004,
- 1.0471975511965976 },
- { 0.98787879723171790, -0.30000000000000004, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.0924036340069336, -0.30000000000000004, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.1944567571590046, -0.30000000000000004, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.30000000000000004, nu=0.80000000000000004.
-template <typename Tp>
-void test069()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data069)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data069[i].k), Tp(data069[i].nu),
- Tp(data069[i].phi));
- const Tp f0 = data069[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.30000000000000004, nu=0.90000000000000002.
-testcase_ellint_3<double> data070[] = {
- { -0.0000000000000000, -0.30000000000000004, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17305109924485948, -0.30000000000000004, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33793890239556984, -0.30000000000000004, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.48947218005089738, -0.30000000000000004, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.62623332340775151, -0.30000000000000004, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.74951596581511148, -0.30000000000000004, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.86189886597756005, -0.30000000000000004, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.96629451153092005, -0.30000000000000004, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.0655269133492680, -0.30000000000000004, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.1622376896064912, -0.30000000000000004, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.30000000000000004, nu=0.90000000000000002.
-template <typename Tp>
-void test070()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data070)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data070[i].k), Tp(data070[i].nu),
- Tp(data070[i].phi));
- const Tp f0 = data070[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.6192315188521289e-16
+// mean(f - f_Boost): 3.5249581031848718e-16
+// variance(f - f_Boost): 2.5029385557256515e-31
+// stddev(f - f_Boost): 5.0029376927217987e-16
+const testcase_ellint_3<double>
+data050[10] =
+{
+ { 0.0000000000000000, -0.50000000000000000, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17636918772384180, -0.50000000000000000, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36424950570740700, -0.50000000000000000, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57785404590231426, -0.50000000000000000, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.83806480521716531, -0.50000000000000000, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1798568683069752, -0.50000000000000000, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.6678766243739607, -0.50000000000000000, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.4282976450693483, -0.50000000000000000, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.6810787666126656, -0.50000000000000000, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 5.5355132096026454, -0.50000000000000000, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler050 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991, nu=0.0000000000000000.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.1423314994346225e-16
+// mean(f - f_Boost): 1.9428902930940238e-17
+// variance(f - f_Boost): 2.2263750157116445e-32
+// stddev(f - f_Boost): 1.4921042241450980e-16
+const testcase_ellint_3<double>
+data051[10] =
+{
+ { 0.0000000000000000, -0.39999999999999991, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17467414669441528, -0.39999999999999991, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35018222772483443, -0.39999999999999991, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52729015917508748, -0.39999999999999991, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.70662374407341244, -0.39999999999999991, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.88859210497602159, -0.39999999999999991, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0733136290471381, -0.39999999999999991, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2605612170157066, -0.39999999999999991, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.4497513956433439, -0.39999999999999991, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.6399998658645112, -0.39999999999999991, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler051 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991, nu=0.10000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.8489340395463703e-16
+// mean(f - f_Boost): 6.3837823915946496e-17
+// variance(f - f_Boost): 4.4785242050000272e-32
+// stddev(f - f_Boost): 2.1162523963365114e-16
+const testcase_ellint_3<double>
+data052[10] =
+{
+ { 0.0000000000000000, -0.39999999999999991, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17485086590796767, -0.39999999999999991, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35158366412506992, -0.39999999999999991, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.53194731675711726, -0.39999999999999991, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.71740615528010931, -0.39999999999999991, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.90896157773487030, -0.39999999999999991, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.1069605483834348, -0.39999999999999991, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.3109353428823001, -0.39999999999999991, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.5195460789903448, -0.39999999999999991, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.7306968836847187, -0.39999999999999991, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler052 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991, nu=0.20000000000000001.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.0467985583872730e-16
+// mean(f - f_Boost): 8.6042284408449634e-17
+// variance(f - f_Boost): 1.5826864298542218e-32
+// stddev(f - f_Boost): 1.2580486595733180e-16
+const testcase_ellint_3<double>
+data053[10] =
+{
+ { 0.0000000000000000, -0.39999999999999991, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17502822886437389, -0.39999999999999991, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35300530062530805, -0.39999999999999991, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53675259548210896, -0.39999999999999991, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.72878006428676934, -0.39999999999999991, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.93100219010583563, -0.39999999999999991, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1443487271187609, -0.39999999999999991, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3683427764108813, -0.39999999999999991, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.6008221459300933, -0.39999999999999991, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.8380358826317627, -0.39999999999999991, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler053 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991, nu=0.30000000000000004.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 2.9973414591826100e-16
+// mean(f - f_Boost): 8.6042284408449634e-17
+// variance(f - f_Boost): 1.5826864298542218e-32
+// stddev(f - f_Boost): 1.2580486595733180e-16
+const testcase_ellint_3<double>
+data054[10] =
+{
+ { 0.0000000000000000, -0.39999999999999991, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17520623975982899, -0.39999999999999991, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35444766141612105, -0.39999999999999991, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.54171455841536009, -0.39999999999999991, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.74080517001084012, -0.39999999999999991, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.95496950509296563, -0.39999999999999991, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.1862627879844718, -0.39999999999999991, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.4346501803799458, -0.39999999999999991, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.6971744798077697, -0.39999999999999991, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 1.9677924132520139, -0.39999999999999991, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler054 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991, nu=0.40000000000000002.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.2577246923979600e-16
+// mean(f - f_Boost): 1.8596235662471373e-16
+// variance(f - f_Boost): 1.6222417021441306e-31
+// stddev(f - f_Boost): 4.0277061736727151e-16
+const testcase_ellint_3<double>
+data055[10] =
+{
+ { 0.0000000000000000, -0.39999999999999991, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17538490283034375, -0.39999999999999991, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35591129064319948, -0.39999999999999991, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54684250413264535, -0.39999999999999991, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.75355027742668290, -0.39999999999999991, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.98117935026780634, -0.39999999999999991, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2337464222030734, -0.39999999999999991, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.5125183419289221, -0.39999999999999991, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.8140224451130311, -0.39999999999999991, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.1289968719280026, -0.39999999999999991, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler055 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991, nu=0.50000000000000000.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.8009196014748294e-16
+// mean(f - f_Boost): 1.6375789613221060e-16
+// variance(f - f_Boost): 6.4788283329186610e-32
+// stddev(f - f_Boost): 2.5453542647181080e-16
+const testcase_ellint_3<double>
+data056[10] =
+{
+ { 0.0000000000000000, -0.39999999999999991, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17556422235224273, -0.39999999999999991, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35739675341763921, -0.39999999999999991, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.55214655195037188, -0.39999999999999991, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.76709520942047438, -0.39999999999999991, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0100278761577499, -0.39999999999999991, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.2882265661384342, -0.39999999999999991, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.6059059780051874, -0.39999999999999991, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 1.9600182740224081, -0.39999999999999991, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.3367461373176508, -0.39999999999999991, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler056 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991, nu=0.60000000000000009.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 2.8411408870840790e-16
+// mean(f - f_Boost): 9.7144514654701197e-17
+// variance(f - f_Boost): 1.4860570558543486e-32
+// stddev(f - f_Boost): 1.2190393988113545e-16
+const testcase_ellint_3<double>
+data057[10] =
+{
+ { 0.0000000000000000, -0.39999999999999991, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17574420264267029, -0.39999999999999991, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35890463689046265, -0.39999999999999991, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55763773975194486, -0.39999999999999991, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.78153324227761267, -0.39999999999999991, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0420205885765887, -0.39999999999999991, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3517205230381770, -0.39999999999999991, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.7210360970313896, -0.39999999999999991, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.1500780510169242, -0.39999999999999991, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.6186940209850191, -0.39999999999999991, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler057 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991, nu=0.70000000000000007.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.1553900340611668e-16
+// mean(f - f_Boost): 1.1657341758564144e-16
+// variance(f - f_Boost): 1.3242789405258207e-32
+// stddev(f - f_Boost): 1.1507731924779187e-16
+const testcase_ellint_3<double>
+data058[10] =
+{
+ { 0.0000000000000000, -0.39999999999999991, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17592484806010436, -0.39999999999999991, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36043555139631439, -0.39999999999999991, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.56332813669944881, -0.39999999999999991, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.79697424562157548, -0.39999999999999991, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0778155987523672, -0.39999999999999991, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.4272018169896268, -0.39999999999999991, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.8684377907453380, -0.39999999999999991, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.4128677409207469, -0.39999999999999991, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 3.0327078743873241, -0.39999999999999991, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler058 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991, nu=0.80000000000000004.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.5727642219519274e-16
+// mean(f - f_Boost): 2.1926904736346843e-16
+// variance(f - f_Boost): 1.5293405480859847e-31
+// stddev(f - f_Boost): 3.9106783913868252e-16
+const testcase_ellint_3<double>
+data059[10] =
+{
+ { 0.0000000000000000, -0.39999999999999991, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17610616300487833, -0.39999999999999991, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36199013167171978, -0.39999999999999991, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.56923097361842423, -0.39999999999999991, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.81354878456624347, -0.39999999999999991, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1182902719261825, -0.39999999999999991, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.5192950589409022, -0.39999999999999991, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.0678761710223981, -0.39999999999999991, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.8135222249879783, -0.39999999999999991, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.7289548002199902, -0.39999999999999991, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler059 = 2.5000000000000020e-13;
+
+// Test data for k=-0.39999999999999991, nu=0.90000000000000002.
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.0221626338023938e-16
+// mean(f - f_Boost): 4.1910919179599658e-16
+// variance(f - f_Boost): 6.2246150910247033e-31
+// stddev(f - f_Boost): 7.8896229891070860e-16
+const testcase_ellint_3<double>
+data060[10] =
+{
+ { 0.0000000000000000, -0.39999999999999991, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17628815191971123, -0.39999999999999991, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36356903815378772, -0.39999999999999991, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57536079447000310, -0.39999999999999991, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.83141355850172571, -0.39999999999999991, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1646481598721361, -0.39999999999999991, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.6357275034001995, -0.39999999999999991, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.3628787566572398, -0.39999999999999991, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.5521010369134958, -0.39999999999999991, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 5.3055535102872513, -0.39999999999999991, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler060 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993, nu=0.0000000000000000.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.2241249691539529e-16
+// mean(f - f_Boost): 4.9960036108132046e-17
+// variance(f - f_Boost): 4.6872855002064458e-32
+// stddev(f - f_Boost): 2.1650139722889657e-16
+const testcase_ellint_3<double>
+data061[10] =
+{
+ { 0.0000000000000000, -0.29999999999999993, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17461228653000099, -0.29999999999999993, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.34969146102798421, -0.29999999999999993, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52565822873726309, -0.29999999999999993, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.70284226512408543, -0.29999999999999993, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.88144139195111171, -0.29999999999999993, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0614897067260520, -0.29999999999999993, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2428416824174220, -0.29999999999999993, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.4251795877015929, -0.29999999999999993, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.6080486199305126, -0.29999999999999993, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler061 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993, nu=0.10000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1872304407982844e-16
+// mean(f - f_Boost): 9.4368957093138303e-17
+// variance(f - f_Boost): 4.0359883022230488e-32
+// stddev(f - f_Boost): 2.0089769292411121e-16
+const testcase_ellint_3<double>
+data062[10] =
+{
+ { 0.0000000000000000, -0.29999999999999993, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17478889331392972, -0.29999999999999993, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35108939018329183, -0.29999999999999993, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.53028990896115835, -0.29999999999999993, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.71352417052371409, -0.29999999999999993, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.90153086032405894, -0.29999999999999993, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.0945187977283313, -0.29999999999999993, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.2920699268385680, -0.29999999999999993, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.4931243665896394, -0.29999999999999993, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.6960848815118226, -0.29999999999999993, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler062 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993, nu=0.20000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.2247497610332889e-16
+// mean(f - f_Boost): 1.1102230246251565e-16
+// variance(f - f_Boost): 3.8043060629871325e-32
+// stddev(f - f_Boost): 1.9504630380981672e-16
+const testcase_ellint_3<double>
+data063[10] =
+{
+ { 0.0000000000000000, -0.29999999999999993, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17496614335337535, -0.29999999999999993, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35250745937139372, -0.29999999999999993, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53506875002836884, -0.29999999999999993, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.72479106622248191, -0.29999999999999993, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.92326451535891607, -0.29999999999999993, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1312092060698349, -0.29999999999999993, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3481473154592321, -0.29999999999999993, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.5722049569662748, -0.29999999999999993, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.8002173372290498, -0.29999999999999993, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler063 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.1678685180047551e-16
+// mean(f - f_Boost): 1.0547118733938987e-16
+// variance(f - f_Boost): 7.5633408838247182e-32
+// stddev(f - f_Boost): 2.7501528837184157e-16
+const testcase_ellint_3<double>
+data064[10] =
+{
+ { 0.0000000000000000, -0.29999999999999993, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17514404084107435, -0.29999999999999993, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35394619108645647, -0.29999999999999993, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.54000325463372689, -0.29999999999999993, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.73670193794067651, -0.29999999999999993, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.94689345491722177, -0.29999999999999993, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.1723274608389140, -0.29999999999999993, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.4128880552936287, -0.29999999999999993, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.6659010047449661, -0.29999999999999993, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 1.9260216862473254, -0.29999999999999993, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler064 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993, nu=0.40000000000000002.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.3983279132797385e-16
+// mean(f - f_Boost): 1.1657341758564144e-16
+// variance(f - f_Boost): 1.8245832308692586e-31
+// stddev(f - f_Boost): 4.2715140534349863e-16
+const testcase_ellint_3<double>
+data065[10] =
+{
+ { 0.0000000000000000, -0.29999999999999993, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17532259000954434, -0.29999999999999993, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35540612770983693, -0.29999999999999993, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54510265552938919, -0.29999999999999993, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.74932476310965057, -0.29999999999999993, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.97272793583093109, -0.29999999999999993, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2188928987074241, -0.29999999999999993, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.4888771674085941, -0.29999999999999993, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.7794558498219191, -0.29999999999999993, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.0822121773175528, -0.29999999999999993, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler065 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993, nu=0.50000000000000000.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.0516138451673425e-16
+// mean(f - f_Boost): 4.7184478546569152e-17
+// variance(f - f_Boost): 1.9448563670505968e-32
+// stddev(f - f_Boost): 1.3945810722401896e-16
+const testcase_ellint_3<double>
+data066[10] =
+{
+ { 0.0000000000000000, -0.29999999999999993, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17550179513158179, -0.29999999999999993, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35688783251681200, -0.29999999999999993, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.55037700010142798, -0.29999999999999993, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.76273839789895992, -0.29999999999999993, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0011570518830419, -0.29999999999999993, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.2722987414055109, -0.29999999999999993, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.5799590511080066, -0.29999999999999993, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 1.9212367220124293, -0.29999999999999993, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.2833505881933971, -0.29999999999999993, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler066 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.2121157428443725e-16
+// mean(f - f_Boost): 1.9428902930940239e-16
+// variance(f - f_Boost): 1.5987596229703424e-31
+// stddev(f - f_Boost): 3.9984492281012430e-16
+const testcase_ellint_3<double>
+data067[10] =
+{
+ { 0.0000000000000000, -0.29999999999999993, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17568166052076745, -0.29999999999999993, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35839189074731181, -0.29999999999999993, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55583724744367558, -0.29999999999999993, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.77703498090888223, -0.29999999999999993, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0326772113675962, -0.29999999999999993, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3345139983717369, -0.29999999999999993, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.6921742922838403, -0.29999999999999993, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.1056608968472186, -0.29999999999999993, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.5560975528589061, -0.29999999999999993, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler067 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.0088945789059381e-16
+// mean(f - f_Boost): 1.6653345369377348e-16
+// variance(f - f_Boost): 3.1994213989721786e-31
+// stddev(f - f_Boost): 5.6563428104846852e-16
+const testcase_ellint_3<double>
+data068[10] =
+{
+ { 0.0000000000000000, -0.29999999999999993, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17586219053197988, -0.29999999999999993, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.35991891074557669, -0.29999999999999993, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.56149538019961731, -0.29999999999999993, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.79232303189667685, -0.29999999999999993, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0679345542878826, -0.29999999999999993, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.4084400085913955, -0.29999999999999993, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.8357382859296454, -0.29999999999999993, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.3604197996171519, -0.29999999999999993, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 2.9562123549913872, -0.29999999999999993, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler068 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993, nu=0.80000000000000004.
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.1197887707781618e-16
+// mean(f - f_Boost): 3.4416913763379854e-16
+// variance(f - f_Boost): 4.3461914185990199e-31
+// stddev(f - f_Boost): 6.5925650687718054e-16
+const testcase_ellint_3<double>
+data069[10] =
+{
+ { 0.0000000000000000, -0.29999999999999993, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17604338956191670, -0.29999999999999993, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36146952517410791, -0.29999999999999993, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.56736453393774644, -0.29999999999999993, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.80873149979001091, -0.29999999999999993, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1077903069860620, -0.29999999999999993, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.4985874311132998, -0.29999999999999993, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.0298167266724954, -0.29999999999999993, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.7483929054985432, -0.29999999999999993, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.6283050484567170, -0.29999999999999993, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler069 = 2.5000000000000020e-13;
+
+// Test data for k=-0.29999999999999993, nu=0.90000000000000002.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.1301806687926828e-16
+// mean(f - f_Boost): 4.1633363423443370e-16
+// variance(f - f_Boost): 2.2835347143080263e-31
+// stddev(f - f_Boost): 4.7786344433405093e-16
+const testcase_ellint_3<double>
+data070[10] =
+{
+ { 0.0000000000000000, -0.29999999999999993, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17622526204962433, -0.29999999999999993, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36304439230777141, -0.29999999999999993, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57345914744719195, -0.29999999999999993, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.82641512928845162, -0.29999999999999993, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1534256210757743, -0.29999999999999993, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.6124900353411677, -0.29999999999999993, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.3165905514845089, -0.29999999999999993, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.4625619526539824, -0.29999999999999993, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 5.1479514944016787, -0.29999999999999993, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler070 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.0000000000000000.
-testcase_ellint_3<double> data071[] = {
- { -0.0000000000000000, -0.19999999999999996, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17456817290292811, -0.19999999999999996, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.34934315932086801, -0.19999999999999996, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52450880529443988, -0.19999999999999996, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.70020491009844910, -0.19999999999999996, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.87651006649967955, -0.19999999999999996, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0534305870298994, -0.19999999999999996, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2308975521670784, -0.19999999999999996, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.4087733584990738, -0.19999999999999996, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.5868678474541664, -0.19999999999999996, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.19999999999999996, nu=0.0000000000000000.
-template <typename Tp>
-void test071()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data071)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data071[i].k), Tp(data071[i].nu),
- Tp(data071[i].phi));
- const Tp f0 = data071[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 4.2156475739151676e-16
+// mean(f - f_Boost): -5.2735593669694933e-17
+// variance(f - f_Boost): 3.0473442641042680e-32
+// stddev(f - f_Boost): 1.7456644190978597e-16
+const testcase_ellint_3<double>
+data071[10] =
+{
+ { 0.0000000000000000, -0.19999999999999996, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17456817290292806, -0.19999999999999996, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.34934315932086796, -0.19999999999999996, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52450880529443988, -0.19999999999999996, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.70020491009844887, -0.19999999999999996, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.87651006649967977, -0.19999999999999996, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0534305870298994, -0.19999999999999996, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2308975521670789, -0.19999999999999996, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.4087733584990738, -0.19999999999999996, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.5868678474541662, -0.19999999999999996, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler071 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.10000000000000001.
-testcase_ellint_3<double> data072[] = {
- { -0.0000000000000000, -0.19999999999999996, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17439228502691750, -0.19999999999999996, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34796731137565740, -0.19999999999999996, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.52003370294544848, -0.19999999999999996, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.69012222258631495, -0.19999999999999996, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.85803491465566772, -0.19999999999999996, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0238463961099364, -0.19999999999999996, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.1878691059202153, -0.19999999999999996, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.3505985031831940, -0.19999999999999996, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.5126513474261092, -0.19999999999999996, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.19999999999999996, nu=0.10000000000000001.
-template <typename Tp>
-void test072()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data072)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data072[i].k), Tp(data072[i].nu),
- Tp(data072[i].phi));
- const Tp f0 = data072[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 4.0890622182605400e-16
+// mean(f - f_Boost): -3.8857805861880476e-17
+// variance(f - f_Boost): 2.8794792590749608e-32
+// stddev(f - f_Boost): 1.6969028431454054e-16
+const testcase_ellint_3<double>
+data072[10] =
+{
+ { 0.0000000000000000, -0.19999999999999996, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17474469953608965, -0.19999999999999996, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35073860234984255, -0.19999999999999996, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.52912258712951521, -0.19999999999999996, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.71081701558898069, -0.19999999999999996, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.89640758521169384, -0.19999999999999996, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.0860417038089853, -0.19999999999999996, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.2793599255528623, -0.19999999999999996, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.4754938544089076, -0.19999999999999996, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.6731552050562593, -0.19999999999999996, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler072 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.20000000000000001.
-testcase_ellint_3<double> data073[] = {
- { -0.0000000000000000, -0.19999999999999996, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17421703179583750, -0.19999999999999996, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34661057411998791, -0.19999999999999996, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.51569006052647393, -0.19999999999999996, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.68052412821107278, -0.19999999999999996, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.84081341263313825, -0.19999999999999996, 0.20000000000000001,
- 0.87266462599716477 },
- { 0.99683359988842890, -0.19999999999999996, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1493086715118852, -0.19999999999999996, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.2992699693957541, -0.19999999999999996, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.4479323932249568, -0.19999999999999996, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.19999999999999996, nu=0.20000000000000001.
-template <typename Tp>
-void test073()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data073)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data073[i].k), Tp(data073[i].nu),
- Tp(data073[i].phi));
- const Tp f0 = data073[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.19999999999999996, nu=0.29999999999999999.
-testcase_ellint_3<double> data074[] = {
- { -0.0000000000000000, -0.19999999999999996, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17404240913577707, -0.19999999999999996, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34527248032587193, -0.19999999999999996, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51147118981668416, -0.19999999999999996, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.67137107867777635, -0.19999999999999996, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.82470418188668893, -0.19999999999999996, 0.29999999999999999,
- 0.87266462599716477 },
- { 0.97202873223594299, -0.19999999999999996, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1144773569375266, -0.19999999999999996, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.2535292433701000, -0.19999999999999996, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.3908453514752481, -0.19999999999999996, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.19999999999999996, nu=0.29999999999999999.
-template <typename Tp>
-void test074()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data074)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data074[i].k), Tp(data074[i].nu),
- Tp(data074[i].phi));
- const Tp f0 = data074[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 3.9570963716579749e-16
+// mean(f - f_Boost): -5.8286708792820721e-17
+// variance(f - f_Boost): 3.1158217732380362e-32
+// stddev(f - f_Boost): 1.7651690494788412e-16
+const testcase_ellint_3<double>
+data073[10] =
+{
+ { 0.0000000000000000, -0.19999999999999996, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17492186907740698, -0.19999999999999996, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35215414286134267, -0.19999999999999996, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53388285615182440, -0.19999999999999996, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.72200960282688265, -0.19999999999999996, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.91793087614428526, -0.19999999999999996, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1222602841587976, -0.19999999999999996, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3345489407496247, -0.19999999999999996, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.5531225705475502, -0.19999999999999996, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.7751816279738935, -0.19999999999999996, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler073 = 2.5000000000000020e-13;
+
+// Test data for k=-0.19999999999999996, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.6785817924053817e-16
+// mean(f - f_Boost): -1.1102230246251566e-17
+// variance(f - f_Boost): 9.9840208317034302e-32
+// stddev(f - f_Boost): 3.1597501217190311e-16
+const testcase_ellint_3<double>
+data074[10] =
+{
+ { 0.0000000000000000, -0.19999999999999996, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17509968571715159, -0.19999999999999996, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35359030214835629, -0.19999999999999996, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.53879807274537084, -0.19999999999999996, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.73384116418059731, -0.19999999999999996, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.94132799329524031, -0.19999999999999996, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.1628407021801439, -0.19999999999999996, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.3982440216739438, -0.19999999999999996, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.6450634983653640, -0.19999999999999996, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 1.8983924169967099, -0.19999999999999996, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler074 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.40000000000000002.
-testcase_ellint_3<double> data075[] = {
- { -0.0000000000000000, -0.19999999999999996, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17386841301066677, -0.19999999999999996, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34395257914113253, -0.19999999999999996, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.50737088376869466, -0.19999999999999996, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.66262801717277664, -0.19999999999999996, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.80958766645079094, -0.19999999999999996, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.94913754236162040, -0.19999999999999996, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.0827985514223000, -0.19999999999999996, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2124212429050478, -0.19999999999999996, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.3400002519661010, -0.19999999999999996, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.19999999999999996, nu=0.40000000000000002.
-template <typename Tp>
-void test075()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data075)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data075[i].k), Tp(data075[i].nu),
- Tp(data075[i].phi));
- const Tp f0 = data075[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.3298410018355870e-16
+// mean(f - f_Boost): 1.3877787807814457e-17
+// variance(f - f_Boost): 9.4370567274974557e-32
+// stddev(f - f_Boost): 3.0719792850046133e-16
+const testcase_ellint_3<double>
+data075[10] =
+{
+ { 0.0000000000000000, -0.19999999999999996, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17527815368535152, -0.19999999999999996, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35504762134297801, -0.19999999999999996, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54387742353211344, -0.19999999999999996, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.74637910471804259, -0.19999999999999996, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.96690539714174639, -0.19999999999999996, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2087859420184757, -0.19999999999999996, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.4729799844168852, -0.19999999999999996, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.7564445064596661, -0.19999999999999996, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.0512956926676802, -0.19999999999999996, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler075 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.50000000000000000.
-testcase_ellint_3<double> data076[] = {
- { -0.0000000000000000, -0.19999999999999996, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17369503942181802, -0.19999999999999996, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34265043534362660, -0.19999999999999996, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50338337208655415, -0.19999999999999996, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.65426373297163642, -0.19999999999999996, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.79536193036145808, -0.19999999999999996, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.92791875910061605, -0.19999999999999996, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0538145052725829, -0.19999999999999996, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.1752060022875899, -0.19999999999999996, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.2943374404397376, -0.19999999999999996, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.19999999999999996, nu=0.50000000000000000.
-template <typename Tp>
-void test076()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data076)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data076[i].k), Tp(data076[i].nu),
- Tp(data076[i].phi));
- const Tp f0 = data076[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.19999999999999996, nu=0.59999999999999998.
-testcase_ellint_3<double> data077[] = {
- { -0.0000000000000000, -0.19999999999999996, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17352228440746928, -0.19999999999999996, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34136562863713626, -0.19999999999999996, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.49950328177638481, -0.19999999999999996, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.64625032705690832, -0.19999999999999996, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.78193941198403094, -0.19999999999999996, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.90817230934317128, -0.19999999999999996, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0271563751276462, -0.19999999999999996, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1412999379040518, -0.19999999999999996, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.2530330675914561, -0.19999999999999996, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.19999999999999996, nu=0.59999999999999998.
-template <typename Tp>
-void test077()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data077)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data077[i].k), Tp(data077[i].nu),
- Tp(data077[i].phi));
- const Tp f0 = data077[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.19999999999999996, nu=0.69999999999999996.
-testcase_ellint_3<double> data078[] = {
- { -0.0000000000000000, -0.19999999999999996, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17335014404233898, -0.19999999999999996, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34009775298617811, -0.19999999999999996, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.49572560201923810, -0.19999999999999996, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.63856276669886525, -0.19999999999999996, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.76924438644867565, -0.19999999999999996, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.88973060843856466, -0.19999999999999996, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0025230471636377, -0.19999999999999996, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1102356376093103, -0.19999999999999996, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2154356555075867, -0.19999999999999996, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.19999999999999996, nu=0.69999999999999996.
-template <typename Tp>
-void test078()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data078)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data078[i].k), Tp(data078[i].nu),
- Tp(data078[i].phi));
- const Tp f0 = data078[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.3841806057292116e-16
+// mean(f - f_Boost): 8.0491169285323847e-17
+// variance(f - f_Boost): 8.0538110429953348e-32
+// stddev(f - f_Boost): 2.8379237204328335e-16
+const testcase_ellint_3<double>
+data076[10] =
+{
+ { 0.0000000000000000, -0.19999999999999996, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17545727725228877, -0.19999999999999996, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35652666242062175, -0.19999999999999996, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.54913090549102406, -0.19999999999999996, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.75970161209211551, -0.19999999999999996, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 0.99504737401590326, -0.19999999999999996, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.2614666007124373, -0.19999999999999996, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.5625255355205496, -0.19999999999999996, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 1.8954460255613343, -0.19999999999999996, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.2481046259421302, -0.19999999999999996, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler076 = 2.5000000000000020e-13;
+
+// Test data for k=-0.19999999999999996, nu=0.60000000000000009.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.5317584994994743e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 1.0045745697575397e-31
+// stddev(f - f_Boost): 3.1695024369095219e-16
+const testcase_ellint_3<double>
+data077[10] =
+{
+ { 0.0000000000000000, -0.19999999999999996, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17563706072900442, -0.19999999999999996, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35802800926807238, -0.19999999999999996, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55456942250515051, -0.19999999999999996, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.77390003828438203, -0.19999999999999996, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0262441366366397, -0.19999999999999996, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3228192988439669, -0.19999999999999996, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.6728005754680795, -0.19999999999999996, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.0761587107468511, -0.19999999999999996, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.5148333891629315, -0.19999999999999996, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler077 = 2.5000000000000020e-13;
+
+// Test data for k=-0.19999999999999996, nu=0.70000000000000007.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.1818454249546518e-16
+// mean(f - f_Boost): 3.6082248300317589e-17
+// variance(f - f_Boost): 8.9638010532618564e-32
+// stddev(f - f_Boost): 2.9939607634806868e-16
+const testcase_ellint_3<double>
+data078[10] =
+{
+ { 0.0000000000000000, -0.19999999999999996, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17581750846781172, -0.19999999999999996, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.35955226882028513, -0.19999999999999996, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.56020489659466499, -0.19999999999999996, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.78908196988531487, -0.19999999999999996, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0611336754143517, -0.19999999999999996, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.3956969951058884, -0.19999999999999996, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.8138131612209609, -0.19999999999999996, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.3256365528879561, -0.19999999999999996, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 2.9058704854500963, -0.19999999999999996, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler078 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.80000000000000004.
-testcase_ellint_3<double> data079[] = {
- { -0.0000000000000000, -0.19999999999999996, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17317861443718541, -0.19999999999999996, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.33884641598718701, -0.19999999999999996, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49204565281259494, -0.19999999999999996, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.63117851188220353, -0.19999999999999996, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.75721095949544170, -0.19999999999999996, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.87245201443919118, -0.19999999999999996, 0.80000000000000004,
- 1.0471975511965976 },
- { 0.97966584238831089, -0.19999999999999996, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.0816336325174360, -0.19999999999999996, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.1810223448909913, -0.19999999999999996, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.19999999999999996, nu=0.80000000000000004.
-template <typename Tp>
-void test079()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data079)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data079[i].k), Tp(data079[i].nu),
- Tp(data079[i].phi));
- const Tp f0 = data079[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.9866614515542431e-16
+// mean(f - f_Boost): 1.8318679906315082e-16
+// variance(f - f_Boost): 3.1335688610218711e-31
+// stddev(f - f_Boost): 5.5978289193417400e-16
+const testcase_ellint_3<double>
+data079[10] =
+{
+ { 0.0000000000000000, -0.19999999999999996, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17599862486281712, -0.19999999999999996, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36110007227128776, -0.19999999999999996, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.56605039658567224, -0.19999999999999996, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.80537523874517691, -0.19999999999999996, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1005662342414086, -0.19999999999999996, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.4845340298105778, -0.19999999999999996, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.0043332244969392, -0.19999999999999996, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.7052856676744761, -0.19999999999999996, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.5622166386422629, -0.19999999999999996, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler079 = 2.5000000000000020e-13;
// Test data for k=-0.19999999999999996, nu=0.90000000000000002.
-testcase_ellint_3<double> data080[] = {
- { -0.0000000000000000, -0.19999999999999996, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17300769173837280, -0.19999999999999996, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33761123827372508, -0.19999999999999996, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.48845905690769426, -0.19999999999999996, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.62407720017324986, -0.19999999999999996, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.74578146525124289, -0.19999999999999996, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.85621583540073076, -0.19999999999999996, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.95837725988001199, -0.19999999999999996, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.0551821412633928, -0.19999999999999996, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.1493679916141863, -0.19999999999999996, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.19999999999999996, nu=0.90000000000000002.
-template <typename Tp>
-void test080()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data080)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data080[i].k), Tp(data080[i].nu),
- Tp(data080[i].phi));
- const Tp f0 = data080[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.2817178727913890e-16
+// mean(f - f_Boost): 3.4694469519536142e-16
+// variance(f - f_Boost): 6.6311432369155086e-31
+// stddev(f - f_Boost): 8.1431831840598485e-16
+const testcase_ellint_3<double>
+data080[10] =
+{
+ { 0.0000000000000000, -0.19999999999999996, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17618041435044951, -0.19999999999999996, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36267207636502929, -0.19999999999999996, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57212028758237743, -0.19999999999999996, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.82293323876704483, -0.19999999999999996, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1457077279880385, -0.19999999999999996, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.5967346899325681, -0.19999999999999996, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.2856537353421724, -0.19999999999999996, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.4034714304613902, -0.19999999999999996, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 5.0448269356200361, -0.19999999999999996, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler080 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.0000000000000000.
-testcase_ellint_3<double> data081[] = {
- { -0.0000000000000000, -0.099999999999999978, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17454173353063665, -0.099999999999999978, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.34913506721468085, -0.099999999999999978, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52382550016538953, -0.099999999999999978, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.69864700854177031, -0.099999999999999978, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.87361792586964870, -0.099999999999999978, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0487386319621685, -0.099999999999999978, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2239913752078757, -0.099999999999999978, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.3993423113684049, -0.099999999999999978, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.5747455615173562, -0.099999999999999978, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.099999999999999978, nu=0.0000000000000000.
-template <typename Tp>
-void test081()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data081)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data081[i].k), Tp(data081[i].nu),
- Tp(data081[i].phi));
- const Tp f0 = data081[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.1735566504509645e-16
+// mean(f - f_Boost): -3.6082248300317589e-17
+// variance(f - f_Boost): 8.2258607846939269e-33
+// stddev(f - f_Boost): 9.0696531271564778e-17
+const testcase_ellint_3<double>
+data081[10] =
+{
+ { 0.0000000000000000, -0.099999999999999978, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17454173353063662, -0.099999999999999978, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.34913506721468096, -0.099999999999999978, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52382550016538953, -0.099999999999999978, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.69864700854177020, -0.099999999999999978, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.87361792586964859, -0.099999999999999978, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0487386319621685, -0.099999999999999978, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2239913752078759, -0.099999999999999978, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.3993423113684051, -0.099999999999999978, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.5747455615173558, -0.099999999999999978, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler081 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.10000000000000001.
-testcase_ellint_3<double> data082[] = {
- { -0.0000000000000000, -0.099999999999999978, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17436589347616618, -0.099999999999999978, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34776067871237354, -0.099999999999999978, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.51936064354727807, -0.099999999999999978, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.68860303749364360, -0.099999999999999978, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.85524561882332051, -0.099999999999999978, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0193708301908337, -0.099999999999999978, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.1813474067123044, -0.099999999999999978, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.3417670770424983, -0.099999999999999978, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.5013711111199950, -0.099999999999999978, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.099999999999999978, nu=0.10000000000000001.
-template <typename Tp>
-void test082()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data082)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data082[i].k), Tp(data082[i].nu),
- Tp(data082[i].phi));
- const Tp f0 = data082[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.0305747373482148e-16
+// mean(f - f_Boost): -3.0531133177191807e-17
+// variance(f - f_Boost): 1.1508025840536076e-34
+// stddev(f - f_Boost): 1.0727546709539920e-17
+const testcase_ellint_3<double>
+data082[10] =
+{
+ { 0.0000000000000000, -0.099999999999999978, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17471821213559732, -0.099999999999999978, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35052902610011138, -0.099999999999999978, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.52842865990255727, -0.099999999999999978, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.70921799731166713, -0.099999999999999978, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.89340330535868662, -0.099999999999999978, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.0811075784236857, -0.099999999999999978, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.2720133232666426, -0.099999999999999978, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.4653630031861395, -0.099999999999999978, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.6600374067558428, -0.099999999999999978, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler082 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.20000000000000001.
-testcase_ellint_3<double> data083[] = {
- { -0.0000000000000000, -0.099999999999999978, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17419068786141345, -0.099999999999999978, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34640537686230127, -0.099999999999999978, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.51502689171753957, -0.099999999999999978, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.67904147863672726, -0.099999999999999978, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.83811885126105179, -0.099999999999999978, 0.20000000000000001,
- 0.87266462599716477 },
- { 0.99255278555742810, -0.099999999999999978, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1431260546194930, -0.099999999999999978, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.2909589656532101, -0.099999999999999978, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.4373749386463430, -0.099999999999999978, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.099999999999999978, nu=0.20000000000000001.
-template <typename Tp>
-void test083()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data083)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data083[i].k), Tp(data083[i].nu),
- Tp(data083[i].phi));
- const Tp f0 = data083[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.099999999999999978, nu=0.29999999999999999.
-testcase_ellint_3<double> data084[] = {
- { -0.0000000000000000, -0.099999999999999978, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17401611261390110, -0.099999999999999978, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34506869507511767, -0.099999999999999978, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51081757604259870, -0.099999999999999978, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.66992297597712303, -0.099999999999999978, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.82209722856174228, -0.099999999999999978, 0.29999999999999999,
- 0.87266462599716477 },
- { 0.96792430487669612, -0.099999999999999978, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1085964108954092, -0.099999999999999978, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.2456748370836999, -0.099999999999999978, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.3809159606704959, -0.099999999999999978, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.099999999999999978, nu=0.29999999999999999.
-template <typename Tp>
-void test084()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data084)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data084[i].k), Tp(data084[i].nu),
- Tp(data084[i].phi));
- const Tp f0 = data084[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 1.6736714959992433e-16
+// mean(f - f_Boost): 5.5511151231257830e-18
+// variance(f - f_Boost): 3.8043060629871325e-36
+// stddev(f - f_Boost): 1.9504630380981673e-18
+const testcase_ellint_3<double>
+data083[10] =
+{
+ { 0.0000000000000000, -0.099999999999999978, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17489533344059083, -0.099999999999999978, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35194305707815038, -0.099999999999999978, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53317790741512527, -0.099999999999999978, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.72036681615081222, -0.099999999999999978, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.91480372268244303, -0.099999999999999978, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1170528708071514, -0.099999999999999978, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3266916802718358, -0.099999999999999978, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.5421622241831547, -0.099999999999999978, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.7608656115083421, -0.099999999999999978, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler083 = 2.5000000000000020e-13;
+
+// Test data for k=-0.099999999999999978, nu=0.30000000000000004.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 1.9186071760326645e-16
+// mean(f - f_Boost): -1.6653345369377347e-17
+// variance(f - f_Boost): 3.4238754566884194e-35
+// stddev(f - f_Boost): 5.8513891142945016e-18
+const testcase_ellint_3<double>
+data084[10] =
+{
+ { 0.0000000000000000, -0.099999999999999978, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17507310163441189, -0.099999999999999978, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35337768072524217, -0.099999999999999978, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.53808167801629170, -0.099999999999999978, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.73215166755955019, -0.099999999999999978, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.93806546000201219, -0.099999999999999978, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.1573218723395986, -0.099999999999999978, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.3897859679542097, -0.099999999999999978, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.6331009404328622, -0.099999999999999978, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 1.8826015946315438, -0.099999999999999978, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler084 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.40000000000000002.
-testcase_ellint_3<double> data085[] = {
- { -0.0000000000000000, -0.099999999999999978, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17384216369897937, -0.099999999999999978, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34375018311376782, -0.099999999999999978, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.50672650758380455, -0.099999999999999978, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.66121264213337616, -0.099999999999999978, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.80706202005774441, -0.099999999999999978, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.94519376138245892, -0.099999999999999978, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.0771880300759584, -0.099999999999999978, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2049711557188272, -0.099999999999999978, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.3306223265207477, -0.099999999999999978, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.099999999999999978, nu=0.40000000000000002.
-template <typename Tp>
-void test085()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data085)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data085[i].k), Tp(data085[i].nu),
- Tp(data085[i].phi));
- const Tp f0 = data085[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.0338059536914377e-16
+// mean(f - f_Boost): 2.7755575615628914e-17
+// variance(f - f_Boost): 9.5107651574678308e-35
+// stddev(f - f_Boost): 9.7523151904908362e-18
+const testcase_ellint_3<double>
+data085[10] =
+{
+ { 0.0000000000000000, -0.099999999999999978, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17525152094559704, -0.099999999999999978, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35483343742825979, -0.099999999999999978, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54314913099505446, -0.099999999999999978, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.74463962034766862, -0.099999999999999978, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.96349276837570441, -0.099999999999999978, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2029081382746343, -0.099999999999999978, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.4638022887050806, -0.099999999999999978, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.7432413830105224, -0.099999999999999978, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.0336367403076760, -0.099999999999999978, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler085 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.50000000000000000.
-testcase_ellint_3<double> data086[] = {
- { -0.0000000000000000, -0.099999999999999978, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17366883711936554, -0.099999999999999978, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34244940634881876, -0.099999999999999978, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50274793281634378, -0.099999999999999978, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.65287941633275093, -0.099999999999999978, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.79291198790315398, -0.099999999999999978, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.92412201537880345, -0.099999999999999978, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0484480076799370, -0.099999999999999978, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.1681168130475206, -0.099999999999999978, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.2854480708580160, -0.099999999999999978, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.099999999999999978, nu=0.50000000000000000.
-template <typename Tp>
-void test086()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data086)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data086[i].k), Tp(data086[i].nu),
- Tp(data086[i].phi));
- const Tp f0 = data086[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.099999999999999978, nu=0.59999999999999998.
-testcase_ellint_3<double> data087[] = {
- { -0.0000000000000000, -0.099999999999999978, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17349612891469018, -0.099999999999999978, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34116594505539438, -0.099999999999999978, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.49887649430466685, -0.099999999999999978, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.64489553282165157, -0.099999999999999978, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.77956016553782437, -0.099999999999999978, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.90451074530096309, -0.099999999999999978, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0220113666961632, -0.099999999999999978, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1345351441065563, -0.099999999999999978, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.2445798942989255, -0.099999999999999978, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.099999999999999978, nu=0.59999999999999998.
-template <typename Tp>
-void test087()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data087)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data087[i].k), Tp(data087[i].nu),
- Tp(data087[i].phi));
- const Tp f0 = data087[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=-0.099999999999999978, nu=0.69999999999999996.
-testcase_ellint_3<double> data088[] = {
- { -0.0000000000000000, -0.099999999999999978, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17332403516105052, -0.099999999999999978, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.33989939374896877, -0.099999999999999978, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.49510719568614081, -0.099999999999999978, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.63723607776354974, -0.099999999999999978, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.76693133887935327, -0.099999999999999978, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.88619382078823827, -0.099999999999999978, 0.69999999999999996,
- 1.0471975511965976 },
- { 0.99758012018676490, -0.099999999999999978, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1037642270814410, -0.099999999999999978, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2073745911083187, -0.099999999999999978, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.099999999999999978, nu=0.69999999999999996.
-template <typename Tp>
-void test088()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data088)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data088[i].k), Tp(data088[i].nu),
- Tp(data088[i].phi));
- const Tp f0 = data088[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.9864616042835278e-16
+// mean(f - f_Boost): 1.0547118733938987e-16
+// variance(f - f_Boost): 7.5633408838247182e-32
+// stddev(f - f_Boost): 2.7501528837184157e-16
+const testcase_ellint_3<double>
+data086[10] =
+{
+ { 0.0000000000000000, -0.099999999999999978, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17543059564292182, -0.099999999999999978, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35631088838721664, -0.099999999999999978, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.54839023346436444, -0.099999999999999978, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.75790846946088830, -0.099999999999999978, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 0.99146713686720678, -0.099999999999999978, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.2551692247937198, -0.099999999999999978, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.5524660788146873, -0.099999999999999978, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 1.8806578570830670, -0.099999999999999978, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.2279868912966849, -0.099999999999999978, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler086 = 2.5000000000000020e-13;
+
+// Test data for k=-0.099999999999999978, nu=0.60000000000000009.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.6726146516228014e-16
+// mean(f - f_Boost): -3.6082248300317589e-17
+// variance(f - f_Boost): 1.6073193116120635e-34
+// stddev(f - f_Boost): 1.2678009747638087e-17
+const testcase_ellint_3<double>
+data087[10] =
+{
+ { 0.0000000000000000, -0.099999999999999978, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17561033003590576, -0.099999999999999978, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35781061668171932, -0.099999999999999978, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55381585659629196, -0.099999999999999978, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.77204910484575640, -0.099999999999999978, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0224751740393108, -0.099999999999999978, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3160230906351114, -0.099999999999999978, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.6616282844233206, -0.099999999999999978, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.0592555664850392, -0.099999999999999978, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.4913004919173822, -0.099999999999999978, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler087 = 2.5000000000000020e-13;
+
+// Test data for k=-0.099999999999999978, nu=0.70000000000000007.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 5
+// max(|f - f_Boost| / |f_Boost|): 2.1004074871280821e-16
+// mean(f - f_Boost): 3.3306690738754695e-17
+// variance(f - f_Boost): 1.3695501826753678e-34
+// stddev(f - f_Boost): 1.1702778228589003e-17
+const testcase_ellint_3<double>
+data088[10] =
+{
+ { 0.0000000000000000, -0.099999999999999978, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17579072847532518, -0.099999999999999978, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.35933322840606297, -0.099999999999999978, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.55943788649460324, -0.099999999999999978, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.78716856504031707, -0.099999999999999978, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0571501305617423, -0.099999999999999978, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.3882948301743525, -0.099999999999999978, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.8011785680114223, -0.099999999999999978, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.3057268183616464, -0.099999999999999978, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 2.8771910188009739, -0.099999999999999978, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler088 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.80000000000000004.
-testcase_ellint_3<double> data089[] = {
- { -0.0000000000000000, -0.099999999999999978, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17315255197057020, -0.099999999999999978, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.33864936055747985, -0.099999999999999978, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49143537041117619, -0.099999999999999978, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.62987861760047492, -0.099999999999999978, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.75496005490917517, -0.099999999999999978, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.86903081862701903, -0.099999999999999978, 0.80000000000000004,
- 1.0471975511965976 },
- { 0.97490814820725591, -0.099999999999999978, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.0754290107171083, -0.099999999999999978, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.1733158866987732, -0.099999999999999978, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.099999999999999978, nu=0.80000000000000004.
-template <typename Tp>
-void test089()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data089)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data089[i].k), Tp(data089[i].nu),
- Tp(data089[i].phi));
- const Tp f0 = data089[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.3133043868392355e-16
+// mean(f - f_Boost): 1.8041124150158794e-16
+// variance(f - f_Boost): 6.1843750436434569e-32
+// stddev(f - f_Boost): 2.4868403735751633e-16
+const testcase_ellint_3<double>
+data089[10] =
+{
+ { 0.0000000000000000, -0.099999999999999978, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17597179535373417, -0.099999999999999978, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36087935387831499, -0.099999999999999978, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.56526935244526444, -0.099999999999999978, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.80339402590612397, -0.099999999999999978, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.0963358646374459, -0.099999999999999978, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.4763748483246868, -0.099999999999999978, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 1.9896610222794102, -0.099999999999999978, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.6806423920122024, -0.099999999999999978, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.5246199613295612, -0.099999999999999978, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler089 = 2.5000000000000020e-13;
// Test data for k=-0.099999999999999978, nu=0.90000000000000002.
-testcase_ellint_3<double> data090[] = {
- { -0.0000000000000000, -0.099999999999999978, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17298167549096569, -0.099999999999999978, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33741546662741584, -0.099999999999999978, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.48785665376856879, -0.099999999999999978, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.62280288554518959, -0.099999999999999978, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.74358903115455199, -0.099999999999999978, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.85290207679298358, -0.099999999999999978, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.95379006645397379, -0.099999999999999978, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.0492213119872327, -0.099999999999999978, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.1419839485283374, -0.099999999999999978, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=-0.099999999999999978, nu=0.90000000000000002.
-template <typename Tp>
-void test090()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data090)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data090[i].k), Tp(data090[i].nu),
- Tp(data090[i].phi));
- const Tp f0 = data090[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.5624826890976725e-16
+// mean(f - f_Boost): 2.3314683517128288e-16
+// variance(f - f_Boost): 2.9401198977189756e-31
+// stddev(f - f_Boost): 5.4222872459129045e-16
+const testcase_ellint_3<double>
+data090[10] =
+{
+ { 0.0000000000000000, -0.099999999999999978, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17615353510599349, -0.099999999999999978, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36244964892922371, -0.099999999999999978, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57132457590110530, -0.099999999999999978, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.82087808820385000, -0.099999999999999978, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1411894342144451, -0.099999999999999978, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.5875929286844597, -0.099999999999999978, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.2678622986596659, -0.099999999999999978, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.3697528941897903, -0.099999999999999978, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 4.9862890417305499, -0.099999999999999978, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler090 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.0000000000000000.
-testcase_ellint_3<double> data091[] = {
- { -0.0000000000000000, 0.0000000000000000, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17453292519943295, 0.0000000000000000, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.34906585039886584, 0.0000000000000000, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52359877559829882, 0.0000000000000000, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.69813170079773179, 0.0000000000000000, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.87266462599716477, 0.0000000000000000, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0471975511965976, 0.0000000000000000, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2217304763960304, 0.0000000000000000, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.3962634015954631, 0.0000000000000000, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.5707963267948966, 0.0000000000000000, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.0000000000000000, nu=0.0000000000000000.
-template <typename Tp>
-void test091()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data091)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data091[i].k), Tp(data091[i].nu),
- Tp(data091[i].phi));
- const Tp f0 = data091[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.1203697876423447e-16
+// mean(f - f_Boost): -1.9428902930940238e-17
+// variance(f - f_Boost): 4.6602749271592373e-35
+// stddev(f - f_Boost): 6.8266206333435850e-18
+const testcase_ellint_3<double>
+data091[10] =
+{
+ { 0.0000000000000000, 0.0000000000000000, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17453292519943295, 0.0000000000000000, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.34906585039886590, 0.0000000000000000, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52359877559829882, 0.0000000000000000, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.69813170079773179, 0.0000000000000000, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.87266462599716477, 0.0000000000000000, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0471975511965976, 0.0000000000000000, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2217304763960306, 0.0000000000000000, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.3962634015954636, 0.0000000000000000, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.5707963267948966, 0.0000000000000000, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler091 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.10000000000000001.
-testcase_ellint_3<double> data092[] = {
- { -0.0000000000000000, 0.0000000000000000, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17435710107516608, 0.0000000000000000, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34769194715329604, 0.0000000000000000, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.51913731575866118, 0.0000000000000000, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.68810051897078461, 0.0000000000000000, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.85432615661706823, 0.0000000000000000, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0179006647340796, 0.0000000000000000, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.1792120640746322, 0.0000000000000000, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.3388834245070498, 0.0000000000000000, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.4976955329233277, 0.0000000000000000, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.0000000000000000, nu=0.10000000000000001.
-template <typename Tp>
-void test092()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data092)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data092[i].k), Tp(data092[i].nu),
- Tp(data092[i].phi));
- const Tp f0 = data092[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.1019052604815601e-16
+// mean(f - f_Boost): 2.7755575615628915e-18
+// variance(f - f_Boost): 9.5107651574678312e-37
+// stddev(f - f_Boost): 9.7523151904908366e-19
+const testcase_ellint_3<double>
+data092[10] =
+{
+ { 0.0000000000000000, 0.0000000000000000, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17470938780535167, 0.0000000000000000, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35045931581655582, 0.0000000000000000, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.52819841383849875, 0.0000000000000000, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.70868910807992958, 0.0000000000000000, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.89241311307249638, 0.0000000000000000, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.0794871444666669, 0.0000000000000000, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.2696086247356864, 0.0000000000000000, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.4620562617494721, 0.0000000000000000, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.6557647109660167, 0.0000000000000000, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler092 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.20000000000000001.
-testcase_ellint_3<double> data093[] = {
- { -0.0000000000000000, 0.0000000000000000, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17418191132226077, 0.0000000000000000, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34633712256943405, 0.0000000000000000, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.51480684302043711, 0.0000000000000000, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.67855102942481949, 0.0000000000000000, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.83723056090326253, 0.0000000000000000, 0.20000000000000001,
- 0.87266462599716477 },
- { 0.99114645269578183, 0.0000000000000000, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1411014627915537, 0.0000000000000000, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.2882448138013969, 0.0000000000000000, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.4339343023863691, 0.0000000000000000, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.0000000000000000, nu=0.20000000000000001.
-template <typename Tp>
-void test093()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data093)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data093[i].k), Tp(data093[i].nu),
- Tp(data093[i].phi));
- const Tp f0 = data093[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.0000000000000000, nu=0.29999999999999999.
-testcase_ellint_3<double> data094[] = {
- { -0.0000000000000000, 0.0000000000000000, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17400735186871727, 0.0000000000000000, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34500091027020219, 0.0000000000000000, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51060069523901541, 0.0000000000000000, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.66944393961375459, 0.0000000000000000, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.82123776744538157, 0.0000000000000000, 0.29999999999999999,
- 0.87266462599716477 },
- { 0.96657579245516523, 0.0000000000000000, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1066703663542414, 0.0000000000000000, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.2431094251944901, 0.0000000000000000, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.3776795151134889, 0.0000000000000000, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.0000000000000000, nu=0.29999999999999999.
-template <typename Tp>
-void test094()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data094)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data094[i].k), Tp(data094[i].nu),
- Tp(data094[i].phi));
- const Tp f0 = data094[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.0831888697465320e-16
+// mean(f - f_Boost): -1.9428902930940238e-17
+// variance(f - f_Boost): 4.6602749271592373e-35
+// stddev(f - f_Boost): 6.8266206333435850e-18
+const testcase_ellint_3<double>
+data093[10] =
+{
+ { 0.0000000000000000, 0.0000000000000000, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17488649304197776, 0.0000000000000000, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35187284488675424, 0.0000000000000000, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53294400750146131, 0.0000000000000000, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.71982347021822823, 0.0000000000000000, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.91377311030258745, 0.0000000000000000, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1153429007215137, 0.0000000000000000, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3241202847784086, 0.0000000000000000, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.5385854914338242, 0.0000000000000000, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.7562036827601815, 0.0000000000000000, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler093 = 2.5000000000000020e-13;
+
+// Test data for k=0.0000000000000000, nu=0.30000000000000004.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.0642101770923591e-16
+// mean(f - f_Boost): -1.9428902930940238e-17
+// variance(f - f_Boost): 4.6602749271592373e-35
+// stddev(f - f_Boost): 6.8266206333435850e-18
+const testcase_ellint_3<double>
+data094[10] =
+{
+ { 0.0000000000000000, 0.0000000000000000, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17506424509761404, 0.0000000000000000, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35330695794774630, 0.0000000000000000, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.53784398359522367, 0.0000000000000000, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.73159289408687844, 0.0000000000000000, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.93699031797084975, 0.0000000000000000, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.1555098909390267, 0.0000000000000000, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.3870184960144325, 0.0000000000000000, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.6291980835772994, 0.0000000000000000, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 1.8774607092226381, 0.0000000000000000, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler094 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.40000000000000002.
-testcase_ellint_3<double> data095[] = {
- { -0.0000000000000000, 0.0000000000000000, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17383341868035865, 0.0000000000000000, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34368286022299821, 0.0000000000000000, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.50651268947499406, 0.0000000000000000, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.66074441806097550, 0.0000000000000000, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.80622931670113485, 0.0000000000000000, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.94389791565435233, 0.0000000000000000, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.0753503387899728, 0.0000000000000000, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2025374759127518, 0.0000000000000000, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.3275651989026322, 0.0000000000000000, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.0000000000000000, nu=0.40000000000000002.
-template <typename Tp>
-void test095()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data095)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data095[i].k), Tp(data095[i].nu),
- Tp(data095[i].phi));
- const Tp f0 = data095[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.0449580089795878e-16
+// mean(f - f_Boost): -1.9428902930940238e-17
+// variance(f - f_Boost): 4.6602749271592373e-35
+// stddev(f - f_Boost): 6.8266206333435850e-18
+const testcase_ellint_3<double>
+data095[10] =
+{
+ { 0.0000000000000000, 0.0000000000000000, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17524264820030025, 0.0000000000000000, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35476219513871499, 0.0000000000000000, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54290749235440094, 0.0000000000000000, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.74406433757109913, 0.0000000000000000, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.96236826162553313, 0.0000000000000000, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2009785880262487, 0.0000000000000000, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.4608000106167567, 0.0000000000000000, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.7389349574753439, 0.0000000000000000, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.0278893379868057, 0.0000000000000000, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler095 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.50000000000000000.
-testcase_ellint_3<double> data096[] = {
- { -0.0000000000000000, 0.0000000000000000, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17366010776037047, 0.0000000000000000, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34238253799539309, 0.0000000000000000, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50253707775976408, 0.0000000000000000, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.65242145347295766, 0.0000000000000000, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.79210420018698058, 0.0000000000000000, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.92287437995632193, 0.0000000000000000, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0466900550798661, 0.0000000000000000, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.1658007366618623, 0.0000000000000000, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.2825498301618641, 0.0000000000000000, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.0000000000000000, nu=0.50000000000000000.
-template <typename Tp>
-void test096()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data096)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data096[i].k), Tp(data096[i].nu),
- Tp(data096[i].phi));
- const Tp f0 = data096[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.0000000000000000, nu=0.59999999999999998.
-testcase_ellint_3<double> data097[] = {
- { -0.0000000000000000, 0.0000000000000000, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17348741514884702, 0.0000000000000000, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34109952405241289, 0.0000000000000000, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.49866850781226296, 0.0000000000000000, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.64444732407062510, 0.0000000000000000, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.77877564686544720, 0.0000000000000000, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.90330743691883497, 0.0000000000000000, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0203257987604104, 0.0000000000000000, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1323247918768631, 0.0000000000000000, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.2418235332245127, 0.0000000000000000, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.0000000000000000, nu=0.59999999999999998.
-template <typename Tp>
-void test097()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data097)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data097[i].k), Tp(data097[i].nu),
- Tp(data097[i].phi));
- const Tp f0 = data097[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.0000000000000000, nu=0.69999999999999996.
-testcase_ellint_3<double> data098[] = {
- { -0.0000000000000000, 0.0000000000000000, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17331533692234477, 0.0000000000000000, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.33983341309265941, 0.0000000000000000, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.49490198805931990, 0.0000000000000000, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.63679715525145308, 0.0000000000000000, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.76616861049481944, 0.0000000000000000, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.88503143209004220, 0.0000000000000000, 0.69999999999999996,
- 1.0471975511965976 },
- { 0.99596060249112173, 0.0000000000000000, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1016495050260424, 0.0000000000000000, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2047457872617382, 0.0000000000000000, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.0000000000000000, nu=0.69999999999999996.
-template <typename Tp>
-void test098()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data098)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data098[i].k), Tp(data098[i].nu),
- Tp(data098[i].phi));
- const Tp f0 = data098[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.0254203825026289e-16
+// mean(f - f_Boost): -1.9428902930940238e-17
+// variance(f - f_Boost): 4.6602749271592373e-35
+// stddev(f - f_Boost): 6.8266206333435850e-18
+const testcase_ellint_3<double>
+data096[10] =
+{
+ { 0.0000000000000000, 0.0000000000000000, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17542170661831016, 0.0000000000000000, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35623911740195419, 0.0000000000000000, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.54814449099863127, 0.0000000000000000, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.75731546607718081, 0.0000000000000000, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 0.99028751188233310, 0.0000000000000000, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.2531022857760581, 0.0000000000000000, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.5491761777615785, 0.0000000000000000, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 1.8758359693666533, 0.0000000000000000, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.2214414690791831, 0.0000000000000000, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler096 = 2.5000000000000020e-13;
+
+// Test data for k=0.0000000000000000, nu=0.60000000000000009.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 2.1742785192400269e-16
+// mean(f - f_Boost): 1.3877787807814457e-17
+// variance(f - f_Boost): 2.3776912893669577e-35
+// stddev(f - f_Boost): 4.8761575952454181e-18
+const testcase_ellint_3<double>
+data097[10] =
+{
+ { 0.0000000000000000, 0.0000000000000000, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17560142466065651, 0.0000000000000000, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35773830754879005, 0.0000000000000000, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55356583986445973, 0.0000000000000000, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.77143701715151514, 0.0000000000000000, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0212334940541210, 0.0000000000000000, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3137928444460387, 0.0000000000000000, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.6579755004159076, 0.0000000000000000, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.0537461418295506, 0.0000000000000000, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.4836470664490253, 0.0000000000000000, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler097 = 2.5000000000000020e-13;
+
+// Test data for k=0.0000000000000000, nu=0.70000000000000007.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 4
+// max(|f - f_Boost| / |f_Boost|): 3.0903019454022601e-16
+// mean(f - f_Boost): -6.9388939039072284e-17
+// variance(f - f_Boost): 5.9442282234173945e-34
+// stddev(f - f_Boost): 2.4380787976227090e-17
+const testcase_ellint_3<double>
+data098[10] =
+{
+ { 0.0000000000000000, 0.0000000000000000, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17578180667760368, 0.0000000000000000, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.35926037139410999, 0.0000000000000000, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.55918341315855080, 0.0000000000000000, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.78653584856932546, 0.0000000000000000, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0558379029273324, 0.0000000000000000, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.3858662544850615, 0.0000000000000000, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.7970491170359040, 0.0000000000000000, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.2992404490153917, 0.0000000000000000, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 2.8678686047727382, 0.0000000000000000, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler098 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.80000000000000004.
-testcase_ellint_3<double> data099[] = {
- { -0.0000000000000000, 0.0000000000000000, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17314386919344213, 0.0000000000000000, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.33858381342073240, 0.0000000000000000, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49123285640844738, 0.0000000000000000, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.62944854858904520, 0.0000000000000000, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.75421778305499343, 0.0000000000000000, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.86790634112156639, 0.0000000000000000, 0.80000000000000004,
- 1.0471975511965976 },
- { 0.97334918087427558, 0.0000000000000000, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.0734012615283985, 0.0000000000000000, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.1708024551734544, 0.0000000000000000, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.0000000000000000, nu=0.80000000000000004.
-template <typename Tp>
-void test099()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data099)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data099[i].k), Tp(data099[i].nu),
- Tp(data099[i].phi));
- const Tp f0 = data099[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.2373744057922657e-16
+// mean(f - f_Boost): 1.0269562977782698e-16
+// variance(f - f_Boost): 1.4388836606733082e-32
+// stddev(f - f_Boost): 1.1995347684303728e-16
+const testcase_ellint_3<double>
+data099[10] =
+{
+ { 0.0000000000000000, 0.0000000000000000, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17596285706118869, 0.0000000000000000, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36080593896484231, 0.0000000000000000, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.56501022706967863, 0.0000000000000000, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.80273891984116930, 0.0000000000000000, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.0949425007763358, 0.0000000000000000, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.4736985692253419, 0.0000000000000000, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 1.9848676587180696, 0.0000000000000000, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.6726187823193546, 0.0000000000000000, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.5124073655203634, 0.0000000000000000, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler099 = 2.5000000000000020e-13;
// Test data for k=0.0000000000000000, nu=0.90000000000000002.
-testcase_ellint_3<double> data100[] = {
- { -0.0000000000000000, 0.0000000000000000, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17297300811030600, 0.0000000000000000, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33735034635360817, 0.0000000000000000, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.48765675230233141, 0.0000000000000000, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.62238126886123568, 0.0000000000000000, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.74286600807269243, 0.0000000000000000, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.85181283909264971, 0.0000000000000000, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.95228683995371122, 0.0000000000000000, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.0472730487412552, 0.0000000000000000, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.1395754288497419, 0.0000000000000000, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.0000000000000000, nu=0.90000000000000002.
-template <typename Tp>
-void test100()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data100)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data100[i].k), Tp(data100[i].nu),
- Tp(data100[i].phi));
- const Tp f0 = data100[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 6.6108624815885066e-16
+// mean(f - f_Boost): 2.1371793224034264e-16
+// variance(f - f_Boost): 5.6389326618626776e-33
+// stddev(f - f_Boost): 7.5092826966779442e-17
+const testcase_ellint_3<double>
+data100[10] =
+{
+ { 0.0000000000000000, 0.0000000000000000, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17614458024574997, 0.0000000000000000, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36237566578821978, 0.0000000000000000, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57106058859196640, 0.0000000000000000, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.82019857015755915, 0.0000000000000000, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1397014388908147, 0.0000000000000000, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.5845952415154960, 0.0000000000000000, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.2620531413370775, 0.0000000000000000, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.3587842061975066, 0.0000000000000000, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 4.9672941328980507, 0.0000000000000000, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler100 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.0000000000000000.
-testcase_ellint_3<double> data101[] = {
- { -0.0000000000000000, 0.10000000000000009, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17454173353063665, 0.10000000000000009, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.34913506721468085, 0.10000000000000009, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52382550016538953, 0.10000000000000009, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.69864700854177031, 0.10000000000000009, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.87361792586964870, 0.10000000000000009, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0487386319621685, 0.10000000000000009, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2239913752078757, 0.10000000000000009, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.3993423113684049, 0.10000000000000009, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.5747455615173562, 0.10000000000000009, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.10000000000000009, nu=0.0000000000000000.
-template <typename Tp>
-void test101()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data101)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data101[i].k), Tp(data101[i].nu),
- Tp(data101[i].phi));
- const Tp f0 = data101[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.1735566504509645e-16
+// mean(f - f_Boost): -5.8286708792820721e-17
+// variance(f - f_Boost): 4.1942474344433133e-34
+// stddev(f - f_Boost): 2.0479861900030756e-17
+const testcase_ellint_3<double>
+data101[10] =
+{
+ { 0.0000000000000000, 0.10000000000000009, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17454173353063662, 0.10000000000000009, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.34913506721468096, 0.10000000000000009, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52382550016538953, 0.10000000000000009, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.69864700854177020, 0.10000000000000009, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.87361792586964859, 0.10000000000000009, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0487386319621685, 0.10000000000000009, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2239913752078759, 0.10000000000000009, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.3993423113684051, 0.10000000000000009, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.5747455615173560, 0.10000000000000009, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler101 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.10000000000000001.
-testcase_ellint_3<double> data102[] = {
- { -0.0000000000000000, 0.10000000000000009, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17436589347616618, 0.10000000000000009, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34776067871237354, 0.10000000000000009, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.51936064354727807, 0.10000000000000009, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.68860303749364360, 0.10000000000000009, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.85524561882332051, 0.10000000000000009, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0193708301908337, 0.10000000000000009, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.1813474067123044, 0.10000000000000009, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.3417670770424983, 0.10000000000000009, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.5013711111199950, 0.10000000000000009, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.10000000000000009, nu=0.10000000000000001.
-template <typename Tp>
-void test102()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data102)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data102[i].k), Tp(data102[i].nu),
- Tp(data102[i].phi));
- const Tp f0 = data102[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.0305747373482148e-16
+// mean(f - f_Boost): -3.0531133177191807e-17
+// variance(f - f_Boost): 1.1508025840536076e-34
+// stddev(f - f_Boost): 1.0727546709539920e-17
+const testcase_ellint_3<double>
+data102[10] =
+{
+ { 0.0000000000000000, 0.10000000000000009, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17471821213559732, 0.10000000000000009, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35052902610011138, 0.10000000000000009, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.52842865990255727, 0.10000000000000009, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.70921799731166713, 0.10000000000000009, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.89340330535868662, 0.10000000000000009, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.0811075784236857, 0.10000000000000009, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.2720133232666426, 0.10000000000000009, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.4653630031861395, 0.10000000000000009, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.6600374067558428, 0.10000000000000009, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler102 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.20000000000000001.
-testcase_ellint_3<double> data103[] = {
- { -0.0000000000000000, 0.10000000000000009, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17419068786141345, 0.10000000000000009, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34640537686230127, 0.10000000000000009, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.51502689171753957, 0.10000000000000009, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.67904147863672726, 0.10000000000000009, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.83811885126105179, 0.10000000000000009, 0.20000000000000001,
- 0.87266462599716477 },
- { 0.99255278555742810, 0.10000000000000009, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1431260546194930, 0.10000000000000009, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.2909589656532101, 0.10000000000000009, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.4373749386463430, 0.10000000000000009, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.10000000000000009, nu=0.20000000000000001.
-template <typename Tp>
-void test103()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data103)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data103[i].k), Tp(data103[i].nu),
- Tp(data103[i].phi));
- const Tp f0 = data103[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.10000000000000009, nu=0.29999999999999999.
-testcase_ellint_3<double> data104[] = {
- { -0.0000000000000000, 0.10000000000000009, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17401611261390110, 0.10000000000000009, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34506869507511767, 0.10000000000000009, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51081757604259870, 0.10000000000000009, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.66992297597712303, 0.10000000000000009, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.82209722856174228, 0.10000000000000009, 0.29999999999999999,
- 0.87266462599716477 },
- { 0.96792430487669612, 0.10000000000000009, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1085964108954092, 0.10000000000000009, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.2456748370836999, 0.10000000000000009, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.3809159606704959, 0.10000000000000009, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.10000000000000009, nu=0.29999999999999999.
-template <typename Tp>
-void test104()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data104)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data104[i].k), Tp(data104[i].nu),
- Tp(data104[i].phi));
- const Tp f0 = data104[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 1.6736714959992433e-16
+// mean(f - f_Boost): 5.5511151231257830e-18
+// variance(f - f_Boost): 3.8043060629871325e-36
+// stddev(f - f_Boost): 1.9504630380981673e-18
+const testcase_ellint_3<double>
+data103[10] =
+{
+ { 0.0000000000000000, 0.10000000000000009, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17489533344059083, 0.10000000000000009, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35194305707815038, 0.10000000000000009, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53317790741512527, 0.10000000000000009, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.72036681615081222, 0.10000000000000009, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.91480372268244303, 0.10000000000000009, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1170528708071514, 0.10000000000000009, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3266916802718358, 0.10000000000000009, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.5421622241831547, 0.10000000000000009, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.7608656115083421, 0.10000000000000009, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler103 = 2.5000000000000020e-13;
+
+// Test data for k=0.10000000000000009, nu=0.30000000000000004.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 1.9186071760326645e-16
+// mean(f - f_Boost): -1.6653345369377347e-17
+// variance(f - f_Boost): 3.4238754566884194e-35
+// stddev(f - f_Boost): 5.8513891142945016e-18
+const testcase_ellint_3<double>
+data104[10] =
+{
+ { 0.0000000000000000, 0.10000000000000009, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17507310163441189, 0.10000000000000009, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35337768072524217, 0.10000000000000009, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.53808167801629170, 0.10000000000000009, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.73215166755955019, 0.10000000000000009, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.93806546000201219, 0.10000000000000009, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.1573218723395986, 0.10000000000000009, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.3897859679542097, 0.10000000000000009, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.6331009404328622, 0.10000000000000009, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 1.8826015946315438, 0.10000000000000009, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler104 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.40000000000000002.
-testcase_ellint_3<double> data105[] = {
- { -0.0000000000000000, 0.10000000000000009, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17384216369897937, 0.10000000000000009, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34375018311376782, 0.10000000000000009, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.50672650758380455, 0.10000000000000009, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.66121264213337616, 0.10000000000000009, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.80706202005774441, 0.10000000000000009, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.94519376138245892, 0.10000000000000009, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.0771880300759584, 0.10000000000000009, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2049711557188272, 0.10000000000000009, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.3306223265207477, 0.10000000000000009, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.10000000000000009, nu=0.40000000000000002.
-template <typename Tp>
-void test105()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data105)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data105[i].k), Tp(data105[i].nu),
- Tp(data105[i].phi));
- const Tp f0 = data105[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.0338059536914377e-16
+// mean(f - f_Boost): 2.7755575615628914e-17
+// variance(f - f_Boost): 9.5107651574678308e-35
+// stddev(f - f_Boost): 9.7523151904908362e-18
+const testcase_ellint_3<double>
+data105[10] =
+{
+ { 0.0000000000000000, 0.10000000000000009, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17525152094559704, 0.10000000000000009, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35483343742825979, 0.10000000000000009, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54314913099505446, 0.10000000000000009, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.74463962034766862, 0.10000000000000009, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.96349276837570441, 0.10000000000000009, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2029081382746343, 0.10000000000000009, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.4638022887050806, 0.10000000000000009, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.7432413830105224, 0.10000000000000009, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.0336367403076760, 0.10000000000000009, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler105 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.50000000000000000.
-testcase_ellint_3<double> data106[] = {
- { -0.0000000000000000, 0.10000000000000009, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17366883711936554, 0.10000000000000009, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34244940634881876, 0.10000000000000009, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50274793281634378, 0.10000000000000009, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.65287941633275093, 0.10000000000000009, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.79291198790315398, 0.10000000000000009, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.92412201537880345, 0.10000000000000009, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0484480076799370, 0.10000000000000009, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.1681168130475206, 0.10000000000000009, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.2854480708580160, 0.10000000000000009, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.10000000000000009, nu=0.50000000000000000.
-template <typename Tp>
-void test106()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data106)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data106[i].k), Tp(data106[i].nu),
- Tp(data106[i].phi));
- const Tp f0 = data106[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.10000000000000009, nu=0.59999999999999998.
-testcase_ellint_3<double> data107[] = {
- { -0.0000000000000000, 0.10000000000000009, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17349612891469018, 0.10000000000000009, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34116594505539438, 0.10000000000000009, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.49887649430466685, 0.10000000000000009, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.64489553282165157, 0.10000000000000009, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.77956016553782437, 0.10000000000000009, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.90451074530096309, 0.10000000000000009, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0220113666961632, 0.10000000000000009, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1345351441065563, 0.10000000000000009, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.2445798942989255, 0.10000000000000009, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.10000000000000009, nu=0.59999999999999998.
-template <typename Tp>
-void test107()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data107)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data107[i].k), Tp(data107[i].nu),
- Tp(data107[i].phi));
- const Tp f0 = data107[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.10000000000000009, nu=0.69999999999999996.
-testcase_ellint_3<double> data108[] = {
- { -0.0000000000000000, 0.10000000000000009, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17332403516105052, 0.10000000000000009, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.33989939374896877, 0.10000000000000009, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.49510719568614081, 0.10000000000000009, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.63723607776354974, 0.10000000000000009, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.76693133887935327, 0.10000000000000009, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.88619382078823827, 0.10000000000000009, 0.69999999999999996,
- 1.0471975511965976 },
- { 0.99758012018676490, 0.10000000000000009, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1037642270814410, 0.10000000000000009, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2073745911083187, 0.10000000000000009, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.10000000000000009, nu=0.69999999999999996.
-template <typename Tp>
-void test108()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data108)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data108[i].k), Tp(data108[i].nu),
- Tp(data108[i].phi));
- const Tp f0 = data108[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.9864616042835278e-16
+// mean(f - f_Boost): 9.4368957093138303e-17
+// variance(f - f_Boost): 7.7794254682023874e-32
+// stddev(f - f_Boost): 2.7891621444803792e-16
+const testcase_ellint_3<double>
+data106[10] =
+{
+ { 0.0000000000000000, 0.10000000000000009, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17543059564292182, 0.10000000000000009, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35631088838721664, 0.10000000000000009, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.54839023346436455, 0.10000000000000009, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.75790846946088830, 0.10000000000000009, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 0.99146713686720678, 0.10000000000000009, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.2551692247937198, 0.10000000000000009, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.5524660788146873, 0.10000000000000009, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 1.8806578570830670, 0.10000000000000009, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.2279868912966849, 0.10000000000000009, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler106 = 2.5000000000000020e-13;
+
+// Test data for k=0.10000000000000009, nu=0.60000000000000009.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.6726146516228014e-16
+// mean(f - f_Boost): -3.6082248300317589e-17
+// variance(f - f_Boost): 1.6073193116120635e-34
+// stddev(f - f_Boost): 1.2678009747638087e-17
+const testcase_ellint_3<double>
+data107[10] =
+{
+ { 0.0000000000000000, 0.10000000000000009, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17561033003590576, 0.10000000000000009, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35781061668171932, 0.10000000000000009, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55381585659629196, 0.10000000000000009, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.77204910484575640, 0.10000000000000009, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0224751740393108, 0.10000000000000009, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3160230906351114, 0.10000000000000009, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.6616282844233206, 0.10000000000000009, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.0592555664850392, 0.10000000000000009, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.4913004919173822, 0.10000000000000009, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler107 = 2.5000000000000020e-13;
+
+// Test data for k=0.10000000000000009, nu=0.70000000000000007.
+// max(|f - f_Boost|): 2.2204460492503131e-16 at index 5
+// max(|f - f_Boost| / |f_Boost|): 2.1004074871280821e-16
+// mean(f - f_Boost): 3.3306690738754695e-17
+// variance(f - f_Boost): 1.3695501826753678e-34
+// stddev(f - f_Boost): 1.1702778228589003e-17
+const testcase_ellint_3<double>
+data108[10] =
+{
+ { 0.0000000000000000, 0.10000000000000009, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17579072847532518, 0.10000000000000009, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.35933322840606297, 0.10000000000000009, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.55943788649460324, 0.10000000000000009, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.78716856504031707, 0.10000000000000009, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0571501305617423, 0.10000000000000009, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.3882948301743525, 0.10000000000000009, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.8011785680114223, 0.10000000000000009, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.3057268183616464, 0.10000000000000009, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 2.8771910188009739, 0.10000000000000009, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler108 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.80000000000000004.
-testcase_ellint_3<double> data109[] = {
- { -0.0000000000000000, 0.10000000000000009, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17315255197057020, 0.10000000000000009, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.33864936055747985, 0.10000000000000009, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49143537041117619, 0.10000000000000009, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.62987861760047492, 0.10000000000000009, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.75496005490917517, 0.10000000000000009, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.86903081862701903, 0.10000000000000009, 0.80000000000000004,
- 1.0471975511965976 },
- { 0.97490814820725591, 0.10000000000000009, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.0754290107171083, 0.10000000000000009, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.1733158866987732, 0.10000000000000009, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.10000000000000009, nu=0.80000000000000004.
-template <typename Tp>
-void test109()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data109)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data109[i].k), Tp(data109[i].nu),
- Tp(data109[i].phi));
- const Tp f0 = data109[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.3133043868392355e-16
+// mean(f - f_Boost): 1.8041124150158794e-16
+// variance(f - f_Boost): 6.1843750436434569e-32
+// stddev(f - f_Boost): 2.4868403735751633e-16
+const testcase_ellint_3<double>
+data109[10] =
+{
+ { 0.0000000000000000, 0.10000000000000009, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17597179535373417, 0.10000000000000009, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36087935387831499, 0.10000000000000009, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.56526935244526444, 0.10000000000000009, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.80339402590612397, 0.10000000000000009, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.0963358646374459, 0.10000000000000009, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.4763748483246868, 0.10000000000000009, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 1.9896610222794102, 0.10000000000000009, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.6806423920122024, 0.10000000000000009, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.5246199613295612, 0.10000000000000009, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler109 = 2.5000000000000020e-13;
// Test data for k=0.10000000000000009, nu=0.90000000000000002.
-testcase_ellint_3<double> data110[] = {
- { -0.0000000000000000, 0.10000000000000009, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17298167549096569, 0.10000000000000009, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33741546662741584, 0.10000000000000009, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.48785665376856879, 0.10000000000000009, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.62280288554518959, 0.10000000000000009, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.74358903115455199, 0.10000000000000009, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.85290207679298358, 0.10000000000000009, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.95379006645397379, 0.10000000000000009, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.0492213119872327, 0.10000000000000009, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.1419839485283374, 0.10000000000000009, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.10000000000000009, nu=0.90000000000000002.
-template <typename Tp>
-void test110()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data110)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data110[i].k), Tp(data110[i].nu),
- Tp(data110[i].phi));
- const Tp f0 = data110[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996, nu=0.0000000000000000.
-testcase_ellint_3<double> data111[] = {
- { -0.0000000000000000, 0.19999999999999996, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17456817290292811, 0.19999999999999996, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.34934315932086801, 0.19999999999999996, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52450880529443988, 0.19999999999999996, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.70020491009844910, 0.19999999999999996, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.87651006649967955, 0.19999999999999996, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0534305870298994, 0.19999999999999996, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2308975521670784, 0.19999999999999996, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.4087733584990738, 0.19999999999999996, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.5868678474541664, 0.19999999999999996, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.19999999999999996, nu=0.0000000000000000.
-template <typename Tp>
-void test111()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data111)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data111[i].k), Tp(data111[i].nu),
- Tp(data111[i].phi));
- const Tp f0 = data111[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996, nu=0.10000000000000001.
-testcase_ellint_3<double> data112[] = {
- { -0.0000000000000000, 0.19999999999999996, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17439228502691750, 0.19999999999999996, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34796731137565740, 0.19999999999999996, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.52003370294544848, 0.19999999999999996, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.69012222258631495, 0.19999999999999996, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.85803491465566772, 0.19999999999999996, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0238463961099364, 0.19999999999999996, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.1878691059202153, 0.19999999999999996, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.3505985031831940, 0.19999999999999996, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.5126513474261092, 0.19999999999999996, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.19999999999999996, nu=0.10000000000000001.
-template <typename Tp>
-void test112()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data112)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data112[i].k), Tp(data112[i].nu),
- Tp(data112[i].phi));
- const Tp f0 = data112[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996, nu=0.20000000000000001.
-testcase_ellint_3<double> data113[] = {
- { -0.0000000000000000, 0.19999999999999996, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17421703179583750, 0.19999999999999996, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34661057411998791, 0.19999999999999996, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.51569006052647393, 0.19999999999999996, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.68052412821107278, 0.19999999999999996, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.84081341263313825, 0.19999999999999996, 0.20000000000000001,
- 0.87266462599716477 },
- { 0.99683359988842890, 0.19999999999999996, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1493086715118852, 0.19999999999999996, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.2992699693957541, 0.19999999999999996, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.4479323932249568, 0.19999999999999996, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.19999999999999996, nu=0.20000000000000001.
-template <typename Tp>
-void test113()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data113)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data113[i].k), Tp(data113[i].nu),
- Tp(data113[i].phi));
- const Tp f0 = data113[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996, nu=0.29999999999999999.
-testcase_ellint_3<double> data114[] = {
- { -0.0000000000000000, 0.19999999999999996, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17404240913577707, 0.19999999999999996, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34527248032587193, 0.19999999999999996, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51147118981668416, 0.19999999999999996, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.67137107867777635, 0.19999999999999996, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.82470418188668893, 0.19999999999999996, 0.29999999999999999,
- 0.87266462599716477 },
- { 0.97202873223594299, 0.19999999999999996, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1144773569375266, 0.19999999999999996, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.2535292433701000, 0.19999999999999996, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.3908453514752481, 0.19999999999999996, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.19999999999999996, nu=0.29999999999999999.
-template <typename Tp>
-void test114()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data114)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data114[i].k), Tp(data114[i].nu),
- Tp(data114[i].phi));
- const Tp f0 = data114[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996, nu=0.40000000000000002.
-testcase_ellint_3<double> data115[] = {
- { -0.0000000000000000, 0.19999999999999996, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17386841301066677, 0.19999999999999996, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34395257914113253, 0.19999999999999996, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.50737088376869466, 0.19999999999999996, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.66262801717277664, 0.19999999999999996, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.80958766645079094, 0.19999999999999996, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.94913754236162040, 0.19999999999999996, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.0827985514223000, 0.19999999999999996, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2124212429050478, 0.19999999999999996, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.3400002519661010, 0.19999999999999996, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.19999999999999996, nu=0.40000000000000002.
-template <typename Tp>
-void test115()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data115)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data115[i].k), Tp(data115[i].nu),
- Tp(data115[i].phi));
- const Tp f0 = data115[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996, nu=0.50000000000000000.
-testcase_ellint_3<double> data116[] = {
- { -0.0000000000000000, 0.19999999999999996, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17369503942181802, 0.19999999999999996, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34265043534362660, 0.19999999999999996, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50338337208655415, 0.19999999999999996, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.65426373297163642, 0.19999999999999996, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.79536193036145808, 0.19999999999999996, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.92791875910061605, 0.19999999999999996, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0538145052725829, 0.19999999999999996, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.1752060022875899, 0.19999999999999996, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.2943374404397376, 0.19999999999999996, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.19999999999999996, nu=0.50000000000000000.
-template <typename Tp>
-void test116()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data116)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data116[i].k), Tp(data116[i].nu),
- Tp(data116[i].phi));
- const Tp f0 = data116[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996, nu=0.59999999999999998.
-testcase_ellint_3<double> data117[] = {
- { -0.0000000000000000, 0.19999999999999996, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17352228440746928, 0.19999999999999996, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34136562863713626, 0.19999999999999996, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.49950328177638481, 0.19999999999999996, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.64625032705690832, 0.19999999999999996, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.78193941198403094, 0.19999999999999996, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.90817230934317128, 0.19999999999999996, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0271563751276462, 0.19999999999999996, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1412999379040518, 0.19999999999999996, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.2530330675914561, 0.19999999999999996, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.19999999999999996, nu=0.59999999999999998.
-template <typename Tp>
-void test117()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data117)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data117[i].k), Tp(data117[i].nu),
- Tp(data117[i].phi));
- const Tp f0 = data117[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996, nu=0.69999999999999996.
-testcase_ellint_3<double> data118[] = {
- { -0.0000000000000000, 0.19999999999999996, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17335014404233898, 0.19999999999999996, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34009775298617811, 0.19999999999999996, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.49572560201923810, 0.19999999999999996, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.63856276669886525, 0.19999999999999996, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.76924438644867565, 0.19999999999999996, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.88973060843856466, 0.19999999999999996, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0025230471636377, 0.19999999999999996, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1102356376093103, 0.19999999999999996, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2154356555075867, 0.19999999999999996, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.19999999999999996, nu=0.69999999999999996.
-template <typename Tp>
-void test118()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data118)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data118[i].k), Tp(data118[i].nu),
- Tp(data118[i].phi));
- const Tp f0 = data118[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996, nu=0.80000000000000004.
-testcase_ellint_3<double> data119[] = {
- { -0.0000000000000000, 0.19999999999999996, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17317861443718541, 0.19999999999999996, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.33884641598718701, 0.19999999999999996, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49204565281259494, 0.19999999999999996, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.63117851188220353, 0.19999999999999996, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.75721095949544170, 0.19999999999999996, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.87245201443919118, 0.19999999999999996, 0.80000000000000004,
- 1.0471975511965976 },
- { 0.97966584238831089, 0.19999999999999996, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.0816336325174360, 0.19999999999999996, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.1810223448909913, 0.19999999999999996, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.19999999999999996, nu=0.80000000000000004.
-template <typename Tp>
-void test119()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data119)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data119[i].k), Tp(data119[i].nu),
- Tp(data119[i].phi));
- const Tp f0 = data119[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.19999999999999996, nu=0.90000000000000002.
-testcase_ellint_3<double> data120[] = {
- { -0.0000000000000000, 0.19999999999999996, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17300769173837280, 0.19999999999999996, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33761123827372508, 0.19999999999999996, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.48845905690769426, 0.19999999999999996, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.62407720017324986, 0.19999999999999996, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.74578146525124289, 0.19999999999999996, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.85621583540073076, 0.19999999999999996, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.95837725988001199, 0.19999999999999996, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.0551821412633928, 0.19999999999999996, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.1493679916141863, 0.19999999999999996, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.19999999999999996, nu=0.90000000000000002.
-template <typename Tp>
-void test120()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data120)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data120[i].k), Tp(data120[i].nu),
- Tp(data120[i].phi));
- const Tp f0 = data120[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.5624826890976725e-16
+// mean(f - f_Boost): 2.3314683517128288e-16
+// variance(f - f_Boost): 2.9401198977189756e-31
+// stddev(f - f_Boost): 5.4222872459129045e-16
+const testcase_ellint_3<double>
+data110[10] =
+{
+ { 0.0000000000000000, 0.10000000000000009, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17615353510599349, 0.10000000000000009, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36244964892922371, 0.10000000000000009, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57132457590110530, 0.10000000000000009, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.82087808820385000, 0.10000000000000009, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1411894342144451, 0.10000000000000009, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.5875929286844597, 0.10000000000000009, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.2678622986596659, 0.10000000000000009, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.3697528941897903, 0.10000000000000009, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 4.9862890417305499, 0.10000000000000009, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler110 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018, nu=0.0000000000000000.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 4.2156475739151676e-16
+// mean(f - f_Boost): -5.2735593669694933e-17
+// variance(f - f_Boost): 3.0473442641042680e-32
+// stddev(f - f_Boost): 1.7456644190978597e-16
+const testcase_ellint_3<double>
+data111[10] =
+{
+ { 0.0000000000000000, 0.20000000000000018, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17456817290292806, 0.20000000000000018, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.34934315932086796, 0.20000000000000018, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52450880529443988, 0.20000000000000018, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.70020491009844887, 0.20000000000000018, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.87651006649967977, 0.20000000000000018, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0534305870298994, 0.20000000000000018, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2308975521670789, 0.20000000000000018, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.4087733584990738, 0.20000000000000018, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.5868678474541662, 0.20000000000000018, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler111 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018, nu=0.10000000000000001.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 4.0890622182605400e-16
+// mean(f - f_Boost): -3.8857805861880476e-17
+// variance(f - f_Boost): 2.8794792590749608e-32
+// stddev(f - f_Boost): 1.6969028431454054e-16
+const testcase_ellint_3<double>
+data112[10] =
+{
+ { 0.0000000000000000, 0.20000000000000018, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17474469953608965, 0.20000000000000018, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35073860234984255, 0.20000000000000018, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.52912258712951521, 0.20000000000000018, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.71081701558898069, 0.20000000000000018, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.89640758521169384, 0.20000000000000018, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.0860417038089853, 0.20000000000000018, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.2793599255528623, 0.20000000000000018, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.4754938544089076, 0.20000000000000018, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.6731552050562593, 0.20000000000000018, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler112 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018, nu=0.20000000000000001.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 3.9570963716579749e-16
+// mean(f - f_Boost): -5.8286708792820721e-17
+// variance(f - f_Boost): 3.1158217732380362e-32
+// stddev(f - f_Boost): 1.7651690494788412e-16
+const testcase_ellint_3<double>
+data113[10] =
+{
+ { 0.0000000000000000, 0.20000000000000018, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17492186907740698, 0.20000000000000018, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35215414286134267, 0.20000000000000018, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53388285615182440, 0.20000000000000018, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.72200960282688265, 0.20000000000000018, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.91793087614428526, 0.20000000000000018, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1222602841587976, 0.20000000000000018, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3345489407496247, 0.20000000000000018, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.5531225705475502, 0.20000000000000018, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.7751816279738935, 0.20000000000000018, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler113 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.6785817924053817e-16
+// mean(f - f_Boost): -1.1102230246251566e-17
+// variance(f - f_Boost): 9.9840208317034302e-32
+// stddev(f - f_Boost): 3.1597501217190311e-16
+const testcase_ellint_3<double>
+data114[10] =
+{
+ { 0.0000000000000000, 0.20000000000000018, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17509968571715159, 0.20000000000000018, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35359030214835629, 0.20000000000000018, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.53879807274537084, 0.20000000000000018, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.73384116418059731, 0.20000000000000018, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.94132799329524031, 0.20000000000000018, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.1628407021801439, 0.20000000000000018, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.3982440216739438, 0.20000000000000018, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.6450634983653640, 0.20000000000000018, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 1.8983924169967099, 0.20000000000000018, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler114 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018, nu=0.40000000000000002.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 6
+// max(|f - f_Boost| / |f_Boost|): 3.6738449250038925e-16
+// mean(f - f_Boost): -3.0531133177191807e-17
+// variance(f - f_Boost): 2.7810428396951687e-32
+// stddev(f - f_Boost): 1.6676458975739331e-16
+const testcase_ellint_3<double>
+data115[10] =
+{
+ { 0.0000000000000000, 0.20000000000000018, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17527815368535152, 0.20000000000000018, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35504762134297801, 0.20000000000000018, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54387742353211344, 0.20000000000000018, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.74637910471804259, 0.20000000000000018, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.96690539714174639, 0.20000000000000018, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2087859420184757, 0.20000000000000018, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.4729799844168852, 0.20000000000000018, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.7564445064596661, 0.20000000000000018, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.0512956926676806, 0.20000000000000018, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler115 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018, nu=0.50000000000000000.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.3841806057292116e-16
+// mean(f - f_Boost): 3.6082248300317589e-17
+// variance(f - f_Boost): 8.9638010532618564e-32
+// stddev(f - f_Boost): 2.9939607634806868e-16
+const testcase_ellint_3<double>
+data116[10] =
+{
+ { 0.0000000000000000, 0.20000000000000018, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17545727725228877, 0.20000000000000018, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35652666242062175, 0.20000000000000018, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.54913090549102406, 0.20000000000000018, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.75970161209211551, 0.20000000000000018, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 0.99504737401590326, 0.20000000000000018, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.2614666007124373, 0.20000000000000018, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.5625255355205498, 0.20000000000000018, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 1.8954460255613346, 0.20000000000000018, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.2481046259421302, 0.20000000000000018, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler116 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018, nu=0.60000000000000009.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.5317584994994743e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 1.0045745697575397e-31
+// stddev(f - f_Boost): 3.1695024369095219e-16
+const testcase_ellint_3<double>
+data117[10] =
+{
+ { 0.0000000000000000, 0.20000000000000018, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17563706072900442, 0.20000000000000018, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35802800926807238, 0.20000000000000018, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55456942250515051, 0.20000000000000018, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.77390003828438203, 0.20000000000000018, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0262441366366397, 0.20000000000000018, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3228192988439669, 0.20000000000000018, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.6728005754680795, 0.20000000000000018, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.0761587107468511, 0.20000000000000018, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.5148333891629315, 0.20000000000000018, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler117 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018, nu=0.70000000000000007.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.2209418045118284e-16
+// mean(f - f_Boost): 2.4980018054066023e-17
+// variance(f - f_Boost): 9.1989071679544611e-32
+// stddev(f - f_Boost): 3.0329700242426498e-16
+const testcase_ellint_3<double>
+data118[10] =
+{
+ { 0.0000000000000000, 0.20000000000000018, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17581750846781172, 0.20000000000000018, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.35955226882028513, 0.20000000000000018, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.56020489659466499, 0.20000000000000018, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.78908196988531498, 0.20000000000000018, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0611336754143517, 0.20000000000000018, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.3956969951058884, 0.20000000000000018, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.8138131612209609, 0.20000000000000018, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.3256365528879561, 0.20000000000000018, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 2.9058704854500963, 0.20000000000000018, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler118 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018, nu=0.80000000000000004.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.7399960886656824e-16
+// mean(f - f_Boost): 1.3877787807814457e-16
+// variance(f - f_Boost): 1.7585404776158019e-31
+// stddev(f - f_Boost): 4.1934955319110593e-16
+const testcase_ellint_3<double>
+data119[10] =
+{
+ { 0.0000000000000000, 0.20000000000000018, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17599862486281712, 0.20000000000000018, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36110007227128776, 0.20000000000000018, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.56605039658567224, 0.20000000000000018, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.80537523874517691, 0.20000000000000018, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1005662342414086, 0.20000000000000018, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.4845340298105778, 0.20000000000000018, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.0043332244969392, 0.20000000000000018, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.7052856676744761, 0.20000000000000018, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.5622166386422633, 0.20000000000000018, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler119 = 2.5000000000000020e-13;
+
+// Test data for k=0.20000000000000018, nu=0.90000000000000002.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1718503329017390e-16
+// mean(f - f_Boost): 2.3592239273284576e-16
+// variance(f - f_Boost): 2.9295534376290287e-31
+// stddev(f - f_Boost): 5.4125349307224141e-16
+const testcase_ellint_3<double>
+data120[10] =
+{
+ { 0.0000000000000000, 0.20000000000000018, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17618041435044951, 0.20000000000000018, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36267207636502929, 0.20000000000000018, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57212028758237743, 0.20000000000000018, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.82293323876704483, 0.20000000000000018, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1457077279880388, 0.20000000000000018, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.5967346899325681, 0.20000000000000018, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.2856537353421724, 0.20000000000000018, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.4034714304613902, 0.20000000000000018, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 5.0448269356200370, 0.20000000000000018, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler120 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.0000000000000000.
-testcase_ellint_3<double> data121[] = {
- { -0.0000000000000000, 0.30000000000000004, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17461228653000102, 0.30000000000000004, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.34969146102798415, 0.30000000000000004, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52565822873726320, 0.30000000000000004, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.70284226512408532, 0.30000000000000004, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.88144139195111182, 0.30000000000000004, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0614897067260523, 0.30000000000000004, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2428416824174218, 0.30000000000000004, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.4251795877015925, 0.30000000000000004, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.6080486199305126, 0.30000000000000004, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.30000000000000004, nu=0.0000000000000000.
-template <typename Tp>
-void test121()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data121)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data121[i].k), Tp(data121[i].nu),
- Tp(data121[i].phi));
- const Tp f0 = data121[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.2241249691539529e-16
+// mean(f - f_Boost): 2.7755575615628914e-17
+// variance(f - f_Boost): 2.1399221604302621e-32
+// stddev(f - f_Boost): 1.4628472785736254e-16
+const testcase_ellint_3<double>
+data121[10] =
+{
+ { 0.0000000000000000, 0.30000000000000004, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17461228653000099, 0.30000000000000004, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.34969146102798421, 0.30000000000000004, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52565822873726309, 0.30000000000000004, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.70284226512408543, 0.30000000000000004, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.88144139195111171, 0.30000000000000004, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0614897067260520, 0.30000000000000004, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2428416824174220, 0.30000000000000004, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.4251795877015929, 0.30000000000000004, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.6080486199305128, 0.30000000000000004, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler121 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.10000000000000001.
-testcase_ellint_3<double> data122[] = {
- { -0.0000000000000000, 0.30000000000000004, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17443631884814378, 0.30000000000000004, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34831316835124926, 0.30000000000000004, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.52116586276523857, 0.30000000000000004, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.69269385837910036, 0.30000000000000004, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.86279023163070856, 0.30000000000000004, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0315321461438265, 0.30000000000000004, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.1991449111869024, 0.30000000000000004, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.3659561780923211, 0.30000000000000004, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.5323534693557526, 0.30000000000000004, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.30000000000000004, nu=0.10000000000000001.
-template <typename Tp>
-void test122()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data122)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data122[i].k), Tp(data122[i].nu),
- Tp(data122[i].phi));
- const Tp f0 = data122[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1872304407982844e-16
+// mean(f - f_Boost): 7.2164496600635178e-17
+// variance(f - f_Boost): 4.3555500115139682e-32
+// stddev(f - f_Boost): 2.0869954507650391e-16
+const testcase_ellint_3<double>
+data122[10] =
+{
+ { 0.0000000000000000, 0.30000000000000004, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17478889331392972, 0.30000000000000004, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35108939018329183, 0.30000000000000004, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.53028990896115835, 0.30000000000000004, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.71352417052371409, 0.30000000000000004, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.90153086032405894, 0.30000000000000004, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.0945187977283313, 0.30000000000000004, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.2920699268385683, 0.30000000000000004, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.4931243665896394, 0.30000000000000004, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.6960848815118226, 0.30000000000000004, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler122 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.20000000000000001.
-testcase_ellint_3<double> data123[] = {
- { -0.0000000000000000, 0.30000000000000004, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17426098615372090, 0.30000000000000004, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34695402664689923, 0.30000000000000004, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.51680555567038933, 0.30000000000000004, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.68303375225260210, 0.30000000000000004, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.84540662891295026, 0.30000000000000004, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.0041834051646927, 0.30000000000000004, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1599952702345711, 0.30000000000000004, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.3137179520499163, 0.30000000000000004, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.4663658145259875, 0.30000000000000004, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.30000000000000004, nu=0.20000000000000001.
-template <typename Tp>
-void test123()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data123)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data123[i].k), Tp(data123[i].nu),
- Tp(data123[i].phi));
- const Tp f0 = data123[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.30000000000000004, nu=0.29999999999999999.
-testcase_ellint_3<double> data124[] = {
- { -0.0000000000000000, 0.30000000000000004, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17408628437042845, 0.30000000000000004, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34561356761638401, 0.30000000000000004, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51257058617875850, 0.30000000000000004, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.67382207124602866, 0.30000000000000004, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.82914751587825131, 0.30000000000000004, 0.29999999999999999,
- 0.87266462599716477 },
- { 0.97907434814374950, 0.30000000000000004, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1246399297351584, 0.30000000000000004, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.2671793970398146, 0.30000000000000004, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.4081767433479089, 0.30000000000000004, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.30000000000000004, nu=0.29999999999999999.
-template <typename Tp>
-void test124()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data124)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data124[i].k), Tp(data124[i].nu),
- Tp(data124[i].phi));
- const Tp f0 = data124[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.2247497610332889e-16
+// mean(f - f_Boost): 6.6613381477509390e-17
+// variance(f - f_Boost): 1.7591111235252501e-32
+// stddev(f - f_Boost): 1.3263148659067538e-16
+const testcase_ellint_3<double>
+data123[10] =
+{
+ { 0.0000000000000000, 0.30000000000000004, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17496614335337535, 0.30000000000000004, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35250745937139372, 0.30000000000000004, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53506875002836884, 0.30000000000000004, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.72479106622248191, 0.30000000000000004, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.92326451535891607, 0.30000000000000004, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1312092060698349, 0.30000000000000004, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3481473154592321, 0.30000000000000004, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.5722049569662750, 0.30000000000000004, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.8002173372290500, 0.30000000000000004, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler123 = 2.5000000000000020e-13;
+
+// Test data for k=0.30000000000000004, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.1678685180047551e-16
+// mean(f - f_Boost): 1.0547118733938987e-16
+// variance(f - f_Boost): 7.5633408838247182e-32
+// stddev(f - f_Boost): 2.7501528837184157e-16
+const testcase_ellint_3<double>
+data124[10] =
+{
+ { 0.0000000000000000, 0.30000000000000004, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17514404084107435, 0.30000000000000004, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35394619108645647, 0.30000000000000004, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.54000325463372689, 0.30000000000000004, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.73670193794067651, 0.30000000000000004, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.94689345491722177, 0.30000000000000004, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.1723274608389140, 0.30000000000000004, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.4128880552936287, 0.30000000000000004, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.6659010047449661, 0.30000000000000004, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 1.9260216862473254, 0.30000000000000004, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler124 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.40000000000000002.
-testcase_ellint_3<double> data125[] = {
- { -0.0000000000000000, 0.30000000000000004, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17391220945982730, 0.30000000000000004, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34429133937639689, 0.30000000000000004, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.50845471668581632, 0.30000000000000004, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.66502347027873854, 0.30000000000000004, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.81389191978012254, 0.30000000000000004, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.95590618002140593, 0.30000000000000004, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.0924915195213121, 0.30000000000000004, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2253651604038058, 0.30000000000000004, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.3563643538969761, 0.30000000000000004, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.30000000000000004, nu=0.40000000000000002.
-template <typename Tp>
-void test125()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data125)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data125[i].k), Tp(data125[i].nu),
- Tp(data125[i].phi));
- const Tp f0 = data125[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.3983279132797385e-16
+// mean(f - f_Boost): 1.1657341758564144e-16
+// variance(f - f_Boost): 1.8245832308692586e-31
+// stddev(f - f_Boost): 4.2715140534349863e-16
+const testcase_ellint_3<double>
+data125[10] =
+{
+ { 0.0000000000000000, 0.30000000000000004, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17532259000954434, 0.30000000000000004, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35540612770983693, 0.30000000000000004, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54510265552938919, 0.30000000000000004, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.74932476310965057, 0.30000000000000004, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.97272793583093109, 0.30000000000000004, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2188928987074241, 0.30000000000000004, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.4888771674085941, 0.30000000000000004, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.7794558498219191, 0.30000000000000004, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.0822121773175528, 0.30000000000000004, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler125 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.50000000000000000.
-testcase_ellint_3<double> data126[] = {
- { -0.0000000000000000, 0.30000000000000004, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17373875742088235, 0.30000000000000004, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34298690571124157, 0.30000000000000004, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50445214859646936, 0.30000000000000004, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.65660648352418516, 0.30000000000000004, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.79953670639287289, 0.30000000000000004, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.93443393926588558, 0.30000000000000004, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0630838369016911, 0.30000000000000004, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.1875197325653026, 0.30000000000000004, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.3098448759814960, 0.30000000000000004, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.30000000000000004, nu=0.50000000000000000.
-template <typename Tp>
-void test126()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data126)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data126[i].k), Tp(data126[i].nu),
- Tp(data126[i].phi));
- const Tp f0 = data126[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.30000000000000004, nu=0.59999999999999998.
-testcase_ellint_3<double> data127[] = {
- { -0.0000000000000000, 0.30000000000000004, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17356592428950826, 0.30000000000000004, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34169984536697379, 0.30000000000000004, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.50055748266498457, 0.30000000000000004, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.64854298527106768, 0.30000000000000004, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.78599329284207431, 0.30000000000000004, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.91445452089128221, 0.30000000000000004, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0360412952290587, 0.30000000000000004, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1530473919778639, 0.30000000000000004, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.2677758800420666, 0.30000000000000004, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.30000000000000004, nu=0.59999999999999998.
-template <typename Tp>
-void test127()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data127)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data127[i].k), Tp(data127[i].nu),
- Tp(data127[i].phi));
- const Tp f0 = data127[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.30000000000000004, nu=0.69999999999999996.
-testcase_ellint_3<double> data128[] = {
- { -0.0000000000000000, 0.30000000000000004, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17339370613812227, 0.30000000000000004, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34042975138455933, 0.30000000000000004, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.49676568368075985, 0.30000000000000004, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.64080774055753720, 0.30000000000000004, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.77318507779667278, 0.30000000000000004, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.89579782346548631, 0.30000000000000004, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0110573286052202, 0.30000000000000004, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1214710972949633, 0.30000000000000004, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2294913236274980, 0.30000000000000004, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.30000000000000004, nu=0.69999999999999996.
-template <typename Tp>
-void test128()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data128)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data128[i].k), Tp(data128[i].nu),
- Tp(data128[i].phi));
- const Tp f0 = data128[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.0516138451673425e-16
+// mean(f - f_Boost): 4.7184478546569152e-17
+// variance(f - f_Boost): 1.9448563670505968e-32
+// stddev(f - f_Boost): 1.3945810722401896e-16
+const testcase_ellint_3<double>
+data126[10] =
+{
+ { 0.0000000000000000, 0.30000000000000004, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17550179513158179, 0.30000000000000004, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35688783251681200, 0.30000000000000004, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.55037700010142798, 0.30000000000000004, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.76273839789895992, 0.30000000000000004, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0011570518830419, 0.30000000000000004, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.2722987414055109, 0.30000000000000004, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.5799590511080066, 0.30000000000000004, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 1.9212367220124293, 0.30000000000000004, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.2833505881933971, 0.30000000000000004, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler126 = 2.5000000000000020e-13;
+
+// Test data for k=0.30000000000000004, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.2121157428443725e-16
+// mean(f - f_Boost): 1.9428902930940239e-16
+// variance(f - f_Boost): 1.5987596229703424e-31
+// stddev(f - f_Boost): 3.9984492281012430e-16
+const testcase_ellint_3<double>
+data127[10] =
+{
+ { 0.0000000000000000, 0.30000000000000004, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17568166052076745, 0.30000000000000004, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35839189074731181, 0.30000000000000004, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55583724744367558, 0.30000000000000004, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.77703498090888223, 0.30000000000000004, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0326772113675962, 0.30000000000000004, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3345139983717369, 0.30000000000000004, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.6921742922838403, 0.30000000000000004, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.1056608968472186, 0.30000000000000004, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.5560975528589061, 0.30000000000000004, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler127 = 2.5000000000000020e-13;
+
+// Test data for k=0.30000000000000004, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.0088945789059381e-16
+// mean(f - f_Boost): 2.1094237467877973e-16
+// variance(f - f_Boost): 3.0253363535298873e-31
+// stddev(f - f_Boost): 5.5003057674368314e-16
+const testcase_ellint_3<double>
+data128[10] =
+{
+ { 0.0000000000000000, 0.30000000000000004, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17586219053197988, 0.30000000000000004, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.35991891074557669, 0.30000000000000004, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.56149538019961731, 0.30000000000000004, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.79232303189667685, 0.30000000000000004, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0679345542878826, 0.30000000000000004, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.4084400085913955, 0.30000000000000004, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.8357382859296454, 0.30000000000000004, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.3604197996171519, 0.30000000000000004, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 2.9562123549913872, 0.30000000000000004, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler128 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.80000000000000004.
-testcase_ellint_3<double> data129[] = {
- { -0.0000000000000000, 0.30000000000000004, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17322209907520361, 0.30000000000000004, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.33917623046949996, 0.30000000000000004, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49307204894329176, 0.30000000000000004, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.63337802830291723, 0.30000000000000004, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.76104540997689407, 0.30000000000000004, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.87832009635450736, 0.30000000000000004, 0.80000000000000004,
- 1.0471975511965976 },
- { 0.98787879723171790, 0.30000000000000004, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.0924036340069336, 0.30000000000000004, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.1944567571590046, 0.30000000000000004, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.30000000000000004, nu=0.80000000000000004.
-template <typename Tp>
-void test129()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data129)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data129[i].k), Tp(data129[i].nu),
- Tp(data129[i].phi));
- const Tp f0 = data129[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 6.1197887707781618e-16
+// mean(f - f_Boost): 3.4416913763379854e-16
+// variance(f - f_Boost): 4.3461914185990199e-31
+// stddev(f - f_Boost): 6.5925650687718054e-16
+const testcase_ellint_3<double>
+data129[10] =
+{
+ { 0.0000000000000000, 0.30000000000000004, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17604338956191670, 0.30000000000000004, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36146952517410791, 0.30000000000000004, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.56736453393774644, 0.30000000000000004, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.80873149979001091, 0.30000000000000004, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1077903069860620, 0.30000000000000004, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.4985874311132998, 0.30000000000000004, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.0298167266724954, 0.30000000000000004, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.7483929054985432, 0.30000000000000004, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.6283050484567170, 0.30000000000000004, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler129 = 2.5000000000000020e-13;
// Test data for k=0.30000000000000004, nu=0.90000000000000002.
-testcase_ellint_3<double> data130[] = {
- { -0.0000000000000000, 0.30000000000000004, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17305109924485948, 0.30000000000000004, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33793890239556984, 0.30000000000000004, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.48947218005089738, 0.30000000000000004, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.62623332340775151, 0.30000000000000004, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.74951596581511148, 0.30000000000000004, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.86189886597756005, 0.30000000000000004, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.96629451153092005, 0.30000000000000004, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.0655269133492680, 0.30000000000000004, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.1622376896064912, 0.30000000000000004, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.30000000000000004, nu=0.90000000000000002.
-template <typename Tp>
-void test130()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data130)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data130[i].k), Tp(data130[i].nu),
- Tp(data130[i].phi));
- const Tp f0 = data130[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991, nu=0.0000000000000000.
-testcase_ellint_3<double> data131[] = {
- { -0.0000000000000000, 0.39999999999999991, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17467414669441531, 0.39999999999999991, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35018222772483443, 0.39999999999999991, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52729015917508748, 0.39999999999999991, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.70662374407341255, 0.39999999999999991, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.88859210497602170, 0.39999999999999991, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0733136290471379, 0.39999999999999991, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2605612170157061, 0.39999999999999991, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.4497513956433437, 0.39999999999999991, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.6399998658645112, 0.39999999999999991, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.39999999999999991, nu=0.0000000000000000.
-template <typename Tp>
-void test131()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data131)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data131[i].k), Tp(data131[i].nu),
- Tp(data131[i].phi));
- const Tp f0 = data131[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991, nu=0.10000000000000001.
-testcase_ellint_3<double> data132[] = {
- { -0.0000000000000000, 0.39999999999999991, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17449806706684673, 0.39999999999999991, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34880048623856075, 0.39999999999999991, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.52277322065757403, 0.39999999999999991, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.69638072056918376, 0.39999999999999991, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.86968426619831540, 0.39999999999999991, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0428044206578095, 0.39999999999999991, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.2158651158274378, 0.39999999999999991, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.3889447129893322, 0.39999999999999991, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.5620566886683604, 0.39999999999999991, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.39999999999999991, nu=0.10000000000000001.
-template <typename Tp>
-void test132()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data132)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data132[i].k), Tp(data132[i].nu),
- Tp(data132[i].phi));
- const Tp f0 = data132[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991, nu=0.20000000000000001.
-testcase_ellint_3<double> data133[] = {
- { -0.0000000000000000, 0.39999999999999991, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17432262290723399, 0.39999999999999991, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34743795258968596, 0.39999999999999991, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.51838919472805123, 0.39999999999999991, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.68663134739057918, 0.39999999999999991, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.85206432981833979, 0.39999999999999991, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.0149595349004430, 0.39999999999999991, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1758349405464676, 0.39999999999999991, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.3353337673882635, 0.39999999999999991, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.4941414344266770, 0.39999999999999991, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.39999999999999991, nu=0.20000000000000001.
-template <typename Tp>
-void test133()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data133)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data133[i].k), Tp(data133[i].nu),
- Tp(data133[i].phi));
- const Tp f0 = data133[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991, nu=0.29999999999999999.
-testcase_ellint_3<double> data134[] = {
- { -0.0000000000000000, 0.39999999999999991, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17414781013591543, 0.39999999999999991, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34609415696777285, 0.39999999999999991, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51413131295862546, 0.39999999999999991, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.67733527622935630, 0.39999999999999991, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.83558675182733266, 0.39999999999999991, 0.29999999999999999,
- 0.87266462599716477 },
- { 0.98940140808865906, 0.39999999999999991, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1396968797728058, 0.39999999999999991, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.2875920037865087, 0.39999999999999991, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.4342789859950078, 0.39999999999999991, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.39999999999999991, nu=0.29999999999999999.
-template <typename Tp>
-void test134()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data134)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data134[i].k), Tp(data134[i].nu),
- Tp(data134[i].phi));
- const Tp f0 = data134[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991, nu=0.40000000000000002.
-testcase_ellint_3<double> data135[] = {
- { -0.0000000000000000, 0.39999999999999991, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17397362471112710, 0.39999999999999991, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34476864603333196, 0.39999999999999991, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.50999329415379357, 0.39999999999999991, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.66845674551396017, 0.39999999999999991, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.82012848346231748, 0.39999999999999991, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.96582449258349057, 0.39999999999999991, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.1068473749476286, 0.39999999999999991, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2447132729159986, 0.39999999999999991, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.3809986210732901, 0.39999999999999991, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.39999999999999991, nu=0.40000000000000002.
-template <typename Tp>
-void test135()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data135)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data135[i].k), Tp(data135[i].nu),
- Tp(data135[i].phi));
- const Tp f0 = data135[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991, nu=0.50000000000000000.
-testcase_ellint_3<double> data136[] = {
- { -0.0000000000000000, 0.39999999999999991, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17380006262854139, 0.39999999999999991, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34346098216756610, 0.39999999999999991, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50596929935059420, 0.39999999999999991, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.65996392089131262, 0.39999999999999991, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.80558463511364786, 0.39999999999999991, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.94397834522857704, 0.39999999999999991, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0768075114108115, 0.39999999999999991, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.2059184624251329, 0.39999999999999991, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.3331797176377398, 0.39999999999999991, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.39999999999999991, nu=0.50000000000000000.
-template <typename Tp>
-void test136()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data136)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data136[i].k), Tp(data136[i].nu),
- Tp(data136[i].phi));
- const Tp f0 = data136[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991, nu=0.59999999999999998.
-testcase_ellint_3<double> data137[] = {
- { -0.0000000000000000, 0.39999999999999991, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17362711992081248, 0.39999999999999991, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34217074276403953, 0.39999999999999991, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.50205389185761617, 0.39999999999999991, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.65182834920372745, 0.39999999999999991, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.79186512820565136, 0.39999999999999991, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.92365535916287134, 0.39999999999999991, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0491915663957907, 0.39999999999999991, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1705934291745104, 0.39999999999999991, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.2899514672527024, 0.39999999999999991, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.39999999999999991, nu=0.59999999999999998.
-template <typename Tp>
-void test137()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data137)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data137[i].k), Tp(data137[i].nu),
- Tp(data137[i].phi));
- const Tp f0 = data137[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991, nu=0.69999999999999996.
-testcase_ellint_3<double> data138[] = {
- { -0.0000000000000000, 0.39999999999999991, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17345479265712871, 0.39999999999999991, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34089751955950354, 0.39999999999999991, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.49824200167361343, 0.39999999999999991, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.64402450341199413, 0.39999999999999991, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.77889207804122873, 0.39999999999999991, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.90468169720957992, 0.39999999999999991, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0236847823692916, 0.39999999999999991, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1382465247425164, 0.39999999999999991, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2506255923253344, 0.39999999999999991, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.39999999999999991, nu=0.69999999999999996.
-template <typename Tp>
-void test138()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data138)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data138[i].k), Tp(data138[i].nu),
- Tp(data138[i].phi));
- const Tp f0 = data138[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991, nu=0.80000000000000004.
-testcase_ellint_3<double> data139[] = {
- { -0.0000000000000000, 0.39999999999999991, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17328307694277156, 0.39999999999999991, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.33964091800132007, 0.39999999999999991, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49452889372467451, 0.39999999999999991, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.63652940095937327, 0.39999999999999991, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.76659772511159097, 0.39999999999999991, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.88691047977338111, 0.39999999999999991, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.0000273200611640, 0.39999999999999991, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.1084787902188007, 0.39999999999999991, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.2146499565727209, 0.39999999999999991, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.39999999999999991, nu=0.80000000000000004.
-template <typename Tp>
-void test139()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data139)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data139[i].k), Tp(data139[i].nu),
- Tp(data139[i].phi));
- const Tp f0 = data139[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.39999999999999991, nu=0.90000000000000002.
-testcase_ellint_3<double> data140[] = {
- { -0.0000000000000000, 0.39999999999999991, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17311196891868130, 0.39999999999999991, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33840055664911906, 0.39999999999999991, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.49091013944075340, 0.39999999999999991, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.62932228186809591, 0.39999999999999991, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.75492278323019801, 0.39999999999999991, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.87021659043854294, 0.39999999999999991, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.97800245228239246, 0.39999999999999991, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.0809625773173694, 0.39999999999999991, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.1815758115929846, 0.39999999999999991, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.39999999999999991, nu=0.90000000000000002.
-template <typename Tp>
-void test140()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data140)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data140[i].k), Tp(data140[i].nu),
- Tp(data140[i].phi));
- const Tp f0 = data140[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 5.1301806687926828e-16
+// mean(f - f_Boost): 4.1633363423443370e-16
+// variance(f - f_Boost): 2.2835347143080263e-31
+// stddev(f - f_Boost): 4.7786344433405093e-16
+const testcase_ellint_3<double>
+data130[10] =
+{
+ { 0.0000000000000000, 0.30000000000000004, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17622526204962433, 0.30000000000000004, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36304439230777141, 0.30000000000000004, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57345914744719195, 0.30000000000000004, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.82641512928845162, 0.30000000000000004, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1534256210757743, 0.30000000000000004, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.6124900353411677, 0.30000000000000004, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.3165905514845089, 0.30000000000000004, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.4625619526539824, 0.30000000000000004, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 5.1479514944016787, 0.30000000000000004, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler130 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013, nu=0.0000000000000000.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.0831445028587608e-15
+// mean(f - f_Boost): 1.7486012637846215e-16
+// variance(f - f_Boost): 3.1664095331106078e-31
+// stddev(f - f_Boost): 5.6270858649132121e-16
+const testcase_ellint_3<double>
+data131[10] =
+{
+ { 0.0000000000000000, 0.40000000000000013, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17467414669441528, 0.40000000000000013, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35018222772483443, 0.40000000000000013, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52729015917508748, 0.40000000000000013, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.70662374407341244, 0.40000000000000013, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.88859210497602159, 0.40000000000000013, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0733136290471381, 0.40000000000000013, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2605612170157066, 0.40000000000000013, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.4497513956433439, 0.40000000000000013, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.6399998658645112, 0.40000000000000013, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler131 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013, nu=0.10000000000000001.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.0263824105456986e-15
+// mean(f - f_Boost): 1.7486012637846215e-16
+// variance(f - f_Boost): 3.1664095331106078e-31
+// stddev(f - f_Boost): 5.6270858649132121e-16
+const testcase_ellint_3<double>
+data132[10] =
+{
+ { 0.0000000000000000, 0.40000000000000013, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17485086590796767, 0.40000000000000013, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35158366412506992, 0.40000000000000013, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.53194731675711726, 0.40000000000000013, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.71740615528010931, 0.40000000000000013, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.90896157773487030, 0.40000000000000013, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.1069605483834348, 0.40000000000000013, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.3109353428823001, 0.40000000000000013, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.5195460789903450, 0.40000000000000013, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.7306968836847190, 0.40000000000000013, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler132 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013, nu=0.20000000000000001.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.6644296021947179e-16
+// mean(f - f_Boost): 2.0816681711721685e-16
+// variance(f - f_Boost): 3.0360740073926687e-31
+// stddev(f - f_Boost): 5.5100580826273227e-16
+const testcase_ellint_3<double>
+data133[10] =
+{
+ { 0.0000000000000000, 0.40000000000000013, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17502822886437389, 0.40000000000000013, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35300530062530805, 0.40000000000000013, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53675259548210896, 0.40000000000000013, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.72878006428676934, 0.40000000000000013, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.93100219010583574, 0.40000000000000013, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1443487271187611, 0.40000000000000013, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3683427764108813, 0.40000000000000013, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.6008221459300933, 0.40000000000000013, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.8380358826317627, 0.40000000000000013, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler133 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013, nu=0.30000000000000004.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.0271556462838835e-16
+// mean(f - f_Boost): 2.0816681711721685e-16
+// variance(f - f_Boost): 3.0360740073926687e-31
+// stddev(f - f_Boost): 5.5100580826273227e-16
+const testcase_ellint_3<double>
+data134[10] =
+{
+ { 0.0000000000000000, 0.40000000000000013, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17520623975982899, 0.40000000000000013, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35444766141612105, 0.40000000000000013, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.54171455841536009, 0.40000000000000013, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.74080517001084012, 0.40000000000000013, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.95496950509296574, 0.40000000000000013, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.1862627879844718, 0.40000000000000013, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.4346501803799458, 0.40000000000000013, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.6971744798077699, 0.40000000000000013, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 1.9677924132520139, 0.40000000000000013, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler134 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013, nu=0.40000000000000002.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.3436329231972794e-16
+// mean(f - f_Boost): 2.3037127760972000e-16
+// variance(f - f_Boost): 2.9507053793392374e-31
+// stddev(f - f_Boost): 5.4320395611033958e-16
+const testcase_ellint_3<double>
+data135[10] =
+{
+ { 0.0000000000000000, 0.40000000000000013, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17538490283034375, 0.40000000000000013, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35591129064319948, 0.40000000000000013, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54684250413264535, 0.40000000000000013, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.75355027742668290, 0.40000000000000013, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.98117935026780634, 0.40000000000000013, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2337464222030736, 0.40000000000000013, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.5125183419289221, 0.40000000000000013, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.8140224451130313, 0.40000000000000013, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.1289968719280026, 0.40000000000000013, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler135 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013, nu=0.50000000000000000.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.7013794022122431e-16
+// mean(f - f_Boost): 2.3037127760972000e-16
+// variance(f - f_Boost): 1.4989821857033475e-31
+// stddev(f - f_Boost): 3.8716691306248618e-16
+const testcase_ellint_3<double>
+data136[10] =
+{
+ { 0.0000000000000000, 0.40000000000000013, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17556422235224273, 0.40000000000000013, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35739675341763921, 0.40000000000000013, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.55214655195037188, 0.40000000000000013, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.76709520942047438, 0.40000000000000013, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0100278761577499, 0.40000000000000013, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.2882265661384342, 0.40000000000000013, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.6059059780051876, 0.40000000000000013, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 1.9600182740224081, 0.40000000000000013, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.3367461373176512, 0.40000000000000013, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler136 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013, nu=0.60000000000000009.
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.4792115132836117e-16
+// mean(f - f_Boost): 2.3037127760972000e-16
+// variance(f - f_Boost): 4.8893797490374802e-31
+// stddev(f - f_Boost): 6.9924099915819294e-16
+const testcase_ellint_3<double>
+data137[10] =
+{
+ { 0.0000000000000000, 0.40000000000000013, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17574420264267029, 0.40000000000000013, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35890463689046265, 0.40000000000000013, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55763773975194486, 0.40000000000000013, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.78153324227761267, 0.40000000000000013, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0420205885765887, 0.40000000000000013, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3517205230381770, 0.40000000000000013, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.7210360970313896, 0.40000000000000013, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.1500780510169246, 0.40000000000000013, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.6186940209850191, 0.40000000000000013, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler137 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.8573292020719759e-16
+// mean(f - f_Boost): 2.2759572004815707e-16
+// variance(f - f_Boost): 2.9613098824898137e-31
+// stddev(f - f_Boost): 5.4417918762938862e-16
+const testcase_ellint_3<double>
+data138[10] =
+{
+ { 0.0000000000000000, 0.40000000000000013, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17592484806010436, 0.40000000000000013, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36043555139631439, 0.40000000000000013, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.56332813669944881, 0.40000000000000013, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.79697424562157548, 0.40000000000000013, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0778155987523672, 0.40000000000000013, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.4272018169896268, 0.40000000000000013, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.8684377907453382, 0.40000000000000013, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.4128677409207473, 0.40000000000000013, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 3.0327078743873246, 0.40000000000000013, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler138 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013, nu=0.80000000000000004.
+// max(|f - f_Boost|): 3.5527136788005009e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.5273712585384737e-16
+// mean(f - f_Boost): 4.5241588253475131e-16
+// variance(f - f_Boost): 1.1866477068555882e-30
+// stddev(f - f_Boost): 1.0893336067778265e-15
+const testcase_ellint_3<double>
+data139[10] =
+{
+ { 0.0000000000000000, 0.40000000000000013, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17610616300487833, 0.40000000000000013, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36199013167171978, 0.40000000000000013, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.56923097361842434, 0.40000000000000013, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.81354878456624347, 0.40000000000000013, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1182902719261825, 0.40000000000000013, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.5192950589409022, 0.40000000000000013, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.0678761710223981, 0.40000000000000013, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.8135222249879788, 0.40000000000000013, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.7289548002199902, 0.40000000000000013, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler139 = 2.5000000000000020e-13;
+
+// Test data for k=0.40000000000000013, nu=0.90000000000000002.
+// max(|f - f_Boost|): 6.2172489379008766e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.1718379478872251e-15
+// mean(f - f_Boost): 8.4099394115355610e-16
+// variance(f - f_Boost): 3.5684096037099424e-30
+// stddev(f - f_Boost): 1.8890234523980751e-15
+const testcase_ellint_3<double>
+data140[10] =
+{
+ { 0.0000000000000000, 0.40000000000000013, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17628815191971123, 0.40000000000000013, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36356903815378772, 0.40000000000000013, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57536079447000310, 0.40000000000000013, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.83141355850172571, 0.40000000000000013, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1646481598721361, 0.40000000000000013, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.6357275034001995, 0.40000000000000013, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.3628787566572402, 0.40000000000000013, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.5521010369134962, 0.40000000000000013, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 5.3055535102872513, 0.40000000000000013, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler140 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.0000000000000000.
-testcase_ellint_3<double> data141[] = {
- { -0.0000000000000000, 0.50000000000000000, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17475385514035785, 0.50000000000000000, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35081868470101585, 0.50000000000000000, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.52942862705190585, 0.50000000000000000, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.71164727562630326, 0.50000000000000000, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.89824523594227768, 0.50000000000000000, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.0895506700518851, 0.50000000000000000, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.2853005857432933, 0.50000000000000000, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.4845545520549484, 0.50000000000000000, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.6857503548125963, 0.50000000000000000, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.50000000000000000, nu=0.0000000000000000.
-template <typename Tp>
-void test141()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data141)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data141[i].k), Tp(data141[i].nu),
- Tp(data141[i].phi));
- const Tp f0 = data141[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.4551389361831220e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 2.5893058141206173e-32
+// stddev(f - f_Boost): 1.6091320064309879e-16
+const testcase_ellint_3<double>
+data141[10] =
+{
+ { 0.0000000000000000, 0.50000000000000000, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17475385514035785, 0.50000000000000000, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35081868470101579, 0.50000000000000000, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.52942862705190574, 0.50000000000000000, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.71164727562630326, 0.50000000000000000, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.89824523594227768, 0.50000000000000000, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.0895506700518853, 0.50000000000000000, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.2853005857432933, 0.50000000000000000, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.4845545520549488, 0.50000000000000000, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.6857503548125961, 0.50000000000000000, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler141 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.10000000000000001.
-testcase_ellint_3<double> data142[] = {
- { -0.0000000000000000, 0.50000000000000000, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17457763120814676, 0.50000000000000000, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.34943246340849154, 0.50000000000000000, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.52487937869610801, 0.50000000000000000, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.70127785096388395, 0.50000000000000000, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.87898815988624479, 0.50000000000000000, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0582764576094172, 0.50000000000000000, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.2391936844060207, 0.50000000000000000, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.4214793542995841, 0.50000000000000000, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.6045524936084892, 0.50000000000000000, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.50000000000000000, nu=0.10000000000000001.
-template <typename Tp>
-void test142()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data142)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data142[i].k), Tp(data142[i].nu),
- Tp(data142[i].phi));
- const Tp f0 = data142[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.7416868347177582e-16
+// mean(f - f_Boost): 2.7755575615628915e-18
+// variance(f - f_Boost): 5.4326441655972001e-32
+// stddev(f - f_Boost): 2.3308033305273100e-16
+const testcase_ellint_3<double>
+data142[10] =
+{
+ { 0.0000000000000000, 0.50000000000000000, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17493071928248824, 0.50000000000000000, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35222467688034798, 0.50000000000000000, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.53411928652008112, 0.50000000000000000, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.72256398117177589, 0.50000000000000000, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.91899583232771009, 0.50000000000000000, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.1240549163055360, 0.50000000000000000, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.3372938086286021, 0.50000000000000000, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.5570024469132429, 0.50000000000000000, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.7803034946545480, 0.50000000000000000, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler142 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.20000000000000001.
-testcase_ellint_3<double> data143[] = {
- { -0.0000000000000000, 0.50000000000000000, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17440204336345433, 0.50000000000000000, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34806552388338824, 0.50000000000000000, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.52046416757129821, 0.50000000000000000, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.69140924550993876, 0.50000000000000000, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.86104678636125520, 0.50000000000000000, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.0297439459053981, 0.50000000000000000, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.1979214112912036, 0.50000000000000000, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.3659033858648930, 0.50000000000000000, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.5338490483665983, 0.50000000000000000, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.50000000000000000, nu=0.20000000000000001.
-template <typename Tp>
-void test143()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data143)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data143[i].k), Tp(data143[i].nu),
- Tp(data143[i].phi));
- const Tp f0 = data143[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.50000000000000000, nu=0.29999999999999999.
-testcase_ellint_3<double> data144[] = {
- { -0.0000000000000000, 0.50000000000000000, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17422708752228896, 0.50000000000000000, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34671739434855858, 0.50000000000000000, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51617616305641889, 0.50000000000000000, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.68200047612545178, 0.50000000000000000, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.84427217869498372, 0.50000000000000000, 0.29999999999999999,
- 0.87266462599716477 },
- { 1.0035637821389782, 0.50000000000000000, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1606800483933113, 0.50000000000000000, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.3164407134643459, 0.50000000000000000, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.4715681939859637, 0.50000000000000000, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.50000000000000000, nu=0.29999999999999999.
-template <typename Tp>
-void test144()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data144)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data144[i].k), Tp(data144[i].nu),
- Tp(data144[i].phi));
- const Tp f0 = data144[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.1198767993730867e-16
+// mean(f - f_Boost): 2.7755575615628914e-17
+// variance(f - f_Boost): 5.0311947683004831e-32
+// stddev(f - f_Boost): 2.2430324938128922e-16
+const testcase_ellint_3<double>
+data143[10] =
+{
+ { 0.0000000000000000, 0.50000000000000000, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17510822779582402, 0.50000000000000000, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35365094725531487, 0.50000000000000000, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.53895933237328697, 0.50000000000000000, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.73408090840070794, 0.50000000000000000, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.94145442818535396, 0.50000000000000000, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1624120186296487, 0.50000000000000000, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.3965823372867114, 0.50000000000000000, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.6414308440430099, 0.50000000000000000, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.8922947612264018, 0.50000000000000000, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler143 = 2.5000000000000020e-13;
+
+// Test data for k=0.50000000000000000, nu=0.30000000000000004.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.3800262770228813e-16
+// mean(f - f_Boost): 5.8286708792820721e-17
+// variance(f - f_Boost): 8.5027191584278157e-32
+// stddev(f - f_Boost): 2.9159422419567599e-16
+const testcase_ellint_3<double>
+data144[10] =
+{
+ { 0.0000000000000000, 0.50000000000000000, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17528638488102041, 0.50000000000000000, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35509802222332720, 0.50000000000000000, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.54395740731866193, 0.50000000000000000, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.74625871438752667, 0.50000000000000000, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.96588271186092023, 0.50000000000000000, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.2054319584357329, 0.50000000000000000, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.4651077994832871, 0.50000000000000000, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.7416018368052644, 0.50000000000000000, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 2.0277924458111314, 0.50000000000000000, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler144 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.40000000000000002.
-testcase_ellint_3<double> data145[] = {
- { -0.0000000000000000, 0.50000000000000000, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17405275963859917, 0.50000000000000000, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34538761957029329, 0.50000000000000000, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.51200902646603919, 0.50000000000000000, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.67301522212868792, 0.50000000000000000, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.82853844466313320, 0.50000000000000000, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.97942097862681488, 0.50000000000000000, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.1268429801220616, 0.50000000000000000, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.2720406704533922, 0.50000000000000000, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.4161679518465340, 0.50000000000000000, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.50000000000000000, nu=0.40000000000000002.
-template <typename Tp>
-void test145()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data145)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data145[i].k), Tp(data145[i].nu),
- Tp(data145[i].phi));
- const Tp f0 = data145[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.0439932918341581e-16
+// mean(f - f_Boost): 3.0531133177191807e-17
+// variance(f - f_Boost): 9.0809736800018602e-32
+// stddev(f - f_Boost): 3.0134653938616686e-16
+const testcase_ellint_3<double>
+data145[10] =
+{
+ { 0.0000000000000000, 0.50000000000000000, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17546519477859268, 0.50000000000000000, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35656644822531680, 0.50000000000000000, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.54912289677411319, 0.50000000000000000, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.75916731611690047, 0.50000000000000000, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 0.99260415631328214, 0.50000000000000000, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2541925856918670, 0.50000000000000000, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.5456393705347609, 0.50000000000000000, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.8631904972952076, 0.50000000000000000, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.1962905366178065, 0.50000000000000000, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler145 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.50000000000000000.
-testcase_ellint_3<double> data146[] = {
- { -0.0000000000000000, 0.50000000000000000, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17387905570381157, 0.50000000000000000, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34407576010465207, 0.50000000000000000, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.50795686560160835, 0.50000000000000000, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.66442115453330175, 0.50000000000000000, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.81373829119355345, 0.50000000000000000, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.95705743313235825, 0.50000000000000000, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.0959131991362556, 0.50000000000000000, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.2318900529754597, 0.50000000000000000, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.3664739530045971, 0.50000000000000000, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.50000000000000000, nu=0.50000000000000000.
-template <typename Tp>
-void test146()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data146)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data146[i].k), Tp(data146[i].nu),
- Tp(data146[i].phi));
- const Tp f0 = data146[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.50000000000000000, nu=0.59999999999999998.
-testcase_ellint_3<double> data147[] = {
- { -0.0000000000000000, 0.50000000000000000, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17370597174637581, 0.50000000000000000, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34278139158591414, 0.50000000000000000, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.50401419439302719, 0.50000000000000000, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.65618938076167221, 0.50000000000000000, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.79977959248855424, 0.50000000000000000, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.93625925190753545, 0.50000000000000000, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0674905658379710, 0.50000000000000000, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.1953481298023048, 0.50000000000000000, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.3215740290190876, 0.50000000000000000, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.50000000000000000, nu=0.59999999999999998.
-template <typename Tp>
-void test147()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data147)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data147[i].k), Tp(data147[i].nu),
- Tp(data147[i].phi));
- const Tp f0 = data147[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.50000000000000000, nu=0.69999999999999996.
-testcase_ellint_3<double> data148[] = {
- { -0.0000000000000000, 0.50000000000000000, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17353350383131641, 0.50000000000000000, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34150410405436771, 0.50000000000000000, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.50017589696443487, 0.50000000000000000, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.64829398188419962, 0.50000000000000000, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.78658270782402073, 0.50000000000000000, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.91684738336675053, 0.50000000000000000, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0412486789555937, 0.50000000000000000, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1619021847612001, 0.50000000000000000, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.2807475181182502, 0.50000000000000000, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.50000000000000000, nu=0.69999999999999996.
-template <typename Tp>
-void test148()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data148)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data148[i].k), Tp(data148[i].nu),
- Tp(data148[i].phi));
- const Tp f0 = data148[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.6797816859260978e-16
+// mean(f - f_Boost): 9.4368957093138303e-17
+// variance(f - f_Boost): 7.7794254682023874e-32
+// stddev(f - f_Boost): 2.7891621444803792e-16
+const testcase_ellint_3<double>
+data146[10] =
+{
+ { 0.0000000000000000, 0.50000000000000000, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17564466176941509, 0.50000000000000000, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35805679276065394, 0.50000000000000000, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.55446601496200032, 0.50000000000000000, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.77288783578259013, 0.50000000000000000, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0220246013918972, 0.50000000000000000, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.3101681612463965, 0.50000000000000000, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.6422994881851025, 0.50000000000000000, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 2.0152636030998816, 0.50000000000000000, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.4136715042011945, 0.50000000000000000, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler146 = 2.5000000000000020e-13;
+
+// Test data for k=0.50000000000000000, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.9178421578645735e-16
+// mean(f - f_Boost): 1.3322676295501878e-16
+// variance(f - f_Boost): 1.7749370367472766e-31
+// stddev(f - f_Boost): 4.2130001622920411e-16
+const testcase_ellint_3<double>
+data147[10] =
+{
+ { 0.0000000000000000, 0.50000000000000000, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17582479017522740, 0.50000000000000000, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.35956964546660036, 0.50000000000000000, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.55999790372984193, 0.50000000000000000, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.78751507911209895, 0.50000000000000000, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0546620505035220, 0.50000000000000000, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.3754438357425935, 0.50000000000000000, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.7615727400820127, 0.50000000000000000, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.2134638067565242, 0.50000000000000000, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.7090491861753558, 0.50000000000000000, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler147 = 2.5000000000000020e-13;
+
+// Test data for k=0.50000000000000000, nu=0.70000000000000007.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.0745105182189226e-16
+// mean(f - f_Boost): 4.1633363423443370e-17
+// variance(f - f_Boost): 1.9996383743576116e-32
+// stddev(f - f_Boost): 1.4140857026211713e-16
+const testcase_ellint_3<double>
+data148[10] =
+{
+ { 0.0000000000000000, 0.50000000000000000, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17600558435914915, 0.50000000000000000, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36110561926726259, 0.50000000000000000, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.56573074641137111, 0.50000000000000000, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.80316073084237205, 0.50000000000000000, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.0911910688131461, 0.50000000000000000, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.4530946406380640, 0.50000000000000000, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.9144386536785372, 0.50000000000000000, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.4878788958234970, 0.50000000000000000, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 3.1433945297859225, 0.50000000000000000, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler148 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.80000000000000004.
-testcase_ellint_3<double> data149[] = {
- { -0.0000000000000000, 0.50000000000000000, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17336164805979126, 0.50000000000000000, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.34024350132086773, 0.50000000000000000, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49643719555734084, 0.50000000000000000, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.64071162456976150, 0.50000000000000000, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.77407836177211908, 0.50000000000000000, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.89867058251905652, 0.50000000000000000, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.0169181822134912, 0.50000000000000000, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.1311363312779448, 0.50000000000000000, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.2434165408189539, 0.50000000000000000, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.50000000000000000, nu=0.80000000000000004.
-template <typename Tp>
-void test149()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data149)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data149[i].k), Tp(data149[i].nu),
- Tp(data149[i].phi));
- const Tp f0 = data149[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.4380477375534667e-16
+// mean(f - f_Boost): 2.3037127760972000e-16
+// variance(f - f_Boost): 1.4989821857033475e-31
+// stddev(f - f_Boost): 3.8716691306248618e-16
+const testcase_ellint_3<double>
+data149[10] =
+{
+ { 0.0000000000000000, 0.50000000000000000, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17618704872620228, 0.50000000000000000, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36266535159745827, 0.50000000000000000, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.57167789954529158, 0.50000000000000000, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.81995752984315018, 0.50000000000000000, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1325112162158122, 0.50000000000000000, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.5479055930718042, 0.50000000000000000, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.1215243941010486, 0.50000000000000000, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 2.9069405767650132, 0.50000000000000000, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 3.8750701888108066, 0.50000000000000000, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler149 = 2.5000000000000020e-13;
// Test data for k=0.50000000000000000, nu=0.90000000000000002.
-testcase_ellint_3<double> data150[] = {
- { -0.0000000000000000, 0.50000000000000000, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17319040056865681, 0.50000000000000000, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33899920036578557, 0.50000000000000000, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.49279362182695186, 0.50000000000000000, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.63342123379746151, 0.50000000000000000, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.76220595179550321, 0.50000000000000000, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.88160004743532294, 0.50000000000000000, 0.90000000000000002,
- 1.0471975511965976 },
- { 0.99427448642310134, 0.50000000000000000, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.1027091512470093, 0.50000000000000000, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.2091116095504744, 0.50000000000000000, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.50000000000000000, nu=0.90000000000000002.
-template <typename Tp>
-void test150()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data150)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data150[i].k), Tp(data150[i].nu),
- Tp(data150[i].phi));
- const Tp f0 = data150[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 3.6192315188521289e-16
+// mean(f - f_Boost): 3.5249581031848718e-16
+// variance(f - f_Boost): 2.5029385557256515e-31
+// stddev(f - f_Boost): 5.0029376927217987e-16
+const testcase_ellint_3<double>
+data150[10] =
+{
+ { 0.0000000000000000, 0.50000000000000000, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17636918772384180, 0.50000000000000000, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36424950570740700, 0.50000000000000000, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.57785404590231426, 0.50000000000000000, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.83806480521716531, 0.50000000000000000, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1798568683069752, 0.50000000000000000, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.6678766243739607, 0.50000000000000000, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.4282976450693483, 0.50000000000000000, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.6810787666126656, 0.50000000000000000, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 5.5355132096026454, 0.50000000000000000, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler150 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.0000000000000000.
-testcase_ellint_3<double> data151[] = {
- { -0.0000000000000000, 0.60000000000000009, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17485154362988362, 0.60000000000000009, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35160509865544326, 0.60000000000000009, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.53210652578446160, 0.60000000000000009, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.71805304664485670, 0.60000000000000009, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.91082759030195970, 0.60000000000000009, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.1112333229323366, 0.60000000000000009, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.3191461190365270, 0.60000000000000009, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.5332022105084775, 0.60000000000000009, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.7507538029157526, 0.60000000000000009, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.60000000000000009, nu=0.0000000000000000.
-template <typename Tp>
-void test151()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data151)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data151[i].k), Tp(data151[i].nu),
- Tp(data151[i].phi));
- const Tp f0 = data151[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.3664899092028927e-16
+// mean(f - f_Boost): 3.0531133177191807e-17
+// variance(f - f_Boost): 7.8758646268991113e-33
+// stddev(f - f_Boost): 8.8746068233466605e-17
+const testcase_ellint_3<double>
+data151[10] =
+{
+ { 0.0000000000000000, 0.60000000000000009, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17485154362988359, 0.60000000000000009, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35160509865544320, 0.60000000000000009, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.53210652578446138, 0.60000000000000009, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.71805304664485659, 0.60000000000000009, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.91082759030195981, 0.60000000000000009, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.1112333229323361, 0.60000000000000009, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.3191461190365270, 0.60000000000000009, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.5332022105084779, 0.60000000000000009, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.7507538029157526, 0.60000000000000009, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler151 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.10000000000000001.
-testcase_ellint_3<double> data152[] = {
- { -0.0000000000000000, 0.60000000000000009, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17467514275022014, 0.60000000000000009, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.35021333086258255, 0.60000000000000009, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.52751664092962713, 0.60000000000000009, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.70752126971957885, 0.60000000000000009, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.89111058756112871, 0.60000000000000009, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.0789241202877773, 0.60000000000000009, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.2710800210399946, 0.60000000000000009, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.4669060574440278, 0.60000000000000009, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.6648615773343014, 0.60000000000000009, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.60000000000000009, nu=0.10000000000000001.
-template <typename Tp>
-void test152()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data152)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data152[i].k), Tp(data152[i].nu),
- Tp(data152[i].phi));
- const Tp f0 = data152[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.2335247010355137e-16
+// mean(f - f_Boost): 8.6042284408449634e-17
+// variance(f - f_Boost): 2.2835347143080263e-33
+// stddev(f - f_Boost): 4.7786344433405099e-17
+const testcase_ellint_3<double>
+data152[10] =
+{
+ { 0.0000000000000000, 0.60000000000000009, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17502858548476194, 0.60000000000000009, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35301673150537388, 0.60000000000000009, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.53683932476326812, 0.60000000000000009, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.72914228589586771, 0.60000000000000009, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.93208036718354692, 0.60000000000000009, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.1468984688863377, 0.60000000000000009, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.3733904977062528, 0.60000000000000009, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.6094225663372157, 0.60000000000000009, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.8508766487100685, 0.60000000000000009, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler152 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.20000000000000001.
-testcase_ellint_3<double> data153[] = {
- { -0.0000000000000000, 0.60000000000000009, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17449937871800653, 0.60000000000000009, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34884093647346553, 0.60000000000000009, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.52306221119844110, 0.60000000000000009, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.69749955678982223, 0.60000000000000009, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.87274610682416853, 0.60000000000000009, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.0494620540750796, 0.60000000000000009, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.2280847305507339, 0.60000000000000009, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.4085436279696888, 0.60000000000000009, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.5901418016279374, 0.60000000000000009, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.60000000000000009, nu=0.20000000000000001.
-template <typename Tp>
-void test153()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data153)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data153[i].k), Tp(data153[i].nu),
- Tp(data153[i].phi));
- const Tp f0 = data153[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.60000000000000009, nu=0.29999999999999999.
-testcase_ellint_3<double> data154[] = {
- { -0.0000000000000000, 0.60000000000000009, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17432424744393935, 0.60000000000000009, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34748744127146447, 0.60000000000000009, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.51873632743924847, 0.60000000000000009, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.68794610396313127, 0.60000000000000009, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.85558070175468726, 0.60000000000000009, 0.29999999999999999,
- 0.87266462599716477 },
- { 1.0224416343605658, 0.60000000000000009, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.1893144457936788, 0.60000000000000009, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.3566435377982575, 0.60000000000000009, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.5243814243493585, 0.60000000000000009, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.60000000000000009, nu=0.29999999999999999.
-template <typename Tp>
-void test154()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data154)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data154[i].k), Tp(data154[i].nu),
- Tp(data154[i].phi));
- const Tp f0 = data154[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 2.2547200163366559e-16
+// mean(f - f_Boost): -2.4980018054066023e-17
+// variance(f - f_Boost): 2.1685495635542404e-32
+// stddev(f - f_Boost): 1.4725995937641163e-16
+const testcase_ellint_3<double>
+data153[10] =
+{
+ { 0.0000000000000000, 0.60000000000000009, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17520627248155893, 0.60000000000000009, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35444873935437748, 0.60000000000000009, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.54172310557682524, 0.60000000000000009, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.74084300280734672, 0.60000000000000009, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.95509001527006121, 0.60000000000000009, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.1865688084431796, 0.60000000000000009, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.4352978868932600, 0.60000000000000009, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.6983400371331818, 0.60000000000000009, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 1.9695980282802217, 0.60000000000000009, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler153 = 2.5000000000000020e-13;
+
+// Test data for k=0.60000000000000009, nu=0.30000000000000004.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.9470074709717020e-16
+// mean(f - f_Boost): 3.0531133177191807e-17
+// variance(f - f_Boost): 1.1508025840536076e-34
+// stddev(f - f_Boost): 1.0727546709539920e-17
+const testcase_ellint_3<double>
+data154[10] =
+{
+ { 0.0000000000000000, 0.60000000000000009, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17538460882640122, 0.60000000000000009, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35590165133735557, 0.60000000000000009, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.54676661152254535, 0.60000000000000009, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.75321709418305305, 0.60000000000000009, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.98012637808992920, 0.60000000000000009, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.2310891277158875, 0.60000000000000009, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.5069157924585623, 0.60000000000000009, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.8039583598337940, 0.60000000000000009, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 2.1134154405060599, 0.60000000000000009, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler154 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.40000000000000002.
-testcase_ellint_3<double> data155[] = {
- { -0.0000000000000000, 0.60000000000000009, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17414974487670720, 0.60000000000000009, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34615238767335027, 0.60000000000000009, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.51453257838108579, 0.60000000000000009, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.67882386787534410, 0.60000000000000009, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.83948470233173578, 0.60000000000000009, 0.40000000000000002,
- 0.87266462599716477 },
- { 0.99753496200074021, 0.60000000000000009, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.1541101404388487, 0.60000000000000009, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.3100911323398816, 0.60000000000000009, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.4659345278069984, 0.60000000000000009, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.60000000000000009, nu=0.40000000000000002.
-template <typename Tp>
-void test155()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data155)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data155[i].k), Tp(data155[i].nu),
- Tp(data155[i].phi));
- const Tp f0 = data155[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 2.8974839914337670e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 2.2849613290816465e-32
+// stddev(f - f_Boost): 1.5116088545260797e-16
+const testcase_ellint_3<double>
+data155[10] =
+{
+ { 0.0000000000000000, 0.60000000000000009, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17556359876533037, 0.60000000000000009, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35737601674244679, 0.60000000000000009, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.55197933771320218, 0.60000000000000009, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.76633591620002905, 0.60000000000000009, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 1.0075231136019616, 0.60000000000000009, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.2815842073813450, 0.60000000000000009, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.5911666941449827, 0.60000000000000009, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 1.9323227566025762, 0.60000000000000009, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.2925036420985130, 0.60000000000000009, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler155 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.50000000000000000.
-testcase_ellint_3<double> data156[] = {
- { -0.0000000000000000, 0.60000000000000009, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17397586700252810, 0.60000000000000009, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34483533397138516, 0.60000000000000009, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.51044500461706499, 0.60000000000000009, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.67009988034712675, 0.60000000000000009, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.82434762375735193, 0.60000000000000009, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.97447346702799043, 0.60000000000000009, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.1219494000522143, 0.60000000000000009, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.2680242605954488, 0.60000000000000009, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.4135484285693078, 0.60000000000000009, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.60000000000000009, nu=0.50000000000000000.
-template <typename Tp>
-void test156()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data156)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data156[i].k), Tp(data156[i].nu),
- Tp(data156[i].phi));
- const Tp f0 = data156[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.60000000000000009, nu=0.59999999999999998.
-testcase_ellint_3<double> data157[] = {
- { -0.0000000000000000, 0.60000000000000009, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17380260984469356, 0.60000000000000009, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34353585361777839, 0.60000000000000009, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.50646805774321402, 0.60000000000000009, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.66174468108625517, 0.60000000000000009, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.81007462280278408, 0.60000000000000009, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.95303466945718773, 0.60000000000000009, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.0924118588677503, 0.60000000000000009, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.2297640574847937, 0.60000000000000009, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.3662507535812816, 0.60000000000000009, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.60000000000000009, nu=0.59999999999999998.
-template <typename Tp>
-void test157()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data157)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data157[i].k), Tp(data157[i].nu),
- Tp(data157[i].phi));
- const Tp f0 = data157[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.60000000000000009, nu=0.69999999999999996.
-testcase_ellint_3<double> data158[] = {
- { -0.0000000000000000, 0.60000000000000009, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17362996946312009, 0.60000000000000009, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34225353454870588, 0.60000000000000009, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.50259656397799546, 0.60000000000000009, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.65373184496628944, 0.60000000000000009, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.79658372884056439, 0.60000000000000009, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.93303240100245466, 0.60000000000000009, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0651547944716557, 0.60000000000000009, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.1947676204853441, 0.60000000000000009, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.3232737468822811, 0.60000000000000009, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.60000000000000009, nu=0.69999999999999996.
-template <typename Tp>
-void test158()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data158)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data158[i].k), Tp(data158[i].nu),
- Tp(data158[i].phi));
- const Tp f0 = data158[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 2.1397785842303966e-16
+// mean(f - f_Boost): 9.1593399531575410e-17
+// variance(f - f_Boost): 1.5339913122479866e-32
+// stddev(f - f_Boost): 1.2385440291923362e-16
+const testcase_ellint_3<double>
+data156[10] =
+{
+ { 0.0000000000000000, 0.60000000000000009, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17574324658480217, 0.60000000000000009, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35887240603169313, 0.60000000000000009, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.55737161826345261, 0.60000000000000009, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.78028227313077458, 0.60000000000000009, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0376989776486290, 0.60000000000000009, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.3395933991042928, 0.60000000000000009, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.6924049626591784, 0.60000000000000009, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 2.0931011856518920, 0.60000000000000009, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.5239007084492711, 0.60000000000000009, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler156 = 2.5000000000000020e-13;
+
+// Test data for k=0.60000000000000009, nu=0.60000000000000009.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.6651378277398083e-16
+// mean(f - f_Boost): 1.1934897514720432e-16
+// variance(f - f_Boost): 1.7585404776158019e-33
+// stddev(f - f_Boost): 4.1934955319110598e-17
+const testcase_ellint_3<double>
+data157[10] =
+{
+ { 0.0000000000000000, 0.60000000000000009, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17592355661219386, 0.60000000000000009, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.36039141192661606, 0.60000000000000009, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.56295472636903854, 0.60000000000000009, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.79515295130165986, 0.60000000000000009, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0711886441942242, 0.60000000000000009, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.4072952835139891, 0.60000000000000009, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.8174863977376825, 0.60000000000000009, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.3029921578542232, 0.60000000000000009, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 2.8388723099514972, 0.60000000000000009, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler157 = 2.5000000000000020e-13;
+
+// Test data for k=0.60000000000000009, nu=0.70000000000000007.
+// max(|f - f_Boost|): 4.4408920985006262e-16 at index 9
+// max(|f - f_Boost| / |f_Boost|): 2.0027679235921772e-16
+// mean(f - f_Boost): -1.3877787807814457e-17
+// variance(f - f_Boost): 2.2849613290816465e-32
+// stddev(f - f_Boost): 1.5116088545260797e-16
+const testcase_ellint_3<double>
+data158[10] =
+{
+ { 0.0000000000000000, 0.60000000000000009, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17610453321631936, 0.60000000000000009, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36193365056369764, 0.60000000000000009, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.56874098962268527, 0.60000000000000009, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.81106198671477181, 0.60000000000000009, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.1086886419010082, 0.60000000000000009, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.4879048567239257, 0.60000000000000009, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 1.9780310073615925, 0.60000000000000009, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.5941545586772712, 0.60000000000000009, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 3.3029735898397159, 0.60000000000000009, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler158 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.80000000000000004.
-testcase_ellint_3<double> data159[] = {
- { -0.0000000000000000, 0.60000000000000009, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17345794195390687, 0.60000000000000009, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.34098797854531027, 0.60000000000000009, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.49882569168826230, 0.60000000000000009, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.64603758566475511, 0.60000000000000009, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.78380365594769730, 0.60000000000000009, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.91430946255611223, 0.60000000000000009, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.0398955217270607, 0.60000000000000009, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.1625948314277679, 0.60000000000000009, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.2840021261752192, 0.60000000000000009, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.60000000000000009, nu=0.80000000000000004.
-template <typename Tp>
-void test159()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data159)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data159[i].k), Tp(data159[i].nu),
- Tp(data159[i].phi));
- const Tp f0 = data159[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 7.3044933435043190e-16
+// mean(f - f_Boost): 2.6367796834847468e-16
+// variance(f - f_Boost): 8.5834655546147173e-33
+// stddev(f - f_Boost): 9.2646994309662939e-17
+const testcase_ellint_3<double>
+data159[10] =
+{
+ { 0.0000000000000000, 0.60000000000000009, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17628618080795252, 0.60000000000000009, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36349976272521012, 0.60000000000000009, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.57474392342151914, 0.60000000000000009, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.82814493499158170, 0.60000000000000009, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1511281795998280, 0.60000000000000009, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.5864286332503075, 0.60000000000000009, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.1958944866494527, 0.60000000000000009, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 3.0398358172574604, 0.60000000000000009, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 4.0867036409261832, 0.60000000000000009, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler159 = 2.5000000000000020e-13;
// Test data for k=0.60000000000000009, nu=0.90000000000000002.
-testcase_ellint_3<double> data160[] = {
- { -0.0000000000000000, 0.60000000000000009, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17328652344890033, 0.60000000000000009, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.33973880062929018, 0.60000000000000009, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.49515092233122765, 0.60000000000000009, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.63864042139737043, 0.60000000000000009, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.77167205646538850, 0.60000000000000009, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.89673202848034428, 0.60000000000000009, 0.90000000000000002,
- 1.0471975511965976 },
- { 1.0163984492661304, 0.60000000000000009, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.1328845785162431, 0.60000000000000009, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.2479362973851875, 0.60000000000000009, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.60000000000000009, nu=0.90000000000000002.
-template <typename Tp>
-void test160()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data160)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data160[i].k), Tp(data160[i].nu),
- Tp(data160[i].phi));
- const Tp f0 = data160[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996, nu=0.0000000000000000.
-testcase_ellint_3<double> data161[] = {
- { -0.0000000000000000, 0.69999999999999996, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17496737466916720, 0.69999999999999996, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35254687535677925, 0.69999999999999996, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.53536740275997130, 0.69999999999999996, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.72603797651684465, 0.69999999999999996, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.92698296348313458, 0.69999999999999996, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.1400447527693316, 0.69999999999999996, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.3657668117194071, 0.69999999999999996, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.6024686895959159, 0.69999999999999996, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.8456939983747236, 0.69999999999999996, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.69999999999999996, nu=0.0000000000000000.
-template <typename Tp>
-void test161()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data161)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data161[i].k), Tp(data161[i].nu),
- Tp(data161[i].phi));
- const Tp f0 = data161[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996, nu=0.10000000000000001.
-testcase_ellint_3<double> data162[] = {
- { -0.0000000000000000, 0.69999999999999996, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17479076384884681, 0.69999999999999996, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.35114844900396364, 0.69999999999999996, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.53072776947527012, 0.69999999999999996, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.71530198262386246, 0.69999999999999996, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.90666760677828306, 0.69999999999999996, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.1063366517438080, 0.69999999999999996, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.3149477243092147, 0.69999999999999996, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.5314886725038925, 0.69999999999999996, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.7528050171757608, 0.69999999999999996, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.69999999999999996, nu=0.10000000000000001.
-template <typename Tp>
-void test162()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data162)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data162[i].k), Tp(data162[i].nu),
- Tp(data162[i].phi));
- const Tp f0 = data162[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996, nu=0.20000000000000001.
-testcase_ellint_3<double> data163[] = {
- { -0.0000000000000000, 0.69999999999999996, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17461479077791472, 0.69999999999999996, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.34976950621407538, 0.69999999999999996, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.52622533231350188, 0.69999999999999996, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.70508774017895226, 0.69999999999999996, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.88775302531730294, 0.69999999999999996, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.0756195476149006, 0.69999999999999996, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.2695349716654372, 0.69999999999999996, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.4690814617070540, 0.69999999999999996, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.6721098780092147, 0.69999999999999996, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.69999999999999996, nu=0.20000000000000001.
-template <typename Tp>
-void test163()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data163)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data163[i].k), Tp(data163[i].nu),
- Tp(data163[i].phi));
- const Tp f0 = data163[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996, nu=0.29999999999999999.
-testcase_ellint_3<double> data164[] = {
- { -0.0000000000000000, 0.69999999999999996, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17443945136076172, 0.69999999999999996, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34840956983535287, 0.69999999999999996, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.52185308551329179, 0.69999999999999996, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.69535240431168266, 0.69999999999999996, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.87007983473964923, 0.69999999999999996, 0.29999999999999999,
- 0.87266462599716477 },
- { 1.0474657975577066, 0.69999999999999996, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.2286225419931889, 0.69999999999999996, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.4136490671013271, 0.69999999999999996, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.6011813647733213, 0.69999999999999996, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.69999999999999996, nu=0.29999999999999999.
-template <typename Tp>
-void test164()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data164)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data164[i].k), Tp(data164[i].nu),
- Tp(data164[i].phi));
- const Tp f0 = data164[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996, nu=0.40000000000000002.
-testcase_ellint_3<double> data165[] = {
- { -0.0000000000000000, 0.69999999999999996, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17426474153983226, 0.69999999999999996, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34706817945773732, 0.69999999999999996, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.51760452851738159, 0.69999999999999996, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.68605801534722766, 0.69999999999999996, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.85351339387296532, 0.69999999999999996, 0.40000000000000002,
- 0.87266462599716477 },
- { 1.0215297967969537, 0.69999999999999996, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.1915051074460528, 0.69999999999999996, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.3639821911744707, 0.69999999999999996, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.5382162002954762, 0.69999999999999996, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.69999999999999996, nu=0.40000000000000002.
-template <typename Tp>
-void test165()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data165)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data165[i].k), Tp(data165[i].nu),
- Tp(data165[i].phi));
- const Tp f0 = data165[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996, nu=0.50000000000000000.
-testcase_ellint_3<double> data166[] = {
- { -0.0000000000000000, 0.69999999999999996, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17409065729516093, 0.69999999999999996, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34574489064986091, 0.69999999999999996, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.51347361925579793, 0.69999999999999996, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.67717079489579290, 0.69999999999999996, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.83793902055292280, 0.69999999999999996, 0.50000000000000000,
- 0.87266462599716477 },
- { 0.99752863545289705, 0.69999999999999996, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.1576240080401499, 0.69999999999999996, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.3191464023923762, 0.69999999999999996, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.4818433192178544, 0.69999999999999996, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.69999999999999996, nu=0.50000000000000000.
-template <typename Tp>
-void test166()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data166)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data166[i].k), Tp(data166[i].nu),
- Tp(data166[i].phi));
- const Tp f0 = data166[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996, nu=0.59999999999999998.
-testcase_ellint_3<double> data167[] = {
- { -0.0000000000000000, 0.69999999999999996, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17391719464391611, 0.69999999999999996, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34443927423869031, 0.69999999999999996, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.50945473266486074, 0.69999999999999996, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.66866056326513823, 0.69999999999999996, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.82325830002337352, 0.69999999999999996, 0.59999999999999998,
- 0.87266462599716477 },
- { 0.97522808245669357, 0.69999999999999996, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.1265300613705282, 0.69999999999999996, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.2784066076152003, 0.69999999999999996, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.4309994736080540, 0.69999999999999996, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.69999999999999996, nu=0.59999999999999998.
-template <typename Tp>
-void test167()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data167)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data167[i].k), Tp(data167[i].nu),
- Tp(data167[i].phi));
- const Tp f0 = data167[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996, nu=0.69999999999999996.
-testcase_ellint_3<double> data168[] = {
- { -0.0000000000000000, 0.69999999999999996, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17374434963995028, 0.69999999999999996, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34315091562900674, 0.69999999999999996, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.50554262375653358, 0.69999999999999996, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.66050025406305812, 0.69999999999999996, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.80938620118847404, 0.69999999999999996, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.95443223855852144, 0.69999999999999996, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.0978573207128302, 0.69999999999999996, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.2411754575007123, 0.69999999999999996, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.3848459188329196, 0.69999999999999996, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.69999999999999996, nu=0.69999999999999996.
-template <typename Tp>
-void test168()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data168)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data168[i].k), Tp(data168[i].nu),
- Tp(data168[i].phi));
- const Tp f0 = data168[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996, nu=0.80000000000000004.
-testcase_ellint_3<double> data169[] = {
- { -0.0000000000000000, 0.69999999999999996, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17357211837335737, 0.69999999999999996, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.34187941416012108, 0.69999999999999996, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.50173239465478270, 0.69999999999999996, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.65266550725988315, 0.69999999999999996, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.79624879865249298, 0.69999999999999996, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.93497577043296920, 0.69999999999999996, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.0713041566930748, 0.69999999999999996, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.2069772023255652, 0.69999999999999996, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.3427110650397533, 0.69999999999999996, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.69999999999999996, nu=0.80000000000000004.
-template <typename Tp>
-void test169()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data169)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data169[i].k), Tp(data169[i].nu),
- Tp(data169[i].phi));
- const Tp f0 = data169[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.69999999999999996, nu=0.90000000000000002.
-testcase_ellint_3<double> data170[] = {
- { -0.0000000000000000, 0.69999999999999996, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17340049697003634, 0.69999999999999996, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.34062438249741556, 0.69999999999999996, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.49801946510076878, 0.69999999999999996, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.64513432604750487, 0.69999999999999996, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.78378145487573758, 0.69999999999999996, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.91671799500854634, 0.69999999999999996, 0.90000000000000002,
- 1.0471975511965976 },
- { 1.0466193579463123, 0.69999999999999996, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.1754218079199146, 0.69999999999999996, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.3040500499695911, 0.69999999999999996, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.69999999999999996, nu=0.90000000000000002.
-template <typename Tp>
-void test170()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data170)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data170[i].k), Tp(data170[i].nu),
- Tp(data170[i].phi));
- const Tp f0 = data170[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.5952142720718732e-16
+// mean(f - f_Boost): 4.6351811278100284e-16
+// variance(f - f_Boost): 2.1278339779151204e-31
+// stddev(f - f_Boost): 4.6128450851021651e-16
+const testcase_ellint_3<double>
+data160[10] =
+{
+ { 0.0000000000000000, 0.60000000000000009, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17646850384035848, 0.60000000000000009, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36509041515134105, 0.60000000000000009, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.58097838596260631, 0.60000000000000009, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.84656453396163722, 0.60000000000000009, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.1997828426963724, 0.60000000000000009, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.7112436789225605, 0.60000000000000009, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.5193168553672312, 0.60000000000000009, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 3.8656670488606690, 0.60000000000000009, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 5.8709993116265604, 0.60000000000000009, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler160 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018, nu=0.0000000000000000.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.1569224977685422e-16
+// mean(f - f_Boost): 7.7715611723760953e-17
+// variance(f - f_Boost): 1.6571557210371951e-32
+// stddev(f - f_Boost): 1.2873056051447903e-16
+const testcase_ellint_3<double>
+data161[10] =
+{
+ { 0.0000000000000000, 0.70000000000000018, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17496737466916723, 0.70000000000000018, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35254687535677931, 0.70000000000000018, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.53536740275997130, 0.70000000000000018, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.72603797651684454, 0.70000000000000018, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.92698296348313447, 0.70000000000000018, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.1400447527693318, 0.70000000000000018, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.3657668117194073, 0.70000000000000018, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.6024686895959164, 0.70000000000000018, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.8456939983747236, 0.70000000000000018, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler161 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018, nu=0.10000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.9552278747527691e-16
+// mean(f - f_Boost): 1.1102230246251565e-16
+// variance(f - f_Boost): 1.3695501826753678e-32
+// stddev(f - f_Boost): 1.1702778228589004e-16
+const testcase_ellint_3<double>
+data162[10] =
+{
+ { 0.0000000000000000, 0.70000000000000018, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17514462737300920, 0.70000000000000018, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35396527997470451, 0.70000000000000018, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.54015179589433981, 0.70000000000000018, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.73734430854477728, 0.70000000000000018, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.94888950796697047, 0.70000000000000018, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.1772807959736322, 0.70000000000000018, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.4231796401075834, 0.70000000000000018, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.6841856799887471, 0.70000000000000018, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 1.9541347343119564, 0.70000000000000018, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler162 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018, nu=0.20000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.7430437016285820e-16
+// mean(f - f_Boost): 3.3306690738754695e-17
+// variance(f - f_Boost): 1.3695501826753678e-34
+// stddev(f - f_Boost): 1.1702778228589003e-17
+const testcase_ellint_3<double>
+data163[10] =
+{
+ { 0.0000000000000000, 0.70000000000000018, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17532252613350796, 0.70000000000000018, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35540417596807522, 0.70000000000000018, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.54508913033361928, 0.70000000000000018, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.74927635777718415, 0.70000000000000018, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.97261706337936338, 0.70000000000000018, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.2187303976209327, 0.70000000000000018, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.4887796709222487, 0.70000000000000018, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.7796581281839214, 0.70000000000000018, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 2.0829290325820207, 0.70000000000000018, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler163 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018, nu=0.30000000000000004.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.2570807706941696e-16
+// mean(f - f_Boost): 8.8817841970012528e-17
+// variance(f - f_Boost): 1.5582437633995295e-32
+// stddev(f - f_Boost): 1.2482963443828271e-16
+const testcase_ellint_3<double>
+data164[10] =
+{
+ { 0.0000000000000000, 0.70000000000000018, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17550107516328570, 0.70000000000000018, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35686409576571965, 0.70000000000000018, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.55018827316513352, 0.70000000000000018, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.76189759494390275, 0.70000000000000018, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 0.99844623430885626, 0.70000000000000018, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.2652862989039833, 0.70000000000000018, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.5647666808691361, 0.70000000000000018, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 1.8932499694938165, 0.70000000000000018, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 2.2392290510988535, 0.70000000000000018, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler164 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018, nu=0.40000000000000002.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.3719045096496910e-16
+// mean(f - f_Boost): 1.3600232051658169e-16
+// variance(f - f_Boost): 1.1718213750516114e-32
+// stddev(f - f_Boost): 1.0825069861444829e-16
+const testcase_ellint_3<double>
+data165[10] =
+{
+ { 0.0000000000000000, 0.70000000000000018, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17568027871494424, 0.70000000000000018, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35834559208180261, 0.70000000000000018, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.55545885451190613, 0.70000000000000018, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.77528120402568113, 0.70000000000000018, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 1.0267241287600322, 0.70000000000000018, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.3181380338980246, 0.70000000000000018, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.6542840785132087, 0.70000000000000018, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 2.0315595131131823, 0.70000000000000018, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.4342502915307880, 0.70000000000000018, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler165 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018, nu=0.50000000000000000.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.0277361210295499e-16
+// mean(f - f_Boost): 1.6930901125533636e-16
+// variance(f - f_Boost): 6.3799163752809956e-32
+// stddev(f - f_Boost): 2.5258496343371268e-16
+const testcase_ellint_3<double>
+data166[10] =
+{
+ { 0.0000000000000000, 0.70000000000000018, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17586014108156545, 0.70000000000000018, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.35984923894341653, 0.70000000000000018, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.56091135606739995, 0.70000000000000018, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.78951212635197054, 0.70000000000000018, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0578865732938731, 0.70000000000000018, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.3789149005151722, 0.70000000000000018, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.7620212286086228, 0.70000000000000018, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 2.2051554347435589, 0.70000000000000018, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.6868019968236996, 0.70000000000000018, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler166 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.8597454441867134e-16
+// mean(f - f_Boost): 2.5535129566378598e-16
+// variance(f - f_Boost): 2.8561208198482198e-31
+// stddev(f - f_Boost): 5.3442687243889785e-16
+const testcase_ellint_3<double>
+data167[10] =
+{
+ { 0.0000000000000000, 0.70000000000000018, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17604066659721918, 0.70000000000000018, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.36137563278353424, 0.70000000000000018, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.56655721272747606, 0.70000000000000018, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.80468966552978305, 0.70000000000000018, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.0924902943683852, 0.70000000000000018, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.4499247992499800, 0.70000000000000018, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 1.8953714382113818, 0.70000000000000018, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.4323229949248670, 0.70000000000000018, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 3.0314573496746746, 0.70000000000000018, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler167 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018, nu=0.70000000000000007.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 8
+// max(|f - f_Boost| / |f_Boost|): 3.2316852368580916e-16
+// mean(f - f_Boost): 7.7715611723760953e-17
+// variance(f - f_Boost): 7.4564398834547797e-34
+// stddev(f - f_Boost): 2.7306482533374340e-17
+const testcase_ellint_3<double>
+data168[10] =
+{
+ { 0.0000000000000000, 0.70000000000000018, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17622185963747933, 0.70000000000000018, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36292539360435261, 0.70000000000000018, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.57240892970150015, 0.70000000000000018, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.82093084713182629, 0.70000000000000018, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.1312609022179871, 0.70000000000000018, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.5345768067715795, 0.70000000000000018, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 2.0668847445934424, 0.70000000000000018, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.7483444537551245, 0.70000000000000018, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 3.5408408771788569, 0.70000000000000018, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler168 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018, nu=0.80000000000000004.
+// max(|f - f_Boost|): 1.3322676295501878e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.1198716111867353e-16
+// mean(f - f_Boost): 2.2482016248659419e-16
+// variance(f - f_Boost): 5.4326441655972001e-32
+// stddev(f - f_Boost): 2.3308033305273100e-16
+const testcase_ellint_3<double>
+data169[10] =
+{
+ { 0.0000000000000000, 0.70000000000000018, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17640372461994805, 0.70000000000000018, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36449916621651091, 0.70000000000000018, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.57848021800372584, 0.70000000000000018, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.83837480968392586, 0.70000000000000018, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.1751669030061143, 0.70000000000000018, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.6381851899173603, 0.70000000000000018, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.3002065924302197, 0.70000000000000018, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 3.2337600665337871, 0.70000000000000018, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 4.4042405729076970, 0.70000000000000018, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler169 = 2.5000000000000020e-13;
+
+// Test data for k=0.70000000000000018, nu=0.90000000000000002.
+// max(|f - f_Boost|): 3.5527136788005009e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 8.5869439826269878e-16
+// mean(f - f_Boost): 7.4384942649885490e-16
+// variance(f - f_Boost): 9.7403930714297352e-31
+// stddev(f - f_Boost): 9.8693429727767263e-16
+const testcase_ellint_3<double>
+data170[10] =
+{
+ { 0.0000000000000000, 0.70000000000000018, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17658626600478800, 0.70000000000000018, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36609762156017206, 0.70000000000000018, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.58478615187842409, 0.70000000000000018, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.85718862878291846, 0.70000000000000018, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.2255385617397643, 0.70000000000000018, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.7696521899992941, 0.70000000000000018, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.6476314987883507, 0.70000000000000018, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 4.1373434902898083, 0.70000000000000018, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 6.3796094177887763, 0.70000000000000018, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler170 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.0000000000000000.
-testcase_ellint_3<double> data171[] = {
- { -0.0000000000000000, 0.80000000000000004, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17510154241338902, 0.80000000000000004, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35365068839779390, 0.80000000000000004, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.53926804409084561, 0.80000000000000004, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.73587926028070383, 0.80000000000000004, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.94770942970071170, 0.80000000000000004, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.1789022995388239, 0.80000000000000004, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.4323027881876009, 0.80000000000000004, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.7069629739121674, 0.80000000000000004, 0.0000000000000000,
- 1.3962634015954636 },
- { 1.9953027776647296, 0.80000000000000004, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.80000000000000004, nu=0.0000000000000000.
-template <typename Tp>
-void test171()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data171)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data171[i].k), Tp(data171[i].nu),
- Tp(data171[i].phi));
- const Tp f0 = data171[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.5543122344752192e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.7898565163847540e-16
+// mean(f - f_Boost): 2.3869795029440865e-16
+// variance(f - f_Boost): 2.1368406725192426e-31
+// stddev(f - f_Boost): 4.6225974002926564e-16
+const testcase_ellint_3<double>
+data171[10] =
+{
+ { 0.0000000000000000, 0.80000000000000004, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17510154241338899, 0.80000000000000004, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35365068839779396, 0.80000000000000004, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.53926804409084550, 0.80000000000000004, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.73587926028070372, 0.80000000000000004, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.94770942970071170, 0.80000000000000004, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.1789022995388236, 0.80000000000000004, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.4323027881876012, 0.80000000000000004, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.7069629739121677, 0.80000000000000004, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 1.9953027776647294, 0.80000000000000004, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler171 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.10000000000000001.
-testcase_ellint_3<double> data172[] = {
- { -0.0000000000000000, 0.80000000000000004, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17492468824017166, 0.80000000000000004, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.35224443521476911, 0.80000000000000004, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.53456851853226961, 0.80000000000000004, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.72488875602364944, 0.80000000000000004, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.92661354274638952, 0.80000000000000004, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.1432651144499077, 0.80000000000000004, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.3774479927211429, 0.80000000000000004, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.6287092337196041, 0.80000000000000004, 0.10000000000000001,
- 1.3962634015954636 },
- { 1.8910755418379521, 0.80000000000000004, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.80000000000000004, nu=0.10000000000000001.
-template <typename Tp>
-void test172()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data172)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data172[i].k), Tp(data172[i].nu),
- Tp(data172[i].phi));
- const Tp f0 = data172[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.3898786942190374e-16
+// mean(f - f_Boost): 2.3869795029440865e-16
+// variance(f - f_Boost): 2.9190059990693968e-31
+// stddev(f - f_Boost): 5.4027826155319237e-16
+const testcase_ellint_3<double>
+data172[10] =
+{
+ { 0.0000000000000000, 0.80000000000000004, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17527903952342144, 0.80000000000000004, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35507705313548549, 0.80000000000000004, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.54411455987643553, 0.80000000000000004, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.74745625666804383, 0.80000000000000004, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.97046953684238557, 0.80000000000000004, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.2183080025184605, 0.80000000000000004, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.4943711151994405, 0.80000000000000004, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.7972401309544201, 0.80000000000000004, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 2.1172616484005085, 0.80000000000000004, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler172 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.20000000000000001.
-testcase_ellint_3<double> data173[] = {
- { -0.0000000000000000, 0.80000000000000004, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17474847286224943, 0.80000000000000004, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.35085779529084682, 0.80000000000000004, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.53000829263059157, 0.80000000000000004, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.71443466027453406, 0.80000000000000004, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.90698196872715420, 0.80000000000000004, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.1108198200558581, 0.80000000000000004, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.3284988909963957, 0.80000000000000004, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.5600369318140328, 0.80000000000000004, 0.20000000000000001,
- 1.3962634015954636 },
- { 1.8007226661734588, 0.80000000000000004, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.80000000000000004, nu=0.20000000000000001.
-template <typename Tp>
-void test173()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data173)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data173[i].k), Tp(data173[i].nu),
- Tp(data173[i].phi));
- const Tp f0 = data173[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.80000000000000004, nu=0.29999999999999999.
-testcase_ellint_3<double> data174[] = {
- { -0.0000000000000000, 0.80000000000000004, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17457289217669891, 0.80000000000000004, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.34949028801501258, 0.80000000000000004, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.52558024362769318, 0.80000000000000004, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.70447281740094914, 0.80000000000000004, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.88864745641528986, 0.80000000000000004, 0.29999999999999999,
- 0.87266462599716477 },
- { 1.0811075819341465, 0.80000000000000004, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.2844589654082377, 0.80000000000000004, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.4991461361277849, 0.80000000000000004, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.7214611048717301, 0.80000000000000004, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.80000000000000004, nu=0.29999999999999999.
-template <typename Tp>
-void test174()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data174)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data174[i].k), Tp(data174[i].nu),
- Tp(data174[i].phi));
- const Tp f0 = data174[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.8513740186068518e-16
+// mean(f - f_Boost): 2.8310687127941490e-16
+// variance(f - f_Boost): 2.7528339102381189e-31
+// stddev(f - f_Boost): 5.2467455724840699e-16
+const testcase_ellint_3<double>
+data173[10] =
+{
+ { 0.0000000000000000, 0.80000000000000004, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17545718375086419, 0.80000000000000004, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35652404627248163, 0.80000000000000004, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.54911638512920913, 0.80000000000000004, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.75967684282131176, 0.80000000000000004, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 0.99513526893543769, 0.80000000000000004, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.2622192109995993, 0.80000000000000004, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.5654106676347741, 0.80000000000000004, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 1.9029531718534984, 0.80000000000000004, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 2.2624789434186798, 0.80000000000000004, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler173 = 2.5000000000000020e-13;
+
+// Test data for k=0.80000000000000004, nu=0.30000000000000004.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.2825261583337354e-16
+// mean(f - f_Boost): 2.6367796834847468e-16
+// variance(f - f_Boost): 2.8249350208968825e-31
+// stddev(f - f_Boost): 5.3150117788175054e-16
+const testcase_ellint_3<double>
+data174[10] =
+{
+ { 0.0000000000000000, 0.80000000000000004, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17563597931587369, 0.80000000000000004, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35799220412005128, 0.80000000000000004, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.55428253691111318, 0.80000000000000004, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.77260647376977365, 0.80000000000000004, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 1.0220015271210958, 0.80000000000000004, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.3115965312302671, 0.80000000000000004, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.6478518468813512, 0.80000000000000004, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 2.0290458414203481, 0.80000000000000004, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 2.4392042002725693, 0.80000000000000004, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler174 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.40000000000000002.
-testcase_ellint_3<double> data175[] = {
- { -0.0000000000000000, 0.80000000000000004, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17439794211872178, 0.80000000000000004, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34814144964568972, 0.80000000000000004, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.52127776285273075, 0.80000000000000004, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.69496411438966599, 0.80000000000000004, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.87146878427509589, 0.80000000000000004, 0.40000000000000002,
- 0.87266462599716477 },
- { 1.0537579024937762, 0.80000000000000004, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.2445534387922637, 0.80000000000000004, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.4446769766361993, 0.80000000000000004, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.6512267838651289, 0.80000000000000004, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.80000000000000004, nu=0.40000000000000002.
-template <typename Tp>
-void test175()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data175)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data175[i].k), Tp(data175[i].nu),
- Tp(data175[i].phi));
- const Tp f0 = data175[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 8.3462748389836647e-16
+// mean(f - f_Boost): 3.3861802251067273e-16
+// variance(f - f_Boost): 4.3719465706454422e-31
+// stddev(f - f_Boost): 6.6120696991527871e-16
+const testcase_ellint_3<double>
+data175[10] =
+{
+ { 0.0000000000000000, 0.80000000000000004, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17581543047866136, 0.80000000000000004, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.35948208343061633, 0.80000000000000004, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.55962280893702021, 0.80000000000000004, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.78632063889234116, 0.80000000000000004, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 1.0514333069550323, 0.80000000000000004, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.3677213138838757, 0.80000000000000004, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.7451736773665165, 0.80000000000000004, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 2.1830100424586831, 0.80000000000000004, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 2.6604037035529724, 0.80000000000000004, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler175 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.50000000000000000.
-testcase_ellint_3<double> data176[] = {
- { -0.0000000000000000, 0.80000000000000004, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17422361866118047, 0.80000000000000004, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34681083254170475, 0.80000000000000004, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.51709470815494440, 0.80000000000000004, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.68587375344080259, 0.80000000000000004, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.85532571852810624, 0.80000000000000004, 0.50000000000000000,
- 0.87266462599716477 },
- { 1.0284677391874906, 0.80000000000000004, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.2081693942686225, 0.80000000000000004, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.3955803006426311, 0.80000000000000004, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.5884528947755532, 0.80000000000000004, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.80000000000000004, nu=0.50000000000000000.
-template <typename Tp>
-void test176()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data176)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data176[i].k), Tp(data176[i].nu),
- Tp(data176[i].phi));
- const Tp f0 = data176[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.80000000000000004, nu=0.59999999999999998.
-testcase_ellint_3<double> data177[] = {
- { -0.0000000000000000, 0.80000000000000004, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17404991781414092, 0.80000000000000004, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34549800443625167, 0.80000000000000004, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.51302536167001556, 0.80000000000000004, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.67717065003912258, 0.80000000000000004, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.84011512421134416, 0.80000000000000004, 0.59999999999999998,
- 0.87266462599716477 },
- { 1.0049863847088742, 0.80000000000000004, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.1748145941898918, 0.80000000000000004, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.3510319699755071, 0.80000000000000004, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.5319262547427865, 0.80000000000000004, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.80000000000000004, nu=0.59999999999999998.
-template <typename Tp>
-void test177()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data177)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data177[i].k), Tp(data177[i].nu),
- Tp(data177[i].phi));
- const Tp f0 = data177[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.80000000000000004, nu=0.69999999999999996.
-testcase_ellint_3<double> data178[] = {
- { -0.0000000000000000, 0.80000000000000004, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17387683562442202, 0.80000000000000004, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34420254775101611, 0.80000000000000004, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.50906439222143685, 0.80000000000000004, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.66882693152688433, 0.80000000000000004, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.82574792844091316, 0.80000000000000004, 0.69999999999999996,
- 0.87266462599716477 },
- { 0.98310431309490953, 0.80000000000000004, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.1440884535113258, 0.80000000000000004, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.3103743938952537, 0.80000000000000004, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.4806912324625332, 0.80000000000000004, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.80000000000000004, nu=0.69999999999999996.
-template <typename Tp>
-void test178()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data178)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data178[i].k), Tp(data178[i].nu),
- Tp(data178[i].phi));
- const Tp f0 = data178[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.0388243828581744e-16
+// mean(f - f_Boost): 3.8580250105724191e-16
+// variance(f - f_Boost): 6.4106456575047741e-31
+// stddev(f - f_Boost): 8.0066507713929764e-16
+const testcase_ellint_3<double>
+data176[10] =
+{
+ { 0.0000000000000000, 0.80000000000000004, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17599554153999472, 0.80000000000000004, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.36099426243351540, 0.80000000000000004, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.56514786174780673, 0.80000000000000004, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.80090697622371010, 0.80000000000000004, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.0838891627679339, 0.80000000000000004, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.4323506654466280, 0.80000000000000004, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 1.8625761085390575, 0.80000000000000004, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 2.3768757305654766, 0.80000000000000004, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 2.9478781158239746, 0.80000000000000004, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler176 = 2.5000000000000020e-13;
+
+// Test data for k=0.80000000000000004, nu=0.60000000000000009.
+// max(|f - f_Boost|): 3.5527136788005009e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 1.0631099169042069e-15
+// mean(f - f_Boost): 4.8294701571194306e-16
+// variance(f - f_Boost): 1.1633910328160319e-30
+// stddev(f - f_Boost): 1.0786060600682865e-15
+const testcase_ellint_3<double>
+data177[10] =
+{
+ { 0.0000000000000000, 0.80000000000000004, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17617631684170665, 0.80000000000000004, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.36252934193666231, 0.80000000000000004, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.57086932622945163, 0.80000000000000004, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.81646796740150973, 0.80000000000000004, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.1199552158519064, 0.80000000000000004, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.5079766673336394, 0.80000000000000004, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 2.0082747447038165, 0.80000000000000004, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.6315146066775523, 0.80000000000000004, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 3.3418121892288051, 0.80000000000000004, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler177 = 2.5000000000000020e-13;
+
+// Test data for k=0.80000000000000004, nu=0.70000000000000007.
+// max(|f - f_Boost|): 2.2204460492503131e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.6544679145741375e-16
+// mean(f - f_Boost): 3.2751579226442120e-16
+// variance(f - f_Boost): 4.4236851331020672e-31
+// stddev(f - f_Boost): 6.6510789599147505e-16
+const testcase_ellint_3<double>
+data178[10] =
+{
+ { 0.0000000000000000, 0.80000000000000004, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17635776076721221, 0.80000000000000004, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36408794649916976, 0.80000000000000004, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.57679992290624138, 0.80000000000000004, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.83312441418142813, 0.80000000000000004, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.1603958891464856, 0.80000000000000004, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.5982855143796213, 0.80000000000000004, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 2.1962484408371821, 0.80000000000000004, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 2.9873281786111869, 0.80000000000000004, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 3.9268876980046397, 0.80000000000000004, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler178 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.80000000000000004.
-testcase_ellint_3<double> data179[] = {
- { -0.0000000000000000, 0.80000000000000004, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17370436817515206, 0.80000000000000004, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.34292405894783395, 0.80000000000000004, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.50520682176250087, 0.80000000000000004, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.66081751679736189, 0.80000000000000004, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.81214672249355102, 0.80000000000000004, 0.80000000000000004,
- 0.87266462599716477 },
- { 0.96264481387685574, 0.80000000000000004, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.1156611352656258, 0.80000000000000004, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.2730756225143889, 0.80000000000000004, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.4339837018309474, 0.80000000000000004, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.80000000000000004, nu=0.80000000000000004.
-template <typename Tp>
-void test179()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data179)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data179[i].k), Tp(data179[i].nu),
- Tp(data179[i].phi));
- const Tp f0 = data179[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 9.0176949165011079e-16
+// mean(f - f_Boost): 7.0499162063697436e-16
+// variance(f - f_Boost): 1.7230805408026989e-30
+// stddev(f - f_Boost): 1.3126616246400665e-15
+const testcase_ellint_3<double>
+data179[10] =
+{
+ { 0.0000000000000000, 0.80000000000000004, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17653987774203392, 0.80000000000000004, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36567072568046877, 0.80000000000000004, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.58295359996558616, 0.80000000000000004, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.85101998309176108, 0.80000000000000004, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.2062322059736537, 0.80000000000000004, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.7090321420917429, 0.80000000000000004, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.4529058049405066, 0.80000000000000004, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 3.5368893360106948, 0.80000000000000004, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 4.9246422058196062, 0.80000000000000004, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler179 = 2.5000000000000020e-13;
// Test data for k=0.80000000000000004, nu=0.90000000000000002.
-testcase_ellint_3<double> data180[] = {
- { -0.0000000000000000, 0.80000000000000004, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17353251158533153, 0.80000000000000004, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.34166214791545768, 0.80000000000000004, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.50144799535130580, 0.80000000000000004, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.65311976193814447, 0.80000000000000004, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.79924384892320866, 0.80000000000000004, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.94345762353365625, 0.80000000000000004, 0.90000000000000002,
- 1.0471975511965976 },
- { 1.0892582069219159, 0.80000000000000004, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.2387000876610268, 0.80000000000000004, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.3911845406776222, 0.80000000000000004, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.80000000000000004, nu=0.90000000000000002.
-template <typename Tp>
-void test180()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data180)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data180[i].k), Tp(data180[i].nu),
- Tp(data180[i].phi));
- const Tp f0 = data180[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991, nu=0.0000000000000000.
-testcase_ellint_3<double> data181[] = {
- { -0.0000000000000000, 0.89999999999999991, 0.0000000000000000,
- 0.0000000000000000 },
- { 0.17525427376115027, 0.89999999999999991, 0.0000000000000000,
- 0.17453292519943295 },
- { 0.35492464591297446, 0.89999999999999991, 0.0000000000000000,
- 0.34906585039886590 },
- { 0.54388221416157123, 0.89999999999999991, 0.0000000000000000,
- 0.52359877559829882 },
- { 0.74797400423532501, 0.89999999999999991, 0.0000000000000000,
- 0.69813170079773179 },
- { 0.97463898451966458, 0.89999999999999991, 0.0000000000000000,
- 0.87266462599716477 },
- { 1.2334463254523438, 0.89999999999999991, 0.0000000000000000,
- 1.0471975511965976 },
- { 1.5355247765594910, 0.89999999999999991, 0.0000000000000000,
- 1.2217304763960306 },
- { 1.8882928567775117, 0.89999999999999991, 0.0000000000000000,
- 1.3962634015954636 },
- { 2.2805491384227699, 0.89999999999999991, 0.0000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.89999999999999991, nu=0.0000000000000000.
-template <typename Tp>
-void test181()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data181)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data181[i].k), Tp(data181[i].nu),
- Tp(data181[i].phi));
- const Tp f0 = data181[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991, nu=0.10000000000000001.
-testcase_ellint_3<double> data182[] = {
- { -0.0000000000000000, 0.89999999999999991, 0.10000000000000001,
- 0.0000000000000000 },
- { 0.17507714233254659, 0.89999999999999991, 0.10000000000000001,
- 0.17453292519943295 },
- { 0.35350932904326521, 0.89999999999999991, 0.10000000000000001,
- 0.34906585039886590 },
- { 0.53911129989870987, 0.89999999999999991, 0.10000000000000001,
- 0.52359877559829882 },
- { 0.73666644254508407, 0.89999999999999991, 0.10000000000000001,
- 0.69813170079773179 },
- { 0.95250736612100184, 0.89999999999999991, 0.10000000000000001,
- 0.87266462599716477 },
- { 1.1950199550905591, 0.89999999999999991, 0.10000000000000001,
- 1.0471975511965976 },
- { 1.4741687286340848, 0.89999999999999991, 0.10000000000000001,
- 1.2217304763960306 },
- { 1.7968678183506053, 0.89999999999999991, 0.10000000000000001,
- 1.3962634015954636 },
- { 2.1537868513875282, 0.89999999999999991, 0.10000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.89999999999999991, nu=0.10000000000000001.
-template <typename Tp>
-void test182()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data182)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data182[i].k), Tp(data182[i].nu),
- Tp(data182[i].phi));
- const Tp f0 = data182[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991, nu=0.20000000000000001.
-testcase_ellint_3<double> data183[] = {
- { -0.0000000000000000, 0.89999999999999991, 0.20000000000000001,
- 0.0000000000000000 },
- { 0.17490065089140930, 0.89999999999999991, 0.20000000000000001,
- 0.17453292519943295 },
- { 0.35211377590661436, 0.89999999999999991, 0.20000000000000001,
- 0.34906585039886590 },
- { 0.53448220334204111, 0.89999999999999991, 0.20000000000000001,
- 0.52359877559829882 },
- { 0.72591368943179591, 0.89999999999999991, 0.20000000000000001,
- 0.69813170079773179 },
- { 0.93192539780038763, 0.89999999999999991, 0.20000000000000001,
- 0.87266462599716477 },
- { 1.1600809679692681, 0.89999999999999991, 0.20000000000000001,
- 1.0471975511965976 },
- { 1.4195407225882508, 0.89999999999999991, 0.20000000000000001,
- 1.2217304763960306 },
- { 1.7168966476424521, 0.89999999999999991, 0.20000000000000001,
- 1.3962634015954636 },
- { 2.0443194576468890, 0.89999999999999991, 0.20000000000000001,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.89999999999999991, nu=0.20000000000000001.
-template <typename Tp>
-void test183()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data183)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data183[i].k), Tp(data183[i].nu),
- Tp(data183[i].phi));
- const Tp f0 = data183[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991, nu=0.29999999999999999.
-testcase_ellint_3<double> data184[] = {
- { -0.0000000000000000, 0.89999999999999991, 0.29999999999999999,
- 0.0000000000000000 },
- { 0.17472479532647534, 0.89999999999999991, 0.29999999999999999,
- 0.17453292519943295 },
- { 0.35073750187374114, 0.89999999999999991, 0.29999999999999999,
- 0.34906585039886590 },
- { 0.52998766129466968, 0.89999999999999991, 0.29999999999999999,
- 0.52359877559829882 },
- { 0.71566993548699565, 0.89999999999999991, 0.29999999999999999,
- 0.69813170079773179 },
- { 0.91271517762560195, 0.89999999999999991, 0.29999999999999999,
- 0.87266462599716477 },
- { 1.1281241199843368, 0.89999999999999991, 0.29999999999999999,
- 1.0471975511965976 },
- { 1.3704929576917448, 0.89999999999999991, 0.29999999999999999,
- 1.2217304763960306 },
- { 1.6461981511487711, 0.89999999999999991, 0.29999999999999999,
- 1.3962634015954636 },
- { 1.9486280260314424, 0.89999999999999991, 0.29999999999999999,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.89999999999999991, nu=0.29999999999999999.
-template <typename Tp>
-void test184()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data184)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data184[i].k), Tp(data184[i].nu),
- Tp(data184[i].phi));
- const Tp f0 = data184[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991, nu=0.40000000000000002.
-testcase_ellint_3<double> data185[] = {
- { -0.0000000000000000, 0.89999999999999991, 0.40000000000000002,
- 0.0000000000000000 },
- { 0.17454957156468839, 0.89999999999999991, 0.40000000000000002,
- 0.17453292519943295 },
- { 0.34938003933330430, 0.89999999999999991, 0.40000000000000002,
- 0.34906585039886590 },
- { 0.52562093533067444, 0.89999999999999991, 0.40000000000000002,
- 0.52359877559829882 },
- { 0.70589461324915681, 0.89999999999999991, 0.40000000000000002,
- 0.69813170079773179 },
- { 0.89472658511942849, 0.89999999999999991, 0.40000000000000002,
- 0.87266462599716477 },
- { 1.0987419542323438, 0.89999999999999991, 0.40000000000000002,
- 1.0471975511965976 },
- { 1.3261349565496301, 0.89999999999999991, 0.40000000000000002,
- 1.2217304763960306 },
- { 1.5831293909853761, 0.89999999999999991, 0.40000000000000002,
- 1.3962634015954636 },
- { 1.8641114227238347, 0.89999999999999991, 0.40000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.89999999999999991, nu=0.40000000000000002.
-template <typename Tp>
-void test185()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data185)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data185[i].k), Tp(data185[i].nu),
- Tp(data185[i].phi));
- const Tp f0 = data185[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991, nu=0.50000000000000000.
-testcase_ellint_3<double> data186[] = {
- { -0.0000000000000000, 0.89999999999999991, 0.50000000000000000,
- 0.0000000000000000 },
- { 0.17437497557073336, 0.89999999999999991, 0.50000000000000000,
- 0.17453292519943295 },
- { 0.34804093691586013, 0.89999999999999991, 0.50000000000000000,
- 0.34906585039886590 },
- { 0.52137576320372903, 0.89999999999999991, 0.50000000000000000,
- 0.52359877559829882 },
- { 0.69655163996912262, 0.89999999999999991, 0.50000000000000000,
- 0.69813170079773179 },
- { 0.87783188683054236, 0.89999999999999991, 0.50000000000000000,
- 0.87266462599716477 },
- { 1.0716015959755183, 0.89999999999999991, 0.50000000000000000,
- 1.0471975511965976 },
- { 1.2857636916026749, 0.89999999999999991, 0.50000000000000000,
- 1.2217304763960306 },
- { 1.5264263913252358, 0.89999999999999991, 0.50000000000000000,
- 1.3962634015954636 },
- { 1.7888013241937859, 0.89999999999999991, 0.50000000000000000,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.89999999999999991, nu=0.50000000000000000.
-template <typename Tp>
-void test186()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data186)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data186[i].k), Tp(data186[i].nu),
- Tp(data186[i].phi));
- const Tp f0 = data186[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991, nu=0.59999999999999998.
-testcase_ellint_3<double> data187[] = {
- { -0.0000000000000000, 0.89999999999999991, 0.59999999999999998,
- 0.0000000000000000 },
- { 0.17420100334657815, 0.89999999999999991, 0.59999999999999998,
- 0.17453292519943295 },
- { 0.34671975876122157, 0.89999999999999991, 0.59999999999999998,
- 0.34906585039886590 },
- { 0.51724631570707957, 0.89999999999999991, 0.59999999999999998,
- 0.52359877559829882 },
- { 0.68760879113743034, 0.89999999999999991, 0.59999999999999998,
- 0.69813170079773179 },
- { 0.86192157779698364, 0.89999999999999991, 0.59999999999999998,
- 0.87266462599716477 },
- { 1.0464279696166352, 0.89999999999999991, 0.59999999999999998,
- 1.0471975511965976 },
- { 1.2488156247094004, 0.89999999999999991, 0.59999999999999998,
- 1.2217304763960306 },
- { 1.4750988777188470, 0.89999999999999991, 0.59999999999999998,
- 1.3962634015954636 },
- { 1.7211781128919521, 0.89999999999999991, 0.59999999999999998,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.89999999999999991, nu=0.59999999999999998.
-template <typename Tp>
-void test187()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data187)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data187[i].k), Tp(data187[i].nu),
- Tp(data187[i].phi));
- const Tp f0 = data187[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991, nu=0.69999999999999996.
-testcase_ellint_3<double> data188[] = {
- { -0.0000000000000000, 0.89999999999999991, 0.69999999999999996,
- 0.0000000000000000 },
- { 0.17402765093102210, 0.89999999999999991, 0.69999999999999996,
- 0.17453292519943295 },
- { 0.34541608382635131, 0.89999999999999991, 0.69999999999999996,
- 0.34906585039886590 },
- { 0.51322715827061693, 0.89999999999999991, 0.69999999999999996,
- 0.52359877559829882 },
- { 0.67903717872440283, 0.89999999999999991, 0.69999999999999996,
- 0.69813170079773179 },
- { 0.84690113601682671, 0.89999999999999991, 0.69999999999999996,
- 0.87266462599716477 },
- { 1.0229914311548416, 0.89999999999999991, 0.69999999999999996,
- 1.0471975511965976 },
- { 1.2148329639709381, 0.89999999999999991, 0.69999999999999996,
- 1.2217304763960306 },
- { 1.4283586501307799, 0.89999999999999991, 0.69999999999999996,
- 1.3962634015954636 },
- { 1.6600480747670936, 0.89999999999999991, 0.69999999999999996,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.89999999999999991, nu=0.69999999999999996.
-template <typename Tp>
-void test188()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data188)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data188[i].k), Tp(data188[i].nu),
- Tp(data188[i].phi));
- const Tp f0 = data188[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991, nu=0.80000000000000004.
-testcase_ellint_3<double> data189[] = {
- { -0.0000000000000000, 0.89999999999999991, 0.80000000000000004,
- 0.0000000000000000 },
- { 0.17385491439925149, 0.89999999999999991, 0.80000000000000004,
- 0.17453292519943295 },
- { 0.34412950523113928, 0.89999999999999991, 0.80000000000000004,
- 0.34906585039886590 },
- { 0.50931321668729601, 0.89999999999999991, 0.80000000000000004,
- 0.52359877559829882 },
- { 0.67081081392296327, 0.89999999999999991, 0.80000000000000004,
- 0.69813170079773179 },
- { 0.83268846097293259, 0.89999999999999991, 0.80000000000000004,
- 0.87266462599716477 },
- { 1.0010985015814025, 0.89999999999999991, 0.80000000000000004,
- 1.0471975511965976 },
- { 1.1834394045489678, 0.89999999999999991, 0.80000000000000004,
- 1.2217304763960306 },
- { 1.3855695891683182, 0.89999999999999991, 0.80000000000000004,
- 1.3962634015954636 },
- { 1.6044591960982200, 0.89999999999999991, 0.80000000000000004,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.89999999999999991, nu=0.80000000000000004.
-template <typename Tp>
-void test189()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data189)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data189[i].k), Tp(data189[i].nu),
- Tp(data189[i].phi));
- const Tp f0 = data189[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
-
-// Test data for k=0.89999999999999991, nu=0.90000000000000002.
-testcase_ellint_3<double> data190[] = {
- { -0.0000000000000000, 0.89999999999999991, 0.90000000000000002,
- 0.0000000000000000 },
- { 0.17368278986240138, 0.89999999999999991, 0.90000000000000002,
- 0.17453292519943295 },
- { 0.34285962963961397, 0.89999999999999991, 0.90000000000000002,
- 0.34906585039886590 },
- { 0.50549974644993312, 0.89999999999999991, 0.90000000000000002,
- 0.52359877559829882 },
- { 0.66290623857720876, 0.89999999999999991, 0.90000000000000002,
- 0.69813170079773179 },
- { 0.81921183128847164, 0.89999999999999991, 0.90000000000000002,
- 0.87266462599716477 },
- { 0.98058481956066368, 0.89999999999999991, 0.90000000000000002,
- 1.0471975511965976 },
- { 1.1543223520473569, 0.89999999999999991, 0.90000000000000002,
- 1.2217304763960306 },
- { 1.3462119782292934, 0.89999999999999991, 0.90000000000000002,
- 1.3962634015954636 },
- { 1.5536420236310944, 0.89999999999999991, 0.90000000000000002,
- 1.5707963267948966 },
-};
-
-// Test function for k=0.89999999999999991, nu=0.90000000000000002.
-template <typename Tp>
-void test190()
-{
- const Tp eps = std::numeric_limits<Tp>::epsilon();
- Tp max_abs_diff = -Tp(1);
- Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data190)
- / sizeof(testcase_ellint_3<double>);
- for (unsigned int i = 0; i < num_datum; ++i)
- {
- const Tp f = std::tr1::ellint_3(Tp(data190[i].k), Tp(data190[i].nu),
- Tp(data190[i].phi));
- const Tp f0 = data190[i].f0;
- const Tp diff = f - f0;
- if (std::abs(diff) > max_abs_diff)
- max_abs_diff = std::abs(diff);
- if (std::abs(f0) > Tp(10) * eps
- && std::abs(f) > Tp(10) * eps)
- {
- const Tp frac = diff / f0;
- if (std::abs(frac) > max_abs_frac)
- max_abs_frac = std::abs(frac);
- }
- }
- VERIFY(max_abs_frac < Tp(2.5000000000000020e-13));
-}
+// max(|f - f_Boost|): 4.4408920985006262e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 7.7782721357365268e-16
+// mean(f - f_Boost): 8.9928064994637676e-16
+// variance(f - f_Boost): 1.5485199571025344e-30
+// stddev(f - f_Boost): 1.2443954183066307e-15
+const testcase_ellint_3<double>
+data180[10] =
+{
+ { 0.0000000000000000, 0.80000000000000004, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17672267223433513, 0.80000000000000004, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36727835537196063, 0.80000000000000004, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.58934569363716649, 0.80000000000000004, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.87032723471138851, 0.80000000000000004, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.2588676111323349, 0.80000000000000004, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.8498731900660019, 0.80000000000000004, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 2.8368381299300420, 0.80000000000000004, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 4.5674844191654058, 0.80000000000000004, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 7.2263259298637115, 0.80000000000000004, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler180 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013, nu=0.0000000000000000.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.3381508715713360e-16
+// mean(f - f_Boost): 5.8286708792820721e-17
+// variance(f - f_Boost): 4.1942474344433133e-34
+// stddev(f - f_Boost): 2.0479861900030756e-17
+const testcase_ellint_3<double>
+data181[10] =
+{
+ { 0.0000000000000000, 0.90000000000000013, 0.0000000000000000,
+ 0.0000000000000000 },
+ { 0.17525427376115027, 0.90000000000000013, 0.0000000000000000,
+ 0.17453292519943295 },
+ { 0.35492464591297446, 0.90000000000000013, 0.0000000000000000,
+ 0.34906585039886590 },
+ { 0.54388221416157123, 0.90000000000000013, 0.0000000000000000,
+ 0.52359877559829882 },
+ { 0.74797400423532512, 0.90000000000000013, 0.0000000000000000,
+ 0.69813170079773179 },
+ { 0.97463898451966446, 0.90000000000000013, 0.0000000000000000,
+ 0.87266462599716477 },
+ { 1.2334463254523440, 0.90000000000000013, 0.0000000000000000,
+ 1.0471975511965976 },
+ { 1.5355247765594915, 0.90000000000000013, 0.0000000000000000,
+ 1.2217304763960306 },
+ { 1.8882928567775128, 0.90000000000000013, 0.0000000000000000,
+ 1.3962634015954636 },
+ { 2.2805491384227707, 0.90000000000000013, 0.0000000000000000,
+ 1.5707963267948966 },
+};
+const double toler181 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013, nu=0.10000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.1500594295134815e-16
+// mean(f - f_Boost): 9.1593399531575410e-17
+// variance(f - f_Boost): 1.0357223256482469e-33
+// stddev(f - f_Boost): 3.2182640128619758e-17
+const testcase_ellint_3<double>
+data182[10] =
+{
+ { 0.0000000000000000, 0.90000000000000013, 0.10000000000000001,
+ 0.0000000000000000 },
+ { 0.17543204932716244, 0.90000000000000013, 0.10000000000000001,
+ 0.17453292519943295 },
+ { 0.35636022898551184, 0.90000000000000013, 0.10000000000000001,
+ 0.34906585039886590 },
+ { 0.54880278898382595, 0.90000000000000013, 0.10000000000000001,
+ 0.52359877559829882 },
+ { 0.75988834774529268, 0.90000000000000013, 0.10000000000000001,
+ 0.69813170079773179 },
+ { 0.99853303003568117, 0.90000000000000013, 0.10000000000000001,
+ 0.87266462599716477 },
+ { 1.2759958823999022, 0.90000000000000013, 0.10000000000000001,
+ 1.0471975511965976 },
+ { 1.6051187364639401, 0.90000000000000013, 0.10000000000000001,
+ 1.2217304763960306 },
+ { 1.9941406879519474, 0.90000000000000013, 0.10000000000000001,
+ 1.3962634015954636 },
+ { 2.4295011187834890, 0.90000000000000013, 0.10000000000000001,
+ 1.5707963267948966 },
+};
+const double toler182 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013, nu=0.20000000000000001.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.9533518431433547e-16
+// mean(f - f_Boost): 1.0269562977782698e-16
+// variance(f - f_Boost): 1.4388836606733082e-32
+// stddev(f - f_Boost): 1.1995347684303728e-16
+const testcase_ellint_3<double>
+data183[10] =
+{
+ { 0.0000000000000000, 0.90000000000000013, 0.20000000000000001,
+ 0.0000000000000000 },
+ { 0.17561047321968409, 0.90000000000000013, 0.20000000000000001,
+ 0.17453292519943295 },
+ { 0.35781659944356109, 0.90000000000000013, 0.20000000000000001,
+ 0.34906585039886590 },
+ { 0.55388150905215283, 0.90000000000000013, 0.20000000000000001,
+ 0.52359877559829882 },
+ { 0.77246874123251441, 0.90000000000000013, 0.20000000000000001,
+ 0.69813170079773179 },
+ { 1.0244466254771925, 0.90000000000000013, 0.20000000000000001,
+ 0.87266462599716477 },
+ { 1.3234824077640801, 0.90000000000000013, 0.20000000000000001,
+ 1.0471975511965976 },
+ { 1.6849848968804240, 0.90000000000000013, 0.20000000000000001,
+ 1.2217304763960306 },
+ { 2.1185749045502278, 0.90000000000000013, 0.20000000000000001,
+ 1.3962634015954636 },
+ { 2.6076835743348417, 0.90000000000000013, 0.20000000000000001,
+ 1.5707963267948966 },
+};
+const double toler183 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013, nu=0.30000000000000004.
+// max(|f - f_Boost|): 6.6613381477509392e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 3.9712691025502371e-16
+// mean(f - f_Boost): 6.9388939039072284e-17
+// variance(f - f_Boost): 5.9442282234173945e-34
+// stddev(f - f_Boost): 2.4380787976227090e-17
+const testcase_ellint_3<double>
+data184[10] =
+{
+ { 0.0000000000000000, 0.90000000000000013, 0.30000000000000004,
+ 0.0000000000000000 },
+ { 0.17578954966746221, 0.90000000000000013, 0.30000000000000004,
+ 0.17453292519943295 },
+ { 0.35929429810867447, 0.90000000000000013, 0.30000000000000004,
+ 0.34906585039886590 },
+ { 0.55912757154240822, 0.90000000000000013, 0.30000000000000004,
+ 0.52359877559829882 },
+ { 0.78578314722025389, 0.90000000000000013, 0.30000000000000004,
+ 0.69813170079773179 },
+ { 1.0526941001131365, 0.90000000000000013, 0.30000000000000004,
+ 0.87266462599716477 },
+ { 1.3769682234538601, 0.90000000000000013, 0.30000000000000004,
+ 1.0471975511965976 },
+ { 1.7779437432911240, 0.90000000000000013, 0.30000000000000004,
+ 1.2217304763960306 },
+ { 2.2676509341813635, 0.90000000000000013, 0.30000000000000004,
+ 1.3962634015954636 },
+ { 2.8256506968858517, 0.90000000000000013, 0.30000000000000004,
+ 1.5707963267948966 },
+};
+const double toler184 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013, nu=0.40000000000000002.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.7042235432234642e-16
+// mean(f - f_Boost): 1.8041124150158794e-16
+// variance(f - f_Boost): 8.5834655546147173e-33
+// stddev(f - f_Boost): 9.2646994309662939e-17
+const testcase_ellint_3<double>
+data185[10] =
+{
+ { 0.0000000000000000, 0.90000000000000013, 0.40000000000000002,
+ 0.0000000000000000 },
+ { 0.17596928293938452, 0.90000000000000013, 0.40000000000000002,
+ 0.17453292519943295 },
+ { 0.36079388642472821, 0.90000000000000013, 0.40000000000000002,
+ 0.34906585039886590 },
+ { 0.56455096667115612, 0.90000000000000013, 0.40000000000000002,
+ 0.52359877559829882 },
+ { 0.79990996997869435, 0.90000000000000013, 0.40000000000000002,
+ 0.69813170079773179 },
+ { 1.0836647913872215, 0.90000000000000013, 0.40000000000000002,
+ 0.87266462599716477 },
+ { 1.4378726836091849, 0.90000000000000013, 0.40000000000000002,
+ 1.0471975511965976 },
+ { 1.8880446720682853, 0.90000000000000013, 0.40000000000000002,
+ 1.2217304763960306 },
+ { 2.4505848932025232, 0.90000000000000013, 0.40000000000000002,
+ 1.3962634015954636 },
+ { 3.1000689868578624, 0.90000000000000013, 0.40000000000000002,
+ 1.5707963267948966 },
+};
+const double toler185 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013, nu=0.50000000000000000.
+// max(|f - f_Boost|): 8.8817841970012523e-16 at index 7
+// max(|f - f_Boost| / |f_Boost|): 4.3939646155354115e-16
+// mean(f - f_Boost): 1.5820678100908481e-16
+// variance(f - f_Boost): 1.0089970755557622e-32
+// stddev(f - f_Boost): 1.0044884646205561e-16
+const testcase_ellint_3<double>
+data186[10] =
+{
+ { 0.0000000000000000, 0.90000000000000013, 0.50000000000000000,
+ 0.0000000000000000 },
+ { 0.17614967734498183, 0.90000000000000013, 0.50000000000000000,
+ 0.17453292519943295 },
+ { 0.36231594750319435, 0.90000000000000013, 0.50000000000000000,
+ 0.34906585039886590 },
+ { 0.57016256984349567, 0.90000000000000013, 0.50000000000000000,
+ 0.52359877559829882 },
+ { 0.81494025918293422, 0.90000000000000013, 0.50000000000000000,
+ 0.69813170079773179 },
+ { 1.1178482279283477, 0.90000000000000013, 0.50000000000000000,
+ 0.87266462599716477 },
+ { 1.5081455873012106, 0.90000000000000013, 0.50000000000000000,
+ 1.0471975511965976 },
+ { 2.0213599730863998, 0.90000000000000013, 0.50000000000000000,
+ 1.2217304763960306 },
+ { 2.6822467012926832, 0.90000000000000013, 0.50000000000000000,
+ 1.3962634015954636 },
+ { 3.4591069002104686, 0.90000000000000013, 0.50000000000000000,
+ 1.5707963267948966 },
+};
+const double toler186 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013, nu=0.60000000000000009.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 4.4914274070443813e-16
+// mean(f - f_Boost): 3.4694469519536142e-16
+// variance(f - f_Boost): 2.5224926888894056e-31
+// stddev(f - f_Boost): 5.0224423231027804e-16
+const testcase_ellint_3<double>
+data187[10] =
+{
+ { 0.0000000000000000, 0.90000000000000013, 0.60000000000000009,
+ 0.0000000000000000 },
+ { 0.17633073723493825, 0.90000000000000013, 0.60000000000000009,
+ 0.17453292519943295 },
+ { 0.36386108723492810, 0.90000000000000013, 0.60000000000000009,
+ 0.34906585039886590 },
+ { 0.57597424744716241, 0.90000000000000013, 0.60000000000000009,
+ 0.52359877559829882 },
+ { 0.83098051948501150, 0.90000000000000013, 0.60000000000000009,
+ 0.69813170079773179 },
+ { 1.1558706545698916, 0.90000000000000013, 0.60000000000000009,
+ 0.87266462599716477 },
+ { 1.5905576379415669, 0.90000000000000013, 0.60000000000000009,
+ 1.0471975511965976 },
+ { 2.1875186010215084, 0.90000000000000013, 0.60000000000000009,
+ 1.2217304763960306 },
+ { 2.9885767771316853, 0.90000000000000013, 0.60000000000000009,
+ 1.3962634015954636 },
+ { 3.9549939883570238, 0.90000000000000013, 0.60000000000000009,
+ 1.5707963267948966 },
+};
+const double toler187 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013, nu=0.70000000000000007.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 9
+// max(|f - f_Boost| / |f_Boost|): 5.5442489886293633e-16
+// mean(f - f_Boost): 4.3576253716537392e-16
+// variance(f - f_Boost): 2.2187568928205130e-31
+// stddev(f - f_Boost): 4.7103682370070737e-16
+const testcase_ellint_3<double>
+data188[10] =
+{
+ { 0.0000000000000000, 0.90000000000000013, 0.70000000000000007,
+ 0.0000000000000000 },
+ { 0.17651246700160939, 0.90000000000000013, 0.70000000000000007,
+ 0.17453292519943295 },
+ { 0.36542993547358982, 0.90000000000000013, 0.70000000000000007,
+ 0.34906585039886590 },
+ { 0.58199897877674867, 0.90000000000000013, 0.70000000000000007,
+ 0.52359877559829882 },
+ { 0.84815633587352857, 0.90000000000000013, 0.70000000000000007,
+ 0.69813170079773179 },
+ { 1.1985495623872375, 0.90000000000000013, 0.70000000000000007,
+ 0.87266462599716477 },
+ { 1.6892158134027691, 0.90000000000000013, 0.70000000000000007,
+ 1.0471975511965976 },
+ { 2.4029722191094236, 0.90000000000000013, 0.70000000000000007,
+ 1.2217304763960306 },
+ { 3.4201084941340061, 0.90000000000000013, 0.70000000000000007,
+ 1.3962634015954636 },
+ { 4.6985482312992444, 0.90000000000000013, 0.70000000000000007,
+ 1.5707963267948966 },
+};
+const double toler188 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013, nu=0.80000000000000004.
+// max(|f - f_Boost|): 1.7763568394002505e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.9362432595976420e-16
+// mean(f - f_Boost): 3.0531133177191805e-16
+// variance(f - f_Boost): 1.1508025840536076e-32
+// stddev(f - f_Boost): 1.0727546709539920e-16
+const testcase_ellint_3<double>
+data189[10] =
+{
+ { 0.0000000000000000, 0.90000000000000013, 0.80000000000000004,
+ 0.0000000000000000 },
+ { 0.17669487107954862, 0.90000000000000013, 0.80000000000000004,
+ 0.17453292519943295 },
+ { 0.36702314729628421, 0.90000000000000013, 0.80000000000000004,
+ 0.34906585039886590 },
+ { 0.58825099711365492, 0.90000000000000013, 0.80000000000000004,
+ 0.52359877559829882 },
+ { 0.86661711422209031, 0.90000000000000013, 0.80000000000000004,
+ 0.69813170079773179 },
+ { 1.2469779109884802, 0.90000000000000013, 0.80000000000000004,
+ 0.87266462599716477 },
+ { 1.8105469760531578, 0.90000000000000013, 0.80000000000000004,
+ 1.0471975511965976 },
+ { 2.6989505165893752, 0.90000000000000013, 0.80000000000000004,
+ 1.2217304763960306 },
+ { 4.0935213267757433, 0.90000000000000013, 0.80000000000000004,
+ 1.3962634015954636 },
+ { 5.9820740813645727, 0.90000000000000013, 0.80000000000000004,
+ 1.5707963267948966 },
+};
+const double toler189 = 2.5000000000000020e-13;
+
+// Test data for k=0.90000000000000013, nu=0.90000000000000002.
+// max(|f - f_Boost|): 2.6645352591003757e-15 at index 8
+// max(|f - f_Boost| / |f_Boost|): 4.9577148062669782e-16
+// mean(f - f_Boost): 5.9119376061289588e-16
+// variance(f - f_Boost): 1.7340883003959522e-31
+// stddev(f - f_Boost): 4.1642385863395872e-16
+const testcase_ellint_3<double>
+data190[10] =
+{
+ { 0.0000000000000000, 0.90000000000000013, 0.90000000000000002,
+ 0.0000000000000000 },
+ { 0.17687795394604169, 0.90000000000000013, 0.90000000000000002,
+ 0.17453292519943295 },
+ { 0.36864140434751286, 0.90000000000000013, 0.90000000000000002,
+ 0.34906585039886590 },
+ { 0.59474595366817051, 0.90000000000000013, 0.90000000000000002,
+ 0.52359877559829882 },
+ { 0.88654237226056665, 0.90000000000000013, 0.90000000000000002,
+ 0.69813170079773179 },
+ { 1.3026595810616726, 0.90000000000000013, 0.90000000000000002,
+ 0.87266462599716477 },
+ { 1.9653635459278080, 0.90000000000000013, 0.90000000000000002,
+ 1.0471975511965976 },
+ { 3.1451407527189468, 0.90000000000000013, 0.90000000000000002,
+ 1.2217304763960306 },
+ { 5.3745230680316132, 0.90000000000000013, 0.90000000000000002,
+ 1.3962634015954636 },
+ { 8.9942562031858717, 0.90000000000000013, 0.90000000000000002,
+ 1.5707963267948966 },
+};
+const double toler190 = 2.5000000000000020e-13;
+
+template<typename Ret, unsigned int Num>
+ void
+ test(const testcase_ellint_3<Ret> (&data)[Num], Ret toler)
+ {
+ bool test __attribute__((unused)) = true;
+ const Ret eps = std::numeric_limits<Ret>::epsilon();
+ Ret max_abs_diff = -Ret(1);
+ Ret max_abs_frac = -Ret(1);
+ unsigned int num_datum = Num;
+ for (unsigned int i = 0; i < num_datum; ++i)
+ {
+ const Ret f = std::tr1::ellint_3(data[i].k, data[i].nu,
+ data[i].phi);
+ const Ret f0 = data[i].f0;
+ const Ret diff = f - f0;
+ if (std::abs(diff) > max_abs_diff)
+ max_abs_diff = std::abs(diff);
+ if (std::abs(f0) > Ret(10) * eps
+ && std::abs(f) > Ret(10) * eps)
+ {
+ const Ret frac = diff / f0;
+ if (std::abs(frac) > max_abs_frac)
+ max_abs_frac = std::abs(frac);
+ }
+ }
+ VERIFY(max_abs_frac < toler);
+ }
-int main(int, char**)
-{
- test001<double>();
- test002<double>();
- test003<double>();
- test004<double>();
- test005<double>();
- test006<double>();
- test007<double>();
- test008<double>();
- test009<double>();
- test010<double>();
- test011<double>();
- test012<double>();
- test013<double>();
- test014<double>();
- test015<double>();
- test016<double>();
- test017<double>();
- test018<double>();
- test019<double>();
- test020<double>();
- test021<double>();
- test022<double>();
- test023<double>();
- test024<double>();
- test025<double>();
- test026<double>();
- test027<double>();
- test028<double>();
- test029<double>();
- test030<double>();
- test031<double>();
- test032<double>();
- test033<double>();
- test034<double>();
- test035<double>();
- test036<double>();
- test037<double>();
- test038<double>();
- test039<double>();
- test040<double>();
- test041<double>();
- test042<double>();
- test043<double>();
- test044<double>();
- test045<double>();
- test046<double>();
- test047<double>();
- test048<double>();
- test049<double>();
- test050<double>();
- test051<double>();
- test052<double>();
- test053<double>();
- test054<double>();
- test055<double>();
- test056<double>();
- test057<double>();
- test058<double>();
- test059<double>();
- test060<double>();
- test061<double>();
- test062<double>();
- test063<double>();
- test064<double>();
- test065<double>();
- test066<double>();
- test067<double>();
- test068<double>();
- test069<double>();
- test070<double>();
- test071<double>();
- test072<double>();
- test073<double>();
- test074<double>();
- test075<double>();
- test076<double>();
- test077<double>();
- test078<double>();
- test079<double>();
- test080<double>();
- test081<double>();
- test082<double>();
- test083<double>();
- test084<double>();
- test085<double>();
- test086<double>();
- test087<double>();
- test088<double>();
- test089<double>();
- test090<double>();
- test091<double>();
- test092<double>();
- test093<double>();
- test094<double>();
- test095<double>();
- test096<double>();
- test097<double>();
- test098<double>();
- test099<double>();
- test100<double>();
- test101<double>();
- test102<double>();
- test103<double>();
- test104<double>();
- test105<double>();
- test106<double>();
- test107<double>();
- test108<double>();
- test109<double>();
- test110<double>();
- test111<double>();
- test112<double>();
- test113<double>();
- test114<double>();
- test115<double>();
- test116<double>();
- test117<double>();
- test118<double>();
- test119<double>();
- test120<double>();
- test121<double>();
- test122<double>();
- test123<double>();
- test124<double>();
- test125<double>();
- test126<double>();
- test127<double>();
- test128<double>();
- test129<double>();
- test130<double>();
- test131<double>();
- test132<double>();
- test133<double>();
- test134<double>();
- test135<double>();
- test136<double>();
- test137<double>();
- test138<double>();
- test139<double>();
- test140<double>();
- test141<double>();
- test142<double>();
- test143<double>();
- test144<double>();
- test145<double>();
- test146<double>();
- test147<double>();
- test148<double>();
- test149<double>();
- test150<double>();
- test151<double>();
- test152<double>();
- test153<double>();
- test154<double>();
- test155<double>();
- test156<double>();
- test157<double>();
- test158<double>();
- test159<double>();
- test160<double>();
- test161<double>();
- test162<double>();
- test163<double>();
- test164<double>();
- test165<double>();
- test166<double>();
- test167<double>();
- test168<double>();
- test169<double>();
- test170<double>();
- test171<double>();
- test172<double>();
- test173<double>();
- test174<double>();
- test175<double>();
- test176<double>();
- test177<double>();
- test178<double>();
- test179<double>();
- test180<double>();
- test181<double>();
- test182<double>();
- test183<double>();
- test184<double>();
- test185<double>();
- test186<double>();
- test187<double>();
- test188<double>();
- test189<double>();
- test190<double>();
+int
+main()
+{
+ test(data001, toler001);
+ test(data002, toler002);
+ test(data003, toler003);
+ test(data004, toler004);
+ test(data005, toler005);
+ test(data006, toler006);
+ test(data007, toler007);
+ test(data008, toler008);
+ test(data009, toler009);
+ test(data010, toler010);
+ test(data011, toler011);
+ test(data012, toler012);
+ test(data013, toler013);
+ test(data014, toler014);
+ test(data015, toler015);
+ test(data016, toler016);
+ test(data017, toler017);
+ test(data018, toler018);
+ test(data019, toler019);
+ test(data020, toler020);
+ test(data021, toler021);
+ test(data022, toler022);
+ test(data023, toler023);
+ test(data024, toler024);
+ test(data025, toler025);
+ test(data026, toler026);
+ test(data027, toler027);
+ test(data028, toler028);
+ test(data029, toler029);
+ test(data030, toler030);
+ test(data031, toler031);
+ test(data032, toler032);
+ test(data033, toler033);
+ test(data034, toler034);
+ test(data035, toler035);
+ test(data036, toler036);
+ test(data037, toler037);
+ test(data038, toler038);
+ test(data039, toler039);
+ test(data040, toler040);
+ test(data041, toler041);
+ test(data042, toler042);
+ test(data043, toler043);
+ test(data044, toler044);
+ test(data045, toler045);
+ test(data046, toler046);
+ test(data047, toler047);
+ test(data048, toler048);
+ test(data049, toler049);
+ test(data050, toler050);
+ test(data051, toler051);
+ test(data052, toler052);
+ test(data053, toler053);
+ test(data054, toler054);
+ test(data055, toler055);
+ test(data056, toler056);
+ test(data057, toler057);
+ test(data058, toler058);
+ test(data059, toler059);
+ test(data060, toler060);
+ test(data061, toler061);
+ test(data062, toler062);
+ test(data063, toler063);
+ test(data064, toler064);
+ test(data065, toler065);
+ test(data066, toler066);
+ test(data067, toler067);
+ test(data068, toler068);
+ test(data069, toler069);
+ test(data070, toler070);
+ test(data071, toler071);
+ test(data072, toler072);
+ test(data073, toler073);
+ test(data074, toler074);
+ test(data075, toler075);
+ test(data076, toler076);
+ test(data077, toler077);
+ test(data078, toler078);
+ test(data079, toler079);
+ test(data080, toler080);
+ test(data081, toler081);
+ test(data082, toler082);
+ test(data083, toler083);
+ test(data084, toler084);
+ test(data085, toler085);
+ test(data086, toler086);
+ test(data087, toler087);
+ test(data088, toler088);
+ test(data089, toler089);
+ test(data090, toler090);
+ test(data091, toler091);
+ test(data092, toler092);
+ test(data093, toler093);
+ test(data094, toler094);
+ test(data095, toler095);
+ test(data096, toler096);
+ test(data097, toler097);
+ test(data098, toler098);
+ test(data099, toler099);
+ test(data100, toler100);
+ test(data101, toler101);
+ test(data102, toler102);
+ test(data103, toler103);
+ test(data104, toler104);
+ test(data105, toler105);
+ test(data106, toler106);
+ test(data107, toler107);
+ test(data108, toler108);
+ test(data109, toler109);
+ test(data110, toler110);
+ test(data111, toler111);
+ test(data112, toler112);
+ test(data113, toler113);
+ test(data114, toler114);
+ test(data115, toler115);
+ test(data116, toler116);
+ test(data117, toler117);
+ test(data118, toler118);
+ test(data119, toler119);
+ test(data120, toler120);
+ test(data121, toler121);
+ test(data122, toler122);
+ test(data123, toler123);
+ test(data124, toler124);
+ test(data125, toler125);
+ test(data126, toler126);
+ test(data127, toler127);
+ test(data128, toler128);
+ test(data129, toler129);
+ test(data130, toler130);
+ test(data131, toler131);
+ test(data132, toler132);
+ test(data133, toler133);
+ test(data134, toler134);
+ test(data135, toler135);
+ test(data136, toler136);
+ test(data137, toler137);
+ test(data138, toler138);
+ test(data139, toler139);
+ test(data140, toler140);
+ test(data141, toler141);
+ test(data142, toler142);
+ test(data143, toler143);
+ test(data144, toler144);
+ test(data145, toler145);
+ test(data146, toler146);
+ test(data147, toler147);
+ test(data148, toler148);
+ test(data149, toler149);
+ test(data150, toler150);
+ test(data151, toler151);
+ test(data152, toler152);
+ test(data153, toler153);
+ test(data154, toler154);
+ test(data155, toler155);
+ test(data156, toler156);
+ test(data157, toler157);
+ test(data158, toler158);
+ test(data159, toler159);
+ test(data160, toler160);
+ test(data161, toler161);
+ test(data162, toler162);
+ test(data163, toler163);
+ test(data164, toler164);
+ test(data165, toler165);
+ test(data166, toler166);
+ test(data167, toler167);
+ test(data168, toler168);
+ test(data169, toler169);
+ test(data170, toler170);
+ test(data171, toler171);
+ test(data172, toler172);
+ test(data173, toler173);
+ test(data174, toler174);
+ test(data175, toler175);
+ test(data176, toler176);
+ test(data177, toler177);
+ test(data178, toler178);
+ test(data179, toler179);
+ test(data180, toler180);
+ test(data181, toler181);
+ test(data182, toler182);
+ test(data183, toler183);
+ test(data184, toler184);
+ test(data185, toler185);
+ test(data186, toler186);
+ test(data187, toler187);
+ test(data188, toler188);
+ test(data189, toler189);
+ test(data190, toler190);
return 0;
}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/pr66689.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/pr66689.cc
new file mode 100644
index 00000000000..1ee5f4f07f4
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/pr66689.cc
@@ -0,0 +1,22 @@
+
+#include <tr1/cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ const double pi = 3.141592654;
+
+ double Pi1 = std::tr1::ellint_3(0.75, 0.0, pi / 2.0);
+ VERIFY(std::abs(Pi1 - 1.91099) < 0.00001);
+
+ double Pi2 = std::tr1::ellint_3(0.75, 0.5, pi / 2.0);
+ VERIFY(std::abs(Pi2 - 2.80011) < 0.00001);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/15_expint/pr68397.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/15_expint/pr68397.cc
new file mode 100644
index 00000000000..60d0b68bad6
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/15_expint/pr68397.cc
@@ -0,0 +1,46 @@
+// Copyright (C) 2017 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// PR libstdc++/68397 - std::tr1::expint fails in __expint_En_cont_frac
+// for some long double arguments due to low __max_iter value
+
+#include <tr1/cmath>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ // Answers from Wolfram Alpha.
+ long double ans_ok = -0.10001943365331651406888645149537315243646135979573L;
+ long double ans_bomb = -0.10777727809650077516264612749163100483995270163783L;
+
+ long double Ei_ok = std::tr1::expint(-1.500001L);
+ long double diff_ok = std::abs(Ei_ok - ans_ok);
+ VERIFY(diff_ok < 1.0e-15L);
+
+ long double Ei_bomb = std::tr1::expint(-1.450001L);
+ long double diff_bomb = std::abs(Ei_bomb - ans_bomb);
+ VERIFY(diff_bomb < 1.0e-15L);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
+
diff --git a/libvtv/ChangeLog b/libvtv/ChangeLog
index 4f4d7e00de4..1f5a9f6deb8 100644
--- a/libvtv/ChangeLog
+++ b/libvtv/ChangeLog
@@ -1,3 +1,11 @@
+2018-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2018-04-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/85384
+ * configure: Regenerate.
+
2018-01-25 Release Manager
* GCC 7.3.0 released.
diff --git a/libvtv/configure b/libvtv/configure
index c3bed2dfc70..dfb9162c79f 100755
--- a/libvtv/configure
+++ b/libvtv/configure
@@ -15516,7 +15516,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi