# bit shifting safety · gitcafe/zig

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

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

Visibility: public

Requested revision: 987768778a67538299f84a6ab7ff0ca65f69d2ac

Requested commit: 987768778a67538299f84a6ab7ff0ca65f69d2ac

Commit: 987768778a67538299f84a6ab7ff0ca65f69d2ac

Tree: 2e7551d76bf9a3e6d242a961eacf7c81aab6025f

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
bit shifting safety

 * add u3, u4, u5, u6, u7 and i3, i4, i5, i6, i7
 * shift operations shift amount parameter type is
   integer with log2 bit width of other param
   - This enforces not violating undefined behavior on
     shift amount >= bit width with the type system
 * clean up math.log, math.ln, math.log2, math.log10

closes #403

```

## Parents

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

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