diff --git a/lib/node_modules/@stdlib/math/base/special/pow/README.md b/lib/node_modules/@stdlib/math/base/special/pow/README.md index 68c771136232..28d0d3c55a93 100644 --- a/lib/node_modules/@stdlib/math/base/special/pow/README.md +++ b/lib/node_modules/@stdlib/math/base/special/pow/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2018 The Stdlib Authors. +Copyright (c) 2024 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -113,6 +113,99 @@ for ( i = 0; i < 100; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/pow.h" +``` + +#### stdlib_base_pow( base, exponent ) + +Evaluates the exponential function. + +```c +double out = stdlib_base_pow( 3.141592653589793, 5.0 ); +// returns ~306.0197 + +out = stdlib_base_pow( 4.0, 0.5 ); +// returns 2.0 +``` + +The function accepts the following arguments: + +- **base**: `[in] double` base. +- **exponent**: `[in] double` exponent. + +```c +double stdlib_base_pow( const double base, const double exponent ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/pow.h" +#include +#include + +int main( void ) { + double out; + double b; + double x; + int i; + + for ( i = 0; i < 100; i++ ) { + b = ( ( (double)rand() / (double)RAND_MAX ) * 10.0 ); + x = ( ( (double)rand() / (double)RAND_MAX ) * 10.0 ) - 5.0; + out = stdlib_base_pow( b, x ); + printf( "pow(%lf, %lf) = %lf\n", b, x, out ); + } +} +``` + +
+ + + +
+ + +