Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/node_modules/@stdlib/math/base/special/nanmin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,12 @@ console.log( m );
Returns the minimum value, ignoring NaN.

```c
#include "stdlib/constants/float64/nan.h"

double out = stdlib_base_nanmin( 4.2, 3.14 );
Comment thread
kgryte marked this conversation as resolved.
Resolved
// returns 3.14

out = stdlib_base_nanmin( 4.14, 0.0 / 0.0 );
out = stdlib_base_nanmin( 4.14, STDLIB_CONSTANT_FLOAT64_NAN );
// returns 4.14
```

Expand Down Expand Up @@ -193,11 +195,12 @@ double stdlib_base_nanmin( const double x, const double y );

```c
#include "stdlib/math/base/special/nanmin.h"
#include "stdlib/constants/float64/nan.h"
#include <stdio.h>

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 };
const double x[] = { 1.0, 0.45, -0.89, STDLIB_CONSTANT_FLOAT64_NAN, -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, STDLIB_CONSTANT_FLOAT64_NAN, 0.11, 0.45, -0.78 };

double v;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
*/

#include "stdlib/math/base/special/nanmin.h"
#include "stdlib/constants/float64/nan.h"
#include <stdio.h>

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 };
const double x[] = { 1.0, 0.45, -0.89, STDLIB_CONSTANT_FLOAT64_NAN, -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, STDLIB_CONSTANT_FLOAT64_NAN, 0.11, 0.45, -0.78 };

double v;
int i;
Expand Down
4 changes: 3 additions & 1 deletion lib/node_modules/@stdlib/math/base/special/nanmin/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
* // returns 3.14
*
* @example
* double v = stdlib_base_nanmin( 4.14, 0.0 / 0.0 );
* #include "stdlib/constants/float64/nan.h"
*
* double v = stdlib_base_nanmin( 4.14, STDLIB_CONSTANT_FLOAT64_NAN );
Comment thread
kgryte marked this conversation as resolved.
Resolved
* // returns 4.14
*/
double stdlib_base_nanmin( const double x, const double y ) {
Expand Down