Namensräume
Varianten
Aktionen

catanf, catan, catanl

Von cppreference.com
< c‎ | numeric‎ | complex
Definiert im Header <complex.h>
float complex       catanf( float complex z );
(1) (seit C99)
double complex      catan( double complex z );
(2) (seit C99)
long double complex catanl( long double complex z );
(3) (seit C99)
Definiert in Header <tgmath.h>
#define atan( z )
(4) (seit C99)
1-3) Berechnet den komplexen Arkustangens von z mit Schnitten außerhalb des Intervalls [−i,+i] entlang der imaginären Achse.
4) Typ-generische Makrofunktion: Wenn z vom Typ long double complex ist, wird catanl aufgerufen. Wenn z vom Typ double complex ist, wird catan aufgerufen. Wenn z vom Typ float complex ist, wird catanf aufgerufen. Wenn z reell oder ganzzahlig ist, ruft das Makro die entsprechende reelle Funktion (atanf, atan, atanl) auf. Wenn z imaginär ist, ruft das Makro die entsprechende reelle Version der Funktion atanh auf, wobei die Formel atan(iy) = i atanh(y) implementiert wird, und der Rückgabetyp des Makros ist imaginär.

Inhalt

[edit] Parameter

z - complex argument

[edit] Rückgabewert

Wenn keine Fehler auftreten, wird der komplexe Arkustangens von z zurückgegeben, im Bereich eines Streifens, der entlang der imaginären Achse unbegrenzt und entlang der reellen Achse im Intervall [−π/2; +π/2] liegt.

Fehler und Sonderfälle werden behandelt, als ob die Operation durch -I * catanh(I*z) implementiert wäre.

[edit] Anmerkungen

Der inverse Tangens (oder Arkustangens) ist eine mehrwertige Funktion und erfordert einen Schnitt auf der komplexen Ebene. Der Schnitt wird konventionell auf den Liniensegmenten (-∞i,-i) und (+i,+∞i) der imaginären Achse platziert.

Die mathematische Definition des Hauptwerts des inversen Tangens ist atan z = -
1
2
i [ln(1 - iz) - ln (1 + iz]

[edit] Beispiel

#include <stdio.h>
#include <float.h>
#include <complex.h>
 
int main(void)
{
    double complex z = catan(2*I);
    printf("catan(+0+2i) = %f%+fi\n", creal(z), cimag(z));
 
    double complex z2 = catan(-conj(2*I)); // or CMPLX(-0.0, 2)
    printf("catan(-0+2i) (the other side of the cut) = %f%+fi\n", creal(z2), cimag(z2));
 
    double complex z3 = 2*catan(2*I*DBL_MAX); // or CMPLX(0, INFINITY)
    printf("2*catan(+0+i*Inf) = %f%+fi\n", creal(z3), cimag(z3));
}

Ausgabe

catan(+0+2i) = 1.570796+0.549306i
catan(-0+2i) (the other side of the cut) = -1.570796+0.549306i
2*catan(+0+i*Inf) = 3.141593+0.000000i

[edit] Referenzen

  • C11-Standard (ISO/IEC 9899:2011)
  • 7.3.5.3 Die catan-Funktionen (S. 191)
  • 7.25 Typ-generische Mathematik <tgmath.h> (S. 373-375)
  • G.7 Type-generic math <tgmath.h> (S: 545)
  • C99-Standard (ISO/IEC 9899:1999)
  • 7.3.5.3 Die catan-Funktionen (S. 173)
  • 7.22 Typ-generische Mathematik <tgmath.h> (S. 335-337)
  • G.7 Type-generic math <tgmath.h> (S: 480)

[edit] Siehe auch

(C99)(C99)(C99)
berechnet den komplexen Arkussinus
(Funktion) [bearbeiten]
(C99)(C99)(C99)
berechnet den komplexen Arkuskosinus
(Funktion) [bearbeiten]
(C99)(C99)(C99)
berechnet den komplexen Tangens
(Funktion) [bearbeiten]
(C99)(C99)
berechnet Arkustangens (arctan(x))
(Funktion) [bearbeiten]