Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • c7b1687
  • /
  • perl
  • /
  • test9.pl
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:ccc28005accff681f74ab58840b7cf5153e9a3a0
directory badge Iframe embedding
swh:1:dir:6fe9f7ebaafee609a988be3a56ecc53319a65256
test9.pl
#!/usr/local/bin/perl

use ExtUtils::testlib;

use SSLeay;

# 2687145 * 3003 * 10^5072 - 1. 

$a=SSLeay::BN::set_word(2687145);
$b=SSLeay::BN::set_word(3003);
$c=SSLeay::BN::set_word(10);
$d=SSLeay::BN::set_word(5072);
$e=SSLeay::BN::set_word(1);

print $a->bn2hex()."\n";
print $b->bn2hex()."\n";
print $c->bn2hex()."\n";
print $d->bn2hex()."\n";
print $e->bn2hex()."\n";

$f=(($a->mul($b)->mul($c->exp($d)))->sub($e));
#print "$a $b\n";

$c=$a->mul($b);
print "1->".$c->bn2hex()." \n";

$c=$a*$b;
print "2->".$c->bn2hex()." \n";
$a*=$b;
print "3->$a\n";

print $f->bn2hex()." $a\n";
print $a."\n";

print "$a=(($b*$c)/$d);\n";
$a=(($b*$c)/$d);
print "$a\n";

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top