Skip to content

fix infinite loop in cond#682

Open
araujoms wants to merge 1 commit intomainfrom
cond
Open

fix infinite loop in cond#682
araujoms wants to merge 1 commit intomainfrom
cond

Conversation

@araujoms
Copy link
Copy Markdown
Contributor

Closes #680

For n==2 this code was trying to find three non-parallel +-1 vectors, which is mathematically impossible.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.37%. Comparing base (2b32b60) to head (cad723f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #682      +/-   ##
==========================================
+ Coverage   84.28%   84.37%   +0.09%     
==========================================
  Files          13       13              
  Lines        9340     9340              
==========================================
+ Hits         7872     7881       +9     
+ Misses       1468     1459       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@JamesWrigley JamesWrigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weak LGTM!

(I have a tenuous understanding of the problem, but the logic and new tests make sense to me)

@araujoms
Copy link
Copy Markdown
Contributor Author

I can't say I fully understand opnormestinv either. I'm certain my fix doesn't affect the previously working cases, and improves the situation for n == 2, so I'm comfortable with merging.

Nevertheless, it would be better if somebody who does understand it could comment. I did some archaeology, and who originally wrong this function was @mfasi, maybe he'll spare us a glance?

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.

There is a bug in the calculation conditions for sparse matrices

2 participants