Skip to content

Assume multiplying by integer never truncates#706

Open
chiphogg wants to merge 1 commit into
mainfrom
chiphogg/integer-multiples-dont-truncate#122
Open

Assume multiplying by integer never truncates#706
chiphogg wants to merge 1 commit into
mainfrom
chiphogg/integer-multiples-dont-truncate#122

Conversation

@chiphogg

Copy link
Copy Markdown
Member

This should be true regardless of the rep. After all, integer
multiplication is just equivalent to repeated addition. We may
overflow, but we could never truncate.

To implement this, we do an integer multiplication check at the highest
level, even before we split on arithmetic vs. non-arithmetic rep. This
will enable a small but meaningful chunk of non-arithmetic rep use cases
in a low-risk way. (It's a complete no-op for arithmetic reps.)

Helps #122 by unblocking our fix PR.

This should be true regardless of the rep.  After all, integer
multiplication is just equivalent to repeated addition.  We may
overflow, but we could never truncate.

To implement this, we do an integer multiplication check at the highest
level, even before we split on arithmetic vs. non-arithmetic rep.  This
will enable a small but meaningful chunk of non-arithmetic rep use cases
in a low-risk way.  (It's a complete no-op for arithmetic reps.)

Helps #122 by unblocking our fix PR.
@chiphogg
chiphogg marked this pull request as ready for review July 20, 2026 19:50
@chiphogg
chiphogg requested a review from a team July 20, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant