AngouriMath

Navigation

← Back to list of members

CollapseMultipleFractions

 Property

Summary

Brings a quotient of quotients down to a single one.

Remarks

Run by the matcher rather than by the switch —
CollapseMultipleFractions. This and
DivisionPreparing are the two sets whose data form is proven to agree
with the switch it mirrors over generated expressions
(MatchedRulesAgreeWithTheSwitchTest), which is the precondition for running one
instead of the other.
What it costs. Measured against Simplify itself, both arms in
one process with a third arm that is the switch again as a control: the data form
is −0.6% where the control differs from its own source by −1.1%, so the change is
smaller than this machine's disagreement with itself, and allocation is +0.04%. That
number used to be +5% for DivisionPreparing alone, and what closed it was
settling a pattern's determinism once rather than on every attempt
(#1050).
The switch is still what describes them.RewriteRule carries
a PatternSource and a SourceLine,
which RuleRegistryGenerator reads off the arms of a switch; it has no way
yet to read a rule written as data. So the addressable rules of these two sets still come
from Patterns, and the arms they describe are the ones the agreement test holds
the matcher to rather than dead code. Teaching the generator to read
MatchedRules is what would let the switch go, and is
#825.

























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