Repository navigation
A rational factor compiled by the published compile entry is a division - #481
Closed
enumeratio wants to merge 2 commits into
Closed
enumeratio wants to merge 2 commits into
enumeratio wants to merge 2 commits into
Conversation
…on, not a rounded reciprocal product. Fix cortex-js#480
# Conflicts: # CHANGELOG.md
Member
|
Thank you for the clear diagnosis and the test. Commit 1531783 on main fixes the cause: |
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.
Fix #480.
asRationalrecognized an exact rational byinstanceof ExactNumericValue. The standalonecompilebundle carries its own copy of that class, so for an expression boxed bycompute-enginethe test failed and the division lowering forRational(p, q)factors did not apply:n(n-1)(n-2)/6compiled to0.16666666666666666 * …(559.9999999999999atn = 16).asRationalnow also accepts a value by shape (a numericradicaland an arrayrational), so both copies agree. Every target that lowers throughexactRationalDivisorbenefits, including Python and the shader targets.The new test loads
JavaScriptTargetfrom a second module registry (jest.isolateModules) and compiles an expression boxed by the first, standing in for the two bundles:n(n-1)(n-2)/6withndeclared an integer: a trailing/ 6, exact for severalnincluding 16.n/49:_.n / 49, exact at every multiple of 49.2x/3is_.x / 3 * 2andx/3is within an ulp of the engine's.N().The three exactness tests fail without the change.