1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! Arbitrary-precision floating-point arithmetic for the OxiNum ecosystem.
//!
//! Provides wrappers over `dashu-float`'s `FBig`/`DBig` with convenience
//! functions for elementary math: `exp`, `ln`, `sqrt`, `pow`, trigonometric
//! functions (`sin`, `cos`, `tan`, `atan`, `atan2`), hyperbolic functions
//! (`sinh`, `cosh`, `tanh`), and high-precision constants (`pi`, `e`, `ln2`).
//!
//! Precision-control helpers ([`precision::with_precision`],
//! [`precision::epsilon`], [`precision::ulp`]) wrap the underlying
//! `dashu-float` precision primitives in an ergonomic free-function API.
//!
//! ## Why `Hash` is not implemented
//!
//! `DBig` (`FBig<HalfAway, 10>`) intentionally does **not** implement
//! [`core::hash::Hash`]. In IEEE 754 (and by extension in essentially
//! every numeric library that takes the standard seriously) floating
//! point values defy the `Hash` contract: distinct representations can
//! compare equal (e.g. `1.0` and `1.00` at different precisions, or
//! signed zeros `+0` and `-0`), special values like `NaN` are not
//! equal to themselves, and the canonical form needed to make hashing
//! well-defined varies by use case (totalOrder vs. mathematical
//! equality vs. bitwise identity). Rust's standard library follows
//! the same convention: `f32` and `f64` deliberately do not implement
//! `Hash`. Callers who need a hash key should either use a
//! canonicalised representation (e.g. a tuple of `(significand,
//! exponent, precision)`) or wrap `DBig` in a newtype with an
//! explicit, documented hashing policy.
//!
//! ## Features
//!
//! * `serde` *(off by default)* — enables `serde::Serialize` /
//! `Deserialize` for `DBig` via `dashu-float`'s own `serde` feature.
pub use ;
pub use ;
/// Rounding modes re-exported from `dashu-float` so callers do not need a
/// direct dependency on `dashu-float` for basic rounding-mode selection.
/// Type alias for decimal big-float.
pub type BigFloat = DBig;
// Sub-modules
/// Native binary-base arbitrary-precision floating-point implementation.
///
/// This module is additive: the crate-root [`BigFloat`] alias remains
/// `dashu_float::DBig` (decimal). Reach for [`native::BigFloat`] when you
/// want ground-up Pure Rust binary float arithmetic with explicit
/// rounding-mode control. The native type is intentionally **not**
/// re-exported at the crate root to avoid clashing with the `DBig` alias.
pub use ;
pub use ;
pub use ;