23 Expression * LeastCommonMultiple::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> * LeastCommonMultiple::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;
70 if (f1 == 0.0f || f2 == 0.0f) {
82 r = a - ((int)(a/b))*b;
static Integer LCM(const Integer *i, const Integer *j)
Expression * replaceWith(Expression *newOperand, bool deleteAfterReplace=true)
Expression * approximate(Context &context, AngleUnit angleUnit=AngleUnit::Default) const
Expression * editableOperand(int i)
Expression * clone() const override
const Expression * m_operands[T]
friend class LeastCommonMultiple
static Complex< T > Float(T x)
const Expression * operand(int i) const
Type type() const override