Safe Math Formula Evaluator

Enter a math formula using the following operators and functions:

Operators: +, -, *, /, **, %, <, <=, ==, !=, >=, >, &, |, ~

Functions: sin, cos, tan, arcsin, arccos, arctan, arctan2, sinh, cosh, tanh, arcsinh, arccosh, arctanh, log, log10, log1p, exp, expm1, sqrt, abs, where, complex, real, imag, conj

Examples:

  • exp(2) + sqrt(9)
  • log(10) / 2
  • where(5 > 2, 10, 0)
  • sin(3.14/2) * 2