diff --git a/lib/node_modules/@stdlib/math/base/special/nanmax/README.md b/lib/node_modules/@stdlib/math/base/special/nanmax/README.md index 71d3e2e861a..08ce5e0ecee 100644 --- a/lib/node_modules/@stdlib/math/base/special/nanmax/README.md +++ b/lib/node_modules/@stdlib/math/base/special/nanmax/README.md @@ -79,6 +79,130 @@ var v = nanmax( NaN, NaN ); + + + + +
+ +## Examples + + + +```javascript +var nanmax = require( '@stdlib/math/base/special/nanmax' ); + +var m = nanmax( 3.0, 4.0 ); +console.log( m ); +// => 4.0 + +m = nanmax( NaN, 4.0 ); +console.log( m ); +// => 4.0 + +m = nanmax( 4.0, NaN ); +console.log( m ); +// => 4.0 + +m = nanmax( NaN, NaN ); +console.log( m ); +// => NaN +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/nanmax.h" +``` + +#### stdlib_base_nanmax( x, y ) + +Returns the minimum value, ignoring NaN. + +```c +double out = stdlib_base_nanmax( 4.2, 3.14 ); +// returns 4.2 + +out = stdlib_base_nanmax( 4.14, 0.0 / 0.0 ); +// returns 4.14 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **y**: `[in] double` input value. + +```c +double stdlib_base_nanmax( const double x, const double y ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/nanmax.h" +#include + +int main( void ) { + const double x[] = { 1.0, 0.45, -0.89, 0.0 / 0.0, -0.78, -0.22, 0.66, 0.11, -0.55, 0.0 }; + const double y[] = { -0.22, 0.66, 0.0, -0.55, 0.33, 1.0, 0.0 / 0.0, 0.11, 0.45, -0.78 }; + + double v; + int i; + for ( i = 0; i < 10; i++ ) { + v = stdlib_base_nanmax( x[i], y[i] ); + printf( "x[ %d ]: %lf, y[ %d ]: %lf, nanmax( x[ %d ], y[ %d ] ): %lf\n", i, x[ i ], i, y[ i ], i, i, v ); + } +} +``` + +
+ + + +
+ + +