Constants: e and pi corresponding to 2.718281... and 3.141592....
Arithmetic operators: + - * / ^ and % (modulo operator)
Note: multiplication symbol must be included:
5ex(3x^2+4) ❌
5*e*x*(3*x^2+4) ✅
sin(x), cos(x), tan(x)
log(x), ln(x)
max(x,y), min(x,y)
If NaN is outputted as a result, that means that one of the points is undefined (0/0, infinity/infinity, etc...).
To fix this issue, try to change the intervals and then subtract the difference.
If we try to evaluate the integral of sin(x)/x from -100 to 100 in 20 intervals, we get NaN, because sin(0)/0 is undefined.
Instead, calculate it from -101 to 100. and then subtract the excess from -101 to -100. This is not a perfect solution, but it's the best I can think of