Esempio n. 1
0
void
check_one (const char *desc, mpf_ptr got, mpf_srcptr u, mpf_srcptr v)
{
  if (! refmpf_validate_division ("mpf_div", got, u, v))
    {
      mp_trace_base = -16;
      mpf_trace ("  u", u);
      mpf_trace ("  v", v);
      printf    ("  %s\n", desc);
      abort ();
    }
}
Esempio n. 2
0
void
check_one (mpf_ptr got, mpq_srcptr q)
{
  mpf_t  n, d;

  mpf_set_q (got, q);

  PTR(n) = PTR(&q->_mp_num);
  SIZ(n) = SIZ(&q->_mp_num);
  EXP(n) = ABSIZ(&q->_mp_num);

  PTR(d) = PTR(&q->_mp_den);
  SIZ(d) = SIZ(&q->_mp_den);
  EXP(d) = ABSIZ(&q->_mp_den);

  if (! refmpf_validate_division ("mpf_set_q", got, n, d))
    {
      mp_trace_base = -16;
      mpq_trace ("   q", q);
      abort ();
    }
}