Directory macros/generic/zeckendorf
Source: zeckendorf.dtx Version: 0.9alpha, 2025/10/06 Author: Jean-François Burnol Keywords: Zeckendorf representation; Knuth multiplication License: LPPL 1.3c
Aim
This package adds to \xintiieval
's syntax the $
character as infix operator computing the Knuth multiplication of positive integers. It adds fib()
and fibseq()
functions to compute Fibonacci numbers and zeck()
, zeckindex()
to compute the Zeckendorf indices of positive integers.
Conversion between integers and Zeckendorf binary words (or lists of indices as done by zeck()
inside \xintiieval{}
) is available through macros. Of course they all work using expansion only, and as the package is an add-on to xintexpr
it handles arbitrarily big integers (up to thousands of digits at most).
It can be used in three ways:
- as a LaTeX package:
\usepackage{zeckendorf}
, - as a Plain ε-TeX macro file:
\input zeckendorfcore.tex
, - or interactively on the command line:
etex zeckendorf
. If available use ratherrlwrap etex zeckendorf
for a smoother experience.
The package is in alpha stage and its user interface may change in backwards incompatible ways. Of course, suggestions are most welcome.
Installation
Exert etex zeckendorf.dtx
to extract macro files. To build the documentation run xelatex
on the extracted zeckendorf-doc.tex
, or directly on zeckendorf.dtx
.
The recommended TDS structure is:
/tex/generic/zeckendorf/zeckendorfcore.tex /tex/generic/zeckendorf/zeckendorf.tex /tex/generic/zeckendorf/zeckendorf.sty /source/generic/zeckendorf/zeckendorf.dtx /doc/generic/zeckendorf/zeckendorf-doc.pdf /doc/generic/zeckendorf/README.md
License
Copyright © 2025 Jean-François Burnol
This Work may be distributed and/or modified under the conditions of the LaTeX Project Public License 1.3c. This version of this license is in
http://www.latex-project.org/lppl/lppl-1-3c.txt
and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later.
This Work has the LPPL maintenance status "author-maintained".
The Author and Maintainer of this Work is Jean-François Burnol.
This Work consists of the main source file and its derived files
zeckendorf.dtx, zeckendorfcore.tex, zeckendorf.tex, zeckendorf.sty, README.md, zeckendorf-doc.tex, zeckendorf-doc.pdf
Download the contents of this package in one zip archive (117.1k).
zeckendorf – Knuth multiplication and Zeckendorf representations of big integers
This package adds to \xintiieval’s syntax the $ character as infix operator computing the Knuth multiplication of positive integers. It adds functions to this syntax, as well as macros for use without it, to work with Fibonacci numbers and Zeckendorf representations.
It can be used either as a LaTeX package, or with Plain ε-TeX, or on the command line in an interactive session using ε-TeX.
Being based upon xintexpr, it allows to compute with (“arbitrarily” big integers.
Package | zeckendorf |
Version | 0.9alpha 2025-10-06 |
Licenses | The LaTeX Project Public License 1.3c |
Copyright | 2025 Jean-François Burnol |
Maintainer | Jean-François Burnol |
Topics | Calculation Arithmetic |
