diff --git a/lib/node_modules/@stdlib/number/float32/base/signbit/README.md b/lib/node_modules/@stdlib/number/float32/base/signbit/README.md index 0f70925481c..4352fea9389 100644 --- a/lib/node_modules/@stdlib/number/float32/base/signbit/README.md +++ b/lib/node_modules/@stdlib/number/float32/base/signbit/README.md @@ -82,6 +82,95 @@ for ( i = 0; i < 100; i++ ) { + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/number/float32/base/signbit.h" +``` + +#### stdlib_base_float32_signbit( x ) + +Returns a `boolean` indicating if the sign bit for a [single-precision floating-point number][ieee754] is on (`true`) or off (`false`). + +```c +#include + +bool out = stdlib_base_float32_signbit( -3.14f ); +``` + +The function accepts the following arguments: + +- **x**: `[in] float` input value. + +```c +bool stdlib_base_float32_signbit( const float x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/number/float32/base/signbit.h" +#include +#include +#include + +int main() { + float x[] = { 4.0f, 0.0f, -0.0f, 1.0f, -1.0f, 3.14f, -3.14f, 1.0e38f, -1.0e38f, 1.0f/0.0f, -1.0f/0.0f, 0.0f/0.0f }; + + bool out; + int i; + for ( i = 0; i < 12; i++ ) { + out = stdlib_base_float32_signbit( x[ i ] ); + printf( "%f => out: %" PRId32 "\n", x[ i ], out ); + } +} +``` + +
+ + + +
+ + +