@stdlib/math-base-special-absgammalnf
v0.1.2
Published
Natural logarithm of the absolute value of the gamma function for a single-precision floating-point number.
Downloads
272
Readme
absgammalnf
Natural logarithm of the absolute value of the gamma function.
Installation
npm install @stdlib/math-base-special-absgammalnfUsage
var absgammalnf = require( '@stdlib/math-base-special-absgammalnf' );absgammalnf( x )
Evaluates the natural logarithm of the absolute value of the gamma function.
var v = absgammalnf( 2.0 );
// returns 0.0
v = absgammalnf( 1.0 );
// returns 0.0
v = absgammalnf( 4.0 );
// returns ~1.792
v = absgammalnf( -0.5 );
// returns ~1.266
v = absgammalnf( 0.5 );
// returns ~0.572
v = absgammalnf( 0.0 );
// returns Infinity
v = absgammalnf( NaN );
// returns NaNExamples
var uniform = require( '@stdlib/random-array-uniform' );
var logEachMap = require( '@stdlib/console-log-each-map' );
var absgammalnf = require( '@stdlib/math-base-special-absgammalnf' );
var opts = {
'dtype': 'float32'
};
var x = uniform( 100, -10.0, 10.0, opts );
logEachMap( 'absgammalnf(%0.4f) = %0.4f', x, absgammalnf );C APIs
Usage
#include "stdlib/math/base/special/absgammalnf.h"stdlib_base_absgammalnf( x )
Evaluates the natural logarithm of the absolute value of the gamma function.
float out = stdlib_base_absgammalnf( 2.0f );
// returns 0.0f
out = stdlib_base_absgammalnf( 4.0f );
// returns ~1.792fThe function accepts the following arguments:
- x:
[in] floatinput value.
float stdlib_base_absgammalnf( const float x );Examples
#include "stdlib/math/base/special/absgammalnf.h"
#include <stdio.h>
int main( void ) {
const float x[] = { 4.0f, -1.5f, -0.5f, 0.5f };
float y;
int i;
for ( i = 0; i < 4; i++ ) {
y = stdlib_base_absgammalnf( x[ i ] );
printf( "absgammalnf(%f) = %f\n", x[ i ], y );
}
}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
Copyright
Copyright © 2016-2026. The Stdlib Authors.
