diff --git a/lib/node_modules/@stdlib/math/base/assert/is-negative-finite/README.md b/lib/node_modules/@stdlib/math/base/assert/is-negative-finite/README.md index 265cb945a0e..6421879b658 100644 --- a/lib/node_modules/@stdlib/math/base/assert/is-negative-finite/README.md +++ b/lib/node_modules/@stdlib/math/base/assert/is-negative-finite/README.md @@ -81,6 +81,98 @@ bool = isNegativeFinite( NaN ); + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/assert/is_negative_finite.h" +``` + +#### stdlib_base_is_negative_finite( x ) + +Tests if a double-precision floating-point numeric value is a negative finite number. + +```c +#include + +bool out = stdlib_base_is_negative_finite( 1.0 ); +// returns false + +out = stdlib_base_is_negative_finite( -4.0 ); +// returns true +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +bool stdlib_base_is_negative_finite( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/assert/is_negative_finite.h" +#include "stdlib/constants/float64/ninf.h" +#include +#include + +int main( void ) { + const double x[] = { 5.0, -5.0, 3.14, -3.14, 0.0/0.0, STDLIB_CONSTANT_FLOAT64_NINF }; + + bool b; + int i; + for ( i = 0; i < 6; i++ ) { + b = stdlib_base_is_negative_finite( x[ i ] ); + printf( "x = %lf, is_negative_finite(x) = %s\n", x[ i ], ( b ) ? "True" : "False" ); + } +} +``` + +
+ + + +
+ + +