Skip to main content

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's eigh.
  • crlin.spd(A): a proof that a symmetric A is positive definite, and a lower bound on its smallest eigenvalue.
  • crlin.solve_banded((kl, ku), ab, b) (scipy's banded layout) and crlin.solve_sparse(A, b) (scipy.sparse, or compressed rows): banded and sparse systems, through a proven bound on the smallest eigenvalue of A or A^T A.

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.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crlin 0.7.0
File Size Uploaded
crlin-0.7.0.tar.gz 12.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for crlin 0.7.0
File Interpreter ABI Platform
crlin-0.7.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.7.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details
crlin-0.7.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 406.2 kB

Release files / crlin-0.7.0.tar.gz

Download URL crlin-0.7.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
60e6b4f4b4864292b54de658fa5db8c1c1ccc63fd7d4198d88b9f8ea64b07879
BLAKE2b-256 checksum
How to use checksums
3edcf8ccbebc9d1437928e23efba8caa1b8a89f3bf76dadb21a493d9c419c0b7
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 14, 2026.

Transparency log

Release files / crlin-0.7.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL crlin-0.7.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 178.3 kB
Tags Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
83d698782a741574b9fd39f14212aea938e80c2182313ccb4b380ff2304f184a
BLAKE2b-256 checksum
How to use checksums
d96b2c3dea1251f82c80793e175047a597dd3d3da49ffd202a78d6f401cbdaff
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 14, 2026.

Transparency log

Release files / crlin-0.7.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL crlin-0.7.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 167.8 kB
Tags Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
61b76ec1f57f4ba073a6f19c5d457469b7506c24f5bcf917f3d169ad468b5920
BLAKE2b-256 checksum
How to use checksums
a951aa69d56d9d1f2a4a348c9274314036c4ba3839b867a40f42dfbf35d0bb6f
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 14, 2026.

Transparency log

Release files / crlin-0.7.0-py3-none-macosx_11_0_arm64.whl

Download URL crlin-0.7.0-py3-none-macosx_11_0_arm64.whl
Size 47.3 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
71b642aca8121cef992b1576d623f8fe44aae81ccee369e72ac71e30b872ccb3
BLAKE2b-256 checksum
How to use checksums
074d9e5653c11687a2451a68fd0069c061861e9fa6e397d0ffa020895be7ab32
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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

4 release files

0.6.0

4 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