Page MenuHomeFeedback Tracker

Modulo operator works only with natural numbers
Closed, ResolvedPublic

Description

-x mod y always returns -x.

Details

Legacy ID
3063345695
Severity
Major
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

hint format["Result: %1", (-1) % 5];

Result: -1

Additional Information

(-1) modulo 5 should return 4

Event Timeline

Flux edited Steps To Reproduce. (Show Details)Apr 4 2013, 10:18 PM
Flux edited Additional Information. (Show Details)
Flux set Category to Scripting.
Flux set Reproducibility to Always.
Flux set Severity to Major.
Flux set Resolution to Open.
Flux set Legacy ID to 3063345695.May 7 2016, 1:26 PM
Flux added a subscriber: Flux.
MadDogX added a subscriber: MadDogX.May 7 2016, 1:26 PM

Mass closing ancient tickets with no activity for > 12 months; assume fixed or too trivial.

If this issue is still relevant in current dev build, please re-post.