Compute the hyperbolic arcsecant of a single-precision floating-point number.
var asechf = require( '@stdlib/math/base/special/asechf' );Computes the hyperbolic arcsecant of a single-precision floating-point number.
var v = asechf( 1.0 );
// returns 0.0
v = asechf( 0.5 );
// returns ~1.317
v = asechf( 0.0 );
// returns InfinityThe domain of x is restricted to the interval [0, 1]. For x outside of this interval, the function returns NaN.
var v = asechf( -1.0 );
// returns NaN
v = asechf( 2.0 );
// returns NaNvar uniform = require( '@stdlib/random/array/uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var asechf = require( '@stdlib/math/base/special/asechf' );
var x = uniform( 100, 0.1, 1.0, {
'dtype': 'float32'
});
logEachMap( 'asechf(%0.4f) = %0.4f', x, asechf );#include "stdlib/math/base/special/asechf.h"Computes the hyperbolic arcsecant of a single-precision floating-point number.
float out = stdlib_base_asechf( 0.5f );
// returns ~1.317fThe function accepts the following arguments:
- x:
[in] floatinput value.
float stdlib_base_asechf( const float x );#include "stdlib/math/base/special/asechf.h"
#include <stdio.h>
int main( void ) {
const float x[] = { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f };
float v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_asechf( x[ i ] );
printf( "asechf(%f) = %f\n", x[ i ], v );
}
}