Repository navigation
Fix solve for all-0 matrices - #4766
Open
diracdeltafunk wants to merge 1 commit into
Open
diracdeltafunk wants to merge 1 commit into
diracdeltafunk wants to merge 1 commit into
Conversation
Guard the empty pivot profile produced by a zero augmented matrix so solve returns a zero solution instead of crashing. Fixes Macaulay2#2831.
Contributor
Author
|
This is my first AI-generated PR to M2. Please let me know if I did this in an acceptable way! I want to be helpful and not a bother. |
4 of 12 tasks
d-torrance
requested changes
Nov 3, 2026
d-torrance
left a comment
Member
There was a problem hiding this comment.
Thanks!
Would you add a regression test (in some appropriate file in M2/Macaulay2/tests/normal) that runs some of the code that crashes prior to this fix?
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.
Description
For a zero rational system,
solvecould crash while reading the last element of an empty pivot profile. This is a one-line fix for that problem.Related issues and pull requests
Fixes #2831.
Testing
Built
M2-engine,M2-binary, andM2-core. I felt that a new test file is not needed for this change; happy to add one if desired.Release notes
Fix a crash in
solvefor zero rational systems.AI disclosure
Tools and models used: OpenAI Codex (GPT-6).
How AI was used, and on which parts: Diagnosis, code, test, and PR draft.
How I verified the result: I looked at the code; it's one line.
License
Checklist
developmentbranch.