Namespaces
Variants

acosh, acoshf, acoshl

From cppreference.net
< c ‎ | numeric ‎ | math
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99) (C99) (C99) (C23)
Maximum/minimum operations
Exponential functions
Power functions
Trigonometric and hyperbolic functions
Nearest integer floating-point
(C99) (C99) (C99)
(C23) (C23) (C23) (C23)
Floating-point manipulation
Narrowing operations
(C23)
(C23)
(C23)
(C23)
(C23)
(C23)
Quantum and quantum exponent
Decimal re-encoding functions
Total order and payload functions
Classification
Error and gamma functions
(C99)
(C99)
(C99)
(C99)
Types
Macro constants
Special floating-point values
Arguments and return values
Error handling
Fast operation indicators
Definiert im Header <math.h>
float acoshf ( float arg ) ;
(1) (seit C99)
double acosh ( double arg ) ;
(2) (seit C99)
long double acoshl ( long double arg ) ;
(3) (seit C99)
Definiert im Header <tgmath.h>
#define acosh( arg )
(4) (seit C99)
1-3) Berechnet den inversen hyperbolischen Kosinus von arg .
4) Typgenerisches Makro: Wenn das Argument den Typ long double hat, wird acoshl aufgerufen. Andernfalls, wenn das Argument einen Ganzzahltyp oder den Typ double hat, wird acosh aufgerufen. Andernfalls wird acoshf aufgerufen. Wenn das Argument komplex ist, ruft das Makro die entsprechende komplexe Funktion auf ( cacoshf , cacosh , cacoshl ).

Inhaltsverzeichnis

Parameter

arg - Fließkommawert, der die Fläche eines hyperbolischen Sektors darstellt

Rückgabewert

Wenn keine Fehler auftreten, wird der inverse hyperbolische Kosinus von arg ( cosh -1
(arg)
, oder arcosh(arg) ) im Intervall [0, +∞] zurückgegeben.

Wenn ein Domänenfehler auftritt, wird ein implementierungsdefinierter Wert zurückgegeben (NaN, falls unterstützt).

Fehlerbehandlung

Fehler werden gemeldet, wie in math_errhandling spezifiziert.

Wenn das Argument kleiner als 1 ist, tritt ein Domänenfehler auf.

Wenn die Implementierung IEEE-Gleitkommaarithmetik (IEC 60559) unterstützt,

  • Wenn das Argument kleiner als 1 ist, FE_INVALID wird ausgelöst und NaN wird zurückgegeben.
  • Wenn das Argument 1 ist, wird +0 zurückgegeben.
  • Wenn das Argument +∞ ist, wird +∞ zurückgegeben.
  • Wenn das Argument NaN ist, wird NaN zurückgegeben.

Hinweise

Obwohl der C-Standard diese Funktion als "Areakosinus Hyperbolicus" bezeichnet, sind die Umkehrfunktionen der hyperbolischen Funktionen die Areafunktionen. Ihr Argument ist die Fläche eines hyperbolischen Sektors, kein Bogen. Der korrekte Name ist "inverse hyperbolische Kosinusfunktion" (von POSIX verwendet) oder "Areakosinus Hyperbolicus".

Beispiel

#include <errno.h>
#include <fenv.h>
#include <float.h>
#include <math.h>
#include <stdio.h>
// #pragma STDC FENV_ACCESS ON
int main(void)
{
    printf("acosh(1) = %f\nacosh(10) = %f\n", acosh(1), acosh(10));
    printf("acosh(DBL_MAX) = %f\nacosh(Inf) = %f\n", acosh(DBL_MAX), acosh(INFINITY));
    // error handling
    errno = 0; feclearexcept(FE_ALL_EXCEPT);
    printf("acosh(0.5) = %f\n", acosh(0.5));
    if (errno == EDOM)
        perror("    errno == EDOM");
    if (fetestexcept(FE_INVALID))
        puts("    FE_INVALID raised");
}

Mögliche Ausgabe:

acosh(1) = 0.000000
acosh(10) = 2.993223
acosh(DBL_MAX) = 710.475860
acosh(Inf) = inf
acosh(0.5) = -nan
    errno == EDOM: Numerical argument out of domain
    FE_INVALID raised

Referenzen

  • C23-Standard (ISO/IEC 9899:2024):
  • 7.12.5.1 Die acosh-Funktionen (S.: TBD)
  • 7.27 Typgenerische Mathematik <tgmath.h> (S.: TBD)
  • F.10.2.1 Die acosh-Funktionen (S.: TBD)
  • C17-Standard (ISO/IEC 9899:2018):
  • 7.12.5.1 Die acosh-Funktionen (S. 175)
  • 7.25 Typgenerische Mathematik <tgmath.h> (S. 272-273)
  • F.10.2.1 Die acosh-Funktionen (S. 379)
  • C11-Standard (ISO/IEC 9899:2011):
  • 7.12.5.1 Die acosh-Funktionen (S. 240)
  • 7.25 Typgenerische Mathematik <tgmath.h> (S. 373-375)
  • F.10.2.1 Die acosh-Funktionen (S. 520)
  • C99-Standard (ISO/IEC 9899:1999):
  • 7.12.5.1 Die acosh-Funktionen (S. 221)
  • 7.22 Typgenerische Mathematik <tgmath.h> (S. 335-337)
  • F.9.2.1 Die acosh-Funktionen (S. 457)

Siehe auch

(C99) (C99) (C99)
berechnet den Areahyperbelsinus ( arsinh(x) )
(Funktion)
(C99) (C99) (C99)
berechnet den Areahyperbeltangens ( artanh(x) )
(Funktion)
(C99) (C99)
berechnet den hyperbolischen Kosinus ( cosh(x) )
(Funktion)
(C99) (C99) (C99)
berechnet den komplexen Areahyperbelkosinus
(Funktion)

Externe Links

Weisstein, Eric W. "Inverse Hyperbolic Cosine." Von MathWorld — Eine Wolfram Web Resource.