Skip to main content
radiax

Analytic polynomial roots within JAX

JIT-compatible fully analytic variant of jax.numpy.roots for small-degree polynomials

CI Codecov Ruff ty uv Publish PyPI PyPI - Python Version

Overview

radiax.roots is a drop-in replacement for jax.numpy.roots for polynomials of up to the third degree1. It is fully analytic, with support for complex roots and coefficients. It is JIT-compatible2 and has been benchmarked to be around 20x faster than jax.numpy.roots for cubic polynomials3.

Installation

pip install radiax

Usage

import jax.numpy as jnp
from radiax import roots

# Coefficients of the polynomial: x**3 - 6*x**2 + 11*x - 6
coeffs = jnp.array([1, -6, 11, -6])

# Find the roots of the polynomial
r = roots(coeffs)
print(r)

Footnotes

1 Support for degree 4 (quartic) polynomials has not been implemented yet.

2 Just like with jax.numpy.roots, the optional keyword argument strip_zeros must be set to False for JIT-compatibility.

3 radiax 0.1.3 running on an Intel Core i7-14700 CPU (JAX 0.11.1, Python 3.14.7, Ubuntu 24.04.5).


LMMP

Metadata

Release files for radiax 0.1.4

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

Source distribution (sdist)

Source distribution for radiax 0.1.4
File Size Uploaded
radiax-0.1.4.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for radiax 0.1.4
File Interpreter ABI Platform
radiax-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / radiax-0.1.4.tar.gz

Download URL radiax-0.1.4.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
83a59c709d60ae0ebfbc2ba9c53c89eadb5056ace8766143b3f6f46df0a67daa
BLAKE2b-256 checksum
How to use checksums
eb61e2c1567bb25204158af4aad14a81e9d83f5f3b73f71a7caac1e4af5fdd5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / radiax-0.1.4-py3-none-any.whl

Download URL radiax-0.1.4-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f8c8f46d5fae04bd1341393b214b0c4f2e9dcb21b062d2870f34252a44e54ad
BLAKE2b-256 checksum
How to use checksums
90ddf515a405aa04468e54e7bdf1e97502e46054bc55451a1fda6a6314291a61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 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