use-series 0.0.5

Utility-first progression helpers for RustUse
Documentation

use-series

Install

[dependencies]
use-series = "0.0.1"

Foundation

use-series provides a deliberately small exact progression surface. The crate currently exposes zero-based arithmetic and geometric nth-term helpers plus checked partial sums over signed i128 values. Overflow remains explicit through SeriesError rather than relying on panics or silently widening into floating-point behavior.

Helper group Primary items Best fit
Arithmetic progressions arithmetic_nth_term, arithmetic_sum Linear sequences, step-based schedules, and exact partial sums
Geometric progressions geometric_nth_term, geometric_sum Exponential growth or decay with exact signed ratios

When to use directly

Choose use-series directly when sequence and series helpers are the only surface you need and you want to keep that concern narrower than the full facade crate.

Scenario Use use-series directly? Why
You only need arithmetic or geometric progression helpers Yes The crate stays smaller than the facade and keeps progression arithmetic explicit
You want exact signed partial sums without floating-point rounding Yes The current surface is checked and stays in i128
You also need combinatorics, geometry, or other math domains Usually no use-math can unify the concrete surfaces behind features

Scope

  • The current surface is intentionally small and concrete.
  • Progression helpers stay function-oriented instead of introducing wrapper types without extra invariants.
  • Catalan-family sequences and calculus-specific analysis helpers belong in adjacent focused crates.

Examples

Arithmetic progressions

use use_series::{arithmetic_nth_term, arithmetic_sum};

assert_eq!(arithmetic_nth_term(3, 2, 4)?, 11);
assert_eq!(arithmetic_sum(3, 2, 5)?, 35);

# Ok::<(), use_series::SeriesError>(())

Geometric progressions

use use_series::{geometric_nth_term, geometric_sum};

assert_eq!(geometric_nth_term(2, 3, 4)?, 162);
assert_eq!(geometric_sum(2, 3, 4)?, 80);

# Ok::<(), use_series::SeriesError>(())

Status

use-series is a concrete pre-1.0 crate in the RustUse docs surface. The API remains intentionally small while broader sequence and analysis crates continue to grow around it.