diff --git a/lib/node_modules/@stdlib/math/base/special/floor2/README.md b/lib/node_modules/@stdlib/math/base/special/floor2/README.md index 17b75511e525..e222a7b0331a 100644 --- a/lib/node_modules/@stdlib/math/base/special/floor2/README.md +++ b/lib/node_modules/@stdlib/math/base/special/floor2/README.md @@ -101,6 +101,91 @@ for ( i = 0; i < 100; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/floor2.h" +``` + +#### stdlib_base_floor2( x ) + +Rounds a `numeric` value to the nearest power of two toward negative infinity. + +```c +double y = stdlib_base_floor2( -4.2 ); +// returns -8.0 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_floor2( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/floor2.h" +#include + +int main( void ) { + const double x[] = { 3.14, -3.14, 0.0, 0.0 / 0.0 }; + + double y; + int i; + for ( i = 0; i < 4; i++ ) { + y = stdlib_base_floor2( x[ i ] ); + printf( "floor2(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +