Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

Numberics

Pascal的高精度库

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Numberics

◆Pascal高精度整数库

样例

pascal
Uses Numberics;
var
 a:BigInteger;
 b:ansistring;
begin
 readln(b); a:=b;
 readln(b);
 PrintfLn(a+b);
 PrintfLn(a-b);
 PrintfLn(a*b);
 Printf(a div b)
end.

上述样例可以读入2行大数a,b 分别输出4行a+b,a-b,a*b,a div b.

2017/02/14 Ver 1.0.0
●大数和许多类型可以直接隐式转换或者用BigInteger()强制转换
■大数并无压位,常数大
■大数间不能直接赋值
■大数除法的时间复杂度是O(n^2),大数乘法的时间复杂度是O(nlogn),大数加法的时间复杂度是O(n)

2017/02/20
●做bzoj2227时发现预处理的Bug,已修复