Simplify rotg
* The check da != ZERO is no longer necessary since there is a special case ada == ZERO, where ada = |da|. * Add the missing check c != ZERO before the division. Note that with these two changes the long double code follows the float/double version of the code.
This commit is contained in:
parent
6876ae0c3b
commit
db3a43c8ed
|
@ -66,13 +66,8 @@ void CNAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){
|
|||
c = da / r;
|
||||
s = db / r;
|
||||
z = ONE;
|
||||
if (da != ZERO) {
|
||||
if (ada > adb){
|
||||
z = s;
|
||||
} else {
|
||||
z = ONE / c;
|
||||
}
|
||||
}
|
||||
if (ada > adb) z = s;
|
||||
if ((ada <= adb) && (c != ZERO)) z = ONE / c;
|
||||
|
||||
*C = c;
|
||||
*S = s;
|
||||
|
|
Loading…
Reference in New Issue