#collection #numeric #bounded #non-zero #hash

no-std strict-num

A collection of bounded numeric types

3 unstable releases

0.2.0 Dec 23, 2023
0.1.1 May 27, 2023
0.1.0 Jul 23, 2022

#421 in Math

Download history 312637/week @ 2025-12-15 212074/week @ 2025-12-22 209385/week @ 2025-12-29 369697/week @ 2026-01-05 418186/week @ 2026-01-12 440184/week @ 2026-01-19 518920/week @ 2026-01-26 605575/week @ 2026-02-02 664054/week @ 2026-02-09 525196/week @ 2026-02-16 522974/week @ 2026-02-23 580521/week @ 2026-03-02 635052/week @ 2026-03-09 567841/week @ 2026-03-16 583984/week @ 2026-03-23 572986/week @ 2026-03-30

2,407,586 downloads per month
Used in 1,330 crates (11 directly)

MIT license

32KB
771 lines

A collection of bounded numeric types.

Includes:

Unlike f32/f64, all float types implement Ord, PartialOrd and Hash, since it's guaranteed that they all are finite.


strict-num

Build Status Crates.io Documentation Rust 1.56+

A collection of bounded numeric types.

Includes:

  • FiniteF32
  • FiniteF64
  • NonZeroPositiveF32
  • NonZeroPositiveF64
  • PositiveF32
  • PositiveF64
  • NormalizedF32
  • NormalizedF64

Unlike f32/f64, all float types implement Ord, PartialOrd and Hash, since it's guaranteed that they all are finite.

License

MIT

Dependencies

~155KB