AngouriMath

Navigation

NumericContent


← Back to list of classes

Description

Summary

The whole number every term of a sum divides by, taken out in front of it:
2x + 4a is 2 * (x + 2a).

Remarks

#195, and the reason
it says "forcefully… but not peacefully". The rules already take out a factor that appears
identically in every term — 2x + 2a is 2 * (a + x) under plain
Simplify(System.Int32) — and that is what "peacefully" means here. A factor that
is only a common divisor is different: 2 * (x + 2 * a) is one node larger than
4 * a + 2 * x, so SimplifiedRate will not choose it and Simplify should
not offer it.
So this runs in Factorize(System.Int32) and nowhere else. That is already the
forceful half of the pair — the call a user makes when they have decided they want the
factored form, whatever it rates — and putting it there needs no new mode and leaves
Simplify untouched.
Whole numbers only, and a positive one. Rational coefficients have a common divisor
too — x/2 + a/3 over 1/6 — but taking it out puts a quotient outside the sum
rather than a factor, which is a different rewrite and arguably the wrong direction. And the
sign is left inside: -2x - 4a becomes 2 * (-x - 2a) rather than
-2 * (x + 2a), because deciding which of those is wanted is a second question and
this answers the first one.

Members

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online