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

◆ subtract()

template<class RingType>
virtual ring_elem M2::ConcreteRing< RingType >::subtract ( const ring_elem f,
const ring_elem g ) const
inlinevirtual

Implements Ring.

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

345 {
346 if (displayArithmeticCalls) fprintf(stderr, "calling subtract\n");
347 const ElementType &a = R->from_ring_elem_const(f);
348 const ElementType &b = R->from_ring_elem_const(g);
349 Element c(*R);
351 R->subtract(c, a, b);
352 R->to_ring_elem(result, c);
353 return result;
354 }
RingType::ElementType ElementType
std::unique_ptr< RingType > R
RingType::Element Element

Referenced by almostEqual(), and almostEqual().