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

The production tables of libcerf were made by

ttapp d wofz 23 3 7 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 1/7, 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.1.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.1.1
File Size Uploaded
ttapp-1.1.1.tar.gz 324.8 kB Details

Built distribution (wheel)

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

Total release size: 496.2 kB

Release files / ttapp-1.1.1.tar.gz

Download URL ttapp-1.1.1.tar.gz
Size 324.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7121daf8cf9da49a2cb832f3a768a416cd600f9d271846e70807224a41883a3e
BLAKE2b-256 checksum
How to use checksums
7368944d0496c092d6c2a1c400c28946b2248ecd0b723a9ab2c94ed7f0f75bec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

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

Download URL ttapp-1.1.1-py3-none-any.whl
Size 171.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73e96f581093e88b49be6ec79b053a441620b243db660f1e72fdadbb1562f9d8
BLAKE2b-256 checksum
How to use checksums
0e56723ba31e286438d05ee273c9f6ec04c0a366ebaae9161d5cbd7c27c5837a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

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