acotf
Compute the inverse cotangent of a single-precision floating-point number.
Usage
var acotf = require( '@stdlib/math/base/special/acotf' );
acotf( x )
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
Examples
var linspace = require( '@stdlib/array/base/linspace' );
var acotf = require( '@stdlib/math/base/special/acotf' );
var x = linspace( -5.0, 5.0, 100 );
var i;
for ( i = 0; i < x.length; i++ ) {
console.log( acotf( x[ i ] ) );
}
C APIs
Usage
#include "stdlib/math/base/special/acotf.h"
stdlib_base_acotf( x )
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 );
Examples
#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 );
}
}