C++ 中複數的 asin() 函式?


本文件將介紹複數的 asin() 方法。複數可以使用 complex 標頭檔案。該標頭檔案中還包含 asin() 函式。這是 normal asin() 函式的複雜版本。該函式用於找到複數的複雜反正弦值。

此函式以複數作為輸入引數,並返回反正弦值作為輸出。下面提供一個示例供參考。

示例

 線上示例

#include<iostream>
#include<complex>
using namespace std;
int main() {
   complex<double> c1(5, 2);
   //asin() function for complex number
   cout << "The asin() of " << c1<< " is "<< asin(c1);
}

輸出

The asin() of (5,2) is (1.18423,2.37055)

更新於: 2019 年 7 月 30 日

114 次瀏覽

開啟你的 職業生涯

透過完成課程獲得認證

開始
廣告
© . All rights reserved.