@stdlib/math-base-special-acothf
v0.1.1
Published
Compute the inverse hyperbolic cotangent of a single-precision floating-point number.
Readme
acothf
Compute the inverse hyperbolic cotangent of a single-precision floating-point number.
Installation
npm install @stdlib/math-base-special-acothfUsage
var acothf = require( '@stdlib/math-base-special-acothf' );acothf( x )
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 NaNExamples
var 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 );C APIs
Usage
#include "stdlib/math/base/special/acothf.h"stdlib_base_acothf( x )
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 );Examples
#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 );
}
}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.
