acosl(): This function is in the library math.h. This function takes one parameter.
It takes an argument (parameter) whose inverse cosine value to be fined. It takes an argument
in the range [-1,1]. This function returns the inverse cosine value in the range [0, π].
If the value is not in the range [-1,1] then it returns nan.
Returned Value for different range parameters.
1. x<-1: It returns nan.
2. x=[-1,1]: It returns the value in the range [0, π].
3. x>1: It returns nan.
Parameters:
__X: The value whose inverse cosine value is to be fined.
Syntax:
acosl(__X)
For Example:
1. __X = 0.5
acosl(__X) = > It returns 1.0472
2. __X = 1.5
acosl(__X) => It returns nan
Approach
C++
#include <bits/stdc++.h>using namespace std;int main(){long double x = 0.5;cout << acosl(x) << "\n";return 0;}
No comments:
Post a Comment