A math engine written in C# using RegEx.
Because why not?
RegexMath.Evaluate("5+(-5(0.431e4*(5)(4)))*3.430e2(.509194e-5)-40.05245");
// -787.80921602
Regexmath.Evaluate("sqrt(5)+5^2PI+H_3/log(e, 3)");
// 82.444656232727
var input = "broken";
RegexMath.TryEvaluate(input, our var result);
// False
^
, **
, *
, /
, %
, +
, and -
PI
and E
sqrt(x)
cbrt(x)
root(x, y)
log_x(y)
orlog(x, y)
min(x, y)
ormax(x, y)
and a lot more...
- Modulo
- Remainder
- Bitshift
- Factorial on non-natural numbers
- Euler Beta functions
- Error functions
- Sigmoid: Logistic functions
- Gamma functions
- Harmonic numbers
- Trigonometry
- Summation in the form of
Σ/sum/sigma[i=1, 6][3i + 4]
- Product in the form of
Π/prod/product[i=1, 3][3i + 4]
- Variable substitution
- Differential equations
- Numerical stability
- Conversion between radian, degree, and grad
Some of the functions can be found in Math.Net or Typing Math as text