Rate This Document
Findability
Accuracy
Completeness
Readability

v?asinh

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

Interface Definition

C interface:

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

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

Fortran interface:

CALL VSASINH(LEN, SRC, DST);

CALL VDASINH(LEN, SRC, DST);

Parameters

Parameter

Type

Description

Input/Output

len

Integer

Number of elements in the input vector.

If len ≤ 0, the system displays a message indicating that the value of len is invalid.

Input

src

  • Single-precision floating-point type for vsasinh
  • Double-precision floating-point type for vdasinh

Input vector src with length len.

If the pointer is null, the system prompts a null pointer error.

Input

dst

  • Single-precision floating-point type for vsasinh
  • Double-precision floating-point type for vdasinh

Output vector dst with length len.

If the pointer is null, the system prompts a null pointer error.

Output

Return Value

  • The hyperbolic arcsine y of radian angle x is returned for each operation value, that is, y = asinh(x).
  • For special values, see the following table.

    Input Radian (src)

    Output Hyperbolic Arcsine (dst)

    +0

    +0

    -0

    -0

    +inf

    +inf

    -inf

    -inf

    nan

    nan

Dependencies

C: "kvml.h"

Fortran: "kvml.f03"

Examples

C interface:

    int i, len = 4; 
    float src[len] = {0.0f, 1.0f, inf, nan}; 
    float* dst = (float*)malloc(sizeof(float) * len); 
    if (dst == NULL) { 
        printf("Malloc Failed!\n"); 
        return 0; 
    } 
    vsasinh(len, src, dst); 
    /** 
     *  Output dst: 
     *     0.0  0.881373587019543  inf  nan 
     * 
     */

Fortran interface:

    INTEGER :: LEN = 4 
    REAL(4) :: SRC(4)  
    REAL(4) :: DST(4) 
    DATA SRC/1, 2, 3, 4/ 
    CALL VSASINH(LEN, SRC, DST) 
    !  
    ! OUTPUT DST: 
    !     0.881373587, 1.443635475, 1.818446459, 2.094712547 
    !