cbrt - This function computes the cube root of a number.
cbrt(argument)
This mathematical function computes the cube root of a number in the real plane. It returns a number y whose cube is x, meaning that y multiplied by itself 2 times equals x (y*y*y=x). X and y can both be positive or negative.
Note: In the followings examples, the _ between the { should be removed to make it work.
One can use this function with a variable : test(q(res={_{ %include "/includes/extenso.sn"; a=27; cbrt(a); }}.), q(res=3.)); With a trigonometric function: test(q(res={_{ %include "/includes/extenso.sn"; a=cos(PI); cbrt(a); }}.), q(res=-1.)); With floats: test(q(res={_{cbrt(0.99);}}.),q(res=.996655.)); With big integers: test(q(res={{cbrt(45);}}.),q(res=3.55689.)); With negative numbers: test(q(res={_{cbrt(-8);}}.),q(res=-2.)); With an array: test(q(res={_{cbrt(256,0,27);}}.),q(res=\[6.3496,0,3\].));
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