atan - This function computes the inverse tan function of a number.
atan(argument)
This mathematical function allows the user to compute the arc tan of x. Its answer is the angle whose tan is x, the argument of the function. The answer is given in agreement with the first answers of the trigonometric circle. The function gives an answer in radians. See the examples section for explanation on how to change the answer from radians to degrees.
Note: In the followings examples, the _ between the { should be removed to make it work.
One can use this function and find an answer in degrees (using a function called rad2deg): test(q(res={_{ function rad2deg(value) return value * 57.3; endf atan(1.);"\n"; b=rad2deg(atan(1.)); b; }}.), q(res=.785398)); B would give the answer in degrees. Here, b is 45. With radians: test(q(res={_{atan(1);}}.),q(res=PI/4.)); With an answer given in integers: test(q(res={{atan(1.619775);}}.),q(res=45.)); Note that we used the answer to tan(45), which is presented in the tan section. However, one can notice that the argument (the expected value of the tan function) could be different. Tan(45) gives the same answer as tan(1.0177) because it is simply the same value, plus a number of tours around the trigonometric circle. With other variables: test(q(res={_{ %include "/includes/extenso.sn"; b=0; atan(b); }}.), q(res=0.)); With arrays: test(q(res={_{atan(1,0,-1);}}.),q(res=\[.785398,0,-.785398\].));
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