CTAN Update: xint
Date: October 29, 2014 9:00:51 PM CET
Jean-François Burnol submitted an update to the
xint
package.
Version number: 1.1 2014/10/28
License type: lppl1.3
Summary description: Expandable operations on long numbers
Announcement text:
xint 1.1 has some bug fixes, a few breaking changes, and many extensions to xintexpr. See CHANGES.pdf or CHANGES.html for details. The documentation has been completely revamped. The source code is separately available as sourcexint.pdf. Package xintcore is split-off from xint taking with it all the basic arithmetic. This way, my other package bnumexpr has minimal overhead. Neither xint nor xintfrac load xinttools anymore, only xintexpr does. \xintthefloatexpr add(x^15,x=[1..10]/13)\relax \xinttheiiexpr seq(seq(i^2+j^2, i=1..j),j=1..30)\relax % nesting \xinttheexpr seq(x^2+x+1, x=1..10, 20..30, 40..50)\relax \xinttheexpr 37*[15..[-2]..-13]^3\relax % itemwise operations \xinttheexpr add(x^3, x = [89..120,150..200][15:-15])\relax % slicing First Fibonacci number at least 2^64 and its index \xinttheiiexpr iter(0,1; (@1>=2^64)?{break(i)}{@2+ at 1}, i=1++)\relax Euclide Algorithm \newcommand\GCD [2] {\xinttheiiexpr rrseq(#1,#2; (@1=0)?{abort}{@2/:@1}, i=1++)\relax } One last: (ok, this one looks a bit scary). \newcommand\Factors [1]{\xinttheiiexpr subs(seq((i/:3=2)?{omit}{[L][i]},i=1..([L][0])), % [L][0]= # of items L=rseq(#1;([@][1]<=1)?{abort}{(([@][1])/:p)?{omit} {iter(([@][1])//p; (@/:p)?{break((@,p,e))}{@//p},e=1++)}},p=2++))\relax } \Factors {41^4*59^2*29^3*13^5*17^8*29^2*59^4*37^6} produces 16246355912554185673266068721806243461403654781833, 13, 5, 17, 8, 29, 5, 37, 6, 41, 4, 59, 6
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 Users Group http://www.tug.org . Please join a users group; see http://www.tug.org/usergroups.html .
Thanks for the upload. For the CTAN Team Petra Rübe-Pugliese
xint 1.1 has some bug fixes, a few breaking changes, and many extensions to xintexpr. See CHANGES.pdf or CHANGES.html for details. The documentation has been completely revamped. The source code is separately available as sourcexint.pdf. Package xintcore is split-off from xint taking with it all the basic arithmetic. This way, my other package bnumexpr has minimal overhead. Neither xint nor xintfrac load xinttools anymore, only xintexpr does. \xintthefloatexpr add(x^15,x=[1..10]/13)\relax \xinttheiiexpr seq(seq(i^2+j^2, i=1..j),j=1..30)\relax % nesting \xinttheexpr seq(x^2+x+1, x=1..10, 20..30, 40..50)\relax \xinttheexpr 37*[15..[-2]..-13]^3\relax % itemwise operations \xinttheexpr add(x^3, x = [89..120,150..200][15:-15])\relax % slicing First Fibonacci number at least 2^64 and its index \xinttheiiexpr iter(0,1; (@1>=2^64)?{break(i)}{@2+ at 1}, i=1++)\relax Euclide Algorithm \newcommand\GCD [2] {\xinttheiiexpr rrseq(#1,#2; (@1=0)?{abort}{@2/:@1}, i=1++)\relax } One last: (ok, this one looks a bit scary). \newcommand\Factors [1]{\xinttheiiexpr subs(seq((i/:3=2)?{omit}{[L][i]},i=1..([L][0])), % [L][0]= # of items L=rseq(#1;([@][1]<=1)?{abort}{(([@][1])/:p)?{omit} {iter(([@][1])//p; (@/:p)?{break((@,p,e))}{@//p},e=1++)}},p=2++))\relax } \Factors {41^4*59^2*29^3*13^5*17^8*29^2*59^4*37^6} produces 16246355912554185673266068721806243461403654781833, 13, 5, 17, 8, 29, 5, 37, 6, 41, 4, 59, 6
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 Users Group http://www.tug.org . Please join a users group; see http://www.tug.org/usergroups.html .
Thanks for the upload. For the CTAN Team Petra Rübe-Pugliese
xint – Expandable arbitrary precision floating point and integer operations
The xint bundle main modules are:
- xinttools
- utilities of independent interest such as expandable and non-expandable loops,
- xintcore
- expandable macros implementing addition, subtraction, multiplication, division, and powers for arbitrarily long integers,
- xint
- extension of xintcore,
- xintfrac
- extends the scope of xint to decimal numbers, to numbers using scientific notation and also to (exact) fractions,
- xintexpr
- 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),
xintgcd (provides gcd()
and 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.
Package | xint |
Version | 1.4m 2022-06-10 |
Copyright | 2013–2022 Jean-François Burnol |
Maintainer | Jean-François Burnol |