← All packages

Numerics & statistics

star-tabint 0.1.0

Integrals of tabulated data, correctly rounded

Public state: Released & Verified. The registry label is RELEASED. What the states mean →

Apache-2.0 Released & Verified single file

Summary

Trapezoid rule on any strictly increasing grid, its running integral and the composite Simpson rule for equally spaced samples, each evaluated exactly in rational arithmetic and rounded once; on 500 tables (1750 values) every value is identical to the exact rational value from SymPy, and NumPy and SciPy agree within 3.3e-16 of the sum of the absolute panel areas.

Run in your browser

Edit the code and press Run (or Ctrl+Enter). Python runs in your browser with this package's published code. The first run downloads Python once (about 12 MB).

Runs in the browser: all 54 tests pass in the browser's Python (Pyodide 314.0.7, Python 3.14.2), measured on 20 October 2026.

Use it on your computer

No account and no GitHub needed. Download, then install with one command:

python -m pip install star_tabint-0.1.0-py3-none-any.whl

In Python: import star_tabint

Get started →

Cite it, and its bill of materials

For a paper, a report or a supplier file: the citation in two formats, and the software bill of materials (SBOM) in the two standard formats, with the fingerprint of the wheel.

@software{cavazzini_star_tabint_0_1_0,
  author  = {Cavazzini, Andrea},
  title   = {{star-tabint}: Integrals of tabulated data, correctly rounded},
  version = {0.1.0},
  year    = {2026},
  url     = {https://andrea07072000.github.io/S.T.A.R.-/software/star_tabint/},
  note    = {Apache-2.0. Source: https://github.com/Andrea07072000/S.T.A.R.-, commit dc09f61d}
}

For developers

Install directly from the public repository:

python -m pip install "star-tabint @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_tabint"

README · tests · evidence (GitHub)

Technical sheet

Package
star-tabint
Import name
star_tabint
Version
0.1.0
Licence
Apache-2.0
Python
>=3.9
Dependencies
none (standard library only)
Capability
star.numerics.tabulated-integral
Maturity
Released & Verified (RELEASED)
Published commit
dc09f61d

Requirements

  • R1 trapezoid(xs, ys) integrates the piecewise-linear curve through the points (xs strictly increasing, any spacing); cumulative returns the integral from the first point up to each point; simpson(ys, step) applies the composite Simpson rule to an odd number of equally spaced values.
  • R2 Each result is the float nearest to the exact value of the rule on the numbers given: lobes that cancel lose nothing, and every element of cumulative is rounded from its own exact partial sum.
  • R3 Measured on 500 tables of 2 to 60 points (1750 values): every value identical to the exact rational value (SymPy) rounded once; NumPy and SciPy within 3.3e-16 of the sum of the absolute panel areas.
  • R4 Every function returns floats or raises ValueError: tables that are not lists or tuples of 2 to 100000 finite numbers within 1e100, different lengths, abscissas not strictly increasing, an even number of values or an invalid step for Simpson.

Limits (what is not claimed)

The value of a quadrature RULE on the samples, not the integral of the underlying function: the error of the rule (of order h² for the trapezoid, h⁴ for Simpson on smooth data) is not estimated, and noisy or sparse samples give a correspondingly poor integral. No Simpson rule for unequal spacing or an even number of points, no higher-order rules, no extrapolation. "Exact" refers to the floats supplied. Exact arithmetic is slower than floating point.

Release gate

Computed by the registry from the result files, with the same function that decides RELEASED.

Mutation score, latest measure of each module (needs at least 0.850)
  • star_tabint.py 0.970 (2026-10-07)
Independent implementations written by others (needs 2)
numpy.trapezoid, scipy.integrate (trapezoid, cumulative_trapezoid, simpson)
Also compared with, not counted
S.T.A.R.'s own re-derivations: SymPy exact rationals
Result
Released & Verified

Evidence in the registry

CheckStatusRecordedWhat was observed
Clean install from the release tagVERIFIED2026-10-07pytest outside the tree: 54 passed in 0.21s
Unit testsVERIFIED2026-10-0754 passed in 0.45s
ReviewVERIFIED2026-10-07Requirements, interface, units, data provenance, dependency surface and failure behaviour reviewed
ReviewVERIFIED2026-10-07Re-running the cross-check gives a byte-identical evidence file
Reference valueVERIFIED2026-10-07simpson([1, 0.8, 2/3, 4/7, 0.5], 0.25) = 0.6932539682539682; trapezoid([0, 1, 2], [0, 1, 4]) = 3.0 (suite: 54 passed in 0.45s)
Cross-check with independent librariesVERIFIED2026-10-07star_tabint returns the trapezoid rule, its running integral and the composite Simpson rule of a table as the exact value of the rule rounded once
BenchmarkVERIFIED2026-10-07values not identical to the exact one: 0 of 1750

Fingerprints (SHA-256)

star_tabint-0.1.0-py3-none-any.whl4ba5a650d4d9137d710344d359cdef0a3ff25604e3ca5f9cfbda576732c26174
star_tabint.py55b09f2a14330272da5dac0e7159e5ca39158ea4462778a39897e50a3bc5ab44
star_tabint-0.1.0-source.zip7021c4e4ed51897f5d5172de05f0a044c7556950444f07b3e4b4c0eaf0b48abb

results