Skip to content

Conversation

@jbrzensk
Copy link
Collaborator

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Example
  • Documentation

Description

Fixes sturmLiouvilleLegendre to match MATLAB, error matches MATLAB implementations.
Before fix:

norm(u_numerical) = 1.42275
norm(u_exact) = 2.1814
norm(u_numerical - u_exact) = 1.56892

After fix:

examples/cpp/sturmLiouvilleLegendre 
norm(u_numerical) = 2.17386
norm(u_exact) = 2.1814
norm(u_numerical - u_exact) = 0.0162423

Related Issues & Documents

Added/updated tests?

  • Yes
  • No, and this is why: existing tests suffice
  • I need help with writing tests

Read Contributing Guide and Code of Conduct

@jbrzensk jbrzensk self-assigned this Dec 22, 2025
@jbrzensk jbrzensk requested a review from aboada December 22, 2025 21:09
@jbrzensk
Copy link
Collaborator Author

jbrzensk commented Dec 22, 2025 via email

@jbrzensk jbrzensk merged commit 5260a8a into main Dec 22, 2025
16 checks passed
@jbrzensk jbrzensk deleted the bug/SLL branch December 22, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C++ sturmLiouvilleLegendre has a bug

3 participants