Update zrotg.c

This commit is contained in:
Martin Kroeker 2023-11-05 16:45:41 +01:00 committed by GitHub
parent fbe27a3cb2
commit fb2ca213a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -113,12 +113,13 @@ void CNAME(void *VDA, void *VDB, FLOAT *C, void *VS) {
} }
} else { } else {
*C = ada / adahsq; *C = ada / adahsq;
if (*C >= safmin) if (*C >= safmin) {
*R = *DA / *C; *R = *DA / *C;
*(R+1) = *(DA+1) / *(C+1); *(R+1) = *(DA+1) / *(C+1);
else } else {
*R = *DA * (h / adahsq); *R = *DA * (h / adahsq);
*(R+1) = *(DA+1) * (h / adahsq); *(R+1) = *(DA+1) * (h / adahsq);
}
*S = *S1 * ada / adahsq; *S = *S1 * ada / adahsq;
*(S+1) = *(S1+1) * ada / adahsq; *(S+1) = *(S1+1) * ada / adahsq;
} }