mp.3x
来自「unix v7是最后一个广泛发布的研究型UNIX版本」· 3X 代码 · 共 72 行
3X
72 行
.TH MP 3X.SH NAMEitom, madd, msub, mult, mdiv, min, mout,pow, gcd, rpow \- multiple precision integer arithmetic.SH SYNOPSIS.nf.B "typedef struct { int len; short *val; } mint;".PP.PP.B madd(a, b, c).B msub(a, b, c).B mult(a, b, c).B mdiv(a, b, q, r).B min(a).B mout(a).B pow(a, b, m, c).B gcd(a, b, c).B rpow(a, b, c).B msqrt(a, b, r).B mint *a, *b, *c, *m, "*q, *r;".PP.B.B sdiv(a, n, q, r).B mint *a, *q;.B short *r;.PP.B mint *itom(n).SH DESCRIPTIONThese routines perform arithmetic on integers ofarbitrary length.The integers are stored using the defined type.I mint.Pointers toa.I mintshould be initialized using the function.IR itom ,which sets the initial value to.IR n .After that space is managed automatically by the routines..PP.IR madd , " msub" , " mult" ,assign to their third arguments the sum, difference, andproduct, respectively, of their first two arguments..I mdivassigns the quotient and remainder, respectively,to its third and fourth arguments..I sdivis like.I mdivexcept that the divisor is an ordinary integer..I msqrtproduces the square root and remainder of its first argument..I rpowcalculates.I araised to the power.IR b ,while.I powcalculates this reduced modulo.IR m ..IR min " and" moutdo decimal input and output..PPThe functions are obtained with theloader option.IR -lmp ..SH DIAGNOSTICSIllegal operations and running out of memoryproduce messages and core images.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?