pow - This function computes the value of a var chosen by the user, multiplied by itself x times.
pow(variable,exposant)
This mathematical function allows the user to compute the value of y multiplied by itself x times where x and y are variables chosen by the user. X and y have to be real numbers. If x is a negative number, then yˆx=1/(yˆx) where is x is simply the modulo of its latter value.
One can use this function with integers: test(q(res=<{pow(3,2);}>.),q(res=9.)); With floats: test(q(res=<{pow(3,2.5);}>.),q(res=15.5885.)); One can use this function with another variable: test(q(res=<{ %include "/includes/extenso.sn"; a=3; pow(a,a); }>.), q(res=27.)); With a trigonometric function: test(q(res=<{ %include "/includes/extenso.sn"; a=cos(0); pow(a,4); }>.), q(res=4.)); With negative numbers: test(q(res=<{pow(2,-2);}>.),q(res=.25.)); One can also consider the limits: test(q(res=<{pow(-E,NF);}>.),q(res=1.)); With an array, it simply considers its number of elements: test(q(res=<{pow([1,2],2);}>.),q(res=4.));
Written by Caroline Laplante, <claplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com