order of derivative
input value
(n+1)'th derivative
var v = polygamma( 3, 1.2 );
// returns ~3.245
var v = polygamma( 5, 1.2 );
// returns ~41.39
var v = polygamma( 3, -4.9 );
// returns ~60014.239
var v = polygamma( 2.5, -1.2 );
// returns NaN
var v = polygamma( -1, 5.3 );
// returns NaN
var v = polygamma( 2, -2.0 );
// returns NaN
var v = polygamma( NaN, 2.1 );
// returns NaN
var v = polygamma( 1, NaN );
// returns NaN
var v = polygamma( NaN, NaN );
// returns NaN
Evaluates the polygamma function.
Notes
n
is not a nonnegative integer, the function returnsNaN
.x
is zero or a negative integer, the function returnsNaN
.