Skip to content

modulo vs remainder #49

@ShawSumma

Description

@ShawSumma

x % y

passerine:

n % m m = 7 m = -7
n = 4 3 1
n =-4 1 3

c rust haskell lua js python:

n % m m = 7 m = -7
n = 4 3 -1
n =-4 1 -3

This behavior is not what I expected. I think the operator % should behave like it does in other languages.
An operator for what passerine has now is great, but it should be named something else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    designIdeas pertaining to language designquestionQuestion asking for help or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions