Skip to content

Update_matrix3_2300011108.cpp - #1

Open
CHAIN-PKU wants to merge 1 commit into
mohanchen:mainfrom
CHAIN-PKU:main
Open

CHAIN-PKU wants to merge 1 commit into
mohanchen:mainfrom
CHAIN-PKU:main

Conversation

@CHAIN-PKU

Copy link
Copy Markdown

Fix multiple bugs in matrix3.cpp:

Inverse(): original code silently set d=1 when det==0, returning wrong result. Now warns and returns zero matrix.

Inverse(): eliminated -0.0 output caused by negating zero cofactors (IEEE 754 issue).

operator/= and operator/: added division-by-zero protection.

Fix multiple bugs in matrix3.cpp:
Inverse(): original code silently set d=1 when det==0, returning wrong result. Now warns and returns zero matrix.
Inverse(): eliminated -0.0 output caused by negating zero cofactors (IEEE 754 issue).
operator/= and operator/: added division-by-zero protection.
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.

1 participant