Ejemplo n.º 1
0
void nct_tests_1()
{
#ifdef TEST_MPFR
   time_proc("mpfr_float_50", test_nct<mpfr_float_50>);
   time_proc("mpfr_float_50 (no expression templates", test_nct<number<mpfr_float_backend<50>, et_off> >);
   time_proc("static_mpfr_float_50", test_nct<static_mpfr_float_50>);
#endif
}
void bessel_tests_6()
{
#ifdef TEST_CPP_DEC_FLOAT
   time_proc("cpp_dec_float_100", test_bessel<cpp_dec_float_100>);
#endif
#ifdef TEST_MPFR_CLASS
   time_proc("mpfr_class", test_bessel<mpfr_class>);
#endif
#ifdef TEST_MPREAL
   time_proc("mpfr::mpreal", test_bessel<mpfr::mpreal>);
#endif
}
void bessel_tests_2()
{
#ifdef TEST_MPF
   time_proc("mpf_float_50", test_bessel<mpf_float_50>, 3);
   time_proc("mpf_float_50 (no expression templates", test_bessel<number<gmp_float<50>, et_off> >, 3);
#endif
#ifdef TEST_CPP_DEC_FLOAT
   time_proc("cpp_dec_float_50", test_bessel<cpp_dec_float_50>, 3);
#endif
#ifdef TEST_CPP_BIN_FLOAT
   time_proc("cpp_bin_float_50", test_bessel<cpp_bin_float_50>, 3);
#endif
}
Ejemplo n.º 4
0
void nct_tests_6()
{
#ifdef TEST_MPREAL
   mpfr::mpreal::set_default_prec(100 * 1000L / 301L);
#endif
#ifdef TEST_CPP_DEC_FLOAT
   time_proc("cpp_dec_float_100", test_nct<cpp_dec_float_100>);
#endif
#ifdef TEST_CPP_BIN_FLOAT
   time_proc("cpp_bin_float_100", test_nct<cpp_bin_float_100>);
#endif
#ifdef TEST_MPFR_CLASS
   time_proc("mpfr_class", test_nct<mpfr_class>);
#endif
#ifdef TEST_MPREAL
   time_proc("mpfr::mpreal", test_nct<mpfr::mpreal>);
#endif
}
Ejemplo n.º 5
0
void poly_tests()
{
   //
   // 50 digits first:
   //
   std::cout << "Testing Polynomial Evaluation at 50 digits....." << std::endl;
#if defined(TEST_MPFR) || defined(TEST_MPFR_CLASS)
   mpfr_set_default_prec(50 * 1000L / 301L);
#endif
#ifdef TEST_MPREAL
   mpfr::mpreal::set_default_prec(50 * 1000L / 301L);
#endif
#ifdef TEST_MPFR
   time_proc("mpfr_float_50", test_polynomial<mpfr_float_50>);
   time_proc("mpfr_float_50 (no expression templates", test_polynomial<number<mpfr_float_backend<50>, et_off> >);
   time_proc("static_mpfr_float_50", test_polynomial<static_mpfr_float_50>);
#endif
#ifdef TEST_MPF
   time_proc("mpf_float_50", test_polynomial<mpf_float_50>);
   time_proc("mpf_float_50 (no expression templates", test_polynomial<number<gmp_float<50>, et_off> >);
#endif
#ifdef TEST_CPP_DEC_FLOAT
   time_proc("cpp_dec_float_50", test_polynomial<cpp_dec_float_50>);
#endif
#ifdef TEST_CPP_BIN_FLOAT
   time_proc("cpp_bin_float_50", test_polynomial<cpp_bin_float_50>);
#endif
#ifdef TEST_MPFR_CLASS
   time_proc("mpfr_class", test_polynomial<mpfr_class>);
#endif
#ifdef TEST_MPREAL
   time_proc("mpfr::mpreal", test_polynomial<mpfr::mpreal>);
#endif
   //
   // Then 100 digits:
   //
   std::cout << "Testing Polynomial Evaluation at 100 digits....." << std::endl;
#ifdef TEST_MPFR_CLASS
   mpfr_set_default_prec(100 * 1000L / 301L);
#endif
#ifdef TEST_MPREAL
   mpfr::mpreal::set_default_prec(100 * 1000L / 301L);
#endif
#ifdef TEST_MPFR
   time_proc("mpfr_float_100", test_polynomial<mpfr_float_100>);
   time_proc("mpfr_float_100 (no expression templates", test_polynomial<number<mpfr_float_backend<100>, et_off> >);
   time_proc("static_mpfr_float_100", test_polynomial<static_mpfr_float_100>);
#endif
#ifdef TEST_MPF
   time_proc("mpf_float_100", test_polynomial<mpf_float_100>);
   time_proc("mpf_float_100 (no expression templates", test_polynomial<number<gmp_float<100>, et_off> >);
#endif
#ifdef TEST_CPP_DEC_FLOAT
   time_proc("cpp_dec_float_100", test_polynomial<cpp_dec_float_100>);
#endif
#ifdef TEST_CPP_BIN_FLOAT
   time_proc("cpp_bin_float_100", test_polynomial<cpp_bin_float_100>);
#endif
#ifdef TEST_MPFR_CLASS
   time_proc("mpfr_class", test_polynomial<mpfr_class>);
#endif
#ifdef TEST_MPREAL
   time_proc("mpfr::mpreal", test_polynomial<mpfr::mpreal>);
#endif
}