-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix real matrix sqrt and log for edge cases (#40144)
* Add failing tests * Improve 2x2 real sqrt for scalar diagonal * Avoid sylvester if zero is a solution * Avoid unnecessary sqrt * Use correct variable names * Avoid erroring due to NaNs * Exactly adapt Higham's algorithm, with hypot * Remove unreachable branch * Add failing tests * Handle overflow/underflow * Invert instead of dividing * Apply d=0 constraint from standardized real schur form * Handle underflow * Avoid underflow/overflow in log diagonal blocks * Add tests for log underflow/overflow
- Loading branch information
Showing
2 changed files
with
61 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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