You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
What is the mechanism for extracting the remainder of the division? #618
There is one now — implemented in #703, merged as 70fcbead.
Your example works as written:
"(b0 - b1) mod x0 = 0"
parses, and MathS.Mod(a, b) builds the same node from code. It is spelled mod rather than % in a parsed string, since % is left free to mean percent.
One caveat worth stating plainly: solving an equation with a modulus in it is not implemented. x mod 3 = 1 has one solution per period and answering it properly needs an integer parameter, the way the trigonometric inversions do. Rather than return wrong roots the solver returns none, and there is a test pinning that so whoever implements it sees the change. If solving is what you were after rather than just expressing the remainder, say so and I will open that as its own issue.
((b0 - b1) % x0 ) = 0