fix: COSY-compat DA core/ops corrections (bump to 1.4.0)#96
Merged
Conversation
- DAPRV: rewrite format to COSY format (no header, {:17.12} coefficient,
concatenated exponent digits per variable, space+78-dash separator)
- DAREV: fix exponent parser to read concatenated digits instead of
space-separated tokens; remove spurious header-skip
- DAREA: same concatenated-exponent fix as DAREV
- DAPEW: correct header format, limit exponents to num_vars, fix separator
to 5sp+35 dashes
- RKCO: replace corrupted DOP853 b[] weights (sum was ~0.712, now 1.0),
fix e[5]/e[6] exponent transcription errors, sync a2 row 13 to b[]
- DA: add_constant_in_place and make_prime now read epsilon from runtime
instead of hardcoded 1e-15
- DAFILT: use runtime epsilon instead of > 0.0 for mask threshold
- DARAN: guard nonzero.push with epsilon check to uphold DA invariant
- display: build_exp_str now takes num_vars to avoid printing unused
MAX_VARS exponent slots
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.
Summary
{:17.12}coefficient, concatenated exponent digits per variable,+78-dash separator, no header. DAREV parser updated to match (char-by-char exponent parsing). DAREA gets the same fix.b[]summed to ~0.712 instead of 1.0 — a garbled transcription from Hairer's Fortran source. Replaced all 7 affected weights with correct Hairer values. Also fixede[5]/e[6](exponent sign errors:e+1→e-1,e+0→e-1) and synceda2row 13 (FSAL row mirrorsb).add_constant_in_placeandmake_primeused hardcoded1e-15; both now read the configured epsilon from the runtime.> 0.0to> epsilonso the filter respects user-configured DAEPS.nonzero.pushto uphold the DA struct invariant.num_vars(was alwaysMAX_VARS=6); corrected COSY header format.build_exp_strnow takesnum_varsso DA display doesn't pad with unused exponent slots.Test plan
cargo test— 21/21 unit tests passcargo run -- run rosy/src/program/statements/da/daprv/test.rosy— output matchescosy_output.txtbyte-for-bytecargo run -- run rosy/src/program/statements/da/dapew/test.rosy— output matches COSY header/separator formatb[]sum verified to equal 1.0 (sum of corrected weights ≈ 0.99999998)