@stdlib/math-base-special-csch

Compute the hyperbolic cosecant of a number.

Usage no npm install needed!

<script type="module">
  import stdlibMathBaseSpecialCsch from 'https://cdn.skypack.dev/@stdlib/math-base-special-csch';
</script>

README

csch

NPM version Build Status Coverage Status

Compute the hyperbolic cosecant of a number.

Installation

npm install @stdlib/math-base-special-csch

Usage

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

csch( x )

Computes the hyperbolic cosecant of x.

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

v = csch( 2.0 );
// returns ~0.2757

v = csch( -2.0 );
// returns ~-0.2757

v = csch( NaN );
// returns NaN

Examples

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

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

var i;
for ( i = 0; i < x.length; i++ ) {
    console.log( csch( x[ i ] ) );
}

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

Chat


License

See LICENSE.

Copyright

Copyright © 2016-2022. The Stdlib Authors.