# C++ <complex> - asin() Function

The C++ <complex> asin() function returns the complex arc sine of a complex number z. It is a function on complex plane, and has two branch cuts:

• Extends right from 1 along the real axis to ∞, continuous from below.
• Extends left from -1 along the real axis to -∞, continuous from above.

Mathematically, it can be expressed as: For any z, asin(z) = acos(-z) - 𝜋/2

### Syntax

```template<class T> complex<T> asin (const complex<T>& z);
```

### Parameters

 `z` Specify the complex number.

### Return Value

Returns the complex arc sine of z.

### Example:

The example below shows the usage of <complex> asin() function.

```#include <iostream>
#include <complex>
using namespace std;

int main (){
complex<double> z1 (2, 2);
complex<double> z2 (2, 0);
complex<double> z3 (0, 2);

//calculate the complex arc sine
cout<<"asin(z1): "<<asin(z1)<<"\n";
cout<<"asin(z2): "<<asin(z2)<<"\n";
cout<<"asin(z3): "<<asin(z3)<<"\n";

return 0;
}
```

The output of the above code will be:

```asin(z1): (0.754249,1.73432)
asin(z2): (1.5708,1.31696)
asin(z3): (0,1.44364)
```

❮ C++ <complex> Library

5
{"ft_lang_label":"__label__en","ft_lang_prob":0.5306825,"math_prob":0.9935655,"size":1074,"snap":"2021-43-2021-49","text_gpt3_token_len":335,"char_repetition_ratio":0.16168225,"word_repetition_ratio":0.025157232,"special_character_ratio":0.3566108,"punctuation_ratio":0.18222222,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9982758,"pos_list":[0,1,2],"im_url_duplicate_count":[null,5,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-21T22:07:50Z\",\"WARC-Record-ID\":\"<urn:uuid:3de66926-f8b8-40a4-bd79-8867e10fe6a6>\",\"Content-Length\":\"23668\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:35503aed-4a08-4df8-8cfd-06e9123b02b8>\",\"WARC-Concurrent-To\":\"<urn:uuid:cb8e8893-7972-4e47-90d2-f5e4e5221f37>\",\"WARC-IP-Address\":\"35.192.78.222\",\"WARC-Target-URI\":\"https://www.alphacodingskills.com/cpp/notes/cpp-complex-asin.php\",\"WARC-Payload-Digest\":\"sha1:A7JGELZTCB5HJSFJMSNYXIAGLYZ7ZCX2\",\"WARC-Block-Digest\":\"sha1:AV63CADFXEJYUZAMDTM274S5UQSLQ5FN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585441.99_warc_CC-MAIN-20211021195527-20211021225527-00315.warc.gz\"}"}