coth

Compute the hyperbolic cotangent of a number.

Usage

var coth = require( '@stdlib/math/base/special/coth' );

coth( x )

Computes the hyperbolic cotangent of x.

var v = coth( 0.0 );
// returns Infinity

v = coth( 2.0 );
// returns ~1.0373

v = coth( -2.0 );
// returns ~-1.0373

v = coth( NaN );
// returns NaN

Examples

var linspace = require( '@stdlib/array/base/linspace' );
var coth = require( '@stdlib/math/base/special/coth' );

var x = linspace( -10.0, 10.0, 100 );

var i;
for ( i = 0; i < x.length; i++ ) {
    console.log( coth( x[ i ] ) );
}
Did you find this page helpful?