diff --git a/lib/node_modules/@stdlib/math/base/special/fast/pow-int/README.md b/lib/node_modules/@stdlib/math/base/special/fast/pow-int/README.md index 9e883d018b10..e119eea74efc 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/pow-int/README.md +++ b/lib/node_modules/@stdlib/math/base/special/fast/pow-int/README.md @@ -138,6 +138,97 @@ for ( y = 0; y < 309; y++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/fast/pow.h" +``` + +#### stdlib_base_fast_pow( x, y ) + +Evaluates the [exponential function][exponential-function] given a signed 32-bit integer `exponent`. + +```c +double out = stdlib_base_fast_pow( 2.0, 3 ); +// returns 8.0 + +out = stdlib_base_fast_pow( 3.14, 0 ); +// returns 1.0 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` base. +- **y**: `[in] double` exponent. + +```c +double stdlib_base_fast_pow( const double x, const int32_t y ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/fast/pow.h" +#include +#include + +int main( void ) { + const double x[] = { 3.14, 2.0, 2.0, 0.0 }; + const int32_t y[] = { 0, 3, -2, 0 }; + + double z; + int i; + for ( i = 0; i < 4; i++ ) { + z = stdlib_base_fast_pow( x[ i ], y[ i ] ); + printf( "pow( %lf, %d ) = %lf\n", x[ i ], y[ i ], z ); + } +} +``` + +
+ + + +
+ + +