Commit 6876ae0
committed
Fix division by zero in zrotg
The cases
[ c s ] * [ 0 ] = [ |db_i| ]
[-s c ] [ i*db_i ] [ 0 ]
and
[ c s ] * [ 0 ] = [ |db_r| ]
[-s c ] [ db_r ] [ 0 ]
computed s incorrectly. To flip the entries of vector,
s should be conjg(db)/|db| and not conjg(db) / da,
where da == 0.0.1 parent bb2f1ec commit 6876ae0
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
0 commit comments