math.big, docs: document the behaviour of % for negative numbers; in V: -10 % 7 == -3 (#24604)

This commit is contained in:
Delyan Angelov 2025-05-30 05:49:19 +03:00 committed by GitHub
parent ebde7bc85e
commit 3ecffe68ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -8293,6 +8293,9 @@ Assignment Operators
&&= ||=
```
Note: in V, `assert -10 % 7 == -3` passes. In programming, the sign of the remainder
depends upon the signs of divisor and dividend.
## Other online resources
### [V contributing guide](https://github.com/vlang/v/blob/master/CONTRIBUTING.md)