deep_causality_num_dual/lib.rs
1/*
2 * SPDX-License-Identifier: MIT
3 * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
4 */
5
6#![cfg_attr(not(feature = "std"), no_std)]
7extern crate core;
8
9// Private re-exports so the moved `dual` module keeps resolving these through
10// `crate::` paths.
11use deep_causality_algebra::{Annihilating, Associative, Commutative, Distributive, Real};
12use deep_causality_num::{FromPrimitive, One, Zero};
13
14mod dual;
15mod extensions;
16
17// Dual number type (forward-mode automatic differentiation; the differentiating *number*).
18// The differentiation/integration *operators* live in `deep_causality_calculus`.
19pub use crate::dual::dual_number::Dual;
20
21// HKT witness for `Dual` (Functor, Foldable, and the lax monoidal stack). `CoMonad` is
22// deliberately deferred; see the module docs.
23pub use crate::extensions::DualWitness;