This release is a pre-release and may not be stable for production use.
itrigamma
A self-contained implementation of the inverse-trigamma function and related polygammas for analyses involving log-gamma random variables, etc.
Written in C with basic interfaces/bindings for:
- Python (
python/citrigamma.pyx) - R (
r/RCall_itrigamma.c)
Python
Install
- Through PyPI/pip:
pip install itrigamma - or from source:
python -m build; python -m pip install .
Test
Copy+paste into shell:
python <<'TEST_PY'
import time, numpy as np, math
from itrigamma import itrigamma
x = np.random.default_rng(0).random(10_000_000)
t = time.perf_counter()
y = itrigamma(x)
dt = time.perf_counter() - t
print(f'Approx. {(x.size/dt) / 1_000_000:.1f} million evals per sec.')
KNOWN = [
(1.0e-8, 100000000.499999999167),
(0.05, 20.49583523915460591),
(0.10, 10.491681821078422372),
(0.20, 5.4834517798530476662),
(0.50, 2.4599529483523074137),
(1.00, 1.4262551202150789904),
(2.00, 0.87666407746426017692),
(5.00, 0.49616873470410694489),
(10.0, 0.33508104437803564513),
(20.0, 0.23077632915242632912),
(50.0, 0.14337981235286147770),
]
for i, (x0, y0) in enumerate(KNOWN):
assert math.isclose(itrigamma(x0), y0, abs_tol=1e-12)
print(f' --> check {i}:\t{(x0,y0)}\tGOOD')
TEST_PY
Output (Exact results vary wrt machine precision.)
TEST_PY
Approx. 8.2 million evals per sec.
--> check 0: (1e-08, 100000000.5) GOOD
--> check 1: (0.05, 20.495835239154605) GOOD
--> check 2: (0.1, 10.491681821078423) GOOD
--> check 3: (0.2, 5.4834517798530475) GOOD
--> check 4: (0.5, 2.4599529483523073) GOOD
--> check 5: (1.0, 1.426255120215079) GOOD
--> check 6: (2.0, 0.8766640774642602) GOOD
--> check 7: (5.0, 0.49616873470410694) GOOD
--> check 8: (10.0, 0.33508104437803565) GOOD
--> check 9: (20.0, 0.23077632915242632) GOOD
--> check 10: (50.0, 0.14337981235286149) GOOD
R
Install (R)
Clone the repository:
git clone https://github.com/nolan-h-hamilton/itrigamma.git
cd itrigamma
Build with base R's r/utils/SHLIB utility as:
PKG_CPPFLAGS="-I$(pwd)/src" R CMD SHLIB r/RCall_itrigamma.c src/itrigamma.c -o r_itrigamma.so # r_trigamma.dll for windows
Test (R)
dyn.load("r_itrigamma.so")
# e.g., write a simple wrapper around .Call
itrigamma = function(x) .Call("r_itrigamma", x)
x_ = seq(1.0e-8, 100, length.out = 50)
y = itrigamma(x_)
plot(x_,y, type='l')
Metadata
Release files for itrigamma 0.2.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| itrigamma-0.2.0a1.tar.gz | 93.4 kB | With provenance | Details for itrigamma-0.2.0a1.tar.gz |
Built distributions (wheels)
Total release size: 2.0 MB
Release files / itrigamma-0.2.0a1.tar.gz
| Download URL | itrigamma-0.2.0a1.tar.gz |
|---|---|
| Size | 93.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c681c142fc8a1037edd47f94ab6caab830b50d801c833bf21c9c9a3bcfcaccd
|
|
BLAKE2b-256 checksum How to use checksums |
6bc167ea0175389a72e93fd2395f9cb01e181c719f0f6f5ceabe775e621d836a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | itrigamma-0.2.0a1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 209.8 kB |
| Tags | CPython 3.14 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
2faa56efae190b857ad93e78ace12b9d08cb3125ace04e1237efd37583557739
|
|
BLAKE2b-256 checksum How to use checksums |
ba4073b7be810ed7277c8ed387af9932469133fe1001717b0095634a547962cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | itrigamma-0.2.0a1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 212.3 kB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
35589a2f086754a54502025d8c1a314d1b78daba4fecc442a3a3e2dae4783f10
|
|
BLAKE2b-256 checksum How to use checksums |
9c92eef6fab5991187126065614c6aa411d88ba03f12645b1023e3b337a8ede6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp314-cp314-macosx_15_0_arm64.whl
| Download URL | itrigamma-0.2.0a1-cp314-cp314-macosx_15_0_arm64.whl |
|---|---|
| Size | 38.5 kB |
| Tags | CPython 3.14 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ea4e6269eccdb2db1ba81f65e26c6566308a747b2e9fbab7f14bc530e5f5ba38
|
|
BLAKE2b-256 checksum How to use checksums |
efc20e5b5b2ffdf7a6c385a12426bbf66146f904bedc20ff11690fe075bb3665
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | itrigamma-0.2.0a1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 210.2 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
b60f59967d25dcf709d55e89a3a137a0ce929df58d953413c237bba6efd45be2
|
|
BLAKE2b-256 checksum How to use checksums |
afb529348c42806ccebcf639cf2afc7531c6636c03348227a780391294e291e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | itrigamma-0.2.0a1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 214.0 kB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
ce82b6cf9298f8389882680dd4ce8739430a7614f59a683a326b057e77160963
|
|
BLAKE2b-256 checksum How to use checksums |
fc2a17fdf86b64ce13dfb3c0aa479248a6dbaaf004e4822bedc77faea35607d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp313-cp313-macosx_15_0_arm64.whl
| Download URL | itrigamma-0.2.0a1-cp313-cp313-macosx_15_0_arm64.whl |
|---|---|
| Size | 38.2 kB |
| Tags | CPython 3.13 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bcecb9e506f2f655ace2df0a19f2e5dec0166b09f09e690066cc42b9fc7530b3
|
|
BLAKE2b-256 checksum How to use checksums |
a71c8d05c7b772b3ed2acdb01e876a96a00596a802e17aefe7bda49b3fa6e8a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | itrigamma-0.2.0a1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 221.7 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
077db2f551ee769fd596c8018ca46e14287d1f3a6924195c681ec915f586e7ed
|
|
BLAKE2b-256 checksum How to use checksums |
eabb91ec4435dce09c3b1d92bea17aa46ffaaa5bd65865a6fd5d0ba33e818e85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | itrigamma-0.2.0a1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 225.9 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
91750701e5ba9b8f6656987200f6b2c2a40f444b24b07bbc92295404554d6829
|
|
BLAKE2b-256 checksum How to use checksums |
ad955e35e3c1e8c3b17c2a64df787e6541728257d4a31738a11ebe74bae2ecd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp312-cp312-macosx_15_0_arm64.whl
| Download URL | itrigamma-0.2.0a1-cp312-cp312-macosx_15_0_arm64.whl |
|---|---|
| Size | 38.5 kB |
| Tags | CPython 3.12 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
296311a76c0ac5a722a74cb0f3095603fc7b8715093e9732b0675ba8ca854f41
|
|
BLAKE2b-256 checksum How to use checksums |
10b635d1bdd00ae39f97148e92d6c8bb12c7eb276f73b33b665c2b91c9080b6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | itrigamma-0.2.0a1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 207.4 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
f92411f5723b4714b3a0090b68e9b651df554df15ad94e0d156e0e41b4d81919
|
|
BLAKE2b-256 checksum How to use checksums |
d71fc4cd84f90720d752df3d7dcc23a3a21d87f299a3848a2a029ee6fae600a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | itrigamma-0.2.0a1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 207.6 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
f811dadf7a2220f1db6e0e8d31758038673c0a987f643d8f87bd5a2d35923b57
|
|
BLAKE2b-256 checksum How to use checksums |
f4e84c1954a9ff1c5c9181617e6caa0b58cc38292f15cced6a338a80278eb740
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / itrigamma-0.2.0a1-cp311-cp311-macosx_15_0_arm64.whl
| Download URL | itrigamma-0.2.0a1-cp311-cp311-macosx_15_0_arm64.whl |
|---|---|
| Size | 38.6 kB |
| Tags | CPython 3.11 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b6bb85c0cc2e1c67107ffa79e4556585035bcfd8df17ba3112bba020f05cef84
|
|
BLAKE2b-256 checksum How to use checksums |
922972dcf3c42ba98a369b798ed09e34d25cfa218b24adfff2fa9234254b3654
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logSecurity for itrigamma 0.2.0a1
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.
Full provenance
All 13 files in this release have been uploaded with provenance metadata.
Attestation for itrigamma-0.2.0a1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logA 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.