From 6404344706abb770c90fddac484c1dd0e9138608 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 8 Mar 2024 17:47:52 +0000 Subject: [PATCH] Auto-generated commit --- .npmrc | 3 + CONTRIBUTORS | 1 + base/assert/is-negative-finite/README.md | 92 ++++++++++ .../benchmark/benchmark.native.js | 60 +++++++ .../benchmark/c/native/Makefile | 146 +++++++++++++++ .../benchmark/c/native/benchmark.c | 137 ++++++++++++++ base/assert/is-negative-finite/binding.gyp | 170 ++++++++++++++++++ .../is-negative-finite/examples/c/Makefile | 146 +++++++++++++++ .../is-negative-finite/examples/c/example.c | 33 ++++ base/assert/is-negative-finite/include.gypi | 53 ++++++ .../math/base/assert/is_negative_finite.h | 40 +++++ base/assert/is-negative-finite/lib/native.js | 51 ++++++ base/assert/is-negative-finite/manifest.json | 40 +++++ base/assert/is-negative-finite/src/Makefile | 70 ++++++++ base/assert/is-negative-finite/src/addon.c | 90 ++++++++++ base/assert/is-negative-finite/src/main.c | 36 ++++ .../is-negative-finite/test/test.native.js | 66 +++++++ 17 files changed, 1234 insertions(+) create mode 100644 base/assert/is-negative-finite/benchmark/benchmark.native.js create mode 100644 base/assert/is-negative-finite/benchmark/c/native/Makefile create mode 100644 base/assert/is-negative-finite/benchmark/c/native/benchmark.c create mode 100644 base/assert/is-negative-finite/binding.gyp create mode 100644 base/assert/is-negative-finite/examples/c/Makefile create mode 100644 base/assert/is-negative-finite/examples/c/example.c create mode 100644 base/assert/is-negative-finite/include.gypi create mode 100644 base/assert/is-negative-finite/include/stdlib/math/base/assert/is_negative_finite.h create mode 100644 base/assert/is-negative-finite/lib/native.js create mode 100644 base/assert/is-negative-finite/manifest.json create mode 100644 base/assert/is-negative-finite/src/Makefile create mode 100644 base/assert/is-negative-finite/src/addon.c create mode 100644 base/assert/is-negative-finite/src/main.c create mode 100644 base/assert/is-negative-finite/test/test.native.js diff --git a/.npmrc b/.npmrc index 36f5bef40..5af90674c 100644 --- a/.npmrc +++ b/.npmrc @@ -26,3 +26,6 @@ shrinkwrap = false # Disable automatically "saving" dependencies on install: save = false + +# Generate provenance metadata: +provenance = true diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 229ded505..68cca7700 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -18,6 +18,7 @@ Dan Rose Daniel Killenberger Dominik Moritz Dorrin Sotoudeh +EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com> Frank Kovacs GUNJ JOSHI Golden <103646877+AuenKr@users.noreply.github.com> diff --git a/base/assert/is-negative-finite/README.md b/base/assert/is-negative-finite/README.md index 265cb945a..6421879b6 100644 --- a/base/assert/is-negative-finite/README.md +++ b/base/assert/is-negative-finite/README.md @@ -81,6 +81,98 @@ bool = isNegativeFinite( NaN ); + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/assert/is_negative_finite.h" +``` + +#### stdlib_base_is_negative_finite( x ) + +Tests if a double-precision floating-point numeric value is a negative finite number. + +```c +#include + +bool out = stdlib_base_is_negative_finite( 1.0 ); +// returns false + +out = stdlib_base_is_negative_finite( -4.0 ); +// returns true +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +bool stdlib_base_is_negative_finite( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/assert/is_negative_finite.h" +#include "stdlib/constants/float64/ninf.h" +#include +#include + +int main( void ) { + const double x[] = { 5.0, -5.0, 3.14, -3.14, 0.0/0.0, STDLIB_CONSTANT_FLOAT64_NINF }; + + bool b; + int i; + for ( i = 0; i < 6; i++ ) { + b = stdlib_base_is_negative_finite( x[ i ] ); + printf( "x = %lf, is_negative_finite(x) = %s\n", x[ i ], ( b ) ? "True" : "False" ); + } +} +``` + +
+ + + +
+ + +