Elliptic curve arithmetic: Difference between revisions
m
→{{header|Perl}}: clarify package vs local variables, output fixes
m (→{{header|REXX}}: changed whitespace, optimized some functions, indented the output, used a template for the output section.) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: clarify package vs local variables, output fixes) |
||
Line 873:
{{trans|C}}
<lang perl>package EC;
our ($a, $b) = (0, 7);▼
{
package EC::Point;
sub new { my $class = shift; bless [ @_ ], $class }
Line 906:
package Test;
my $
my $
print "$_\n" for $
print "check
print abs(($
? "ok" : "wrong";</lang>
{{out}}
<pre>EC-point at x=-1.817121, y=1.000000
EC-point at x=-1.442250, y=2.000000
EC-point at x=10.375375, y=-33.524509
check
</pre>
|