2016-04-26 17:20:05 +02:00
|
|
|
/*
|
2015-04-09 14:01:28 +02:00
|
|
|
Copyright (C) 2015 Fredrik Johansson
|
|
|
|
|
2016-04-26 17:20:05 +02:00
|
|
|
This file is part of Arb.
|
|
|
|
|
|
|
|
Arb is free software: you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU Lesser General Public License (LGPL) as published
|
|
|
|
by the Free Software Foundation; either version 2.1 of the License, or
|
|
|
|
(at your option) any later version. See <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2015-04-09 14:01:28 +02:00
|
|
|
|
|
|
|
#include "acb_hypgeom.h"
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2015-11-05 17:46:43 +00:00
|
|
|
slong iter;
|
2015-04-09 14:01:28 +02:00
|
|
|
flint_rand_t state;
|
|
|
|
|
2015-11-06 16:17:27 +00:00
|
|
|
flint_printf("si....");
|
2015-04-09 14:01:28 +02:00
|
|
|
fflush(stdout);
|
|
|
|
|
|
|
|
flint_randinit(state);
|
|
|
|
|
2016-04-10 17:24:58 +02:00
|
|
|
for (iter = 0; iter < 10000 * arb_test_multiplier(); iter++)
|
2015-04-09 14:01:28 +02:00
|
|
|
{
|
|
|
|
acb_t z0, z1, w0, w1;
|
2015-11-05 17:46:43 +00:00
|
|
|
slong prec0, prec1;
|
2015-04-09 14:01:28 +02:00
|
|
|
|
|
|
|
acb_init(z0);
|
|
|
|
acb_init(z1);
|
|
|
|
acb_init(w0);
|
|
|
|
acb_init(w1);
|
|
|
|
|
|
|
|
prec0 = 2 + n_randint(state, 1000);
|
|
|
|
prec1 = 2 + n_randint(state, 1000);
|
|
|
|
|
|
|
|
acb_randtest(z0, state, 1 + n_randint(state, 1000), 1 + n_randint(state, 100));
|
|
|
|
acb_randtest(w0, state, 1 + n_randint(state, 1000), 1 + n_randint(state, 100));
|
|
|
|
acb_randtest(w1, state, 1 + n_randint(state, 1000), 1 + n_randint(state, 100));
|
|
|
|
|
|
|
|
acb_set(z1, z0);
|
|
|
|
if (n_randint(state, 2))
|
|
|
|
{
|
|
|
|
acb_add(z1, z1, w0, prec0);
|
|
|
|
acb_sub(z1, z1, w0, prec0);
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (n_randint(state, 3))
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
acb_hypgeom_si_1f2(w0, z0, prec0);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
acb_hypgeom_si_asymp(w0, z0, prec0);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
acb_hypgeom_si(w0, z0, prec0);
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (n_randint(state, 3))
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
acb_hypgeom_si_1f2(w1, z1, prec1);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
acb_hypgeom_si_asymp(w1, z1, prec1);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
acb_hypgeom_si(w1, z1, prec1);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!acb_overlaps(w0, w1))
|
|
|
|
{
|
2015-11-06 16:17:27 +00:00
|
|
|
flint_printf("FAIL: consistency\n\n");
|
|
|
|
flint_printf("z0 = "); acb_printd(z0, 30); flint_printf("\n\n");
|
|
|
|
flint_printf("z1 = "); acb_printd(z1, 30); flint_printf("\n\n");
|
|
|
|
flint_printf("w0 = "); acb_printd(w0, 30); flint_printf("\n\n");
|
|
|
|
flint_printf("w1 = "); acb_printd(w1, 30); flint_printf("\n\n");
|
2017-02-28 16:50:03 +01:00
|
|
|
flint_abort();
|
2015-04-09 14:01:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
acb_clear(z0);
|
|
|
|
acb_clear(z1);
|
|
|
|
acb_clear(w0);
|
|
|
|
acb_clear(w1);
|
|
|
|
}
|
|
|
|
|
|
|
|
flint_randclear(state);
|
|
|
|
flint_cleanup();
|
2015-11-06 16:17:27 +00:00
|
|
|
flint_printf("PASS\n");
|
2015-04-09 14:01:28 +02:00
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|
|
|
|
|