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

◆ liftToInt()

template<typename RingType>
bool M2::liftToInt ( const RingType & R,
const Ring * Rg,
const ring_elem f,
ring_elem & result )

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

929{
930 if (Rg == globalZZ)
931 {
932 typename RingType::Element a(R);
933 R.from_ring_elem(a, f);
934 result = Rg->from_long(R.coerceToLongInteger(a));
935 return true;
936 }
937 return false;
938}
virtual ring_elem from_long(long n) const =0
RingZZ * globalZZ
Definition relem.cpp:13
VALGRIND_MAKE_MEM_DEFINED & result(result)

References Ring::from_long(), globalZZ, and result().

Referenced by M2::ConcreteRing< M2::ARingCCC >::lift().