What is the Asin function in C.


asin is defined in that which is included in C via, or in C ++ via.


asin () calculates the arc sine of the transferred parameter. The arc sine is the inverse function of the sine.


#include doubleasin (double x); floatasin (float x); // only C ++ longdoubleasin (longdouble x); // only C ++ float asinf (float x); longdouble asinl (longdouble x);

x: Value whose angle is to be determined, valid between -1 and +1.

Return value: Angle in the range from -π / 2 to + π / 2 (circle number Pi)

Sources of error

One popular source of error is to overlook the fact that the computer calculates angles in radians, i.e. from 0 to π (circle number Pi). Angles from 0 to 180 degrees must be converted


#include // for EXIT_SUCCESS # include // for asin # include // for printf () #define PI 3.141592654 int main (void) {double value, degree; double length = 0.5; value = asin (length); degree = value * 180 / PI; printf ("asin (% f) are% f and% f degrees \ n", length, value, degree); returnEXIT_SUCCESS;}


asin (0.500000) are 0.523599 or 30.000000 degrees


In C ++ this function is overloaded with a ValueArray template.

see also

math: acos (), atan (), sin (), cos (), atan ()
ValArray: asin (), acos (), atan (), sin (), cos (), tan ()

Trigometry: angular dimensions