Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use safe scaling algorithm from Reference-LAPACK PR 527 #4143

Merged
merged 8 commits into from
Sep 1, 2023
Merged
Prev Previous commit
Next Next commit
fix truncated edit
martin-frbg authored Jul 13, 2023
commit 7c75c8b2fe3fc4b2e6c5c09f63d7ce2b8d5b5c18
6 changes: 5 additions & 1 deletion interface/rotg.c
Original file line number Diff line number Diff line change
@@ -112,8 +112,12 @@ void CNAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){
if (adb == ZERO) {
*C = ONE;
*S = ZERO;
*DA = ZERO;
*DB = ZERO;
else if (ada == ZERO) {
*C = ZERO;
*S = ONE;
*DA = *DB;
*DB = ONE;
} else {
FLOAT aa = da / scale;
FLOAT bb = db / scale;