Repository navigation
Conversation
BaseContext.Rem(New(100, 100), New(10, 1)) returned DivisionImpossible even though the remainder is exactly zero. The quotient digit-count check treated the default precision of zero as a zero-digit limit, while the rest of the context uses zero to disable rounding. Apply the quotient-size limit only when precision is nonzero, and say so in the Rem doc comment. QuoInteger keeps rejecting a zero precision; its doc comment now says so and names c.Precision instead of the nonexistent d.Precision. Fixes cockroachdb#134. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
rafiss
force-pushed
the
fix/unlimited-precision-remainder
branch
from
October 21, 2026 20:11
583b156 to
968c4f9
Compare
rafiss
approved these changes
Oct 21, 2026
cueckoo
pushed a commit
to cue-lang/cue
that referenced
this pull request
Oct 22, 2026
Its master no longer treats a precision of zero as a quotient size limit in Context.Rem, where the rest of the package treats it as unlimited; see cockroachdb/apd#156. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: Iedf072cb01212a8b56ea91174967a9269ab2836a GitOrigin-RevId: ef2ee05d0bd7d6928051af7148424ba963ce7d6c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BaseContext.Rem(New(100, 100), New(10, 1)) returned DivisionImpossible
even though the remainder is exactly zero. The quotient digit-count
check treated the default precision of zero as a zero-digit limit,
while the rest of the context uses zero to disable rounding.
Apply the quotient-size limit only when precision is nonzero, and say
so in the Rem doc comment. QuoInteger keeps rejecting a zero precision;
its doc comment now says so and names c.Precision instead of the
nonexistent d.Precision.
Fixes #134.
🤖 Generated with Claude Code