Compute the inverse hyperbolic cotangent of a single-precision floating-point number.
var acothf = require( '@stdlib/math/base/special/acothf' );Computes the inverse hyperbolic cotangent of a single-precision floating-point number.
var v = acothf( 2.0 );
// returns ~0.5493
v = acothf( 1.0 );
// returns InfinityThe domain of the inverse hyperbolic cotangent is the union of the intervals (-inf,-1] and [1,inf). If provided a value on the open interval (-1,1), the function returns NaN.
var v = acothf( 0.0 );
// returns NaN
v = acothf( 0.5 );
// returns NaNvar uniform = require( '@stdlib/random/array/uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var acothf = require( '@stdlib/math/base/special/acothf' );
var x = uniform( 100, 1.0, 5.0, {
'dtype': 'float32'
});
logEachMap( 'acothf(%0.4f) = %0.4f', x, acothf );#include "stdlib/math/base/special/acothf.h"Computes the inverse hyperbolic cotangent of a single-precision floating-point number.
float out = stdlib_base_acothf( 2.0f );
// returns ~0.5493fThe function accepts the following arguments:
- x:
[in] floatinput value.
float stdlib_base_acothf( const float x );#include "stdlib/math/base/special/acothf.h"
#include <stdio.h>
int main( void ) {
const float x[] = { 1.0f, 1.44f, 1.89f, 2.33f, 2.78f, 3.22f, 3.67f, 4.11f, 4.56f, 5.0f };
float v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_acothf( x[ i ] );
printf( "acothf(%f) = %f\n", x[ i ], v );
}
}