Evaluates the Hypergeometric function.
The Hypergeometric function is defined for |x| < 1
by the power series:
and is undefined (or infinite) if c
equals a non-positive integer.
Here (q)ₙ
is the (rising) Pochhammer symbol, which is defined by:
For |x| >= 1
, the function can be analytically continued using functional identities and transformation formulas.
var hyp2f1 = require( '@stdlib/math/base/special/hyp2f1' );
Evaluates the Hypergeometric function.
var v = hyp2f1( 1.0, 1.0, 1.0, 0.0 );
// returns 1.0
v = hyp2f1( 10.0, 7.4, -1.8, -0.99 );
// returns ~0.423
v = hyp2f1( 3.0, 4.0, 7.0, 1.0 );
// returns +Infinity
v = hyp2f1( NaN, 3.0, 2.0, 0.5 );
// returns NaN
var linspace = require( '@stdlib/array/base/linspace' );
var hyp2f1 = require( '@stdlib/math/base/special/hyp2f1' );
var a = linspace( -50.0, 50.0, 100 );
var b = linspace( -50.0, 50.0, 100 );
var c = linspace( -50.0, 50.0, 100 );
var x = linspace( -50.0, 50.0, 100 );
var i;
for ( i = 0; i < x.length; i++ ) {
console.log( 'a: %d, b: %d, c: %d, x: %d, 2F1(a,b;c;x): %d', a[ i ], b[ i ], c[ i ], x[ i ], hyp2f1( a[ i ], b[ i ], c[ i ], x[ i ] ) );
}
@stdlib/math/base/special/gamma
: gamma function.@stdlib/math/base/special/gammaln
: natural logarithm of the gamma function.@stdlib/math/base/special/gammasgn
: sign of the gamma function.@stdlib/math/base/special/digamma
: digamma function.