Repository navigation
fix(pdf): preserve calculator operand types and operator semantics - #1147
Merged
Merged
Conversation
andiwand
force-pushed
the
review/128-pdf-function-numbers
branch
from
October 6, 2026 14:47
0666414 to
e7e3cea
Compare
andiwand
force-pushed
the
review/129-pdf-calculator-types
branch
from
October 6, 2026 14:53
759f921 to
17166d2
Compare
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.
🤖 Generated with Claude Code
Calculator functions represented every operand as a real number, so
0 notproduced 1 and booleans could participate in arithmetic. Preserve numeric types and boolean values, require the operand types each operator accepts, correct zero-filling right shifts and half-way rounding, and reject undefined arithmetic instead of substituting values mid-program.Operator behavior follows ISO 32000-1 §7.10.5 and the PostScript Language Reference, third edition, §8.2. Invalid execution keeps the existing zero-result fallback. Ghostscript rejects the same programs: real operands to
mod,idivandbitshift, division by zero, a numericifcondition, a boolean result andnoton a real.Validation: 19 regression assertions fail on the parent. All 141 targeted tests and 50 PDF corpus metadata/HTML-generation checks pass. LLVM 22 clang-tidy and NDK 28.1, emsdk 3.1.73 and iOS 15 object compilation pass, alongside the native macOS 12 build.