The following are the mathematical functions you can use in COD scripts. In most cases, the syntax can be copied/pasted directly into a file and function properly. They should be edited for your particular use. This allows you to short cut your time by not having to experiment to figure out code syntax.

FunctionExampleReturn Value
acosacos(3, 4)41.4096221
asinasin(3, 4)48.5903779
atanatan(3, 4)36.8698976
coscos(45)0.7071068
expexp(2)10
loglog(100)2
numbernumber("5")
number("5.0")
number("5.5")
5
5
5.5
powpow(5, 2)
pow(2, 3)
25
8
roundround(5.49)
round(5.50)
5
6
rounddownrounddown(5.9)5
rounduproundup(5.1)6
signsign(-3.4)
sign(3.4)
sign(0.000001)
-1
1
0
sinsin(45)0.7071068
sqrtsqrt(4)2
sqrsqr(2)4
tantan(45)1