In C++, asin() and atan() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions. All the functions available in this library take double as an argument and return double as the result.
asin() function is used to find the arc sine of a number means give a sin value to this function it will return the angle in radian corresponding to that value. In trigonometrics, arc sine is the inverse operation of sine.
Note: The argument passed to this function must be in the range of [-1, 1] and asin() function returns the values in the range of [-?/2, ?/2].
double asin(double k) Parameters: k is the value whose corresponding angle we have to find.
The arcsine of 0.5 is 0.523599 radians or 30 degrees
atan() function is used to find the arc tangent of a number means gives a tangent value to this function it will return the angle in radians corresponding to that value. arc tangent is the inverse operation of tangent. This function accepts all the real numbers and atan() function returns the values in the range of [-?/2, ?/2].
double atan(double k) Parameters: k is the value whose corresponding angle we have to find.
The arctangent of 1 is 0.785398 radians or 45 degrees
Rated as one of the most sought after skills in the industry, own the basics of coding with our C++ STL Course and master the very concepts by intense problem-solving.
- asin() function for complex number in C++
- valarray asin() function in C++
- atan() function for complex number in C++
- valarray atan() function in C++
- fill() and fill_n() functions in C++ STL
- Forward List in C++ | Set 1 (Introduction and Important Functions)
- strtok() and strtok_r() functions in C with examples
- strdup() and strndup() functions in C/C++
- Binary Search functions in C++ STL (binary_search, lower_bound and upper_bound)
- Ceil and Floor functions in C++
- Pure Virtual Functions and Abstract Classes in C++
- Wide char and library functions in C++
- Find and print duplicate words in std::vector<string> using STL functions
- Explicitly Defaulted and Deleted Functions in C++ 11
- beta(), betaf() and betal() functions in C++ STL
- std::legendre, std::legendref and std::legendrel functions in C++17
- Virtual Functions and Runtime Polymorphism in C++ | Set 1 (Introduction)
- isalpha() and isdigit() functions in C with cstring examples.
- Can static functions be virtual in C++?
- Virtual functions in derived classes
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : badger_666