Пример #1
0
 void ARingZZ::eval(const RingMap *map, const ElementType& f, int first_var, ring_elem &result) const
 {
   mpz_t temp;
   flint_mpz_init_set_readonly(temp, &f);
   result = map->get_ring()->from_int(temp);
   flint_mpz_clear_readonly(temp);
 }
Пример #2
0
void flint_mpq_init_set_readonly(mpq_t z, const fmpq_t f)
{
    flint_mpz_init_set_readonly(mpq_numref(z), fmpq_numref(f));
    flint_mpz_init_set_readonly(mpq_denref(z), fmpq_denref(f));
}