From 605627fbb141227001bc4ea4201d66ae0d097a72 Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Fri, 16 Jan 2026 15:24:28 +0530 Subject: [PATCH 1/5] feat: add number/float64/base/sub3 --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - task: lint_c_examples status: missing_dependencies - task: lint_c_benchmarks status: missing_dependencies - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../number/float64/base/sub3/README.md | 218 ++++++++++++++++++ .../float64/base/sub3/benchmark/benchmark.js | 73 ++++++ .../base/sub3/benchmark/benchmark.native.js | 61 +++++ .../float64/base/sub3/benchmark/c/Makefile | 126 ++++++++++ .../float64/base/sub3/benchmark/c/benchmark.c | 141 +++++++++++ .../base/sub3/benchmark/c/native/Makefile | 146 ++++++++++++ .../base/sub3/benchmark/c/native/benchmark.c | 133 +++++++++++ .../number/float64/base/sub3/binding.gyp | 170 ++++++++++++++ .../number/float64/base/sub3/docs/repl.txt | 36 +++ .../float64/base/sub3/docs/types/index.d.ts | 54 +++++ .../float64/base/sub3/docs/types/test.ts | 71 ++++++ .../float64/base/sub3/examples/c/Makefile | 146 ++++++++++++ .../float64/base/sub3/examples/c/example.c | 33 +++ .../float64/base/sub3/examples/index.js | 32 +++ .../number/float64/base/sub3/include.gypi | 53 +++++ .../include/stdlib/number/float64/base/sub3.h | 38 +++ .../number/float64/base/sub3/lib/index.js | 52 +++++ .../number/float64/base/sub3/lib/main.js | 58 +++++ .../number/float64/base/sub3/lib/native.js | 64 +++++ .../number/float64/base/sub3/manifest.json | 67 ++++++ .../number/float64/base/sub3/package.json | 68 ++++++ .../number/float64/base/sub3/src/Makefile | 70 ++++++ .../number/float64/base/sub3/src/addon.c | 22 ++ .../number/float64/base/sub3/src/main.c | 35 +++ .../number/float64/base/sub3/test/test.js | 90 ++++++++ .../float64/base/sub3/test/test.native.js | 99 ++++++++ 26 files changed, 2156 insertions(+) create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/README.md create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/Makefile create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/benchmark.c create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/Makefile create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/benchmark.c create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/binding.gyp create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/include.gypi create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/include/stdlib/number/float64/base/sub3.h create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/lib/index.js create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/lib/main.js create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/lib/native.js create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/manifest.json create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/package.json create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/src/Makefile create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/src/addon.c create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/src/main.c create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/test/test.js create mode 100644 lib/node_modules/@stdlib/number/float64/base/sub3/test/test.native.js diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/README.md b/lib/node_modules/@stdlib/number/float64/base/sub3/README.md new file mode 100644 index 000000000000..fe5b34edfe43 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/README.md @@ -0,0 +1,218 @@ + + +# sub3 + +> Compute the difference of three double-precision floating-point numbers. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var sub3 = require( '@stdlib/number/float64/base/sub3' ); +``` + +#### sub3( x, y, z ) + +Computes the difference of three double-precision floating-point numbers. + +```javascript +var v = sub3( 1.0, 5.0, 2.0 ); +// returns -6.0 + +v = sub3( 2.0, 5.0, 2.0 ); +// returns -5.0 + +v = sub3( 0.0, 5.0, 2.0 ); +// returns -7.0 + +v = sub3( -0.0, 0.0, -0.0 ); +// returns 0.0 + +v = sub3( NaN, NaN, NaN ); +// returns NaN +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var rand = require( '@stdlib/random/base/discrete-uniform' ).factory; +var filledBy = require( '@stdlib/array/base/filled-by' ); +var sub3 = require( '@stdlib/number/float64/base/sub3' ); + +var x = filledBy( 100, rand( -50, 50 ) ); +var y = filledBy( x.length, rand( -50, 50 ) ); +var z = filledBy( x.length, rand( -50, 50 ) ); + +var i; +for ( i = 0; i < x.length; i++ ) { + console.log( '%d - %d - %d = %d', x[i], y[i], z[i], sub3( x[i], y[i], z[i] ) ); +} +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/number/float64/base/sub3.h" +``` + +#### stdlib_base_float64_sub3( x, y, z ) + +Computes the difference of three double-precision floating-point numbers. + +```c +double out = stdlib_base_float64_sub3( -5.0, 2.0, 4.0 ); +// returns -11.0 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` first input value. +- **y**: `[in] double` second input value. +- **z**: `[in] double` third input value. + +```c +double stdlib_base_float64_sub3( const double x, const double y, const double z ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/number/float64/base/sub3.h" +#include + +int main( void ) { + const double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 }; + const double y[] = { 3.14, -3.14, -0.0, 0.0/0.0 }; + const double z[] = { 2.0, -3.0, -0.0, 0.0/0.0 }; + + double out; + int i; + for ( i = 0; i < 4; i++ ) { + out = stdlib_base_float64_sub3( x[ i ], y[ i ], z[ i ] ); + printf( "%lf - %lf - %lf = %lf\n", x[ i ], y[ i ], z[ i ], out ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.js b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.js new file mode 100644 index 000000000000..62e5fb6f4ec6 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.js @@ -0,0 +1,73 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var randu = require( '@stdlib/random/base/randu' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var sub3 = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var x; + var y; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x = ( randu()*1000.0 ) - 500.0; + y = sub3( x, 5.0, i ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( format( '%s::inline', pkg ), function benchmark( b ) { + var x; + var y; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x = ( randu()*1000.0 ) - 500.0; + y = x - 5.0 - i; + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.native.js new file mode 100644 index 000000000000..76be74e49e2a --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.native.js @@ -0,0 +1,61 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var randu = require( '@stdlib/random/base/randu' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var format = require( '@stdlib/string/format' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var sub3 = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( sub3 instanceof Error ) +}; + + +// MAIN // + +bench( format( '%s::native', pkg ), opts, function benchmark( b ) { + var x; + var y; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x = ( randu()*1000.0 ) - 500.0; + y = sub3( x, 5.0, i ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/Makefile b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/Makefile new file mode 100644 index 000000000000..ff0ad2332400 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/Makefile @@ -0,0 +1,126 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles C source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code (e.g., `-fPIC`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler +# @param {string} CFLAGS - C compiler flags +# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/benchmark.c new file mode 100644 index 000000000000..a4494f33f6fe --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/benchmark.c @@ -0,0 +1,141 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include +#include +#include +#include + +#define NAME "sub3" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [0,1). +* +* @return random number +*/ +static double rand_double( void ) { + int r = rand(); + return (double)r / ( (double)RAND_MAX + 1.0 ); +} + +/** +* Subtracts three numbers. +* +* @return difference +*/ +double sub3( const double x, const double y, const double z ) { + return x - y - z; +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + double x; + double y; + double t; + int i; + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + x = ( 1000.0*rand_double() ) - 500.0; + y = sub3( x, 5.0, 2.0 ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/Makefile new file mode 100644 index 000000000000..979768abbcec --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..c9ca6329a922 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/benchmark.c @@ -0,0 +1,133 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/number/float64/base/sub3.h" +#include +#include +#include +#include +#include + +#define NAME "sub3" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [0,1). +* +* @return random number +*/ +static double rand_double( void ) { + int r = rand(); + return (double)r / ( (double)RAND_MAX + 1.0 ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + double x; + double y; + double t; + int i; + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + x = ( 1000.0*rand_double() ) - 500.0; + y = stdlib_base_float64_sub3( x, 5.0, 2.0 ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::native::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/binding.gyp b/lib/node_modules/@stdlib/number/float64/base/sub3/binding.gyp new file mode 100644 index 000000000000..0d6508a12e99 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/docs/repl.txt b/lib/node_modules/@stdlib/number/float64/base/sub3/docs/repl.txt new file mode 100644 index 000000000000..48ff2de0ed31 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/docs/repl.txt @@ -0,0 +1,36 @@ + +{{alias}}( x, y, z ) + Computes the difference of three double-precision floating-point numbers. + + Parameters + ---------- + x: number + First input value. + + y: number + Second input value. + + z: number + Third input value. + + Returns + ------- + out: number + Difference. + + Examples + -------- + > var v = {{alias}}( 1.0, 5.0, 2.0 ) + -6.0 + > v = {{alias}}( 2.0, 5.0, 2.0 ) + -5.0 + > v = {{alias}}( 0.0, 5.0, 2.0 ) + -7.0 + > v = {{alias}}( -0.0, 0.0, -0.0 ) + 0.0 + > v = {{alias}}( NaN, NaN, NaN ) + NaN + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/docs/types/index.d.ts b/lib/node_modules/@stdlib/number/float64/base/sub3/docs/types/index.d.ts new file mode 100644 index 000000000000..b95749f96b5e --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/docs/types/index.d.ts @@ -0,0 +1,54 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Computes the difference of three double-precision floating-point numbers. +* +* @param x - first input value +* @param y - second input value +* @param z - third input value +* @returns difference +* +* @example +* var v = sub3( 1.0, 5.0, 2.0 ); +* // returns -6.0 +* +* @example +* var v = sub3( 2.0, 5.0, 2.0 ); +* // returns -5.0 +* +* @example +* var v = sub3( 0.0, 5.0, 2.0 ); +* // returns -7.0 +* +* @example +* var v = sub3( -0.0, 0.0, -0.0 ); +* // returns 0.0 +* +* @example +* var v = sub3( NaN, NaN, NaN ); +* // returns NaN +*/ +declare function sub3( x: number, y: number, z: number ): number; + + +// EXPORTS // + +export = sub3; diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/docs/types/test.ts b/lib/node_modules/@stdlib/number/float64/base/sub3/docs/types/test.ts new file mode 100644 index 000000000000..e946a3253c87 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/docs/types/test.ts @@ -0,0 +1,71 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import sub3 = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + sub3( 8.0, 8.0, 8.0 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a first argument which is not a number... +{ + sub3( true, 5.0, 2.0 ); // $ExpectError + sub3( false, 5.0, 2.0 ); // $ExpectError + sub3( null, 5.0, 2.0 ); // $ExpectError + sub3( undefined, 5.0, 2.0 ); // $ExpectError + sub3( '5', 5.0, 2.0 ); // $ExpectError + sub3( [], 5.0, 2.0 ); // $ExpectError + sub3( {}, 5.0, 2.0 ); // $ExpectError + sub3( ( x: number ): number => x, 5.0, 2.0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not a number... +{ + sub3( 5.0, true, 2.0 ); // $ExpectError + sub3( 5.0, false, 2.0 ); // $ExpectError + sub3( 5.0, null, 2.0 ); // $ExpectError + sub3( 5.0, undefined, 2.0 ); // $ExpectError + sub3( 5.0, '5', 2.0 ); // $ExpectError + sub3( 5.0, [], 2.0 ); // $ExpectError + sub3( 5.0, {}, 2.0 ); // $ExpectError + sub3( 5.0, ( x: number ): number => x, 2.0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + sub3( 5.0, 5.0, true ); // $ExpectError + sub3( 5.0, 5.0, false ); // $ExpectError + sub3( 5.0, 5.0, null ); // $ExpectError + sub3( 5.0, 5.0, undefined ); // $ExpectError + sub3( 5.0, 5.0, '5' ); // $ExpectError + sub3( 5.0, 5.0, [] ); // $ExpectError + sub3( 5.0, 5.0, {} ); // $ExpectError + sub3( 5.0, 5.0, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + sub3(); // $ExpectError + sub3( 5.0 ); // $ExpectError + sub3( 5.0, 5.0 ); // $ExpectError + sub3( 5.0, 5.0, 5.0, 5.0 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/examples/c/Makefile b/lib/node_modules/@stdlib/number/float64/base/sub3/examples/c/Makefile new file mode 100644 index 000000000000..c8f8e9a1517b --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/examples/c/example.c b/lib/node_modules/@stdlib/number/float64/base/sub3/examples/c/example.c new file mode 100644 index 000000000000..6f2b93be5d09 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/examples/c/example.c @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/number/float64/base/sub3.h" +#include + +int main( void ) { + const double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 }; + const double y[] = { 3.14, -3.14, -0.0, 0.0/0.0 }; + const double z[] = { 2.0, -3.0, -0.0, 0.0/0.0 }; + + double out; + int i; + for ( i = 0; i < 4; i++ ) { + out = stdlib_base_float64_sub3( x[ i ], y[ i ], z[ i ] ); + printf( "%lf - %lf - %lf = %lf\n", x[ i ], y[ i ], z[ i ], out ); + } +} diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js b/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js new file mode 100644 index 000000000000..d98fd21f4ead --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js @@ -0,0 +1,32 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var rand = require( '@stdlib/random/base/discrete-uniform' ).factory; +var filledBy = require( '@stdlib/array/base/filled-by' ); +var sub3 = require( './../lib' ); + +var x = filledBy( 100, rand( -50, 50 ) ); +var y = filledBy( x.length, rand( -50, 50 ) ); +var z = filledBy( x.length, rand( -50, 50 ) ); + +var i; +for ( i = 0; i < x.length; i++ ) { + console.log( '%d - %d - %d = %d', x[i], y[i], z[i], sub3( x[i], y[i], z[i] ) ); +} diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/include.gypi b/lib/node_modules/@stdlib/number/float64/base/sub3/include.gypi new file mode 100644 index 000000000000..bee8d41a2caf --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + '=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "mathematics", + "math", + "sub", + "subtraction", + "minus", + "difference", + "number", + "double", + "double-precision" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/src/Makefile b/lib/node_modules/@stdlib/number/float64/base/sub3/src/Makefile new file mode 100644 index 000000000000..2caf905cedbe --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/src/addon.c b/lib/node_modules/@stdlib/number/float64/base/sub3/src/addon.c new file mode 100644 index 000000000000..e9cede2ccc98 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/src/addon.c @@ -0,0 +1,22 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/number/float64/base/sub3.h" +#include "stdlib/math/base/napi/ternary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_DDD_D( stdlib_base_float64_sub3 ) diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/src/main.c b/lib/node_modules/@stdlib/number/float64/base/sub3/src/main.c new file mode 100644 index 000000000000..03e8dd9a411f --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/src/main.c @@ -0,0 +1,35 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/number/float64/base/sub3.h" + +/** +* Computes the difference of three double-precision floating-point numbers. +* +* @param x first number +* @param y second number +* @param z third number +* @return difference +* +* @example +* double z = stdlib_base_float64_sub3( 1.0, 5.0, 2.0 ); +* // returns -6.0 +*/ +double stdlib_base_float64_sub3( const double x, const double y, const double z ) { + return x - y - z; +} diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/test/test.js b/lib/node_modules/@stdlib/number/float64/base/sub3/test/test.js new file mode 100644 index 000000000000..fe46299a13f2 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/test/test.js @@ -0,0 +1,90 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); +var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var PI = require( '@stdlib/constants/float64/pi' ); +var sub3 = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof sub3, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function subtracts three numbers', function test( t ) { + t.strictEqual( sub3( -2.0, 4.0, 3.0 ), -9.0, 'returns expected value' ); + t.strictEqual( sub3( 3.0, 0.0, 2.0 ), 1.0, 'returns expected value' ); + t.strictEqual( sub3( 0.0, -0.0, -0.0 ), 0.0, 'returns expected value' ); + t.strictEqual( sub3( -PI, -PI, -PI ), PI, 'returns expected value' ); + t.end(); +}); + +tape( 'the function handles negative zeros', function test( t ) { + t.strictEqual( isPositiveZero( sub3( -0.0, -0.0, -0.0 ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZero( sub3( -0.0, 0.0, -0.0 ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZero( sub3( 0.0, -0.0, -0.0 ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZero( sub3( 0.0, 0.0, -0.0 ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZero( sub3( 0.0, -0.0, 0.0 ) ), true, 'returns expected value' ); + t.strictEqual( isNegativeZero( sub3( -0.0, 0.0, 0.0 ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function handles infinities', function test( t ) { + t.strictEqual( sub3( PINF, 5.0, 2.0 ), PINF, 'returns expected value' ); + t.strictEqual( sub3( 5.0, PINF, 2.0 ), NINF, 'returns expected value' ); + t.strictEqual( isnan( sub3( PINF, PINF, PINF ) ), true, 'returns expected value' ); + + t.strictEqual( sub3( NINF, 5.0, 2.0 ), NINF, 'returns expected value' ); + t.strictEqual( sub3( 5.0, NINF, 2.0 ), PINF, 'returns expected value' ); + t.strictEqual( isnan( sub3( NINF, NINF, NINF ) ), true, 'returns expected value' ); + + t.strictEqual( sub3( NINF, PINF, PINF ), NINF, 'returns expected value' ); + t.strictEqual( isnan( sub3( PINF, NINF, PINF ) ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a `NaN`, the function returns `NaN`', function test( t ) { + t.strictEqual( isnan( sub3( NaN, 5.0, 2.0 ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( NaN, PINF, PINF ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( NaN, NINF, NINF ) ), true, 'returns expected value' ); + + t.strictEqual( isnan( sub3( 5.0, NaN, 2.0 ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( PINF, NaN, PINF ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( NINF, NaN, NINF ) ), true, 'returns expected value' ); + + t.strictEqual( isnan( sub3( 5.0, 2.0, NaN ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( PINF, PINF, NaN ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( NINF, NINF, NaN ) ), true, 'returns expected value' ); + + t.strictEqual( isnan( sub3( NaN, NaN, NaN ) ), true, 'returns expected value' ); + + t.end(); +}); diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/test/test.native.js b/lib/node_modules/@stdlib/number/float64/base/sub3/test/test.native.js new file mode 100644 index 000000000000..a86a4b083119 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/test/test.native.js @@ -0,0 +1,99 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); +var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var PI = require( '@stdlib/constants/float64/pi' ); +var tryRequire = require( '@stdlib/utils/try-require' ); + + +// VARIABLES // + +var sub3 = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( sub3 instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof sub3, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function subtracts three numbers', opts, function test( t ) { + t.strictEqual( sub3( -2.0, 4.0, 3.0 ), -9.0, 'returns expected value' ); + t.strictEqual( sub3( 3.0, 0.0, 2.0 ), 1.0, 'returns expected value' ); + t.strictEqual( sub3( 0.0, -0.0, -0.0 ), 0.0, 'returns expected value' ); + t.strictEqual( sub3( -PI, -PI, -PI ), PI, 'returns expected value' ); + t.end(); +}); + +tape( 'the function handles negative zeros', opts, function test( t ) { + t.strictEqual( isPositiveZero( sub3( -0.0, -0.0, -0.0 ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZero( sub3( -0.0, 0.0, -0.0 ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZero( sub3( 0.0, -0.0, -0.0 ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZero( sub3( 0.0, 0.0, -0.0 ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZero( sub3( 0.0, -0.0, 0.0 ) ), true, 'returns expected value' ); + t.strictEqual( isNegativeZero( sub3( -0.0, 0.0, 0.0 ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function handles infinities', opts, function test( t ) { + t.strictEqual( sub3( PINF, 5.0, 2.0 ), PINF, 'returns expected value' ); + t.strictEqual( sub3( 5.0, PINF, 2.0 ), NINF, 'returns expected value' ); + t.strictEqual( isnan( sub3( PINF, PINF, PINF ) ), true, 'returns expected value' ); + + t.strictEqual( sub3( NINF, 5.0, 2.0 ), NINF, 'returns expected value' ); + t.strictEqual( sub3( 5.0, NINF, 2.0 ), PINF, 'returns expected value' ); + t.strictEqual( isnan( sub3( NINF, NINF, NINF ) ), true, 'returns expected value' ); + + t.strictEqual( sub3( NINF, PINF, PINF ), NINF, 'returns expected value' ); + t.strictEqual( isnan( sub3( PINF, NINF, PINF ) ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a `NaN`, the function returns `NaN`', opts, function test( t ) { + t.strictEqual( isnan( sub3( NaN, 5.0, 2.0 ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( NaN, PINF, PINF ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( NaN, NINF, NINF ) ), true, 'returns expected value' ); + + t.strictEqual( isnan( sub3( 5.0, NaN, 2.0 ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( PINF, NaN, PINF ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( NINF, NaN, NINF ) ), true, 'returns expected value' ); + + t.strictEqual( isnan( sub3( 5.0, 2.0, NaN ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( PINF, PINF, NaN ) ), true, 'returns expected value' ); + t.strictEqual( isnan( sub3( NINF, NINF, NaN ) ), true, 'returns expected value' ); + + t.strictEqual( isnan( sub3( NaN, NaN, NaN ) ), true, 'returns expected value' ); + + t.end(); +}); From f0bed4fe0b80e735d499484da96ea75c68a5a981 Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Sat, 17 Jan 2026 00:32:05 +0530 Subject: [PATCH 2/5] chore: suggested changes --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: missing_dependencies - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/number/float64/base/sub3/README.md | 15 ++++++--------- .../float64/base/sub3/benchmark/benchmark.js | 12 +++++++----- .../base/sub3/benchmark/benchmark.native.js | 7 ++++--- .../float64/base/sub3/benchmark/c/benchmark.c | 9 ++++++--- .../base/sub3/benchmark/c/native/benchmark.c | 9 ++++++--- .../number/float64/base/sub3/examples/index.js | 15 ++++++--------- 6 files changed, 35 insertions(+), 32 deletions(-) diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/README.md b/lib/node_modules/@stdlib/number/float64/base/sub3/README.md index fe5b34edfe43..c5a4f7f090b8 100644 --- a/lib/node_modules/@stdlib/number/float64/base/sub3/README.md +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/README.md @@ -82,18 +82,15 @@ v = sub3( NaN, NaN, NaN ); ```javascript -var rand = require( '@stdlib/random/base/discrete-uniform' ).factory; -var filledBy = require( '@stdlib/array/base/filled-by' ); +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); var sub3 = require( '@stdlib/number/float64/base/sub3' ); -var x = filledBy( 100, rand( -50, 50 ) ); -var y = filledBy( x.length, rand( -50, 50 ) ); -var z = filledBy( x.length, rand( -50, 50 ) ); +var x = discreteUniform( 100, -50, 50 ); +var y = discreteUniform( 100, -50, 50 ); +var z = discreteUniform( 100, -50, 50 ); -var i; -for ( i = 0; i < x.length; i++ ) { - console.log( '%d - %d - %d = %d', x[i], y[i], z[i], sub3( x[i], y[i], z[i] ) ); -} +logEachMap( '%d - %d - %d = %d', x, y, z, sub3 ); ``` diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.js b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.js index 62e5fb6f4ec6..1a31a8cfaaab 100644 --- a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.js @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; @@ -35,10 +35,11 @@ bench( pkg, function benchmark( b ) { var y; var i; + x = discreteUniform( 100, -500, 500 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*1000.0 ) - 500.0; - y = sub3( x, 5.0, i ); + y = sub3( x[ i % x.length ], 5.0, 10.0 ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } @@ -56,10 +57,11 @@ bench( format( '%s::inline', pkg ), function benchmark( b ) { var y; var i; + x = discreteUniform( 100, -500, 500 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*1000.0 ) - 500.0; - y = x - 5.0 - i; + y = x[ i % x.length ] - 5.0 - 10.0; if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.native.js index 76be74e49e2a..d0fe0bde0fe1 100644 --- a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/benchmark.native.js @@ -22,7 +22,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var format = require( '@stdlib/string/format' ); var tryRequire = require( '@stdlib/utils/try-require' ); @@ -44,10 +44,11 @@ bench( format( '%s::native', pkg ), opts, function benchmark( b ) { var y; var i; + x = discreteUniform( 100, -500, 500 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*1000.0 ) - 500.0; - y = sub3( x, 5.0, i ); + y = sub3( x[ i % x.length ], 5.0, 10.0 ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/benchmark.c index a4494f33f6fe..c15514d146c5 100644 --- a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/benchmark.c @@ -98,16 +98,19 @@ double sub3( const double x, const double y, const double z ) { * @return elapsed time in seconds */ static double benchmark( void ) { + double x[ 100 ]; double elapsed; - double x; double y; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 1000.0*rand_double() ) - 500.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 1000.0*rand_double() ) - 500.0; - y = sub3( x, 5.0, 2.0 ); + y = sub3( x[ i%100 ], 5.0, 10.0 ); if ( y != y ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/benchmark.c index c9ca6329a922..4b709b81b2c9 100644 --- a/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/benchmark/c/native/benchmark.c @@ -90,16 +90,19 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark( void ) { + double x[ 100 ]; double elapsed; - double x; double y; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 1000.0*rand_double() ) - 500.0; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 1000.0*rand_double() ) - 500.0; - y = stdlib_base_float64_sub3( x, 5.0, 2.0 ); + y = stdlib_base_float64_sub3( x[ i%100 ], 5.0, 10.0 ); if ( y != y ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js b/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js index d98fd21f4ead..896174e432a2 100644 --- a/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js @@ -18,15 +18,12 @@ 'use strict'; -var rand = require( '@stdlib/random/base/discrete-uniform' ).factory; -var filledBy = require( '@stdlib/array/base/filled-by' ); +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); var sub3 = require( './../lib' ); -var x = filledBy( 100, rand( -50, 50 ) ); -var y = filledBy( x.length, rand( -50, 50 ) ); -var z = filledBy( x.length, rand( -50, 50 ) ); +var x = discreteUniform( 100, -50, 50 ); +var y = discreteUniform( 100, -50, 50 ); +var z = discreteUniform( 100, -50, 50 ); -var i; -for ( i = 0; i < x.length; i++ ) { - console.log( '%d - %d - %d = %d', x[i], y[i], z[i], sub3( x[i], y[i], z[i] ) ); -} +logEachMap( '%d - %d - %d = %d', x, y, z, sub3 ); From 97fe98570f9c1fe0fbe89b6bad3c2711b3e2372a Mon Sep 17 00:00:00 2001 From: Sachin Pangal <151670745+Sachinn-64@users.noreply.github.com> Date: Sat, 17 Jan 2026 00:33:13 +0530 Subject: [PATCH 3/5] Update lib/node_modules/@stdlib/number/float64/base/sub3/README.md Co-authored-by: Neeraj Pathak Signed-off-by: Sachin Pangal <151670745+Sachinn-64@users.noreply.github.com> --- lib/node_modules/@stdlib/number/float64/base/sub3/README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/README.md b/lib/node_modules/@stdlib/number/float64/base/sub3/README.md index c5a4f7f090b8..23b562576209 100644 --- a/lib/node_modules/@stdlib/number/float64/base/sub3/README.md +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/README.md @@ -190,12 +190,6 @@ int main( void ) { From e39f9ad5fbfe3181d4354ecc86541ebc361c4176 Mon Sep 17 00:00:00 2001 From: Sachin Pangal <151670745+Sachinn-64@users.noreply.github.com> Date: Sat, 17 Jan 2026 00:33:21 +0530 Subject: [PATCH 4/5] Update lib/node_modules/@stdlib/number/float64/base/sub3/README.md Co-authored-by: Neeraj Pathak Signed-off-by: Sachin Pangal <151670745+Sachinn-64@users.noreply.github.com> --- lib/node_modules/@stdlib/number/float64/base/sub3/README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/README.md b/lib/node_modules/@stdlib/number/float64/base/sub3/README.md index 23b562576209..b77ce516ceaf 100644 --- a/lib/node_modules/@stdlib/number/float64/base/sub3/README.md +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/README.md @@ -198,11 +198,6 @@ int main( void ) { From e18ee7ce9f0077f0e5e00d161f79025f5602b544 Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Sat, 17 Jan 2026 11:53:51 +0530 Subject: [PATCH 5/5] chore: suggested change --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/number/float64/base/sub3/README.md | 2 +- .../@stdlib/number/float64/base/sub3/examples/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/README.md b/lib/node_modules/@stdlib/number/float64/base/sub3/README.md index b77ce516ceaf..d1ec517fad96 100644 --- a/lib/node_modules/@stdlib/number/float64/base/sub3/README.md +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/README.md @@ -90,7 +90,7 @@ var x = discreteUniform( 100, -50, 50 ); var y = discreteUniform( 100, -50, 50 ); var z = discreteUniform( 100, -50, 50 ); -logEachMap( '%d - %d - %d = %d', x, y, z, sub3 ); +logEachMap( 'x: %d, y: %d, z: %d => %d', x, y, z, sub3 ); ``` diff --git a/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js b/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js index 896174e432a2..436987c94a85 100644 --- a/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js +++ b/lib/node_modules/@stdlib/number/float64/base/sub3/examples/index.js @@ -26,4 +26,4 @@ var x = discreteUniform( 100, -50, 50 ); var y = discreteUniform( 100, -50, 50 ); var z = discreteUniform( 100, -50, 50 ); -logEachMap( '%d - %d - %d = %d', x, y, z, sub3 ); +logEachMap( 'x: %d, y: %d, z: %d => %d', x, y, z, sub3 );