Skip to content

Modulo operator has broken associativity #298

Open
@neeshy

Description

@neeshy
> 16 mod (16 mebi)
0
> 16 mod (6 mebi)
4

It seems that trying to force associativity drops the units within the parentheses. The expression is evaluated as simply x mod y. Without parentheses the expression:

> 16 mod 6 mebi
4194304

Evaluates as (16 mod 6) mebi

As a comparison:

> 16 + 16 mebi == 16 + (16 mebi)
true
> 16 mod 6 mebi == (16 mod 6) mebi
true

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions