CTAN update: xint
- removed all macros previously deprecated at 1.2o, - modified addition, subtraction and modulo operations to use a least common multiple for the denominator of the result, - added \xintPIrr, \xintDecToString and preduce(), - and last but not least refactored extensively the \xintNewExpr/\xintdeffunc mechanism. It got both leaner and stronger and makes possible recursive function definitions. Examples: \xintdeffunc GCD(a, b):= if(b, GCD(b, a /: b), a); is of course the Euclide algorithm (but here usable with fractions). \xintdefiifunc powmod(x, m, n) := if(m, if(m=1, x /: n, if(odd(m), (x*sqr(powmod(x, m//2, n))) /: n, sqr(powmod(x, m//2, n)) /: n ) ), 1 ); implements modular exponentiation (with positive exponents only, like the pow() Python function).
This package is located at http://mirror.ctan.org/macros/generic/xint More information is at http://www.ctan.org/pkg/xint We are supported by the TeX User Groups. Please join a users group; see http://www.tug.org/usergroups.html .
Thanks for the upload. For the CTAN Team Ina Dau
xint – Expandable operations on long numbers
The xint bundle main modules are:
- utilities of independent interest such as expandable and non-expandable loops,
- expandable macros implementing addition, subtraction, multiplication, division, and powers for arbitrarily long integers,
- extension of xintcore,
- extends the scope of xint to decimal numbers, to numbers using scientific notation and also to (exact) fractions,
- provides expandable parsers of numeric expressions using the standard infix notations, parentheses, built-in functions, user definable functions and variables (and more ...) which do either exact evaluations (also with fractions) or floating point evaluations under a user chosen precision.
Further modules of the bundle are: xintkernel (support macros for all the bundle constituents),
xintbinhex (conversion to and from hexadecimal and binary bases),
lcm() functions to xintexpr),
xintseries (evaluates numerically partial sums of series and power series with fractional coefficients),
and xintcfrac (dedicated to the computation and display of continued fractions).
All computations are compatible with expansion-only context.
The packages may be used with Plain TeX, LaTeX, or (a priori) any other macro format built upon TeX.
|Copyright||2013–2019 Jean-François Burnol|
- 2019-04-07 CTAN update: xint
- 2019-01-07 CTAN Update: xint
- 2018-06-18 CTAN update: xint
- 2018-05-19 CTAN update: xint
- 2018-03-08 CTAN update: xint
- 2018-03-02 CTAN update: xint
- 2018-02-07 CTAN update: xint
- 2017-08-30 CTAN update: xint