原C++语言程序如下:
#include <iostream>
#include <cryptlib/integer.h>
#include <sstream>
using namespace std;
using namespace CryptoPP;
#define PREC 1000
int main( int argc , char* argv[] )
{
if( argc != 2 )
{
cout << "usage foobar <number>" << endl;
exit( 1 );
}
istringstream iss( argv[1] );
Integer nn , mm = 1 , mm2; iss >> nn;
for( int i = 0; i < PREC; ++i ) mm *= 10; mm2 = mm * mm; nn *= mm2;
cout << nn.SquareRoot() << endl;
}
[此贴子已经被作者于2006-3-11 9:12:08编辑过]