Compute the arcsine of a single-precision floating-point number.
var asinf = require( '@stdlib/math/base/special/asinf' );
Computes the arcsine of a single-precision floating-point number (in radians).
var v = asinf( 0.0 );
// returns 0.0
v = asinf( -3.14/6.0 );
// returns ~-0.551
var uniform = require( '@stdlib/random/array/uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var asinf = require( '@stdlib/math/base/special/asinf' );
var x = uniform( 100, -1.0, 1.0, {
'dtype': 'float32'
});
logEachMap( 'asinf(%0.4f) = %0.4f', x, asinf );
#include "stdlib/math/base/special/asinf.h"
Computes the arcsine of a single-precision floating-point number (in radians).
float out = stdlib_base_asinf( 0.0f );
// returns 0.0f
out = stdlib_base_asinf( -3.14f/6.0f );
// returns ~-0.551f
The function accepts the following arguments:
- x:
[in] float
input value (in radians).
float stdlib_base_asinf( const float x );
#include "stdlib/math/base/special/asinf.h"
#include <stdio.h>
int main( void ) {
const float x[] = { -1.0f, -0.78f, -0.56f, -0.33f, -0.11f, 0.11f, 0.33f, 0.56f, 0.78f, 1.0f };
float v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_asinf( x[ i ] );
printf( "asin(%f) = %f\n", x[ i ], v );
}
}
@stdlib/math/base/special/asin
: compute the arcsine of a double-precision floating-point number.@stdlib/math/base/special/asindf
: compute the arcsine (in degrees) of a single-precision floating-point number.