高精度计算单精度乘法单精度乘法是计算范围次于高精度乘法的一种运算,只是运算效率比高精度计算略高
单精度乘法过程样例:constmaxcount=进制位maxlen=记录高精度数组大小procedure mulnum(a:bignum;x:longint;,var c:bignum);vari:longint;beginfillchar(c,sizeof(c),0);c:=a;for i:=1 to c do c[i]:=a[i]*x;for i:=1 to c do {进位}begininc(c[i+1],c[i] div maxcount);c[i]:=c[i] mod 10;end;while c[c+1]>0 dobegininc(c);inc(c[c+1],c[c] div maxcount);c[c]:=c[c] mod maxcount;end;end;
以上内容由大学时代综合整理自互联网,实际情况请以官方资料为准。