x^2+y^2=c^2*(1+d*x^2*y^2)
Projective coordinates [database entry] represent x y as X Y Z satisfying the following equations:
x=X/Z y=Y/Z
Operation | Assumptions | Cost | Readdition cost |
---|---|---|---|
addition | Z1=1 and Z2=1 | 6M + 1S + 1*c + 1*d | 6M + 1S + 1*c + 1*d |
addition | k*c=1 and Z2=1 | 9M + 1*k | 9M + 1*k |
addition | X2=1 | 9M + 1S + 1*c + 1*d | 9M + 1S + 1*c + 1*d |
addition | Z2=1 | 9M + 1S + 1*c + 1*d | 9M + 1S + 1*c + 1*d |
addition | Z2=1 | 9M + 1S + 1*c + 1*d | 9M + 1S + 1*c + 1*d |
addition | c2=2*c and Z2=1 | 6M + 5S + 1*c2 + 1*d | 6M + 5S + 1*c2 + 1*d |
addition | 10M + 1S + 1*c + 1*d | 10M + 1S + 1*c + 1*d | |
addition | 10M + 1S + 1*c + 1*d | 10M + 1S + 1*c + 1*d | |
addition | i^2=-1 | 10M + 1S + 3*i + 1*c + 1*d | 10M + 1S + 2*i + 1*c + 1*d |
addition | k*c=1 | 11M + 1*k | 11M + 1*k |
addition | c2=2*c | 7M + 5S + 1*c2 + 1*d | 7M + 5S + 1*c2 + 1*d |
addition | k*c=1 | 10M + 3S + 1*k | 9M + 2S + 1*k |
doubling | cc2=2*c*c and Z1=1 | 3M + 3S + 2*c | |
doubling | 3M + 4S + 3*c | ||
doubling | 3M + 4S + 3*c | ||
doubling | 3M + 4S + 3*c | ||
tripling | c2=2*c | 9M + 4S + 1*c2 | |
tripling | 9M + 4S + 1*c | ||
tripling | c=1 | 7M + 7S | |
tripling | cc4=4*c*c | 7M + 7S + 1*cc4 | |
scaling | 1I + 2M |
C = X1*X2
D = Y1*Y2
E = d*C*D
X3 = (1-E)*((X1+Y1)*(X2+Y2)-C-D)
Y3 = (1+E)*(D-C)
Z3 = c*(1-E^2)
A = X1 B = Y1 C = Z1*X2 D = Z1*Y2 E = A*B F = C*D G = E+F H = E-F J = (A-C)*(B+D)-H K = (A+D)*(B+C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
G = B+E
X3 = A*F*((X1+Y1)*(X2+Y2)-C-D)
Y3 = A*G*(D-C)
Z3 = c*F*G
iX2 = i*X2
C2 = Y2+iX2
D2 = Y2-iX2
iX1 = i*X1
C1 = Y1+iX1
D1 = Y1-iX1
A = Z1*Z2
B = 2*A^2
C = C1*C2
D = D1*D2
L = D+C
M = Y1*Y2
N = 2*M-L
E = d*M*N
F = B-E
G = B+E
X3 = i*A*F*(D-C)
Y3 = A*G*L
Z3 = c*G*F
A = X1*Z2 B = Y1*Z2 C = Z1*X2 D = Z1*Y2 E = A*B F = C*D G = E+F H = E-F J = (A-C)*(B+D)-H K = (A+D)*(B+C)-G X3 = G*J Y3 = H*K Z3 = k*J*K
A = Z1*Z2 B = A^2 C = X1*X2 D = Y1*Y2 E = d*C*D BB = B^2 EE = E^2 H = (A+B)^2-BB I = (A+E)^2-EE X3 = (H-I)*((X1+Y1)*(X2+Y2)-C-D) Y3 = (H+I-2*B)*(D-C) Z3 = c2*(BB-EE)
R1 = X2*Y2 R2 = Z2^2 A = X1*Y1 B = Z1^2 C = R2*A D = R1*B E = (X1-X2)*(Y1+Y2)-A+R1 F = (X1+Y2)*(Y1+X2)-A-R1 G = (Z1+Z2)^2-B-R2 X3 = 2*E*(C+D) Y3 = 2*F*(C-D) Z3 = k*E*F*G
B = (X1+Y1)^2 C = X1^2 D = Y1^2 E = C+D J = E-cc2 X3 = c*(B-E)*J Y3 = c*E*(C-D) Z3 = E*J
R1 = X1 R2 = Y1 R3 = Z1 R4 = R1+R2 R3 = c*R3 R1 = R1^2 R2 = R2^2 R3 = R3^2 R4 = R4^2 R3 = 2*R3 R5 = R1+R2 R2 = R1-R2 R4 = R4-R5 R3 = R5-R3 R1 = R3*R4 R3 = R3*R5 R2 = R2*R5 R1 = c*R1 R2 = c*R2 X3 = R1 Y3 = R2 Z3 = R3
B = (X1+Y1)^2 C = X1^2 D = Y1^2 E = C+D H = (c*Z1)^2 J = E-2*H X3 = c*(B-E)*J Y3 = c*E*(C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