Commit 54f9be8
committed
reduce the number of flops in c and s
Previously, integers were converted to 64-bit floating-point numbers
within the square root.
Now, the numerators and denominators are first calculated as integers.
After converting to type T, they are divided in one flop.
Thus, each c and s only involves a floating-point sqrt() and a type T
division, which reduces the probability of a rounding error by about
half (compared to the previous method).1 parent 69e2c0f commit 54f9be8
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments