diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/first-unit-test/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/first-unit-test/lib/main.js
index 29b89162fed0..bc034defe25f 100644
--- a/lib/node_modules/@stdlib/_tools/eslint/rules/first-unit-test/lib/main.js
+++ b/lib/node_modules/@stdlib/_tools/eslint/rules/first-unit-test/lib/main.js
@@ -21,7 +21,7 @@
// MODULES //
var startsWith = require( '@stdlib/string/starts-with' );
-var endsWith = require('@stdlib/string/ends-with');
+var endsWith = require( '@stdlib/string/ends-with' );
var contains = require( '@stdlib/assert/contains' );
diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-fenced-code-marker/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-fenced-code-marker/lib/main.js
index a36786876197..15dc1a9e50ea 100644
--- a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-fenced-code-marker/lib/main.js
+++ b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-fenced-code-marker/lib/main.js
@@ -24,7 +24,7 @@ var parseJSDoc = require( 'doctrine' ).parse;
var remark = require( 'remark' );
var remarkLint = require( 'remark-lint' );
var remarkPlugin = require( 'remark-lint-fenced-code-marker' );
-var repeat = require('@stdlib/string/repeat');
+var repeat = require( '@stdlib/string/repeat' );
var isObject = require( '@stdlib/assert/is-object' );
var findJSDoc = require( '@stdlib/_tools/eslint/utils/find-jsdoc' );
diff --git a/lib/node_modules/@stdlib/_tools/scripts/transform.js b/lib/node_modules/@stdlib/_tools/scripts/transform.js
index 085352edb330..7692af0f366f 100644
--- a/lib/node_modules/@stdlib/_tools/scripts/transform.js
+++ b/lib/node_modules/@stdlib/_tools/scripts/transform.js
@@ -22,11 +22,11 @@
var logger = require( 'debug' );
var readFileSync = require( '@stdlib/fs/read-file' ).sync;
-var startsWith = require('@stdlib/string/starts-with');
-var contains = require('@stdlib/assert/contains');
+var startsWith = require( '@stdlib/string/starts-with' );
+var contains = require( '@stdlib/assert/contains' );
var replace = require( '@stdlib/string/replace' );
var pkg2id = require( '@stdlib/error/tools/pkg2id' );
-var msg2id = require( '@stdlib/error/tools/msg2id');
+var msg2id = require( '@stdlib/error/tools/msg2id' );
var ENV = require( '@stdlib/process/env' );
diff --git a/lib/node_modules/@stdlib/array/base/cuany/benchmark/benchmark.assign.length.js b/lib/node_modules/@stdlib/array/base/cuany/benchmark/benchmark.assign.length.js
index 7e73c55e3b08..417d7ebd8d5c 100644
--- a/lib/node_modules/@stdlib/array/base/cuany/benchmark/benchmark.assign.length.js
+++ b/lib/node_modules/@stdlib/array/base/cuany/benchmark/benchmark.assign.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var isArray = require( '@stdlib/assert/is-array' );
-var filled = require('@stdlib/array/base/filled');
+var filled = require( '@stdlib/array/base/filled' );
var pkg = require( './../package.json' ).name;
var cuany = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/base/cuany/benchmark/benchmark.length.js b/lib/node_modules/@stdlib/array/base/cuany/benchmark/benchmark.length.js
index 55e3f7c124ea..9c3e8e35761e 100644
--- a/lib/node_modules/@stdlib/array/base/cuany/benchmark/benchmark.length.js
+++ b/lib/node_modules/@stdlib/array/base/cuany/benchmark/benchmark.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var isArray = require( '@stdlib/assert/is-array' );
-var filled = require('@stdlib/array/base/filled');
+var filled = require( '@stdlib/array/base/filled' );
var pkg = require( './../package.json' ).name;
var cuany = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/base/cuevery/benchmark/benchmark.assign.length.js b/lib/node_modules/@stdlib/array/base/cuevery/benchmark/benchmark.assign.length.js
index 15bfbabd288f..20233a5d5066 100644
--- a/lib/node_modules/@stdlib/array/base/cuevery/benchmark/benchmark.assign.length.js
+++ b/lib/node_modules/@stdlib/array/base/cuevery/benchmark/benchmark.assign.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var isArray = require( '@stdlib/assert/is-array' );
-var filled = require('@stdlib/array/base/filled');
+var filled = require( '@stdlib/array/base/filled' );
var pkg = require( './../package.json' ).name;
var cuevery = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/base/cuevery/benchmark/benchmark.length.js b/lib/node_modules/@stdlib/array/base/cuevery/benchmark/benchmark.length.js
index 9e8a60559af8..e9a54d3ab32e 100644
--- a/lib/node_modules/@stdlib/array/base/cuevery/benchmark/benchmark.length.js
+++ b/lib/node_modules/@stdlib/array/base/cuevery/benchmark/benchmark.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var isArray = require( '@stdlib/assert/is-array' );
-var filled = require('@stdlib/array/base/filled');
+var filled = require( '@stdlib/array/base/filled' );
var pkg = require( './../package.json' ).name;
var cuevery = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/base/cunone/benchmark/benchmark.length.js b/lib/node_modules/@stdlib/array/base/cunone/benchmark/benchmark.length.js
index f7292ff7166a..76d8a6779943 100644
--- a/lib/node_modules/@stdlib/array/base/cunone/benchmark/benchmark.length.js
+++ b/lib/node_modules/@stdlib/array/base/cunone/benchmark/benchmark.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var isArray = require( '@stdlib/assert/is-array' );
-var filled = require('@stdlib/array/base/filled');
+var filled = require( '@stdlib/array/base/filled' );
var pkg = require( './../package.json' ).name;
var cunone = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/base/take-map/lib/assign.js b/lib/node_modules/@stdlib/array/base/take-map/lib/assign.js
index 5c868c946569..bf2d129271ec 100644
--- a/lib/node_modules/@stdlib/array/base/take-map/lib/assign.js
+++ b/lib/node_modules/@stdlib/array/base/take-map/lib/assign.js
@@ -237,7 +237,7 @@ function complexMap( x, indices, mode, out, stride, offset, clbk ) {
* function clbk( val ){
return val;
}
-* var arr = assignMap( x, indices, 'throw', out, 1, 0, clbk);
+* var arr = assignMap( x, indices, 'throw', out, 1, 0, clbk );
* // arr is [ 4, 2, 3, 1 ]
*
* var bool = ( arr === out );
diff --git a/lib/node_modules/@stdlib/array/bool/benchmark/benchmark.find_index.js b/lib/node_modules/@stdlib/array/bool/benchmark/benchmark.find_index.js
index 4eefbf9396e0..c1be2df5937d 100644
--- a/lib/node_modules/@stdlib/array/bool/benchmark/benchmark.find_index.js
+++ b/lib/node_modules/@stdlib/array/bool/benchmark/benchmark.find_index.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;
var pkg = require( './../package.json' ).name;
-var BooleanArray = require('./../lib');
+var BooleanArray = require( './../lib' );
// MAIN //
diff --git a/lib/node_modules/@stdlib/array/bool/benchmark/benchmark.find_last_index.js b/lib/node_modules/@stdlib/array/bool/benchmark/benchmark.find_last_index.js
index 458d098efb4c..2c2429f72de3 100644
--- a/lib/node_modules/@stdlib/array/bool/benchmark/benchmark.find_last_index.js
+++ b/lib/node_modules/@stdlib/array/bool/benchmark/benchmark.find_last_index.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;
var pkg = require( './../package.json' ).name;
-var BooleanArray = require('./../lib');
+var BooleanArray = require( './../lib' );
// MAIN //
diff --git a/lib/node_modules/@stdlib/array/bool/test/test.every.js b/lib/node_modules/@stdlib/array/bool/test/test.every.js
index e9162d943a43..0eae1a727e61 100644
--- a/lib/node_modules/@stdlib/array/bool/test/test.every.js
+++ b/lib/node_modules/@stdlib/array/bool/test/test.every.js
@@ -162,7 +162,7 @@ tape( 'the method supports providing an execution context', function test( t ) {
bool = arr.every( predicate, ctx );
t.strictEqual( bool, true, 'returns expected value' );
- t.strictEqual( ctx.count, 4, 'returns expected value');
+ t.strictEqual( ctx.count, 4, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/bool/test/test.find.js b/lib/node_modules/@stdlib/array/bool/test/test.find.js
index 2cd9df385843..c675e996bc3e 100644
--- a/lib/node_modules/@stdlib/array/bool/test/test.find.js
+++ b/lib/node_modules/@stdlib/array/bool/test/test.find.js
@@ -161,8 +161,8 @@ tape( 'the method supports providing an execution context', function test( t ) {
arr = new BooleanArray( [ true, true, false, true, false ] );
v = arr.find( predicate, ctx );
- t.strictEqual( v, false, 'returns expected value');
- t.strictEqual( ctx.count, 3, 'returns expected value');
+ t.strictEqual( v, false, 'returns expected value' );
+ t.strictEqual( ctx.count, 3, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/bool/test/test.find_last.js b/lib/node_modules/@stdlib/array/bool/test/test.find_last.js
index 431bc3683d4a..bdd461accdca 100644
--- a/lib/node_modules/@stdlib/array/bool/test/test.find_last.js
+++ b/lib/node_modules/@stdlib/array/bool/test/test.find_last.js
@@ -161,8 +161,8 @@ tape( 'the method supports providing an execution context', function test( t ) {
arr = new BooleanArray( [ true, true, false, true, false ] );
v = arr.findLast( predicate, ctx );
- t.strictEqual( v, true, 'returns expected value');
- t.strictEqual( ctx.count, 2, 'returns expected value');
+ t.strictEqual( v, true, 'returns expected value' );
+ t.strictEqual( ctx.count, 2, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/bool/test/test.map.js b/lib/node_modules/@stdlib/array/bool/test/test.map.js
index b4805e7d24fc..cb70f0f4e885 100644
--- a/lib/node_modules/@stdlib/array/bool/test/test.map.js
+++ b/lib/node_modules/@stdlib/array/bool/test/test.map.js
@@ -27,7 +27,7 @@ var identity = require( '@stdlib/utils/identity-function' );
var reinterpretBool = require( '@stdlib/strided/base/reinterpret-boolean' );
var instanceOf = require( '@stdlib/assert/instance-of' );
var Uint8Array = require( '@stdlib/array/uint8' );
-var BooleanArray = require('./../lib');
+var BooleanArray = require( './../lib' );
// TESTS //
diff --git a/lib/node_modules/@stdlib/array/bool/test/test.some.js b/lib/node_modules/@stdlib/array/bool/test/test.some.js
index 81b09922f4f6..3d405035d13e 100644
--- a/lib/node_modules/@stdlib/array/bool/test/test.some.js
+++ b/lib/node_modules/@stdlib/array/bool/test/test.some.js
@@ -162,7 +162,7 @@ tape( 'the method supports providing an execution context', function test( t ) {
bool = arr.some( predicate, ctx );
t.strictEqual( bool, true, 'returns expected value' );
- t.strictEqual( ctx.count, 2, 'returns expected value');
+ t.strictEqual( ctx.count, 2, 'returns expected value' );
t.end();
@@ -184,7 +184,7 @@ tape( 'the method stops executing upon encountering the first element which pass
bool = arr.some( predicate, ctx );
t.strictEqual( bool, true, 'returns expected value' );
- t.strictEqual( ctx.count, 2, 'returns expected value');
+ t.strictEqual( ctx.count, 2, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.fill.length.js b/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.fill.length.js
index d711e00808f8..5ee76c29a404 100644
--- a/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.fill.length.js
+++ b/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.fill.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
-var isComplex128Array = require('@stdlib/assert/is-complex128array');
+var isComplex128Array = require( '@stdlib/assert/is-complex128array' );
var pkg = require( './../package.json' ).name;
var Complex128Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.keys.length.js b/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.keys.length.js
index 602bf4b3ed6d..9cffd0956f5f 100644
--- a/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.keys.length.js
+++ b/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.keys.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
-var isIteratorLike = require('@stdlib/assert/is-iterator-like');
+var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
var pkg = require( './../package.json' ).name;
var Complex128Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.map.js b/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.map.js
index 034137d30c70..e17343950295 100644
--- a/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.map.js
+++ b/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.map.js
@@ -24,7 +24,7 @@ var bench = require( '@stdlib/bench' );
var isComplex128Array = require( '@stdlib/assert/is-complex128array' );
var realf = require( '@stdlib/complex/realf' );
var imagf = require( '@stdlib/complex/imagf' );
-var Complex128 = require('@stdlib/complex/float64/ctor');
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
var pkg = require( './../package.json' ).name;
var Complex128Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.values.length.js b/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.values.length.js
index 0a43ff04bab2..4de53fab3302 100644
--- a/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.values.length.js
+++ b/lib/node_modules/@stdlib/array/complex128/benchmark/benchmark.values.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
-var isIteratorLike = require('@stdlib/assert/is-iterator-like');
+var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
var pkg = require( './../package.json' ).name;
var Complex128Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex128/test/test.every.js b/lib/node_modules/@stdlib/array/complex128/test/test.every.js
index 887f105aa7d3..afb80cff2d90 100644
--- a/lib/node_modules/@stdlib/array/complex128/test/test.every.js
+++ b/lib/node_modules/@stdlib/array/complex128/test/test.every.js
@@ -164,7 +164,7 @@ tape( 'the method supports providing an execution context', function test( t ) {
bool = arr.every( predicate, ctx );
t.strictEqual( bool, true, 'returns expected value' );
- t.strictEqual( ctx.count, 3, 'returns expected value');
+ t.strictEqual( ctx.count, 3, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/complex128/test/test.find.js b/lib/node_modules/@stdlib/array/complex128/test/test.find.js
index db78de2bac54..ed9b2c018035 100644
--- a/lib/node_modules/@stdlib/array/complex128/test/test.find.js
+++ b/lib/node_modules/@stdlib/array/complex128/test/test.find.js
@@ -164,9 +164,9 @@ tape( 'the method supports providing an execution context', function test( t ) {
arr = new Complex128Array( [ 1.0, -1.0, 2.0, -2.0, 3.0, 3.0 ] );
z = arr.find( predicate, ctx );
- t.strictEqual( real( z ), 3.0, 'returns expected value');
- t.strictEqual( imag( z ), 3.0, 'returns expected value');
- t.strictEqual( ctx.count, 3, 'returns expected value');
+ t.strictEqual( real( z ), 3.0, 'returns expected value' );
+ t.strictEqual( imag( z ), 3.0, 'returns expected value' );
+ t.strictEqual( ctx.count, 3, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/complex128/test/test.find_last.js b/lib/node_modules/@stdlib/array/complex128/test/test.find_last.js
index d838f160db22..c4e3e949f178 100644
--- a/lib/node_modules/@stdlib/array/complex128/test/test.find_last.js
+++ b/lib/node_modules/@stdlib/array/complex128/test/test.find_last.js
@@ -164,9 +164,9 @@ tape( 'the method supports providing an execution context', function test( t ) {
arr = new Complex128Array( [ 1.0, -1.0, 2.0, -2.0, 3.0, 3.0 ] );
z = arr.findLast( predicate, ctx );
- t.strictEqual( real( z ), 3.0, 'returns expected value');
- t.strictEqual( imag( z ), 3.0, 'returns expected value');
- t.strictEqual( ctx.count, 1, 'returns expected value');
+ t.strictEqual( real( z ), 3.0, 'returns expected value' );
+ t.strictEqual( imag( z ), 3.0, 'returns expected value' );
+ t.strictEqual( ctx.count, 1, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/complex128/test/test.for_each.js b/lib/node_modules/@stdlib/array/complex128/test/test.for_each.js
index 30e1f9d8e3d2..a9d978b956ab 100644
--- a/lib/node_modules/@stdlib/array/complex128/test/test.for_each.js
+++ b/lib/node_modules/@stdlib/array/complex128/test/test.for_each.js
@@ -24,7 +24,7 @@ var tape = require( 'tape' );
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
var isFunction = require( '@stdlib/assert/is-function' );
var reinterpret128 = require( '@stdlib/strided/base/reinterpret-complex128' );
-var isComplex128 = require('@stdlib/assert/is-complex128');
+var isComplex128 = require( '@stdlib/assert/is-complex128' );
var Complex128Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex128/test/test.map.js b/lib/node_modules/@stdlib/array/complex128/test/test.map.js
index f71c5301f6e2..38507811a3e5 100644
--- a/lib/node_modules/@stdlib/array/complex128/test/test.map.js
+++ b/lib/node_modules/@stdlib/array/complex128/test/test.map.js
@@ -28,7 +28,7 @@ var reinterpret128 = require( '@stdlib/strided/base/reinterpret-complex128' );
var instanceOf = require( '@stdlib/assert/instance-of' );
var real = require( '@stdlib/complex/real' );
var imag = require( '@stdlib/complex/imag' );
-var Complex128 = require('@stdlib/complex/float64/ctor');
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
var Float64Array = require( '@stdlib/array/float64' );
var Complex128Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.fill.length.js b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.fill.length.js
index ef367e0793c1..bf4df7eaf57d 100644
--- a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.fill.length.js
+++ b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.fill.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var Complex64 = require( '@stdlib/complex/float32/ctor' );
-var isComplex64Array = require('@stdlib/assert/is-complex64array');
+var isComplex64Array = require( '@stdlib/assert/is-complex64array' );
var pkg = require( './../package.json' ).name;
var Complex64Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.keys.length.js b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.keys.length.js
index 3a1eec4e6ded..51d4d3178f13 100644
--- a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.keys.length.js
+++ b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.keys.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var Complex64 = require( '@stdlib/complex/float32/ctor' );
-var isIteratorLike = require('@stdlib/assert/is-iterator-like');
+var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
var pkg = require( './../package.json' ).name;
var Complex64Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.map.js b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.map.js
index 2a18b870ad27..6661130e4a7e 100644
--- a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.map.js
+++ b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.map.js
@@ -24,7 +24,7 @@ var bench = require( '@stdlib/bench' );
var isComplex64Array = require( '@stdlib/assert/is-complex64array' );
var realf = require( '@stdlib/complex/realf' );
var imagf = require( '@stdlib/complex/imagf' );
-var Complex64 = require('@stdlib/complex/float32/ctor');
+var Complex64 = require( '@stdlib/complex/float32/ctor' );
var pkg = require( './../package.json' ).name;
var Complex64Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.reduce.js b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.reduce.js
index f266762c6468..206bbc3fc9d8 100644
--- a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.reduce.js
+++ b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.reduce.js
@@ -22,7 +22,7 @@
var bench = require( '@stdlib/bench' );
var caddf = require( '@stdlib/math/base/ops/caddf' );
-var isComplexLike = require('@stdlib/assert/is-complex-like');
+var isComplexLike = require( '@stdlib/assert/is-complex-like' );
var pkg = require( './../package.json' ).name;
var Complex64Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.reduce.length.js b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.reduce.length.js
index a2a61b487d4a..9250c9c588b3 100644
--- a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.reduce.length.js
+++ b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.reduce.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var caddf = require( '@stdlib/math/base/ops/caddf' );
-var isComplexLike = require('@stdlib/assert/is-complex-like');
+var isComplexLike = require( '@stdlib/assert/is-complex-like' );
var Complex64 = require( '@stdlib/complex/float32/ctor' );
var pkg = require( './../package.json' ).name;
var Complex64Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.values.length.js b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.values.length.js
index 384b6bfdff28..30620c7ef9e0 100644
--- a/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.values.length.js
+++ b/lib/node_modules/@stdlib/array/complex64/benchmark/benchmark.values.length.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var Complex64 = require( '@stdlib/complex/float32/ctor' );
-var isIteratorLike = require('@stdlib/assert/is-iterator-like');
+var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
var pkg = require( './../package.json' ).name;
var Complex64Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex64/test/test.every.js b/lib/node_modules/@stdlib/array/complex64/test/test.every.js
index 5c0a497d695e..146306cb5d64 100644
--- a/lib/node_modules/@stdlib/array/complex64/test/test.every.js
+++ b/lib/node_modules/@stdlib/array/complex64/test/test.every.js
@@ -164,7 +164,7 @@ tape( 'the method supports providing an execution context', function test( t ) {
bool = arr.every( predicate, ctx );
t.strictEqual( bool, true, 'returns expected value' );
- t.strictEqual( ctx.count, 3, 'returns expected value');
+ t.strictEqual( ctx.count, 3, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/complex64/test/test.find.js b/lib/node_modules/@stdlib/array/complex64/test/test.find.js
index de556b2fe0a8..463b096751d8 100644
--- a/lib/node_modules/@stdlib/array/complex64/test/test.find.js
+++ b/lib/node_modules/@stdlib/array/complex64/test/test.find.js
@@ -164,9 +164,9 @@ tape( 'the method supports providing an execution context', function test( t ) {
arr = new Complex64Array( [ 1.0, -1.0, 2.0, -2.0, 3.0, 3.0 ] );
z = arr.find( predicate, ctx );
- t.strictEqual( realf( z ), 3, 'returns expected value');
- t.strictEqual( imagf( z ), 3, 'returns expected value');
- t.strictEqual( ctx.count, 3, 'returns expected value');
+ t.strictEqual( realf( z ), 3, 'returns expected value' );
+ t.strictEqual( imagf( z ), 3, 'returns expected value' );
+ t.strictEqual( ctx.count, 3, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/complex64/test/test.find_last.js b/lib/node_modules/@stdlib/array/complex64/test/test.find_last.js
index ba277a7e95b2..4d5a147dcea9 100644
--- a/lib/node_modules/@stdlib/array/complex64/test/test.find_last.js
+++ b/lib/node_modules/@stdlib/array/complex64/test/test.find_last.js
@@ -164,9 +164,9 @@ tape( 'the method supports providing an execution context', function test( t ) {
arr = new Complex64Array( [ 1.0, -1.0, 2.0, -2.0, 3.0, 3.0 ] );
z = arr.findLast( predicate, ctx );
- t.strictEqual( realf( z ), 3, 'returns expected value');
- t.strictEqual( imagf( z ), 3, 'returns expected value');
- t.strictEqual( ctx.count, 1, 'returns expected value');
+ t.strictEqual( realf( z ), 3, 'returns expected value' );
+ t.strictEqual( imagf( z ), 3, 'returns expected value' );
+ t.strictEqual( ctx.count, 1, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/complex64/test/test.for_each.js b/lib/node_modules/@stdlib/array/complex64/test/test.for_each.js
index 68316f2b30da..ab30241b6245 100644
--- a/lib/node_modules/@stdlib/array/complex64/test/test.for_each.js
+++ b/lib/node_modules/@stdlib/array/complex64/test/test.for_each.js
@@ -24,7 +24,7 @@ var tape = require( 'tape' );
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
var isFunction = require( '@stdlib/assert/is-function' );
var reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );
-var isComplex64 = require('@stdlib/assert/is-complex64');
+var isComplex64 = require( '@stdlib/assert/is-complex64' );
var Complex64Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex64/test/test.map.js b/lib/node_modules/@stdlib/array/complex64/test/test.map.js
index 90822e49d420..c5ca13a5d924 100644
--- a/lib/node_modules/@stdlib/array/complex64/test/test.map.js
+++ b/lib/node_modules/@stdlib/array/complex64/test/test.map.js
@@ -28,7 +28,7 @@ var reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );
var instanceOf = require( '@stdlib/assert/instance-of' );
var realf = require( '@stdlib/complex/realf' );
var imagf = require( '@stdlib/complex/imagf' );
-var Complex64 = require('@stdlib/complex/float32/ctor');
+var Complex64 = require( '@stdlib/complex/float32/ctor' );
var Float32Array = require( '@stdlib/array/float32' );
var Complex64Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex64/test/test.reduce.js b/lib/node_modules/@stdlib/array/complex64/test/test.reduce.js
index 8bf0be2de605..151282e8199c 100644
--- a/lib/node_modules/@stdlib/array/complex64/test/test.reduce.js
+++ b/lib/node_modules/@stdlib/array/complex64/test/test.reduce.js
@@ -27,7 +27,7 @@ var caddf = require( '@stdlib/math/base/ops/caddf' );
var instanceOf = require( '@stdlib/assert/instance-of' );
var realf = require( '@stdlib/complex/realf' );
var imagf = require( '@stdlib/complex/imagf' );
-var Complex64 = require('@stdlib/complex/float32/ctor');
+var Complex64 = require( '@stdlib/complex/float32/ctor' );
var Complex64Array = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/array/complex64/test/test.some.js b/lib/node_modules/@stdlib/array/complex64/test/test.some.js
index 3a6327b4ef05..7c9cfad06f4e 100644
--- a/lib/node_modules/@stdlib/array/complex64/test/test.some.js
+++ b/lib/node_modules/@stdlib/array/complex64/test/test.some.js
@@ -164,7 +164,7 @@ tape( 'the method supports providing an execution context', function test( t ) {
bool = arr.some( predicate, ctx );
t.strictEqual( bool, true, 'returns expected value' );
- t.strictEqual( ctx.count, 3, 'returns expected value');
+ t.strictEqual( ctx.count, 3, 'returns expected value' );
t.end();
@@ -186,7 +186,7 @@ tape( 'the method stops executing upon encountering the first element which pass
bool = arr.some( predicate, ctx );
t.strictEqual( bool, true, 'returns expected value' );
- t.strictEqual( ctx.count, 1, 'returns expected value');
+ t.strictEqual( ctx.count, 1, 'returns expected value' );
t.end();
diff --git a/lib/node_modules/@stdlib/array/linspace/test/test.assign.js b/lib/node_modules/@stdlib/array/linspace/test/test.assign.js
index f4fc68232957..45b514d3cb04 100644
--- a/lib/node_modules/@stdlib/array/linspace/test/test.assign.js
+++ b/lib/node_modules/@stdlib/array/linspace/test/test.assign.js
@@ -1526,7 +1526,7 @@ tape( 'the function returns a linearly spaced array (real; dtype=float64)', func
t.strictEqual( actual, out, 'returns expected value' );
t.deepEqual( actual, expected, 'returns expected value' );
- out = new Float64Array( 6);
+ out = new Float64Array( 6 );
actual = linspace( x1, x2, out, opts );
expected = new Float64Array( [ x1, -3.0, -1.0, 1.0, 3.0, x2 ] );
t.strictEqual( isFloat64Array( actual ), true, 'returns expected value' );
diff --git a/lib/node_modules/@stdlib/array/pool/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/pool/benchmark/benchmark.js
index ed630f8555bf..cda52a9c4697 100644
--- a/lib/node_modules/@stdlib/array/pool/benchmark/benchmark.js
+++ b/lib/node_modules/@stdlib/array/pool/benchmark/benchmark.js
@@ -23,7 +23,7 @@
var bench = require( '@stdlib/bench' );
var isTypedArray = require( '@stdlib/assert/is-typed-array' );
var isComplexTypedArray = require( '@stdlib/assert/is-complex-typed-array' );
-var isBooleanArray = require('@stdlib/assert/is-booleanarray');
+var isBooleanArray = require( '@stdlib/assert/is-booleanarray' );
var pkg = require( './../package.json' ).name;
var typedarray = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/assert/is-nonpositive-finite/examples/index.js b/lib/node_modules/@stdlib/assert/is-nonpositive-finite/examples/index.js
index bdf0c8ce2b19..d8e718f00567 100644
--- a/lib/node_modules/@stdlib/assert/is-nonpositive-finite/examples/index.js
+++ b/lib/node_modules/@stdlib/assert/is-nonpositive-finite/examples/index.js
@@ -20,13 +20,13 @@
'use strict';
-var NINF = require('@stdlib/constants/float64/ninf');
+var NINF = require( '@stdlib/constants/float64/ninf' );
var isNonPositiveFinite = require( './../lib' );
-console.log( isNonPositiveFinite( -2 ));
+console.log( isNonPositiveFinite( -2 ) );
// => true
-console.log( isNonPositiveFinite( -2.99 ));
+console.log( isNonPositiveFinite( -2.99 ) );
// => true
console.log( isNonPositiveFinite( NINF ) );
diff --git a/lib/node_modules/@stdlib/assert/is-nonpositive-finite/lib/main.js b/lib/node_modules/@stdlib/assert/is-nonpositive-finite/lib/main.js
index 6a756700627c..df8ab7901894 100644
--- a/lib/node_modules/@stdlib/assert/is-nonpositive-finite/lib/main.js
+++ b/lib/node_modules/@stdlib/assert/is-nonpositive-finite/lib/main.js
@@ -21,7 +21,7 @@
// MODULES //
-var NINF = require('@stdlib/constants/float64/ninf');
+var NINF = require( '@stdlib/constants/float64/ninf' );
var isPrimitive = require( './primitive.js' );
var isObject = require( './object.js' );
diff --git a/lib/node_modules/@stdlib/assert/is-nonpositive-finite/test/test.main.js b/lib/node_modules/@stdlib/assert/is-nonpositive-finite/test/test.main.js
index 08544f3fd113..523410e2de33 100644
--- a/lib/node_modules/@stdlib/assert/is-nonpositive-finite/test/test.main.js
+++ b/lib/node_modules/@stdlib/assert/is-nonpositive-finite/test/test.main.js
@@ -21,7 +21,7 @@
// MODULES //
var tape = require( 'tape' );
-var NINF = require('@stdlib/constants/float64/ninf');
+var NINF = require( '@stdlib/constants/float64/ninf' );
var Number = require( '@stdlib/number/ctor' );
var isNonPositiveFinite = require( './../lib/main.js' );
diff --git a/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/object.js b/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/object.js
index 34b1999cf095..3c4f5e78df90 100644
--- a/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/object.js
+++ b/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/object.js
@@ -20,8 +20,8 @@
// MODULES //
-var isString = require('@stdlib/assert/is-string');
-var isWellFormed = require('./iswellformed.js');
+var isString = require( '@stdlib/assert/is-string' );
+var isWellFormed = require( './iswellformed.js' );
// MAIN //
diff --git a/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/primitive.js b/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/primitive.js
index da4e82c9aa16..819c61bda55c 100644
--- a/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/primitive.js
+++ b/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/primitive.js
@@ -20,7 +20,7 @@
// MODULES //
-var isWellFormed = require('./iswellformed.js');
+var isWellFormed = require( './iswellformed.js' );
// MAIN //
diff --git a/lib/node_modules/@stdlib/assert/napi/equal-typedarray-types/lib/native.js b/lib/node_modules/@stdlib/assert/napi/equal-typedarray-types/lib/native.js
index 61b2eb776c79..e206abe2a463 100644
--- a/lib/node_modules/@stdlib/assert/napi/equal-typedarray-types/lib/native.js
+++ b/lib/node_modules/@stdlib/assert/napi/equal-typedarray-types/lib/native.js
@@ -36,7 +36,7 @@ var addon = require( './../src/addon.node' );
* var typedarray = require( '@stdlib/array/typed' );
*
* var x = typedarray( 10, 'float64' );
-* var y = typedarray( x.length, 'float64');
+* var y = typedarray( x.length, 'float64' );
*
* wrapper( x, y );
*/
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/README.md b/lib/node_modules/@stdlib/blas/base/dznrm2/README.md
new file mode 100644
index 000000000000..c7ffa367638f
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/README.md
@@ -0,0 +1,267 @@
+
+
+# dznrm2
+
+> Compute the L2-norm of a complex double-precision floating-point vector.
+
+
+
+## Usage
+
+```javascript
+var dznrm2 = require( '@stdlib/blas/base/dznrm2' );
+```
+
+#### dznrm2( N, zx, strideX )
+
+Computes the L2-norm of a complex double-precision floating-point vector.
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var zx = new Complex128Array( [ 0.3, 0.1, 0.5, 0.0, 0.0, 0.5, 0.0, 0.2 ] );
+
+var norm = dznrm2( 4, zx, 1 );
+// returns ~0.8
+```
+
+The function has the following parameters:
+
+- **N**: number of indexed elements.
+- **zx**: input [`Complex128Array`][@stdlib/array/complex128].
+- **strideX**: index increment for `zx`.
+
+The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to traverse every other value,
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var zx = new Complex128Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
+
+var norm = dznrm2( 2, zx, 2 );
+// returns ~4.6
+```
+
+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 zx0 = new Complex128Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
+
+// Create an offset view:
+var zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+// Compute the L2-norm:
+var norm = dznrm2( 2, zx1, 1 );
+// returns ~9.3
+```
+
+#### dznrm2.ndarray( N, zx, strideX, offset )
+
+Computes the L2-norm of a complex double-precision floating-point vector using alternative indexing semantics.
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var zx = new Complex128Array( [ 0.3, 0.1, 0.5, 0.0, 0.0, 0.5, 0.0, 0.2 ] );
+
+var norm = dznrm2.ndarray( 4, zx, 1, 0 );
+// returns ~0.8
+```
+
+The function has the following additional parameters:
+
+- **offsetX**: starting index.
+
+While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the `offset` parameter supports indexing semantics based on a starting index. For example, to start from the second index,
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var zx = new Complex128Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
+
+var norm = dznrm2.ndarray( 2, zx, 1, 1 );
+// returns ~9.3
+```
+
+
+
+
+
+
+
+## Notes
+
+- If `N <= 0`, both functions return `0.0`.
+- `dznrm2()` corresponds to the [BLAS][blas] level 1 function [`dznrm2`][dznrm2].
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var dznrm2 = require( '@stdlib/blas/base/dznrm2' );
+
+function rand() {
+ return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
+}
+
+var zx = filledarrayBy( 10, 'complex128', rand );
+console.log( zx.toString() );
+
+// Computes the L2-norm:
+var norm = dznrm2( zx.length, zx, 1 );
+console.log( norm );
+```
+
+
+
+
+
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+#include "stdlib/blas/base/dznrm2.h"
+```
+
+#### c_dznrm2( N, \*ZX, strideX )
+
+Computes the L2-norm of a complex double-precision floating-point vector.
+
+```c
+const double zx[] = { 0.3, 0.1, 0.5, 0.0, 0.0, 0.5, 0.0, 0.2 };
+
+double norm = c_dznrm2( 4, (void *)zx, 1 );
+// returns 0.8
+```
+
+The function accepts the following arguments:
+
+- **N**: `[in] CBLAS_INT` number of indexed elements.
+- **ZX**: `[in] void*` input array.
+- **strideX**: `[in] CBLAS_INT` index increment for `ZX`.
+
+```c
+double c_dznrm2( const CBLAS_INT N, const void *ZX, const CBLAS_INT strideX );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Examples
+
+```c
+#include "stdlib/blas/base/dznrm2.h"
+#include
+
+int main( void ) {
+ // Create a strided array of interleaved real and imaginary components:
+ const double zx[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+
+ // Specify the number of elements:
+ const int N = 4;
+
+ // Specify stride length:
+ const int strideX = 1;
+
+ // Compute the L2-norm:
+ c_dznrm2( N, (void *)zx, strideX );
+
+ // Print the result:
+ printf( "L2-norm: %lf\n", norm );
+}
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[blas]: http://www.netlib.org/blas
+
+[dznrm2]: https://netlib.org/lapack/explore-html//d1/d2a/group__nrm2_ga7f9f9febc6dc1836c9f5e7c1aa00b743.html
+
+[@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/base/dznrm2/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.js
new file mode 100644
index 000000000000..eb73b9f0b2e0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.js
@@ -0,0 +1,92 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 pkg = require( './../package.json' ).name;
+var dznrm2 = require( './../lib/dznrm2.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Create a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var zx = new Complex128Array( uniform( len*2, -10.0, 10.0, options ) );
+ return benchmark;
+
+ function benchmark( b ) {
+ var norm;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ norm = dznrm2( zx.length, zx, 1 );
+ if ( isnan( norm ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( norm ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+':len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.native.js
new file mode 100644
index 000000000000..165592cd971c
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.native.js
@@ -0,0 +1,97 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var dznrm2 = tryRequire( resolve( __dirname, './../lib/dznrm2.native.js' ) );
+var opts = {
+ 'skip': ( dznrm2 instanceof Error )
+};
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Create a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var zx = new Complex128Array( uniform( len*2, -10.0, 10.0, options ) );
+ return benchmark;
+
+ function benchmark( b ) {
+ var norm;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ norm = dznrm2( zx.length, zx, 1 );
+ if ( isnan( norm ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( norm ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+'::native:len='+len, opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..d4960e769858
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.ndarray.js
@@ -0,0 +1,92 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 pkg = require( './../package.json' ).name;
+var dznrm2 = require( './../lib/ndarray.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Create a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var zx = new Complex128Array( uniform( len*2, -10.0, 10.0, options ) );
+ return benchmark;
+
+ function benchmark( b ) {
+ var norm;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ norm = dznrm2( zx.length, zx, 1, 0 );
+ if ( isnan( norm ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( norm ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+':ndarray:len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.ndarray.native.js
new file mode 100644
index 000000000000..6ad40f056a17
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/benchmark.ndarray.native.js
@@ -0,0 +1,97 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var dznrm2 = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( dznrm2 instanceof Error )
+};
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Create a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var zx = new Complex128Array( uniform( len*2, -10.0, 10.0, options ) );
+ return benchmark;
+
+ function benchmark( b ) {
+ var norm;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ norm = dznrm2( zx.length, zx, 1, 0 );
+ if ( isnan( norm ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( norm ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+'::native:ndarray:len='+len, opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/c/Makefile b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/c/Makefile
new file mode 100644
index 000000000000..9f97140e7cb0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2024 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/base/dznrm2/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/c/benchmark.length.c
new file mode 100644
index 000000000000..2bc0f3896d9d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/c/benchmark.length.c
@@ -0,0 +1,155 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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.
+*/
+
+/**
+* Benchmark `dznrm2`.
+*/
+#include "stdlib/blas/base/dznrm2.h"
+#include
+#include
+#include
+#include
+#include
+
+#define NAME "dznrm2"
+#define ITERATIONS 10000000
+#define REPEATS 3
+#define MIN 1
+#define MAX 6
+
+/**
+* Prints the TAP version.
+*/
+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
+*/
+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
+*/
+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
+*/
+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
+*/
+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
+*/
+double benchmark( int iterations, int len ) {
+ double zx[ len*2 ];
+ double elapsed;
+ double norm;
+ double t;
+ int i;
+
+ for ( i = 0; i < len*2; i += 2 ) {
+ zx[ i ] = ( rand_double()*10000.0 ) - 5000.0;
+ zx[ i+1 ] = ( rand_double()*10000.0 ) - 5000.0;
+ }
+ norm = 0.0;
+ t = tic();
+ for ( i = 0; i < iterations; i++ ) {
+ norm = c_dznrm2( len, (void *)zx, 1 );
+ if ( norm != norm ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( norm != norm ) {
+ printf( "should not return NaN\n" );
+ }
+ 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 = benchmark( 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/base/dznrm2/benchmark/fortran/Makefile b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/fortran/Makefile
new file mode 100644
index 000000000000..ea0bd243d7ef
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/fortran/Makefile
@@ -0,0 +1,141 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2024 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 Fortran source files:
+ifdef FORTRAN_COMPILER
+ FC := $(FORTRAN_COMPILER)
+else
+ FC := gfortran
+endif
+
+# Define the command-line options when compiling Fortran files:
+FFLAGS ?= \
+ -std=f95 \
+ -ffree-form \
+ -O3 \
+ -Wall \
+ -Wextra \
+ -Wno-compare-reals \
+ -Wimplicit-interface \
+ -fno-underscoring \
+ -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 ?=
+
+# List of Fortran source files:
+SOURCE_FILES ?= ../../src/dznrm2.f
+
+# List of Fortran targets:
+f_targets := benchmark.length.out
+
+
+# RULES #
+
+#/
+# Compiles Fortran source files.
+#
+# @param {string} SOURCE_FILES - list of Fortran source files
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop`)
+# @param {string} [FORTRAN_COMPILER] - Fortran compiler
+# @param {string} [FFLAGS] - Fortran compiler flags
+# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(f_targets)
+
+.PHONY: all
+
+#/
+# Compiles Fortran source files.
+#
+# @private
+# @param {string} SOURCE_FILES - list of Fortran source files
+# @param {(string|void)} INCLUDE - list of includes (e.g., `-I /foo/bar -I /beep/boop`)
+# @param {string} FC - Fortran compiler
+# @param {string} FFLAGS - Fortran compiler flags
+# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code
+#/
+$(f_targets): %.out: %.f
+ $(QUIET) $(FC) $(FFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $<
+
+#/
+# Runs compiled benchmarks.
+#
+# @example
+# make run
+#/
+run: $(f_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/base/dznrm2/benchmark/fortran/benchmark.length.f b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/fortran/benchmark.length.f
new file mode 100644
index 000000000000..3bdc20ee667e
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/benchmark/fortran/benchmark.length.f
@@ -0,0 +1,220 @@
+!>
+! @license Apache-2.0
+!
+! Copyright (c) 2024 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.
+!<
+
+!> Benchmark `dznrm2`.
+!
+! ## Notes
+!
+! - Written in "free form" Fortran 95.
+!
+!<
+program bench
+ implicit none
+ ! ..
+ ! Local constants:
+ character(6), parameter :: name = 'dznrm2' ! if changed, be sure to adjust length
+ integer, parameter :: iterations = 10000000
+ integer, parameter :: repeats = 3
+ integer, parameter :: min = 1
+ integer, parameter :: max = 6
+ ! ..
+ ! Run the benchmarks:
+ call main()
+ ! ..
+ ! Functions:
+contains
+ ! ..
+ ! Prints the TAP version.
+ ! ..
+ subroutine print_version()
+ print '(A)', 'TAP version 13'
+ end subroutine print_version
+ ! ..
+ ! Prints the TAP summary.
+ !
+ ! @param {integer} total - total number of tests
+ ! @param {integer} passing - total number of passing tests
+ ! ..
+ subroutine print_summary( total, passing )
+ ! ..
+ ! Scalar arguments:
+ integer, intent(in) :: total, passing
+ ! ..
+ ! Local variables:
+ character(len=999) :: str, tmp
+ ! ..
+ ! Intrinsic functions:
+ intrinsic adjustl, trim
+ ! ..
+ print '(A)', '#'
+ ! ..
+ write (str, '(I15)') total ! TAP plan
+ tmp = adjustl( str )
+ print '(A,A)', '1..', trim( tmp )
+ ! ..
+ print '(A,A)', '# total ', trim( tmp )
+ ! ..
+ write (str, '(I15)') passing
+ tmp = adjustl( str )
+ print '(A,A)', '# pass ', trim( tmp )
+ ! ..
+ print '(A)', '#'
+ print '(A)', '# ok'
+ end subroutine print_summary
+ ! ..
+ ! Prints benchmarks results.
+ !
+ ! @param {integer} iterations - number of iterations
+ ! @param {double} elapsed - elapsed time in seconds
+ ! ..
+ subroutine print_results( iterations, elapsed )
+ ! ..
+ ! Scalar arguments:
+ double precision, intent(in) :: elapsed
+ integer, intent(in) :: iterations
+ ! ..
+ ! Local variables:
+ double precision :: rate
+ character(len=999) :: str, tmp
+ ! ..
+ ! Intrinsic functions:
+ intrinsic dble, adjustl, trim
+ ! ..
+ rate = dble( iterations ) / elapsed
+ ! ..
+ print '(A)', ' ---'
+ ! ..
+ write (str, '(I15)') iterations
+ tmp = adjustl( str )
+ print '(A,A)', ' iterations: ', trim( tmp )
+ ! ..
+ write (str, '(f0.9)') elapsed
+ tmp = adjustl( str )
+ print '(A,A)', ' elapsed: ', trim( tmp )
+ ! ..
+ write( str, '(f0.9)') rate
+ tmp = adjustl( str )
+ print '(A,A)', ' rate: ', trim( tmp )
+ ! ..
+ print '(A)', ' ...'
+ end subroutine print_results
+ ! ..
+ ! Runs a benchmark.
+ !
+ ! @param {integer} iterations - number of iterations
+ ! @param {integer} len - array length
+ ! @return {double} elapsed time in seconds
+ ! ..
+ double precision function benchmark( iterations, len )
+ ! ..
+ ! External functions:
+ interface
+ double precision function dznrm2( N, zx, strideX )
+ complex(kind=kind(0.0d0)) :: zx(*)
+ integer :: strideX, N
+ end function dznrm2
+ end interface
+ ! ..
+ ! Scalar arguments:
+ integer, intent(in) :: iterations, len
+ ! ..
+ ! Local scalars:
+ double precision :: elapsed, r1, r2, y
+ real :: t1, t2
+ integer :: i
+ ! ..
+ ! Local arrays:
+ complex(kind=kind(0.0d0)), allocatable :: x(:)
+ ! ..
+ ! Intrinsic functions:
+ intrinsic random_number, cpu_time, cmplx
+ ! ..
+ ! Allocate arrays:
+ allocate( x(len) )
+ ! ..
+ call random_number( r1 )
+ call random_number( r2 )
+ do i = 1, len
+ call random_number( r1 )
+ call random_number( r2 )
+ x( i ) = cmplx( (r1*10000.0d0)-5000.0d0, (r2*1000.0d0)-5000.0d0, kind=kind(0.0d0) )
+ end do
+ ! ..
+ y = 0.0d0
+ ! ..
+ call cpu_time( t1 )
+ ! ..
+ do i = 1, iterations
+ y = dznrm2( len, x, 1 );
+ if ( y /= y ) then
+ print '(A)', 'should not return NaN'
+ exit
+ end if
+ end do
+ ! ..
+ call cpu_time( t2 )
+ ! ..
+ elapsed = t2 - t1
+ ! ..
+ if ( y /= y ) then
+ print '(A)', 'should not return NaN'
+ end if
+ ! ..
+ ! Deallocate arrays:
+ deallocate( x )
+ ! ..
+ benchmark = elapsed
+ return
+ end function benchmark
+ ! ..
+ ! Main execution sequence.
+ ! ..
+ subroutine main()
+ ! ..
+ ! Local variables:
+ integer :: count, iter, len, i, j
+ double precision :: elapsed
+ character(len=999) :: str, tmp
+ ! ..
+ ! Intrinsic functions:
+ intrinsic adjustl, trim
+ ! ..
+ call print_version()
+ count = 0
+ do i = min, max
+ len = 10**i
+ iter = iterations / 10**(i-1)
+ do j = 1, repeats
+ count = count + 1
+ ! ..
+ write (str, '(I15)') len
+ tmp = adjustl( str )
+ print '(A,A,A,A)', '# fortran::native::', name, ':len=', trim( tmp )
+ ! ..
+ elapsed = benchmark( iter, len )
+ ! ..
+ call print_results( iter, elapsed )
+ ! ..
+ write (str, '(I15)') count
+ tmp = adjustl( str )
+ print '(A,A,A)', 'ok ', trim( tmp ), ' benchmark finished'
+ end do
+ end do
+ call print_summary( count, count )
+ end subroutine main
+end program bench
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/binding.gyp b/lib/node_modules/@stdlib/blas/base/dznrm2/binding.gyp
new file mode 100644
index 000000000000..02a2799da097
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/binding.gyp
@@ -0,0 +1,265 @@
+# @license Apache-2.0
+#
+# Copyright (c) 2024 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/base/dznrm2/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/dznrm2/docs/repl.txt
new file mode 100644
index 000000000000..a62ab64253a5
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/docs/repl.txt
@@ -0,0 +1,89 @@
+
+{{alias}}( N, zx, strideX )
+ Computes the L2-norm of a complex double-precision floating-point vector.
+
+ The `N` and stride parameters determine which elements in the strided array
+ are accessed at runtime.
+
+ Indexing is relative to the first index. To introduce an offset, use typed
+ array views.
+
+ If `N <= 0`, the function returns `0.0`.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ zx: Complex128Array
+ Input array.
+
+ strideX: integer
+ Index increment for `zx`.
+
+ Returns
+ -------
+ out: number
+ L2-norm.
+
+ Examples
+ --------
+ // Standard Usage:
+ > var zx = new {{alias:@stdlib/array/complex128}}( [ 0.3, 0.1, 0.5, 0.0, 0.0, 0.5 ] );
+ > var out = {{alias}}( 3, zx, 1 )
+ ~0.77
+
+ // Using `N` and stride parameters:
+ > zx = new {{alias:@stdlib/array/complex128}}( [ 3.0, -4.0, 0.0, 0.0, 5.0, -6.0 ] );
+ > out = {{alias}}( 2, zx, 2 )
+ ~9.3
+
+ // Using view offsets:
+ > var zx0 = new {{alias:@stdlib/array/complex128}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
+ > var zx1 = new {{alias:@stdlib/array/complex128}}( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 );
+ > out = {{alias}}( 2, zx1, 1 )
+ ~9.3
+
+
+{{alias}}.ndarray( N, zx, strideX, offsetX )
+ Computes the L2-norm of a complex double-precision floating-point vector
+ using alternative indexing semantics.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, the offset parameter supports indexing semantics based on a starting
+ index.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ zx: Complex128Array
+ Input array.
+
+ strideX: integer
+ Index increment for `zx`.
+
+ offsetX: integer
+ Starting index of `zx`.
+
+ Returns
+ -------
+ out: number
+ L2-norm.
+
+ Examples
+ --------
+ // Standard Usage:
+ > var zx = new {{alias:@stdlib/array/complex128}}( [ 3.0, -4.0, 0.0, 0.0, 5.0, -6.0 ] );
+ > var out = {{alias}}.ndarray( 2, zx, 2, 0 )
+ ~9.3
+
+ // Using an index offset:
+ > zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
+ > out = {{alias}}.ndarray( 2, zx, 1, 1 )
+ ~9.3
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/dznrm2/docs/types/index.d.ts
new file mode 100644
index 000000000000..6762509746bc
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/docs/types/index.d.ts
@@ -0,0 +1,96 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 `dznrm2`.
+*/
+interface Routine {
+ /**
+ * Computes the L2-norm of a complex double-precision floating-point vector.
+ *
+ * @param N - number of indexed elements
+ * @param zx - input array
+ * @param strideX - stride length for `zx`
+ * @returns L2-norm
+ *
+ * @example
+ * var Complex128Array = require( '@stdlib/array/complex128' );
+ *
+ * var zx = new Complex128Array( [ 0.3, 0.1, 0.5, 0.0, 0.0, 0.5, 0.0, 0.2, 2.0, 3.0 ] );
+ *
+ * var norm = dznrm2( 4, zx, 1 );
+ * // returns ~0.8
+ */
+ ( N: number, zx: Complex128Array, strideX: number ): number;
+
+ /**
+ * Computes the L2-norm of a complex double-precision floating-point vector using alternative indexing semantics.
+ *
+ * @param N - number of indexed elements
+ * @param zx - input array
+ * @param strideX - stride length for `zx`
+ * @param offsetX - starting index for `zx`
+ * @returns L2-norm
+ *
+ * @example
+ * var Complex128Array = require( '@stdlib/array/complex128' );
+ *
+ * var zx = new Complex128Array( [ 0.3, 0.1, 0.5, 0.0, 0.0, 0.5, 0.0, 0.2, 2.0, 3.0 ] );
+ *
+ * var norm = dznrm2.ndarray( 4, zx, 1, 0 );
+ * // returns ~0.8
+ */
+ ndarray( N: number, zx: Complex128Array, strideX: number, offsetX: number ): number;
+}
+
+/**
+* Computes the L2-norm of a complex double-precision floating-point vector.
+*
+* @param N - number of indexed elements
+* @param zx - input array
+* @param strideX - stride length for `zx`
+* @returns L2-norm
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var x = new Complex128Array( [ 3.0, -4.0, 0.0, 0.0, 5.0, -6.0 ] );
+*
+* var norm = dznrm2( 2, zx, 2 );
+* // returns ~9.3
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var x = new Complex128Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
+*
+* var norm = dznrm2.ndarray( 2, zx, 1, 1 );
+* // returns ~9.3
+*/
+declare var dznrm2: Routine;
+
+
+// EXPORTS //
+
+export = dznrm2;
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/docs/types/test.ts b/lib/node_modules/@stdlib/blas/base/dznrm2/docs/types/test.ts
new file mode 100644
index 000000000000..4327f535c2f3
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/docs/types/test.ts
@@ -0,0 +1,158 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import Complex128Array = require( '@stdlib/array/complex128' );
+import dznrm2 = require( './index' );
+
+
+// TESTS //
+
+// The function returns a number...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2( zx.length, zx, 1 ); // $ExpectType number
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a number...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2( '10', zx, 1 ); // $ExpectError
+ dznrm2( true, zx, 1 ); // $ExpectError
+ dznrm2( false, zx, 1 ); // $ExpectError
+ dznrm2( null, zx, 1 ); // $ExpectError
+ dznrm2( undefined, zx, 1 ); // $ExpectError
+ dznrm2( [], zx, 1 ); // $ExpectError
+ dznrm2( {}, zx, 1 ); // $ExpectError
+ dznrm2( ( zx: number ): number => zx, zx, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a Complex128Array...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2( zx.length, 10, 1 ); // $ExpectError
+ dznrm2( zx.length, '10', 1 ); // $ExpectError
+ dznrm2( zx.length, true, 1 ); // $ExpectError
+ dznrm2( zx.length, false, 1 ); // $ExpectError
+ dznrm2( zx.length, null, 1 ); // $ExpectError
+ dznrm2( zx.length, undefined, 1 ); // $ExpectError
+ dznrm2( zx.length, [], 1 ); // $ExpectError
+ dznrm2( zx.length, {}, 1 ); // $ExpectError
+ dznrm2( zx.length, ( zx: number ): number => zx, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a number...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2( zx.length, zx, '10' ); // $ExpectError
+ dznrm2( zx.length, zx, true ); // $ExpectError
+ dznrm2( zx.length, zx, false ); // $ExpectError
+ dznrm2( zx.length, zx, null ); // $ExpectError
+ dznrm2( zx.length, zx, undefined ); // $ExpectError
+ dznrm2( zx.length, zx, [] ); // $ExpectError
+ dznrm2( zx.length, zx, {} ); // $ExpectError
+ dznrm2( zx.length, zx, ( zx: number ): number => zx ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2(); // $ExpectError
+ dznrm2( zx.length ); // $ExpectError
+ dznrm2( zx.length, zx ); // $ExpectError
+ dznrm2( zx.length, zx, 1, 10 ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a number...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2.ndarray( zx.length, zx, 1, 0 ); // $ExpectType number
+}
+
+// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2.ndarray( '10', zx, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( true, zx, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( false, zx, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( null, zx, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( undefined, zx, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( [], zx, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( {}, zx, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( ( zx: number ): number => zx, zx, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a second argument which is not a Complex128Array...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2.ndarray( zx.length, 10, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, '10', 1, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, true, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, false, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, null, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, undefined, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, [], 1, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, {}, 1, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, ( zx: number ): number => zx, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2.ndarray( zx.length, zx, '10', 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, true, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, false, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, null, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, undefined, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, [], 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, {}, 0 ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, ( zx: number ): number => zx, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2.ndarray( zx.length, zx, 1, '10' ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, 1, true ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, 1, false ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, 1, null ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, 1, undefined ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, 1, [] ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, 1, {} ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, 1, ( zx: number ): number => zx ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const zx = new Complex128Array( 10 );
+
+ dznrm2.ndarray(); // $ExpectError
+ dznrm2.ndarray( zx.length ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, 1 ); // $ExpectError
+ dznrm2.ndarray( zx.length, zx, 1, 0, 10 ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/examples/c/Makefile b/lib/node_modules/@stdlib/blas/base/dznrm2/examples/c/Makefile
new file mode 100644
index 000000000000..6aed70daf167
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/examples/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2024 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/base/dznrm2/examples/c/example.c b/lib/node_modules/@stdlib/blas/base/dznrm2/examples/c/example.c
new file mode 100644
index 000000000000..45aac519f2c6
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/examples/c/example.c
@@ -0,0 +1,37 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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/base/dznrm2.h"
+#include
+
+int main( void ) {
+ // Create a strided array of interleaved real and imaginary components:
+ const double zx[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+
+ // Specify the number of elements:
+ const int N = 4;
+
+ // Specify stride length:
+ const int strideX = 1;
+
+ // Compute the L2-norm:
+ double norm = c_dznrm2( N, (void *)zx, strideX );
+
+ // Print the result:
+ printf( "L2-norm: %lf\n", norm );
+}
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/examples/index.js b/lib/node_modules/@stdlib/blas/base/dznrm2/examples/index.js
new file mode 100644
index 000000000000..781b52d6c6a9
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/examples/index.js
@@ -0,0 +1,35 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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/base/discrete-uniform' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var dznrm2 = require( '@stdlib/blas/base/dznrm2' );
+
+function rand() {
+ return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
+}
+
+var zx = filledarrayBy( 10, 'complex128', rand );
+console.log( zx.toString() );
+
+// Computes the L2-norm:
+var norm = dznrm2( zx.length, zx, 1 );
+console.log( norm );
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/include.gypi b/lib/node_modules/@stdlib/blas/base/dznrm2/include.gypi
new file mode 100644
index 000000000000..497aeca15320
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/include.gypi
@@ -0,0 +1,70 @@
+# @license Apache-2.0
+#
+# Copyright (c) 2024 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.
+#
+# Note that nesting variables is required due to how GYP processes a configuration. Any variables defined within a nested 'variables' section is defined in the outer scope. Thus, conditions in the outer variable scope are free to use these variables without running into "variable undefined" errors.
+#
+# Main documentation:
+#
+# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
+# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
+#
+# Variable nesting hacks:
+#
+# [3]: https://chromium.googlesource.com/external/skia/gyp/+/master/common_variables.gypi
+# [4]: https://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?revision=127004
+{
+ # Define variables to be used throughout the configuration for all targets:
+ 'variables': {
+ 'variables': {
+ # Host BLAS library (to override -Dblas=):
+ 'blas%': '',
+
+ # Path to BLAS library (to override -Dblas_dir=):
+ 'blas_dir%': '',
+ }, # end variables
+
+ # Source directory:
+ 'src_dir': './src',
+
+ # Include directories:
+ 'include_dirs': [
+ '<@(blas_dir)',
+ ' tbig ) {
+ abig += abs2( ax * sbig );
+ notbig = false;
+ } else if ( ax < tsml ) {
+ if ( notbig ) {
+ asml += abs2( ax * ssml );
+ }
+ } else {
+ amed += ax * ax;
+ }
+ ax = abs( viewX[ ix + 1 ] );
+ if ( ax > tbig ) {
+ abig += abs2( ax * sbig );
+ notbig = false;
+ } else if ( ax < tsml ) {
+ if ( notbig ) {
+ asml += abs2( ax * ssml );
+ }
+ } else {
+ amed += ax * ax;
+ }
+ ix += sx;
+ }
+ // Combine `abig` and `amed` or `amed` and `asml` if more than one accumulator was used...
+ if ( abig > 0.0 ) {
+ // Combine `abig` and `amed` if `abig` > 0...
+ if ( amed > 0.0 || ( amed > FLOAT64_MAX ) || ( amed !== amed ) ) {
+ abig += ( amed * sbig ) * sbig;
+ }
+ scl = 1.0 / sbig;
+ sumsq = abig;
+ } else if ( asml > 0.0 ) {
+ // Combine `amed` and `asml` if `asml` > 0...
+ if ( amed > 0.0 || amed > FLOAT64_MAX || ( amed !== amed ) ) {
+ amed = sqrt( amed );
+ asml = sqrt( asml ) / ssml;
+ if ( asml > amed ) {
+ ymin = amed;
+ ymax = asml;
+ } else {
+ ymin = asml;
+ ymax = amed;
+ }
+ scl = 1.0;
+ sumsq = ( ymax * ymax ) * ( 1.0 + abs2( ymin / ymax ) );
+ } else {
+ scl = 1.0 / ssml;
+ sumsq = asml;
+ }
+ } else {
+ // All values are mid-range...
+ scl = 1.0;
+ sumsq = amed;
+ }
+ return sqrt( sumsq ) * scl;
+}
+
+
+// EXPORTS //
+
+module.exports = dznrm2;
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/base/dznrm2/lib/ndarray.native.js
new file mode 100644
index 000000000000..6b71ead5effb
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/lib/ndarray.native.js
@@ -0,0 +1,58 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
+var minViewBufferIndex = require( '@stdlib/strided/base/min-view-buffer-index' );
+var addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Computes the L2-norm of a complex double-precision floating-point vector.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Complex128Array} zx - input array
+* @param {integer} strideX - `zx` stride length
+* @param {NonNegativeInteger} offsetX - starting `zx` index
+* @returns {number} L2-norm
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var dznrm2 = require( '@stdlib/blas/base/dznrm2' );
+*
+* var zx = new Complex128Array( [ 0.3, 0.1, 0.5, 0.0, 0.0, 0.5, 0.0, 0.2, 2.0, 3.0 ] );
+*
+* var norm = dznrm2( 4, zx, 1 );
+* // returns ~0.8
+*/
+function dznrm2( N, zx, strideX, offsetX ) {
+ var viewZX;
+ offsetX = minViewBufferIndex( N, strideX, offsetX );
+ viewZX = reinterpret( zx, offsetX );
+ return addon( N, viewZX, strideX );
+}
+
+
+// EXPORTS //
+
+module.exports = dznrm2;
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/manifest.json b/lib/node_modules/@stdlib/blas/base/dznrm2/manifest.json
new file mode 100644
index 000000000000..7abbcb4e360c
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/manifest.json
@@ -0,0 +1,451 @@
+{
+ "options": {
+ "task": "build",
+ "os": "linux",
+ "blas": "",
+ "wasm": false
+ },
+ "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",
+ "os": "linux",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2.f",
+ "./src/dznrm2sub.f",
+ "./src/dznrm2_f.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/create-double"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "linux",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/abs2",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/max"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "linux",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/abs2",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/max"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "linux",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/create-double"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "linux",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "linux",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "mac",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2.f",
+ "./src/dznrm2sub.f",
+ "./src/dznrm2_f.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/create-double"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "mac",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/abs2",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/max"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "mac",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/abs2",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/max"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "mac",
+ "blas": "apple_accelerate_framework",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lblas"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/create-double"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "mac",
+ "blas": "apple_accelerate_framework",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lblas"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "mac",
+ "blas": "apple_accelerate_framework",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lblas"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "mac",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/create-double"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "mac",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "mac",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "win",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/create-double",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/abs2",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/max"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "win",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/abs2",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/max"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "win",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/dznrm2.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/abs2",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/max"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "",
+ "blas": "",
+ "wasm": true,
+ "src": [
+ "./src/dznrm2.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/abs2",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/max"
+ ]
+ }
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/package.json b/lib/node_modules/@stdlib/blas/base/dznrm2/package.json
new file mode 100644
index 000000000000..1c9c493949ef
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/package.json
@@ -0,0 +1,75 @@
+{
+ "name": "@stdlib/blas/base/dznrm2",
+ "version": "0.0.0",
+ "description": "Compute the L2-norm of a complex double-precision floating-point vector.",
+ "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",
+ "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",
+ "level 1",
+ "dznrm2",
+ "euclidean",
+ "norm",
+ "euclidean-norm",
+ "linear",
+ "algebra",
+ "subroutines",
+ "vector",
+ "array",
+ "ndarray",
+ "float64",
+ "double",
+ "float64array"
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/src/Makefile b/lib/node_modules/@stdlib/blas/base/dznrm2/src/Makefile
new file mode 100644
index 000000000000..bcf18aa46655
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/src/Makefile
@@ -0,0 +1,70 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2024 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/base/dznrm2/src/addon.c b/lib/node_modules/@stdlib/blas/base/dznrm2/src/addon.c
new file mode 100644
index 000000000000..59d90cff6642
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/src/addon.c
@@ -0,0 +1,45 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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/base/dznrm2.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 "stdlib/napi/create_double.h"
+#include
+
+/**
+* Receives JavaScript callback invocation data.
+*
+* @private
+* @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, 3 );
+ STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, ZX, N, strideX, argv, 1 );
+ STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(c_dznrm2)( N, ZX, strideX ), norm );
+ return norm;
+}
+
+STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2.c b/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2.c
new file mode 100644
index 000000000000..e75fb386f759
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2.c
@@ -0,0 +1,127 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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/base/dznrm2.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/math/base/special/abs.h"
+#include "stdlib/math/base/special/abs2.h"
+#include "stdlib/math/base/special/sqrt.h"
+#include "stdlib/constants/float64/max.h"
+#include
+
+// Blue's scaling constants...
+static const double tsml = 1.4916681462400413E-154;
+static const double tbig = 1.9979190722022350E+146;
+static const double ssml = 4.4989137945431964E+161;
+static const double sbig = 1.1113793747425387E-162;
+
+/**
+* Computes the L2-norm of a complex double-precision floating-point vector.
+*
+* @param N number of indexed elements
+* @param ZX input array
+* @param strideX ZX stride length
+*/
+double API_SUFFIX(c_dznrm2)( const CBLAS_INT N, const void *ZX, const CBLAS_INT strideX ) {
+ double *x = (double *)ZX;
+ CBLAS_INT sx;
+ CBLAS_INT ix;
+ bool notbig;
+ CBLAS_INT i;
+ double sumsq;
+ double abig;
+ double amed;
+ double asml;
+ double ymax;
+ double ymin;
+ double scl;
+ double ax;
+
+ if ( N <= 0 ) {
+ return 0.0;
+ }
+ sx = strideX * 2;
+ if ( sx < 0 ) {
+ ix = ( 1 - N ) * sx;
+ } else {
+ ix = 0;
+ }
+ // Compute the sum of squares using 3 accumulators--`abig` (sum of squares scaled down to avoid overflow), `asml` (sum of squares scaled up to avoid underflow), `amed` (sum of squares that do not require scaling)--and thresholds and multipliers--`tbig` (values bigger than this are scaled down by `sbig`) and `tsml` (values smaller than this are scaled up by `ssml`)...
+ notbig = true;
+ sumsq = 0.0;
+ abig = 0.0;
+ amed = 0.0;
+ asml = 0.0;
+ for ( i = 0; i < N; i++ ) {
+ ax = stdlib_base_abs( x[ ix ] );
+ if ( ax > tbig ) {
+ abig += stdlib_base_abs2( ax * sbig );
+ notbig = false;
+ } else if ( ax < tsml ) {
+ if ( notbig ) {
+ asml += stdlib_base_abs2( ax * ssml );
+ }
+ } else {
+ amed += stdlib_base_abs2( ax );
+ }
+ ax = stdlib_base_abs( x[ ix + 1 ] );
+ if ( ax > tbig ) {
+ abig += stdlib_base_abs2( ax * sbig );
+ notbig = false;
+ } else if ( ax < tsml ) {
+ if ( notbig ) {
+ asml += stdlib_base_abs2( ax * ssml );
+ }
+ } else {
+ amed += stdlib_base_abs2( ax );
+ }
+ ix += sx;
+ }
+ // Combine `abig` and `amed` or `amed` and `asml` if more than one accumulator was used...
+ if ( abig > 0.0 ) {
+ // Combine `abig` and `amed` if `abig` > 0...
+ if ( amed > 0.0 || ( amed > STDLIB_CONSTANT_FLOAT64_MAX ) || ( amed != amed ) ) {
+ abig += ( amed * sbig ) * sbig;
+ }
+ scl = 1.0 / sbig;
+ sumsq = abig;
+ } else if ( asml > 0.0 ) {
+ // Combine `amed` and `asml` if `asml` > 0...
+ if ( amed > 0.0 || amed > STDLIB_CONSTANT_FLOAT64_MAX || ( amed != amed ) ) {
+ amed = stdlib_base_sqrt( amed );
+ asml = stdlib_base_sqrt( asml ) / ssml;
+ if ( asml > amed ) {
+ ymin = amed;
+ ymax = asml;
+ } else {
+ ymin = asml;
+ ymax = amed;
+ }
+ scl = 1.0;
+ sumsq = stdlib_base_abs2( ymax ) * ( 1.0 + stdlib_base_abs2( ymin / ymax ) );
+ } else {
+ scl = 1.0 / ssml;
+ sumsq = asml;
+ }
+ } else {
+ // All values are mid-range...
+ scl = 1.0;
+ sumsq = amed;
+ }
+ return stdlib_base_sqrt( sumsq ) * scl;
+}
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2.f b/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2.f
new file mode 100644
index 000000000000..05d821fb43c9
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2.f
@@ -0,0 +1,165 @@
+!>
+! @license Apache-2.0
+!
+! Copyright (c) 2024 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.
+!<
+
+!> Computes the L2-norm of a complex double-precision floating-point vector.
+!
+! ## Notes
+!
+! * Modified version of reference BLAS level1 routine (version 3.8.0). Updated to "free form" Fortran 95.
+!
+! ## Authors
+!
+! * Edward Anderson, Lockheed Martin
+! * Weslley Pereira, University of Colorado Denver, USA
+!
+! ## History
+!
+! * Original version written on August 2016.
+!
+! ## License
+!
+! From :
+!
+! > The reference BLAS is a freely-available software package. It is available from netlib via anonymous ftp and the World Wide Web. Thus, it can be included in commercial software packages (and has been). We only ask that proper credit be given to the authors.
+! >
+! > Like all software, it is copyrighted. It is not trademarked, but we do ask the following:
+! >
+! > * If you modify the source for these routines we ask that you change the name of the routine and comment the changes made to the original.
+! >
+! > * We will gladly answer any questions regarding the software. If a modification is done, however, it is the responsibility of the person who modified the routine to provide support.
+!
+! @param {integer} N - number of indexed elements
+! @param {Array>} zx - array
+! @param {integer} strideX - `zx` stride length
+! @returns {double} L2-norm
+!<
+double precision function dznrm2( N, zx, strideX )
+ implicit none
+ ! ..
+ ! Define a kind parameter for single precision:
+ integer, parameter :: wp = kind( 1.0d0 )
+ ! ..
+ ! Define constants:
+ real( wp ), parameter :: zero = 0.0_wp
+ real( wp ), parameter :: one = 1.0_wp
+ real( wp ), parameter :: maxN = huge( 0.0_wp )
+ ! ..
+ ! Blue's scaling constants:
+ real( wp ), parameter :: tsml = 1.4916681462400413e-154_wp
+ real( wp ), parameter :: tbig = 1.9979190722022350e146_wp
+ real( wp ), parameter :: ssml = 4.4989137945431964e161_wp
+ real( wp ), parameter :: sbig = 1.1113793747425387e-162_wp
+ !..
+ ! Scalar arguments:
+ integer :: N, strideX
+ ! ..
+ ! Array arguments:
+ complex( wp ) :: zx( * )
+ ! ..
+ ! Local scalars:
+ integer :: i, ix
+ logical :: notbig
+ real( wp ) :: abig, amed, asml, ax, scl, sumsq, ymax, ymin
+ ! ..
+ ! Intrinsic functions:
+ intrinsic abs, sqrt
+ ! ..
+ dznrm2 = zero
+ ! ..
+ if ( N <= 0 ) return
+ ! ..
+ scl = one
+ sumsq = zero
+ ! ..
+ ! Compute the sum of squares in 3 accumulators:
+ ! abig -- sums of squares scaled down to avoid overflow
+ ! asml -- sums of squares scaled up to avoid underflow
+ ! amed -- sums of squares that do not require scaling
+ ! Thresholds and multipliers:
+ ! tbig -- values bigger than this are scaled down by sbig
+ ! tsml -- values smaller than this are scaled up by ssml
+ ! ..
+ notbig = .true.
+ asml = zero
+ amed = zero
+ abig = zero
+ ix = 1
+ if ( strideX < 0 ) then
+ ix = 1 - ( N - 1 ) * strideX
+ end if
+ ! ..
+ do i = 1, N
+ ax = abs( real( zx( ix ) ) )
+ if ( ax > tbig ) then
+ abig = abig + ( ax * sbig )**2
+ notbig = .false.
+ else if ( ax < tsml ) then
+ if ( notbig ) then
+ asml = asml + ( ax * ssml )**2
+ end if
+ else
+ amed = amed + ax**2
+ end if
+ ax = abs( aimag( zx( ix ) ) )
+ if ( ax > tbig ) then
+ abig = abig + ( ax * sbig )**2
+ notbig = .false.
+ else if ( ax < tsml ) then
+ if ( notbig ) then
+ asml = asml + ( ax * ssml )**2
+ end if
+ else
+ amed = amed + ( ax**2 )
+ end if
+ ix = ix + strideX
+ end do
+ ! ..
+ ! Combine abig and amed or amed and asml if more than one accumulator was used:
+ if ( abig > zero ) then
+ ! Combine abig and amed if abig > 0...
+ if ( ( amed > zero ) .or. ( amed > maxN ) .or. ( amed /= amed ) ) then
+ abig = abig + ( amed * sbig ) * sbig
+ end if
+ scl = one / sbig
+ sumsq = abig
+ else if ( asml > zero ) then
+ ! Combine amed and asml if asml > 0...
+ if ( ( amed > zero ) .or. ( amed > maxN ) .or. ( amed /= amed ) ) then
+ amed = sqrt( amed )
+ asml = sqrt( asml ) / ssml
+ if ( asml > amed ) then
+ ymin = amed
+ ymax = asml
+ else
+ ymin = asml
+ ymax = amed
+ end if
+ scl = one
+ sumsq = ymax**2 * ( one + ( ymin / ymax )**2 )
+ else
+ scl = one / ssml
+ sumsq = asml
+ end if
+ else
+ ! All values are mid-range...
+ scl = one
+ sumsq = amed
+ end if
+ dznrm2 = scl * sqrt( sumsq )
+ return
+end function dznrm2
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2_cblas.c b/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2_cblas.c
new file mode 100644
index 000000000000..f809ea2cff89
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2_cblas.c
@@ -0,0 +1,32 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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/base/dznrm2.h"
+#include "stdlib/blas/base/dznrm2_cblas.h"
+#include "stdlib/blas/base/shared.h"
+
+/**
+* Computes the L2-norm of a complex double-precision floating-point vector.
+*
+* @param N number of indexed elements
+* @param ZX input array
+* @param strideX ZX stride length
+*/
+double API_SUFFIX(c_dznrm2)( const CBLAS_INT N, const void *ZX, const CBLAS_INT strideX ) {
+ return API_SUFFIX(cblas_dznrm2)( N, ZX, strideX );
+}
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2_f.c b/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2_f.c
new file mode 100644
index 000000000000..a2b41fc95663
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2_f.c
@@ -0,0 +1,35 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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/base/dznrm2.h"
+#include "stdlib/blas/base/dznrm2_fortran.h"
+#include "stdlib/blas/base/shared.h"
+
+/**
+* Computes the L2-norm of a complex double-precision floating-point vector.
+*
+* @param N number of indexed elements
+* @param ZX input array
+* @param strideX ZX stride length
+* @return L2-norm
+*/
+double API_SUFFIX(c_dznrm2)( const CBLAS_INT N, const void *ZX, const CBLAS_INT strideX ) {
+ double nrm2;
+ dznrm2sub( &N, ZX, &strideX, &nrm2 );
+ return nrm2;
+}
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2sub.f b/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2sub.f
new file mode 100644
index 000000000000..13629c91ffbb
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2sub.f
@@ -0,0 +1,47 @@
+!>
+! @license Apache-2.0
+!
+! Copyright (c) 2024 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.
+!<
+
+!> Wraps `dznrm2` as a subroutine.
+!
+! @param {integer} N - number of indexed elements
+! @param {Array>} zx - input array
+! @param {integer} strideX - `zx` stride length
+! @param {double} nrm2 - L2-norm
+!<
+subroutine dznrm2sub( N, zx, strideX, nrm2 )
+ implicit none
+ ! ..
+ ! External functions:
+ interface
+ double precision function dznrm2( N, zx, strideX )
+ complex(kind=kind(0.0d0)) :: zx(*)
+ integer :: strideX, N
+ end function dznrm2
+ end interface
+ ! ..
+ ! Scalar arguments:
+ integer :: strideX, N
+ double precision :: nrm2
+ ! ..
+ ! Array arguments:
+ complex(kind=kind(0.0d0)) :: zx(*)
+ ! ..
+ ! Compute the L2-norm:
+ nrm2 = dznrm2( N, zx, strideX )
+ return
+end subroutine dznrm2sub
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.dznrm2.js b/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.dznrm2.js
new file mode 100644
index 000000000000..5c4e27abfd35
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.dznrm2.js
@@ -0,0 +1,215 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 Complex128Array = require( '@stdlib/array/complex128' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var dznrm2 = require( './../lib/dznrm2.js' );
+
+
+// FUNCTIONS //
+
+/**
+* Tests for element-wise approximate equality.
+*
+* @private
+* @param {Object} t - test object
+* @param {Collection} actual - actual values
+* @param {Collection} expected - expected values
+* @param {number} rtol - relative tolerance
+*/
+function isApprox( t, actual, expected, rtol ) {
+ var delta;
+ var tol;
+ var i;
+
+ t.strictEqual( actual.length, expected.length, 'returns expected value' );
+ for ( i = 0; i < expected.length; i++ ) {
+ if ( actual[ i ] === expected[ i ] ) {
+ t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' );
+ } else {
+ delta = abs( actual[ i ] - expected[ i ] );
+ tol = rtol * EPS * abs( expected[ i ] );
+ t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof dznrm2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 3', function test( t ) {
+ t.strictEqual( dznrm2.length, 3, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function computes the L2-norm', function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 0.5, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.5, // 3
+ 0.0, // 4
+ 0.2, // 4
+ 2.0,
+ 3.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, 1 );
+ isApprox( t, actual, expected, 2.0 );
+
+ zx = new Complex128Array([
+ 0.1, // 1
+ 0.1, // 1
+ -0.6, // 2
+ 0.1, // 2
+ 0.1, // 3
+ -0.3, // 3
+ 7.0,
+ 8.0
+ ]);
+ expected = 0.7;
+
+ actual = dznrm2( 3, zx, 1 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0.0`', function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0
+ ]);
+ expected = 0.0;
+
+ actual = dznrm2( 0, zx, 1 );
+ t.strictEqual( actual, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a stride', function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 5.0,
+ 8.0,
+ 0.5, // 2
+ 0.0, // 2
+ 6.0,
+ 9.0,
+ 0.0, // 3
+ 0.5, // 3
+ 8.0,
+ 3.0,
+ 0.0, // 4
+ 0.2, // 4
+ 9.0,
+ 4.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, 2 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative stride', function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 5.0,
+ 8.0,
+ 0.5, // 2
+ 0.0, // 2
+ 6.0,
+ 9.0,
+ 0.0, // 3
+ 0.5, // 3
+ 8.0,
+ 3.0,
+ 0.0, // 4
+ 0.2, // 4
+ 9.0,
+ 4.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, -2 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'the function supports view offsets', function test( t ) {
+ var expected;
+ var actual;
+ var zx0;
+ var zx1;
+
+ zx0 = new Complex128Array([
+ 1.0,
+ 2.0,
+ 3.0, // 1
+ 4.0, // 1
+ 5.0, // 2
+ 6.0, // 2
+ 7.0, // 3
+ 8.0, // 3
+ 9.0,
+ 10.0
+ ]);
+ expected = 14.1;
+
+ zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 );
+
+ actual = dznrm2( 3, zx1, 1 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.dznrm2.native.js b/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.dznrm2.native.js
new file mode 100644
index 000000000000..80b2186c2514
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.dznrm2.native.js
@@ -0,0 +1,224 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 Complex128Array = require( '@stdlib/array/complex128' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var dznrm2 = tryRequire( resolve( __dirname, './../lib/dznrm2.native.js' ) );
+var opts = {
+ 'skip': ( dznrm2 instanceof Error )
+};
+
+
+// FUNCTIONS //
+
+/**
+* Tests for element-wise approximate equality.
+*
+* @private
+* @param {Object} t - test object
+* @param {Collection} actual - actual values
+* @param {Collection} expected - expected values
+* @param {number} rtol - relative tolerance
+*/
+function isApprox( t, actual, expected, rtol ) {
+ var delta;
+ var tol;
+ var i;
+
+ t.strictEqual( actual.length, expected.length, 'returns expected value' );
+ for ( i = 0; i < expected.length; i++ ) {
+ if ( actual[ i ] === expected[ i ] ) {
+ t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' );
+ } else {
+ delta = abs( actual[ i ] - expected[ i ] );
+ tol = rtol * EPS * abs( expected[ i ] );
+ t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof dznrm2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 3', opts, function test( t ) {
+ t.strictEqual( dznrm2.length, 3, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function computes the L2-norm', opts, function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 0.5, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.5, // 3
+ 0.0, // 4
+ 0.2, // 4
+ 2.0,
+ 3.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, 1 );
+ isApprox( t, actual, expected, 2.0 );
+
+ zx = new Complex128Array([
+ 0.1, // 1
+ 0.1, // 1
+ -0.6, // 2
+ 0.1, // 2
+ 0.1, // 3
+ -0.3, // 3
+ 7.0,
+ 8.0
+ ]);
+ expected = 0.7;
+
+ actual = dznrm2( 3, zx, 1 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0.0`', opts, function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0
+ ]);
+ expected = 0.0;
+
+ actual = dznrm2( 0, zx, 1 );
+ t.strictEqual( actual, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a stride', opts, function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 5.0,
+ 8.0,
+ 0.5, // 2
+ 0.0, // 2
+ 6.0,
+ 9.0,
+ 0.0, // 3
+ 0.5, // 3
+ 8.0,
+ 3.0,
+ 0.0, // 4
+ 0.2, // 4
+ 9.0,
+ 4.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, 2 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative stride', opts, function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 5.0,
+ 8.0,
+ 0.5, // 2
+ 0.0, // 2
+ 6.0,
+ 9.0,
+ 0.0, // 3
+ 0.5, // 3
+ 8.0,
+ 3.0,
+ 0.0, // 4
+ 0.2, // 4
+ 9.0,
+ 4.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, -2 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'the function supports view offsets', opts, function test( t ) {
+ var expected;
+ var actual;
+ var zx0;
+ var zx1;
+
+ zx0 = new Complex128Array([
+ 1.0,
+ 2.0,
+ 3.0, // 1
+ 4.0, // 1
+ 5.0, // 2
+ 6.0, // 2
+ 7.0, // 3
+ 8.0, // 3
+ 9.0,
+ 10.0
+ ]);
+ expected = 14.1;
+
+ zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 );
+
+ actual = dznrm2( 3, zx1, 1 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.js b/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.js
new file mode 100644
index 000000000000..4b5a50893221
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.js
@@ -0,0 +1,82 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 isBrowser = require( '@stdlib/assert/is-browser' );
+var dznrm2 = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': isBrowser
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof dznrm2, '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 dznrm2.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 dznrm2 = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( dznrm2, mock, 'returns native implementation' );
+ 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 dznrm2;
+ var main;
+
+ main = require( './../lib/dznrm2.js' );
+
+ dznrm2 = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( dznrm2, main, 'returns JavaScript implementation' );
+ t.end();
+
+ function tryRequire() {
+ return new Error( 'Cannot find module' );
+ }
+});
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.ndarray.js
new file mode 100644
index 000000000000..d1b7b4acd2c0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.ndarray.js
@@ -0,0 +1,212 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 Complex128Array = require( '@stdlib/array/complex128' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var dznrm2 = require( './../lib/ndarray.js' );
+
+
+// FUNCTIONS //
+
+/**
+* Tests for element-wise approximate equality.
+*
+* @private
+* @param {Object} t - test object
+* @param {Collection} actual - actual values
+* @param {Collection} expected - expected values
+* @param {number} rtol - relative tolerance
+*/
+function isApprox( t, actual, expected, rtol ) {
+ var delta;
+ var tol;
+ var i;
+
+ t.strictEqual( actual.length, expected.length, 'returns expected value' );
+ for ( i = 0; i < expected.length; i++ ) {
+ if ( actual[ i ] === expected[ i ] ) {
+ t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' );
+ } else {
+ delta = abs( actual[ i ] - expected[ i ] );
+ tol = rtol * EPS * abs( expected[ i ] );
+ t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof dznrm2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 4', function test( t ) {
+ t.strictEqual( dznrm2.length, 4, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function computes the L2-norm', function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 0.5, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.5, // 3
+ 0.0, // 4
+ 0.2, // 4
+ 2.0,
+ 3.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, 1, 0 );
+ isApprox( t, actual, expected, 2.0 );
+
+ zx = new Complex128Array([
+ 0.1, // 1
+ 0.1, // 1
+ -0.6, // 2
+ 0.1, // 2
+ 0.1, // 3
+ -0.3, // 3
+ 7.0,
+ 8.0
+ ]);
+ expected = 0.7;
+
+ actual = dznrm2( 3, zx, 1, 0 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0.0`', function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0
+ ]);
+ expected = 0.0;
+
+ actual = dznrm2( 0, zx, 1, 0 );
+ t.strictEqual( actual, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a stride', function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 5.0,
+ 8.0,
+ 0.5, // 2
+ 0.0, // 2
+ 6.0,
+ 9.0,
+ 0.0, // 3
+ 0.5, // 3
+ 8.0,
+ 3.0,
+ 0.0, // 4
+ 0.2, // 4
+ 9.0,
+ 4.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, 2, 0 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative stride', function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 5.0,
+ 8.0,
+ 0.5, // 2
+ 0.0, // 2
+ 6.0,
+ 9.0,
+ 0.0, // 3
+ 0.5, // 3
+ 8.0,
+ 3.0,
+ 0.0, // 4
+ 0.2, // 4
+ 9.0,
+ 4.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, -2, 6 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset', function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 1.0,
+ 2.0,
+ 3.0, // 1
+ 4.0, // 1
+ 5.0, // 2
+ 6.0, // 2
+ 7.0, // 3
+ 8.0, // 3
+ 9.0,
+ 10.0
+ ]);
+ expected = 14.1;
+
+ actual = dznrm2( 3, zx, 1, 1 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.ndarray.native.js
new file mode 100644
index 000000000000..541603eddeda
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/dznrm2/test/test.ndarray.native.js
@@ -0,0 +1,221 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 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 Complex128Array = require( '@stdlib/array/complex128' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var dznrm2 = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( dznrm2 instanceof Error )
+};
+
+
+// FUNCTIONS //
+
+/**
+* Tests for element-wise approximate equality.
+*
+* @private
+* @param {Object} t - test object
+* @param {Collection} actual - actual values
+* @param {Collection} expected - expected values
+* @param {number} rtol - relative tolerance
+*/
+function isApprox( t, actual, expected, rtol ) {
+ var delta;
+ var tol;
+ var i;
+
+ t.strictEqual( actual.length, expected.length, 'returns expected value' );
+ for ( i = 0; i < expected.length; i++ ) {
+ if ( actual[ i ] === expected[ i ] ) {
+ t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' );
+ } else {
+ delta = abs( actual[ i ] - expected[ i ] );
+ tol = rtol * EPS * abs( expected[ i ] );
+ t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof dznrm2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 4', opts, function test( t ) {
+ t.strictEqual( dznrm2.length, 4, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function computes the L2-norm', opts, function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 0.5, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.5, // 3
+ 0.0, // 4
+ 0.2, // 4
+ 2.0,
+ 3.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, 1, 0 );
+ isApprox( t, actual, expected, 2.0 );
+
+ zx = new Complex128Array([
+ 0.1, // 1
+ 0.1, // 1
+ -0.6, // 2
+ 0.1, // 2
+ 0.1, // 3
+ -0.3, // 3
+ 7.0,
+ 8.0
+ ]);
+ expected = 0.7;
+
+ actual = dznrm2( 3, zx, 1, 0 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0.0`', opts, function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0
+ ]);
+ expected = 0.0;
+
+ actual = dznrm2( 0, zx, 1, 0 );
+ t.strictEqual( actual, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a stride', opts, function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 5.0,
+ 8.0,
+ 0.5, // 2
+ 0.0, // 2
+ 6.0,
+ 9.0,
+ 0.0, // 3
+ 0.5, // 3
+ 8.0,
+ 3.0,
+ 0.0, // 4
+ 0.2, // 4
+ 9.0,
+ 4.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, 2, 0 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative stride', opts, function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 0.3, // 1
+ 0.1, // 1
+ 5.0,
+ 8.0,
+ 0.5, // 2
+ 0.0, // 2
+ 6.0,
+ 9.0,
+ 0.0, // 3
+ 0.5, // 3
+ 8.0,
+ 3.0,
+ 0.0, // 4
+ 0.2, // 4
+ 9.0,
+ 4.0
+ ]);
+ expected = 0.8;
+
+ actual = dznrm2( 4, zx, -2, 6 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset', opts, function test( t ) {
+ var expected;
+ var actual;
+ var zx;
+
+ zx = new Complex128Array([
+ 1.0,
+ 2.0,
+ 3.0, // 1
+ 4.0, // 1
+ 5.0, // 2
+ 6.0, // 2
+ 7.0, // 3
+ 8.0, // 3
+ 9.0,
+ 10.0
+ ]);
+ expected = 14.1;
+
+ actual = dznrm2( 3, zx, 1, 1 );
+ isApprox( t, actual, expected, 2.0 );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/sdot/lib/sdot.js b/lib/node_modules/@stdlib/blas/base/sdot/lib/sdot.js
index c2195bcff323..36ac4ecbc2bb 100644
--- a/lib/node_modules/@stdlib/blas/base/sdot/lib/sdot.js
+++ b/lib/node_modules/@stdlib/blas/base/sdot/lib/sdot.js
@@ -21,7 +21,7 @@
// MODULES //
var stride2offset = require( '@stdlib/strided/base/stride2offset' );
-var ndarray = require('./ndarray.js');
+var ndarray = require( './ndarray.js' );
// MAIN //
diff --git a/lib/node_modules/@stdlib/blas/base/sdsdot/lib/sdsdot.js b/lib/node_modules/@stdlib/blas/base/sdsdot/lib/sdsdot.js
index 97ad4722dcd2..21180af85a9f 100644
--- a/lib/node_modules/@stdlib/blas/base/sdsdot/lib/sdsdot.js
+++ b/lib/node_modules/@stdlib/blas/base/sdsdot/lib/sdsdot.js
@@ -21,8 +21,8 @@
// MODULES //
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
-var stride2offset = require('@stdlib/strided/base/stride2offset');
-var ndarray = require('./ndarray.js');
+var stride2offset = require( '@stdlib/strided/base/stride2offset' );
+var ndarray = require( './ndarray.js' );
// MAIN //
diff --git a/lib/node_modules/@stdlib/blas/base/srot/lib/srot.js b/lib/node_modules/@stdlib/blas/base/srot/lib/srot.js
index a338c0dda778..75c57aedb804 100644
--- a/lib/node_modules/@stdlib/blas/base/srot/lib/srot.js
+++ b/lib/node_modules/@stdlib/blas/base/srot/lib/srot.js
@@ -21,7 +21,7 @@
// MODULES //
var stride2offset = require( '@stdlib/strided/base/stride2offset' );
-var ndarray = require('./ndarray.js');
+var ndarray = require( './ndarray.js' );
// MAIN //
diff --git a/lib/node_modules/@stdlib/blas/base/srotg/test/test.assign.js b/lib/node_modules/@stdlib/blas/base/srotg/test/test.assign.js
index 635d12a3e2dc..ed47ce929949 100644
--- a/lib/node_modules/@stdlib/blas/base/srotg/test/test.assign.js
+++ b/lib/node_modules/@stdlib/blas/base/srotg/test/test.assign.js
@@ -107,7 +107,7 @@ tape( 'the function supports providing a positive stride', function test(t) {
actual = srotg( 0.3, 0.4, out, 2, 0 );
t.strictEqual( actual, out, 'returns expected value' );
- t.deepEqual( actual, expected, 'returns expected value');
+ t.deepEqual( actual, expected, 'returns expected value' );
t.end();
});
@@ -121,7 +121,7 @@ tape( 'the function supports providing a negative stride', function test(t) {
actual = srotg( 0.3, 0.4, out, -2, 6 );
t.strictEqual( actual, out, 'returns expected value' );
- t.deepEqual( actual, expected, 'returns expected value');
+ t.deepEqual( actual, expected, 'returns expected value' );
t.end();
});
@@ -135,7 +135,7 @@ tape( 'the function supports providing an offset', function test(t) {
actual = srotg( 0.3, 0.4, out, 1, 1 );
t.strictEqual( actual, out, 'returns expected value' );
- t.deepEqual( actual, expected, 'returns expected value');
+ t.deepEqual( actual, expected, 'returns expected value' );
t.end();
});
@@ -149,6 +149,6 @@ tape( 'the function supports providing both a stride and offset', function test(
actual = srotg( 0.3, 0.4, out, 2, 2 );
t.strictEqual( actual, out, 'returns expected value' );
- t.deepEqual( actual, expected, 'returns expected value');
+ t.deepEqual( actual, expected, 'returns expected value' );
t.end();
});
diff --git a/lib/node_modules/@stdlib/blas/base/srotm/lib/srotm.js b/lib/node_modules/@stdlib/blas/base/srotm/lib/srotm.js
index aa95b01cd67c..c4e028821d33 100644
--- a/lib/node_modules/@stdlib/blas/base/srotm/lib/srotm.js
+++ b/lib/node_modules/@stdlib/blas/base/srotm/lib/srotm.js
@@ -21,7 +21,7 @@
// MODULES //
var stride2offset = require( '@stdlib/strided/base/stride2offset' );
-var ndarray = require('./ndarray.js');
+var ndarray = require( './ndarray.js' );
// MAIN //
diff --git a/lib/node_modules/@stdlib/blas/base/sswap/lib/sswap.js b/lib/node_modules/@stdlib/blas/base/sswap/lib/sswap.js
index f5ff4e322269..afac7b3d1535 100644
--- a/lib/node_modules/@stdlib/blas/base/sswap/lib/sswap.js
+++ b/lib/node_modules/@stdlib/blas/base/sswap/lib/sswap.js
@@ -20,8 +20,8 @@
// MODULES //
-var stride2offset = require('@stdlib/strided/base/stride2offset');
-var ndarray = require('./ndarray.js');
+var stride2offset = require( '@stdlib/strided/base/stride2offset' );
+var ndarray = require( './ndarray.js' );
// MAIN //
diff --git a/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/examples/index.js
index fcfe1f21cddd..52f20ff63955 100644
--- a/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/examples/index.js
+++ b/lib/node_modules/@stdlib/blas/ext/base/dnansumkbn2/examples/index.js
@@ -18,10 +18,10 @@
'use strict';
-var discreteUniform = require('@stdlib/random/base/discrete-uniform');
-var bernoulli = require('@stdlib/random/base/bernoulli');
-var filledarrayBy = require('@stdlib/array/filled-by');
-var dnansumkbn2 = require('./../lib');
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
+var bernoulli = require( '@stdlib/random/base/bernoulli' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var dnansumkbn2 = require( './../lib' );
function clbk() {
if ( bernoulli( 0.7 ) > 0 ) {
diff --git a/lib/node_modules/@stdlib/complex/base/parse/lib/main.js b/lib/node_modules/@stdlib/complex/base/parse/lib/main.js
index c364db5353a4..4cfa330cbc21 100644
--- a/lib/node_modules/@stdlib/complex/base/parse/lib/main.js
+++ b/lib/node_modules/@stdlib/complex/base/parse/lib/main.js
@@ -65,13 +65,13 @@ function parse( str ) {
str = replace( str, ' ', '' );
for ( i = 0; i < str.length; i++ ) {
if ( (str[i] === '+' || str[i] === '-') && i !== 0 && str[i - 1] !== 'e' ) {
- parts.push(currentToken);
+ parts.push( currentToken );
currentToken = '';
} else if ( i === str.length - 1 ) {
- currentToken += str[i];
- parts.push(currentToken);
+ currentToken += str[ i ];
+ parts.push( currentToken );
}
- currentToken += str[i];
+ currentToken += str[ i ];
}
for ( i = 0; i < parts.length; i++ ) { // Check for invalid parts...
diff --git a/lib/node_modules/@stdlib/complex/float32/parse/test/test.js b/lib/node_modules/@stdlib/complex/float32/parse/test/test.js
index f672ee2dcf6e..a9ea3614eb6e 100644
--- a/lib/node_modules/@stdlib/complex/float32/parse/test/test.js
+++ b/lib/node_modules/@stdlib/complex/float32/parse/test/test.js
@@ -59,7 +59,7 @@ tape( 'the function will parse a string representation of a complex number', fun
w = parseComplex64( '5 + 12i' );
t.ok( isComplex64( w ), 'is an instance' );
- t.ok( isSameComplex64( w, z ), 'has expected property value');
+ t.ok( isSameComplex64( w, z ), 'has expected property value' );
t.end();
});
diff --git a/lib/node_modules/@stdlib/complex/float64/parse/test/test.js b/lib/node_modules/@stdlib/complex/float64/parse/test/test.js
index c82c486c15e1..c67552dac3e1 100644
--- a/lib/node_modules/@stdlib/complex/float64/parse/test/test.js
+++ b/lib/node_modules/@stdlib/complex/float64/parse/test/test.js
@@ -59,7 +59,7 @@ tape( 'the function will parse a string representation of a complex number', fun
w = parseComplex128( '5 + 12i' );
t.ok( isComplex128( w ), 'is an instance' );
- t.ok( isSameComplex128( w, z ), 'has expected property value');
+ t.ok( isSameComplex128( w, z ), 'has expected property value' );
t.end();
});
diff --git a/lib/node_modules/@stdlib/fs/append-file/test/test.cli.js b/lib/node_modules/@stdlib/fs/append-file/test/test.cli.js
index ccf695f9d521..f6fe27839c94 100644
--- a/lib/node_modules/@stdlib/fs/append-file/test/test.cli.js
+++ b/lib/node_modules/@stdlib/fs/append-file/test/test.cli.js
@@ -188,7 +188,7 @@ tape( 'the command-line interface appends data received from `stdin` to a file',
t.strictEqual( stderr.toString(), '', 'does not print to `stderr`' );
}
actual = readFileSync( FILE, 'utf8' );
- t.strictEqual(actual, expected, 'file contains expected contents');
+ t.strictEqual( actual, expected, 'file contains expected contents' );
restore();
t.end();
diff --git a/lib/node_modules/@stdlib/iter/do-while-each/examples/index.js b/lib/node_modules/@stdlib/iter/do-while-each/examples/index.js
index 04793191cece..a2eb563c4a78 100644
--- a/lib/node_modules/@stdlib/iter/do-while-each/examples/index.js
+++ b/lib/node_modules/@stdlib/iter/do-while-each/examples/index.js
@@ -43,10 +43,10 @@ var it = iterDoWhileEach( rand, predicate, assert );
// Iterate over the iterator:
var r;
-while (true) {
+while ( true ) {
r = it.next();
- if (r.done) {
+ if ( r.done ) {
break;
}
- console.log(r.value);
+ console.log( r.value );
}
diff --git a/lib/node_modules/@stdlib/math/base/special/acosd/lib/main.js b/lib/node_modules/@stdlib/math/base/special/acosd/lib/main.js
index 8e3bb72c7ac2..5db916348d9f 100644
--- a/lib/node_modules/@stdlib/math/base/special/acosd/lib/main.js
+++ b/lib/node_modules/@stdlib/math/base/special/acosd/lib/main.js
@@ -20,8 +20,8 @@
// MODULES //
-var rad2deg = require('@stdlib/math/base/special/rad2deg');
-var acos = require('@stdlib/math/base/special/acos');
+var rad2deg = require( '@stdlib/math/base/special/rad2deg' );
+var acos = require( '@stdlib/math/base/special/acos' );
// MAIN //
diff --git a/lib/node_modules/@stdlib/math/base/special/acotd/lib/main.js b/lib/node_modules/@stdlib/math/base/special/acotd/lib/main.js
index 15054d14f0c4..7179721da52c 100644
--- a/lib/node_modules/@stdlib/math/base/special/acotd/lib/main.js
+++ b/lib/node_modules/@stdlib/math/base/special/acotd/lib/main.js
@@ -53,8 +53,8 @@ var acot = require( '@stdlib/math/base/special/acot' );
* // returns NaN
*/
function acotd( x ) {
- var rad = acot(x);
- return rad2deg(rad);
+ var rad = acot( x );
+ return rad2deg( rad );
}
diff --git a/lib/node_modules/@stdlib/math/base/special/acscdf/test/test.js b/lib/node_modules/@stdlib/math/base/special/acscdf/test/test.js
index 9429d8450555..393ea050ccb3 100644
--- a/lib/node_modules/@stdlib/math/base/special/acscdf/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/acscdf/test/test.js
@@ -25,7 +25,7 @@ var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
var uniform = require( '@stdlib/random/base/uniform' );
var abs = require( '@stdlib/math/base/special/abs' );
var EPS = require( '@stdlib/constants/float32/eps' );
-var float64ToFloat32 = require('@stdlib/number/float64/base/to-float32');
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
var acscdf = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/math/base/special/acscdf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/acscdf/test/test.native.js
index dd16800b80f0..bc07452bb70f 100644
--- a/lib/node_modules/@stdlib/math/base/special/acscdf/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/acscdf/test/test.native.js
@@ -26,7 +26,7 @@ var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
var uniform = require( '@stdlib/random/base/uniform' );
var abs = require( '@stdlib/math/base/special/abs' );
var EPS = require( '@stdlib/constants/float32/eps' );
-var float64ToFloat32 = require('@stdlib/number/float64/base/to-float32');
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
var tryRequire = require( '@stdlib/utils/try-require' );
diff --git a/lib/node_modules/@stdlib/math/base/special/asec/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/asec/benchmark/benchmark.native.js
index c77f5156d14b..4752c0beef1e 100644
--- a/lib/node_modules/@stdlib/math/base/special/asec/benchmark/benchmark.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/asec/benchmark/benchmark.native.js
@@ -20,25 +20,25 @@
// MODULES //
-var resolve = require('path').resolve;
-var bench = require('@stdlib/bench');
-var randu = require('@stdlib/random/base/randu');
-var isnan = require('@stdlib/math/base/assert/is-nan');
-var tryRequire = require('@stdlib/utils/try-require');
-var pkg = require('./../package.json').name;
+var resolve = require( 'path' ).resolve;
+var bench = require( '@stdlib/bench' );
+var randu = require( '@stdlib/random/base/randu' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
// VARIABLES //
-var asec = tryRequire(resolve(__dirname, './../lib/native.js'));
+var asec = tryRequire( resolve( __dirname, './../lib/native.js' ) );
var opts = {
- 'skip': (asec instanceof Error)
+ 'skip': ( asec instanceof Error )
};
// MAIN //
-bench(pkg + '::native', opts, function benchmark(b) {
+bench( pkg + '::native', opts, function benchmark( b ) {
var y;
var i;
var x;
diff --git a/lib/node_modules/@stdlib/math/base/special/asecd/test/test.js b/lib/node_modules/@stdlib/math/base/special/asecd/test/test.js
index 67e207f3c8dc..a0911a598ceb 100644
--- a/lib/node_modules/@stdlib/math/base/special/asecd/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/asecd/test/test.js
@@ -22,9 +22,9 @@
var tape = require( 'tape' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
-var abs = require('@stdlib/math/base/special/abs');
+var abs = require( '@stdlib/math/base/special/abs' );
var EPS = require( '@stdlib/constants/float64/eps' );
-var randu = require('@stdlib/random/base/randu');
+var randu = require( '@stdlib/random/base/randu' );
var asecd = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/math/base/special/asecd/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/asecd/test/test.native.js
index c3700a0052a5..1e2d5122846a 100644
--- a/lib/node_modules/@stdlib/math/base/special/asecd/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/asecd/test/test.native.js
@@ -23,9 +23,9 @@
var resolve = require( 'path' ).resolve;
var tape = require( 'tape' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
-var abs = require('@stdlib/math/base/special/abs');
+var abs = require( '@stdlib/math/base/special/abs' );
var EPS = require( '@stdlib/constants/float64/eps' );
-var randu = require('@stdlib/random/base/randu');
+var randu = require( '@stdlib/random/base/randu' );
var tryRequire = require( '@stdlib/utils/try-require' );
diff --git a/lib/node_modules/@stdlib/math/base/special/asecf/test/test.js b/lib/node_modules/@stdlib/math/base/special/asecf/test/test.js
index 511d2bac357d..33b911ad9f0b 100644
--- a/lib/node_modules/@stdlib/math/base/special/asecf/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/asecf/test/test.js
@@ -24,7 +24,7 @@ var tape = require( 'tape' );
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
var EPS = require( '@stdlib/constants/float32/eps' );
var abs = require( '@stdlib/math/base/special/abs' );
-var float64ToFloat32 = require('@stdlib/number/float64/base/to-float32');
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
var asecf = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/math/base/special/asecf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/asecf/test/test.native.js
index 76b314be2f6b..fdf47a656bc4 100644
--- a/lib/node_modules/@stdlib/math/base/special/asecf/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/asecf/test/test.native.js
@@ -25,7 +25,7 @@ var tape = require( 'tape' );
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
var EPS = require( '@stdlib/constants/float32/eps' );
var abs = require( '@stdlib/math/base/special/abs' );
-var float64ToFloat32 = require('@stdlib/number/float64/base/to-float32');
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
var tryRequire = require( '@stdlib/utils/try-require' );
diff --git a/lib/node_modules/@stdlib/math/base/special/asindf/test/test.js b/lib/node_modules/@stdlib/math/base/special/asindf/test/test.js
index f668dc9d0102..d4ed4003e024 100644
--- a/lib/node_modules/@stdlib/math/base/special/asindf/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/asindf/test/test.js
@@ -25,7 +25,7 @@ var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
var uniform = require( '@stdlib/random/base/uniform' );
var abs = require( '@stdlib/math/base/special/abs' );
var EPS = require( '@stdlib/constants/float32/eps' );
-var float64ToFloat32 = require('@stdlib/number/float64/base/to-float32');
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
var asindf = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/math/base/special/asindf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/asindf/test/test.native.js
index 12b9c6d5daad..b92903c9ddaf 100644
--- a/lib/node_modules/@stdlib/math/base/special/asindf/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/asindf/test/test.native.js
@@ -26,7 +26,7 @@ var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
var uniform = require( '@stdlib/random/base/uniform' );
var abs = require( '@stdlib/math/base/special/abs' );
var EPS = require( '@stdlib/constants/float32/eps' );
-var float64ToFloat32 = require('@stdlib/number/float64/base/to-float32');
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
var tryRequire = require( '@stdlib/utils/try-require' );
diff --git a/lib/node_modules/@stdlib/math/base/special/bessely1/test/test.js b/lib/node_modules/@stdlib/math/base/special/bessely1/test/test.js
index 5f948a586a2e..8ccb327be333 100644
--- a/lib/node_modules/@stdlib/math/base/special/bessely1/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/bessely1/test/test.js
@@ -197,7 +197,7 @@ tape( 'The Bessel function of the second kind of one order (Y_1) (subnormal valu
x = subnormal.x;
for ( i = 0; i < x.length; i++ ) {
y = y1( x[i] );
- t.equal( y, NINF, 'returns -Infinity');
+ t.equal( y, NINF, 'returns -Infinity' );
}
t.end();
});
diff --git a/lib/node_modules/@stdlib/math/base/special/beta/lib/main.js b/lib/node_modules/@stdlib/math/base/special/beta/lib/main.js
index 30d5e53b0692..eb5d2b16052a 100644
--- a/lib/node_modules/@stdlib/math/base/special/beta/lib/main.js
+++ b/lib/node_modules/@stdlib/math/base/special/beta/lib/main.js
@@ -143,7 +143,7 @@ function beta( a, b ) {
} else {
res *= pow( (agh*bgh)/(cgh*cgh), b );
}
- res *= sqrt( E/bgh);
+ res *= sqrt( E/bgh );
return res;
}
diff --git a/lib/node_modules/@stdlib/math/base/special/boxcox/test/test.js b/lib/node_modules/@stdlib/math/base/special/boxcox/test/test.js
index 74fd80be48cb..296413da88db 100644
--- a/lib/node_modules/@stdlib/math/base/special/boxcox/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/boxcox/test/test.js
@@ -48,7 +48,7 @@ tape( 'main export is a function', function test( t ) {
tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {
var b;
- b = boxcox( NaN, 1.0);
+ b = boxcox( NaN, 1.0 );
t.equal( isnan( b ), true, 'returns NaN' );
b = boxcox( 1.0, NaN );
diff --git a/lib/node_modules/@stdlib/math/base/special/boxcox/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/boxcox/test/test.native.js
index 4b074c7db737..21331670e081 100644
--- a/lib/node_modules/@stdlib/math/base/special/boxcox/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/boxcox/test/test.native.js
@@ -57,7 +57,7 @@ tape( 'main export is a function', opts, function test( t ) {
tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {
var b;
- b = boxcox( NaN, 1.0);
+ b = boxcox( NaN, 1.0 );
t.equal( isnan( b ), true, 'returns NaN' );
b = boxcox( 1.0, NaN );
diff --git a/lib/node_modules/@stdlib/math/base/special/boxcox1p/test/test.js b/lib/node_modules/@stdlib/math/base/special/boxcox1p/test/test.js
index c9c57e8e252a..0b9307ea9311 100644
--- a/lib/node_modules/@stdlib/math/base/special/boxcox1p/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/boxcox1p/test/test.js
@@ -50,7 +50,7 @@ tape( 'main export is a function', function test( t ) {
tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {
var b;
- b = boxcox1p( NaN, 1.0);
+ b = boxcox1p( NaN, 1.0 );
t.equal( isnan( b ), true, 'returns NaN' );
b = boxcox1p( 1.0, NaN );
diff --git a/lib/node_modules/@stdlib/math/base/special/boxcox1p/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/boxcox1p/test/test.native.js
index 84dbe90a4564..31f934263a96 100644
--- a/lib/node_modules/@stdlib/math/base/special/boxcox1p/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/boxcox1p/test/test.native.js
@@ -59,7 +59,7 @@ tape( 'main export is a function', opts, function test( t ) {
tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {
var b;
- b = boxcox1p( NaN, 1.0);
+ b = boxcox1p( NaN, 1.0 );
t.equal( isnan( b ), true, 'returns NaN' );
b = boxcox1p( 1.0, NaN );
diff --git a/lib/node_modules/@stdlib/math/base/special/boxcox1pinv/test/test.js b/lib/node_modules/@stdlib/math/base/special/boxcox1pinv/test/test.js
index 7f98d40230a1..ffa20f3e9cf6 100644
--- a/lib/node_modules/@stdlib/math/base/special/boxcox1pinv/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/boxcox1pinv/test/test.js
@@ -50,7 +50,7 @@ tape( 'main export is a function', function test( t ) {
tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {
var b;
- b = boxcox1pinv( NaN, 1.0);
+ b = boxcox1pinv( NaN, 1.0 );
t.equal( isnan( b ), true, 'returns NaN' );
b = boxcox1pinv( 1.0, NaN );
diff --git a/lib/node_modules/@stdlib/math/base/special/boxcox1pinv/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/boxcox1pinv/test/test.native.js
index 38f5ab7ad7d7..3cfafba1e689 100644
--- a/lib/node_modules/@stdlib/math/base/special/boxcox1pinv/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/boxcox1pinv/test/test.native.js
@@ -59,7 +59,7 @@ tape( 'main export is a function', opts, function test( t ) {
tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {
var b;
- b = boxcox1pinv( NaN, 1.0);
+ b = boxcox1pinv( NaN, 1.0 );
t.equal( isnan( b ), true, 'returns NaN' );
b = boxcox1pinv( 1.0, NaN );
diff --git a/lib/node_modules/@stdlib/math/base/special/boxcoxinv/test/test.js b/lib/node_modules/@stdlib/math/base/special/boxcoxinv/test/test.js
index 9ef77883859c..f5d2a603fa82 100644
--- a/lib/node_modules/@stdlib/math/base/special/boxcoxinv/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/boxcoxinv/test/test.js
@@ -49,7 +49,7 @@ tape( 'main export is a function', function test( t ) {
tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {
var b;
- b = boxcoxinv( NaN, 1.0);
+ b = boxcoxinv( NaN, 1.0 );
t.equal( isnan( b ), true, 'returns NaN' );
b = boxcoxinv( 1.0, NaN );
diff --git a/lib/node_modules/@stdlib/math/base/special/boxcoxinv/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/boxcoxinv/test/test.native.js
index 1127e1d0531c..ada83bafe164 100644
--- a/lib/node_modules/@stdlib/math/base/special/boxcoxinv/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/boxcoxinv/test/test.native.js
@@ -58,7 +58,7 @@ tape( 'main export is a function', opts, function test( t ) {
tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {
var b;
- b = boxcoxinv( NaN, 1.0);
+ b = boxcoxinv( NaN, 1.0 );
t.equal( isnan( b ), true, 'returns NaN' );
b = boxcoxinv( 1.0, NaN );
diff --git a/lib/node_modules/@stdlib/math/base/special/cexp/lib/main.js b/lib/node_modules/@stdlib/math/base/special/cexp/lib/main.js
index 09a4afa0d597..717dcba3b069 100644
--- a/lib/node_modules/@stdlib/math/base/special/cexp/lib/main.js
+++ b/lib/node_modules/@stdlib/math/base/special/cexp/lib/main.js
@@ -20,7 +20,7 @@
// MODULES //
-var Complex128 = require('@stdlib/complex/float64/ctor');
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
var copysign = require( '@stdlib/math/base/special/copysign' );
var sincos = require( '@stdlib/math/base/special/sincos' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
diff --git a/lib/node_modules/@stdlib/math/base/special/cinv/lib/main.js b/lib/node_modules/@stdlib/math/base/special/cinv/lib/main.js
index 64f297bcc00f..3d0ac80da10c 100644
--- a/lib/node_modules/@stdlib/math/base/special/cinv/lib/main.js
+++ b/lib/node_modules/@stdlib/math/base/special/cinv/lib/main.js
@@ -97,7 +97,7 @@ function cinv( z ) {
}
re *= s;
im *= s;
- return new Complex128( re, im);
+ return new Complex128( re, im );
}
diff --git a/lib/node_modules/@stdlib/math/base/special/cosm1/test/test.js b/lib/node_modules/@stdlib/math/base/special/cosm1/test/test.js
index bcfe9bfd00f9..740dbfc662f2 100644
--- a/lib/node_modules/@stdlib/math/base/special/cosm1/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/cosm1/test/test.js
@@ -69,7 +69,7 @@ tape( 'the function computes the cosine minues one more accurately inside the in
} else {
delta = abs( y - expected[i] );
tol = 2.0 * EPS * abs( expected[i] );
- t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.');
+ t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' );
}
}
@@ -91,7 +91,7 @@ tape( 'the function computes `cos(x) - 1.0` outside the interval [-Ï€/4,Ï€/4]',
expected = cos( x[i] ) - 1;
delta = abs( y - expected );
tol = EPS * abs( expected );
- t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. E: '+expected+'. tol: '+tol+'. Δ: '+delta+'.');
+ t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. E: '+expected+'. tol: '+tol+'. Δ: '+delta+'.' );
}
x = linspace( -4.0*PI, NPIO4, 100 );
@@ -101,7 +101,7 @@ tape( 'the function computes `cos(x) - 1.0` outside the interval [-Ï€/4,Ï€/4]',
expected = cos( x[i] ) - 1.0;
delta = abs( y - expected );
tol = EPS * abs( expected );
- t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. E: '+expected+'. tol: '+tol+'. Δ: '+delta+'.');
+ t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. E: '+expected+'. tol: '+tol+'. Δ: '+delta+'.' );
}
t.end();
diff --git a/lib/node_modules/@stdlib/math/base/special/csc/lib/index.js b/lib/node_modules/@stdlib/math/base/special/csc/lib/index.js
index 515070b6d076..26e8d1037dc2 100644
--- a/lib/node_modules/@stdlib/math/base/special/csc/lib/index.js
+++ b/lib/node_modules/@stdlib/math/base/special/csc/lib/index.js
@@ -44,7 +44,7 @@
// MODULES //
-var main = require('./main.js');
+var main = require( './main.js' );
// EXPORTS //
diff --git a/lib/node_modules/@stdlib/math/base/special/csc/lib/main.js b/lib/node_modules/@stdlib/math/base/special/csc/lib/main.js
index 30f4f6a2d1f7..3d2cbe4fb3a8 100644
--- a/lib/node_modules/@stdlib/math/base/special/csc/lib/main.js
+++ b/lib/node_modules/@stdlib/math/base/special/csc/lib/main.js
@@ -20,7 +20,7 @@
// MODULES //
-var sin = require('@stdlib/math/base/special/sin');
+var sin = require( '@stdlib/math/base/special/sin' );
// MAIN //
@@ -52,7 +52,7 @@ var sin = require('@stdlib/math/base/special/sin');
* // returns NaN
*/
function csc( x ) {
- return 1.0 / sin(x);
+ return 1.0 / sin( x );
}
diff --git a/lib/node_modules/@stdlib/math/base/special/csc/test/test.js b/lib/node_modules/@stdlib/math/base/special/csc/test/test.js
index b6367b91e087..97ab0b739eeb 100644
--- a/lib/node_modules/@stdlib/math/base/special/csc/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/csc/test/test.js
@@ -50,8 +50,8 @@ var tinyPositive = require( './fixtures/julia/tiny_positive.json' );
// TESTS //
tape( 'main export is a function', function test( t ) {
- t.ok(true, __filename);
- t.true(typeof csc, 'function', 'main export is a function');
+ t.ok( true, __filename );
+ t.true( typeof csc, 'function', 'main export is a function' );
t.end();
});
diff --git a/lib/node_modules/@stdlib/math/base/special/exp/lib/expmulti.js b/lib/node_modules/@stdlib/math/base/special/exp/lib/expmulti.js
index c440e5123cad..d333c7e89b5b 100644
--- a/lib/node_modules/@stdlib/math/base/special/exp/lib/expmulti.js
+++ b/lib/node_modules/@stdlib/math/base/special/exp/lib/expmulti.js
@@ -88,7 +88,7 @@ function expmulti( hi, lo, k ) {
r = hi - lo;
t = r * r;
c = r - ( t*polyvalP( t ) );
- y = 1.0 - ( lo - ( (r*c)/(2.0-c) ) - hi);
+ y = 1.0 - ( lo - ( (r*c)/(2.0-c) ) - hi );
return ldexp( y, k );
}
diff --git a/lib/node_modules/@stdlib/math/base/special/expm1rel/test/test.js b/lib/node_modules/@stdlib/math/base/special/expm1rel/test/test.js
index 382e6c4120b3..5005126114b1 100644
--- a/lib/node_modules/@stdlib/math/base/special/expm1rel/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/expm1rel/test/test.js
@@ -148,23 +148,23 @@ tape( 'the function accurately computes `(exp(x)-1)/x` for very small `x`', func
tape( 'the function returns `1.0` near `0.0`', function test( t ) {
t.equal( expm1rel( 0 ), 1.0, 'equals 1.0' );
- t.equal( expm1rel( EPS ), 1.0, 'equals 1.0');
- t.equal( expm1rel( -EPS ), 1.0, 'equals 1.0');
+ t.equal( expm1rel( EPS ), 1.0, 'equals 1.0' );
+ t.equal( expm1rel( -EPS ), 1.0, 'equals 1.0' );
t.end();
});
-tape( 'the function returns `NaN` when evaulated at `NaN`', function test( t ) {
+tape( 'the function returns `NaN` when evaluated at `NaN`', function test( t ) {
var y = expm1rel( NaN );
- t.equal( isnan( y ), true, 'equals NaN');
+ t.equal( isnan( y ), true, 'equals NaN' );
t.end();
});
tape('the function returns `+infinity` at `+infinity`', function test( t ) {
- t.equal( expm1rel( PINF ), PINF, 'equals +infinity');
+ t.equal( expm1rel( PINF ), PINF, 'equals +infinity' );
t.end();
});
tape('the function returns `0` at `-infinity`', function test( t ) {
- t.equal( expm1rel( NINF ), 0.0, 'equals 0');
+ t.equal( expm1rel( NINF ), 0.0, 'equals 0' );
t.end();
});
diff --git a/lib/node_modules/@stdlib/math/base/special/expm1rel/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/expm1rel/test/test.native.js
index b4fc66f96195..8f8efec03d46 100644
--- a/lib/node_modules/@stdlib/math/base/special/expm1rel/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/expm1rel/test/test.native.js
@@ -157,23 +157,23 @@ tape( 'the function accurately computes `(exp(x)-1)/x` for very small `x`', opts
tape( 'the function returns `1.0` near `0.0`', opts, function test( t ) {
t.equal( expm1rel( 0 ), 1.0, 'equals 1.0' );
- t.equal( expm1rel( EPS ), 1.0, 'equals 1.0');
- t.equal( expm1rel( -EPS ), 1.0, 'equals 1.0');
+ t.equal( expm1rel( EPS ), 1.0, 'equals 1.0' );
+ t.equal( expm1rel( -EPS ), 1.0, 'equals 1.0' );
t.end();
});
-tape( 'the function returns `NaN` when evaulated at `NaN`', opts, function test( t ) {
+tape( 'the function returns `NaN` when evaluated at `NaN`', opts, function test( t ) {
var y = expm1rel( NaN );
- t.equal( isnan( y ), true, 'equals NaN');
+ t.equal( isnan( y ), true, 'equals NaN' );
t.end();
});
tape('the function returns `+infinity` at `+infinity`', opts, function test( t ) {
- t.equal( expm1rel( PINF ), PINF, 'equals +infinity');
+ t.equal( expm1rel( PINF ), PINF, 'equals +infinity' );
t.end();
});
tape('the function returns `0` at `-infinity`', opts, function test( t ) {
- t.equal( expm1rel( NINF ), 0.0, 'equals 0');
+ t.equal( expm1rel( NINF ), 0.0, 'equals 0' );
t.end();
});
diff --git a/lib/node_modules/@stdlib/math/base/special/fast/pow-int/test/test.js b/lib/node_modules/@stdlib/math/base/special/fast/pow-int/test/test.js
index 51dbc0a0513f..aadf9f745cc9 100644
--- a/lib/node_modules/@stdlib/math/base/special/fast/pow-int/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/fast/pow-int/test/test.js
@@ -212,7 +212,7 @@ tape( '`+-0` raised to a positive even integer is `0`', function test( t ) {
v = pow( +0.0, y );
t.strictEqual( isPositiveZero( v ), true, 'pow(0,'+y+') returns +0' );
- v = pow( -0.0, y);
+ v = pow( -0.0, y );
t.strictEqual( isPositiveZero( v ), true, 'pow(-0,'+y+') returns +0' );
}
t.end();
diff --git a/lib/node_modules/@stdlib/math/base/special/fast/pow-int/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/fast/pow-int/test/test.native.js
index 96602893adf3..1031640f7fbb 100644
--- a/lib/node_modules/@stdlib/math/base/special/fast/pow-int/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/fast/pow-int/test/test.native.js
@@ -221,7 +221,7 @@ tape( '`+-0` raised to a positive even integer is `0`', opts, function test( t )
v = pow( +0.0, y );
t.strictEqual( isPositiveZero( v ), true, 'pow(0,'+y+') returns +0' );
- v = pow( -0.0, y);
+ v = pow( -0.0, y );
t.strictEqual( isPositiveZero( v ), true, 'pow(-0,'+y+') returns +0' );
}
t.end();
diff --git a/lib/node_modules/@stdlib/math/base/special/gamma-delta-ratio/lib/gamma_delta_ratio_lanczos.js b/lib/node_modules/@stdlib/math/base/special/gamma-delta-ratio/lib/gamma_delta_ratio_lanczos.js
index 052a8894b06a..9800f78778ba 100644
--- a/lib/node_modules/@stdlib/math/base/special/gamma-delta-ratio/lib/gamma_delta_ratio_lanczos.js
+++ b/lib/node_modules/@stdlib/math/base/special/gamma-delta-ratio/lib/gamma_delta_ratio_lanczos.js
@@ -97,7 +97,7 @@ function gammaDeltaRatioLanczos( z, delta ) {
}
} else {
if ( abs(delta) < 10.0 ) {
- result = exp( ( 0.5-z ) * log1p( delta/zgh ));
+ result = exp( ( 0.5-z ) * log1p( delta/zgh ) );
} else {
result = pow( zgh / (zgh+delta), z-0.5 );
}
diff --git a/lib/node_modules/@stdlib/math/base/special/gammainc/lib/main.js b/lib/node_modules/@stdlib/math/base/special/gammainc/lib/main.js
index 46a5a582600a..1916cd504e3f 100644
--- a/lib/node_modules/@stdlib/math/base/special/gammainc/lib/main.js
+++ b/lib/node_modules/@stdlib/math/base/special/gammainc/lib/main.js
@@ -125,7 +125,7 @@ function gammainc( x, a, regularized, upper ) {
// This is method 2 below, done in logs, we're really outside the range of this method, but since the result is almost certainly infinite, we should probably be OK:
result = ( a * ln( x ) ) - x;
initValue = 0.0;
- result += ln( lowerGammaSeries( a, x, initValue ) / a);
+ result += ln( lowerGammaSeries( a, x, initValue ) / a );
}
}
else {
@@ -223,7 +223,7 @@ function gammainc( x, a, regularized, upper ) {
initValue = 0.0;
optimisedInvert = false;
if ( invert ) {
- initValue = ( normalized ) ? 1.0 : gamma(a);
+ initValue = ( normalized ) ? 1.0 : gamma( a );
if (
normalized ||
result >= 1.0 ||
diff --git a/lib/node_modules/@stdlib/math/base/special/gammainc/test/test.js b/lib/node_modules/@stdlib/math/base/special/gammainc/test/test.js
index 2ccc331c013e..09f8f6978307 100644
--- a/lib/node_modules/@stdlib/math/base/special/gammainc/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/gammainc/test/test.js
@@ -30,7 +30,7 @@ var gammainc = require( './../lib' );
// FIXTURES //
-var fixtures = require( './fixtures/cpp/output.json');
+var fixtures = require( './fixtures/cpp/output.json' );
var expected1 = fixtures.lower_regularized;
var expected2 = fixtures.upper_regularized;
var expected3 = fixtures.lower_unregularized;
diff --git a/lib/node_modules/@stdlib/math/base/special/gammaincinv/lib/compute.js b/lib/node_modules/@stdlib/math/base/special/gammaincinv/lib/compute.js
index 5e7a62aa66b4..c01fc8de1523 100644
--- a/lib/node_modules/@stdlib/math/base/special/gammaincinv/lib/compute.js
+++ b/lib/node_modules/@stdlib/math/base/special/gammaincinv/lib/compute.js
@@ -156,7 +156,7 @@ function compute( a, p, q ) {
}
if ( q < 1.0e-30 && a < HALF ) {
m = 0;
- x0 = -ln( q*gamma(a) ) + ( ( a-1.0 ) * ln( -ln( q*gamma(a) ) ));
+ x0 = -ln( q*gamma(a) ) + ( ( a-1.0 ) * ln( -ln( q*gamma(a) ) ) );
k = 1;
lgama = gammaln( a );
}
diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-betainc/lib/assign.js b/lib/node_modules/@stdlib/math/base/special/kernel-betainc/lib/assign.js
index 37bed3858413..8e65e08a8a55 100644
--- a/lib/node_modules/@stdlib/math/base/special/kernel-betainc/lib/assign.js
+++ b/lib/node_modules/@stdlib/math/base/special/kernel-betainc/lib/assign.js
@@ -55,7 +55,7 @@ var PI = require( '@stdlib/constants/float64/pi' );
var betaSmallBLargeASeries = require( './beta_small_b_large_a_series.js' );
var risingFactorialRatio = require( './rising_factorial_ratio.js' );
var ibetaPowerTerms = require( './ibeta_power_terms.js' );
-var ibetaFraction2 = require( './ibeta_fraction2.js');
+var ibetaFraction2 = require( './ibeta_fraction2.js' );
var binomialCCDF = require( './binomial_ccdf.js' );
var ibetaAStep = require( './ibeta_a_step.js' );
var ibetaSeries = require( './ibeta_series.js' );
diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/lib/halley_iterate.js b/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/lib/halley_iterate.js
index 2d0993756ca7..116de3b0e761 100644
--- a/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/lib/halley_iterate.js
+++ b/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/lib/halley_iterate.js
@@ -86,7 +86,7 @@ function halleyIterate( fun, guess, minimum, maximum, digits, maxIter ) {
f0Last = f0;
delta2 = delta1;
delta1 = delta;
- res = fun( result);
+ res = fun( result );
f0 = res[ 0 ];
f1 = res[ 1 ];
f2 = res[ 2 ];
diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/lib/temme2.js b/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/lib/temme2.js
index a6c44b910578..cac92a7c38d7 100644
--- a/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/lib/temme2.js
+++ b/lib/node_modules/@stdlib/math/base/special/kernel-betaincinv/lib/temme2.js
@@ -42,7 +42,7 @@ var ln = require( '@stdlib/math/base/special/ln' );
var sqrt = require( '@stdlib/math/base/special/sqrt' );
var sin = require( '@stdlib/math/base/special/sin' );
var cos = require( '@stdlib/math/base/special/cos' );
-var temmeRootFinder = require( './root_finder.js');
+var temmeRootFinder = require( './root_finder.js' );
var newtonRaphsonIterate = require( './newton_raphson.js' );
var polyval1 = require( './polyval_co1.js' );
var polyval2 = require( './polyval_co2.js' );
diff --git a/lib/node_modules/@stdlib/math/base/special/log1mexp/test/test.js b/lib/node_modules/@stdlib/math/base/special/log1mexp/test/test.js
index 634eec1e6460..2bee66e8432d 100644
--- a/lib/node_modules/@stdlib/math/base/special/log1mexp/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/log1mexp/test/test.js
@@ -58,10 +58,10 @@ tape( 'if provided `+-0`, the function returns -infinity', function test( t ) {
var v;
v = log1mexp( 0.0 );
- t.strictEqual(v, NINF, 'returns -infinity');
+ t.strictEqual( v, NINF, 'returns -infinity' );
v = log1mexp( -0.0 );
- t.strictEqual(v, NINF, 'returns -infinity');
+ t.strictEqual( v, NINF, 'returns -infinity' );
t.end();
});
@@ -75,7 +75,7 @@ tape( 'the function computes the natural logarithm of `1-exp(-|x|)` (`0 < |x| <=
for ( i = 0; i < 1e3; i++ ) {
v = randu() * LN2;
x = log1mexp( v );
- y = ln( -expm1( -v ));
+ y = ln( -expm1( -v ) );
t.strictEqual( x, y, 'returns '+y+' when provided '+v );
}
t.end();
diff --git a/lib/node_modules/@stdlib/math/base/special/log1mexp/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/log1mexp/test/test.native.js
index 09b3c5022565..7b11196ccda0 100644
--- a/lib/node_modules/@stdlib/math/base/special/log1mexp/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/log1mexp/test/test.native.js
@@ -67,10 +67,10 @@ tape( 'if provided `+-0`, the function returns -infinity', opts, function test(
var v;
v = log1mexp( 0.0 );
- t.strictEqual(v, NINF, 'returns -infinity');
+ t.strictEqual( v, NINF, 'returns -infinity' );
v = log1mexp( -0.0 );
- t.strictEqual(v, NINF, 'returns -infinity');
+ t.strictEqual( v, NINF, 'returns -infinity' );
t.end();
});
@@ -84,7 +84,7 @@ tape( 'the function computes the natural logarithm of `1-exp(-|x|)` (`0 < |x| <=
for ( i = 0; i < 1e3; i++ ) {
v = randu() * LN2;
x = log1mexp( v );
- y = ln( -expm1( -v ));
+ y = ln( -expm1( -v ) );
t.strictEqual( x, y, 'returns '+y+' when provided '+v );
}
t.end();
diff --git a/lib/node_modules/@stdlib/math/base/special/nanmax/lib/main.js b/lib/node_modules/@stdlib/math/base/special/nanmax/lib/main.js
index a8738c2f5b37..89c49c6d3957 100644
--- a/lib/node_modules/@stdlib/math/base/special/nanmax/lib/main.js
+++ b/lib/node_modules/@stdlib/math/base/special/nanmax/lib/main.js
@@ -20,8 +20,8 @@
// MODULES //
-var max = require( '@stdlib/math/base/special/max');
-var isnan = require( '@stdlib/math/base/assert/is-nan');
+var max = require( '@stdlib/math/base/special/max' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
// MAIN //
@@ -42,7 +42,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan');
* // returns 4.14
*
* @example
-* var v = nanmax( NaN, NaN);
+* var v = nanmax( NaN, NaN );
* // returns NaN
*/
function nanmax( x, y ) {
diff --git a/lib/node_modules/@stdlib/math/base/special/nanmin/lib/main.js b/lib/node_modules/@stdlib/math/base/special/nanmin/lib/main.js
index 1aa0cd48fc8d..42ec9c625ca1 100644
--- a/lib/node_modules/@stdlib/math/base/special/nanmin/lib/main.js
+++ b/lib/node_modules/@stdlib/math/base/special/nanmin/lib/main.js
@@ -20,8 +20,8 @@
// MODULES //
-var min = require( '@stdlib/math/base/special/min');
-var isnan = require( '@stdlib/math/base/assert/is-nan');
+var min = require( '@stdlib/math/base/special/min' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
// MAIN //
@@ -42,7 +42,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan');
* // returns 4.14
*
* @example
-* var v = nanmin( NaN, NaN);
+* var v = nanmin( NaN, NaN );
* // returns NaN
*/
function nanmin( x, y ) {
diff --git a/lib/node_modules/@stdlib/math/base/special/rad2degf/test/test.js b/lib/node_modules/@stdlib/math/base/special/rad2degf/test/test.js
index ba1feb96a250..e70a3cd7f56a 100644
--- a/lib/node_modules/@stdlib/math/base/special/rad2degf/test/test.js
+++ b/lib/node_modules/@stdlib/math/base/special/rad2degf/test/test.js
@@ -27,7 +27,7 @@ var PI = require( '@stdlib/constants/float32/pi' );
var EPS = require( '@stdlib/constants/float32/eps' );
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
var abs = require( '@stdlib/math/base/special/abs' );
-var float64ToFloat32 = require('@stdlib/number/float64/base/to-float32');
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
var rad2degf = require( './../lib' );
diff --git a/lib/node_modules/@stdlib/math/base/special/rad2degf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/rad2degf/test/test.native.js
index 281105204938..bfe43abc804f 100644
--- a/lib/node_modules/@stdlib/math/base/special/rad2degf/test/test.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/rad2degf/test/test.native.js
@@ -28,7 +28,7 @@ var PI = require( '@stdlib/constants/float32/pi' );
var EPS = require( '@stdlib/constants/float32/eps' );
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
var abs = require( '@stdlib/math/base/special/abs' );
-var float64ToFloat32 = require('@stdlib/number/float64/base/to-float32');
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
var tryRequire = require( '@stdlib/utils/try-require' );
diff --git a/lib/node_modules/@stdlib/math/base/special/round/lib/native.js b/lib/node_modules/@stdlib/math/base/special/round/lib/native.js
index 10f48f5fc41e..f99fa002947a 100644
--- a/lib/node_modules/@stdlib/math/base/special/round/lib/native.js
+++ b/lib/node_modules/@stdlib/math/base/special/round/lib/native.js
@@ -28,6 +28,7 @@ var addon = require( './../src/addon.node' );
/**
* Rounds a numeric value to the nearest integer.
*
+* @private
* @param {number} x - input value
* @returns {number} function value
*
diff --git a/lib/node_modules/@stdlib/math/base/special/round2/README.md b/lib/node_modules/@stdlib/math/base/special/round2/README.md
index a4988a95d368..61d621eebec5 100644
--- a/lib/node_modules/@stdlib/math/base/special/round2/README.md
+++ b/lib/node_modules/@stdlib/math/base/special/round2/README.md
@@ -101,6 +101,91 @@ for ( i = 0; i < 100; i++ ) {
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+#include "stdlib/math/base/special/round2.h"
+```
+
+#### stdlib_base_round2( x )
+
+Rounds a `numeric` value to the nearest power of two on a linear scale.
+
+```c
+double out = stdlib_base_round2( -4.2 );
+// returns -4.0
+```
+
+The function accepts the following arguments:
+
+- **x**: `[in] double` input value.
+
+```c
+double stdlib_base_round2( const double x );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Examples
+
+```c
+#include "stdlib/math/base/special/round2.h"
+#include
+
+int main( void ) {
+ const double x[] = { -5.0, -3.89, -2.78, -1.67, -0.56, 0.56, 1.67, 2.78, 3.89, 5.0 };
+
+ double v;
+ int i;
+ for ( i = 0; i < 10; i++ ) {
+ v = stdlib_base_round2( x[ i ] );
+ printf( "round2(%lf) = %lf\n", x[ i ], v );
+ }
+}
+```
+
+
+
+
+
+
+
+
+