Goto main content

asin

This function computes the inverse sin function of a number.

ASIN

NAME

asin - This function computes the inverse sin function of a number.

SYNOPSIS

asin(number)

DESCRIPTION

This mathematical function allows the user to compute the arc sine of x. Its answer is the angle whose sine 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.

PARAMETERS

number
Specify the number (float) used as argument for the asin function.

RETURN

The asin value of the argument.

EXAMPLES

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
asin(1.);"\n";
b=rad2deg(asin(1.));
b;
}}.),
q(res=PI/2.));

B would give the answer in degrees. Here, b is 90.

With radians:

test(q(res={_{asin(-1);}}.),q(res=-1.5708.));

With an answer given in integers:

test(q(res={_{asin(.85090);}}.),q(res=45.));

Note that we used the answer to sin(45), which is presented in the sin
section. However, one can notice that the argument (the expected value of the
sin function) could be different. Sin(45) gives the same answer as sin(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;
asin(b);
}}.),
q(res=0.));


With an array:

test(q(res={_{asin(1,0,-1);}}.),q(res=\[1.5708,0,-1.5708\].));

SEE ALSO

{{ include("includes/maths.sn") }}

AUTHOR

Written by Caroline Laplante, <claplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.