# stage1/stage2: Simplify divTrunc impl · gitcafe/zig

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

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

Visibility: public

Requested revision: 811766e1cf0ad2fad73fbb82690969ce430ba1a5

Requested commit: 811766e1cf0ad2fad73fbb82690969ce430ba1a5

Commit: 811766e1cf0ad2fad73fbb82690969ce430ba1a5

Tree: 5f550e0115e5dcc9f6178be03c0dc8af63e86d58

Author: LemonBoy

Committer: LemonBoy

## Message

```
stage1/stage2: Simplify divTrunc impl

According to the documentation, `divTrunc` is "Truncated division.
Rounds toward zero". Lower it as a straightforward fdiv + trunc sequence
to make it behave as expected with mixed positive/negative operands.

Closes #10001

```

## Parents

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

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