CTAN Update: xint

CTAN Announcements ctan-ann at dante.de
Wed Oct 29 21:00:51 CET 2014


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




More information about the Ctan-ann mailing list