Engineering tools

Expression Parser

Mathematical expression evaluator for .NET. Evaluate formulas at runtime instead of hardcoding calculations.

440+ functions, 80+ units, 47 physical constants. Sub-millisecond evaluation for test systems, machine control, and simulations.

"sin(x) * exp(-t/tau) + offset" Expression Parser 0.7854231 Variables x, t, tau, offset Functions sin, exp, sqrt... 440+ Functions 80+ Units 47 Constants <1ms Evaluation
Why Expression Parser

Define and modify calculations at runtime

Hard-coded mathematical expressions force you to recompile every time a formula changes. Expression Parser lets you evaluate formulas at runtime. No rebuilds, no downtime, no code changes.

Test systems

Modify test calculations without recompiling. Dynamic formulas for automated test sequences.

Machine control

Runtime signal conditioning and control algorithms. Tune formulas without stopping production.

Simulations

Experiment with mathematical models on-the-fly. Change parameters and formulas during execution.

Function library

440+ functions for engineering and scientific applications

120+

Mathematical functions

Trigonometry, algebra, calculus, statistics, probability, Bessel functions, gamma functions, and more.

50+

Physics functions

Classical mechanics, thermodynamics, electromagnetism, quantum mechanics, optics.

35+

Electronics functions

Circuit analysis, power calculations, filter design, impedance, digital logic.

45+

Logic and boolean

Boolean algebra, bitwise operations, set theory, fuzzy logic, comparisons.

80+

Unit conversions

Length, mass, temperature, energy, pressure, frequency, and more unit systems.

47

Physical constants

Speed of light, Planck constant, gravitational constant, Avogadro number, and more.

Code examples

Simple integration with your .NET applications

Basic usage
using ULTRAMEGA.ExpressionParser;

var evaluator = new ExpressionEvaluator();

// Simple calculations
double result1 = evaluator.Evaluate("2 + 3 * 4");       // 14
double result2 = evaluator.Evaluate("sin(pi/4)");       // 0.7071
double result3 = evaluator.Evaluate("sqrt(25)");        // 5

// Using variables
evaluator.SetVariable("x", 5);
evaluator.SetVariable("y", 3);
double result4 = evaluator.Evaluate("x^2 + y^2");       // 34
Engineering calculation
// Beam deflection: δ = FL³/(48EI)
evaluator.SetVariable("F", 10000);      // Force (N)
evaluator.SetVariable("L", 6);          // Length (m)
evaluator.SetVariable("E", 200e9);      // Young's modulus (Pa)
evaluator.SetVariable("I", 8.33e-6);    // Second moment (m⁴)

string formula = "F * L^3 / (48 * E * I)";
double deflection = evaluator.Evaluate(formula);

// Change formula at runtime - no recompile needed
formula = "F * L^3 / (3 * E * I)";  // Cantilever beam
double newDeflection = evaluator.Evaluate(formula);
Physics with constants
// Orbital period using built-in constants
evaluator.SetVariable("M", 5.972e24);   // Earth mass (kg)
evaluator.SetVariable("r", 7000e3);     // Orbital radius (m)

// G (gravitational constant) is built-in
string period = "2 * pi * sqrt(r^3 / (G * M))";
double T = evaluator.Evaluate(period);

// Orbital velocity
double v = evaluator.Evaluate("sqrt(G * M / r)");
Technical specifications

Performance and compatibility

Performance

  • Evaluation: < 1ms
  • Memory: < 5MB
  • Thread-safe: Yes

Compatibility

  • .NET Framework 4.7.2+
  • .NET Core 3.1+
  • .NET 5, 6, 7, 8

Features

  • Detailed error messages
  • Expression validation
  • Custom function support

Get Expression Parser

Available as a .NET library. Download from our resources page or contact us for licensing information.