diff --git a/lib/node_modules/@stdlib/math/base/special/spence/README.md b/lib/node_modules/@stdlib/math/base/special/spence/README.md index 995f6941c47..0754ac094af 100644 --- a/lib/node_modules/@stdlib/math/base/special/spence/README.md +++ b/lib/node_modules/@stdlib/math/base/special/spence/README.md @@ -20,7 +20,7 @@ limitations under the License. # spence -> [Spence’s function][spence], also known as the dilogarithm. +> [Spence's function][spence], also known as the dilogarithm.
@@ -68,7 +68,7 @@ var spence = require( '@stdlib/math/base/special/spence' ); #### spence( x ) -Evaluates [Spence’s function][spence], which is alternatively known as the dilogarithm. +Evaluates [Spence's function][spence], which is alternatively known as the dilogarithm. ```javascript var v = spence( 3.0 ); @@ -115,6 +115,94 @@ for ( i = 0; i < 100; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/spence.h" +``` + +#### stdlib_base_spence( x ) + +Evaluates [Spence's function][spence], which is alternatively known as the dilogarithm. + +```c +double out = stdlib_base_spence( 3.0 ); +// returns ~-1.437 + +out = stdlib_base_spence( 0.0 ); +// returns ~1.645 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_spence( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/spence.h" +#include + +int main( void ) { + const double x[] = { 3.0, 9.0, 0.0, -10.0 }; + + double y; + int i; + for ( i = 0; i < 4; i++ ) { + y = stdlib_base_spence( x[ i ] ); + printf( "spence(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +