Compute the inverse cotangent of a single-precision floating-point number.
var acotf = require( '@stdlib/math/base/special/acotf' );
Computes the inverse cotangent of a single-precision floating-point number.
var v = acotf( 2.0 );
// returns ~0.4636
v = acotf( Infinity );
// returns 0.0
var uniform = require( '@stdlib/random/array/uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var acotf = require( '@stdlib/math/base/special/acotf' );
var x = uniform( 100, -5.0, 5.0, {
'dtype': 'float32'
});
logEachMap( 'acotf(%0.4f) = %0.4f', x, acotf );
#include "stdlib/math/base/special/acotf.h"
Computes the inverse cotangent of a single-precision floating-point number.
float out = stdlib_base_acotf( 2.0f );
// returns ~0.4636f
The function accepts the following arguments:
- x:
[in] float
input value.
float stdlib_base_acotf( const float x );
#include "stdlib/math/base/special/acotf.h"
#include <stdio.h>
int main( void ) {
const float x[] = { -5.0f, -3.89f, -2.78f, -1.67f, -0.56f, 0.56f, 1.67f, 2.78f, 3.89f, 5.0f };
float v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_acotf( x[ i ] );
printf( "acot(%f) = %f\n", x[ i ], v );
}
}
@stdlib/math/base/special/acot
: compute the inverse cotangent.@stdlib/math/base/special/acoth
: compute the inverse hyperbolic cotangent.@stdlib/math/base/special/atanf
: compute the arctangent of a single-precision floating-point number.