Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
509b551
Add complex crate design
Jun 26, 2026
b4a92c7
Update the CBig design
Jun 26, 2026
41ab5b2
Merge branch 'develop' into cplx
Jun 26, 2026
4f0dd8f
Update TODO
Jun 26, 2026
c51b972
Further update TODO
Jun 26, 2026
417d21a
Update design
Jun 26, 2026
8f0109b
Merge branch 'develop' into cplx
Jun 27, 2026
875ddcb
Update AbsEq note in TODO-cmplx to reflect Phase 1 removal
Jun 27, 2026
3866909
Refine v0.5/cmplx design docs
Jun 27, 2026
1a5bc58
Minor improvement
Jun 27, 2026
8cf9419
dashu-cmplx (M1): skeleton, type model, and easy operations
Jun 27, 2026
f5f8b5d
dashu-cmplx (M2): mul/div/sqr/inv + abs, and FBig::hypot
Jun 27, 2026
aabd60b
dashu-cmplx (M3): sqrt, exp, log, and powers
Jun 27, 2026
50e292f
dashu-cmplx (M4): trig and inverse trig
Jun 27, 2026
cca10b3
dashu-cmplx (M5): hardening — Annex-G specials, benches, and the rug/…
Jun 27, 2026
6270bdb
dashu-cmplx (M6): cbig! macro, guide chapter, and 0.5.0 version sync
Jun 27, 2026
16546c2
ci: extend the MSRV dep-drop script for dashu-cmplx
Jun 27, 2026
a0c9bd0
fix(cmplx): import alloc::format in the no_std test modules
Jun 27, 2026
6556421
feat(cmplx): rand support for CBig (rand = rand_v08 default)
Jun 27, 2026
4c48bc9
fix(cmplx): CBig NumHash consistent with num-complex + num-order
Jun 28, 2026
153a6e7
Restructure dashu-cmplx modules to mirror dashu-float
Jun 28, 2026
f3af958
Tighten TODO-v05.md: mark dashu-cmplx done, prune resolved items
Jun 28, 2026
df1acce
Promote the sin many-digit rounding reproducer to CI tests
Jun 28, 2026
363b2a1
Rewrite fuzz differentials in proptest; split build-only CI into buil…
Jun 28, 2026
acd1faf
Note SIMD-optimized FFT multiplication as a v1.0 item
Jun 28, 2026
20ba4fe
Add comprehensive fuzz oracles vs GMP/MPFR/MPC (step 3)
Jun 28, 2026
bb9c389
Revert version changes
Jun 28, 2026
35aeb03
Add FBig::sinh_cosh for combined sinh+cosh computation
Jun 28, 2026
2206d69
Address review feedback: renames, ownership patterns, and cleanup
Jun 29, 2026
3fc1c50
Address additional review feedback: inline abs_repr, delete guide, re…
Jun 29, 2026
7d279fe
Address second batch of review feedback
Jun 29, 2026
0c36ad5
Note: expose ownership-aware kernel fns from dashu-float for dashu-cmplx
Jun 29, 2026
96f5d1c
Use live num_complex::Complex64 NumHash in test instead of manual for…
Jun 29, 2026
4e11805
Add num-complex conversions; decouple num-complex from num-order
Jun 29, 2026
4623664
Add cargo doc CI guard; fix workspace intra-doc links
Jun 30, 2026
d8924d0
Rename guide ieee754.md to compliance.md; add C99 Annex G section
Jun 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .claude/worktrees/agent-a42c1d4dbc1f4e25d
Submodule agent-a42c1d4dbc1f4e25d deleted from d3180f
1 change: 1 addition & 0 deletions .claude/worktrees/python
Submodule python added at 06ddb4
121 changes: 121 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

name: Build

# Build-only checks — none of these run `cargo test`; they verify the code compiles and documents:
# * `check` — the main workspace `cargo check` across stable / 1.85 / 1.68 (MSRV),
# pinning transitive deps + dropping incompatible ones for 1.68.
# * `rustdoc` — `cargo doc --workspace` with `-D warnings`, guarding against broken
# intra-doc links. The meta-crate `dashu` and `dashu-python` both name their
# lib `dashu`, so they collide on output and are documented separately.
# * `fuzz-check` — the workspace-excluded `fuzz/` crate (its `rug`-linked differentials run
# manually before a release); a compile-guard so it can't silently rot.
# * `build-benchmark`— the `benchmark/` scratchpad (builds with `--features gmp`).
# * `build-aarch64` — an aarch64 cross-build.
# The sibling `Tests` workflow runs the actual `cargo test` matrix.

jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, "1.85", "1.68"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Drop postgres/diesel/dev-deps for Rust 1.68
if: matrix.rust == '1.68'
run: python3 .github/workflows/drop_incompatible_deps_for_msrv.py
- name: Pin transitive deps for MSRV
if: matrix.rust != 'stable'
run: |
if [ "${{ matrix.rust }}" = "1.68" ]; then
echo "Pinning packages for Rust 1.68:"
echo " parking_lot -> 0.12.3"
echo " lock_api -> 0.4.12"
echo " quote -> 1.0.40"
echo " unicode-ident -> 1.0.13"
echo " zeroize -> 1.8.1"
cargo update -p parking_lot --precise 0.12.3
cargo update -p lock_api --precise 0.4.12
cargo update -p quote --precise 1.0.40
cargo update -p unicode-ident --precise 1.0.13
cargo update -p zeroize --precise 1.8.1
elif [ "${{ matrix.rust }}" = "1.85" ]; then
echo "Pinning packages for Rust 1.85:"
echo " diesel -> 2.2.12"
cargo update -p diesel@2 --precise 2.2.12
fi
- run: cargo check --all-features --tests
if: matrix.rust != '1.68'
- run: cargo check --workspace --exclude dashu-python --features "std,num-order,serde,zeroize,rand,num-traits_v02"
if: matrix.rust == '1.68'

rustdoc:
name: cargo doc
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: cargo doc (workspace, all features)
# `dashu-python`'s lib is also named `dashu`, so it collides with the meta-crate's lib on
# the output path and must be documented in its own invocation. Both are checked.
run: |
cargo doc --workspace --exclude dashu-python --all-features --no-deps
cargo doc -p dashu-python --all-features --no-deps

fuzz-check:
name: cargo check fuzz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install GMP/MPFR/MPC build prerequisites
# `rug` pulls in `gmp-mpfr-sys`, which builds GMP/MPFR/MPC (needs `m4`); the -dev packages
# are installed as well in case the build picks up system libraries.
run: sudo apt-get update && sudo apt-get install -y libgmp-dev libmpfr-dev libmpc-dev m4
- name: cargo check (fuzz crate, all targets)
run: cargo check --manifest-path fuzz/Cargo.toml --all-targets

build-benchmark:
name: Build benchmark
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo build --features gmp
working-directory: benchmark

build-aarch64:
name: Build aarch64
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: aarch64-unknown-linux-gnu
- run: cargo build --target aarch64-unknown-linux-gnu --all-features --workspace --exclude dashu-python
2 changes: 1 addition & 1 deletion .github/workflows/drop_incompatible_deps_for_msrv.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# resolver under the 1.68 build. The MSRV build only exercises `rand`
# (== rand_v08); rand_v09 and rand_v010 are covered by the stable / 1.85
# `--all-features` jobs.
for manifest in ['Cargo.toml', 'integer/Cargo.toml', 'float/Cargo.toml', 'rational/Cargo.toml']:
for manifest in ['Cargo.toml', 'integer/Cargo.toml', 'float/Cargo.toml', 'rational/Cargo.toml', 'complex/Cargo.toml']:
text = open(manifest).read()
text = re.sub(r'^rand_v09 = .*\n', '', text, flags=re.MULTILINE)
text = re.sub(r'^rand_v010 = .*\n', '', text, flags=re.MULTILINE)
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,6 @@ on:
name: Tests

jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, "1.85", "1.68"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Drop postgres/diesel/dev-deps for Rust 1.68
if: matrix.rust == '1.68'
run: python3 .github/workflows/drop_incompatible_deps_for_msrv.py
- name: Pin transitive deps for MSRV
if: matrix.rust != 'stable'
run: |
if [ "${{ matrix.rust }}" = "1.68" ]; then
echo "Pinning packages for Rust 1.68:"
echo " parking_lot -> 0.12.3"
echo " lock_api -> 0.4.12"
echo " quote -> 1.0.40"
echo " unicode-ident -> 1.0.13"
echo " zeroize -> 1.8.1"
cargo update -p parking_lot --precise 0.12.3
cargo update -p lock_api --precise 0.4.12
cargo update -p quote --precise 1.0.40
cargo update -p unicode-ident --precise 1.0.13
cargo update -p zeroize --precise 1.8.1
elif [ "${{ matrix.rust }}" = "1.85" ]; then
echo "Pinning packages for Rust 1.85:"
echo " diesel -> 2.2.12"
cargo update -p diesel@2 --precise 2.2.12
fi
- run: cargo check --all-features --tests
if: matrix.rust != '1.68'
- run: cargo check --workspace --exclude dashu-python --features "std,num-order,serde,zeroize,rand,num-traits_v02"
if: matrix.rust == '1.68'

test:
name: Test
strategy:
Expand Down Expand Up @@ -120,32 +81,6 @@ jobs:
toolchain: stable
- run: cargo test --no-default-features --features rand --workspace --exclude dashu-python

build-benchmark:
name: Build benchmark
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo build --features gmp
working-directory: benchmark

build-aarch64:
name: Build aarch64
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: aarch64-unknown-linux-gnu
- run: cargo build --target aarch64-unknown-linux-gnu --all-features --workspace --exclude dashu-python

fmt:
name: Rustfmt
runs-on: ubuntu-latest
Expand Down
25 changes: 14 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,29 @@ members = [
"macros",
"python",
"rational",
"complex",
]
exclude = ["benchmark", "fuzz"]
default-members = ["base", "integer", "float", "rational", "macros"]
default-members = ["base", "integer", "float", "rational", "complex", "macros"]

[features]
default = ["std", "num-order"]
std = ["dashu-base/std", "dashu-int/std", "dashu-float/std", "dashu-ratio/std"]
std = ["dashu-base/std", "dashu-int/std", "dashu-float/std", "dashu-ratio/std", "dashu-cmplx/std"]

# stable features
serde = ["dashu-int/serde", "dashu-float/serde", "dashu-ratio/serde"]
num-order = ["dashu-int/num-order", "dashu-float/num-order", "dashu-ratio/num-order"]
serde = ["dashu-int/serde", "dashu-float/serde", "dashu-ratio/serde", "dashu-cmplx/serde"]
num-order = ["dashu-int/num-order", "dashu-float/num-order", "dashu-ratio/num-order", "dashu-cmplx/num-order"]
tuning = ["dashu-int/tuning"]
zeroize = ["dashu-int/zeroize", "dashu-float/zeroize", "dashu-ratio/zeroize"]
zeroize = ["dashu-int/zeroize", "dashu-float/zeroize", "dashu-ratio/zeroize", "dashu-cmplx/zeroize"]

# unstable features
rand = ["dashu-int/rand", "dashu-float/rand", "dashu-ratio/rand"]
rand_v08 = ["dashu-int/rand_v08", "dashu-float/rand_v08", "dashu-ratio/rand_v08"]
rand_v09 = ["dashu-int/rand_v09", "dashu-float/rand_v09", "dashu-ratio/rand_v09"]
rand_v010 = ["dashu-int/rand_v010", "dashu-float/rand_v010", "dashu-ratio/rand_v010"]
num-traits = ["dashu-int/num-traits", "dashu-float/num-traits", "dashu-ratio/num-traits"]
num-traits_v02 = ["dashu-int/num-traits_v02", "dashu-float/num-traits_v02", "dashu-ratio/num-traits_v02"]
rand = ["dashu-int/rand", "dashu-float/rand", "dashu-ratio/rand", "dashu-cmplx/rand"]
rand_v08 = ["dashu-int/rand_v08", "dashu-float/rand_v08", "dashu-ratio/rand_v08", "dashu-cmplx/rand_v08"]
rand_v09 = ["dashu-int/rand_v09", "dashu-float/rand_v09", "dashu-ratio/rand_v09", "dashu-cmplx/rand_v09"]
rand_v010 = ["dashu-int/rand_v010", "dashu-float/rand_v010", "dashu-ratio/rand_v010", "dashu-cmplx/rand_v010"]
num-traits = ["dashu-int/num-traits", "dashu-float/num-traits", "dashu-ratio/num-traits", "dashu-cmplx/num-traits"]
num-traits_v02 = ["dashu-int/num-traits_v02", "dashu-float/num-traits_v02", "dashu-ratio/num-traits_v02", "dashu-cmplx/num-traits_v02"]
num-complex = ["dashu-cmplx/num-complex"]

# this feature enables all related features related to decimal crates.
decimal-extras = ["dashu-float/postgres-types", "dashu-float/diesel"]
Expand All @@ -59,4 +61,5 @@ dashu-base = { version = "0.4.3", default-features = false, path = "./base" }
dashu-int = { version = "0.4.3", default-features = false, path = "./integer" }
dashu-float = { version = "0.4.5", default-features = false, path = "./float" }
dashu-ratio = { version = "0.4.3", default-features = false, path = "./rational", features = ['dashu-float'] }
dashu-cmplx = { version = "0.4.5", default-features = false, path = "./complex" }
dashu-macros = { version = "0.4.2", default-features = false, path = "./macros" }
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ A library set of arbitrary precision numbers (aka. big numbers) implemented in R
- [`dashu-int`](./integer): Arbitrary precision integers
- [`dashu-float`](./float): Arbitrary precision floating point numbers
- [`dashu-ratio`](./rational): Arbitrary precision rational numbers
- [`dashu-cmplx`](./complex): Arbitrary precision complex numbers
- [`dashu-macros`](./macros): Macros for creating big numbers

`dashu` is a meta crate that re-exports all the types from these sub-crates. Please see the README.md in each subdirectory for crate-specific introduction.
Expand Down
Loading
Loading