crlin: verified linear algebra for Python
lo, hi = crlin.solve(A, b): for every component, an interval that provably holds the exact solution of A x = b
(the binary64 values of A and b taken exactly), typically an ulp wide, at about 10 times the cost of
numpy.linalg.solve. Or crlin.NotVerified, when A is singular or too ill-conditioned for binary64. It never
returns an enclosure that misses the solution.
import numpy as np, crlin
A = np.random.default_rng(1).standard_normal((500, 500)); b = np.ones(500)
lo, hi = crlin.solve(A, b) # numpy's inverse and its (threaded) BLAS do the heavy work
lo, hi = crlin.solve(A, b, mode="exact") # asks nothing of the BLAS but binary64 arithmetic; slower
lo, hi = crlin.solve(A, b, mode="extended") # for condition numbers to about 1e30
The rest, each checked against exact rational answers in crnumerics' tests:
crlin.solve(A, B)with B an n-by-k matrix: several right-hand sides together.crlin.solve_interval(A_lo, A_hi, b_lo, b_hi): the solutions of every system whose entries lie in the given intervals, which also proves every such A nonsingular.crlin.lstsq(A, b): the exact least-squares solution (A m by n, m >= n, proved of full rank), or for m < n the exact minimum-norm one.crlin.eig_sym(A): an interval for every eigenvalue of a symmetric A, from numpy'seigh.crlin.spd(A): a proof that a symmetric A is positive definite, and a lower bound on its smallest eigenvalue.
It never switches the rounding mode, so a threaded BLAS can't break the proof; every bound comes from exact sums
or from a priori error bounds in round-to-nearest. The methods and their checks are in crnumerics' lin/README.md.
pip install crlin brings a wheel with the library, libcrlin.so.0 (or libcrlin.0.dylib on macOS);
CRLIN_LIBRARY names another.
Metadata
Release files for crlin 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crlin-0.6.0.tar.gz | 11.0 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crlin-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| crlin-0.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64, Linux glibc 2.17+ ARM64 | Details |
| crlin-0.6.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 379.6 kB
Release files / crlin-0.6.0.tar.gz
| Download URL | crlin-0.6.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
959d0809182c9740a0431c3f04208d148c5c5cf672eb121f7520e94b21d1e07f
|
|
BLAKE2b-256 checksum How to use checksums |
95f20cd41a3185e7d3d2b1d7851d098d035729860522539babd3133f5f8db910
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 13, 2026.
Transparency logRelease files / crlin-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | crlin-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 169.3 kB |
| Tags | Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
b4219e318bd98e59ca965f9f13de8afaee01d8019d0c7da2d1138747f3afa03d
|
|
BLAKE2b-256 checksum How to use checksums |
a0e6395a8e97a8a69667173effd62ca5a946105b1720600c6a8eded49ac06fa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 13, 2026.
Transparency logRelease files / crlin-0.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | crlin-0.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 159.8 kB |
| Tags | Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
947748bf5dff166c631610fe0d4811716e75187d7afc26125bdfff078dd1b49e
|
|
BLAKE2b-256 checksum How to use checksums |
c1957623c63609783012b5586dabb4bffb0d36b770c7688c7cb548928cc14822
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 13, 2026.
Transparency logRelease files / crlin-0.6.0-py3-none-macosx_11_0_arm64.whl
| Download URL | crlin-0.6.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 39.4 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1e962982210e4a7c3f912ad27383bb3b3a6e1674bc5a230a4d605c9849beb536
|
|
BLAKE2b-256 checksum How to use checksums |
2f86b97554b7825fcd7b483c46b73b39cf811c5f00f277fdd848fd40e8010da3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 13, 2026.
Transparency log