Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      casinf, casin, casinl

      From cppreference.com
      <c‎ |numeric‎ |complex
       
       
       
      Complex number arithmetic
      Types and the imaginary constant
      (C99)
      (C99)    
      (C11)
      (C99)
      Manipulation
      (C99)
      (C99)
      (C99)
      (C99)
      (C99)
      (C99)
      Power and exponential functions
      (C99)
      (C99)
      (C99)
      (C99)
      Trigonometric functions
      (C99)
      (C99)
      (C99)
      (C99)
      casin
      (C99)
      (C99)
      Hyperbolic functions
      (C99)
      (C99)
      (C99)
      (C99)
      (C99)
      (C99)
       
      Defined in header<complex.h>
      floatcomplex       casinf(floatcomplex z);
      (1)(since C99)
      doublecomplex      casin(doublecomplex z);
      (2)(since C99)
      longdoublecomplex casinl(longdoublecomplex z);
      (3)(since C99)
      Defined in header<tgmath.h>
      #define asin( z )
      (4)(since C99)
      1-3) Computes the complex arc sine ofz with branch cuts outside the interval[−1,+1] along the real axis.
      4) Type-generic macro: Ifz has typelongdoublecomplex,casinl is called. ifz has typedoublecomplex,casin is called, ifz has typefloatcomplex,casinf is called. Ifz is real or integer, then the macro invokes the corresponding real function (asinf,asin,asinl). Ifz is imaginary, then the macro invokes the corresponding real version of the functionasinh, implementing the formula\(\small \arcsin({\rm i}y) = {\rm i}{\rm arsinh}(y)\)arcsin(iy) = i arsinh(y), and the return type of the macro is imaginary.

      Contents

      [edit]Parameters

      z - complex argument

      [edit]Return value

      If no errors occur, complex arc sine ofz is returned, in the range of a strip unbounded along the imaginary axis and in the interval[−π/2; +π/2] along the real axis.

      Errors and special cases are handled as if the operation is implemented by-I*casinh(I*z)

      [edit]Notes

      Inverse sine (or arc sine) is a multivalued function and requires a branch cut on the complex plane. The branch cut is conventionally placed at the line segments(-∞,-1) and(1,∞) of the real axis.

      The mathematical definition of the principal value of arc sine is\(\small \arcsin z = -{\rm i}\ln({\rm i}z+\sqrt{1-z^2})\)arcsin z = -iln(iz +1-z2
      )

      For any z,\(\small{ \arcsin(z) = \arccos(-z) - \frac{\pi}{2} }\)arcsin(z) = acos(-z) -
      π
      2

      [edit]Example

      Run this code
      #include <stdio.h>#include <math.h>#include <complex.h> int main(void){doublecomplex z= casin(-2);printf("casin(-2+0i) = %f%+fi\n",creal(z),cimag(z)); doublecomplex z2= casin(conj(-2));// or CMPLX(-2, -0.0)printf("casin(-2-0i) (the other side of the cut) = %f%+fi\n",creal(z2),cimag(z2)); // for any z, asin(z) = acos(-z) - pi/2double pi=acos(-1);doublecomplex z3=csin(cacos(conj(-2))-pi/2);printf("csin(cacos(-2-0i)-pi/2) = %f%+fi\n",creal(z3),cimag(z3));}

      Output:

      casin(-2+0i) = -1.570796+1.316958icasin(-2-0i) (the other side of the cut) = -1.570796-1.316958icsin(cacos(-2-0i)-pi/2) = 2.000000+0.000000i

      [edit]References

      • C11 standard (ISO/IEC 9899:2011):
      • 7.3.5.2 The casin functions (p: 190)
      • 7.25 Type-generic math <tgmath.h> (p: 373-375)
      • G.7 Type-generic math <tgmath.h> (p: 545)
      • C99 standard (ISO/IEC 9899:1999):
      • 7.3.5.2 The casin functions (p: 172)
      • 7.22 Type-generic math <tgmath.h> (p: 335-337)
      • G.7 Type-generic math <tgmath.h> (p: 480)

      [edit]See also

      (C99)(C99)(C99)
      computes the complex arc cosine
      (function)[edit]
      (C99)(C99)(C99)
      computes the complex arc tangent
      (function)[edit]
      (C99)(C99)(C99)
      computes the complex sine
      (function)[edit]
      (C99)(C99)
      computes arc sine (\({\small\arcsin{x} }\)arcsin(x))
      (function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=c/numeric/complex/casin&oldid=147368"

      [8]ページ先頭

      ©2009-2025 Movatter.jp