File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1010
1111### Features
1212
13+ - [ ` 6338030 ` ] ( https://github.com/stdlib-js/stdlib/commit/63380300fa123617bf4d460483ab1e70d2611da3 ) - update ` array/base/assert ` TypeScript declarations [ (#9196 )] ( https://github.com/stdlib-js/stdlib/pull/9196 )
1314- [ ` ca51243 ` ] ( https://github.com/stdlib-js/stdlib/commit/ca5124377589a8051527e4bc3b87173723c88f51 ) - add ` hasAlmostSameValues ` to namespace
1415- [ ` 24426d2 ` ] ( https://github.com/stdlib-js/stdlib/commit/24426d292e18009d0d4acd3615e8f520b92b0c1b ) - add ` array/base/assert/has-almost-same-values `
1516- [ ` a17f721 ` ] ( https://github.com/stdlib-js/stdlib/commit/a17f721a3d8edb0702ff7e0f123bc93c1da17914 ) - update ` array/base/assert ` TypeScript declarations
@@ -97,6 +98,7 @@ This release closes the following issue:
9798
9899<details >
99100
101+ - [ ` 6338030 ` ] ( https://github.com/stdlib-js/stdlib/commit/63380300fa123617bf4d460483ab1e70d2611da3 ) - ** feat:** update ` array/base/assert ` TypeScript declarations [ (#9196 )] ( https://github.com/stdlib-js/stdlib/pull/9196 ) _ (by stdlib-bot)_
100102- [ ` de9dec4 ` ] ( https://github.com/stdlib-js/stdlib/commit/de9dec49411a9f71d800970e9324e87dca52098b ) - ** docs:** update namespace table of contents [ (#9205 )] ( https://github.com/stdlib-js/stdlib/pull/9205 ) _ (by stdlib-bot)_
101103- [ ` ca51243 ` ] ( https://github.com/stdlib-js/stdlib/commit/ca5124377589a8051527e4bc3b87173723c88f51 ) - ** feat:** add ` hasAlmostSameValues ` to namespace _ (by Athan Reines)_
102104- [ ` 24426d2 ` ] ( https://github.com/stdlib-js/stdlib/commit/24426d292e18009d0d4acd3615e8f520b92b0c1b ) - ** feat:** add ` array/base/assert/has-almost-same-values ` _ (by Athan Reines)_
Original file line number Diff line number Diff line change 2222
2323import contains = require( '@stdlib/array-base-assert-contains' ) ;
2424import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' ) ;
25+ import hasAlmostSameValues = require( '@stdlib/array-base-assert-has-almost-same-values' ) ;
2526import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' ) ;
2627import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' ) ;
2728import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' ) ;
@@ -95,6 +96,27 @@ interface Namespace {
9596 */
9697 hasAlmostEqualValues : typeof hasAlmostEqualValues ;
9798
99+ /**
100+ * Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place).
101+ *
102+ * ## Notes
103+ *
104+ * - If provided arrays of unequal length, the function returns `false`.
105+ *
106+ * @param x - first input array
107+ * @param y - second input array
108+ * @param maxULP - maximum allowed ULP difference
109+ * @returns boolean indicating whether both arrays are approximately the same value
110+ *
111+ * @example
112+ * var x = [ 0, 0, 1, 0 ];
113+ * var y = [ 0, 0, 1, 0 ];
114+ *
115+ * var out = ns.hasAlmostSameValues( x, y, 0 );
116+ * // returns true
117+ */
118+ hasAlmostSameValues : typeof hasAlmostSameValues ;
119+
98120 /**
99121 * Tests if two arrays have equal values.
100122 *
You can’t perform that action at this time.
0 commit comments