Metadata-Version: 2.4
Name: dashu-rs
Version: 0.6.0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Summary: Python bindings for dashu, an arbitrary precision number library implemented in Rust
Keywords: mathematics,numerics
Home-Page: https://github.com/cmpute/dashu/tree/master/python
Author-email: Jacob Zhong <cmpute@gmail.com>
License: MIT OR Apache-2.0
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/cmpute/dashu
Project-URL: Repository, https://github.com/cmpute/dashu

# dashu-rs

## What is dashu?

[dashu](https://github.com/cmpute/dashu) is an arbitrary-precision number library
written in pure Rust, aiming to be a Rust-native alternative to GNU GMP + MPFR. It
provides unlimited-precision integers, rationals, floats, and complex numbers with
correct rounding, split across a set of Rust crates (`dashu-int`, `dashu-float`,
`dashu-ratio`, `dashu-cmplx`, …).

## What is dashu-rs?

`dashu-rs` is a **standalone Python package** that brings dashu's number types to
Python. It is a native extension built with [PyO3](https://pyo3.rs), distributed as
a prebuilt wheel on [PyPI](https://pypi.org/project/dashu-rs/), and **installs
anywhere with `pip`** — no Rust toolchain, no compiler, and no knowledge of the
dashu Rust crates required:

```sh
pip install dashu-rs
```

```python
from dashu import UBig, IBig, RBig, FBig, DBig, CBig
```

The exposed types — arbitrary-precision integers (`UBig`/`IBig`), rationals
(`RBig`), binary/decimal floats (`FBig`/`DBig`), and complex numbers (`CBig`) —
are `Send` + `Sync` (free-threaded-Python compatible), accept native Python
numbers in their constructors, and interoperate with `int`/`float`/`Fraction` in
arithmetic.

## Usage

See **[USAGE.md](./USAGE.md)** for the full guide — installation, constructors,
operations, formatting, transcendentals, and the module-level `math` API.

It is also rendered in the dashu user guide at
<https://zyxin.xyz/dashu/python.html>.

