From 43ad0343e98b2ba8d64cf332ab638c73ef738815 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Fri, 18 Jul 2025 12:04:18 +0530 Subject: [PATCH 1/2] feat: add `assert/is-almost-equal-array` --- 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: 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: passed - task: lint_license_headers status: passed --- --- .../assert/is-almost-equal-array/README.md | 114 ++++++++++++++++++ .../benchmark/benchmark.length.js | 96 +++++++++++++++ .../is-almost-equal-array/docs/repl.txt | 43 +++++++ .../docs/types/index.d.ts | 53 ++++++++ .../is-almost-equal-array/docs/types/test.ts | 49 ++++++++ .../is-almost-equal-array/examples/index.js | 39 ++++++ .../assert/is-almost-equal-array/lib/index.js | 52 ++++++++ .../assert/is-almost-equal-array/lib/main.js | 63 ++++++++++ .../assert/is-almost-equal-array/package.json | 77 ++++++++++++ .../assert/is-almost-equal-array/test/test.js | 114 ++++++++++++++++++ 10 files changed, 700 insertions(+) create mode 100644 lib/node_modules/@stdlib/assert/is-almost-equal-array/README.md create mode 100644 lib/node_modules/@stdlib/assert/is-almost-equal-array/benchmark/benchmark.length.js create mode 100644 lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/assert/is-almost-equal-array/examples/index.js create mode 100644 lib/node_modules/@stdlib/assert/is-almost-equal-array/lib/index.js create mode 100644 lib/node_modules/@stdlib/assert/is-almost-equal-array/lib/main.js create mode 100644 lib/node_modules/@stdlib/assert/is-almost-equal-array/package.json create mode 100644 lib/node_modules/@stdlib/assert/is-almost-equal-array/test/test.js diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/README.md b/lib/node_modules/@stdlib/assert/is-almost-equal-array/README.md new file mode 100644 index 000000000000..ca0c833604e6 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/README.md @@ -0,0 +1,114 @@ + + +# isAlmostEqualArray + +> Test if two arguments are both generic arrays and contain respective elements which are [approximately equal][@stdlib/assert/is-almost-equal] within a specified number of ULPs (units in the last place). + +
+ +## Usage + +```javascript +var isAlmostEqualArray = require( '@stdlib/assert/is-almost-equal-array' ); +``` + +#### isAlmostEqualArray( v1, v2, maxULP ) + +Tests if two arguments are both generic arrays and contain respective elements which are [approximately equal][@stdlib/assert/is-almost-equal] within a specified number of ULPs (units in the last place). + +```javascript +var EPS = require( '@stdlib/constants/float64/eps' ); +var Float64Array = require( '@stdlib/array/float64' ); + +var x = [ 1.0, 2.0 ]; +var y = [ 1.0+EPS, 2.0 ]; + +var bool = isAlmostEqualArray( x, y, 0 ); +// returns false + +bool = isAlmostEqualArray( x, y, 1 ); +// returns true + +bool = isAlmostEqualArray( x, [ -1.0, 2.0 ], 1 ); +// returns false +``` + +
+ + + +
+ +## Notes + +- The function returns `false` if either input value is a generic array containing `NaN`. +- The function does not distinguish between `-0` and `+0`, treating them as equal. + +
+ + + +
+ +## Examples + + + +```javascript +var isAlmostEqualArray = require( '@stdlib/assert/is-almost-equal-array' ); + +var x = [ 1.0, 2.0, 3.0 ]; +var y = [ 1.0, 2.0, 3.0 ]; +var out = isAlmostEqualArray( x, y, 0 ); +// returns true + +x = [ -0.0, 0.0, -0.0 ]; +y = [ 0.0, -0.0, 0.0 ]; +out = isAlmostEqualArray( x, y, 1 ); +// returns true + +x = [ NaN, NaN, NaN ]; +y = [ NaN, NaN, NaN ]; +out = isAlmostEqualArray( x, y, 0 ); +// returns false +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/benchmark/benchmark.length.js b/lib/node_modules/@stdlib/assert/is-almost-equal-array/benchmark/benchmark.length.js new file mode 100644 index 000000000000..ce78c61a8cb1 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/benchmark/benchmark.length.js @@ -0,0 +1,96 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +var pow = require( '@stdlib/math/base/special/pow' ); +var zeroTo = require( '@stdlib/array/base/zero-to' ); +var pkg = require( './../package.json' ).name; +var isAlmostEqualArray = require( './../lib' ); + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {PositiveInteger} len - array length +* @returns {Function} benchmark function +*/ +function createBenchmark( len ) { + var x = zeroTo( len ); + var y = zeroTo( len ); + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var bool; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + bool = isAlmostEqualArray( x, y, 1 ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var len; + var min; + var max; + var f; + var i; + + min = 1; // 10^min + max = 6; // 10^max + + for ( i = min; i <= max; i++ ) { + len = pow( 10, i ); + f = createBenchmark( len ); + bench( pkg+':len='+len, f ); + } +} + +main(); diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/repl.txt b/lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/repl.txt new file mode 100644 index 000000000000..7cd34d2d604a --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/repl.txt @@ -0,0 +1,43 @@ + +{{alias}}( v1, v2, maxULP ) + Tests if two arguments are both generic arrays and contain respective + elements which are approximately equal within a specified number of ULPs + (units in the last place). + + The function returns `false` if either input value is a generic array + containing `NaN`. + + The function does not distinguish between `-0` and `+0`, treating them as + equal. + + Parameters + ---------- + v1: any + First input value. + + v2: any + Second input value. + + maxULP: integer + Maximum allowed ULP difference. + + Returns + ------- + bool: boolean + Boolean indicating whether two arguments are approximately equal. + + Examples + -------- + > var x = [ 1.0, 2.0, 3.0 ]; + > var y = [ 1.0, 2.0, 3.0 ]; + > var bool = {{alias}}( x, y, 0 ) + true + + > x = [ NaN, NaN, NaN ]; + > y = [ NaN, NaN, NaN ]; + > bool = {{alias}}( x, y, 1 ) + false + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/types/index.d.ts b/lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/types/index.d.ts new file mode 100644 index 000000000000..316c33ed00a1 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/types/index.d.ts @@ -0,0 +1,53 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 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 + +/** +* Tests if two arguments are both generic arrays and contain respective elements which are approximately equal within a specified number of ULPs (units in the last place). +* +* ## Notes +* +* - The function returns `false` if either input value is a generic array containing `NaN`. +* - The function does not distinguish between `-0` and `+0`, treating them as equal. +* +* @param v1 - first input value +* @param v2 - second input value +* @param maxULP - maximum allowed ULP difference +* @returns boolean indicating whether two arguments are approximately equal +* +* @example +* var x = [ 1.0, 2.0, 3.0 ]; +* var y = [ 1.0, 2.0, 3.0 ]; +* +* var out = isAlmostEqualArray( x, y, 0 ); +* // returns true +* +* @example +* var x = [ 1.0, 2.0, 3.0 ]; +* var y = [ 1.0, 2.0, 4.0 ]; +* +* var out = isAlmostEqualArray( x, y, 1 ); +* // returns false +*/ +declare function isAlmostEqualArray( v1: any, v2: any, maxULP: number ): boolean; + + +// EXPORTS // + +export = isAlmostEqualArray; diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/types/test.ts b/lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/types/test.ts new file mode 100644 index 000000000000..8dd473fe380a --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/docs/types/test.ts @@ -0,0 +1,49 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 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 isAlmostEqualArray = require( './index' ); + + +// TESTS // + +// The function returns a boolean... +{ + isAlmostEqualArray( 3.14, 3.14, 1 ); // $ExpectType boolean + isAlmostEqualArray( null, null, 1 ); // $ExpectType boolean + isAlmostEqualArray( 'beep', 'boop', 1 ); // $ExpectType boolean +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + isAlmostEqualArray( 3.14, 3.14, '1' ); // $ExpectError + isAlmostEqualArray( 3.14, 3.14, true ); // $ExpectError + isAlmostEqualArray( 3.14, 3.14, false ); // $ExpectError + isAlmostEqualArray( 3.14, 3.14, null ); // $ExpectError + isAlmostEqualArray( 3.14, 3.14, undefined ); // $ExpectError + isAlmostEqualArray( 3.14, 3.14, [] ); // $ExpectError + isAlmostEqualArray( 3.14, 3.14, {} ); // $ExpectError + isAlmostEqualArray( 3.14, 3.14, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + isAlmostEqualArray(); // $ExpectError + isAlmostEqualArray( 3.14 ); // $ExpectError + isAlmostEqualArray( 3.14, 3.14 ); // $ExpectError + isAlmostEqualArray( 'beep', 'beep', 2, {} ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/examples/index.js b/lib/node_modules/@stdlib/assert/is-almost-equal-array/examples/index.js new file mode 100644 index 000000000000..bd6ba928b01a --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/examples/index.js @@ -0,0 +1,39 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 isAlmostEqualArray = require( './../lib' ); + +var x = [ 1.0, 2.0, 3.0 ]; +var y = [ 1.0, 2.0, 3.0 ]; +var out = isAlmostEqualArray( x, y, 0 ); +console.log( out ); +// => true + +x = [ -0.0, 0.0, -0.0 ]; +y = [ 0.0, -0.0, 0.0 ]; +out = isAlmostEqualArray( x, y, 1 ); +console.log( out ); +// => true + +x = [ NaN, NaN, NaN ]; +y = [ NaN, NaN, NaN ]; +out = isAlmostEqualArray( x, y, 0 ); +console.log( out ); +// => false diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/lib/index.js b/lib/node_modules/@stdlib/assert/is-almost-equal-array/lib/index.js new file mode 100644 index 000000000000..53508489df56 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/lib/index.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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'; + +/** +* Test if two arguments are both generic arrays and contain respective elements which are approximately equal within a specified number of ULPs (units in the last place). +* +* @module @stdlib/assert/is-almost-equal-array +* +* @example +* var isAlmostEqualArray = require( '@stdlib/assert/is-almost-equal-array' ); +* +* var x = [ 1.0, 2.0, 3.0 ]; +* var y = [ 1.0, 2.0, 3.0 ]; +* +* var out = isAlmostEqualArray( x, y, 0 ); +* // returns true +* +* @example +* var isAlmostEqualArray = require( '@stdlib/assert/is-almost-equal-array' ); +* +* var x = [ 1.0, 2.0, 3.0 ]; +* var y = [ 1.0, 2.0, 4.0 ]; +* +* var out = isAlmostEqualArray( x, y, 1 ); +* // returns false +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/lib/main.js b/lib/node_modules/@stdlib/assert/is-almost-equal-array/lib/main.js new file mode 100644 index 000000000000..2dac1d7a6d4e --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/lib/main.js @@ -0,0 +1,63 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 isArray = require( '@stdlib/assert/is-array' ); +var hasAlmostEqualValues = require( '@stdlib/array/base/assert/has-almost-equal-values' ); + + +// MAIN // + +/** +* Tests if two arguments are both generic arrays and contain respective elements which are approximately equal within a specified number of ULPs (units in the last place). +* +* ## Notes +* +* - The function returns `false` if either input value is a generic array containing `NaN`. +* - The function does not distinguish between `-0` and `+0`, treating them as equal. +* +* @param {*} v1 - first value +* @param {*} v2 - second value +* @param {NonNegativeInteger} maxULP - maximum allowed ULP difference +* @returns {boolean} boolean indicating whether two arguments are approximately equal +* +* @example +* var x = [ 1.0, 2.0, 3.0 ]; +* var y = [ 1.0, 2.0, 3.0 ]; +* +* var out = isAlmostEqualArray( x, y, 0 ); +* // returns true +* +* @example +* var x = [ 1.0, 2.0, 3.0 ]; +* var y = [ 1.0, 2.0, 4.0 ]; +* +* var out = isAlmostEqualArray( x, y, 1 ); +* // returns false +*/ +function isAlmostEqualArray( v1, v2, maxULP ) { + return ( isArray( v1 ) && isArray( v2 ) && hasAlmostEqualValues( v1, v2, maxULP ) ); +} + + +// EXPORTS // + +module.exports = isAlmostEqualArray; diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/package.json b/lib/node_modules/@stdlib/assert/is-almost-equal-array/package.json new file mode 100644 index 000000000000..df8bb30fa0d1 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/package.json @@ -0,0 +1,77 @@ +{ + "name": "@stdlib/assert/is-almost-equal-array", + "version": "0.0.0", + "description": "Test if two arguments are both generic arrays and contain respective elements which are approximately equal within a specified number of ULPs (units in the last place).", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdassert", + "assertion", + "assert", + "utilities", + "utility", + "utils", + "util", + "equal", + "same", + "strict", + "is", + "issame", + "issamevalue", + "isequal", + "isstrictequal", + "type", + "check", + "valid", + "validate", + "test", + "typed", + "array", + "generic" + ] +} diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/test/test.js b/lib/node_modules/@stdlib/assert/is-almost-equal-array/test/test.js new file mode 100644 index 000000000000..319f09a51e3b --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/test/test.js @@ -0,0 +1,114 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 typedarray = require( '@stdlib/array/typed' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var isAlmostEqualArray = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof isAlmostEqualArray, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `true` if provided two generic arrays having almost equal values', function test( t ) { + var x; + var y; + + x = [ 1.0, 2.0, 3.0 ]; + t.strictEqual( isAlmostEqualArray( x, x, 0 ), true, 'returns expected value' ); + + x = [ 1.0, 2.0, 3.0 ]; + y = [ 1.0, 2.0, 3.0 ]; + t.strictEqual( isAlmostEqualArray( x, y, 0 ), true, 'returns expected value' ); + + x = [ -0.0, 0.0, -0.0 ]; + y = [ -0.0, 0.0, -0.0 ]; + t.strictEqual( isAlmostEqualArray( x, y, 0 ), true, 'returns expected value' ); + + x = [ 1.0, 2.0, 3.0 ]; + y = [ 1.0+EPS, 2.0, 3.0 ]; + t.strictEqual( isAlmostEqualArray( x, y, 1 ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns `false` if not provided two generic arrays having almost equal values', function test( t ) { + var x; + var y; + var i; + + x = [ + '', + 'beep', + 5, + 3.14, + -3.14, + 0.0, + -0.0, + true, + false, + null, + void 0, + [ 1.0 ], + {}, + function noop() {}, + typedarray( 10, 'float64' ), + typedarray( 10, 'int32' ), + typedarray( 10, 'float32' ), + [ 1.0, 2.0, 3.0 ], + [ -0.0, -0.0, -0.0 ], + [ 1.0, 2.0, 3.0 ], + [ NaN, NaN, NaN ] + ]; + y = [ + 'abc', + 'boop', + -5, + -3.14, + 3.14, + -0.0, + 0.0, + false, + true, + void 0, + null, + [ -1.0 ], + {}, + function noop() {}, + typedarray( 10, 'float64' ), + typedarray( 10, 'int32' ), + typedarray( 10, 'float64' ), + [ 2.0, 4.0, 6.0 ], + [ 0.0, 0.0, 1.0 ], + [ 1.0+EPS+EPS, 2.0, 3.0 ], + [ NaN, NaN, NaN ] + ]; + for ( i = 0; i < x.length; i++ ) { + t.strictEqual( isAlmostEqualArray( x[ i ], y[ i ], 1 ), false, 'returns expected value' ); + } + t.end(); +}); From 307a85cf88badcbb55996a37bb00a33f7a2b4fb9 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Sat, 19 Jul 2025 23:03:55 -0500 Subject: [PATCH 2/2] chore: remove unused require --- 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: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/assert/is-almost-equal-array/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-almost-equal-array/README.md b/lib/node_modules/@stdlib/assert/is-almost-equal-array/README.md index ca0c833604e6..31519a9c921a 100644 --- a/lib/node_modules/@stdlib/assert/is-almost-equal-array/README.md +++ b/lib/node_modules/@stdlib/assert/is-almost-equal-array/README.md @@ -36,7 +36,6 @@ Tests if two arguments are both generic arrays and contain respective elements w ```javascript var EPS = require( '@stdlib/constants/float64/eps' ); -var Float64Array = require( '@stdlib/array/float64' ); var x = [ 1.0, 2.0 ]; var y = [ 1.0+EPS, 2.0 ];