# include <realroot/realroot-config.hpp>
# ifdef REALROOT_WITH_NUMERIX
#include <iostream>
#include <iomanip>
#include <numerix/kernel.hpp>
#include <numerix/interval.hpp>
#include <realroot/ring_tens.hpp>
typedef Numerix::integer
ZZ;
typedef Numerix::floating
RR;
typedef interval<double> INT_double;
typedef interval<Numerix::floating> INT_mpfr;
upolz_t wilk(int n) {
upolz_t w("x-1");
for (int j = 2; j <= n; j++) {
c[0] = -j;
}
return w;
}
template<class INT, class POL>
void polytest(
POL& p, INT
approx,
typename INT::boundary_type delta =
typename INT::boundary_type(0))
{
std::cout << sol << std::endl;
std::cout <<
"sol status = " <<
in.status << std::endl;
}
int main(
int argc,
char** argv)
{
std::cout.precision(16);
std::cerr.precision(16);
std::cout <<"p: "<<p<< std::endl;
std::cout << "IntervalNewton: interval = double, poly = double" << std::endl;
polytest<INT_double, polynomial< ring<double, Monomials> > >(p, INT_double(-1,0));
std::cout << "*********************" << std::endl;
std::cout << "IntervalNewton: interval = double, poly = integer" << std::endl;
upolz_t f = wilk(10);
std::cout << "f: " << f << std::endl;
polytest<INT_double, upolz_t>(f, INT_double(8.5,9.7));
std::cout << "IntervalNewton: interval = mpfr, poly = integer" << std::endl;
polytest<INT_mpfr, upolz_t>(f, INT_mpfr(8.5,9.7));
return 0;
}
# else
int main(
int argc,
char** argv) {
return 0; }
# endif //REALROOT_WITH_NUMERIX