在线文档教程
C++
数字 | Numerics

std::asin(std::complex)

STD::Asin%28 std::Complex%29

Defined in header
template< class T > complex<T> asin( const complex<T>& z (since C++11)

计算复值的复弧正弦z.分支切割存在于间隔之外。-1;+1沿着真正的轴线。

参数

z-complex value

返回值

如果没有错误发生,则复弧正弦z返回,在沿假想轴和间隔无界的条带范围内返回。-π/2;+π/2沿着真正的轴线。

处理错误和特殊情况时,就好像操作是由-i *std::asinh(i*z),在哪里i是想象中的单位。

注记

逆正弦%28或弧正弦%29是一个多值函数,需要在复平面上进行分支切割。分支切割按惯例放置在实际轴的线段%28-∞,-1%29和%281,∞%29处。

弧正弦主值的数学定义为:Asin z=-i_ln%28_i_z+seari_z2

%29对于任何z,asin%28 z%29=acos%28-z%29-

π

*。

二次

#include <iostream> #include <cmath> #include <complex> int main() { std::cout << std::fixed; std::complex<double> z1(-2, 0 std::cout << "acos" << z1 << " = " << std::acos(z1) << '\n'; std::complex<double> z2(-2, -0.0 std::cout << "acos" << z2 << " (the other side of the cut) = " << std::acos(z2) << '\n'; // for any z, acos(z) = pi - acos(-z) const double pi = std::acos(-1 std::complex<double> z3 = pi - std::acos(z2 std::cout << "cos(pi - acos" << z2 << ") = " << std::cos(z3) << '\n'; }

二次

产出:

二次

asin(-2.000000,0.000000) = (-1.570796,1.316958) asin(-2.000000,-0.000000) (the other side of the cut) = (-1.570796,-1.316958) sin(acos(-2.000000,-0.000000) - pi/2) = (-2.000000,-0.000000)

二次

另见

acos(std::complex) (C++11)computes arc cosine of a complex number (arccos(z)) (function template)
atan(std::complex) (C++11)computes arc tangent of a complex number (arctan(z)) (function template)
sin(std::complex)computes sine of a complex number (sin(z)) (function template)
asincomputes arc sine (arcsin(x)) (function)
asin(std::valarray)applies the function std::asin to each element of valarray (function template)

C为Casin编写的文件

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/数值/复合/asin