Skip to main content

sim_lib_numbers_core/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3
4//! Shared substrate for scalar number domains: the number-value shape and
5//! browse table ([`value_shape`]), the shared number-literal shape and class
6//! ([`literal`]), and the scalar-domain spec, literal matcher, and op-loop
7//! installer ([`scalar`]). The canonical number-domain symbol registry and
8//! promotion-lattice documentation live in [`domains`].
9
10pub mod domains;
11pub mod limits;
12pub mod literal;
13pub mod magnitude;
14pub mod real_scalar;
15pub mod scalar;
16pub mod value_shape;
17
18pub use limits::{MachineLimits, machine_limits};
19pub use literal::{
20    NumberLiteralClass, NumberLiteralShape, class_surface_or_symbol, shape_surface_or_symbol,
21};
22pub use magnitude::{
23    DEFAULT_MAX_ARBITRARY_MAGNITUDE_BITS, MagnitudeLimit, decimal_digits_to_bits_ceil,
24};
25pub use real_scalar::RealScalar;
26pub use scalar::{
27    DomainLiteralMatcher, ScalarBinaryOp, ScalarDomainSpec, ScalarLiteralMatcher, ScalarOps,
28    ScalarReductionOp, ScalarUnaryOp, install_scalar_ops, number_domain_class_stub,
29};
30pub use value_shape::{
31    DomainNumberValueShape, NumberDomainTableSpec, assert_value_shape_symbol, number_domain_table,
32    value_shape_symbol,
33};
34
35/// Cookbook recipes for this lib, embedded at build time.
36pub static RECIPES: sim_cookbook::EmbeddedDir =
37    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
38
39#[cfg(test)]
40mod tests;