Skip to content

What is the mechanism for extracting the remainder of the division? #618

Description

@asmaalkdor

((b0 - b1) % x0 ) = 0

Activity

  1. WhiteBlackGoose commented on Oct 29, 2023

    @WhiteBlackGoose
    Member

    There isn't an operator in AngouriMath for that, sadly

  2. added a commit that references this issue on Aug 4, 2026
  3. Rafael-SOWNet commented on Aug 4, 2026

    @Rafael-SOWNet
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions