Compute the hyperbolic arcsine of a single-precision floating-point number.
var asinhf = require( '@stdlib/math/base/special/asinhf' );Computes the hyperbolic arcsine of a single-precision floating-point number.
var v = asinhf( 0.0 );
// returns 0.0
v = asinhf( -0.0 );
// returns -0.0
v = asinhf( 2.0 );
// returns ~1.444
v = asinhf( -2.0 );
// returns ~-1.444
v = asinhf( NaN );
// returns NaN
v = asinhf( -Infinity );
// returns -Infinity
v = asinhf( Infinity );
// returns Infinityvar uniform = require( '@stdlib/random/array/uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var asinhf = require( '@stdlib/math/base/special/asinhf' );
var opts = {
'dtype': 'float32'
};
var x = uniform( 100, -5.0, 5.0, opts );
logEachMap( 'asinhf(%0.4f) = %0.4f', x, asinhf );#include "stdlib/math/base/special/asinhf.h"Computes the hyperbolic arcsine of a single-precision floating-point number.
float out = stdlib_base_asinhf( 2.0f );
// returns ~1.444f
out = stdlib_base_asinhf( -2.0f );
// returns ~-1.444fThe function accepts the following arguments:
- x:
[in] floatinput value.
float stdlib_base_asinhf( const float x );#include "stdlib/math/base/special/asinhf.h"
#include <stdlib.h>
#include <stdio.h>
int main( void ) {
float x;
float v;
int i;
for ( i = 0; i < 100; i++ ) {
x = ( (float)rand() / (float)RAND_MAX ) * 100.0f;
v = stdlib_base_asinhf( x );
printf( "asinhf(%f) = %f\n", x, v );
}
}