Skip to content

Make integer division truncate towards zero - #1418

Merged
jiribenes merged 2 commits into
mainfrom
jiribenes/trunc-div
Aug 9, 2026
Merged

Make integer division truncate towards zero#1418
jiribenes merged 2 commits into
mainfrom
jiribenes/trunc-div

Conversation

@jiribenes

Copy link
Copy Markdown
Contributor

Related to #1245 and #1271, see the added test case.

Behaviour on LLVM ought to stay the same, but JS and Chez will change.

The alternative would be to have the flooring division also on LLVM, but it's not a single LLVM instruction. :)

@jiribenes jiribenes changed the title Change division to be truncating towards zero Make integer division truncate towards zero Aug 9, 2026
@jiribenes
jiribenes marked this pull request as ready for review August 9, 2026 16:49
@jiribenes
jiribenes merged commit d9929e3 into main Aug 9, 2026
15 of 22 checks passed
@jiribenes
jiribenes deleted the jiribenes/trunc-div branch August 9, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant