diff --git a/lib/node_modules/@stdlib/math/base/assert/is-odd/README.md b/lib/node_modules/@stdlib/math/base/assert/is-odd/README.md index 46fb3e6bc803..ed74decb478c 100644 --- a/lib/node_modules/@stdlib/math/base/assert/is-odd/README.md +++ b/lib/node_modules/@stdlib/math/base/assert/is-odd/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. @@ -20,7 +20,7 @@ limitations under the License. # isOdd -> Test if a finite numeric value is an odd number. +> Test if a finite double-precision floating-point number is an odd number.
@@ -32,7 +32,7 @@ var isOdd = require( '@stdlib/math/base/assert/is-odd' ); #### isOdd( x ) -Tests if a **finite** `numeric` value is an odd number. +Tests if a **finite** double-precision floating-point number is an odd number. ```javascript var bool = isOdd( 5.0 ); @@ -104,6 +104,97 @@ for ( i = 0; i < 100; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/assert/is_odd.h" +``` + +#### stdlib_base_is_odd( x ) + +Tests if a finite double-precision floating-point number is an odd number. + +```c +#include + +bool out = stdlib_base_is_odd( 1.0 ); +// returns true + +out = stdlib_base_is_odd( 4.0 ); +// returns false +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +bool stdlib_base_is_odd( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/assert/is_odd.h" +#include +#include + +int main( void ) { + const double x[] = { 5.0, -5.0, 3.14, -3.14, 0.0, 0.0/0.0 }; + + bool b; + int i; + for ( i = 0; i < 6; i++ ) { + b = stdlib_base_is_odd( x[ i ] ); + printf( "Value: %lf. Is Odd? %s.\n", x[ i ], ( b ) ? "True" : "False" ); + } +} +``` + +
+ + + +
+ + +