sarah-ek / faer-rs

Linear algebra foundation for the Rust programming language
https://faer-rs.github.io
MIT License
1.82k stars 61 forks source link

Fix to crash condition in amd #129

Closed goulart-paul closed 5 months ago

goulart-paul commented 5 months ago

Fixes a condition causing an assertion failure in the AMD ordering. The issue arises when (pme1,pme2) = (0,-1), which should generate an empty range for pme1..(pme2+1), but was instead causing "add with overflow" errors.

Example that triggers this error condition is here: https://pastebin.com/qdGq83kF

sarah-ek commented 5 months ago

looks good, thanks!