Arccovercosine

Compute the inverse coversed cosine of a single-precision floating-point number (in radians).

The inverse coversed cosine is defined as

a c o v e r c o s left-parenthesis theta right-parenthesis equals arc sine left-parenthesis 1 plus theta right-parenthesis

Usage

var acovercosf = require( '@stdlib/math/base/special/acovercosf' );

acovercosf( x )

Computes the inverse coversed cosine of a single-precision floating-point number.

var v = acovercosf( 0.0 );
// returns ~1.5708

v = acovercosf( -3.141592653589793 / 2.0 );
// returns ~-0.6075

v = acovercosf( -3.141592653589793 / 6.0 );
// returns ~0.4966

If x < -2, x > 0, or x is NaN, the function returns NaN.

var v = acovercosf( 1.0 );
// returns NaN

v = acovercosf( -3.14 );
// returns NaN

v = acovercosf( NaN );
// returns NaN

Examples

var linspace = require( '@stdlib/array/base/linspace' );
var acovercosf = require( '@stdlib/math/base/special/acovercosf' );

var x = linspace( -2.0, 0.0, 100 );

var i;
for ( i = 0; i < x.length; i++ ) {
    console.log( acovercosf( x[ i ] ) );
}

C APIs

Usage

#include "stdlib/math/base/special/acovercosf.h"

stdlib_base_acovercosf( x )

Computes the inverse coversed cosine of a single-precision floating-point number.

float out = stdlib_base_acovercosf( -3.141592653589793f / 2.0f );
// returns ~-0.6075f

The function accepts the following arguments:

  • x: [in] float input value.
float stdlib_base_acovercosf( const float x );

Examples

#include "stdlib/math/base/special/acovercosf.h"
#include <stdio.h>

int main( void ) {
    const float x[] = { -2.0f, -1.80f, -1.78f, -1.67f, -0.56f, -0.27f, -1.67f, -0.78f, -1.89f, 0.0f };

    float v;
    int i;
    for ( i = 0; i < 10; i++ ) {
        v = stdlib_base_acovercosf( x[ i ] );
        printf( "acovercosf(%f) = %f\n", x[ i ], v );
    }
}
Did you find this page helpful?