Skip to content

Implement remainder operator #317

@tertsdiepraam

Description

@tertsdiepraam

We have +, -, * and /, but no % for modulo/remainder. We should probably add that!

  • We do have to decide what to do with negative values. E.g. is -5 % 3 equal to -2 or 1. Rust does -2 and Python says 1. The operation returning 1 is instead called rem_euclid in Rust.
  • The % must have the same precedence as the * and / operators.

I think this could be implemented as a good first issue, because it's mostly looking at what happens with the other operators, but it's not trivial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions