Rate This Document
Findability
Accuracy
Completeness
Readability

v?acosh

Compute the hyperbolic arccosine of the input radian, which is a vector.

Interface Definition

C interface:

void vsacosh(const int len, const float* src, float* dst);

void vdacosh(const int len, const double* src, double* dst);

void vcacosh(const int len, const float complex *src, float complex *dst);

void vzacosh(const int len, const double complex *src, double complex *dst);

Fortran interface:

CALL VSACOSH(LEN, SRC, DST);

CALL VDACOSH(LEN, SRC, DST);

Parameters

Parameter

Type

Description

Input/Output

len

Integer

Number of elements in the input vector.

If len ≤ 0, an invalid parameter error is reported and the function returns.

Input

src

  • Single-precision floating-point type for vsacosh
  • Double-precision floating-point type for vdacosh
  • Single-precision floating-point complex type for vcacosh
  • Double-precision floating-point complex type for vzacosh

Input vector src with length len.

If the pointer is null, a null pointer error is reported and the function returns.

Input

dst

  • Single-precision floating-point type for vsacosh
  • Double-precision floating-point type for vdacosh
  • Single-precision floating-point complex type for vcacosh
  • Double-precision floating-point complex type for vzacosh

Output vector dst with length len.

If the pointer is null, a null pointer error is reported and the function returns.

Output

Return Value

  • The hyperbolic arccosine y of each radian angle x is returned, that is, y = acosh(x). x ∈ [1, +∞).
  • For special values, see the following table.

    Input Radian (src)

    Output Hyperbolic Arccosine (dst)

    +1

    +0

    <1

    nan

    +inf

    +inf

    -inf

    nan

    nan

    nan

Dependencies

C: "kvml.h"

Examples

C interface:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    int i, len = 4; 
    float src[len] = {0.0f, 2.0f, INFINITY, NAN}; 
    float* dst = (float*)malloc(sizeof(float) * len); 
    if (dst == NULL) { 
        printf("Malloc Failed!\n"); 
        return 0; 
    } 
    vsacosh(len, src, dst); 
    /** 
     *  Output dst: 
     *     nan  1.316957896924817  inf  nan 
     * 
     */

Fortran interface:

    INTEGER :: LEN = 4 
    REAL(4) SRC(4)  
    REAL(4) DST(4) 
    DATA SRC /1, 2, 3, 4/ 
    CALL VSACOSH(LEN, SRC, DST) 
    !  
    ! OUTPUT DST: 
    !     0, 1.316957897, 1.762747174, 2.063437069
    !