Common Functions

Many common elementary functions such as sqrt, exp, log, sin, cos, tan, asin, acos, and atan are built in the interpreter can be used in the expressions directly. For example, sqrt is the name of square root function. To find the square root of $ 6^2 + 8^2$
>> sqrt(6^2 + 8^2)
    10
The built-in name for exponential function $ e^x$ is exp. To evaluate $ e^{-0.5}$ we should write exp(-0.5) instead of e^(-0.5). Although e^(-0.5) would in theory give the same answer, it's computed differently and might be less accurate. log is the name of the natural logarithm function $ \ln x$.

oz 2009-12-22