EML (exp-ln) universal function approximation.
This crate provides the EML operator and learning machinery for O(1) learned functions from data. Based on Odrzywolel 2026, "All elementary functions from a single operator".
Core Idea
The EML operator eml(x, y) = exp(x) - ln(y) is the continuous-
mathematics analog of the NAND gate: combined with the constant 1,
it can reconstruct all elementary functions.
Components
- [
eml] / [eml_safe] / [softmax3] — primitive operators - [
EmlTree] — depth-configurable evaluation tree - [
EmlModel] — multi-head model with training - [
FeatureVector] — trait for types that produce&[f64]inputs
Example
use EmlModel;
// Create a depth-4 model with 3 inputs and 1 output head
let mut model = new;
// Record training data (y = x0 + x1 + x2)
for i in 0..100
// Train
let _converged = model.train;
// Predict
let prediction = model.predict_primary;
assert!;