@stdlib/math-base-special-acovercosf
v0.1.1
Published
Compute the inverse coversed cosine of a single-precision floating-point number (in radians).
Readme
Arccovercosine
Compute the inverse coversed cosine of a single-precision floating-point number (in radians).
The inverse coversed cosine is defined as
Installation
npm install @stdlib/math-base-special-acovercosfUsage
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.4966If x < 0, x > 2, 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 NaNExamples
var uniform = require( '@stdlib/random-array-uniform' );
var logEachMap = require( '@stdlib/console-log-each-map' );
var acovercosf = require( '@stdlib/math-base-special-acovercosf' );
var x = uniform( 100, 0.0, 2.0, {
'dtype': 'float32'
});
logEachMap( 'acovercosf(%0.4f) = %0.4f', x, acovercosf );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.6075fThe function accepts the following arguments:
- x:
[in] floatinput 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[] = { 0.0f, 0.27f, 0.56f, 0.78f, 1.67f, 1.70f, 1.78f, 1.80f, 1.89f, 2.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 );
}
}Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2026. The Stdlib Authors.
