Skip to main content

boehm_reals/
lib.rs

1//! Boehm-style arbitrary-precision real arithmetic.
2//!
3//! This crate implements exact real arithmetic using two complementory
4//! representations:
5//!
6//! - Bounded Rational
7//! - Constructive reals
8
9#![forbid(unsafe_code)]
10#![deny(missing_docs)]
11#![cfg_attr(
12    test,
13    allow(
14        clippy::unwrap_used,
15        clippy::expect_used,
16        clippy::panic,
17        clippy::indexing_slicing,
18        clippy::cast_possible_truncation,
19        clippy::cast_possible_wrap,
20        clippy::cast_sign_loss,
21    )
22)]
23#![cfg_attr(docsrs, feature(doc_cfg))]
24
25/// Provides evaluation utilities for computing with real numbers
26/// using the Boehm representation.
27pub mod evaluation;
28
29#[cfg(target_pointer_width = "32")]
30type UsizePromotion = u32;
31#[cfg(target_pointer_width = "64")]
32type UsizePromotion = u64;
33
34#[cfg(target_pointer_width = "32")]
35type IsizePromotion = i32;
36#[cfg(target_pointer_width = "64")]
37type IsizePromotion = i64;