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) elax xinttheiiexpr seq(seq(i^2+j^2, i=1..j),j=1..30) elax % nesting xinttheexpr seq(x^2+x+1, x=1..10, 20..30, 40..50) elax xinttheexpr 37*[15..[-2]..-13]^3 elax % itemwise operations xinttheexpr add(x^3, x = [89..120,150..200][15:-15]) elax % slicing
First Fibonacci number at least 2^64 and its index xinttheiiexpr iter(0,1; (@1>=2^64)?{break(i)}{@2+@1}, i=1++) elax
Euclide Algorithm ewcommandGCD [2] {xinttheiiexpr rrseq(#1,#2; (@1=0)?{abort}{@2/:@1}, i=1++) elax }
One last: (ok, this one looks a bit scary).
ewcommandFactors [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++)) elax }
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