Exemple #1
0
int
main (int argc, char *argv[])
{
  tests_start_mpfr ();

  special ();

  test_specialz (mpfr_add_z, mpz_add, "add");
  test_specialz (mpfr_sub_z, mpz_sub, "sub");
  test_specialz (mpfr_mul_z, mpz_mul, "mul");
  test_genericz (2, 100, 100, mpfr_add_z, "add");
  test_genericz (2, 100, 100, mpfr_sub_z, "sub");
  test_genericz (2, 100, 100, mpfr_mul_z, "mul");
  test_genericz (2, 100, 100, mpfr_div_z, "div");
  test_special2z (mpfr_z_sub, mpz_sub, "sub");
  test_generic2z (2, 100, 100, mpfr_z_sub, "sub");

  test_genericq (2, 100, 100, mpfr_add_q, "add");
  test_genericq (2, 100, 100, mpfr_sub_q, "sub");
  test_genericq (2, 100, 100, mpfr_mul_q, "mul");
  test_genericq (2, 100, 100, mpfr_div_q, "div");
  test_specialq (2, 100, 100, mpfr_mul_q, mpq_mul, "mul");
  test_specialq (2, 100, 100, mpfr_div_q, mpq_div, "div");
  test_specialq (2, 100, 100, mpfr_add_q, mpq_add, "add");
  test_specialq (2, 100, 100, mpfr_sub_q, mpq_sub, "sub");

  test_cmp_z (2, 100, 100);
  test_cmp_q (2, 100, 100);
  test_cmp_f (2, 100, 100);

  check_for_zero ();

  bug_mul_q_20100810 ();
  bug_div_q_20100810 ();
  bug_mul_div_q_20100818 ();
  reduced_expo_range ();
  addsubq_overflow ();

  coverage_mpfr_mul_q_20110218 ();

  tests_end_mpfr ();
  return 0;
}
Exemple #2
0
int
main (int argc, char *argv[])
{
  tests_start_mpfr ();

  special_erf ();
  special_erfc ();
  large_arg ();
  test_erfc ();
  reduced_expo_range ();

  test_generic_erf (2, 100, 15);
  test_generic_erfc (2, 100, 15);

  data_check ("data/erf",  mpfr_erf,  "mpfr_erf");
  data_check ("data/erfc", mpfr_erfc, "mpfr_erfc");

  tests_end_mpfr ();
  return 0;
}
Exemple #3
0
int
main (void)
{
  tests_start_mpfr ();

  special ();
  special_overflow ();
  reduced_expo_range ();

  test_generic (2, 100, 15);

  tests_end_mpfr ();

  data_check ("data/asin", mpfr_asin, "mpfr_asin");
  bad_cases (mpfr_asin, mpfr_sin, "mpfr_asin", 256, -40, 1, 4, 128, 800, 30);

  test20071215 ();

  tests_end_mpfr ();
  return 0;
}
Exemple #4
0
int
main (int argc, char *argv[])
{
    tests_start_mpfr ();

    special_overflow ();
    special ();
    special_atan2 ();
    smallvals_atan2 ();
    atan2_bug_20071003 ();
    atan2_different_prec ();
    reduced_expo_range ();

    test_generic_atan  (2, 200, 17);
    test_generic_atan2 (2, 200, 17);
    test_generic_atan2_neg (2, 200, 17);

    data_check ("data/atan", mpfr_atan, "mpfr_atan");
    bad_cases (mpfr_atan, mpfr_tan, "mpfr_atan", 256, -40, 1, 4, 128, 800, 40);
    atan2_pow_of_2 ();

    tests_end_mpfr ();
    return 0;
}