Registry / utility / astro-float

astro-float

JSON →
library0.9.5rscratesunverified

Multiple precision floating-point numbers library.

# Cargo.toml [dependencies] astro-float = "0.9.5"
INSTALL
IMPORT
SIG · ASTRO-FLOAT
A
astro-float
utilityrustv0.9.5
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.

BigFloat
use astro_float::BigFloat;

Create two BigFloat numbers and add them with rounding.

use astro_float::BigFloat; use astro_float::Round; use astro_float::Radix; fn main() { let a = BigFloat::from_f64(1.0, 53); let b = BigFloat::from_f64(2.0, 53); let c = a.add(&b, Round::ToEven); println!("{}", c.to_string(Radix::Dec, 10)); }
Debug
Known issues
gotchaRequires explicit rounding mode for arithmetic operations
fix
Always specify Round::ToEven or other rounding mode
affects: >=0.9.0
Upgrade
Version history
0.9.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
2
Meta
1
Resources
astro-float — cargo add astro-float · libregistry