Macaulay2 Engine
Loading...
Searching...
No Matches

◆ from_rational()

template<class RingType>
virtual bool M2::ConcreteRing< RingType >::from_rational ( mpq_srcptr q,
ring_elem & result ) const
inlinevirtual

Implements Ring.

Definition at line 169 of file aring-glue.hpp.

170 {
171 Element a(*R);
172 bool ret = R->set_from_mpq(a, q);
173 if (ret) R->to_ring_elem(result, a);
174 return ret;
175 }
std::unique_ptr< RingType > R
RingType::Element Element

Referenced by getElement< RingQQ >().