Registry / utility / sp-arithmetic

sp-arithmetic

JSON →
library28.0.1rscratesunverified

Minimal fixed point arithmetic primitives and types for runtime.

# Cargo.toml [dependencies] sp-arithmetic = "28.0.1"
INSTALL
IMPORT
SIG · SP-ARITHMETIC
S
sp-arithmetic
utilityrustv28.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FixedPointNumber
✓ use sp_arithmetic::FixedPointNumber;

Demonstrates fixed-point arithmetic using FixedI64.

use sp_arithmetic::FixedPointNumber; fn main() { let a = sp_arithmetic::FixedI64::from(10); let b = sp_arithmetic::FixedI64::from(3); let c = a.checked_mul(&b).unwrap(); println!("{:?}", c); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
28.0.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
sp-arithmetic — cargo add sp-arithmetic · libregistry