Skip to main content

Crate oxieml

Crate oxieml 

Source
Expand description

OxiEML — All elementary functions from a single binary operator.

This crate implements the EML operator eml(x, y) = exp(x) - ln(y) and builds uniform binary trees that represent all elementary functions using only this operator and the constant 1.

Based on the paper: “All elementary functions from a single binary operator” (arXiv:2603.21852).

§Capabilities

  1. Symbolic Regression: Discover closed-form formulas from data via gradient-based search over EML tree topologies.
  2. Uniform Tree Representation: Express any elementary function using the grammar S → 1 | eml(S, S).

§Example

use oxieml::{EmlTree, Canonical, EvalCtx};

// Build exp(x) = eml(x, 1)
let x = EmlTree::var(0);
let exp_x = Canonical::exp(&x);

// Evaluate at x = 1.0
let ctx = EvalCtx::new(&[1.0]);
let result = exp_x.eval_real(&ctx).unwrap();
assert!((result - std::f64::consts::E).abs() < 1e-10);

Re-exports§

pub use canonical::Canonical;
pub use error::EmlError;
pub use eval::EvalCtx;
pub use lower::LoweredOp;
pub use lower_interval::IntervalLO;
pub use named_const::NamedConst;
pub use parser::ParseError;
pub use parser::parse;
pub use solve::SolveResult;
pub use symreg::SymRegLoss;
pub use symreg::DiscoveredFormula;
pub use symreg::MultiOutputStrategy;
pub use symreg::SymRegConfig;
pub use symreg::SymRegEngine;
pub use symreg::SymRegStrategy;
pub use symreg::pareto_front;
pub use tree::EmlNode;
pub use tree::EmlTree;
pub use units::UnitError;
pub use units::Units;

Modules§

canonical
Canonical EML tree constructions for elementary functions.
compile
Compile EML trees to Rust source code.
error
Error types for the OxiEML crate.
eval
Numerical evaluation of EML trees.
grad
Automatic differentiation for EML trees.
lower
Lowering EML trees to standard mathematical operations.
lower_grad
Symbolic differentiation for the lowered IR.
lower_interval
Interval arithmetic for over-approximate evaluation of LoweredOp trees.
lower_simplify
Algebraic simplification for the lowered IR.
lower_units
Dimensional analysis extension for LoweredOp.
named_const
Named mathematical constants for the LoweredOp IR.
parser
Parser for EML expression notation.
simplify
EML tree simplification and normalization.
solve
Symbolic equation solving for LoweredOp expression trees.
symreg
Symbolic regression engine.
tree
EML tree data structures.
units
Dimensional analysis for unit-aware symbolic regression.