-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
bugthe behaviour is not documented and should be fixed in the codethe behaviour is not documented and should be fixed in the code
Description
First, the alpha functions should not be scaled by onedp here:
Line 2179 in 88211ac
| ax=kx*tw%alfa(1,1) * onedp -tw%alfa(1,2) * onedp /kx; |
Second, the algebra is wrong here:
Line 2215 in 88211ac
| cosvp = (ax*ay-bx*cy)/(ay*ay+cy*cy) |
cosvp = (ax*ay-bx*cy)/(ay*ay+cy*cy) ! ok
sinvp = (ax*cy+ay*bx)/(ay*ay+cy*cy) ! ok
cosvm = (ax*ay+by*cx)/(ax*ax+cx*cx) ! bug: (ax*ay + cx*by)/(ay*ay + by*by)
sinvm = (ax*by-ay*cx)/(ax*ax+cx*cx) ! bug: (ay*cx - ax*cy)/(ay*ay + by*by)
cosv2 = sqrt((1 + cosvp*cosvm - sinvp*sinvm)/2) ! bug: ± sqrt((1 + cosvp*cosvm + sinvp*sinvm)/2)
sinv2 = -sqrt((1 - cosvp*cosvm + sinvp*sinvm)/2) ! bug: ± sqrt((1 - cosvp*cosvm - sinvp*sinvm)/2)
cosv1 = -sqrt((1 + cosvp*cosvm + sinvp*sinvm)/2) ! bug: ± sqrt((1 + cosvp*cosvm - sinvp*sinvm)/2)
sinv1 = -sqrt((1 - cosvp*cosvm - sinvp*sinvm)/2) ! bug: ± sqrt((1 - cosvp*cosvm + sinvp*sinvm)/2)
Third, the disambiguation of the signs for the four square roots is complicated, it would be better to let the complex functions do the job (usually by going back and forth to polar coordinates).
Metadata
Metadata
Assignees
Labels
bugthe behaviour is not documented and should be fixed in the codethe behaviour is not documented and should be fixed in the code