simplify(expr, rules, {}, { exactFraction: true })
not working for (only) custom rules.
#2611
-
Hi Jos! Currently something like:
returns
or
returns That is, it seems as though the Is it possible to get exact fractions when only applying custom simplification rules? Thanks in advance! Hope all's well on your end! Jacob |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The As a workaround, you can find the const simplifyConstant = math.simplify.rules.find(rule => typeof rule === 'function') However this is not guaranteed to work in the future. So I think we have to do the following
Yeah all going fine here, thanks for asking :) |
Beta Was this translation helpful? Give feedback.
The
exactFractions
option is an option of one of the built-in rules (a function rulesimplifyConstant
). If you clear all rules, the rule handlingexactFractions
is not executed. This rule currently not exposed and only used internally insimplify
.As a workaround, you can find the
simplifyConstant
fromsimplify.rules
since it is (currently) the only function rule:However this is not guaranteed to work in the future.
So I think we have to do the following
exactFractions
to explain that when you clear out all rules, that this option is not executed