Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: loda-lang/loda-cpp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: loda-lang/loda-cpp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: copilot/fix-test-pari-failure
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 4 files changed
  • 2 contributors

Commits on Dec 13, 2025

  1. Initial plan

    Copilot committed Dec 13, 2025
    Configuration menu
    Copy the full SHA
    0ca8d98 View commit details
    Browse the repository at this point in the history
  2. Initial exploration of A131083 test-pari failure

    Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
    Copilot and ckrause committed Dec 13, 2025
    Configuration menu
    Copy the full SHA
    c7eda0a View commit details
    Browse the repository at this point in the history
  3. Fix calculation of initial terms needed for formula generation

    The getNumInitialTermsNeeded function was calculating one fewer initial term
    than required for recurrence relations. For a recurrence a(n) = a(n-k), we need
    k initial terms, but the formula was producing only k-1 terms.
    
    Added +1 to account for the initial state before the loop, ensuring enough terms
    to avoid undefined references in PARI evaluation.
    
    Fixes issue where test-pari fails for A131083 with deep recursion error.
    
    Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
    Copilot and ckrause committed Dec 13, 2025
    Configuration menu
    Copy the full SHA
    6fb3208 View commit details
    Browse the repository at this point in the history
  4. Attempted fix for initial terms calculation - partial progress

    Investigated the test-pari failure for A131083. The issue is that the generated
    formula has 7 initial terms when 8 are needed for the recurrence a(n) = a(n-8).
    
    Attempted fix: Add +1 to initial terms for counter cell in getNumInitialTermsNeeded.
    However, this approach doesn't work because the variant simplification system
    (simplifyFormulaUsingVariants) overwrites the calculated numTerms.
    
    The root cause appears to be in how variants calculate their num_initial_terms,
    which ends up being one less than needed for periodic sequences like A131083.
    
    Further investigation needed to fix the variant system or detect periodic
    sequences specifically.
    
    Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
    Copilot and ckrause committed Dec 13, 2025
    Configuration menu
    Copy the full SHA
    6e1c755 View commit details
    Browse the repository at this point in the history
Loading