Math interpreter

A math interpreter written in Zig, it includes:

  • Basic math operations (add, subtract, multiply, divide),
  • Basic functions (sin, cos, tan)
  • Variable definition
  • Function definition

Example

>> 5 + 3 * 2
11
>> square(x) = x * x
>> square(6)
36
>> ans + 2
38
>> cos(PI)
-1
>> cos(2 * PI)
1

Additional features

  • Builtin constant (PI)
  • exit or stop to exit the application.