// 2007-02-04 Edward Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2007-2015 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
// .
// hyperg
// Compare against values generated by the GNU Scientific Library.
// The GSL can be found on the web: http://www.gnu.org/software/gsl/
#include
#if defined(__TEST_DEBUG)
#include
#define VERIFY(A) \
if (!(A)) \
{ \
std::cout << "line " << __LINE__ \
<< " max_abs_frac = " << max_abs_frac \
<< std::endl; \
}
#else
#include
#endif
#include "../testcase.h"
// Test data for a=0.0000000000000000, b=0.0000000000000000, c=2.0000000000000000.
testcase_hyperg data001[] = {
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=0.0000000000000000, c=2.0000000000000000.
template
void test001()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data001)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data001[i].a), Tp(data001[i].b),
Tp(data001[i].c), Tp(data001[i].x));
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));
}
// Test data for a=0.0000000000000000, b=0.0000000000000000, c=4.0000000000000000.
testcase_hyperg data002[] = {
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=0.0000000000000000, c=4.0000000000000000.
template
void test002()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data002)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data002[i].a), Tp(data002[i].b),
Tp(data002[i].c), Tp(data002[i].x));
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 a=0.0000000000000000, b=0.0000000000000000, c=6.0000000000000000.
testcase_hyperg data003[] = {
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=0.0000000000000000, c=6.0000000000000000.
template
void test003()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data003)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data003[i].a), Tp(data003[i].b),
Tp(data003[i].c), Tp(data003[i].x));
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 a=0.0000000000000000, b=0.0000000000000000, c=8.0000000000000000.
testcase_hyperg data004[] = {
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=0.0000000000000000, c=8.0000000000000000.
template
void test004()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data004)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data004[i].a), Tp(data004[i].b),
Tp(data004[i].c), Tp(data004[i].x));
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));
}
// Test data for a=0.0000000000000000, b=0.0000000000000000, c=10.000000000000000.
testcase_hyperg data005[] = {
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.0000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=0.0000000000000000, c=10.000000000000000.
template
void test005()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data005)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data005[i].a), Tp(data005[i].b),
Tp(data005[i].c), Tp(data005[i].x));
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 a=0.0000000000000000, b=0.50000000000000000, c=2.0000000000000000.
testcase_hyperg data006[] = {
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=0.50000000000000000, c=2.0000000000000000.
template
void test006()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data006)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data006[i].a), Tp(data006[i].b),
Tp(data006[i].c), Tp(data006[i].x));
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 a=0.0000000000000000, b=0.50000000000000000, c=4.0000000000000000.
testcase_hyperg data007[] = {
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=0.50000000000000000, c=4.0000000000000000.
template
void test007()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data007)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data007[i].a), Tp(data007[i].b),
Tp(data007[i].c), Tp(data007[i].x));
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 a=0.0000000000000000, b=0.50000000000000000, c=6.0000000000000000.
testcase_hyperg data008[] = {
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=0.50000000000000000, c=6.0000000000000000.
template
void test008()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data008)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data008[i].a), Tp(data008[i].b),
Tp(data008[i].c), Tp(data008[i].x));
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 a=0.0000000000000000, b=0.50000000000000000, c=8.0000000000000000.
testcase_hyperg data009[] = {
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=0.50000000000000000, c=8.0000000000000000.
template
void test009()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data009)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data009[i].a), Tp(data009[i].b),
Tp(data009[i].c), Tp(data009[i].x));
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));
}
// Test data for a=0.0000000000000000, b=0.50000000000000000, c=10.000000000000000.
testcase_hyperg data010[] = {
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 0.50000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=0.50000000000000000, c=10.000000000000000.
template
void test010()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data010)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data010[i].a), Tp(data010[i].b),
Tp(data010[i].c), Tp(data010[i].x));
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));
}
// Test data for a=0.0000000000000000, b=1.0000000000000000, c=2.0000000000000000.
testcase_hyperg data011[] = {
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=1.0000000000000000, c=2.0000000000000000.
template
void test011()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data011)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data011[i].a), Tp(data011[i].b),
Tp(data011[i].c), Tp(data011[i].x));
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 a=0.0000000000000000, b=1.0000000000000000, c=4.0000000000000000.
testcase_hyperg data012[] = {
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=1.0000000000000000, c=4.0000000000000000.
template
void test012()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data012)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data012[i].a), Tp(data012[i].b),
Tp(data012[i].c), Tp(data012[i].x));
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 a=0.0000000000000000, b=1.0000000000000000, c=6.0000000000000000.
testcase_hyperg data013[] = {
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=1.0000000000000000, c=6.0000000000000000.
template
void test013()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data013)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data013[i].a), Tp(data013[i].b),
Tp(data013[i].c), Tp(data013[i].x));
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 a=0.0000000000000000, b=1.0000000000000000, c=8.0000000000000000.
testcase_hyperg data014[] = {
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=1.0000000000000000, c=8.0000000000000000.
template
void test014()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data014)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data014[i].a), Tp(data014[i].b),
Tp(data014[i].c), Tp(data014[i].x));
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 a=0.0000000000000000, b=1.0000000000000000, c=10.000000000000000.
testcase_hyperg data015[] = {
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 1.0000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=1.0000000000000000, c=10.000000000000000.
template
void test015()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data015)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data015[i].a), Tp(data015[i].b),
Tp(data015[i].c), Tp(data015[i].x));
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));
}
// Test data for a=0.0000000000000000, b=2.0000000000000000, c=2.0000000000000000.
testcase_hyperg data016[] = {
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=2.0000000000000000, c=2.0000000000000000.
template
void test016()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data016)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data016[i].a), Tp(data016[i].b),
Tp(data016[i].c), Tp(data016[i].x));
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 a=0.0000000000000000, b=2.0000000000000000, c=4.0000000000000000.
testcase_hyperg data017[] = {
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=2.0000000000000000, c=4.0000000000000000.
template
void test017()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data017)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data017[i].a), Tp(data017[i].b),
Tp(data017[i].c), Tp(data017[i].x));
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 a=0.0000000000000000, b=2.0000000000000000, c=6.0000000000000000.
testcase_hyperg data018[] = {
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=2.0000000000000000, c=6.0000000000000000.
template
void test018()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data018)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data018[i].a), Tp(data018[i].b),
Tp(data018[i].c), Tp(data018[i].x));
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 a=0.0000000000000000, b=2.0000000000000000, c=8.0000000000000000.
testcase_hyperg data019[] = {
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=2.0000000000000000, c=8.0000000000000000.
template
void test019()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data019)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data019[i].a), Tp(data019[i].b),
Tp(data019[i].c), Tp(data019[i].x));
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));
}
// Test data for a=0.0000000000000000, b=2.0000000000000000, c=10.000000000000000.
testcase_hyperg data020[] = {
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 2.0000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=2.0000000000000000, c=10.000000000000000.
template
void test020()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data020)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data020[i].a), Tp(data020[i].b),
Tp(data020[i].c), Tp(data020[i].x));
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));
}
// Test data for a=0.0000000000000000, b=5.0000000000000000, c=2.0000000000000000.
testcase_hyperg data021[] = {
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=5.0000000000000000, c=2.0000000000000000.
template
void test021()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data021)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data021[i].a), Tp(data021[i].b),
Tp(data021[i].c), Tp(data021[i].x));
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));
}
// Test data for a=0.0000000000000000, b=5.0000000000000000, c=4.0000000000000000.
testcase_hyperg data022[] = {
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=5.0000000000000000, c=4.0000000000000000.
template
void test022()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data022)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data022[i].a), Tp(data022[i].b),
Tp(data022[i].c), Tp(data022[i].x));
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));
}
// Test data for a=0.0000000000000000, b=5.0000000000000000, c=6.0000000000000000.
testcase_hyperg data023[] = {
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=5.0000000000000000, c=6.0000000000000000.
template
void test023()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data023)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data023[i].a), Tp(data023[i].b),
Tp(data023[i].c), Tp(data023[i].x));
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 a=0.0000000000000000, b=5.0000000000000000, c=8.0000000000000000.
testcase_hyperg data024[] = {
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=5.0000000000000000, c=8.0000000000000000.
template
void test024()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data024)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data024[i].a), Tp(data024[i].b),
Tp(data024[i].c), Tp(data024[i].x));
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));
}
// Test data for a=0.0000000000000000, b=5.0000000000000000, c=10.000000000000000.
testcase_hyperg data025[] = {
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 5.0000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=5.0000000000000000, c=10.000000000000000.
template
void test025()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data025)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data025[i].a), Tp(data025[i].b),
Tp(data025[i].c), Tp(data025[i].x));
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));
}
// Test data for a=0.0000000000000000, b=10.000000000000000, c=2.0000000000000000.
testcase_hyperg data026[] = {
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=10.000000000000000, c=2.0000000000000000.
template
void test026()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data026)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data026[i].a), Tp(data026[i].b),
Tp(data026[i].c), Tp(data026[i].x));
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 a=0.0000000000000000, b=10.000000000000000, c=4.0000000000000000.
testcase_hyperg data027[] = {
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=10.000000000000000, c=4.0000000000000000.
template
void test027()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data027)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data027[i].a), Tp(data027[i].b),
Tp(data027[i].c), Tp(data027[i].x));
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 a=0.0000000000000000, b=10.000000000000000, c=6.0000000000000000.
testcase_hyperg data028[] = {
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=10.000000000000000, c=6.0000000000000000.
template
void test028()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data028)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data028[i].a), Tp(data028[i].b),
Tp(data028[i].c), Tp(data028[i].x));
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));
}
// Test data for a=0.0000000000000000, b=10.000000000000000, c=8.0000000000000000.
testcase_hyperg data029[] = {
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=10.000000000000000, c=8.0000000000000000.
template
void test029()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data029)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data029[i].a), Tp(data029[i].b),
Tp(data029[i].c), Tp(data029[i].x));
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));
}
// Test data for a=0.0000000000000000, b=10.000000000000000, c=10.000000000000000.
testcase_hyperg data030[] = {
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 10.000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=10.000000000000000, c=10.000000000000000.
template
void test030()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data030)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data030[i].a), Tp(data030[i].b),
Tp(data030[i].c), Tp(data030[i].x));
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));
}
// Test data for a=0.0000000000000000, b=20.000000000000000, c=2.0000000000000000.
testcase_hyperg data031[] = {
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=20.000000000000000, c=2.0000000000000000.
template
void test031()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data031)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data031[i].a), Tp(data031[i].b),
Tp(data031[i].c), Tp(data031[i].x));
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));
}
// Test data for a=0.0000000000000000, b=20.000000000000000, c=4.0000000000000000.
testcase_hyperg data032[] = {
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=20.000000000000000, c=4.0000000000000000.
template
void test032()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data032)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data032[i].a), Tp(data032[i].b),
Tp(data032[i].c), Tp(data032[i].x));
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));
}
// Test data for a=0.0000000000000000, b=20.000000000000000, c=6.0000000000000000.
testcase_hyperg data033[] = {
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=20.000000000000000, c=6.0000000000000000.
template
void test033()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data033)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data033[i].a), Tp(data033[i].b),
Tp(data033[i].c), Tp(data033[i].x));
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 a=0.0000000000000000, b=20.000000000000000, c=8.0000000000000000.
testcase_hyperg data034[] = {
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=20.000000000000000, c=8.0000000000000000.
template
void test034()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data034)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data034[i].a), Tp(data034[i].b),
Tp(data034[i].c), Tp(data034[i].x));
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));
}
// Test data for a=0.0000000000000000, b=20.000000000000000, c=10.000000000000000.
testcase_hyperg data035[] = {
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.0000000000000000, 20.000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.0000000000000000, b=20.000000000000000, c=10.000000000000000.
template
void test035()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data035)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data035[i].a), Tp(data035[i].b),
Tp(data035[i].c), Tp(data035[i].x));
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));
}
// Test data for a=0.50000000000000000, b=0.0000000000000000, c=2.0000000000000000.
testcase_hyperg data036[] = {
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=0.0000000000000000, c=2.0000000000000000.
template
void test036()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data036)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data036[i].a), Tp(data036[i].b),
Tp(data036[i].c), Tp(data036[i].x));
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 a=0.50000000000000000, b=0.0000000000000000, c=4.0000000000000000.
testcase_hyperg data037[] = {
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=0.0000000000000000, c=4.0000000000000000.
template
void test037()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data037)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data037[i].a), Tp(data037[i].b),
Tp(data037[i].c), Tp(data037[i].x));
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 a=0.50000000000000000, b=0.0000000000000000, c=6.0000000000000000.
testcase_hyperg data038[] = {
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=0.0000000000000000, c=6.0000000000000000.
template
void test038()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data038)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data038[i].a), Tp(data038[i].b),
Tp(data038[i].c), Tp(data038[i].x));
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));
}
// Test data for a=0.50000000000000000, b=0.0000000000000000, c=8.0000000000000000.
testcase_hyperg data039[] = {
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=0.0000000000000000, c=8.0000000000000000.
template
void test039()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data039)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data039[i].a), Tp(data039[i].b),
Tp(data039[i].c), Tp(data039[i].x));
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));
}
// Test data for a=0.50000000000000000, b=0.0000000000000000, c=10.000000000000000.
testcase_hyperg data040[] = {
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.0000000000000000, 0.50000000000000000, 0.0000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=0.0000000000000000, c=10.000000000000000.
template
void test040()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data040)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data040[i].a), Tp(data040[i].b),
Tp(data040[i].c), Tp(data040[i].x));
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));
}
// Test data for a=0.50000000000000000, b=0.50000000000000000, c=2.0000000000000000.
testcase_hyperg data041[] = {
{ 0.91383715388743758, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 0.92151232618202283, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 0.92955086110354823, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 0.93798900119104844, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 0.94686887307107304, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 0.95623987262143295, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 0.96616049387450154, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 0.97670078782187519, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 0.98794573712298384, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0129947682256604, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.0270980168168973, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.0425304520063581, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.0595915916161471, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.0787052023767585, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.1005053642285867, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.1260196351148746, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 1.1571341977338991, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 1.1982111053717450, 0.50000000000000000, 0.50000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=0.50000000000000000, c=2.0000000000000000.
template
void test041()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data041)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data041[i].a), Tp(data041[i].b),
Tp(data041[i].c), Tp(data041[i].x));
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));
}
// Test data for a=0.50000000000000000, b=0.50000000000000000, c=4.0000000000000000.
testcase_hyperg data042[] = {
{ 0.95255425675562733, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 0.95712841850078245, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 0.96184734120034532, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 0.96672141255196242, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 0.97176228710138646, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 0.97698311668286286, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 0.98239883902556069, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 0.98802654401961032, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 0.99388594556732701, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0063957328951061, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0131053706824598, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0201679332118803, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.0276315524377497, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.0355569942816882, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.0440233080381554, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.0531375808028993, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.0630536689840200, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.0740149570414563, 0.50000000000000000, 0.50000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=0.50000000000000000, c=4.0000000000000000.
template
void test042()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data042)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data042[i].a), Tp(data042[i].b),
Tp(data042[i].c), Tp(data042[i].x));
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));
}
// Test data for a=0.50000000000000000, b=0.50000000000000000, c=6.0000000000000000.
testcase_hyperg data043[] = {
{ 0.96694084713323891, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 0.97024454918852587, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 0.97362815600391461, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 0.97709622064205115, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 0.98065374770570624, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 0.98430626119885489, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 0.98805988669621037, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 0.99192145185739655, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 0.99589861079880937, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0042354366729904, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0086161755545404, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0131552481403503, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0178679218284707, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.0227723400312978, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.0278904483717863, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.0332494012993472, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.0388838453357794, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.0448400142331342, 0.50000000000000000, 0.50000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=0.50000000000000000, c=6.0000000000000000.
template
void test043()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data043)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data043[i].a), Tp(data043[i].b),
Tp(data043[i].c), Tp(data043[i].x));
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 a=0.50000000000000000, b=0.50000000000000000, c=8.0000000000000000.
testcase_hyperg data044[] = {
{ 0.97456073259047449, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 0.97715689327833344, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 0.97980416868943099, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 0.98250498942832509, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 0.98526199049760832, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 0.98807803762902813, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 0.99095625840920332, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 0.99390007937387959, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 0.99691327061866730, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0031648997547440, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0064131494767281, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0097505810668461, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0131838138968663, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0167204326938339, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0203692279382193, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.0241405318057402, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.0280467087844301, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.0321029179180026, 0.50000000000000000, 0.50000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=0.50000000000000000, c=8.0000000000000000.
template
void test044()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data044)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data044[i].a), Tp(data044[i].b),
Tp(data044[i].c), Tp(data044[i].x));
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));
}
// Test data for a=0.50000000000000000, b=0.50000000000000000, c=10.000000000000000.
testcase_hyperg data045[] = {
{ 0.97930223035212161, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 0.98144406855076416, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 0.98362155940297302, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 0.98583616201745805, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 0.98808944235385077, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 0.99038308530635433, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 0.99271890872975732, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 0.99509887982916734, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 0.99752513445413604, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0025260228440118, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0051060015613384, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0077430276253163, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0104405359789990, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0132023689128868, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0160328583559475, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0189369344885053, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0219202735809589, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.0249895076611382, 0.50000000000000000, 0.50000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=0.50000000000000000, c=10.000000000000000.
template
void test045()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data045)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data045[i].a), Tp(data045[i].b),
Tp(data045[i].c), Tp(data045[i].x));
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));
}
// Test data for a=0.50000000000000000, b=1.0000000000000000, c=2.0000000000000000.
testcase_hyperg data046[] = {
{ 0.84089972268671609, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 0.85410196624968437, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 0.86811566011579933, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 0.88303688022450544, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 0.89897948556635565, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 0.91607978309961580, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 0.93450283399425305, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 0.95445115010332193, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 0.97617696340303095, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0263340389897240, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.0557280900008410, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.0889331564394962, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.1270166537925830, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.1715728752538095, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.2251482265544145, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.2922212642709541, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 1.3819660112501042, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 1.5194938532959119, 0.50000000000000000, 1.0000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=1.0000000000000000, c=2.0000000000000000.
template
void test046()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data046)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data046[i].a), Tp(data046[i].b),
Tp(data046[i].c), Tp(data046[i].x));
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 a=0.50000000000000000, b=1.0000000000000000, c=4.0000000000000000.
testcase_hyperg data047[] = {
{ 0.90992197313391499, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 0.91822592662244507, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 0.92687104566419531, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 0.93588628166548815, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 0.94530459215552909, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 0.95516374875247467, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 0.96550736800511827, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 0.97638624595136270, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 0.98786011482678993, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0128914530682316, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0266391040215350, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0413732738729464, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.0572599536532992, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.0745166004060953, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.0934387388831386, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.1144486980714641, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.1381966011250106, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.1658171625342397, 0.50000000000000000, 1.0000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=1.0000000000000000, c=4.0000000000000000.
template
void test047()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data047)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data047[i].a), Tp(data047[i].b),
Tp(data047[i].c), Tp(data047[i].x));
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 a=0.50000000000000000, b=1.0000000000000000, c=6.0000000000000000.
testcase_hyperg data048[] = {
{ 0.93641908369732885, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 0.94256349654111315, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 0.94890138508461319, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 0.95544578858430007, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 0.96221121193620718, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 0.96921386948293542, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 0.97647198488394704, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 0.98400616412578656, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 0.99183986544963032, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0085177124149158, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0174294150407122, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0267781897388850, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0366157405967285, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.0470052068648839, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.0580253905513313, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.0697774741209765, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.0823965556448414, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.0960739512057103, 0.50000000000000000, 1.0000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=1.0000000000000000, c=6.0000000000000000.
template
void test048()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data048)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data048[i].a), Tp(data048[i].b),
Tp(data048[i].c), Tp(data048[i].x));
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));
}
// Test data for a=0.50000000000000000, b=1.0000000000000000, c=8.0000000000000000.
testcase_hyperg data049[] = {
{ 0.95069883346936235, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 0.95559618047704165, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 0.96061938755931653, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 0.96577553912851344, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 0.97107239473807716, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 0.97651848528588503, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 0.98212322830227139, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 0.98789706736195781, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 0.99385164237825074, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0063568569383123, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0129389344715818, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0197653907773940, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0268583912277143, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0342438793937092, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0419526514766855, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.0500219124976327, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.0584976491907043, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.0674385240268101, 0.50000000000000000, 1.0000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=1.0000000000000000, c=8.0000000000000000.
template
void test049()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data049)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data049[i].a), Tp(data049[i].b),
Tp(data049[i].c), Tp(data049[i].x));
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));
}
// Test data for a=0.50000000000000000, b=1.0000000000000000, c=10.000000000000000.
testcase_hyperg data050[] = {
{ 0.95968319138913893, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 0.96376169072755768, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 0.96792900082729316, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 0.97218942798115737, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 0.97654763592586857, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 0.98100869054353856, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 0.98557811238699278, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 0.99026193885795544, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 0.99506679842072221, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0050696417919618, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0102847452747090, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0156554225057022, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0211930882963096, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0269107343740711, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0328232917216298, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0389481230247195, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0453057164134614, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.0519207114461246, 0.50000000000000000, 1.0000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=1.0000000000000000, c=10.000000000000000.
template
void test050()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data050)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data050[i].a), Tp(data050[i].b),
Tp(data050[i].c), Tp(data050[i].x));
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 a=0.50000000000000000, b=2.0000000000000000, c=2.0000000000000000.
testcase_hyperg data051[] = {
{ 0.72547625011001171, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 0.74535599249992990, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 0.76696498884737041, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 0.79056941504209477, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 0.81649658092772603, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 0.84515425472851657, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 0.87705801930702920, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 0.91287092917527690, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 0.95346258924559224, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.0540925533894598, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.1180339887498949, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.1952286093343938, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 1.2909944487358056, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 1.4142135623730949, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 1.5811388300841900, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1.8257418583505536, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 2.2360679774997898, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 3.1622776601683782, 0.50000000000000000, 2.0000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=2.0000000000000000, c=2.0000000000000000.
template
void test051()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data051)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data051[i].a), Tp(data051[i].b),
Tp(data051[i].c), Tp(data051[i].x));
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 a=0.50000000000000000, b=2.0000000000000000, c=4.0000000000000000.
testcase_hyperg data052[] = {
{ 0.83664260086443798, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 0.85046584300227146, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 0.86509574979651593, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 0.88062082573041867, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 0.89714464248521586, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 0.91478946588967558, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 0.93370105322348573, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 0.95405511057700887, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 0.97606616007978142, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0261916902334731, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.0550723519434702, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.0872106588188091, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.1233801699379020, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.1646752981725688, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.2127272514219511, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 1.2701518651068637, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 1.3416407864998725, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 1.4374795179111102, 0.50000000000000000, 2.0000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=2.0000000000000000, c=4.0000000000000000.
template
void test052()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data052)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data052[i].a), Tp(data052[i].b),
Tp(data052[i].c), Tp(data052[i].x));
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 a=0.50000000000000000, b=2.0000000000000000, c=6.0000000000000000.
testcase_hyperg data053[] = {
{ 0.88195381730235833, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 0.89265078469555093, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 0.90382937908303707, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 0.91553161389880577, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 0.92780530349281576, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 0.94070521140346042, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 0.95429450630523349, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 0.96864663325785849, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 0.98384775588541795, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0172258496884334, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0356742479163459, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.0555293036908924, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.0770231491562379, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.1004557416484888, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.1262270515731978, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.1548932919125086, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.1872757758134724, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 1.2247091713458949, 0.50000000000000000, 2.0000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=2.0000000000000000, c=6.0000000000000000.
template
void test053()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data053)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data053[i].a), Tp(data053[i].b),
Tp(data053[i].c), Tp(data053[i].x));
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 a=0.50000000000000000, b=2.0000000000000000, c=8.0000000000000000.
testcase_hyperg data054[] = {
{ 0.90716919697107301, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 0.91592299407142519, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 0.92500027075874236, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 0.93442464185467167, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 0.94422248683737009, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 0.95442341810133347, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 0.96506085725516400, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 0.97617275213704069, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 0.98780247986309799, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0128233505813447, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0263406246541855, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.0406326381700366, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.0557966239802845, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.0719515075786321, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.0892457392422055, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.1078695188000958, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.1280752258974340, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.1502152002706476, 0.50000000000000000, 2.0000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=2.0000000000000000, c=8.0000000000000000.
template
void test054()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data054)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data054[i].a), Tp(data054[i].b),
Tp(data054[i].c), Tp(data054[i].x));
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 a=0.50000000000000000, b=2.0000000000000000, c=10.000000000000000.
testcase_hyperg data055[] = {
{ 0.92336416053263093, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 0.93078397248364519, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 0.93843714333600226, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 0.94633837784068076, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 0.95450388104967909, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 0.96295158125742764, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 0.97170139827854296, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 0.98077556918512687, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 0.99019904777750845, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0102104261941198, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0208669540935695, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0320118665407505, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.0436944599504387, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.0559728828278145, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.0689166967761712, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.0826105758119842, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.0971599106346146, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.1126998828023964, 0.50000000000000000, 2.0000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=2.0000000000000000, c=10.000000000000000.
template
void test055()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data055)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data055[i].a), Tp(data055[i].b),
Tp(data055[i].c), Tp(data055[i].x));
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 a=0.50000000000000000, b=5.0000000000000000, c=2.0000000000000000.
testcase_hyperg data056[] = {
{ 0.52275983209457511, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 0.54700336898142965, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 0.57468955512601971, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 0.60665490543315015, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 0.64403057859056123, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 0.68838183648623719, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 0.74193265039311085, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 0.80794095908995300, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 0.89135275749639320, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.1469266219310688, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 1.3552340708357489, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 1.6690840478838305, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 2.1815415453174483, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 3.1156892546032235, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 5.1109077417760416, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 10.560352936466296, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 33.541019662496815, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 300.66343065819501, 0.50000000000000000, 5.0000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=5.0000000000000000, c=2.0000000000000000.
template
void test056()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data056)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data056[i].a), Tp(data056[i].b),
Tp(data056[i].c), Tp(data056[i].x));
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 a=0.50000000000000000, b=5.0000000000000000, c=4.0000000000000000.
testcase_hyperg data057[] = {
{ 0.68252041951139264, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 0.70394732624993395, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 0.72748884971552041, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 0.75351147371199689, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 0.78247589005573748, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 0.81497017420249818, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 0.85175826875009564, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 0.89385278481745867, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 0.94262778709507411, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.0687327277420910, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.1529725508983291, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.2592587134058799, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 1.3985773194637892, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 1.5909902576697317, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 1.8776023607249752, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 2.3582499003694646, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 3.3541019662496838, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 6.7198400278577859, 0.50000000000000000, 5.0000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=5.0000000000000000, c=4.0000000000000000.
template
void test057()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data057)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data057[i].a), Tp(data057[i].b),
Tp(data057[i].c), Tp(data057[i].x));
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 a=0.50000000000000000, b=5.0000000000000000, c=6.0000000000000000.
testcase_hyperg data058[] = {
{ 0.75755211927082589, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 0.77603550233010998, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 0.79596241913438492, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 0.81753360792105201, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 0.84099165409805521, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 0.86663303852180873, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 0.89482475828629970, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 0.92602774279590350, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 0.96083064727087386, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0445570841313008, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.0959004638926031, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.1560106261370562, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.2278121770678145, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 1.3158640214709998, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 1.4278095344155000, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 1.5778700502946612, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 1.7972173289196469, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 2.1789970569269732, 0.50000000000000000, 5.0000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=5.0000000000000000, c=6.0000000000000000.
template
void test058()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data058)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data058[i].a), Tp(data058[i].b),
Tp(data058[i].c), Tp(data058[i].x));
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 a=0.50000000000000000, b=5.0000000000000000, c=8.0000000000000000.
testcase_hyperg data059[] = {
{ 0.80270093579329471, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, -0.90000000000000002 },
{ 0.81884974572462788, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, -0.80000000000000004 },
{ 0.83605266330015271, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, -0.69999999999999996 },
{ 0.85443340762795972, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, -0.59999999999999998 },
{ 0.87413762182790655, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, -0.50000000000000000 },
{ 0.89533826626907331, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, -0.40000000000000002 },
{ 0.91824276674115268, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, -0.30000000000000004 },
{ 0.94310265050720576, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, -0.19999999999999996 },
{ 0.97022678857609712, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, 0.0000000000000000 },
{ 1.0329098673199812, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, 0.10000000000000009 },
{ 1.0695865684573389, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, 0.19999999999999996 },
{ 1.1108642103944570, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, 0.30000000000000004 },
{ 1.1578795055970506, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, 0.39999999999999991 },
{ 1.2122394794169442, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, 0.50000000000000000 },
{ 1.2763274721556934, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, 0.60000000000000009 },
{ 1.3539179650251021, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, 0.69999999999999996 },
{ 1.4515986118197148, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, 0.80000000000000004 },
{ 1.5829284571614219, 0.50000000000000000, 5.0000000000000000,
8.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=5.0000000000000000, c=8.0000000000000000.
template
void test059()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data059)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data059[i].a), Tp(data059[i].b),
Tp(data059[i].c), Tp(data059[i].x));
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 a=0.50000000000000000, b=5.0000000000000000, c=10.000000000000000.
testcase_hyperg data060[] = {
{ 0.83322694172301959, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, -0.90000000000000002 },
{ 0.84753931604765664, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, -0.80000000000000004 },
{ 0.86265784532195022, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, -0.69999999999999996 },
{ 0.87866479300707079, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, -0.59999999999999998 },
{ 0.89565516540263501, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, -0.50000000000000000 },
{ 0.91373946207610557, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, -0.40000000000000002 },
{ 0.93304721345881891, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, -0.30000000000000004 },
{ 0.95373159512905148, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, -0.19999999999999996 },
{ 0.97597554238828121, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, 0.0000000000000000 },
{ 1.0260752851887982, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, 0.10000000000000009 },
{ 1.0545371197996178, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, 0.19999999999999996 },
{ 1.0858099017045830, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, 0.30000000000000004 },
{ 1.1204416568688709, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, 0.39999999999999991 },
{ 1.1591587835964847, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, 0.50000000000000000 },
{ 1.2029564720303347, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, 0.60000000000000009 },
{ 1.2532588722007874, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, 0.69999999999999996 },
{ 1.3122319926925459, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, 0.80000000000000004 },
{ 1.3834948587364100, 0.50000000000000000, 5.0000000000000000,
10.000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=5.0000000000000000, c=10.000000000000000.
template
void test060()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data060)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data060[i].a), Tp(data060[i].b),
Tp(data060[i].c), Tp(data060[i].x));
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 a=0.50000000000000000, b=10.000000000000000, c=2.0000000000000000.
testcase_hyperg data061[] = {
{ 0.37727530159464628, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, -0.90000000000000002 },
{ 0.39816010922169010, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, -0.80000000000000004 },
{ 0.42283703041362453, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, -0.69999999999999996 },
{ 0.45255640448730505, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, -0.59999999999999998 },
{ 0.48919507154431141, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, -0.50000000000000000 },
{ 0.53569358917731880, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, -0.40000000000000002 },
{ 0.59689778897029566, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, -0.30000000000000004 },
{ 0.68128587569875731, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, -0.19999999999999996 },
{ 0.80478739308790359, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, 0.0000000000000000 },
{ 1.3408664196153621, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, 0.10000000000000009 },
{ 2.0175364359923860, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, 0.19999999999999996 },
{ 3.6011214553736646, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, 0.30000000000000004 },
{ 8.1799429939495312, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, 0.39999999999999991 },
{ 25.644834637536000, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, 0.50000000000000000 },
{ 123.13738891597615, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, 0.60000000000000009 },
{ 1088.7122410321333, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, 0.69999999999999996 },
{ 27358.291704709951, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, 0.80000000000000004 },
{ 8174369.0266731177, 0.50000000000000000, 10.000000000000000,
2.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=10.000000000000000, c=2.0000000000000000.
template
void test061()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data061)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data061[i].a), Tp(data061[i].b),
Tp(data061[i].c), Tp(data061[i].x));
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 a=0.50000000000000000, b=10.000000000000000, c=4.0000000000000000.
testcase_hyperg data062[] = {
{ 0.53905528308450834, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, -0.90000000000000002 },
{ 0.56235533974376162, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, -0.80000000000000004 },
{ 0.58887657983263575, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, -0.69999999999999996 },
{ 0.61941227047262915, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, -0.59999999999999998 },
{ 0.65504896640793853, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, -0.50000000000000000 },
{ 0.69731666644529999, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, -0.40000000000000002 },
{ 0.74844073299399128, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, -0.30000000000000004 },
{ 0.81178446800105752, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, -0.19999999999999996 },
{ 0.89266981277598023, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, 0.0000000000000000 },
{ 1.1497248473106778, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, 0.10000000000000009 },
{ 1.3729717112654571, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, 0.19999999999999996 },
{ 1.7374982340374392, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, 0.30000000000000004 },
{ 2.4134479340960580, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, 0.39999999999999991 },
{ 3.9191255240471192, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, 0.50000000000000000 },
{ 8.3316373077761270, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, 0.60000000000000009 },
{ 28.323020339843335, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, 0.69999999999999996 },
{ 225.84286572747891, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, 0.80000000000000004 },
{ 12757.127591286655, 0.50000000000000000, 10.000000000000000,
4.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=10.000000000000000, c=4.0000000000000000.
template
void test062()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data062)
/ sizeof(testcase_hyperg);
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::hyperg(Tp(data062[i].a), Tp(data062[i].b),
Tp(data062[i].c), Tp(data062[i].x));
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 a=0.50000000000000000, b=10.000000000000000, c=6.0000000000000000.
testcase_hyperg data063[] = {
{ 0.62672622092226071, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, -0.90000000000000002 },
{ 0.64931010269769829, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, -0.80000000000000004 },
{ 0.67448067519076316, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, -0.69999999999999996 },
{ 0.70276306239803676, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, -0.59999999999999998 },
{ 0.73484179773087555, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, -0.50000000000000000 },
{ 0.77162761412743897, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, -0.40000000000000002 },
{ 0.81436116844816531, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, -0.30000000000000004 },
{ 0.86477994787944557, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, -0.19999999999999996 },
{ 0.92539820516603888, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, -0.099999999999999978 },
{ 1.0000000000000000, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, 0.0000000000000000 },
{ 1.0945599448210315, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, 0.10000000000000009 },
{ 1.2190897395597264, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, 0.19999999999999996 },
{ 1.3916844336856475, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, 0.30000000000000004 },
{ 1.6484497630432013, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, 0.39999999999999991 },
{ 2.0717772717131155, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, 0.50000000000000000 },
{ 2.8893613630810924, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, 0.60000000000000009 },
{ 4.9459404075413529, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, 0.69999999999999996 },
{ 13.487394149998716, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, 0.80000000000000004 },
{ 136.57616044013972, 0.50000000000000000, 10.000000000000000,
6.0000000000000000, 0.89999999999999991 },
};
// Test function for a=0.50000000000000000, b=10.000000000000000, c=6.0000000000000000.
template
void test063()
{
const Tp eps = std::numeric_limits::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
unsigned int num_datum = sizeof(data063)
/ sizeof(testcase_hyperg