Socket
Socket
Sign inDemoInstall

@stdlib/math-base-special-min

Package Overview
Dependencies
28
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.2.2

include/stdlib/math/base/special/min.h

9

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc