std::asinh(std::complex)(3)
๐
std::asinh(std::complex) ๐
okay so welcome to the C++ Standard Libary manual, section 3, bestie. This is the page for std::asinh(std::complex)(3) โ the complex-number arc-hyperbolic-sine situation โ and we're gonna read it together like a group chat. no cap. โจ
๐ NAME ๐
std::asinh(std::complex) - std::asinh(std::complex). That's the name, literally the same thing twice; it's giving "yes, the complex version, keep up." ๐ซถ
โจ Synopsis โจ
Defined in header <complex>
template< class T > (since C++11)
complex<T> asinh( const complex<T>& z );
It computes the complex arc hyperbolic sine of a complex value z, with branch cuts outside the interval [โi; +i] along the imaginary axis. ๐
๐ง Parameters ๐ง
zโ complex value. That's the whole parameter list, bestie. iconic minimalism. ๐
๐ธ Return value ๐ธ
If no errors occur, the complex arc hyperbolic sine of z is returned, in the range of a strip mathematically unbounded along the real axis and in the interval [โiฯ/2; +iฯ/2] along the imaginary axis. ๐ฆ
๐จ Error handling and special values ๐จ
Errors are reported consistent with math_errhandling.
If the implementation supports IEEE floating-point arithmetic, then:
std::asinh(std::conj(z)) == std::conj(std::asinh(z))std::asinh(-z) == -std::asinh(z)- If
zis(+0,+0), the result is(+0,+0) - If
zis(x,+โ)(for any positive finitex), the result is(+โ,ฯ/2) - If
zis(x,NaN)(for any finitex), the result is(NaN,NaN)andFE_INVALIDmay be raised - If
zis(+โ,y)(for any positive finitey), the result is(+โ,+0) - If
zis(+โ,+โ), the result is(+โ,ฯ/4) - If
zis(+โ,NaN), the result is(+โ,NaN) - If
zis(NaN,+0), the result is(NaN,+0) - If
zis(NaN,y)(for any finite nonzeroy), the result is(NaN,NaN)andFE_INVALIDmay be raised - If
zis(NaN,+โ), the result is(ยฑโ,NaN)(the sign of the real part is unspecified) - If
zis(NaN,NaN), the result is(NaN,NaN)
๐ฆ Notes ๐ฆ
Although the C++ standard names this function "complex arc hyperbolic sine", the inverse functions of the hyperbolic functions are the area functions. Their argument is the area of a hyperbolic sector, not an arc. The correct name is "complex inverse hyperbolic sine", and, less common, "complex area hyperbolic sine". ๐
Inverse hyperbolic sine is a multivalued function and requires a branch cut on the complex plane. The branch cut is conventionally placed at the line segments (-iโ,-i) and (i,iโ) of the imaginary axis. ๐
The mathematical definition of the principal value of the inverse hyperbolic sine is:
asinh z = ln(z +
โ
1+z2
).
For any z, asinh(z) = asin(iz) / i. ๐งฎ
๐ Example ๐
// Run this code
#include <complex>
#include <iostream>
int main()
{
std::cout << std::fixed;
std::complex<double> z1(0.0, -2.0);
std::cout << "asinh" << z1 << " = " << std::asinh(z1) << '\n';
std::complex<double> z2(-0.0, -2);
std::cout << "asinh" << z2 << " (the other side of the cut) = "
<< std::asinh(z2) << '\n';
// for any z, asinh(z) = asin(iz) / i
std::complex<double> z3(1.0, 2.0);
std::complex<double> i(0.0, 1.0);
std::cout << "asinh" << z3 << " = " << std::asinh(z3) << '\n'
<< "asin" << z3 * i << " / i = " << std::asin(z3 * i) / i
<< '\n';
}
๐ Output ๐
asinh(0.000000,-2.000000) = (1.316958,-1.570796)
asinh(-0.000000,-2.000000) (the other side of the cut) =
(-1.316958,-1.570796)
asinh(1.000000,2.000000) = (1.469352,1.063440)
asin(-2.000000,1.000000) / i = (1.469352,1.063440)
๐ See also ๐
acosh(std::complex)โ computes area hyperbolic cosine of a complex number(C++11)(\({\small\operatorname{arcosh}{z}}\)arcosh(z)) (function template)atanh(std::complex)โ computes area hyperbolic tangent of a complex number(C++11)(\({\small\operatorname{artanh}{z}}\)artanh(z)) (function template)sinh(std::complex)โ computes hyperbolic sine of a complex number(C++11)(\({\small\sinh{z}}\)sinh(z)) (function template)asinhโ computes the inverse hyperbolic sine(C++11)(\({\small\operatorname{arsinh}{x}}\)arsinh(x)) (function)asinhfโ computes the inverse hyperbolic sine(C++11)(\({\small\operatorname{arsinh}{x}}\)arsinh(x)) (function)asinhlโ computes the inverse hyperbolic sine(C++11)(\({\small\operatorname{arsinh}{x}}\)arsinh(x)) (function)- C documentation for
casinh
okay that's the whole page, bestie. sourced from http://cppreference.com, version/date 2024.06.10, and yes it's the std::asinh(std::complex)(3) page from the C++ Standard Libary manual. mwah ๐โจ
๐ฆ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms