← All packages

Numerics & statistics

star-chebyshev 0.1.0

Chebyshev series with their derivative

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

Apache-2.0 Released & Verified single file

Summary

Value and first derivative of a Chebyshev series by Clenshaw's recurrence, on [-1, 1] or on an interval given by midpoint and radius (the convention of ephemeris segments); 600 series agree with CSPICE chbval/chbder and NumPy within 1e-14 and with mpmath at 40 digits within 5e-14 of the natural scale of the sum; reproduces the NAIF documentation example.

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 133 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_chebyshev-0.1.0-py3-none-any.whl

In Python: import star_chebyshev

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_chebyshev_0_1_0,
  author  = {Cavazzini, Andrea},
  title   = {{star-chebyshev}: Chebyshev series with their derivative},
  version = {0.1.0},
  year    = {2026},
  url     = {https://andrea07072000.github.io/S.T.A.R.-/software/star_chebyshev/},
  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-chebyshev @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_chebyshev"

README · tests · evidence (GitHub)

Technical sheet

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

Requirements

  • R1 evaluate(coefficients, x) returns the sum of c_k T_k(x) and its derivative for x in [-1, 1], c_0 first, by Clenshaw's recurrence (the polynomials T_k are never formed).
  • R2 evaluate_on(coefficients, t, mid, radius) evaluates the same series at x = (t - mid) / radius and returns the derivative with respect to t. A t outside the interval is refused; one that leaves it by rounding alone (at most two units in the last place) is taken as the end.
  • R3 Measured on 600 series of 1 to 40 terms at points of random intervals, ends included: value and derivative agree with CSPICE chbval/chbder and NumPy within 1e-14, and with mpmath at 40 digits within 5e-14, of the natural scale of the sum (sum of |c_k|; sum of k² |c_k| / radius).
  • R4 Every function returns two floats or raises ValueError: a malformed coefficient list (1 to 200 finite numbers within 1e100, booleans refused), x outside [-1, 1], t outside the interval, a midpoint or radius out of range.

Limits (what is not claimed)

Evaluation only: no fitting of coefficients, no reading of ephemeris files, no second or higher derivatives, no integration of the series. The error of the result is that of Clenshaw's recurrence in double precision, about 1e-15 of the sum of |c_k| (more for the derivative, by the factor k²): when the terms cancel, the relative error of a small result is larger and is not bounded here. For an ephemeris, the accuracy of a position is that of its coefficients, which this module cannot judge.

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_chebyshev.py 0.965 (2026-10-07)
Independent implementations written by others (needs 2)
CSPICE chbval / chbder (SpiceyPy), mpmath chebyt / chebyu at 40 digits, numpy.polynomial.chebyshev
Result
Released & Verified

Evidence in the registry

CheckStatusRecordedWhat was observed
Unit testsVERIFIED2026-10-07133 passed in 0.81s
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-07evaluate_on([1, 3, 0.5, 1, 0.5, -1, 1], 1, 0.5, 3) = (-0.34087791495198916, 0.3827160493827157) (suite: 133 passed in 0.81s)
Cross-check with independent librariesVERIFIED2026-10-07star_chebyshev evaluates a Chebyshev series and its first derivative on an interval given by midpoint and radius, the convention of SPK ephemeris segments
BenchmarkVERIFIED2026-10-07largest scaled difference from mpmath at 40 digits: value 1.6e-14, derivative 1.5e-14
Clean install from the release tagVERIFIED2026-10-07pytest outside the tree: 133 passed in 0.52s

Fingerprints (SHA-256)

star_chebyshev-0.1.0-py3-none-any.whl06063d5c6fe85ce74ea38c07348b208d4b9f0155c2edaca401b5dec3e954d021
star_chebyshev.pyb44ad7ed248449ddc2181d573022dc3662b405db5b239a898fde155790f494db
star_chebyshev-0.1.0-source.zip192e5c3621bcf5fc6ac7f5ea943ff5a32e2696279b888d769befaffe15ddc890

results