acosh - This function computes the inverse hyperbolic cos of a number.
acosh(argument)
This mathematical function allows the user to compute the inverse hyperbolic cos of an argument defined between -infinity to infinity, starting at plus or minus 1. This is not a periodic function. It gives the hyperbolic angle to the value of the hyperbolic function which is written as argument of the acosh.In other words, the answer is the value whose hyperbolic cos is the argument. It returns a value only in the 1st or 2nd quadrant of the xy plane, meaning that if x<0, y>0, and if x>0, y>0.
Note: In the followings examples, the _ between the { should be removed to make it work.
One can use this function with positive integers: test(q(res={_{acosh(1.54308);}}.),q(res=1.)); With negative integers: test(q(res={_{acosh(-1.54308);}}.),q(res=NAN.)); Note that cosh(x)=cosh(-x). Since the only possible "y"s are positive numbers, defined in the 1st and 2nd quadrant for the cosh function, there is no possible hyperbolic angle for a negative y. NAN means not a number. In fact, the correct answer is 1+PI*i where i is the imaginary number. With big integers: test(q(res={_{acosh(45);}}.),q(res=4.49969.)); With other variables: test(q(res={_{ %include "/includes/extenso.sn"; a=PI; acosh(a); }}.), q(res=1.81153.)); With another trigonometric function: test(q(res={_{ %include "/includes/extenso.sn"; a=cos(0); acosh(a); }}.), q(res=0.)); With an array: test(q(res={_{acosh(1,0,3.14159);}}.),q(res=\[0,NAN,1.81153\].));
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