C++ asin()

Christine_Yang's avatar
Published Jun 18, 2021Updated Jul 20, 2023
Contribute to Docs

The asin() function returns the inverse sine of the argument in radians.

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • Learn C++ — a versatile programming language that’s important for developing software, games, databases, and more.
    • Beginner Friendly.
      11 hours

Syntax

asin(n)

Example 1

Use asin() to return the inverse sine of 0.0:

#include <iostream>
#include <cmath>
int main() {
double x = 0.0;
double result;
result = std::asin(x);
std::cout << result << " radians" << "\n";
// Output: 1.5708 radians
}

Codebyte Example

The following example is runnable and outputs the inverse sine of 0.32:

Code
Output

All contributors

Contribute to Docs

Learn C++ on Codecademy

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • Learn C++ — a versatile programming language that’s important for developing software, games, databases, and more.
    • Beginner Friendly.
      11 hours