Elliptic curve arithmetic: Difference between revisions

m
→‎{{header|REXX}}: reduce the rootI function.
(→‎{{header|REXX}}: added the REXX language.)
m (→‎{{header|REXX}}: reduce the rootI function.)
Line 881:
/*──────────────────────────────────────────────────────────────────────────────────────*/
rootI: ox=x; oy=y; x=abs(x); y=abs(y); a=digits()+5; numeric form; g=rootG(); m=y-1
numeric fuzz 3; do until d==a; d=min(d+d,a); numeric digits d; o=0
do until o=g; o=g; g=format((m*g**y+x)/y/g**m, , d-2); end
end; end _=g*sign(ox); if oy<0 then _=1/_; return _/1</lang>
end; _=g*sign(ox); if oy<0 then _=1/_; else return _/1</lang>
'''output'''
<pre>