diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/README.md b/lib/node_modules/@stdlib/blas/ext/base/zdiff/README.md
new file mode 100644
index 000000000000..ff4ffa2c8b57
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/README.md
@@ -0,0 +1,402 @@
+
+
+# zdiff
+
+> Calculate the k-th discrete forward difference of a double-precision complex floating-point strided array.
+
+
+
+## Usage
+
+```javascript
+var zdiff = require( '@stdlib/blas/ext/base/zdiff' );
+```
+
+
+
+#### zdiff( N, k, x, strideX, N1, prepend, strideP, N2, append, strideA, out, strideOut, workspace, strideW )
+
+
+
+Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array.
+
+
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+var p = new Complex128Array( [ 1.0, -1.0 ] );
+var a = new Complex128Array( [ 11.0, -11.0 ] );
+var out = new Complex128Array( 6 );
+var w = new Complex128Array( 6 );
+
+zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+// out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+```
+
+The function has the following parameters:
+
+- **N**: number of indexed elements.
+- **k**: number of times to recursively compute differences.
+- **x**: input [`Complex128Array`][@stdlib/array/complex128].
+- **strideX**: stride length for `x`.
+- **N1**: number of indexed elements to `prepend`.
+- **prepend**: a [`Complex128Array`][@stdlib/array/complex128] containing values to prepend prior to computing differences.
+- **strideP**: stride length for `prepend`.
+- **N2**: number of indexed elements to `append`.
+- **append**: a [`Complex128Array`][@stdlib/array/complex128] containing values to append prior to computing differences.
+- **strideA**: stride length for `append`.
+- **out**: output [`Complex128Array`][@stdlib/array/complex128]. Must have `N + N1 + N2 - k` elements.
+- **strideOut**: stride length for `out`.
+- **workspace**: workspace [`Complex128Array`][@stdlib/array/complex128]. Must have `N + N1 + N2 - 1` elements.
+- **strideW**: stride length for `workspace`.
+
+The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute differences of every other element:
+
+
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+var p = new Complex128Array( [ 1.0, -1.0 ] );
+var a = new Complex128Array( [ 11.0, -11.0 ] );
+var out = new Complex128Array( 4 );
+var w = new Complex128Array( 4 );
+
+zdiff( 3, 1, x, 2, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+// out => [ 1.0, -1.0, 4.0, -4.0, 4.0, -4.0, 1.0, -1.0 ]
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+// Initial array...
+var x0 = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+
+// Create an offset view...
+var x1 = new Complex128Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+var p = new Complex128Array( [ 1.0, -1.0 ] );
+var a = new Complex128Array( [ 11.0, -11.0 ] );
+var out = new Complex128Array( 5 );
+var w = new Complex128Array( 5 );
+
+zdiff( x1.length, 1, x1, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+// out => [ 3.0, -3.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+```
+
+
+
+#### zdiff.ndarray( N, k, x, strideX, offsetX, N1, prepend, strideP, offsetP, N2, append, strideA, offsetA, out, strideOut, offsetOut, workspace, strideW, offsetW )
+
+
+
+Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array using alternative indexing semantics.
+
+
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+var p = new Complex128Array( [ 1.0, -1.0 ] );
+var a = new Complex128Array( [ 11.0, -11.0 ] );
+var out = new Complex128Array( 6 );
+var w = new Complex128Array( 6 );
+
+zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+// out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+```
+
+The function has the following additional parameters:
+
+- **offsetX**: starting index for `x`.
+- **offsetP**: starting index for `prepend`.
+- **offsetA**: starting index for `append`.
+- **offsetOut**: starting index for `out`.
+- **offsetW**: starting index for `workspace`.
+
+While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, to access only the last three elements:
+
+
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+var p = new Complex128Array( [ 1.0, -1.0 ] );
+var a = new Complex128Array( [ 11.0, -11.0 ] );
+var out = new Complex128Array( 4 );
+var w = new Complex128Array( 4 );
+
+zdiff.ndarray( 3, 1, x, 1, x.length-3, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+// out => [ 5.0, -5.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+```
+
+
+
+
+
+
+
+## Notes
+
+- When `k <= 1`, the workspace array is unused and thus ignored.
+- If `N + N1 + N2 <= 1` or `k >= N + N1 + N2`, both functions return the output array unchanged.
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var zdiff = require( '@stdlib/blas/ext/base/zdiff' );
+
+var xbuf = discreteUniform( 20, -100, 100, {
+ 'dtype': 'float64'
+});
+var x = new Complex128Array( xbuf.buffer );
+console.log( 'Input array: ', x );
+
+var pbuf = discreteUniform( 4, -100, 100, {
+ 'dtype': 'float64'
+});
+var p = new Complex128Array( pbuf.buffer );
+console.log( 'Prepend array: ', p );
+
+var abuf = discreteUniform( 4, -100, 100, {
+ 'dtype': 'float64'
+});
+var a = new Complex128Array( abuf.buffer );
+console.log( 'Append array: ', a );
+
+var out = new Complex128Array( 10 );
+var w = new Complex128Array( 13 );
+
+zdiff( x.length, 4, x, 1, 2, p, 1, 2, a, 1, out, 1, w, 1 );
+console.log( 'Output: ', out );
+```
+
+
+
+
+
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+#include "stdlib/blas/ext/base/zdiff.h"
+```
+
+
+
+#### stdlib_strided_zdiff( N, k, \*X, strideX, N1, \*Prepend, strideP, N2, \*Append, strideA, \*Out, strideOut, \*Workspace, strideW )
+
+
+
+Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array.
+
+```c
+const double x[] = { 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 };
+const double p[] = { 1.0, -1.0 };
+const double a[] = { 11.0, -11.0 };
+double out[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+double w[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+
+stdlib_strided_zdiff( 5, 1, (void *)x, 1, 1, (void *)p, 1, 1, (void *)a, 1, (void *)out, 1, (void *)w, 1 );
+```
+
+The function accepts the following arguments:
+
+- **N**: `[in] CBLAS_INT` number of indexed elements.
+- **k**: `[in] CBLAS_INT` number of times to recursively compute differences.
+- **X**: `[in] void*` input array.
+- **strideX**: `[in] CBLAS_INT` stride length for `X`.
+- **N1**: `[in] CBLAS_INT` number of indexed elements to `Prepend`.
+- **Prepend**: `[in] void*` array containing values to prepend prior to computing differences.
+- **strideP**: `[in] CBLAS_INT` stride length for `Prepend`.
+- **N2**: `[in] CBLAS_INT` number of indexed elements to `Append`.
+- **Append**: `[in] void*` array containing values to append prior to computing differences.
+- **strideA**: `[in] CBLAS_INT` stride length for `Append`.
+- **Out**: `[out] void*` output array. Must have `N + N1 + N2 - k` elements.
+- **strideOut**: `[in] CBLAS_INT` stride length for `Out`.
+- **Workspace**: `[out] void*` workspace array. Must have `N + N1 + N2 - 1` elements.
+- **strideW**: `[in] CBLAS_INT` stride length for `Workspace`.
+
+```c
+void stdlib_strided_zdiff( const CBLAS_INT N, const CBLAS_INT k, const void *X, const CBLAS_INT strideX, const CBLAS_INT N1, const void *Prepend, const CBLAS_INT strideP, const CBLAS_INT N2, const void *Append, const CBLAS_INT strideA, void *Out, const CBLAS_INT strideOut, void *Workspace, const CBLAS_INT strideW );
+```
+
+
+
+#### stdlib_strided_zdiff_ndarray( N, k, \*X, strideX, offsetX, N1, \*Prepend, strideP, offsetP, N2, \*Append, strideA, offsetA, \*Out, strideOut, offsetOut, \*Workspace, strideW, offsetW )
+
+
+
+Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array using alternative indexing semantics.
+
+```c
+const double x[] = { 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 };
+const double p[] = { 1.0, -1.0 };
+const double a[] = { 11.0, -11.0 };
+double out[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+double w[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+
+stdlib_strided_zdiff_ndarray( 5, 1, (void *)x, 1, 0, 1, (void *)p, 1, 0, 1, (void *)a, 1, 0, (void *)out, 1, 0, (void *)w, 1, 0 );
+```
+
+The function accepts the following arguments:
+
+- **N**: `[in] CBLAS_INT` number of indexed elements.
+- **k**: `[in] CBLAS_INT` number of times to recursively compute differences.
+- **X**: `[in] void*` input array.
+- **strideX**: `[in] CBLAS_INT` stride length for `X`.
+- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
+- **N1**: `[in] CBLAS_INT` number of indexed elements to `Prepend`.
+- **Prepend**: `[in] void*` array containing values to prepend prior to computing differences.
+- **strideP**: `[in] CBLAS_INT` stride length for `Prepend`.
+- **offsetP**: `[in] CBLAS_INT` starting index for `Prepend`.
+- **N2**: `[in] CBLAS_INT` number of indexed elements to `Append`.
+- **Append**: `[in] void*` array containing values to append prior to computing differences.
+- **strideA**: `[in] CBLAS_INT` stride length for `Append`.
+- **offsetA**: `[in] CBLAS_INT` starting index for `Append`.
+- **Out**: `[out] void*` output array. Must have `N + N1 + N2 - k` elements.
+- **strideOut**: `[in] CBLAS_INT` stride length for `Out`.
+- **offsetOut**: `[in] CBLAS_INT` starting index for `Out`.
+- **Workspace**: `[out] void*` workspace array. Must have `N + N1 + N2 - 1` elements.
+- **strideW**: `[in] CBLAS_INT` stride length for `Workspace`.
+- **offsetW**: `[in] CBLAS_INT` starting index for `Workspace`.
+
+```c
+void stdlib_strided_zdiff_ndarray( const CBLAS_INT N, const CBLAS_INT k, const void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const CBLAS_INT N1, const void *Prepend, const CBLAS_INT strideP, const CBLAS_INT offsetP, const CBLAS_INT N2, const void *Append, const CBLAS_INT strideA, const CBLAS_INT offsetA, void *Out, const CBLAS_INT strideOut, const CBLAS_INT offsetOut, void *Workspace, const CBLAS_INT strideW, const CBLAS_INT offsetW );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Examples
+
+```c
+#include "stdlib/blas/ext/base/zdiff.h"
+#include
+
+int main( void ) {
+ // Create a strided array of interleaved real and imaginary components:
+ const double x[] = { 1.0, -1.0, 2.0, -2.0, 3.0, -3.0, 4.0, -4.0 };
+
+ // Define a list of values to prepend:
+ const double p[] = { 0.0, 0.0 };
+
+ // Define a list of values to append:
+ const double a[] = { 5.0, -5.0 };
+
+ // Define an output array:
+ double out[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+
+ // Define a workspace:
+ double w[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+
+ // Compute forward differences:
+ stdlib_strided_zdiff( 4, 1, (void *)x, 1, 1, (void *)p, 1, 1, (void *)a, 1, (void *)out, 1, (void *)w, 1 );
+
+ // Print the result:
+ for ( int i = 0; i < 10; i++ ) {
+ printf( "out[ %i ] = %lf\n", i, out[ i ] );
+ }
+}
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[@stdlib/array/complex128]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/complex128
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
+
+
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.js
new file mode 100644
index 000000000000..f4919c5fb3d5
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.js
@@ -0,0 +1,135 @@
+/**
+* @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 uniform = require( '@stdlib/random/array/uniform' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var zdiff = require( './../lib/zdiff.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var obuf;
+ var wbuf;
+ var xbuf;
+ var pbuf;
+ var abuf;
+ var ol;
+ var N1;
+ var N2;
+ var x;
+ var p;
+ var a;
+ var w;
+ var o;
+ var k;
+ var N;
+
+ N = len;
+ N1 = 1;
+ N2 = 1;
+ k = 1;
+ ol = N + N1 + N2 - k;
+
+ xbuf = uniform( N*2, -100.0, 100.0, options );
+ pbuf = uniform( N1*2, -100.0, 100.0, options );
+ abuf = uniform( N2*2, -100.0, 100.0, options );
+ wbuf = uniform( (N+N1+N2-1)*2, -100.0, 100.0, options );
+ obuf = uniform( ol*2, -100.0, 100.0, options );
+
+ x = new Complex128Array( xbuf.buffer );
+ p = new Complex128Array( pbuf.buffer );
+ a = new Complex128Array( abuf.buffer );
+ w = new Complex128Array( wbuf.buffer );
+ o = new Complex128Array( obuf.buffer );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ zdiff( N, k, x, 1, N1, p, 1, N2, a, 1, o, 1, w, 1 );
+ if ( isnan( obuf[ i%(ol*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( obuf[ i%(ol*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ 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( format( '%s:len=%d', pkg, len ), f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.native.js
new file mode 100644
index 000000000000..1031d91d8843
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.native.js
@@ -0,0 +1,140 @@
+/**
+* @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 uniform = require( '@stdlib/random/array/uniform' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var format = require( '@stdlib/string/format' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+var zdiff = tryRequire( resolve( __dirname, './../lib/zdiff.native.js' ) );
+var opts = {
+ 'skip': ( zdiff instanceof Error )
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var obuf;
+ var wbuf;
+ var xbuf;
+ var pbuf;
+ var abuf;
+ var ol;
+ var N1;
+ var N2;
+ var x;
+ var p;
+ var a;
+ var w;
+ var o;
+ var k;
+ var N;
+
+ N = len;
+ N1 = 1;
+ N2 = 1;
+ k = 1;
+ ol = N + N1 + N2 - k;
+
+ xbuf = uniform( N*2, -100.0, 100.0, options );
+ pbuf = uniform( N1*2, -100.0, 100.0, options );
+ abuf = uniform( N2*2, -100.0, 100.0, options );
+ wbuf = uniform( (N+N1+N2-1)*2, -100.0, 100.0, options );
+ obuf = uniform( ol*2, -100.0, 100.0, options );
+
+ x = new Complex128Array( xbuf.buffer );
+ p = new Complex128Array( pbuf.buffer );
+ a = new Complex128Array( abuf.buffer );
+ w = new Complex128Array( wbuf.buffer );
+ o = new Complex128Array( obuf.buffer );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ zdiff( N, k, x, 1, N1, p, 1, N2, a, 1, o, 1, w, 1 );
+ if ( isnan( obuf[ i%(ol*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( obuf[ i%(ol*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ 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( format( '%s::native:len=%d', pkg, len ), opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..81061f4010e9
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.ndarray.js
@@ -0,0 +1,135 @@
+/**
+* @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 uniform = require( '@stdlib/random/array/uniform' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var zdiff = require( './../lib/ndarray.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var obuf;
+ var wbuf;
+ var xbuf;
+ var pbuf;
+ var abuf;
+ var ol;
+ var N1;
+ var N2;
+ var x;
+ var p;
+ var a;
+ var w;
+ var o;
+ var k;
+ var N;
+
+ N = len;
+ N1 = 1;
+ N2 = 1;
+ k = 1;
+ ol = N + N1 + N2 - k;
+
+ xbuf = uniform( N*2, -100.0, 100.0, options );
+ pbuf = uniform( N1*2, -100.0, 100.0, options );
+ abuf = uniform( N2*2, -100.0, 100.0, options );
+ wbuf = uniform( (N+N1+N2-1)*2, -100.0, 100.0, options );
+ obuf = uniform( ol*2, -100.0, 100.0, options );
+
+ x = new Complex128Array( xbuf.buffer );
+ p = new Complex128Array( pbuf.buffer );
+ a = new Complex128Array( abuf.buffer );
+ w = new Complex128Array( wbuf.buffer );
+ o = new Complex128Array( obuf.buffer );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ zdiff( N, k, x, 1, 0, N1, p, 1, 0, N2, a, 1, 0, o, 1, 0, w, 1, 0 );
+ if ( isnan( obuf[ i%(ol*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( obuf[ i%(ol*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ 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( format( '%s:ndarray:len=%d', pkg, len ), f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.ndarray.native.js
new file mode 100644
index 000000000000..163f91f22f90
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/benchmark.ndarray.native.js
@@ -0,0 +1,140 @@
+/**
+* @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 uniform = require( '@stdlib/random/array/uniform' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var format = require( '@stdlib/string/format' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+var zdiff = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( zdiff instanceof Error )
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var obuf;
+ var wbuf;
+ var xbuf;
+ var pbuf;
+ var abuf;
+ var ol;
+ var N1;
+ var N2;
+ var x;
+ var p;
+ var a;
+ var w;
+ var o;
+ var k;
+ var N;
+
+ N = len;
+ N1 = 1;
+ N2 = 1;
+ k = 1;
+ ol = N + N1 + N2 - k;
+
+ xbuf = uniform( N*2, -100.0, 100.0, options );
+ pbuf = uniform( N1*2, -100.0, 100.0, options );
+ abuf = uniform( N2*2, -100.0, 100.0, options );
+ wbuf = uniform( (N+N1+N2-1)*2, -100.0, 100.0, options );
+ obuf = uniform( ol*2, -100.0, 100.0, options );
+
+ x = new Complex128Array( xbuf.buffer );
+ p = new Complex128Array( pbuf.buffer );
+ a = new Complex128Array( abuf.buffer );
+ w = new Complex128Array( wbuf.buffer );
+ o = new Complex128Array( obuf.buffer );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ zdiff( N, k, x, 1, 0, N1, p, 1, 0, N2, a, 1, 0, o, 1, 0, w, 1, 0 );
+ if ( isnan( obuf[ i%(ol*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( obuf[ i%(ol*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ 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( format( '%s::native:ndarray:len=%d', pkg, len ), opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/c/Makefile b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/c/Makefile
new file mode 100644
index 000000000000..0756dc7da20a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/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 := benchmark.length.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/blas/ext/base/zdiff/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/c/benchmark.length.c
new file mode 100644
index 000000000000..2707fb8529dd
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/benchmark/c/benchmark.length.c
@@ -0,0 +1,281 @@
+/**
+* @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/blas/ext/base/zdiff.h"
+#include
+#include
+#include
+#include
+#include
+
+#define NAME "zdiff"
+#define ITERATIONS 1000000
+#define REPEATS 3
+#define MIN 1
+#define MAX 6
+
+/**
+* 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 iterations number of iterations
+* @param elapsed elapsed time in seconds
+*/
+static void print_results( int iterations, 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.
+*
+* @param iterations number of iterations
+* @param len array length
+* @return elapsed time in seconds
+*/
+static double benchmark1( int iterations, int len ) {
+ double elapsed;
+ double *x;
+ double *p;
+ double *a;
+ double *o;
+ double *w;
+ double t;
+ int wl;
+ int ol;
+ int N1;
+ int N2;
+ int k;
+ int N;
+ int i;
+
+ N = len;
+ N1 = 1;
+ N2 = 1;
+ k = 1;
+ ol = N + N1 + N2 - k;
+ wl = N + N1 + N2 - 1;
+
+ x = (double *) malloc( N * 2 * sizeof( double ) );
+ for ( i = 0; i < N*2; i++ ) {
+ x[ i ] = ( rand_double()*200.0 ) - 100.0;
+ }
+
+ p = (double *) malloc( N1 * 2 * sizeof( double ) );
+ for ( i = 0; i < N1*2; i++ ) {
+ p[ i ] = ( rand_double()*200.0 ) - 100.0;
+ }
+
+ a = (double *) malloc( N2 * 2 * sizeof( double ) );
+ for ( i = 0; i < N2*2; i++ ) {
+ a[ i ] = ( rand_double()*200.0 ) - 100.0;
+ }
+
+ w = (double *) malloc( wl * 2 * sizeof( double ) );
+ for ( i = 0; i < wl*2; i++ ) {
+ w[ i ] = ( rand_double()*200.0 ) - 100.0;
+ }
+
+ o = (double *) malloc( ol * 2 * sizeof( double ) );
+ for ( i = 0; i < ol*2; i++ ) {
+ o[ i ] = ( rand_double()*200.0 ) - 100.0;
+ }
+
+ t = tic();
+ for ( i = 0; i < iterations; i++ ) {
+ // cppcheck-suppress uninitvar
+ stdlib_strided_zdiff( N, k, (void *)x, 1, N1, (void *)p, 1, N2, (void *)a, 1, (void *)o, 1, (void *)w, 1 );
+ if ( o[ 0 ] != o[ 0 ] ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( o[ (ol*2)-1 ] != o[ (ol*2)-1 ] ) {
+ printf( "should not return NaN\n" );
+ }
+ free( x );
+ free( p );
+ free( a );
+ free( w );
+ free( o );
+ return elapsed;
+}
+
+/**
+* Runs a benchmark.
+*
+* @param iterations number of iterations
+* @param len array length
+* @return elapsed time in seconds
+*/
+static double benchmark2( int iterations, int len ) {
+ double elapsed;
+ double *x;
+ double *p;
+ double *a;
+ double *o;
+ double *w;
+ double t;
+ int wl;
+ int ol;
+ int N1;
+ int N2;
+ int k;
+ int N;
+ int i;
+
+ N = len;
+ N1 = 1;
+ N2 = 1;
+ k = 1;
+ ol = N + N1 + N2 - k;
+ wl = N + N1 + N2 - 1;
+
+ x = (double *) malloc( N * 2 * sizeof( double ) );
+ for ( i = 0; i < N*2; i++ ) {
+ x[ i ] = ( rand_double()*200.0 ) - 100.0;
+ }
+
+ p = (double *) malloc( N1 * 2 * sizeof( double ) );
+ for ( i = 0; i < N1*2; i++ ) {
+ p[ i ] = ( rand_double()*200.0 ) - 100.0;
+ }
+
+ a = (double *) malloc( N2 * 2 * sizeof( double ) );
+ for ( i = 0; i < N2*2; i++ ) {
+ a[ i ] = ( rand_double()*200.0 ) - 100.0;
+ }
+
+ w = (double *) malloc( wl * 2 * sizeof( double ) );
+ for ( i = 0; i < wl*2; i++ ) {
+ w[ i ] = ( rand_double()*200.0 ) - 100.0;
+ }
+
+ o = (double *) malloc( ol * 2 * sizeof( double ) );
+ for ( i = 0; i < ol*2; i++ ) {
+ o[ i ] = ( rand_double()*200.0 ) - 100.0;
+ }
+
+ t = tic();
+ for ( i = 0; i < iterations; i++ ) {
+ // cppcheck-suppress uninitvar
+ stdlib_strided_zdiff_ndarray( N, k, (void *)x, 1, 0, N1, (void *)p, 1, 0, N2, (void *)a, 1, 0, (void *)o, 1, 0, (void *)w, 1, 0 );
+ if ( o[ 0 ] != o[ 0 ] ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( o[ (ol*2)-1 ] != o[ (ol*2)-1 ] ) {
+ printf( "should not return NaN\n" );
+ }
+ free( x );
+ free( p );
+ free( a );
+ free( w );
+ free( o );
+ return elapsed;
+}
+
+/**
+* Main execution sequence.
+*/
+int main( void ) {
+ double elapsed;
+ int count;
+ int iter;
+ int len;
+ int i;
+ int j;
+
+ // Use the current time to seed the random number generator:
+ srand( time( NULL ) );
+
+ print_version();
+ count = 0;
+ for ( i = MIN; i <= MAX; i++ ) {
+ len = pow( 10, i );
+ iter = ITERATIONS / pow( 10, i-1 );
+ for ( j = 0; j < REPEATS; j++ ) {
+ count += 1;
+ printf( "# c::%s:len=%d\n", NAME, len );
+ elapsed = benchmark1( iter, len );
+ print_results( iter, elapsed );
+ printf( "ok %d benchmark finished\n", count );
+ }
+ }
+ for ( i = MIN; i <= MAX; i++ ) {
+ len = pow( 10, i );
+ iter = ITERATIONS / pow( 10, i-1 );
+ for ( j = 0; j < REPEATS; j++ ) {
+ count += 1;
+ printf( "# c::%s:ndarray:len=%d\n", NAME, len );
+ elapsed = benchmark2( iter, len );
+ print_results( iter, elapsed );
+ printf( "ok %d benchmark finished\n", count );
+ }
+ }
+ print_summary( count, count );
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/binding.gyp b/lib/node_modules/@stdlib/blas/ext/base/zdiff/binding.gyp
new file mode 100644
index 000000000000..60dce9d0b31a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/binding.gyp
@@ -0,0 +1,265 @@
+# @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',
+
+ # Fortran compiler (to override -Dfortran_compiler=):
+ 'fortran_compiler%': 'gfortran',
+
+ # Fortran compiler flags:
+ 'fflags': [
+ # Specify the Fortran standard to which a program is expected to conform:
+ '-std=f95',
+
+ # Indicate that the layout is free-form source code:
+ '-ffree-form',
+
+ # Aggressive optimization:
+ '-O3',
+
+ # Enable commonly used warning options:
+ '-Wall',
+
+ # Warn if source code contains problematic language features:
+ '-Wextra',
+
+ # Warn if a procedure is called without an explicit interface:
+ '-Wimplicit-interface',
+
+ # Do not transform names of entities specified in Fortran source files by appending underscores (i.e., don't mangle names, thus allowing easier usage in C wrappers):
+ '-fno-underscoring',
+
+ # Warn if source code contains Fortran 95 extensions and C-language constructs:
+ '-pedantic',
+
+ # Compile but do not link (output is an object file):
+ '-c',
+ ],
+
+ # 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
+
+ # Define custom build actions for particular inputs:
+ 'rules': [
+ {
+ # Define a rule for processing Fortran files:
+ 'extension': 'f',
+
+ # Define the pathnames to be used as inputs when performing processing:
+ 'inputs': [
+ # Full path of the current input:
+ '<(RULE_INPUT_PATH)'
+ ],
+
+ # Define the outputs produced during processing:
+ 'outputs': [
+ # Store an output object file in a directory for placing intermediate results (only accessible within a single target):
+ '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).<(obj)'
+ ],
+
+ # Define the rule for compiling Fortran based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="win"',
+
+ # Rule to compile Fortran on Windows:
+ {
+ 'rule_name': 'compile_fortran_windows',
+ 'message': 'Compiling Fortran file <(RULE_INPUT_PATH) on Windows...',
+
+ 'process_outputs_as_sources': 0,
+
+ # Define the command-line invocation:
+ 'action': [
+ '<(fortran_compiler)',
+ '<@(fflags)',
+ '<@(_inputs)',
+ '-o',
+ '<@(_outputs)',
+ ],
+ },
+
+ # Rule to compile Fortran on non-Windows:
+ {
+ 'rule_name': 'compile_fortran_linux',
+ 'message': 'Compiling Fortran file <(RULE_INPUT_PATH) on Linux...',
+
+ 'process_outputs_as_sources': 1,
+
+ # Define the command-line invocation:
+ 'action': [
+ '<(fortran_compiler)',
+ '<@(fflags)',
+ '-fPIC', # generate platform-independent code
+ '<@(_inputs)',
+ '-o',
+ '<@(_outputs)',
+ ],
+ }
+ ], # end condition (OS=="win")
+ ], # end conditions
+ }, # end rule (extension=="f")
+ ], # end rules
+ }, # 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/blas/ext/base/zdiff/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/zdiff/docs/repl.txt
new file mode 100644
index 000000000000..f8a58116b96f
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/docs/repl.txt
@@ -0,0 +1,173 @@
+
+{{alias}}( N, k, x,sx, N1,p,sp, N2,a,sa, out,so, w,sw )
+ Calculates the k-th discrete forward differences of a double-precision
+ complex floating-point strided array.
+
+ The `N` and stride parameters determine which elements in the strided arrays
+ are accessed at runtime.
+
+ Indexing is relative to the first index. To introduce an offset, use a typed
+ array view.
+
+ If `N + N1 + N2 <= 1` or `k >= N + N1 + N2`, the function returns the
+ output array unchanged.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ k: integer
+ Number of times to recursively compute differences.
+
+ x: Complex128Array
+ Input array.
+
+ sx: integer
+ Stride length for `x`.
+
+ N1: integer
+ Number of elements to prepend.
+
+ p: Complex128Array
+ Array containing values to prepend prior to computing differences.
+
+ sp: integer
+ Stride length for `p`.
+
+ N2: integer
+ Number of elements to append.
+
+ a: Complex128Array
+ Array containing values to append prior to computing differences.
+
+ sa: integer
+ Stride length for `a`.
+
+ out: Complex128Array
+ Output array. Must have `N + N1 + N2 - k` indexed elements.
+
+ so: integer
+ Stride length for `out`.
+
+ w: Complex128Array
+ Workspace array. Must have `N + N1 + N2 - 1` indexed elements.
+
+ sw: integer
+ Stride length for `w`.
+
+ Returns
+ -------
+ out: Complex128Array
+ Output array.
+
+ Examples
+ --------
+ // Standard usage:
+ > var x = new {{alias:@stdlib/array/complex128}}( [ 2.0, 3.0, 4.0, 7.0 ] );
+ > var p = new {{alias:@stdlib/array/complex128}}( [ 1.0, 1.0 ] );
+ > var a = new {{alias:@stdlib/array/complex128}}( [ 5.0, 9.0 ] );
+ > var out = new {{alias:@stdlib/array/complex128}}( 3 );
+ > var w = new {{alias:@stdlib/array/complex128}}( 3 );
+ > {{alias}}( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 )
+ [ 1.0, 2.0, 2.0, 4.0, 1.0, 2.0 ]
+
+ // Using `N` and stride parameters:
+ > out = new {{alias:@stdlib/array/complex128}}( 3 );
+ > w = new {{alias:@stdlib/array/complex128}}( 3 );
+ > {{alias}}( x.length, 1, x, -1, 1, p, 1, 1, a, 1, out, 1, w, 1 )
+ [ 3.0, 6.0, -2.0, -4.0, 3.0, 6.0 ]
+
+
+{{alias}}.ndarray( N, k, x,sx,ox, N1, p,sp,op, N2, a,sa,oa, out,so,oo, w,sw,ow )
+ Calculates the k-th discrete forward differences of a double-precision
+ complex floating-point strided array using alternative indexing semantics.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, the offset parameters support indexing semantics based on starting
+ indices.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ k: integer
+ Number of times to recursively compute differences.
+
+ x: Complex128Array
+ Input array.
+
+ sx: integer
+ Stride length for `x`.
+
+ ox: integer
+ Starting index for `x`.
+
+ N1: integer
+ Number of elements to prepend.
+
+ p: Complex128Array
+ Array containing values to prepend prior to computing differences.
+
+ sp: integer
+ Stride length for `p`.
+
+ op: integer
+ Starting index for `p`.
+
+ N2: integer
+ Number of elements to append.
+
+ a: Complex128Array
+ Array containing values to append prior to computing differences.
+
+ sa: integer
+ Stride length for `a`.
+
+ oa: integer
+ Starting index for `a`.
+
+ out: Complex128Array
+ Output array. Must have `N + N1 + N2 - k` indexed elements.
+
+ so: integer
+ Stride length for `out`.
+
+ oo: integer
+ Starting index for `out`.
+
+ w: Complex128Array
+ Workspace array. Must have `N + N1 + N2 - 1` indexed elements.
+
+ sw: integer
+ Stride length for `w`.
+
+ ow: integer
+ Starting index for `w`.
+
+ Returns
+ -------
+ out: Complex128Array
+ Output array.
+
+ Examples
+ --------
+ // Standard usage:
+ > var x = new {{alias:@stdlib/array/complex128}}( [ 2.0, 3.0, 4.0, 7.0 ] );
+ > var p = new {{alias:@stdlib/array/complex128}}( [ 1.0, 1.0 ] );
+ > var a = new {{alias:@stdlib/array/complex128}}( [ 5.0, 9.0 ] );
+ > var out = new {{alias:@stdlib/array/complex128}}( 3 );
+ > var w = new {{alias:@stdlib/array/complex128}}( 3 );
+ > {{alias}}.ndarray( 2, 1, x,1,0, 1, p,1,0, 1, a,1,0, out,1,0, w,1,0 )
+ [ 1.0, 2.0, 2.0, 4.0, 1.0, 2.0 ]
+
+ // Advanced indexing:
+ > out = new {{alias:@stdlib/array/complex128}}( 2 );
+ > w = new {{alias:@stdlib/array/complex128}}( 2 );
+ > {{alias}}.ndarray( 1, 1, x,1,1, 1, p,1,0, 1, a,1,0, out,1,0, w,1,0 )
+ [ 3.0, 6.0, 1.0, 2.0 ]
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/zdiff/docs/types/index.d.ts
new file mode 100644
index 000000000000..ac43955eb68a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/docs/types/index.d.ts
@@ -0,0 +1,164 @@
+/*
+* @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
+
+///
+
+import { Complex128Array } from '@stdlib/types/array';
+
+/**
+* Interface describing `zdiff`.
+*/
+interface Routine {
+ /**
+ * Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array.
+ *
+ * ## Notes
+ *
+ * - The `out` array must have `N + N1 + N2 - k` elements.
+ * - The `workspace` array must have `N + N1 + N2 - 1` elements.
+ *
+ * @param N - number of indexed elements
+ * @param k - number of times to recursively compute differences
+ * @param x - input array
+ * @param strideX - stride length for `x`
+ * @param N1 - number of indexed elements to `prepend`
+ * @param prepend - prepend array
+ * @param strideP - stride length for `prepend`
+ * @param N2 - number of indexed elements to `append`
+ * @param append - append array
+ * @param strideA - stride length for `append`
+ * @param out - output array
+ * @param strideOut - stride length for `out`
+ * @param workspace - workspace array
+ * @param strideW - stride length for `workspace`
+ * @returns output array
+ *
+ * @example
+ * var Complex128Array = require( '@stdlib/array/complex128' );
+ *
+ * var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+ * var p = new Complex128Array( [ 1.0, -1.0 ] );
+ * var a = new Complex128Array( [ 11.0, -11.0 ] );
+ * var out = new Complex128Array( 6 );
+ * var w = new Complex128Array( 6 );
+ *
+ * zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+ * // out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+ */
+ ( N: number, k: number, x: Complex128Array, strideX: number, N1: number, prepend: Complex128Array, strideP: number, N2: number, append: Complex128Array, strideA: number, out: Complex128Array, strideOut: number, workspace: Complex128Array, strideW: number ): Complex128Array;
+
+ /**
+ * Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array using alternative indexing semantics.
+ *
+ * ## Notes
+ *
+ * - The `out` array must have `N + N1 + N2 - k` elements.
+ * - The `workspace` array must have `N + N1 + N2 - 1` elements.
+ *
+ * @param N - number of indexed elements
+ * @param k - number of times to recursively compute differences
+ * @param x - input array
+ * @param strideX - stride length for `x`
+ * @param offsetX - starting index for `x`
+ * @param N1 - number of indexed elements to `prepend`
+ * @param prepend - prepend array
+ * @param strideP - stride length for `prepend`
+ * @param offsetP - starting index for `prepend`
+ * @param N2 - number of indexed elements to `append`
+ * @param append - append array
+ * @param strideA - stride length for `append`
+ * @param offsetA - starting index for `append`
+ * @param out - output array
+ * @param strideOut - stride length for `out`
+ * @param offsetOut - starting index for `out`
+ * @param workspace - workspace array
+ * @param strideW - stride length for `workspace`
+ * @param offsetW - starting index for `workspace`
+ * @returns output array
+ *
+ * @example
+ * var Complex128Array = require( '@stdlib/array/complex128' );
+ *
+ * var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+ * var p = new Complex128Array( [ 1.0, -1.0 ] );
+ * var a = new Complex128Array( [ 11.0, -11.0 ] );
+ * var out = new Complex128Array( 6 );
+ * var w = new Complex128Array( 6 );
+ *
+ * zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+ * // out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+ */
+ ndarray( N: number, k: number, x: Complex128Array, strideX: number, offsetX: number, N1: number, prepend: Complex128Array, strideP: number, offsetP: number, N2: number, append: Complex128Array, strideA: number, offsetA: number, out: Complex128Array, strideOut: number, offsetOut: number, workspace: Complex128Array, strideW: number, offsetW: number ): Complex128Array;
+}
+
+/**
+* Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array.
+*
+* ## Notes
+*
+* - The `out` array must have `N + N1 + N2 - k` elements.
+* - The `workspace` array must have `N + N1 + N2 - 1` elements.
+*
+* @param N - number of indexed elements
+* @param k - number of times to recursively compute differences
+* @param x - input array
+* @param strideX - stride length for `x`
+* @param N1 - number of indexed elements to `prepend`
+* @param prepend - prepend array
+* @param strideP - stride length for `prepend`
+* @param N2 - number of indexed elements to `append`
+* @param append - append array
+* @param strideA - stride length for `append`
+* @param out - output array
+* @param strideOut - stride length for `out`
+* @param workspace - workspace array
+* @param strideW - stride length for `workspace`
+* @returns output array
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+* var p = new Complex128Array( [ 1.0, -1.0 ] );
+* var a = new Complex128Array( [ 11.0, -11.0 ] );
+* var out = new Complex128Array( 6 );
+* var w = new Complex128Array( 6 );
+*
+* zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+* // out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+* var p = new Complex128Array( [ 1.0, -1.0 ] );
+* var a = new Complex128Array( [ 11.0, -11.0 ] );
+* var out = new Complex128Array( 6 );
+* var w = new Complex128Array( 6 );
+*
+* zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+* // out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+*/
+declare var zdiff: Routine;
+
+
+// EXPORTS //
+
+export = zdiff;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/zdiff/docs/types/test.ts
new file mode 100644
index 000000000000..987deb3401a1
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/docs/types/test.ts
@@ -0,0 +1,688 @@
+/*
+* @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.
+*/
+
+/* eslint-disable space-in-parens */
+
+import Complex128Array = require( '@stdlib/array/complex128' );
+import zdiff = require( './index' );
+
+
+// TESTS //
+
+// The function returns a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectType Complex128Array
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( '10', 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( true, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( false, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( null, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( undefined, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( [], 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( {}, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( ( x: number ): number => x, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, '10', x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, true, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, false, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, null, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, undefined, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, [], x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, {}, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, ( x: number ): number => x, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, '10', 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, true, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, false, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, null, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, undefined, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, [], 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, {}, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, ( x: number ): number => x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, x, '10', 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, true, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, false, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, null, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, undefined, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, [], 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, {}, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, ( x: number ): number => x, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fifth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, x, 1, '10', p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, true, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, false, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, null, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, undefined, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, [], p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, {}, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, ( x: number ): number => x, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a sixth argument which is not a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, x, 1, 1, '10', 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, true, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, false, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, null, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, undefined, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, [], 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, {}, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, ( x: number ): number => x, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a seventh argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, x, 1, 1, p, '10', 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, true, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, false, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, null, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, undefined, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, [], 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, {}, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, ( x: number ): number => x, 1, a, 1, out, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eighth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, '10', a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, true, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, false, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, null, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, undefined, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, [], a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, {}, a, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, ( x: number ): number => x, a, 1, out, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a ninth argument which is not a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, '10', 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, true, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, false, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, null, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, undefined, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, [], 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, {}, 1, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, ( x: number ): number => x, 1, out, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a tenth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, '10', out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, true, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, false, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, null, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, undefined, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, [], out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, {}, out, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, ( x: number ): number => x, out, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eleventh argument which is not a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const w = new Complex128Array( 9 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, '10', 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, true, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, false, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, null, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, undefined, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, [], 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, {}, 1, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, ( x: number ): number => x, 1, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a twelfth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, '10', w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, true, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, false, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, null, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, undefined, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, [], w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, {}, w, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, ( x: number ): number => x, w, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a thirteenth argument which is not a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 9 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, '10', 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, true, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, false, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, null, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, undefined, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, [], 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, {}, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, ( x: number ): number => x, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourteenth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, '10' ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, true ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, false ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, null ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, undefined ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, [] ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, {} ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff(); // $ExpectError
+ zdiff( x.length ); // $ExpectError
+ zdiff( x.length, 1 ); // $ExpectError
+ zdiff( x.length, 1, x ); // $ExpectError
+ zdiff( x.length, 1, x, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1 ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w ); // $ExpectError
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1, {} ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectType Complex128Array
+}
+
+// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( '10', 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( true, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( false, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( null, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( undefined, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( [], 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( {}, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( ( x: number ): number => x, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a second argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, '10', x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, true, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, false, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, null, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, undefined, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, [], x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, {}, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, ( x: number ): number => x, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a third argument which is not a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, '10', 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, true, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, false, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, null, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, undefined, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, [], 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, {}, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, ( x: number ): number => x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, '10', 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, true, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, false, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, null, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, undefined, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, [], 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, {}, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, ( x: number ): number => x, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, '10', 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, true, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, false, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, null, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, undefined, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, [], 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, {}, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, ( x: number ): number => x, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, '10', p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, true, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, false, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, null, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, undefined, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, [], p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, {}, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, ( x: number ): number => x, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, '10', 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, true, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, false, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, null, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, undefined, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, [], 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, {}, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, ( x: number ): number => x, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, '10', 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, true, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, false, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, null, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, undefined, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, [], 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, {}, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, ( x: number ): number => x, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a ninth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, '10', 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, true, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, false, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, null, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, undefined, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, [], 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, {}, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, ( x: number ): number => x, 1, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a tenth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, '10', a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, true, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, false, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, null, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, undefined, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, [], a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, {}, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, ( x: number ): number => x, a, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an eleventh argument which is not a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 9 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, '10', 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, true, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, false, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, null, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, undefined, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, [], 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, {}, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, ( x: number ): number => x, 1, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a twelfth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, '10', 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, true, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, false, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, null, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, undefined, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, [], 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, {}, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, ( x: number ): number => x, 0, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a thirteenth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 9 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, '10', out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, true, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, false, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, null, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, undefined, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, [], out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, {}, out, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, ( x: number ): number => x, out, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourteenth argument which is not a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, '10', 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, true, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, false, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, null, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, undefined, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, [], 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, {}, 1, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, ( x: number ): number => x, 1, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fifteenth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, '10', 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, true, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, false, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, null, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, undefined, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, [], 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, {}, 0, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, ( x: number ): number => x, 0, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a sixteenth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, '10', w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, true, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, false, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, null, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, undefined, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, [], w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, {}, w, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, ( x: number ): number => x, w, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a seventeenth argument which is not a Complex128Array...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, '10', 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, true, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, false, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, null, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, undefined, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, [], 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, {}, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an eighteenth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, '10', 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, true, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, false, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, null, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, undefined, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, [], 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, {}, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, ( x: number ): number => x, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a nineteenth argument which is not a number...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 0, '10' ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 0, true ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 0, false ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 0, null ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 0, undefined ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 0, [] ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 0, {} ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 0, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const x = new Complex128Array( 10 );
+ const p = new Complex128Array( 1 );
+ const a = new Complex128Array( 1 );
+ const out = new Complex128Array( 11 );
+ const w = new Complex128Array( 11 );
+
+ zdiff.ndarray(); // $ExpectError
+ zdiff.ndarray( x.length ); // $ExpectError
+ zdiff.ndarray( x.length, 1 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1 ); // $ExpectError
+ zdiff.ndarray( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0, {} ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/examples/c/Makefile b/lib/node_modules/@stdlib/blas/ext/base/zdiff/examples/c/Makefile
new file mode 100644
index 000000000000..c8f8e9a1517b
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/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/blas/ext/base/zdiff/examples/c/example.c b/lib/node_modules/@stdlib/blas/ext/base/zdiff/examples/c/example.c
new file mode 100644
index 000000000000..25e26c840f5c
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/examples/c/example.c
@@ -0,0 +1,45 @@
+/**
+* @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/blas/ext/base/zdiff.h"
+#include
+
+int main( void ) {
+ // Create a strided array of interleaved real and imaginary components:
+ const double x[] = { 1.0, -1.0, 2.0, -2.0, 3.0, -3.0, 4.0, -4.0 };
+
+ // Define a list of values to prepend:
+ const double p[] = { 0.0, 0.0 };
+
+ // Define a list of values to append:
+ const double a[] = { 5.0, -5.0 };
+
+ // Define the output array:
+ double out[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+
+ // Define a workspace:
+ double w[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+
+ // Compute forward differences:
+ stdlib_strided_zdiff( 4, 1, (void *)x, 1, 1, (void *)p, 1, 1, (void *)a, 1, (void *)out, 1, (void *)w, 1 );
+
+ // Print the result:
+ for ( int i = 0; i < 10; i++ ) {
+ printf( "out[ %i ] = %lf\n", i, out[ i ] );
+ }
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/examples/index.js
new file mode 100644
index 000000000000..3da1647ebc77
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/examples/index.js
@@ -0,0 +1,47 @@
+/**
+* @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 discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var zdiff = require( './../lib' );
+
+var xbuf = discreteUniform( 20, -100, 100, {
+ 'dtype': 'float64'
+});
+var x = new Complex128Array( xbuf.buffer );
+console.log( 'Input array: ', x );
+
+var pbuf = discreteUniform( 4, -100, 100, {
+ 'dtype': 'float64'
+});
+var p = new Complex128Array( pbuf.buffer );
+console.log( 'Prepend array: ', p );
+
+var abuf = discreteUniform( 4, -100, 100, {
+ 'dtype': 'float64'
+});
+var a = new Complex128Array( abuf.buffer );
+console.log( 'Append array: ', a );
+
+var out = new Complex128Array( 10 );
+var w = new Complex128Array( 13 );
+
+zdiff( x.length, 4, x, 1, 2, p, 1, 2, a, 1, out, 1, w, 1 );
+console.log( 'Output: ', out );
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/include.gypi b/lib/node_modules/@stdlib/blas/ext/base/zdiff/include.gypi
new file mode 100644
index 000000000000..bee8d41a2caf
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/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 ) {
+ rprev = pv[ ip ];
+ iprev = pv[ ip+1 ];
+ for ( i = 1; i < N1; i++ ) {
+ ip += sp;
+ rcurr = pv[ ip ];
+ icurr = pv[ ip+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ }
+ if ( N > 0 ) {
+ rcurr = xv[ ix ];
+ icurr = xv[ ix+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ } else if ( N2 > 0 ) {
+ rcurr = av[ ia ];
+ icurr = av[ ia+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ }
+ } else if ( N > 0 ) {
+ rprev = xv[ ix ];
+ iprev = xv[ ix+1 ];
+ } else {
+ rprev = av[ ia ];
+ iprev = av[ ia+1 ];
+ }
+ // Compute forward differences over the input array:
+ if ( N > 0 ) {
+ ix += sx;
+ for ( i = 1; i < N; i++ ) {
+ rcurr = xv[ ix ];
+ icurr = xv[ ix+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ ix += sx;
+ }
+ if ( N2 > 0 ) {
+ rcurr = av[ ia ];
+ icurr = av[ ia+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ }
+ }
+ // Compute forward differences over the list of appended values:
+ if ( N2 > 0 ) {
+ ia += sa;
+ for ( i = 1; i < N2; i++ ) {
+ rcurr = av[ ia ];
+ icurr = av[ ia+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ ia += sa;
+ }
+ }
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = base;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/index.js
new file mode 100644
index 000000000000..e1a7e2fb88be
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/index.js
@@ -0,0 +1,63 @@
+/**
+* @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';
+
+/**
+* Calculate the k-th discrete forward difference of a double-precision complex floating-point strided array.
+*
+* @module @stdlib/blas/ext/base/zdiff
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var zdiff = require( '@stdlib/blas/ext/base/zdiff' );
+*
+* var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+* var p = new Complex128Array( [ 1.0, -1.0 ] );
+* var a = new Complex128Array( [ 11.0, -11.0 ] );
+* var out = new Complex128Array( 6 );
+* var w = new Complex128Array( 6 );
+*
+* zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+* // out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+*/
+
+// MODULES //
+
+var join = require( 'path' ).join;
+var tryRequire = require( '@stdlib/utils/try-require' );
+var isError = require( '@stdlib/assert/is-error' );
+var main = require( './main.js' );
+
+
+// MAIN //
+
+var zdiff;
+var tmp = tryRequire( join( __dirname, './native.js' ) );
+if ( isError( tmp ) ) {
+ zdiff = main;
+} else {
+ zdiff = tmp;
+}
+
+
+// EXPORTS //
+
+module.exports = zdiff;
+
+// exports: { "ndarray": "zdiff.ndarray" }
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/main.js
new file mode 100644
index 000000000000..6546d39371cf
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/main.js
@@ -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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var zdiff = require( './zdiff.js' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+setReadOnly( zdiff, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = zdiff;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/native.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/native.js
new file mode 100644
index 000000000000..ec0720423959
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/native.js
@@ -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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var zdiff = require( './zdiff.native.js' );
+var ndarray = require( './ndarray.native.js' );
+
+
+// MAIN //
+
+setReadOnly( zdiff, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = zdiff;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/ndarray.js
new file mode 100644
index 000000000000..5fd86124168e
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/ndarray.js
@@ -0,0 +1,117 @@
+/**
+* @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.
+*/
+
+/* eslint-disable max-params, max-len */
+
+'use strict';
+
+// MODULES //
+
+var zcopy = require( '@stdlib/blas/base/zcopy' ).ndarray;
+var base = require( './base.js' );
+
+
+// MAIN //
+
+/**
+* Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array using alternative indexing semantics.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {NonNegativeInteger} k - number of times to recursively compute differences
+* @param {Complex128Array} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {NonNegativeInteger} offsetX - starting index for `x`
+* @param {NonNegativeInteger} N1 - number of indexed elements to `prepend`
+* @param {Complex128Array} prepend - prepend array
+* @param {integer} strideP - stride length for `prepend`
+* @param {NonNegativeInteger} offsetP - starting index for `prepend`
+* @param {NonNegativeInteger} N2 - number of indexed elements to `append`
+* @param {Complex128Array} append - append array
+* @param {integer} strideA - stride length for `append`
+* @param {NonNegativeInteger} offsetA - starting index for `append`
+* @param {Complex128Array} out - output array
+* @param {integer} strideOut - stride length for `out`
+* @param {NonNegativeInteger} offsetOut - starting index for `out`
+* @param {Complex128Array} workspace - workspace array
+* @param {integer} strideW - stride length for `workspace`
+* @param {NonNegativeInteger} offsetW - starting index for `workspace`
+* @returns {Complex128Array} output array
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+* var p = new Complex128Array( [ 1.0, -1.0 ] );
+* var a = new Complex128Array( [ 11.0, -11.0 ] );
+* var out = new Complex128Array( 6 );
+* var w = new Complex128Array( 6 );
+*
+* zdiff( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+* // out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+*/
+function zdiff( N, k, x, strideX, offsetX, N1, prepend, strideP, offsetP, N2, append, strideA, offsetA, out, strideOut, offsetOut, workspace, strideW, offsetW ) {
+ var total;
+ var io;
+ var n;
+ var i;
+
+ total = N + N1 + N2;
+
+ // If `k` is greater than or equal to the total number of elements, the k-th forward difference results in an empty array, so this function is a no-op...
+ if ( total <= 1 || k >= total ) {
+ return out;
+ }
+ // If `k` is equal to zero, there are no differences to compute, so we merely copy the various arrays into the output array...
+ if ( k === 0 ) {
+ // Copy `prepend` into output array:
+ zcopy( N1, prepend, strideP, offsetP, out, strideOut, offsetOut );
+
+ // Copy `x` into output array:
+ io = offsetOut + ( N1 * strideOut );
+ zcopy( N, x, strideX, offsetX, out, strideOut, io );
+
+ // Copy `append` into output array:
+ io = offsetOut + ( ( N1 + N ) * strideOut );
+ zcopy( N2, append, strideA, offsetA, out, strideOut, io );
+
+ return out;
+ }
+ // If `k` is equal to one, we can compute the forward difference while writing directly to the output array...
+ if ( k === 1 ) {
+ base( N, x, strideX, offsetX, N1, prepend, strideP, offsetP, N2, append, strideA, offsetA, out, strideOut, offsetOut );
+ return out;
+ }
+ // Compute the first forward difference:
+ base( N, x, strideX, offsetX, N1, prepend, strideP, offsetP, N2, append, strideA, offsetA, workspace, strideW, offsetW );
+
+ // Recursively compute the next forward differences...
+ n = total - 1;
+ for ( i = 1; i < k-1; i++ ) {
+ base( n, workspace, strideW, offsetW, 0, prepend, strideP, offsetP, 0, append, strideA, offsetA, workspace, strideW, offsetW );
+ n -= 1;
+ }
+ // For the last forward difference, ensure that results are written to the output array:
+ base( n, workspace, strideW, offsetW, 0, prepend, strideP, offsetP, 0, append, strideA, offsetA, out, strideOut, offsetOut );
+
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = zdiff;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/ndarray.native.js
new file mode 100644
index 000000000000..9ffa5f6c19a0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/ndarray.native.js
@@ -0,0 +1,86 @@
+/**
+* @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.
+*/
+
+/* eslint-disable max-params, max-len */
+
+'use strict';
+
+// MODULES //
+
+var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
+var addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array using alternative indexing semantics.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {NonNegativeInteger} k - number of times to recursively compute differences
+* @param {Complex128Array} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {NonNegativeInteger} offsetX - starting index for `x`
+* @param {NonNegativeInteger} N1 - number of indexed elements to `prepend`
+* @param {Complex128Array} prepend - prepend array
+* @param {integer} strideP - stride length for `prepend`
+* @param {NonNegativeInteger} offsetP - starting index for `prepend`
+* @param {NonNegativeInteger} N2 - number of indexed elements to `append`
+* @param {Complex128Array} append - append array
+* @param {integer} strideA - stride length for `append`
+* @param {NonNegativeInteger} offsetA - starting index for `append`
+* @param {Complex128Array} out - output array
+* @param {integer} strideOut - stride length for `out`
+* @param {NonNegativeInteger} offsetOut - starting index for `out`
+* @param {Complex128Array} workspace - workspace array
+* @param {integer} strideW - stride length for `workspace`
+* @param {NonNegativeInteger} offsetW - starting index for `workspace`
+* @returns {Complex128Array} output array
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+* var p = new Complex128Array( [ 1.0, -1.0 ] );
+* var a = new Complex128Array( [ 11.0, -11.0 ] );
+* var out = new Complex128Array( 6 );
+* var w = new Complex128Array( 6 );
+*
+* zdiff( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+* // out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+*/
+function zdiff( N, k, x, strideX, offsetX, N1, prepend, strideP, offsetP, N2, append, strideA, offsetA, out, strideOut, offsetOut, workspace, strideW, offsetW ) {
+ var viewX;
+ var viewP;
+ var viewA;
+ var viewO;
+ var viewW;
+
+ viewX = reinterpret( x, 0 );
+ viewP = reinterpret( prepend, 0 );
+ viewA = reinterpret( append, 0 );
+ viewO = reinterpret( out, 0 );
+ viewW = reinterpret( workspace, 0 );
+ addon.ndarray( N, k, viewX, strideX, offsetX, N1, viewP, strideP, offsetP, N2, viewA, strideA, offsetA, viewO, strideOut, offsetOut, viewW, strideW, offsetW );
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = zdiff;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/zdiff.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/zdiff.js
new file mode 100644
index 000000000000..13bf8d8d392d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/zdiff.js
@@ -0,0 +1,81 @@
+/**
+* @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.
+*/
+
+/* eslint-disable max-params, max-len */
+
+'use strict';
+
+// MODULES //
+
+var stride2offset = require( '@stdlib/strided/base/stride2offset' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+/**
+* Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {NonNegativeInteger} k - number of times to recursively compute differences
+* @param {Complex128Array} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {NonNegativeInteger} N1 - number of indexed elements to `prepend`
+* @param {Complex128Array} prepend - prepend array
+* @param {integer} strideP - stride length for `prepend`
+* @param {NonNegativeInteger} N2 - number of indexed elements to `append`
+* @param {Complex128Array} append - append array
+* @param {integer} strideA - stride length for `append`
+* @param {Complex128Array} out - output array
+* @param {integer} strideOut - stride length for `out`
+* @param {Complex128Array} workspace - workspace array
+* @param {integer} strideW - stride length for `workspace`
+* @returns {Complex128Array} output array
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+* var p = new Complex128Array( [ 1.0, -1.0 ] );
+* var a = new Complex128Array( [ 11.0, -11.0 ] );
+* var out = new Complex128Array( 6 );
+* var w = new Complex128Array( 6 );
+*
+* zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+* // out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+*/
+function zdiff( N, k, x, strideX, N1, prepend, strideP, N2, append, strideA, out, strideOut, workspace, strideW ) {
+ var ox;
+ var op;
+ var oa;
+ var oo;
+ var ow;
+
+ ox = stride2offset( N, strideX );
+ op = stride2offset( N1, strideP );
+ oa = stride2offset( N2, strideA );
+ oo = stride2offset( N + N1 + N2 - k, strideOut );
+ ow = stride2offset( N + N1 + N2 - 1, strideW );
+ ndarray( N, k, x, strideX, ox, N1, prepend, strideP, op, N2, append, strideA, oa, out, strideOut, oo, workspace, strideW, ow );
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = zdiff;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/zdiff.native.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/zdiff.native.js
new file mode 100644
index 000000000000..f60a70db1191
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/lib/zdiff.native.js
@@ -0,0 +1,81 @@
+/**
+* @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.
+*/
+
+/* eslint-disable max-params, max-len */
+
+'use strict';
+
+// MODULES //
+
+var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
+var addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {NonNegativeInteger} k - number of times to recursively compute differences
+* @param {Complex128Array} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {NonNegativeInteger} N1 - number of indexed elements to `prepend`
+* @param {Complex128Array} prepend - prepend array
+* @param {integer} strideP - stride length for `prepend`
+* @param {NonNegativeInteger} N2 - number of indexed elements to `append`
+* @param {Complex128Array} append - append array
+* @param {integer} strideA - stride length for `append`
+* @param {Complex128Array} out - output array
+* @param {integer} strideOut - stride length for `out`
+* @param {Complex128Array} workspace - workspace array
+* @param {integer} strideW - stride length for `workspace`
+* @returns {Complex128Array} output array
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var x = new Complex128Array( [ 2.0, -2.0, 4.0, -4.0, 6.0, -6.0, 8.0, -8.0, 10.0, -10.0 ] );
+* var p = new Complex128Array( [ 1.0, -1.0 ] );
+* var a = new Complex128Array( [ 11.0, -11.0 ] );
+* var out = new Complex128Array( 6 );
+* var w = new Complex128Array( 6 );
+*
+* zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+* // out => [ 1.0, -1.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 1.0, -1.0 ]
+*/
+function zdiff( N, k, x, strideX, N1, prepend, strideP, N2, append, strideA, out, strideOut, workspace, strideW ) {
+ var viewX;
+ var viewP;
+ var viewA;
+ var viewO;
+ var viewW;
+
+ viewX = reinterpret( x, 0 );
+ viewP = reinterpret( prepend, 0 );
+ viewA = reinterpret( append, 0 );
+ viewO = reinterpret( out, 0 );
+ viewW = reinterpret( workspace, 0 );
+ addon( N, k, viewX, strideX, N1, viewP, strideP, N2, viewA, strideA, viewO, strideOut, viewW, strideW );
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = zdiff;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/manifest.json b/lib/node_modules/@stdlib/blas/ext/base/zdiff/manifest.json
new file mode 100644
index 000000000000..496a3f561bed
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/manifest.json
@@ -0,0 +1,81 @@
+{
+ "options": {
+ "task": "build"
+ },
+ "fields": [
+ {
+ "field": "src",
+ "resolve": true,
+ "relative": true
+ },
+ {
+ "field": "include",
+ "resolve": true,
+ "relative": true
+ },
+ {
+ "field": "libraries",
+ "resolve": false,
+ "relative": false
+ },
+ {
+ "field": "libpath",
+ "resolve": true,
+ "relative": false
+ }
+ ],
+ "confs": [
+ {
+ "task": "build",
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/strided/base/stride2offset",
+ "@stdlib/blas/base/zcopy",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/strided/base/stride2offset",
+ "@stdlib/blas/base/zcopy"
+ ]
+ },
+ {
+ "task": "examples",
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/strided/base/stride2offset",
+ "@stdlib/blas/base/zcopy"
+ ]
+ }
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/package.json b/lib/node_modules/@stdlib/blas/ext/base/zdiff/package.json
new file mode 100644
index 000000000000..62b07d8a7bfa
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/package.json
@@ -0,0 +1,74 @@
+{
+ "name": "@stdlib/blas/ext/base/zdiff",
+ "version": "0.0.0",
+ "description": "Calculate the k-th discrete forward difference of a double-precision complex floating-point strided array.",
+ "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",
+ "browser": "./lib/main.js",
+ "gypfile": true,
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "include": "./include",
+ "lib": "./lib",
+ "src": "./src",
+ "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",
+ "stdmath",
+ "mathematics",
+ "math",
+ "blas",
+ "extended",
+ "diff",
+ "difference",
+ "gradient",
+ "strided",
+ "complex128",
+ "array",
+ "complex128array",
+ "ndarray"
+ ],
+ "__stdlib__": {
+ "wasm": false
+ }
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/src/Makefile b/lib/node_modules/@stdlib/blas/ext/base/zdiff/src/Makefile
new file mode 100644
index 000000000000..2caf905cedbe
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/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/blas/ext/base/zdiff/src/addon.c b/lib/node_modules/@stdlib/blas/ext/base/zdiff/src/addon.c
new file mode 100644
index 000000000000..a613fc85d425
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/src/addon.c
@@ -0,0 +1,86 @@
+/**
+* @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/blas/ext/base/zdiff.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/napi/export.h"
+#include "stdlib/napi/argv.h"
+#include "stdlib/napi/argv_int64.h"
+#include "stdlib/napi/argv_strided_complex128array.h"
+#include
+
+/**
+* Receives JavaScript callback invocation data.
+*
+* @param env environment under which the function is invoked
+* @param info callback data
+* @return Node-API value
+*/
+static napi_value addon( napi_env env, napi_callback_info info ) {
+ STDLIB_NAPI_ARGV( env, info, argv, argc, 14 );
+ STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
+ STDLIB_NAPI_ARGV_INT64( env, k, argv, 1 );
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
+ STDLIB_NAPI_ARGV_INT64( env, N1, argv, 4 );
+ STDLIB_NAPI_ARGV_INT64( env, strideP, argv, 6 );
+ STDLIB_NAPI_ARGV_INT64( env, N2, argv, 7 );
+ STDLIB_NAPI_ARGV_INT64( env, strideA, argv, 9 );
+ STDLIB_NAPI_ARGV_INT64( env, strideOut, argv, 11 );
+ STDLIB_NAPI_ARGV_INT64( env, strideW, argv, 13 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, X, N, strideX, argv, 2 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, Prepend, N1, strideP, argv, 5 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, Append, N2, strideA, argv, 8 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, Out, N+N1+N2-k, strideOut, argv, 10 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, Workspace, N+N1+N2-1, strideW, argv, 12 );
+ API_SUFFIX(stdlib_strided_zdiff)( N, k, X, strideX, N1, Prepend, strideP, N2, Append, strideA, Out, strideOut, Workspace, strideW );
+ return NULL;
+}
+
+/**
+* Receives JavaScript callback invocation data.
+*
+* @param env environment under which the function is invoked
+* @param info callback data
+* @return Node-API value
+*/
+static napi_value addon_method( napi_env env, napi_callback_info info ) {
+ STDLIB_NAPI_ARGV( env, info, argv, argc, 19 );
+ STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
+ STDLIB_NAPI_ARGV_INT64( env, k, argv, 1 );
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 4 );
+ STDLIB_NAPI_ARGV_INT64( env, N1, argv, 5 );
+ STDLIB_NAPI_ARGV_INT64( env, strideP, argv, 7 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetP, argv, 8 );
+ STDLIB_NAPI_ARGV_INT64( env, N2, argv, 9 );
+ STDLIB_NAPI_ARGV_INT64( env, strideA, argv, 11 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetA, argv, 12 );
+ STDLIB_NAPI_ARGV_INT64( env, strideOut, argv, 14 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetOut, argv, 15 );
+ STDLIB_NAPI_ARGV_INT64( env, strideW, argv, 17 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetW, argv, 18 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, X, N, strideX, argv, 2 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, Prepend, N1, strideP, argv, 6 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, Append, N2, strideA, argv, 10 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, Out, N+N1+N2-k, strideOut, argv, 13 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, Workspace, N+N1+N2-1, strideW, argv, 16 );
+ API_SUFFIX(stdlib_strided_zdiff_ndarray)( N, k, X, strideX, offsetX, N1, Prepend, strideP, offsetP, N2, Append, strideA, offsetA, Out, strideOut, offsetOut, Workspace, strideW, offsetW );
+ return NULL;
+}
+
+STDLIB_NAPI_MODULE_EXPORT_FCN_WITH_METHOD( addon, "ndarray", addon_method )
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/src/main.c b/lib/node_modules/@stdlib/blas/ext/base/zdiff/src/main.c
new file mode 100644
index 000000000000..6ad84eaa6696
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/src/main.c
@@ -0,0 +1,265 @@
+/**
+* @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/blas/ext/base/zdiff.h"
+#include "stdlib/strided/base/stride2offset.h"
+#include "stdlib/blas/base/zcopy.h"
+#include "stdlib/blas/base/shared.h"
+
+/**
+* Calculates the forward difference of a double-precision complex floating-point strided array using alternative indexing semantics.
+*
+* @param N number of indexed elements
+* @param X input array
+* @param strideX stride length for X
+* @param offsetX starting index for X
+* @param N1 number of indexed elements to Prepend
+* @param Prepend prepend array
+* @param strideP stride length for Prepend
+* @param offsetP starting index for Prepend
+* @param N2 number of indexed elements to Append
+* @param Append append array
+* @param strideA stride length for Append
+* @param offsetA starting index for Append
+* @param Out output array
+* @param strideOut stride length for Out
+* @param offsetOut starting index for Out
+*/
+static void stdlib_strided_internal_zdiff_ndarray( const CBLAS_INT N, const void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const CBLAS_INT N1, const void *Prepend, const CBLAS_INT strideP, const CBLAS_INT offsetP, const CBLAS_INT N2, const void *Append, const CBLAS_INT strideA, const CBLAS_INT offsetA, void *Out, const CBLAS_INT strideOut, const CBLAS_INT offsetOut ) {
+ const double *pv = (double *)Prepend;
+ const double *av = (double *)Append;
+ const double *xv = (double *)X;
+ double *ov = (double *)Out;
+ CBLAS_INT total;
+ CBLAS_INT sx;
+ CBLAS_INT sp;
+ CBLAS_INT sa;
+ CBLAS_INT so;
+ CBLAS_INT ix;
+ CBLAS_INT ip;
+ CBLAS_INT ia;
+ CBLAS_INT io;
+ CBLAS_INT i;
+ double rprev;
+ double iprev;
+ double rcurr;
+ double icurr;
+
+ total = N + N1 + N2;
+ if ( total <= 1 ) {
+ return;
+ }
+ // Adjust the strides and offsets according to the real-valued arrays:
+ sx = strideX * 2;
+ sp = strideP * 2;
+ sa = strideA * 2;
+ so = strideOut * 2;
+ ix = offsetX * 2;
+ ip = offsetP * 2;
+ ia = offsetA * 2;
+ io = offsetOut * 2;
+
+ // Calculate the forward difference over the input array...
+ if ( N1 == 0 && N2 == 0 ) {
+ rprev = xv[ ix ];
+ iprev = xv[ ix+1 ];
+ for ( i = 1; i < N; i++ ) {
+ ix += sx;
+ rcurr = xv[ ix ];
+ icurr = xv[ ix+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ }
+ return;
+ }
+ // Calculate the forward difference over the list of prepended values...
+ if ( N1 > 0 ) {
+ rprev = pv[ ip ];
+ iprev = pv[ ip+1 ];
+ for ( i = 1; i < N1; i++ ) {
+ ip += sp;
+ rcurr = pv[ ip ];
+ icurr = pv[ ip+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ }
+ if ( N > 0 ) {
+ rcurr = xv[ ix ];
+ icurr = xv[ ix+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ } else if ( N2 > 0 ) {
+ rcurr = av[ ia ];
+ icurr = av[ ia+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ }
+ } else if ( N > 0 ) {
+ rprev = xv[ ix ];
+ iprev = xv[ ix+1 ];
+ } else {
+ rprev = av[ ia ];
+ iprev = av[ ia+1 ];
+ }
+ // Calculate the forward difference over the input array...
+ if ( N > 0 ) {
+ ix += sx;
+ for ( i = 1; i < N; i++ ) {
+ rcurr = xv[ ix ];
+ icurr = xv[ ix+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ ix += sx;
+ }
+ if ( N2 > 0 ) {
+ rcurr = av[ ia ];
+ icurr = av[ ia+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ }
+ }
+ // Calculate the forward difference over the list of appended values...
+ if ( N2 > 0 ) {
+ ia += sa;
+ for ( i = 1; i < N2; i++ ) {
+ rcurr = av[ ia ];
+ icurr = av[ ia+1 ];
+ ov[ io ] = rcurr - rprev;
+ ov[ io+1 ] = icurr - iprev;
+ rprev = rcurr;
+ iprev = icurr;
+ io += so;
+ ia += sa;
+ }
+ }
+ return;
+}
+
+/**
+* Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array.
+*
+* @param N number of indexed elements
+* @param k number of times to recursively compute differences
+* @param X input array
+* @param strideX stride length for X
+* @param N1 number of indexed elements to Prepend
+* @param Prepend prepend array
+* @param strideP stride length for Prepend
+* @param N2 number of indexed elements to Append
+* @param Append append array
+* @param strideA stride length for Append
+* @param Out output array
+* @param strideOut stride length for Out
+* @param Workspace workspace array
+* @param strideW stride length for workspace
+*/
+void API_SUFFIX(stdlib_strided_zdiff)( const CBLAS_INT N, const CBLAS_INT k, const void *X, const CBLAS_INT strideX, const CBLAS_INT N1, const void *Prepend, const CBLAS_INT strideP, const CBLAS_INT N2, const void *Append, const CBLAS_INT strideA, void *Out, const CBLAS_INT strideOut, void *Workspace, const CBLAS_INT strideW ) {
+ const CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX );
+ const CBLAS_INT op = stdlib_strided_stride2offset( N1, strideP );
+ const CBLAS_INT oa = stdlib_strided_stride2offset( N2, strideA );
+ const CBLAS_INT oo = stdlib_strided_stride2offset( N+N1+N2-k, strideOut );
+ const CBLAS_INT ow = stdlib_strided_stride2offset( N+N1+N2-1, strideW );
+ API_SUFFIX(stdlib_strided_zdiff_ndarray)( N, k, X, strideX, ox, N1, Prepend, strideP, op, N2, Append, strideA, oa, Out, strideOut, oo, Workspace, strideW, ow );
+}
+
+/**
+* Calculates the k-th discrete forward difference of a double-precision complex floating-point strided array using alternative indexing semantics.
+*
+* @param N number of indexed elements
+* @param k number of times to recursively compute differences
+* @param X input array
+* @param strideX stride length for X
+* @param offsetX starting index for X
+* @param N1 number of indexed elements to Prepend
+* @param Prepend prepend array
+* @param strideP stride length for Prepend
+* @param offsetP starting index for Prepend
+* @param N2 number of indexed elements to Append
+* @param Append append array
+* @param strideA stride length for Append
+* @param offsetA starting index for Append
+* @param Out output array
+* @param strideOut stride length for Out
+* @param offsetOut starting index for Out
+* @param Workspace workspace array
+* @param strideW stride length for Workspace
+* @param offsetW starting index for Workspace
+*/
+void API_SUFFIX(stdlib_strided_zdiff_ndarray)( const CBLAS_INT N, const CBLAS_INT k, const void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const CBLAS_INT N1, const void *Prepend, const CBLAS_INT strideP, const CBLAS_INT offsetP, const CBLAS_INT N2, const void *Append, const CBLAS_INT strideA, const CBLAS_INT offsetA, void *Out, const CBLAS_INT strideOut, const CBLAS_INT offsetOut, void *Workspace, const CBLAS_INT strideW, const CBLAS_INT offsetW ) {
+ CBLAS_INT total;
+ CBLAS_INT io;
+ CBLAS_INT n;
+ CBLAS_INT i;
+
+ total = N + N1 + N2;
+
+ // If k >= total number of elements, the k-th forward difference results in an empty array, so this function is a no-op...
+ if ( total <= 1 || k >= total ) {
+ return;
+ }
+ // If `k` is equal to zero, there are no differences to compute, so we merely copy the various arrays into the output array...
+ if ( k == 0 ) {
+ // Copy `Prepend` into output array:
+ c_zcopy_ndarray( N1, Prepend, strideP, offsetP, Out, strideOut, offsetOut );
+
+ // Copy `X` into output array:
+ io = offsetOut + ( N1 * strideOut );
+ c_zcopy_ndarray( N, X, strideX, offsetX, Out, strideOut, io );
+
+ // Copy `Append` into output array:
+ io = offsetOut + ( ( N1 + N ) * strideOut );
+ c_zcopy_ndarray( N2, Append, strideA, offsetA, Out, strideOut, io );
+
+ return;
+ }
+ // If `k` is equal to one, we can compute the forward difference while writing directly to the output array...
+ if ( k == 1 ) {
+ stdlib_strided_internal_zdiff_ndarray( N, X, strideX, offsetX, N1, Prepend, strideP, offsetP, N2, Append, strideA, offsetA, Out, strideOut, offsetOut );
+ return;
+ }
+ // Compute the first forward difference:
+ stdlib_strided_internal_zdiff_ndarray( N, X, strideX, offsetX, N1, Prepend, strideP, offsetP, N2, Append, strideA, offsetA, Workspace, strideW, offsetW );
+
+ // Recursively compute the next forward differences...
+ n = total - 1;
+ for ( i = 1; i < k - 1; i++ ) {
+ stdlib_strided_internal_zdiff_ndarray( n, Workspace, strideW, offsetW, 0, Prepend, strideP, offsetP, 0, Append, strideA, offsetA, Workspace, strideW, offsetW );
+ n -= 1;
+ }
+ // For the last forward difference, ensure that results are written to the output array:
+ stdlib_strided_internal_zdiff_ndarray( n, Workspace, strideW, offsetW, 0, Prepend, strideP, offsetP, 0, Append, strideA, offsetA, Out, strideOut, offsetOut );
+ return;
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.js
new file mode 100644
index 000000000000..8a61b8f6b4ab
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.js
@@ -0,0 +1,82 @@
+/**
+* @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 proxyquire = require( 'proxyquire' );
+var IS_BROWSER = require( '@stdlib/assert/is-browser' );
+var zdiff = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': IS_BROWSER
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zdiff, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'attached to the main export is a method providing an ndarray interface', function test( t ) {
+ t.strictEqual( typeof zdiff.ndarray, 'function', 'method is a function' );
+ t.end();
+});
+
+tape( 'if a native implementation is available, the main export is the native implementation', opts, function test( t ) {
+ var zdiff = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( zdiff, mock, 'returns expected value' );
+ t.end();
+
+ function tryRequire() {
+ return mock;
+ }
+
+ function mock() {
+ // Mock...
+ }
+});
+
+tape( 'if a native implementation is not available, the main export is a JavaScript implementation', opts, function test( t ) {
+ var zdiff;
+ var main;
+
+ main = require( './../lib/zdiff.js' );
+
+ zdiff = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( zdiff, main, 'returns expected value' );
+ t.end();
+
+ function tryRequire() {
+ return new Error( 'Cannot find module' );
+ }
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.ndarray.js
new file mode 100644
index 000000000000..f67d75650397
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.ndarray.js
@@ -0,0 +1,699 @@
+/**
+* @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 isSameComplex128Array = require( '@stdlib/assert/is-same-complex128array' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var zdiff = require( './../lib/ndarray.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zdiff, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 19', function test( t ) {
+ t.strictEqual( zdiff.length, 19, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates the first forward difference', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 6 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates higher-order forward differences (k=2)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 7.0,
+ -7.0,
+ 11.0,
+ -11.0,
+ 16.0,
+ -16.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 22.0,
+ -22.0
+ ]);
+ out = new Complex128Array( 5 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 2, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates higher-order forward differences (k=3)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0,
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0,
+ 15.0,
+ -15.0,
+ 21.0,
+ -21.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 5 );
+
+ zdiff( x.length, 3, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports k=0 (copies input)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 7.0,
+ -7.0
+ ]);
+ out = new Complex128Array( 5 );
+ w = new Complex128Array( 4 );
+
+ zdiff( x.length, 0, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 7.0,
+ -7.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when `N <= 0`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when the total number of elements is `1`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 5.0,
+ -5.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ zdiff( 1, 1, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when `k >= total`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ zdiff( x.length, 5, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports no prepend and no append', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0,
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 3 );
+
+ zdiff( x.length, 1, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 3.0,
+ -3.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports a non-zero offset for `x`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 4 );
+ w = new Complex128Array( 4 );
+
+ zdiff( 3, 1, x, 1, 2, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 5.0,
+ -5.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports negative strides', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 6 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 1, x, -1, 4, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 9.0,
+ -9.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ 9.0,
+ -9.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports strided access', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 4 );
+ w = new Complex128Array( 4 );
+
+ zdiff( 3, 1, x, 2, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 4.0,
+ -4.0,
+ 4.0,
+ -4.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports multiple prepend values and no append', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0
+ ]);
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 3 );
+
+ zdiff( x.length, 1, x, 1, 0, 2, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 3.0,
+ -3.0,
+ 2.0,
+ -2.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports multiple prepend and append values with no `x`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array( 0 );
+ p = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0
+ ]);
+ a = new Complex128Array([
+ 7.0,
+ -7.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 0, 2, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports single prepend and multiple append values', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0
+ ]);
+ out = new Complex128Array( 4 );
+ w = new Complex128Array( 4 );
+
+ zdiff( x.length, 1, x, 1, 0, 1, p, 1, 0, 2, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports append without prepend', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 5.0,
+ -5.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array([
+ 10.0,
+ -10.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( x.length, 1, x, 1, 0, 0, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 3.0,
+ -3.0,
+ 5.0,
+ -5.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports append only (no prepend, no `x`)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array( 0 );
+ p = new Complex128Array( 0 );
+ a = new Complex128Array([
+ 1.0,
+ -1.0,
+ 4.0,
+ -4.0,
+ 9.0,
+ -9.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 0, 0, p, 1, 0, 3, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 3.0,
+ -3.0,
+ 5.0,
+ -5.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array', function test( t ) {
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ t.strictEqual( zdiff( x.length, 1, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 ), out, 'returns output array' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.ndarray.native.js
new file mode 100644
index 000000000000..03ad0cdbefae
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.ndarray.native.js
@@ -0,0 +1,708 @@
+/**
+* @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 isSameComplex128Array = require( '@stdlib/assert/is-same-complex128array' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var zdiff = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( zdiff instanceof Error )
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zdiff, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 19', opts, function test( t ) {
+ t.strictEqual( zdiff.length, 19, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates the first forward difference', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 6 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 1, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates higher-order forward differences (k=2)', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 7.0,
+ -7.0,
+ 11.0,
+ -11.0,
+ 16.0,
+ -16.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 22.0,
+ -22.0
+ ]);
+ out = new Complex128Array( 5 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 2, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates higher-order forward differences (k=3)', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0,
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0,
+ 15.0,
+ -15.0,
+ 21.0,
+ -21.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 5 );
+
+ zdiff( x.length, 3, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports k=0 (copies input)', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 7.0,
+ -7.0
+ ]);
+ out = new Complex128Array( 5 );
+ w = new Complex128Array( 4 );
+
+ zdiff( x.length, 0, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 7.0,
+ -7.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when `N <= 0`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when the total number of elements is `1`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 5.0,
+ -5.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ zdiff( 1, 1, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when `k >= total`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ zdiff( x.length, 5, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports no prepend and no append', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0,
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 3 );
+
+ zdiff( x.length, 1, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 3.0,
+ -3.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports a non-zero offset for `x`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 4 );
+ w = new Complex128Array( 4 );
+
+ zdiff( 3, 1, x, 1, 2, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 5.0,
+ -5.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports negative strides', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 6 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 1, x, -1, 4, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 9.0,
+ -9.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ 9.0,
+ -9.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports strided access', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 4 );
+ w = new Complex128Array( 4 );
+
+ zdiff( 3, 1, x, 2, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 4.0,
+ -4.0,
+ 4.0,
+ -4.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports multiple prepend values and no append', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0
+ ]);
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 3 );
+
+ zdiff( x.length, 1, x, 1, 0, 2, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 3.0,
+ -3.0,
+ 2.0,
+ -2.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports multiple prepend and append values with no `x`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array( 0 );
+ p = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0
+ ]);
+ a = new Complex128Array([
+ 7.0,
+ -7.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 0, 2, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports single prepend and multiple append values', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0
+ ]);
+ out = new Complex128Array( 4 );
+ w = new Complex128Array( 4 );
+
+ zdiff( x.length, 1, x, 1, 0, 1, p, 1, 0, 2, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports append without prepend', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 5.0,
+ -5.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array([
+ 10.0,
+ -10.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( x.length, 1, x, 1, 0, 0, p, 1, 0, 1, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 3.0,
+ -3.0,
+ 5.0,
+ -5.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports append only (no prepend, no `x`)', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array( 0 );
+ p = new Complex128Array( 0 );
+ a = new Complex128Array([
+ 1.0,
+ -1.0,
+ 4.0,
+ -4.0,
+ 9.0,
+ -9.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 0, 0, p, 1, 0, 3, a, 1, 0, out, 1, 0, w, 1, 0 );
+
+ expected = new Complex128Array([
+ 3.0,
+ -3.0,
+ 5.0,
+ -5.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array', opts, function test( t ) {
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ t.strictEqual( zdiff( x.length, 1, x, 1, 0, 0, p, 1, 0, 0, a, 1, 0, out, 1, 0, w, 1, 0 ), out, 'returns output array' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.zdiff.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.zdiff.js
new file mode 100644
index 000000000000..c2f9da2249e2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.zdiff.js
@@ -0,0 +1,652 @@
+/**
+* @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 isSameComplex128Array = require( '@stdlib/assert/is-same-complex128array' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var zdiff = require( './../lib/zdiff.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zdiff, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 14', function test( t ) {
+ t.strictEqual( zdiff.length, 14, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates the first forward difference', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 6 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates higher-order forward differences (k=2)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 7.0,
+ -7.0,
+ 11.0,
+ -11.0,
+ 16.0,
+ -16.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 22.0,
+ -22.0
+ ]);
+ out = new Complex128Array( 5 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 2, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates higher-order forward differences (k=3)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0,
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0,
+ 15.0,
+ -15.0,
+ 21.0,
+ -21.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 5 );
+
+ zdiff( x.length, 3, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports k=0 (copies input)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 7.0,
+ -7.0
+ ]);
+ out = new Complex128Array( 5 );
+ w = new Complex128Array( 4 );
+
+ zdiff( x.length, 0, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 7.0,
+ -7.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when `N <= 0`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when the total number of elements is `1`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 5.0,
+ -5.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ zdiff( 1, 1, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when `k >= total`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ zdiff( x.length, 5, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports no prepend and no append', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0,
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 3 );
+
+ zdiff( x.length, 1, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 3.0,
+ -3.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports negative strides', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 6 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 1, x, -1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 9.0,
+ -9.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ 9.0,
+ -9.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports strided access', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 4 );
+ w = new Complex128Array( 4 );
+
+ zdiff( 3, 1, x, 2, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 4.0,
+ -4.0,
+ 4.0,
+ -4.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports multiple prepend values and no append', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0
+ ]);
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 3 );
+
+ zdiff( x.length, 1, x, 1, 2, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 3.0,
+ -3.0,
+ 2.0,
+ -2.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports multiple prepend and append values with no `x`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array( 0 );
+ p = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0
+ ]);
+ a = new Complex128Array([
+ 7.0,
+ -7.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 2, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports single prepend and multiple append values', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0
+ ]);
+ out = new Complex128Array( 4 );
+ w = new Complex128Array( 4 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 2, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports append without prepend', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 5.0,
+ -5.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array([
+ 10.0,
+ -10.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( x.length, 1, x, 1, 0, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 3.0,
+ -3.0,
+ 5.0,
+ -5.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports append only (no prepend, no `x`)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array( 0 );
+ p = new Complex128Array( 0 );
+ a = new Complex128Array([
+ 1.0,
+ -1.0,
+ 4.0,
+ -4.0,
+ 9.0,
+ -9.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 0, p, 1, 3, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 3.0,
+ -3.0,
+ 5.0,
+ -5.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array', function test( t ) {
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ t.strictEqual( zdiff( x.length, 1, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 ), out, 'returns output array' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.zdiff.native.js b/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.zdiff.native.js
new file mode 100644
index 000000000000..8f5a49336fcd
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/zdiff/test/test.zdiff.native.js
@@ -0,0 +1,661 @@
+/**
+* @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 isSameComplex128Array = require( '@stdlib/assert/is-same-complex128array' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var zdiff = tryRequire( resolve( __dirname, './../lib/zdiff.native.js' ) );
+var opts = {
+ 'skip': ( zdiff instanceof Error )
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zdiff, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 14', opts, function test( t ) {
+ t.strictEqual( zdiff.length, 14, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates the first forward difference', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 6 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates higher-order forward differences (k=2)', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 7.0,
+ -7.0,
+ 11.0,
+ -11.0,
+ 16.0,
+ -16.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 22.0,
+ -22.0
+ ]);
+ out = new Complex128Array( 5 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 2, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates higher-order forward differences (k=3)', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0,
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0,
+ 15.0,
+ -15.0,
+ 21.0,
+ -21.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 5 );
+
+ zdiff( x.length, 3, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports k=0 (copies input)', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 7.0,
+ -7.0
+ ]);
+ out = new Complex128Array( 5 );
+ w = new Complex128Array( 4 );
+
+ zdiff( x.length, 0, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 7.0,
+ -7.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when `N <= 0`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when the total number of elements is `1`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 5.0,
+ -5.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ zdiff( 1, 1, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array unchanged when `k >= total`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ zdiff( x.length, 5, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 0.0,
+ 0.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports no prepend and no append', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0,
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 3 );
+
+ zdiff( x.length, 1, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 3.0,
+ -3.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports negative strides', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 6 );
+ w = new Complex128Array( 6 );
+
+ zdiff( x.length, 1, x, -1, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 9.0,
+ -9.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ 9.0,
+ -9.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports strided access', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0,
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0,
+ 10.0,
+ -10.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 11.0,
+ -11.0
+ ]);
+ out = new Complex128Array( 4 );
+ w = new Complex128Array( 4 );
+
+ zdiff( 3, 1, x, 2, 1, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 4.0,
+ -4.0,
+ 4.0,
+ -4.0,
+ 1.0,
+ -1.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports multiple prepend values and no append', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 6.0,
+ -6.0,
+ 8.0,
+ -8.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0
+ ]);
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 3 );
+ w = new Complex128Array( 3 );
+
+ zdiff( x.length, 1, x, 1, 2, p, 1, 0, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 3.0,
+ -3.0,
+ 2.0,
+ -2.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports multiple prepend and append values with no `x`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array( 0 );
+ p = new Complex128Array([
+ 1.0,
+ -1.0,
+ 3.0,
+ -3.0
+ ]);
+ a = new Complex128Array([
+ 7.0,
+ -7.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 2, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports single prepend and multiple append values', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ p = new Complex128Array([
+ 1.0,
+ -1.0
+ ]);
+ a = new Complex128Array([
+ 6.0,
+ -6.0,
+ 10.0,
+ -10.0
+ ]);
+ out = new Complex128Array( 4 );
+ w = new Complex128Array( 4 );
+
+ zdiff( x.length, 1, x, 1, 1, p, 1, 2, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0,
+ 2.0,
+ -2.0,
+ 4.0,
+ -4.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports append without prepend', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 2.0,
+ -2.0,
+ 5.0,
+ -5.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array([
+ 10.0,
+ -10.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( x.length, 1, x, 1, 0, p, 1, 1, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 3.0,
+ -3.0,
+ 5.0,
+ -5.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports append only (no prepend, no `x`)', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array( 0 );
+ p = new Complex128Array( 0 );
+ a = new Complex128Array([
+ 1.0,
+ -1.0,
+ 4.0,
+ -4.0,
+ 9.0,
+ -9.0
+ ]);
+ out = new Complex128Array( 2 );
+ w = new Complex128Array( 2 );
+
+ zdiff( 0, 1, x, 1, 0, p, 1, 3, a, 1, out, 1, w, 1 );
+
+ expected = new Complex128Array([
+ 3.0,
+ -3.0,
+ 5.0,
+ -5.0
+ ]);
+ t.strictEqual( isSameComplex128Array( out, expected ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the output array', opts, function test( t ) {
+ var out;
+ var x;
+ var p;
+ var a;
+ var w;
+
+ x = new Complex128Array([
+ 1.0,
+ -1.0,
+ 2.0,
+ -2.0
+ ]);
+ p = new Complex128Array( 0 );
+ a = new Complex128Array( 0 );
+ out = new Complex128Array( 1 );
+ w = new Complex128Array( 1 );
+
+ t.strictEqual( zdiff( x.length, 1, x, 1, 0, p, 1, 0, a, 1, out, 1, w, 1 ), out, 'returns output array' );
+ t.end();
+});