Common Constants

The mathematical constants $ e$, $ \pi$ and imaginary unit $ i$ are represented by e, pi, and i respectively, and can be used directly. For example:
>> cos(pi)
    -1
>> sin( pi)
   1.224606354e-16
Note that the exact answer to $ \sin(\pi)$ is 0 and what we are given here is only an approximate answer since $ \pi$ is just an approximate representation of $ \pi$, and the $ \sin$ function uses numerical method.

oz 2009-12-22