pascal 高精度 加法 ,减法,乘法,除法 -- 程序

[复制链接]
查看11 | 回复3 | 2012-7-20 20:09:57 | 显示全部楼层 |阅读模式
加法:program HighPrecision1_Plus;constfn_inp='hp1.inp';fn_out='hp1.out';maxlen=100;{ max length of the number }typehp=record
len:integer; { length of the number }
s:array[1..maxlen] of integer
{ s[1] is the lowestposition
s[len] is the highest position }
end;v...
回复

使用道具 举报

千问 | 2012-7-20 20:09:57 | 显示全部楼层
我这个代码超短的高精度算法核心程序:已知a,b,求cna,nb,nc-a,b,c的位数加法:i:=1;x:=0;while (i<=na) or (i<=nb) dobeginx:=a+b+x;c:=x mod 10;x:=x div 10;inc(i);end;减法...
回复

使用道具 举报

千问 | 2012-7-20 20:09:57 | 显示全部楼层
高精度简单不了...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行