#include <math.h> double asin(double x);
asin
computes the trigonometric arc sine of the value x
. The
arc sine function is the inverse of the sine function and is expressed by the
following relation:
r = arcsin (x)
x
is in the closed interval [ - 1.0,1.0].
asin
returns the principal value of the arc sine of the argument
x
, provided that this value is defined and computable. The return
value is a double precision floating-point number in the closed interval
[-pi/2, pi/2] radians.
asin
returns 0.0 if the value of its argument is larger than 1.0 or
smaller than - 1.0. The run-time library writes an error message to the
standard error file (stderr
) in this case.
If an error occurs in asin
, the _matherr
routine is called.
You can supply your own version of _matherr
to suppress the diagnostic
message or modify the value returned.
#include <math.h> #include <stdio.h> main() { double pival, value; value = .500; pival = 4 * asin(sqrt(value)); printf("4 * asin(sqrt(%f)) = %fn",value,pival); }
acos
, atan
, _matherr
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.