AngouriMath

Navigation

← Back to list of members

NumericContentExtraction

 Property

Summary

Takes the whole number every term of a sum divides by out in front of it:
2x + 4a becomes 2 * (x + 2a).

Remarks

The "forcefully" of
#195.
A factor
appearing identically in every term already comes out peacefully — 2x + 2a is 2 * (a + x) under plain Simplify(System.Int32) — and a common
divisor does not, because the result is larger and
Entity.SimplifiedRate will not choose it.
Offered on its own as well as inside FactorizationAtLevel(System.Int32), because it is
the one step of factorisation whose answer a caller might want without the rest.

Remarks

Held in a nested class rather than in a static field of this one, and that is not a
style choice. Factorization is declared above this and calls
FactorizationAtLevel(System.Int32) in its own initialiser, which reads this — and a
static field initialiser runs in declaration order, so it would read null and fail as a TypeInitializationException from somewhere else entirely. A nested
type initialises on first use instead, whatever order the fields are written in.

























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