CTAN update: xint

CTAN Announcements ctan-ann at ctan.org
Fri Mar 2 21:23:23 CET 2018


Jean-François Burnol submitted an update to the

                xint

package.

Version number: 1.3 2018-03-01
License type: lppl1.3c

Summary description: Expandable operations on long numbers

Announcement text:
----------------------------------------------------------------------
- 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





More information about the Ctan-ann mailing list