23 Expression * GreatCommonDivisor::shallowReduce(
Context& context, AngleUnit angleUnit) {
24 Expression * e = Expression::shallowReduce(context, angleUnit);
30 #if MATRIX_EXACT_REDUCING 37 if (!r0->denominator().isOne()) {
43 if (!r1->denominator().isOne()) {
53 Integer a = r0->numerator();
54 Integer b = r1->numerator();
60 Complex<T> * GreatCommonDivisor::templatedApproximate(Context& context, AngleUnit angleUnit)
const {
63 T f1 = f1Input->type() ==
Type::Complex ?
static_cast<Complex<T> *
>(f1Input)->toScalar() :
NAN;
64 T f2 = f2Input->type() ==
Type::Complex ?
static_cast<Complex<T> *
>(f2Input)->toScalar() :
NAN;
78 r = a - ((int)(a/b))*b;
Expression * replaceWith(Expression *newOperand, bool deleteAfterReplace=true)
friend class GreatCommonDivisor
Expression * approximate(Context &context, AngleUnit angleUnit=AngleUnit::Default) const
static Integer GCD(const Integer *i, const Integer *j)
Expression * editableOperand(int i)
const Expression * m_operands[T]
Expression * clone() const override
static Complex< T > Float(T x)
Type type() const override
const Expression * operand(int i) const