@stdlib/math-base-special-min
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "@stdlib/math-base-special-min", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Return the minimum value.", | ||
@@ -17,5 +17,8 @@ "license": "Apache-2.0", | ||
"main": "./lib", | ||
"gypfile": false, | ||
"directories": { | ||
"doc": "./docs", | ||
"include": "./include", | ||
"lib": "./lib", | ||
"src": "./src", | ||
"dist": "./dist" | ||
@@ -36,3 +39,5 @@ }, | ||
"@stdlib/math-base-assert-is-nan": "^0.2.1", | ||
"@stdlib/math-base-assert-is-negative-zero": "^0.2.1" | ||
"@stdlib/math-base-assert-is-negative-zero": "^0.2.1", | ||
"@stdlib/math-base-napi-binary": "^0.2.1", | ||
"@stdlib/utils-library-manifest": "^0.2.1" | ||
}, | ||
@@ -39,0 +44,0 @@ "devDependencies": {}, |
@@ -5,3 +5,3 @@ <!-- | ||
Copyright (c) 2018 The Stdlib Authors. | ||
Copyright (c) 2024 The Stdlib Authors. | ||
@@ -130,2 +130,95 @@ Licensed under the Apache License, Version 2.0 (the "License"); | ||
<!-- C interface documentation. --> | ||
* * * | ||
<section class="c"> | ||
## C APIs | ||
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> | ||
<section class="intro"> | ||
</section> | ||
<!-- /.intro --> | ||
<!-- C usage documentation. --> | ||
<section class="usage"> | ||
### Usage | ||
```c | ||
#include "stdlib/math/base/special/min.h" | ||
``` | ||
#### stdlib_base_min( x, y ) | ||
Returns the minimum value. | ||
```c | ||
double out = stdlib_base_min( 4.2, 3.14 ); | ||
// returns 3.14 | ||
out = stdlib_base_min( 0.0, -0.0 ); | ||
// returns -0.0 | ||
``` | ||
The function accepts the following arguments: | ||
- **x**: `[in] double` input value. | ||
- **y**: `[in] double` input value. | ||
```c | ||
double stdlib_base_min( const double x, const double y ); | ||
``` | ||
</section> | ||
<!-- /.usage --> | ||
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> | ||
<section class="notes"> | ||
</section> | ||
<!-- /.notes --> | ||
<!-- C API usage examples. --> | ||
<section class="examples"> | ||
### Examples | ||
```c | ||
#include "stdlib/math/base/special/min.h" | ||
#include <stdlib.h> | ||
#include <stdio.h> | ||
int main( void ) { | ||
double x; | ||
double y; | ||
double v; | ||
int i; | ||
for ( i = 0; i < 100; i++ ) { | ||
x = ( ( (double)rand() / (double)RAND_MAX ) * 200.0 ) - 100.0; | ||
y = ( ( (double)rand() / (double)RAND_MAX ) * 200.0 ) - 100.0; | ||
v = stdlib_base_min( x, y ); | ||
printf( "x: %lf, y: %lf, min(x, y): %lf\n", x, y, v ); | ||
} | ||
} | ||
``` | ||
</section> | ||
<!-- /.examples --> | ||
</section> | ||
<!-- /.c --> | ||
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> | ||
@@ -194,4 +287,4 @@ | ||
[test-image]: https://github.com/stdlib-js/math-base-special-min/actions/workflows/test.yml/badge.svg?branch=v0.2.1 | ||
[test-url]: https://github.com/stdlib-js/math-base-special-min/actions/workflows/test.yml?query=branch:v0.2.1 | ||
[test-image]: https://github.com/stdlib-js/math-base-special-min/actions/workflows/test.yml/badge.svg?branch=v0.2.2 | ||
[test-url]: https://github.com/stdlib-js/math-base-special-min/actions/workflows/test.yml?query=branch:v0.2.2 | ||
@@ -198,0 +291,0 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-min/main.svg |
34468
16
275
331
5
+ Added@stdlib/array-float32@0.2.1(transitive)
+ Added@stdlib/array-float64@0.2.1(transitive)
+ Added@stdlib/assert-has-float32array-support@0.2.1(transitive)
+ Added@stdlib/assert-has-float64array-support@0.2.1(transitive)
+ Added@stdlib/assert-has-own-property@0.2.1(transitive)
+ Added@stdlib/assert-has-symbol-support@0.2.1(transitive)
+ Added@stdlib/assert-has-tostringtag-support@0.2.1(transitive)
+ Added@stdlib/assert-is-float32array@0.2.1(transitive)
+ Added@stdlib/assert-is-number@0.2.1(transitive)
+ Added@stdlib/complex-float32@0.2.1(transitive)
+ Added@stdlib/complex-float64@0.2.1(transitive)
+ Added@stdlib/complex-reim@0.2.1(transitive)
+ Added@stdlib/complex-reimf@0.2.1(transitive)
+ Added@stdlib/constants-float64-pinf@0.2.1(transitive)
+ Added@stdlib/error-tools-fmtprodmsg@0.2.1(transitive)
+ Added@stdlib/math-base-napi-binary@0.2.1(transitive)
+ Added@stdlib/number-float64-base-to-float32@0.2.1(transitive)
+ Added@stdlib/string-base-format-interpolate@0.2.1(transitive)
+ Added@stdlib/string-base-format-tokenize@0.2.1(transitive)
+ Added@stdlib/string-format@0.2.1(transitive)
+ Added@stdlib/symbol-ctor@0.2.1(transitive)
+ Added@stdlib/utils-define-nonenumerable-read-only-property@0.2.1(transitive)
+ Added@stdlib/utils-define-property@0.2.3(transitive)
+ Added@stdlib/utils-native-class@0.2.1(transitive)