Skip to main content

ttapp — Tilewise Taylor approximation in a complex domain

ttapp is a code generator, written in Python, that writes C tables for computing an analytic function of a complex variable in a finite domain with near machine precision, by Taylor expansions around a small set of centers, each serving a polyomino of square tiles. Centers, truncation indices and coefficients are chosen so that a guaranteed relative error bound holds on every tile.

ttapp is not yet fully generic. Its proven use case, the Faddeeva function w(z), relies on specific properties of w, in particular on the monotonic decrease of |w(z)| in the first quadrant, which bounds the relative error. Applying ttapp to another function f(z) requires more than a new function module; see the subsection "Software ppapp/ttapp for real/complex functions" of the paper cited below.

Output

The generated tables ship with the C library libcerf as of release 3.6, as files lib/auto_taylor_wofz_tiles.c and lib/auto_taylor_wofz_coeffs.c; the generated test cases as test/auto_test_taylor_wofz.c. Every generated file opens with a header that names the generator version, the full command line and all parameters.

Install

pip install ttapp installs the released package from PyPI, with the demo function modules and the tests inside. From a clone of this repository, pip install -e . installs the command ttapp; alternatively, run python3 -m ttapp from the project root without installing.

Dependencies: python-flint for arbitrary-precision interval arithmetic; numpy and scipy, whose HiGHS solver serves cover algorithm p; OR-tools, needed only for cover algorithm s. The measurement modes e and H load the C library under test through ctypes, from the path in the environment variable LIBCERF_PATH or from the system library search.

Quick start

Tables for libcerf are made by

ttapp d wofz 23 3 37/256 63 0
ttapp c wofz wofz_candidates.dat s 0 0

Mode d writes the candidate expansion centers to wofz_candidates.dat (23 Taylor terms, error bound 3 eps, tile edge 37/256, recentering parameter M = 63, one worker per core). Mode c solves the set cover problem with CP-SAT (algorithm s, no time limit, one worker per core) and writes auto_taylor_wofz_tiles.c, auto_taylor_wofz_coeffs.c, and two .tab files for inspection. Both modes write into the current working directory. Running ttapp without arguments lists all modes; the user manual explains them.

Other functions

A function module provides high-precision values of f and of its Taylor coefficients. ttapp/demo_function/wofz.py is the reference example, ttapp/function_interface.py the specification. The manual's section "Function module" says what else must be adapted.

Tests

python3 -m pytest

from the project root, or ttapp u, which also works for an installed package, since the tests ship inside it.

Documentation

User manual, PDF in this repository.

Citation

Joachim Wuttke, Tilewise Taylor approximation of an analytic function with near machine precision, in preparation, available upon request.

The software itself: ttapp, archived at Zenodo, https://doi.org/10.5281/zenodo.22277190 (all versions).

The real-line sibling of ttapp is ppapp: Joachim Wuttke and Alexander Kleinsorge, Algorithm 1062: Code Generation for Piecewise Chebyshev Approximation, ACM Trans. Math. Softw. 52(2), 13 (2026), https://doi.org/10.1145/3805698.

Author: Joachim Wuttke

License: GPL-3.0 or later

Copyright: Forschungszentrum Jülich GmbH 2026

Metadata

Release files for ttapp 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ttapp 1.2.1
File Size Uploaded Provenance Actions
ttapp-1.2.1.tar.gz 342.3 kB Without provenance Details for ttapp-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ttapp 1.2.1
File Interpreter ABI Platform Actions
ttapp-1.2.1-py3-none-any.whl Python 3 none any Details for ttapp-1.2.1-py3-none-any.whl

Total release size: 522.8 kB

Release files / ttapp-1.2.1.tar.gz

Download URL ttapp-1.2.1.tar.gz
Size 342.3 kB
Tags Source
SHA-256 checksum
How to use checksums
589922f0595f793f45109eef238d63de7a8ac72b182a04ecf90cbb3e6a42beb3
BLAKE2b-256 checksum
How to use checksums
717936c3b849792325060ab0a7093a25ca0032081c078142d1da4ea10fa0d728
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / ttapp-1.2.1-py3-none-any.whl

Download URL ttapp-1.2.1-py3-none-any.whl
Size 180.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34958dfaeacc6ae8c41da59dd6257ebae293ce6328427875cd0f943bf8b055da
BLAKE2b-256 checksum
How to use checksums
80752486d4f26b3e303d6fe16cf59862680423030492a43962d05cc2983f9f4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for ttapp 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page