# Sema: improved comptime \`%\` syntax · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/f8e418c47d13189674bdf5f131c19fd811964579)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: f8e418c47d13189674bdf5f131c19fd811964579

Requested commit: f8e418c47d13189674bdf5f131c19fd811964579

Commit: f8e418c47d13189674bdf5f131c19fd811964579

Tree: 7695c4d6ef606bae5f58c6a978b2f5642b298078

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: improved comptime `%` syntax

 * comptime known 0 as a numerator returns comptime 0 independent of
   denominator.
 * negative numerator and denominator are allowed when the remainder is
   zero because that means the modulus would be also zero.
 * organize math behavior tests

```

## Parents

- [5e60ee41272579bc5fef3d95c59180df6ab824c1](https://git.cafe/gitcafe/zig/commit/5e60ee41272579bc5fef3d95c59180df6ab824c1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/f8e418c47d13189674bdf5f131c19fd811964579?format=markdown)
