From 662aa31128507c587c3bc19d6ce99fefb0153e1b Mon Sep 17 00:00:00 2001 From: Ujjwal Verma Date: Mon, 14 Sep 2026 19:55:03 +0530 Subject: [PATCH 1/6] feat: add `lapack/base/dlaln2` --- .../@stdlib/lapack/base/dlaln2/README.md | 392 +++++ .../lapack/base/dlaln2/benchmark/benchmark.js | 126 ++ .../dlaln2/benchmark/benchmark.ndarray.js | 135 ++ .../@stdlib/lapack/base/dlaln2/docs/repl.txt | 211 +++ .../lapack/base/dlaln2/docs/types/index.d.ts | 201 +++ .../lapack/base/dlaln2/docs/types/test.ts | 763 +++++++++ .../lapack/base/dlaln2/examples/index.js | 47 + .../@stdlib/lapack/base/dlaln2/lib/base.js | 489 ++++++ .../@stdlib/lapack/base/dlaln2/lib/dlaln2.js | 145 ++ .../@stdlib/lapack/base/dlaln2/lib/index.js | 86 + .../@stdlib/lapack/base/dlaln2/lib/main.js | 35 + .../@stdlib/lapack/base/dlaln2/lib/ndarray.js | 106 ++ .../@stdlib/lapack/base/dlaln2/package.json | 73 + .../large_strides/na1_nw2_row_major.json | 61 + .../na2_nw1_icmax1_col_major.json | 67 + .../na2_nw2_icmax2_row_major.json | 79 + .../mixed_strides/na1_nw2_row_major.json | 50 + .../na2_nw1_icmax1_col_major.json | 53 + .../na2_nw2_icmax2_row_major.json | 59 + .../test/fixtures/na1_nw1_col_major.json | 47 + .../fixtures/na1_nw1_perturbed_row_major.json | 47 + .../test/fixtures/na1_nw1_row_major.json | 47 + .../fixtures/na1_nw1_scaled_row_major.json | 47 + .../test/fixtures/na1_nw2_col_major.json | 50 + .../fixtures/na1_nw2_perturbed_row_major.json | 50 + .../test/fixtures/na1_nw2_row_major.json | 50 + .../fixtures/na1_nw2_scaled_row_major.json | 50 + .../na2_nw1_cmax_lt_smin_row_major.json | 53 + .../fixtures/na2_nw1_icmax0_col_major.json | 53 + .../fixtures/na2_nw1_icmax0_row_major.json | 53 + .../fixtures/na2_nw1_icmax1_col_major.json | 53 + .../fixtures/na2_nw1_icmax1_row_major.json | 53 + .../fixtures/na2_nw1_icmax2_col_major.json | 53 + .../fixtures/na2_nw1_icmax2_row_major.json | 53 + .../fixtures/na2_nw1_icmax3_col_major.json | 53 + .../fixtures/na2_nw1_icmax3_row_major.json | 53 + .../na2_nw1_postscaled_row_major.json | 53 + .../fixtures/na2_nw1_scaled_row_major.json | 53 + .../fixtures/na2_nw1_trans_col_major.json | 53 + .../fixtures/na2_nw1_trans_row_major.json | 53 + .../na2_nw1_u22_perturbed_row_major.json | 53 + .../na2_nw2_cmax_lt_smin_row_major.json | 59 + .../fixtures/na2_nw2_icmax0_col_major.json | 59 + .../fixtures/na2_nw2_icmax0_row_major.json | 59 + ...a2_nw2_icmax0_ui11_dominant_row_major.json | 59 + .../fixtures/na2_nw2_icmax1_col_major.json | 59 + .../fixtures/na2_nw2_icmax1_row_major.json | 59 + .../fixtures/na2_nw2_icmax2_col_major.json | 59 + .../fixtures/na2_nw2_icmax2_row_major.json | 59 + .../fixtures/na2_nw2_icmax3_col_major.json | 59 + .../fixtures/na2_nw2_icmax3_row_major.json | 59 + .../na2_nw2_postscaled_row_major.json | 59 + .../fixtures/na2_nw2_scaled_row_major.json | 59 + .../fixtures/na2_nw2_trans_col_major.json | 59 + .../fixtures/na2_nw2_trans_row_major.json | 59 + .../na2_nw2_u22_perturbed_row_major.json | 59 + .../negative_strides/na1_nw2_row_major.json | 50 + .../na2_nw1_icmax1_col_major.json | 53 + .../na2_nw2_icmax2_row_major.json | 59 + .../fixtures/offsets/na1_nw2_row_major.json | 56 + .../offsets/na2_nw1_icmax1_col_major.json | 59 + .../offsets/na2_nw2_icmax2_row_major.json | 65 + .../lapack/base/dlaln2/test/test.dlaln2.js | 1380 +++++++++++++++ .../@stdlib/lapack/base/dlaln2/test/test.js | 82 + .../lapack/base/dlaln2/test/test.ndarray.js | 1525 +++++++++++++++++ 65 files changed, 8522 insertions(+) create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/README.md create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/examples/index.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/lib/main.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/package.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na1_nw2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw1_icmax1_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw2_icmax2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na1_nw2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw1_icmax1_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw2_icmax2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_perturbed_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_scaled_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_perturbed_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_scaled_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_cmax_lt_smin_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_postscaled_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_scaled_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_u22_perturbed_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_cmax_lt_smin_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_ui11_dominant_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_postscaled_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_scaled_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_u22_perturbed_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na1_nw2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw1_icmax1_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw2_icmax2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na1_nw2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw1_icmax1_col_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw2_icmax2_row_major.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md b/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md new file mode 100644 index 000000000000..b4b77e863108 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md @@ -0,0 +1,392 @@ + + +# dlaln2 + +> Solve a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`, where `A` is a 1 by 1 or 2 by 2 real matrix. + +
+ +This routine solves a system of the form + + + +```math +(c_a A - w D) X = s B +``` + + + +or + + + +```math +(c_a A^{\mathsf{T}} - w D) X = s B +``` + + + +where `A` is an `NA` by `NA` real matrix (`NA` is 1 or 2), `c_a` is a real scalar, `D` is an `NA` by `NA` real diagonal matrix, `w` is a real or complex scalar, and `X` and `B` are `NA` by 1 matrices which are real if `w` is real and complex if `w` is complex. If `w` is complex, `X` and `B` are represented as `NA` by 2 matrices, the first column of each being the real part and the second being the imaginary part. + +The scaling factor `s` (`<= 1`) is chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(c_a A - w D) * norm(X)` is less than overflow. If `c_a A - w D` is nearly singular, the routine perturbs it so that its smallest singular value is at least `smin`. + +This routine is used by [LAPACK][lapack] eigenvector routines (e.g., `dtrevc`) to compute the components of eigenvectors of quasi-triangular matrices. + +
+ + + +
+ +## Usage + +```javascript +var dlaln2 = require( '@stdlib/lapack/base/dlaln2' ); +``` + +#### dlaln2( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, X, LDX, out ) + +Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`. + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +var B = new Float64Array( [ 1.0, 2.0 ] ); +var X = new Float64Array( 2 ); +var out = new Float64Array( 2 ); + +var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); +// returns 0 + +// X => [ ~-0.087, ~1.391 ] +// out => [ 1.0, ~1.391 ] +``` + +The function has the following parameters: + +- **order**: storage layout. +- **trans**: specifies whether `A` should be transposed. Must be either `'no-transpose'` or `'transpose'`. +- **NA**: size of the matrix `A`. Must be either `1` or `2`. +- **NW**: `1` if `w` is real and `2` if `w` is complex. +- **smin**: desired lower bound on the singular values of `A`. +- **ca**: coefficient by which `A` is multiplied. +- **A**: input matrix stored in linear memory as a [`Float64Array`][mdn-float64array]. +- **LDA**: stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`). Must be at least `NA`. +- **d1**: first diagonal element of `D`. +- **d2**: second diagonal element of `D`. Not used if `NA = 1`. +- **B**: right-hand side matrix stored in linear memory as a [`Float64Array`][mdn-float64array]. +- **LDB**: stride of the first dimension of `B` (a.k.a., leading dimension of the matrix `B`). Must be at least `NW` when `order` is `'row-major'` and at least `NA` when `order` is `'column-major'`. +- **wr**: real part of `w`. +- **wi**: imaginary part of `w`. Not used if `NW = 1`. +- **X**: output matrix stored in linear memory as a [`Float64Array`][mdn-float64array]. +- **LDX**: stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`). Must be at least `NW` when `order` is `'row-major'` and at least `NA` when `order` is `'column-major'`. +- **out**: two-element output [`Float64Array`][mdn-float64array] containing the scaling factor `s` and the infinity-norm of `X`, respectively. + +If `ca*A - w*D` is nearly singular, the function perturbs it and returns a non-zero status code. + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +// A singular matrix: +var A = new Float64Array( [ 1.0, 2.0, 2.0, 4.0 ] ); +var B = new Float64Array( [ 1.0, 2.0 ] ); +var X = new Float64Array( 2 ); +var out = new Float64Array( 2 ); + +var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.0, 0.0, X, 1, out ); +// returns 1 + +// X => [ 0.0, 0.5 ] +``` + +When `w` is complex (`NW = 2`), the columns of `B` and `X` hold the real and imaginary parts, respectively. + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +var B = new Float64Array( [ 1.0, 3.0, 2.0, 4.0 ] ); +var X = new Float64Array( 4 ); +var out = new Float64Array( 2 ); + +var info = dlaln2( 'row-major', 'no-transpose', 2, 2, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 2, 0.5, 0.5, X, 2, out ); +// returns 0 + +// X => [ ~0.14, ~0.076, ~0.331, ~2.726 ] +// out => [ 1.0, ~3.057 ] +``` + +Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views. + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +// Initial arrays... +var A0 = new Float64Array( [ 0.0, 5.0, 1.0, 1.0, 2.0 ] ); +var B0 = new Float64Array( [ 0.0, 1.0, 2.0 ] ); +var X0 = new Float64Array( 3 ); +var out0 = new Float64Array( 3 ); + +// Create offset views... +var A1 = new Float64Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var B1 = new Float64Array( B0.buffer, B0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var X1 = new Float64Array( X0.buffer, X0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var out1 = new Float64Array( out0.buffer, out0.BYTES_PER_ELEMENT*1 ); // start at 2nd element + +var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A1, 2, 1.0, 1.0, B1, 1, 0.5, 0.0, X1, 1, out1 ); +// returns 0 + +// X0 => [ 0.0, ~-0.087, ~1.391 ] +// out0 => [ 0.0, 1.0, ~1.391 ] +``` + +#### dlaln2.ndarray( trans, NA, NW, smin, ca, A, sa1, sa2, oa, d1, d2, B, sb1, sb2, ob, wr, wi, X, sx1, sx2, ox, out, so, oo ) + +Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A` using alternative indexing semantics. + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +var B = new Float64Array( [ 1.0, 2.0 ] ); +var X = new Float64Array( 2 ); +var out = new Float64Array( 2 ); + +var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); +// returns 0 + +// X => [ ~-0.087, ~1.391 ] +// out => [ 1.0, ~1.391 ] +``` + +The function has the following parameters: + +- **trans**: specifies whether `A` should be transposed. Must be either `'no-transpose'` or `'transpose'`. +- **NA**: size of the matrix `A`. Must be either `1` or `2`. +- **NW**: `1` if `w` is real and `2` if `w` is complex. +- **smin**: desired lower bound on the singular values of `A`. +- **ca**: coefficient by which `A` is multiplied. +- **A**: input matrix as a [`Float64Array`][mdn-float64array]. +- **sa1**: stride of the first dimension of `A`. +- **sa2**: stride of the second dimension of `A`. +- **oa**: starting index for `A`. +- **d1**: first diagonal element of `D`. +- **d2**: second diagonal element of `D`. Not used if `NA = 1`. +- **B**: right-hand side matrix as a [`Float64Array`][mdn-float64array]. +- **sb1**: stride of the first dimension of `B`. +- **sb2**: stride of the second dimension of `B`. +- **ob**: starting index for `B`. +- **wr**: real part of `w`. +- **wi**: imaginary part of `w`. Not used if `NW = 1`. +- **X**: output matrix as a [`Float64Array`][mdn-float64array]. +- **sx1**: stride of the first dimension of `X`. +- **sx2**: stride of the second dimension of `X`. +- **ox**: starting index for `X`. +- **out**: two-element output [`Float64Array`][mdn-float64array] containing the scaling factor `s` and the infinity-norm of `X`, respectively. +- **so**: stride length for `out`. +- **oo**: starting index for `out`. + +While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 0.0, 0.0, 5.0, 1.0, 1.0, 2.0 ] ); +var B = new Float64Array( [ 0.0, 0.0, 1.0, 2.0 ] ); +var X = new Float64Array( 4 ); +var out = new Float64Array( 4 ); + +var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1, 2, 1.0, 1.0, B, 1, 2, 2, 0.5, 0.0, X, 1, 2, 2, out, 1, 2 ); +// returns 0 + +// X => [ 0.0, 0.0, ~-0.087, ~1.391 ] +// out => [ 0.0, 0.0, 1.0, ~1.391 ] +``` + +
+ + + +
+ +## Notes + +- Both functions overwrite `X` and `out`. + +- Both functions return a status code indicating whether `ca*A - w*D` had to be perturbed. A status code indicates the following conditions: + + - `0`: no perturbation was necessary. + - `1`: `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin`. + +- `dlaln2()` corresponds to the [LAPACK][lapack] routine [`dlaln2`][lapack-dlaln2]. + +
+ + + +
+ +## Examples + + + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); +var ndarray2array = require( '@stdlib/ndarray/base/to-array' ); +var shape2strides = require( '@stdlib/ndarray/base/shape2strides' ); +var dlaln2 = require( '@stdlib/lapack/base/dlaln2' ); + +// Specify matrix meta data: +var shape = [ 2, 2 ]; +var order = 'row-major'; +var strides = shape2strides( shape, order ); + +// Create a 2x2 matrix `A` stored in linear memory: +var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +console.log( ndarray2array( A, shape, strides, 0, order ) ); + +// Create a 2x2 right-hand side `B` whose columns are the real and imaginary parts of a complex right-hand side: +var B = new Float64Array( [ 1.0, 3.0, 2.0, 4.0 ] ); +console.log( ndarray2array( B, shape, strides, 0, order ) ); + +// Allocate an output matrix `X` and an output array for the scaling factor and the infinity-norm of `X`: +var X = new Float64Array( 4 ); +var out = new Float64Array( 2 ); + +// Solve (A - (0.5 + 0.5i) I) X = s B: +var info = dlaln2( order, 'no-transpose', 2, 2, 1.0e-3, 1.0, A, strides[ 0 ], 1.0, 1.0, B, strides[ 0 ], 0.5, 0.5, X, strides[ 0 ], out ); +console.log( info ); +console.log( ndarray2array( X, shape, strides, 0, order ) ); +console.log( out ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +TODO +``` + +#### TODO + +TODO. + +```c +TODO +``` + +TODO + +```c +TODO +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +TODO +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js new file mode 100644 index 000000000000..f9f69369eaea --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js @@ -0,0 +1,126 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var Float64Array = require( '@stdlib/array/float64' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var dlaln2 = require( './../lib/dlaln2.js' ); + + +// VARIABLES // + +var LAYOUTS = [ + 'row-major', + 'column-major' +]; +var SIZES = [ + [ 1, 1 ], + [ 1, 2 ], + [ 2, 1 ], + [ 2, 2 ] +]; +var opts = { + 'dtype': 'float64' +}; + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {string} order - storage layout +* @param {PositiveInteger} NA - size of the matrix `A` +* @param {PositiveInteger} NW - `1` if `w` is real and `2` if `w` is complex +* @returns {Function} benchmark function +*/ +function createBenchmark( order, NA, NW ) { + var out = new Float64Array( 2 ); + var A = uniform( NA*NA, 1.0, 10.0, opts ); + var B = uniform( NA*NW, 1.0, 10.0, opts ); + var X = new Float64Array( NA*NW ); + var ld; + if ( order === 'row-major' ) { + ld = NW; + } else { + ld = NA; + } + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + var z; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = dlaln2( order, 'no-transpose', NA, NW, 1.0e-3, 1.0, A, NA, 1.0, 1.0, B, ld, 0.5, 0.5, X, ld, out ); + if ( isnan( z ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( out[ 1 ] ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var ord; + var NA; + var NW; + var f; + var i; + var j; + + for ( j = 0; j < LAYOUTS.length; j++ ) { + ord = LAYOUTS[ j ]; + for ( i = 0; i < SIZES.length; i++ ) { + NA = SIZES[ i ][ 0 ]; + NW = SIZES[ i ][ 1 ]; + f = createBenchmark( ord, NA, NW ); + bench( format( '%s:order=%s,NA=%d,NW=%d', pkg, ord, NA, NW ), f ); + } + } +} + +main(); diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js new file mode 100644 index 000000000000..2e5654f89951 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js @@ -0,0 +1,135 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var Float64Array = require( '@stdlib/array/float64' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var dlaln2 = require( './../lib/ndarray.js' ); + + +// VARIABLES // + +var LAYOUTS = [ + 'row-major', + 'column-major' +]; +var SIZES = [ + [ 1, 1 ], + [ 1, 2 ], + [ 2, 1 ], + [ 2, 2 ] +]; +var opts = { + 'dtype': 'float64' +}; + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {string} order - storage layout +* @param {PositiveInteger} NA - size of the matrix `A` +* @param {PositiveInteger} NW - `1` if `w` is real and `2` if `w` is complex +* @returns {Function} benchmark function +*/ +function createBenchmark( order, NA, NW ) { + var out = new Float64Array( 2 ); + var A = uniform( NA*NA, 1.0, 10.0, opts ); + var B = uniform( NA*NW, 1.0, 10.0, opts ); + var X = new Float64Array( NA*NW ); + var sa1; + var sa2; + var sb1; + var sb2; + if ( order === 'row-major' ) { + sa1 = NA; + sa2 = 1; + sb1 = NW; + sb2 = 1; + } else { + sa1 = 1; + sa2 = NA; + sb1 = 1; + sb2 = NA; + } + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + var z; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = dlaln2( 'no-transpose', NA, NW, 1.0e-3, 1.0, A, sa1, sa2, 0, 1.0, 1.0, B, sb1, sb2, 0, 0.5, 0.5, X, sb1, sb2, 0, out, 1, 0 ); + if ( isnan( z ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( out[ 1 ] ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var ord; + var NA; + var NW; + var f; + var i; + var j; + + for ( j = 0; j < LAYOUTS.length; j++ ) { + ord = LAYOUTS[ j ]; + for ( i = 0; i < SIZES.length; i++ ) { + NA = SIZES[ i ][ 0 ]; + NW = SIZES[ i ][ 1 ]; + f = createBenchmark( ord, NA, NW ); + bench( format( '%s:ndarray:order=%s,NA=%d,NW=%d', pkg, ord, NA, NW ), f ); + } + } +} + +main(); diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt new file mode 100644 index 000000000000..ede5316243d6 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt @@ -0,0 +1,211 @@ + +{{alias}}( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, X, LDX, out ) + Solves a system of the form `(ca*A - w*D) X = s*B` or + `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`. + + `A` is an `NA` by `NA` real matrix (`NA` is 1 or 2), `ca` is a real + scalar, `D` is an `NA` by `NA` real diagonal matrix, and `w` is a real or + complex scalar. + + If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose + first column contains the real part and whose second column contains the + imaginary part. + + `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without + overflow. `X` is further scaled if necessary to assure that + `norm(ca*A - w*D) * norm(X)` is less than overflow. + + The function writes the scaling factor `s` and the infinity-norm of `X` to + the first and second elements of `out`, respectively. + + The function returns `1` if `ca*A - w*D` had to be perturbed to make its + smallest (or only) singular value greater than `smin` and `0` otherwise. + + Parameters + ---------- + order: string + Storage layout. Must be either 'row-major' or 'column-major'. + + trans: string + Specifies whether `A` should be transposed. Must be either + 'no-transpose' or 'transpose'. + + NA: integer + Size of the matrix `A`. Must be either `1` or `2`. + + NW: integer + `1` if `w` is real and `2` if `w` is complex. + + smin: number + Desired lower bound on the singular values of `A`. + + ca: number + Coefficient by which `A` is multiplied. + + A: Float64Array + Input matrix. + + LDA: integer + Stride of the first dimension of `A` (a.k.a., leading dimension of the + matrix `A`). Must be at least `NA`. + + d1: number + First diagonal element of `D`. + + d2: number + Second diagonal element of `D`. Not used if `NA = 1`. + + B: Float64Array + Right-hand side matrix. + + LDB: integer + Stride of the first dimension of `B` (a.k.a., leading dimension of the + matrix `B`). Must be at least `NW` when `order` is `'row-major'` and at + least `NA` when `order` is `'column-major'`. + + wr: number + Real part of `w`. + + wi: number + Imaginary part of `w`. Not used if `NW = 1`. + + X: Float64Array + Output matrix. + + LDX: integer + Stride of the first dimension of `X` (a.k.a., leading dimension of the + matrix `X`). Must be at least `NW` when `order` is `'row-major'` and at + least `NA` when `order` is `'column-major'`. + + out: Float64Array + Two-element output array containing the scaling factor and the + infinity-norm of `X`, respectively. + + Returns + ------- + info: integer + Status code. `1` if `ca*A - w*D` had to be perturbed; `0` otherwise. + + Examples + -------- + > var A = new {{alias:@stdlib/array/float64}}( [ 5.0, 1.0, 1.0, 2.0 ] ); + > var B = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0 ] ); + > var X = new {{alias:@stdlib/array/float64}}( 2 ); + > var out = new {{alias:@stdlib/array/float64}}( 2 ); + > var ord = 'row-major'; + > var tr = 'no-transpose'; + > {{alias}}( ord, tr, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ) + 0 + > X + [ ~-0.087, ~1.391 ] + > out + [ 1.0, ~1.391 ] + + +{{alias}}.ndarray( trans, NA, NW, smin, ca, A, sa1, sa2, oa, d1, d2, B, sb1, sb2, ob, wr, wi, X, sx1, sx2, ox, out, so, oo ) + Solves a system of the form `(ca*A - w*D) X = s*B` or + `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A` + using alternative indexing semantics. + + While typed array views mandate a view offset based on the underlying + buffer, the offset parameters support indexing semantics based on starting + indices. + + Parameters + ---------- + trans: string + Specifies whether `A` should be transposed. Must be either + 'no-transpose' or 'transpose'. + + NA: integer + Size of the matrix `A`. Must be either `1` or `2`. + + NW: integer + `1` if `w` is real and `2` if `w` is complex. + + smin: number + Desired lower bound on the singular values of `A`. + + ca: number + Coefficient by which `A` is multiplied. + + A: Float64Array + Input matrix. + + sa1: integer + Stride of the first dimension of `A`. + + sa2: integer + Stride of the second dimension of `A`. + + oa: integer + Starting index for `A`. + + d1: number + First diagonal element of `D`. + + d2: number + Second diagonal element of `D`. Not used if `NA = 1`. + + B: Float64Array + Right-hand side matrix. + + sb1: integer + Stride of the first dimension of `B`. + + sb2: integer + Stride of the second dimension of `B`. + + ob: integer + Starting index for `B`. + + wr: number + Real part of `w`. + + wi: number + Imaginary part of `w`. Not used if `NW = 1`. + + X: Float64Array + Output matrix. + + sx1: integer + Stride of the first dimension of `X`. + + sx2: integer + Stride of the second dimension of `X`. + + ox: integer + Starting index for `X`. + + out: Float64Array + Two-element output array containing the scaling factor and the + infinity-norm of `X`, respectively. + + so: integer + Stride length for `out`. + + oo: integer + Starting index for `out`. + + Returns + ------- + info: integer + Status code. `1` if `ca*A - w*D` had to be perturbed; `0` otherwise. + + Examples + -------- + > var A = new {{alias:@stdlib/array/float64}}( [ 5.0, 1.0, 1.0, 2.0 ] ); + > var B = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0 ] ); + > var X = new {{alias:@stdlib/array/float64}}( 2 ); + > var out = new {{alias:@stdlib/array/float64}}( 2 ); + > var tr = 'no-transpose'; + > {{alias}}.ndarray( tr, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ) + 0 + > X + [ ~-0.087, ~1.391 ] + > out + [ 1.0, ~1.391 ] + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts new file mode 100644 index 000000000000..a491a5783a22 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts @@ -0,0 +1,201 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/// + +import { Layout, TransposeOperation } from '@stdlib/types/blas'; + +/** +* Interface describing `dlaln2`. +*/ +interface Routine { + /** + * Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`, where `A` is an `NA` by `NA` real matrix (`NA` is 1 or 2), `ca` is a real scalar, `D` is an `NA` by `NA` real diagonal matrix, and `w` is a real or complex scalar. + * + * ## Notes + * + * - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. + * - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. + * - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. + * - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. + * + * @param order - storage layout + * @param trans - specifies whether `A` should be transposed + * @param NA - size of the matrix `A` (either `1` or `2`) + * @param NW - `1` if `w` is real and `2` if `w` is complex + * @param smin - desired lower bound on the singular values of `A` + * @param ca - coefficient by which `A` is multiplied + * @param A - input matrix + * @param lda - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) + * @param d1 - first diagonal element of `D` + * @param d2 - second diagonal element of `D` (not used if `NA = 1`) + * @param B - right-hand side matrix + * @param ldb - stride of the first dimension of `B` (a.k.a., leading dimension of the matrix `B`) + * @param wr - real part of `w` + * @param wi - imaginary part of `w` (not used if `NW = 1`) + * @param X - output matrix + * @param ldx - stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`) + * @param out - output array containing the scaling factor and the infinity-norm of `X` + * @returns status code + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + * var B = new Float64Array( [ 1.0, 2.0 ] ); + * var X = new Float64Array( 2 ); + * var out = new Float64Array( 2 ); + * + * var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + * // returns 0 + * + * var s = out[ 0 ]; + * // returns 1.0 + * + * var xnorm = out[ 1 ]; + * // returns ~1.3913 + */ + ( order: Layout, trans: TransposeOperation, NA: number, NW: number, smin: number, ca: number, A: Float64Array, lda: number, d1: number, d2: number, B: Float64Array, ldb: number, wr: number, wi: number, X: Float64Array, ldx: number, out: Float64Array ): number; + + /** + * Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A` using alternative indexing semantics, where `A` is an `NA` by `NA` real matrix (`NA` is 1 or 2), `ca` is a real scalar, `D` is an `NA` by `NA` real diagonal matrix, and `w` is a real or complex scalar. + * + * ## Notes + * + * - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. + * - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. + * - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. + * - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. + * + * @param trans - specifies whether `A` should be transposed + * @param NA - size of the matrix `A` (either `1` or `2`) + * @param NW - `1` if `w` is real and `2` if `w` is complex + * @param smin - desired lower bound on the singular values of `A` + * @param ca - coefficient by which `A` is multiplied + * @param A - input matrix + * @param strideA1 - stride of the first dimension of `A` + * @param strideA2 - stride of the second dimension of `A` + * @param offsetA - starting index for `A` + * @param d1 - first diagonal element of `D` + * @param d2 - second diagonal element of `D` (not used if `NA = 1`) + * @param B - right-hand side matrix + * @param strideB1 - stride of the first dimension of `B` + * @param strideB2 - stride of the second dimension of `B` + * @param offsetB - starting index for `B` + * @param wr - real part of `w` + * @param wi - imaginary part of `w` (not used if `NW = 1`) + * @param X - output matrix + * @param strideX1 - stride of the first dimension of `X` + * @param strideX2 - stride of the second dimension of `X` + * @param offsetX - starting index for `X` + * @param out - output array containing the scaling factor and the infinity-norm of `X` + * @param strideOut - stride length for `out` + * @param offsetOut - starting index for `out` + * @returns status code + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + * var B = new Float64Array( [ 1.0, 2.0 ] ); + * var X = new Float64Array( 2 ); + * var out = new Float64Array( 2 ); + * + * var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); + * // returns 0 + * + * var s = out[ 0 ]; + * // returns 1.0 + * + * var xnorm = out[ 1 ]; + * // returns ~1.3913 + */ + ndarray( trans: TransposeOperation, NA: number, NW: number, smin: number, ca: number, A: Float64Array, strideA1: number, strideA2: number, offsetA: number, d1: number, d2: number, B: Float64Array, strideB1: number, strideB2: number, offsetB: number, wr: number, wi: number, X: Float64Array, strideX1: number, strideX2: number, offsetX: number, out: Float64Array, strideOut: number, offsetOut: number ): number; +} + +/** +* Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`, where `A` is an `NA` by `NA` real matrix (`NA` is 1 or 2), `ca` is a real scalar, `D` is an `NA` by `NA` real diagonal matrix, and `w` is a real or complex scalar. +* +* ## Notes +* +* - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. +* - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. +* - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. +* - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. +* +* @param order - storage layout +* @param trans - specifies whether `A` should be transposed +* @param NA - size of the matrix `A` (either `1` or `2`) +* @param NW - `1` if `w` is real and `2` if `w` is complex +* @param smin - desired lower bound on the singular values of `A` +* @param ca - coefficient by which `A` is multiplied +* @param A - input matrix +* @param lda - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) +* @param d1 - first diagonal element of `D` +* @param d2 - second diagonal element of `D` (not used if `NA = 1`) +* @param B - right-hand side matrix +* @param ldb - stride of the first dimension of `B` (a.k.a., leading dimension of the matrix `B`) +* @param wr - real part of `w` +* @param wi - imaginary part of `w` (not used if `NW = 1`) +* @param X - output matrix +* @param ldx - stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`) +* @param out - output array containing the scaling factor and the infinity-norm of `X` +* @returns status code +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +* var B = new Float64Array( [ 1.0, 2.0 ] ); +* var X = new Float64Array( 2 ); +* var out = new Float64Array( 2 ); +* +* var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); +* // returns 0 +* +* var s = out[ 0 ]; +* // returns 1.0 +* +* var xnorm = out[ 1 ]; +* // returns ~1.3913 +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +* var B = new Float64Array( [ 1.0, 2.0 ] ); +* var X = new Float64Array( 2 ); +* var out = new Float64Array( 2 ); +* +* var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); +* // returns 0 +* +* var s = out[ 0 ]; +* // returns 1.0 +* +* var xnorm = out[ 1 ]; +* // returns ~1.3913 +*/ +declare var dlaln2: Routine; + + +// EXPORTS // + +export = dlaln2; diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts new file mode 100644 index 000000000000..a2135b7ef53e --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts @@ -0,0 +1,763 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import dlaln2 = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a first argument which is not a valid layout... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 5, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( true, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( false, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( null, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( void 0, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( [], 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( {}, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( ( x: number ): number => x, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not a valid transpose operation... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 5, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', true, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', false, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', null, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', void 0, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', [], 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', {}, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', ( x: number ): number => x, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', '5', 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', true, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', false, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', null, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', void 0, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', [], 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', {}, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', ( x: number ): number => x, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, '5', 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, true, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, false, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, null, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, void 0, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, [], 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, {}, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, ( x: number ): number => x, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fifth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, '5', 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, true, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, false, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, null, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, void 0, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, [], 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, {}, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, ( x: number ): number => x, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a sixth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, '5', A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, true, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, false, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, null, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, void 0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, [], A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, {}, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, ( x: number ): number => x, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a seventh argument which is not a Float64Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, '5', 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, 5, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, true, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, false, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, null, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, void 0, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, [], 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, {}, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, ( x: number ): number => x, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eighth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, '5', 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, true, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, false, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, null, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, void 0, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, [], 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, {}, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, ( x: number ): number => x, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a ninth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, '5', 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, true, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, false, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, null, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, void 0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, [], 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, {}, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, ( x: number ): number => x, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a tenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, '5', B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, true, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, false, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, null, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, void 0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, [], B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, {}, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, ( x: number ): number => x, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eleventh argument which is not a Float64Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, '5', 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, 5, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, true, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, false, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, null, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, void 0, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, [], 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, {}, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, ( x: number ): number => x, 1, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a twelfth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, '5', 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, true, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, false, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, null, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, void 0, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, [], 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, {}, 0.5, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, ( x: number ): number => x, 0.5, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a thirteenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, '5', 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, true, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, false, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, null, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, void 0, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, [], 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, {}, 0.0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, ( x: number ): number => x, 0.0, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourteenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, '5', X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, true, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, false, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, null, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, void 0, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, [], X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, {}, X, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, ( x: number ): number => x, X, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fifteenth argument which is not a Float64Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, '5', 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, 5, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, true, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, false, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, null, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, void 0, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, [], 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, {}, 1, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, ( x: number ): number => x, 1, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a sixteenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, '5', out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, true, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, false, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, null, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, void 0, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, [], out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, {}, out ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, ( x: number ): number => x, out ); // $ExpectError +} + +// The compiler throws an error if the function is provided a seventeenth argument which is not a Float64Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, '5' ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, 5 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, true ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, false ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, null ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, void 0 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, [] ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, {} ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2( ); // $ExpectError + dlaln2( 'row-major' ); // $ExpectError + dlaln2( 'row-major', 'no-transpose' ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out, 10 ); // $ExpectError +} + +// Attached to main export is an `ndarray` method which returns a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectType number +} + +// The compiler throws an error if the `ndarray` method is provided a first argument which is not a valid transpose operation... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 5, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( true, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( false, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( null, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( void 0, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( [], 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( {}, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( ( x: number ): number => x, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a second argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', '5', 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', true, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', false, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', null, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', void 0, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', [], 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', {}, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', ( x: number ): number => x, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, '5', 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, true, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, false, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, null, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, void 0, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, [], 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, {}, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, ( x: number ): number => x, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, '5', 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, true, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, false, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, null, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, void 0, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, [], 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, {}, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, ( x: number ): number => x, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, '5', A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, true, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, false, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, null, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, void 0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, [], A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, {}, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, ( x: number ): number => x, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a Float64Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, '5', 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, 5, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, true, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, false, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, null, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, void 0, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, [], 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, {}, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, ( x: number ): number => x, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, '5', 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, true, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, false, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, null, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, void 0, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, [], 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, {}, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, ( x: number ): number => x, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, '5', 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, true, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, false, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, null, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, void 0, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, [], 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, {}, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, ( x: number ): number => x, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a ninth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, '5', 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, true, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, false, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, null, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, void 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, [], 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, {}, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, ( x: number ): number => x, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a tenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, '5', 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, true, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, false, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, null, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, void 0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, [], 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, {}, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, ( x: number ): number => x, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided an eleventh argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, '5', B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, true, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, false, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, null, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, void 0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, [], B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, {}, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, ( x: number ): number => x, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twelfth argument which is not a Float64Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, '5', 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, 5, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, true, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, false, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, null, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, void 0, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, [], 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, {}, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, ( x: number ): number => x, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a thirteenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, '5', 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, true, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, false, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, null, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, void 0, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, [], 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, {}, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, ( x: number ): number => x, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a fourteenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, '5', 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, true, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, false, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, null, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, void 0, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, [], 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, {}, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, ( x: number ): number => x, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a fifteenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, '5', 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, true, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, false, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, null, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, void 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, [], 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, {}, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, ( x: number ): number => x, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a sixteenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, '5', 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, true, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, false, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, null, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, void 0, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, [], 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, {}, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, ( x: number ): number => x, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a seventeenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, '5', X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, true, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, false, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, null, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, void 0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, [], X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, {}, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, ( x: number ): number => x, X, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided an eighteenth argument which is not a Float64Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, '5', 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, 5, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, true, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, false, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, null, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, void 0, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, [], 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, {}, 1, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, ( x: number ): number => x, 1, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a nineteenth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, '5', 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, true, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, false, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, null, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, void 0, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, [], 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, {}, 2, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, ( x: number ): number => x, 2, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twentieth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, '5', 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, true, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, false, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, null, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, void 0, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, [], 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, {}, 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, ( x: number ): number => x, 0, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-first argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, '5', out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, true, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, false, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, null, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, void 0, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, [], out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, {}, out, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, ( x: number ): number => x, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-second argument which is not a Float64Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, '5', 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, 5, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, true, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, false, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, null, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, void 0, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, [], 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, {}, 1, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-third argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, '5', 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, true, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, false, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, null, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, void 0, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, [], 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, {}, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, ( x: number ): number => x, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-fourth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, '5' ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, true ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, false ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, null ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, void 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, [] ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, {} ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const out = new Float64Array( 2 ); + dlaln2.ndarray( ); // $ExpectError + dlaln2.ndarray( 'no-transpose' ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0, 10 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/examples/index.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/examples/index.js new file mode 100644 index 000000000000..ff735e5adc92 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/examples/index.js @@ -0,0 +1,47 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var Float64Array = require( '@stdlib/array/float64' ); +var ndarray2array = require( '@stdlib/ndarray/base/to-array' ); +var shape2strides = require( '@stdlib/ndarray/base/shape2strides' ); +var dlaln2 = require( './../lib' ); + +// Specify matrix meta data: +var shape = [ 2, 2 ]; +var order = 'row-major'; +var strides = shape2strides( shape, order ); + +// Create a 2x2 matrix `A` stored in linear memory: +var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +console.log( ndarray2array( A, shape, strides, 0, order ) ); + +// Create a 2x2 right-hand side `B` whose columns are the real and imaginary parts of a complex right-hand side: +var B = new Float64Array( [ 1.0, 3.0, 2.0, 4.0 ] ); +console.log( ndarray2array( B, shape, strides, 0, order ) ); + +// Allocate an output matrix `X` and an output array for the scaling factor and the infinity-norm of `X`: +var X = new Float64Array( 4 ); +var out = new Float64Array( 2 ); + +// Solve (A - (0.5 + 0.5i) I) X = s B: +var info = dlaln2( order, 'no-transpose', 2, 2, 1.0e-3, 1.0, A, strides[ 0 ], 1.0, 1.0, B, strides[ 0 ], 0.5, 0.5, X, strides[ 0 ], out ); +console.log( info ); +console.log( ndarray2array( X, shape, strides, 0, order ) ); +console.log( out ); diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js new file mode 100644 index 000000000000..d442843a22a1 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js @@ -0,0 +1,489 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/* eslint-disable max-statements */ + +// MODULES // + +var Float64Array = require( '@stdlib/array/float64' ); +var dladiv = require( '@stdlib/lapack/base/dladiv' ).ndarray; +var dlamch = require( '@stdlib/lapack/base/dlamch' ); +var max = require( '@stdlib/math/base/special/max' ); +var abs = require( '@stdlib/math/base/special/abs' ); + + +// VARIABLES // + +var SMLNUM = 2.0 * dlamch( 'S' ); +var BIGNUM = 1.0 / SMLNUM; + +// Scratch arrays holding the real and imaginary parts of the (at most) 2x2 matrix `C = ca*A - w*D` in column-major order (i.e., `[ C11, C21, C12, C22 ]`): +var CRV = new Float64Array( 4 ); +var CIV = new Float64Array( 4 ); + +// Scratch array for the result of complex division: +var TMP = new Float64Array( 2 ); + +// Complete pivoting lookup tables (indexed by the position of the largest element in `C`): +var IPIVOT = [ + [ 0, 1, 2, 3 ], + [ 1, 0, 3, 2 ], + [ 2, 3, 0, 1 ], + [ 3, 2, 1, 0 ] +]; +var RSWAP = [ false, true, false, true ]; +var ZSWAP = [ false, false, true, true ]; + + +// FUNCTIONS // + +/** +* Tests whether a provided string indicates to transpose a matrix. +* +* @private +* @param {string} str - input string +* @returns {boolean} boolean indicating whether to transpose a matrix +*/ +function isTransposed( str ) { + return ( str !== 'no-transpose' ); +} + + +// MAIN // + +/** +* Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`, where `A` is an `NA` by `NA` real matrix (`NA` is 1 or 2), `ca` is a real scalar, `D` is an `NA` by `NA` real diagonal matrix, and `w` is a real or complex scalar. +* +* ## Notes +* +* - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. +* - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. +* - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. +* - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. +* - In the interests of speed, the function does not validate input arguments. +* +* @private +* @param {string} trans - specifies whether `A` should be transposed +* @param {PositiveInteger} NA - size of the matrix `A` (either `1` or `2`) +* @param {PositiveInteger} NW - `1` if `w` is real and `2` if `w` is complex +* @param {number} smin - desired lower bound on the singular values of `A` +* @param {number} ca - coefficient by which `A` is multiplied +* @param {Float64Array} A - input matrix +* @param {integer} strideA1 - stride of the first dimension of `A` +* @param {integer} strideA2 - stride of the second dimension of `A` +* @param {NonNegativeInteger} offsetA - starting index for `A` +* @param {number} d1 - first diagonal element of `D` +* @param {number} d2 - second diagonal element of `D` (not used if `NA = 1`) +* @param {Float64Array} B - right-hand side matrix +* @param {integer} strideB1 - stride of the first dimension of `B` +* @param {integer} strideB2 - stride of the second dimension of `B` +* @param {NonNegativeInteger} offsetB - starting index for `B` +* @param {number} wr - real part of `w` +* @param {number} wi - imaginary part of `w` (not used if `NW = 1`) +* @param {Float64Array} X - output matrix +* @param {integer} strideX1 - stride of the first dimension of `X` +* @param {integer} strideX2 - stride of the second dimension of `X` +* @param {NonNegativeInteger} offsetX - starting index for `X` +* @param {Float64Array} out - output array containing the scaling factor and the infinity-norm of `X` +* @param {integer} strideOut - stride length for `out` +* @param {NonNegativeInteger} offsetOut - starting index for `out` +* @returns {integer} status code +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +* var B = new Float64Array( [ 1.0, 2.0 ] ); +* var X = new Float64Array( 2 ); +* var out = new Float64Array( 2 ); +* +* var info = dlaln2( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); +* // returns 0 +* +* var s = out[ 0 ]; +* // returns 1.0 +* +* var xnorm = out[ 1 ]; +* // returns ~1.3913 +*/ +function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, out, strideOut, offsetOut ) { // eslint-disable-line max-len, max-params + var u22abs; + var icmax; + var smini; + var bnorm; + var cnorm; + var xnorm; + var scale; + var ur11r; + var ui11r; + var ur12s; + var ui12s; + var bbnd; + var cmax; + var temp; + var ur11; + var ui11; + var ur12; + var ui12; + var ur22; + var ui22; + var cr21; + var ci21; + var cr22; + var ci22; + var lr21; + var li21; + var info; + var csr; + var csi; + var br1; + var br2; + var bi1; + var bi2; + var xr1; + var xr2; + var xi1; + var xi2; + var ib1; + var ib2; + var ib3; + var ib4; + var ix1; + var ix2; + var ix3; + var ix4; + var piv; + var v; + var j; + + smini = max( smin, SMLNUM ); + info = 0; + scale = 1.0; + + // Indices of `B(1,1)`, `B(2,1)`, `B(1,2)`, and `B(2,2)`: + ib1 = offsetB; + ib2 = ib1 + strideB1; + ib3 = ib1 + strideB2; + ib4 = ib3 + strideB1; + + // Indices of `X(1,1)`, `X(2,1)`, `X(1,2)`, and `X(2,2)`: + ix1 = offsetX; + ix2 = ix1 + strideX1; + ix3 = ix1 + strideX2; + ix4 = ix3 + strideX1; + + if ( NA === 1 ) { + // 1x1 (i.e., scalar) system: C X = B + if ( NW === 1 ) { + // Real 1x1 system... + + // C = ca A - w D + csr = ( ca*A[ offsetA ] ) - ( wr*d1 ); + cnorm = abs( csr ); + + // If |C| < SMINI, use C = SMINI... + if ( cnorm < smini ) { + csr = smini; + cnorm = smini; + info = 1; + } + // Check scaling for X = B / C... + bnorm = abs( B[ ib1 ] ); + if ( cnorm < 1.0 && bnorm > 1.0 ) { + if ( bnorm > BIGNUM*cnorm ) { + scale = 1.0 / bnorm; + } + } + // Compute X... + X[ ix1 ] = ( B[ ib1 ]*scale ) / csr; + xnorm = abs( X[ ix1 ] ); + + out[ offsetOut ] = scale; + out[ offsetOut+strideOut ] = xnorm; + return info; + } + // Complex 1x1 system (w is complex)... + + // C = ca A - w D + csr = ( ca*A[ offsetA ] ) - ( wr*d1 ); + csi = -wi * d1; + cnorm = abs( csr ) + abs( csi ); + + // If |C| < SMINI, use C = SMINI... + if ( cnorm < smini ) { + csr = smini; + csi = 0.0; + cnorm = smini; + info = 1; + } + // Check scaling for X = B / C... + bnorm = abs( B[ ib1 ] ) + abs( B[ ib3 ] ); + if ( cnorm < 1.0 && bnorm > 1.0 ) { + if ( bnorm > BIGNUM*cnorm ) { + scale = 1.0 / bnorm; + } + } + // Compute X... + dladiv( scale*B[ ib1 ], scale*B[ ib3 ], csr, csi, X, ix1, X, ix3 ); + xnorm = abs( X[ ix1 ] ) + abs( X[ ix3 ] ); + + out[ offsetOut ] = scale; + out[ offsetOut+strideOut ] = xnorm; + return info; + } + // 2x2 system... + + // Compute the real part of C = ca A - w D (or ca A^T - w D): + CRV[ 0 ] = ( ca*A[ offsetA ] ) - ( wr*d1 ); + CRV[ 3 ] = ( ca*A[ offsetA+strideA1+strideA2 ] ) - ( wr*d2 ); + if ( isTransposed( trans ) ) { + CRV[ 2 ] = ca * A[ offsetA+strideA1 ]; + CRV[ 1 ] = ca * A[ offsetA+strideA2 ]; + } else { + CRV[ 1 ] = ca * A[ offsetA+strideA1 ]; + CRV[ 2 ] = ca * A[ offsetA+strideA2 ]; + } + if ( NW === 1 ) { + // Real 2x2 system (w is real)... + + // Find the largest element in C... + cmax = 0.0; + icmax = -1; + for ( j = 0; j < 4; j++ ) { + v = abs( CRV[ j ] ); + if ( v > cmax ) { + cmax = v; + icmax = j; + } + } + // If norm(C) < SMINI, use SMINI*identity... + if ( cmax < smini ) { + bnorm = max( abs( B[ ib1 ] ), abs( B[ ib2 ] ) ); + if ( smini < 1.0 && bnorm > 1.0 ) { + if ( bnorm > BIGNUM*smini ) { + scale = 1.0 / bnorm; + } + } + temp = scale / smini; + X[ ix1 ] = temp * B[ ib1 ]; + X[ ix2 ] = temp * B[ ib2 ]; + xnorm = temp * bnorm; + + out[ offsetOut ] = scale; + out[ offsetOut+strideOut ] = xnorm; + return 1; + } + // Gaussian elimination with complete pivoting... + piv = IPIVOT[ icmax ]; + ur11 = CRV[ icmax ]; + cr21 = CRV[ piv[ 1 ] ]; + ur12 = CRV[ piv[ 2 ] ]; + cr22 = CRV[ piv[ 3 ] ]; + ur11r = 1.0 / ur11; + lr21 = ur11r * cr21; + ur22 = cr22 - ( ur12*lr21 ); + + // If smaller pivot < SMINI, use SMINI... + if ( abs( ur22 ) < smini ) { + ur22 = smini; + info = 1; + } + if ( RSWAP[ icmax ] ) { + br1 = B[ ib2 ]; + br2 = B[ ib1 ]; + } else { + br1 = B[ ib1 ]; + br2 = B[ ib2 ]; + } + br2 -= lr21 * br1; + bbnd = max( abs( br1*( ur22*ur11r ) ), abs( br2 ) ); + if ( bbnd > 1.0 && abs( ur22 ) < 1.0 ) { + if ( bbnd >= BIGNUM*abs( ur22 ) ) { + scale = 1.0 / bbnd; + } + } + xr2 = ( br2*scale ) / ur22; + xr1 = ( ( scale*br1 )*ur11r ) - ( xr2*( ur11r*ur12 ) ); + if ( ZSWAP[ icmax ] ) { + X[ ix1 ] = xr2; + X[ ix2 ] = xr1; + } else { + X[ ix1 ] = xr1; + X[ ix2 ] = xr2; + } + xnorm = max( abs( xr1 ), abs( xr2 ) ); + + // Further scaling if norm(A) norm(X) > overflow... + if ( xnorm > 1.0 && cmax > 1.0 ) { + if ( xnorm > BIGNUM/cmax ) { + temp = cmax / BIGNUM; + X[ ix1 ] *= temp; + X[ ix2 ] *= temp; + xnorm *= temp; + scale *= temp; + } + } + out[ offsetOut ] = scale; + out[ offsetOut+strideOut ] = xnorm; + return info; + } + // Complex 2x2 system (w is complex)... + + // Find the largest element in C... + CIV[ 0 ] = -wi * d1; + CIV[ 1 ] = 0.0; + CIV[ 2 ] = 0.0; + CIV[ 3 ] = -wi * d2; + cmax = 0.0; + icmax = -1; + for ( j = 0; j < 4; j++ ) { + v = abs( CRV[ j ] ) + abs( CIV[ j ] ); + if ( v > cmax ) { + cmax = v; + icmax = j; + } + } + // If norm(C) < SMINI, use SMINI*identity... + if ( cmax < smini ) { + bnorm = max( abs( B[ ib1 ] )+abs( B[ ib3 ] ), abs( B[ ib2 ] )+abs( B[ ib4 ] ) ); // eslint-disable-line max-len + if ( smini < 1.0 && bnorm > 1.0 ) { + if ( bnorm > BIGNUM*smini ) { + scale = 1.0 / bnorm; + } + } + temp = scale / smini; + X[ ix1 ] = temp * B[ ib1 ]; + X[ ix2 ] = temp * B[ ib2 ]; + X[ ix3 ] = temp * B[ ib3 ]; + X[ ix4 ] = temp * B[ ib4 ]; + xnorm = temp * bnorm; + + out[ offsetOut ] = scale; + out[ offsetOut+strideOut ] = xnorm; + return 1; + } + // Gaussian elimination with complete pivoting... + piv = IPIVOT[ icmax ]; + ur11 = CRV[ icmax ]; + ui11 = CIV[ icmax ]; + cr21 = CRV[ piv[ 1 ] ]; + ci21 = CIV[ piv[ 1 ] ]; + ur12 = CRV[ piv[ 2 ] ]; + ui12 = CIV[ piv[ 2 ] ]; + cr22 = CRV[ piv[ 3 ] ]; + ci22 = CIV[ piv[ 3 ] ]; + if ( icmax === 0 || icmax === 3 ) { + // Code when off-diagonals of pivoted C are real... + if ( abs( ur11 ) > abs( ui11 ) ) { + temp = ui11 / ur11; + ur11r = 1.0 / ( ur11*( 1.0+( temp*temp ) ) ); + ui11r = -temp * ur11r; + } else { + temp = ur11 / ui11; + ui11r = -1.0 / ( ui11*( 1.0+( temp*temp ) ) ); + ur11r = -temp * ui11r; + } + lr21 = cr21 * ur11r; + li21 = cr21 * ui11r; + ur12s = ur12 * ur11r; + ui12s = ur12 * ui11r; + ur22 = cr22 - ( ur12*lr21 ); + ui22 = ci22 - ( ur12*li21 ); + } else { + // Code when diagonals of pivoted C are real... + ur11r = 1.0 / ur11; + ui11r = 0.0; + lr21 = cr21 * ur11r; + li21 = ci21 * ur11r; + ur12s = ur12 * ur11r; + ui12s = ui12 * ur11r; + ur22 = cr22 - ( ur12*lr21 ) + ( ui12*li21 ); + ui22 = -( ur12*li21 ) - ( ui12*lr21 ); + } + u22abs = abs( ur22 ) + abs( ui22 ); + + // If smaller pivot < SMINI, use SMINI... + if ( u22abs < smini ) { + ur22 = smini; + ui22 = 0.0; + info = 1; + } + if ( RSWAP[ icmax ] ) { + br2 = B[ ib1 ]; + br1 = B[ ib2 ]; + bi2 = B[ ib3 ]; + bi1 = B[ ib4 ]; + } else { + br1 = B[ ib1 ]; + br2 = B[ ib2 ]; + bi1 = B[ ib3 ]; + bi2 = B[ ib4 ]; + } + br2 = br2 - ( lr21*br1 ) + ( li21*bi1 ); + bi2 = bi2 - ( li21*br1 ) - ( lr21*bi1 ); + bbnd = max( ( abs( br1 )+abs( bi1 ) ) * ( u22abs*( abs( ur11r )+abs( ui11r ) ) ), abs( br2 )+abs( bi2 ) ); // eslint-disable-line max-len + if ( bbnd > 1.0 && u22abs < 1.0 ) { + if ( bbnd >= BIGNUM*u22abs ) { + scale = 1.0 / bbnd; + br1 *= scale; + bi1 *= scale; + br2 *= scale; + bi2 *= scale; + } + } + dladiv( br2, bi2, ur22, ui22, TMP, 0, TMP, 1 ); + xr2 = TMP[ 0 ]; + xi2 = TMP[ 1 ]; + xr1 = ( ur11r*br1 ) - ( ui11r*bi1 ) - ( ur12s*xr2 ) + ( ui12s*xi2 ); + xi1 = ( ui11r*br1 ) + ( ur11r*bi1 ) - ( ui12s*xr2 ) - ( ur12s*xi2 ); + if ( ZSWAP[ icmax ] ) { + X[ ix1 ] = xr2; + X[ ix2 ] = xr1; + X[ ix3 ] = xi2; + X[ ix4 ] = xi1; + } else { + X[ ix1 ] = xr1; + X[ ix2 ] = xr2; + X[ ix3 ] = xi1; + X[ ix4 ] = xi2; + } + xnorm = max( abs( xr1 )+abs( xi1 ), abs( xr2 )+abs( xi2 ) ); + + // Further scaling if norm(A) norm(X) > overflow... + if ( xnorm > 1.0 && cmax > 1.0 ) { + if ( xnorm > BIGNUM/cmax ) { + temp = cmax / BIGNUM; + X[ ix1 ] *= temp; + X[ ix2 ] *= temp; + X[ ix3 ] *= temp; + X[ ix4 ] *= temp; + xnorm *= temp; + scale *= temp; + } + } + out[ offsetOut ] = scale; + out[ offsetOut+strideOut ] = xnorm; + return info; +} + + +// EXPORTS // + +module.exports = dlaln2; diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js new file mode 100644 index 000000000000..995697574153 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js @@ -0,0 +1,145 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable max-len */ + +'use strict'; + +// MODULES // + +var isTransposeOperation = require( '@stdlib/blas/base/assert/is-transpose-operation' ); +var isLayout = require( '@stdlib/blas/base/assert/is-layout' ); +var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' ); +var transposeOperations = require( '@stdlib/blas/base/transpose-operations' ); +var join = require( '@stdlib/array/base/join' ); +var format = require( '@stdlib/string/format' ); +var base = require( './base.js' ); + + +// MAIN // + +/** +* Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`, where `A` is an `NA` by `NA` real matrix (`NA` is 1 or 2), `ca` is a real scalar, `D` is an `NA` by `NA` real diagonal matrix, and `w` is a real or complex scalar. +* +* ## Notes +* +* - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. +* - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. +* - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. +* - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. +* +* @param {string} order - storage layout +* @param {string} trans - specifies whether `A` should be transposed +* @param {PositiveInteger} NA - size of the matrix `A` (either `1` or `2`) +* @param {PositiveInteger} NW - `1` if `w` is real and `2` if `w` is complex +* @param {number} smin - desired lower bound on the singular values of `A` +* @param {number} ca - coefficient by which `A` is multiplied +* @param {Float64Array} A - input matrix +* @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) +* @param {number} d1 - first diagonal element of `D` +* @param {number} d2 - second diagonal element of `D` (not used if `NA = 1`) +* @param {Float64Array} B - right-hand side matrix +* @param {PositiveInteger} LDB - stride of the first dimension of `B` (a.k.a., leading dimension of the matrix `B`) +* @param {number} wr - real part of `w` +* @param {number} wi - imaginary part of `w` (not used if `NW = 1`) +* @param {Float64Array} X - output matrix +* @param {PositiveInteger} LDX - stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`) +* @param {Float64Array} out - output array containing the scaling factor and the infinity-norm of `X` +* @throws {TypeError} first argument must be a valid order +* @throws {TypeError} second argument must be a valid transpose operation +* @throws {RangeError} third argument must be either `1` or `2` +* @throws {RangeError} fourth argument must be either `1` or `2` +* @throws {RangeError} eighth argument must be a valid stride +* @throws {RangeError} twelfth argument must be a valid stride +* @throws {RangeError} sixteenth argument must be a valid stride +* @returns {integer} status code +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +* var B = new Float64Array( [ 1.0, 2.0 ] ); +* var X = new Float64Array( 2 ); +* var out = new Float64Array( 2 ); +* +* var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); +* // returns 0 +* +* var s = out[ 0 ]; +* // returns 1.0 +* +* var xnorm = out[ 1 ]; +* // returns ~1.3913 +*/ +function dlaln2( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, X, LDX, out ) { // eslint-disable-line max-params + var sa1; + var sa2; + var sb1; + var sb2; + var sx1; + var sx2; + + if ( !isLayout( order ) ) { + throw new TypeError( format( 'invalid argument. First argument must be a valid order. Value: `%s`.', order ) ); + } + if ( !isTransposeOperation( trans ) ) { + throw new TypeError( format( 'invalid argument. Second argument must be one of the following: "%s". Value: `%s`.', join( transposeOperations(), '", "' ), trans ) ); + } + if ( NA !== 1 && NA !== 2 ) { + throw new RangeError( format( 'invalid argument. Third argument must be either 1 or 2. Value: `%d`.', NA ) ); + } + if ( NW !== 1 && NW !== 2 ) { + throw new RangeError( format( 'invalid argument. Fourth argument must be either 1 or 2. Value: `%d`.', NW ) ); + } + if ( LDA < NA ) { + throw new RangeError( format( 'invalid argument. Eighth argument must be greater than or equal to %d. Value: `%d`.', NA, LDA ) ); + } + if ( isColumnMajor( order ) ) { + if ( LDB < NA ) { + throw new RangeError( format( 'invalid argument. Twelfth argument must be greater than or equal to %d. Value: `%d`.', NA, LDB ) ); + } + if ( LDX < NA ) { + throw new RangeError( format( 'invalid argument. Sixteenth argument must be greater than or equal to %d. Value: `%d`.', NA, LDX ) ); + } + sa1 = 1; + sa2 = LDA; + sb1 = 1; + sb2 = LDB; + sx1 = 1; + sx2 = LDX; + } else { // order === 'row-major' + if ( LDB < NW ) { + throw new RangeError( format( 'invalid argument. Twelfth argument must be greater than or equal to %d. Value: `%d`.', NW, LDB ) ); + } + if ( LDX < NW ) { + throw new RangeError( format( 'invalid argument. Sixteenth argument must be greater than or equal to %d. Value: `%d`.', NW, LDX ) ); + } + sa1 = LDA; + sa2 = 1; + sb1 = LDB; + sb2 = 1; + sx1 = LDX; + sx2 = 1; + } + return base( trans, NA, NW, smin, ca, A, sa1, sa2, 0, d1, d2, B, sb1, sb2, 0, wr, wi, X, sx1, sx2, 0, out, 1, 0 ); +} + + +// EXPORTS // + +module.exports = dlaln2; diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js new file mode 100644 index 000000000000..cef793793fdf --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js @@ -0,0 +1,86 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* LAPACK routine to solve a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`, where `A` is a 1 by 1 or 2 by 2 real matrix. +* +* @module @stdlib/lapack/base/dlaln2 +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* var dlaln2 = require( '@stdlib/lapack/base/dlaln2' ); +* +* var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +* var B = new Float64Array( [ 1.0, 2.0 ] ); +* var X = new Float64Array( 2 ); +* var out = new Float64Array( 2 ); +* +* var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); +* // returns 0 +* +* var s = out[ 0 ]; +* // returns 1.0 +* +* var xnorm = out[ 1 ]; +* // returns ~1.3913 +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* var dlaln2 = require( '@stdlib/lapack/base/dlaln2' ); +* +* var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +* var B = new Float64Array( [ 1.0, 2.0 ] ); +* var X = new Float64Array( 2 ); +* var out = new Float64Array( 2 ); +* +* var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); +* // returns 0 +* +* var s = out[ 0 ]; +* // returns 1.0 +* +* var xnorm = out[ 1 ]; +* // returns ~1.3913 +*/ + +// MODULES // + +var join = require( 'path' ).join; +var tryRequire = require( '@stdlib/utils/try-require' ); +var isError = require( '@stdlib/assert/is-error' ); +var main = require( './main.js' ); + + +// MAIN // + +var dlaln2; +var tmp = tryRequire( join( __dirname, './native.js' ) ); +if ( isError( tmp ) ) { + dlaln2 = main; +} else { + dlaln2 = tmp; +} + + +// EXPORTS // + +module.exports = dlaln2; + +// exports: { "ndarray": "dlaln2.ndarray" } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/main.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/main.js new file mode 100644 index 000000000000..568cefb317ba --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/main.js @@ -0,0 +1,35 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var dlaln2 = require( './dlaln2.js' ); +var ndarray = require( './ndarray.js' ); + + +// MAIN // + +setReadOnly( dlaln2, 'ndarray', ndarray ); + + +// EXPORTS // + +module.exports = dlaln2; diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js new file mode 100644 index 000000000000..9857b8e5ebd1 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js @@ -0,0 +1,106 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable max-len */ + +'use strict'; + +// MODULES // + +var isTransposeOperation = require( '@stdlib/blas/base/assert/is-transpose-operation' ); +var transposeOperations = require( '@stdlib/blas/base/transpose-operations' ); +var join = require( '@stdlib/array/base/join' ); +var format = require( '@stdlib/string/format' ); +var base = require( './base.js' ); + + +// MAIN // + +/** +* Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A` using alternative indexing semantics, where `A` is an `NA` by `NA` real matrix (`NA` is 1 or 2), `ca` is a real scalar, `D` is an `NA` by `NA` real diagonal matrix, and `w` is a real or complex scalar. +* +* ## Notes +* +* - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. +* - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. +* - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. +* - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. +* +* @param {string} trans - specifies whether `A` should be transposed +* @param {PositiveInteger} NA - size of the matrix `A` (either `1` or `2`) +* @param {PositiveInteger} NW - `1` if `w` is real and `2` if `w` is complex +* @param {number} smin - desired lower bound on the singular values of `A` +* @param {number} ca - coefficient by which `A` is multiplied +* @param {Float64Array} A - input matrix +* @param {integer} strideA1 - stride of the first dimension of `A` +* @param {integer} strideA2 - stride of the second dimension of `A` +* @param {NonNegativeInteger} offsetA - starting index for `A` +* @param {number} d1 - first diagonal element of `D` +* @param {number} d2 - second diagonal element of `D` (not used if `NA = 1`) +* @param {Float64Array} B - right-hand side matrix +* @param {integer} strideB1 - stride of the first dimension of `B` +* @param {integer} strideB2 - stride of the second dimension of `B` +* @param {NonNegativeInteger} offsetB - starting index for `B` +* @param {number} wr - real part of `w` +* @param {number} wi - imaginary part of `w` (not used if `NW = 1`) +* @param {Float64Array} X - output matrix +* @param {integer} strideX1 - stride of the first dimension of `X` +* @param {integer} strideX2 - stride of the second dimension of `X` +* @param {NonNegativeInteger} offsetX - starting index for `X` +* @param {Float64Array} out - output array containing the scaling factor and the infinity-norm of `X` +* @param {integer} strideOut - stride length for `out` +* @param {NonNegativeInteger} offsetOut - starting index for `out` +* @throws {TypeError} first argument must be a valid transpose operation +* @throws {RangeError} second argument must be either `1` or `2` +* @throws {RangeError} third argument must be either `1` or `2` +* @returns {integer} status code +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); +* var B = new Float64Array( [ 1.0, 2.0 ] ); +* var X = new Float64Array( 2 ); +* var out = new Float64Array( 2 ); +* +* var info = dlaln2( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); +* // returns 0 +* +* var s = out[ 0 ]; +* // returns 1.0 +* +* var xnorm = out[ 1 ]; +* // returns ~1.3913 +*/ +function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, out, strideOut, offsetOut ) { // eslint-disable-line max-params + if ( !isTransposeOperation( trans ) ) { + throw new TypeError( format( 'invalid argument. First argument must be one of the following: "%s". Value: `%s`.', join( transposeOperations(), '", "' ), trans ) ); + } + if ( NA !== 1 && NA !== 2 ) { + throw new RangeError( format( 'invalid argument. Second argument must be either 1 or 2. Value: `%d`.', NA ) ); + } + if ( NW !== 1 && NW !== 2 ) { + throw new RangeError( format( 'invalid argument. Third argument must be either 1 or 2. Value: `%d`.', NW ) ); + } + return base( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, out, strideOut, offsetOut ); +} + + +// EXPORTS // + +module.exports = dlaln2; diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/package.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/package.json new file mode 100644 index 000000000000..8c1c20bacf0b --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/package.json @@ -0,0 +1,73 @@ +{ + "name": "@stdlib/lapack/base/dlaln2", + "version": "0.0.0", + "description": "LAPACK routine to solve a system of the form (ca A - w D) X = s B or (ca A^T - w D) X = s B with possible scaling and perturbation of A, where A is a 1 by 1 or 2 by 2 real matrix.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "mathematics", + "math", + "lapack", + "dlaln2", + "linear", + "system", + "solve", + "eigenvector", + "perturbation", + "scaling", + "algebra", + "subroutines", + "array", + "ndarray", + "float64", + "double", + "float64array", + "matrix" + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na1_nw2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na1_nw2_row_major.json new file mode 100644 index 000000000000..db1294711b06 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na1_nw2_row_major.json @@ -0,0 +1,61 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 1, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 2, + 9999 + ], + "strideA1": 2, + "strideA2": 2, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 3, + 9999, + 1, + 9999 + ], + "strideB1": 4, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.25, + "X": [ + 0, + 9999, + 0, + 9999 + ], + "strideX1": 4, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 9999, + 0, + 9999 + ], + "strideOut": 2, + "offsetOut": 0, + "X_out": [ + 1.8378378378378377, + 9999, + 0.9729729729729728, + 9999 + ], + "out_out": [ + 1, + 9999, + 2.8108108108108105, + 9999 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw1_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw1_icmax1_col_major.json new file mode 100644 index 000000000000..86c4595a4495 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw1_icmax1_col_major.json @@ -0,0 +1,67 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 9999, + 5, + 9999, + 1, + 9999, + 2, + 9999 + ], + "strideA1": 2, + "strideA2": 4, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 9999, + 2, + 9999 + ], + "strideB1": 2, + "strideB2": 4, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 9999, + 0, + 9999 + ], + "strideX1": 2, + "strideX2": 4, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 9999, + 0, + 9999 + ], + "strideOut": 2, + "offsetOut": 0, + "X_out": [ + 0.11764705882352938, + 9999, + 0.9411764705882354, + 9999 + ], + "out_out": [ + 1, + 9999, + 0.9411764705882354, + 9999 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw2_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw2_icmax2_row_major.json new file mode 100644 index 000000000000..e50ad779022d --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw2_icmax2_row_major.json @@ -0,0 +1,79 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 9999, + 5, + 9999, + 1, + 9999, + 2, + 9999 + ], + "strideA1": 4, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 9999, + 3, + 9999, + 2, + 9999, + 4, + 9999 + ], + "strideB1": 4, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999 + ], + "strideX1": 4, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 9999, + 0, + 9999 + ], + "strideOut": 2, + "offsetOut": 0, + "X_out": [ + 2.2352941176470584, + 9999, + 3.058823529411764, + 9999, + -0.3294117647058823, + 9999, + 0.5176470588235296, + 9999 + ], + "out_out": [ + 1, + 9999, + 5.2941176470588225, + 9999 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na1_nw2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na1_nw2_row_major.json new file mode 100644 index 000000000000..0a62aa498158 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na1_nw2_row_major.json @@ -0,0 +1,50 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 1, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 2 + ], + "strideA1": 1, + "strideA2": 1, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 3, + 1 + ], + "strideB1": -2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.25, + "X": [ + 0, + 0 + ], + "strideX1": -2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 1.8378378378378377, + 0.9729729729729728 + ], + "out_out": [ + 1, + 2.8108108108108105 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw1_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw1_icmax1_col_major.json new file mode 100644 index 000000000000..df9376499260 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw1_icmax1_col_major.json @@ -0,0 +1,53 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 2, + 1, + 5 + ], + "strideA1": 1, + "strideA2": -2, + "offsetA": 2, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": -2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": -2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0.11764705882352938, + 0.9411764705882354 + ], + "out_out": [ + 1, + 0.9411764705882354 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw2_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw2_icmax2_row_major.json new file mode 100644 index 000000000000..ee4023a2e514 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw2_icmax2_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 2, + 1, + 5 + ], + "strideA1": -2, + "strideA2": 1, + "offsetA": 2, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 2, + 4, + 1, + 3 + ], + "strideB1": -2, + "strideB2": 1, + "offsetB": 2, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": -2, + "strideX2": 1, + "offsetX": 2, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + -0.3294117647058823, + 0.5176470588235296, + 2.2352941176470584, + 3.058823529411764 + ], + "out_out": [ + 1, + 5.2941176470588225 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_col_major.json new file mode 100644 index 000000000000..834866192e58 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_col_major.json @@ -0,0 +1,47 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 1, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 2 + ], + "strideA1": 1, + "strideA2": 1, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 3 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0.5, + "wi": 0, + "X": [ + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 2 + ], + "out_out": [ + 1, + 2 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_perturbed_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_perturbed_row_major.json new file mode 100644 index 000000000000..f9612402a81f --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_perturbed_row_major.json @@ -0,0 +1,47 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 1, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 1 + ], + "strideA1": 1, + "strideA2": 1, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 2 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 1, + "wi": 0, + "X": [ + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 2000 + ], + "out_out": [ + 1, + 2000 + ], + "info": 1 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_row_major.json new file mode 100644 index 000000000000..90bb6b95091c --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_row_major.json @@ -0,0 +1,47 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 1, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 2 + ], + "strideA1": 1, + "strideA2": 1, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 3 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0.5, + "wi": 0, + "X": [ + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 2 + ], + "out_out": [ + 1, + 2 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_scaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_scaled_row_major.json new file mode 100644 index 000000000000..324e454d8726 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_scaled_row_major.json @@ -0,0 +1,47 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 1, + "NW": 1, + "smin": 1e-310, + "ca": 1, + "A": [ + 1e-300 + ], + "strideA1": 1, + "strideA2": 1, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 10000000000 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0, + "wi": 0, + "X": [ + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 9.999999999999999e+299 + ], + "out_out": [ + 1e-10, + 9.999999999999999e+299 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_col_major.json new file mode 100644 index 000000000000..6b8cdede2c1a --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_col_major.json @@ -0,0 +1,50 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 1, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 2 + ], + "strideA1": 1, + "strideA2": 1, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 3, + 1 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0.5, + "wi": 0.25, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 1.8378378378378377, + 0.9729729729729728 + ], + "out_out": [ + 1, + 2.8108108108108105 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_perturbed_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_perturbed_row_major.json new file mode 100644 index 000000000000..c6aacdc1d91b --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_perturbed_row_major.json @@ -0,0 +1,50 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 1, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 1 + ], + "strideA1": 1, + "strideA2": 1, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 2, + 1 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 1, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 2000, + 1000 + ], + "out_out": [ + 1, + 3000 + ], + "info": 1 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_row_major.json new file mode 100644 index 000000000000..fecbd1999c84 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_row_major.json @@ -0,0 +1,50 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 1, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 2 + ], + "strideA1": 1, + "strideA2": 1, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 3, + 1 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.25, + "X": [ + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 1.8378378378378377, + 0.9729729729729728 + ], + "out_out": [ + 1, + 2.8108108108108105 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_scaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_scaled_row_major.json new file mode 100644 index 000000000000..9f07642cd7e3 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_scaled_row_major.json @@ -0,0 +1,50 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 1, + "NW": 2, + "smin": 1e-310, + "ca": 1, + "A": [ + 1e-300 + ], + "strideA1": 1, + "strideA2": 1, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 10000000000, + 10000000000 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 4.9999999999999995e+299, + 4.9999999999999995e+299 + ], + "out_out": [ + 5e-11, + 9.999999999999999e+299 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_cmax_lt_smin_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_cmax_lt_smin_row_major.json new file mode 100644 index 000000000000..2d5e8bb8581a --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_cmax_lt_smin_row_major.json @@ -0,0 +1,53 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.01, + "ca": 1, + "A": [ + 0.001, + 0.001, + 0.001, + 0.001 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 100, + 200 + ], + "out_out": [ + 1, + 200 + ], + "info": 1 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_col_major.json new file mode 100644 index 000000000000..63eccce9ce81 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_col_major.json @@ -0,0 +1,53 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 5, + 1, + 1, + 2 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + -0.08695652173913043, + 1.391304347826087 + ], + "out_out": [ + 1, + 1.391304347826087 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_row_major.json new file mode 100644 index 000000000000..b75e6bda27f8 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_row_major.json @@ -0,0 +1,53 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 5, + 1, + 1, + 2 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + -0.08695652173913043, + 1.391304347826087 + ], + "out_out": [ + 1, + 1.391304347826087 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_col_major.json new file mode 100644 index 000000000000..7956ad6dbd1d --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_col_major.json @@ -0,0 +1,53 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 5, + 1, + 2 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0.11764705882352938, + 0.9411764705882354 + ], + "out_out": [ + 1, + 0.9411764705882354 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_row_major.json new file mode 100644 index 000000000000..ab96990622ed --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_row_major.json @@ -0,0 +1,53 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 1, + 5, + 2 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0.11764705882352938, + 0.9411764705882354 + ], + "out_out": [ + 1, + 0.9411764705882354 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_col_major.json new file mode 100644 index 000000000000..2b660f874875 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_col_major.json @@ -0,0 +1,53 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 1, + 5, + 2 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 2, + 0 + ], + "out_out": [ + 1, + 2 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_row_major.json new file mode 100644 index 000000000000..7f2df5808eba --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_row_major.json @@ -0,0 +1,53 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 5, + 1, + 2 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 2, + 0 + ], + "out_out": [ + 1, + 2 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_col_major.json new file mode 100644 index 000000000000..4d1e3df39fe7 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_col_major.json @@ -0,0 +1,53 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 1, + 1, + 5 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 2, + 0 + ], + "out_out": [ + 1, + 2 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_row_major.json new file mode 100644 index 000000000000..f7b221841069 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_row_major.json @@ -0,0 +1,53 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 1, + 1, + 5 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 2, + 0 + ], + "out_out": [ + 1, + 2 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_postscaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_postscaled_row_major.json new file mode 100644 index 000000000000..7d7313a34908 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_postscaled_row_major.json @@ -0,0 +1,53 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 1e-310, + "ca": 1, + "A": [ + 10000000000, + 0, + 0, + 1e-300 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 0, + 1 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0, + 445.0147717014402 + ], + "out_out": [ + 4.450147717014403e-298, + 445.0147717014402 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_scaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_scaled_row_major.json new file mode 100644 index 000000000000..b19f773c3cf5 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_scaled_row_major.json @@ -0,0 +1,53 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 1e-310, + "ca": 1, + "A": [ + 1, + 0, + 0, + 1e-300 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 10000000000 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 1e-10, + 9.999999999999999e+299 + ], + "out_out": [ + 1e-10, + 9.999999999999999e+299 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_col_major.json new file mode 100644 index 000000000000..a6498fdbea31 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_col_major.json @@ -0,0 +1,53 @@ +{ + "order": "column-major", + "trans": "transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 2, + "A": [ + 1, + 1, + 5, + 2 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 3, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0.09230769230769233, + 0.43076923076923074 + ], + "out_out": [ + 1, + 0.43076923076923074 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_row_major.json new file mode 100644 index 000000000000..56d4f7e5d11e --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_row_major.json @@ -0,0 +1,53 @@ +{ + "order": "row-major", + "trans": "transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 2, + "A": [ + 1, + 5, + 1, + 2 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 3, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0.09230769230769233, + 0.43076923076923074 + ], + "out_out": [ + 1, + 0.43076923076923074 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_u22_perturbed_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_u22_perturbed_row_major.json new file mode 100644 index 000000000000..1f3b8e2336cd --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_u22_perturbed_row_major.json @@ -0,0 +1,53 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 2, + 2, + 4 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2 + ], + "strideB1": 1, + "strideB2": 1, + "offsetB": 0, + "LDB": 1, + "wr": 0, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": 1, + "strideX2": 1, + "offsetX": 0, + "LDX": 1, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0, + 0.5 + ], + "out_out": [ + 1, + 0.5 + ], + "info": 1 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_cmax_lt_smin_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_cmax_lt_smin_row_major.json new file mode 100644 index 000000000000..eaedf10968dc --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_cmax_lt_smin_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.01, + "ca": 1, + "A": [ + 0.001, + 0.001, + 0.001, + 0.001 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 3, + 2, + 4 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0, + "wi": 0.001, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 100, + 300, + 200, + 400 + ], + "out_out": [ + 1, + 600 + ], + "info": 1 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_col_major.json new file mode 100644 index 000000000000..2f970f74fe78 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_col_major.json @@ -0,0 +1,59 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 5, + 1, + 1, + 2 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2, + 3, + 4 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0.14012738853503182, + 0.3312101910828027, + 0.07643312101910837, + 2.7261146496815285 + ], + "out_out": [ + 1, + 3.0573248407643314 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_row_major.json new file mode 100644 index 000000000000..7c52f1ba5518 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 5, + 1, + 1, + 2 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 3, + 2, + 4 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0.14012738853503182, + 0.07643312101910837, + 0.3312101910828027, + 2.7261146496815285 + ], + "out_out": [ + 1, + 3.0573248407643314 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_ui11_dominant_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_ui11_dominant_row_major.json new file mode 100644 index 000000000000..58b9c6f3e994 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_ui11_dominant_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 5, + 1, + 1, + 2 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 3, + 2, + 4 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 10, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + -0.17706992975481775, + 0.213519318676807, + -0.3383785028713907, + 0.26846376840619035 + ], + "out_out": [ + 1, + 0.6068422712775811 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_col_major.json new file mode 100644 index 000000000000..100e13509a70 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_col_major.json @@ -0,0 +1,59 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 5, + 1, + 2 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2, + 3, + 4 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + -0.21176470588235302, + 1.0823529411764707, + 0.04705882352941171, + 2.8705882352941177 + ], + "out_out": [ + 1, + 3.9529411764705884 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_row_major.json new file mode 100644 index 000000000000..48e8c5926782 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 1, + 5, + 2 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 3, + 2, + 4 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + -0.21176470588235302, + 0.04705882352941171, + 1.0823529411764707, + 2.8705882352941177 + ], + "out_out": [ + 1, + 3.9529411764705884 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_col_major.json new file mode 100644 index 000000000000..e784d192914c --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_col_major.json @@ -0,0 +1,59 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 1, + 5, + 2 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2, + 3, + 4 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 2.2352941176470584, + -0.3294117647058823, + 3.058823529411764, + 0.5176470588235296 + ], + "out_out": [ + 1, + 5.2941176470588225 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_row_major.json new file mode 100644 index 000000000000..85565470c7c3 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 5, + 1, + 2 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 3, + 2, + 4 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 2.2352941176470584, + 3.058823529411764, + -0.3294117647058823, + 0.5176470588235296 + ], + "out_out": [ + 1, + 5.2941176470588225 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_col_major.json new file mode 100644 index 000000000000..5e65464c2081 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_col_major.json @@ -0,0 +1,59 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 1, + 1, + 5 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 2, + 3, + 4 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + -2.5517241379310343, + 0.9655172413793103, + 2.6206896551724137, + 0.4137931034482759 + ], + "out_out": [ + 1, + 5.172413793103448 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_row_major.json new file mode 100644 index 000000000000..19340abee39b --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 1, + 1, + 5 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 3, + 2, + 4 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + -2.5517241379310343, + 2.6206896551724137, + 0.9655172413793103, + 0.4137931034482759 + ], + "out_out": [ + 1, + 5.172413793103448 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_postscaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_postscaled_row_major.json new file mode 100644 index 000000000000..1ea7dace20a9 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_postscaled_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 1e-310, + "ca": 1, + "A": [ + 10000000000, + 0, + 0, + 1e-300 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 0, + 0, + 1, + 1 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0, + "wi": 0, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0, + 0, + 445.0147717014402, + 445.0147717014402 + ], + "out_out": [ + 4.450147717014403e-298, + 890.0295434028804 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_scaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_scaled_row_major.json new file mode 100644 index 000000000000..1027c9d5c580 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_scaled_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 1e-310, + "ca": 1, + "A": [ + 1, + 0, + 0, + 1e-300 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 1, + 10000000000, + 10000000000 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0, + "wi": 0, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 5e-11, + 5e-11, + 4.9999999999999995e+299, + 4.9999999999999995e+299 + ], + "out_out": [ + 5e-11, + 9.999999999999999e+299 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_col_major.json new file mode 100644 index 000000000000..9914b3ccfbc6 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_col_major.json @@ -0,0 +1,59 @@ +{ + "order": "column-major", + "trans": "transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 2, + "A": [ + 1, + 1, + 5, + 2 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 3, + "B": [ + 1, + 2, + 3, + 4 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + -0.14605809128630703, + 0.5726141078838174, + 0.14771784232365154, + 1.3526970954356845 + ], + "out_out": [ + 1, + 1.925311203319502 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_row_major.json new file mode 100644 index 000000000000..543af52c2a80 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 2, + "A": [ + 1, + 5, + 1, + 2 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 3, + "B": [ + 1, + 3, + 2, + 4 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + -0.14605809128630703, + 0.14771784232365154, + 0.5726141078838174, + 1.3526970954356845 + ], + "out_out": [ + 1, + 1.925311203319502 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_u22_perturbed_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_u22_perturbed_row_major.json new file mode 100644 index 000000000000..977f2e76b72d --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_u22_perturbed_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 1, + 2, + 2, + 4 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 1, + 3, + 2, + 4 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 0, + "LDB": 2, + "wr": 0, + "wi": 0, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 0, + "X_out": [ + 0, + 1000, + 0.5, + -499 + ], + "out_out": [ + 1, + 1000 + ], + "info": 1 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na1_nw2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na1_nw2_row_major.json new file mode 100644 index 000000000000..52e65fc944da --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na1_nw2_row_major.json @@ -0,0 +1,50 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 1, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 2 + ], + "strideA1": -1, + "strideA2": -1, + "offsetA": 0, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 1, + 3 + ], + "strideB1": -2, + "strideB2": -1, + "offsetB": 1, + "LDB": 2, + "wr": 0.5, + "wi": 0.25, + "X": [ + 0, + 0 + ], + "strideX1": -2, + "strideX2": -1, + "offsetX": 1, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": -1, + "offsetOut": 1, + "X_out": [ + 0.9729729729729728, + 1.8378378378378377 + ], + "out_out": [ + 2.8108108108108105, + 1 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw1_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw1_icmax1_col_major.json new file mode 100644 index 000000000000..b32250fb9973 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw1_icmax1_col_major.json @@ -0,0 +1,53 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 2, + 1, + 5, + 1 + ], + "strideA1": -1, + "strideA2": -2, + "offsetA": 3, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 2, + 1 + ], + "strideB1": -1, + "strideB2": -2, + "offsetB": 1, + "LDB": 2, + "wr": 0.5, + "wi": 0, + "X": [ + 0, + 0 + ], + "strideX1": -1, + "strideX2": -2, + "offsetX": 1, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": -1, + "offsetOut": 1, + "X_out": [ + 0.9411764705882354, + 0.11764705882352938 + ], + "out_out": [ + 0.9411764705882354, + 1 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw2_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw2_icmax2_row_major.json new file mode 100644 index 000000000000..c38bc3d1ed40 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw2_icmax2_row_major.json @@ -0,0 +1,59 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 2, + 1, + 5, + 1 + ], + "strideA1": -2, + "strideA2": -1, + "offsetA": 3, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 4, + 2, + 3, + 1 + ], + "strideB1": -2, + "strideB2": -1, + "offsetB": 3, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 0, + 0, + 0, + 0 + ], + "strideX1": -2, + "strideX2": -1, + "offsetX": 3, + "LDX": 2, + "out": [ + 0, + 0 + ], + "strideOut": -1, + "offsetOut": 1, + "X_out": [ + 0.5176470588235296, + -0.3294117647058823, + 3.058823529411764, + 2.2352941176470584 + ], + "out_out": [ + 5.2941176470588225, + 1 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na1_nw2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na1_nw2_row_major.json new file mode 100644 index 000000000000..e719cdb12ae4 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na1_nw2_row_major.json @@ -0,0 +1,56 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 1, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 9999, + 2 + ], + "strideA1": 1, + "strideA2": 1, + "offsetA": 1, + "LDA": 1, + "d1": 1, + "d2": 0, + "B": [ + 9999, + 3, + 1 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 1, + "LDB": 2, + "wr": 0.5, + "wi": 0.25, + "X": [ + 9999, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 1, + "LDX": 2, + "out": [ + 9999, + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 1, + "X_out": [ + 9999, + 1.8378378378378377, + 0.9729729729729728 + ], + "out_out": [ + 9999, + 1, + 2.8108108108108105 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw1_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw1_icmax1_col_major.json new file mode 100644 index 000000000000..ee1c3cc3f3e7 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw1_icmax1_col_major.json @@ -0,0 +1,59 @@ +{ + "order": "column-major", + "trans": "no-transpose", + "NA": 2, + "NW": 1, + "smin": 0.001, + "ca": 1, + "A": [ + 9999, + 1, + 5, + 1, + 2 + ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 1, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 9999, + 1, + 2 + ], + "strideB1": 1, + "strideB2": 2, + "offsetB": 1, + "LDB": 2, + "wr": 0.5, + "wi": 0, + "X": [ + 9999, + 0, + 0 + ], + "strideX1": 1, + "strideX2": 2, + "offsetX": 1, + "LDX": 2, + "out": [ + 9999, + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 1, + "X_out": [ + 9999, + 0.11764705882352938, + 0.9411764705882354 + ], + "out_out": [ + 9999, + 1, + 0.9411764705882354 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw2_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw2_icmax2_row_major.json new file mode 100644 index 000000000000..7823206d2909 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw2_icmax2_row_major.json @@ -0,0 +1,65 @@ +{ + "order": "row-major", + "trans": "no-transpose", + "NA": 2, + "NW": 2, + "smin": 0.001, + "ca": 1, + "A": [ + 9999, + 1, + 5, + 1, + 2 + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 1, + "LDA": 2, + "d1": 1, + "d2": 1, + "B": [ + 9999, + 1, + 3, + 2, + 4 + ], + "strideB1": 2, + "strideB2": 1, + "offsetB": 1, + "LDB": 2, + "wr": 0.5, + "wi": 0.5, + "X": [ + 9999, + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 1, + "LDX": 2, + "out": [ + 9999, + 0, + 0 + ], + "strideOut": 1, + "offsetOut": 1, + "X_out": [ + 9999, + 2.2352941176470584, + 3.058823529411764, + -0.3294117647058823, + 0.5176470588235296 + ], + "out_out": [ + 9999, + 1, + 5.2941176470588225 + ], + "info": 0 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js new file mode 100644 index 000000000000..4a29ec8bbb5b --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js @@ -0,0 +1,1380 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +/* eslint-disable max-len, id-length */ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Float64Array = require( '@stdlib/array/float64' ); +var dlaln2 = require( './../lib/dlaln2.js' ); + + +// FIXTURES // + +var NA1_NW1_COL_MAJOR = require( './fixtures/na1_nw1_col_major.json' ); +var NA1_NW1_PERTURBED_ROW_MAJOR = require( './fixtures/na1_nw1_perturbed_row_major.json' ); +var NA1_NW1_ROW_MAJOR = require( './fixtures/na1_nw1_row_major.json' ); +var NA1_NW1_SCALED_ROW_MAJOR = require( './fixtures/na1_nw1_scaled_row_major.json' ); +var NA1_NW2_COL_MAJOR = require( './fixtures/na1_nw2_col_major.json' ); +var NA1_NW2_PERTURBED_ROW_MAJOR = require( './fixtures/na1_nw2_perturbed_row_major.json' ); +var NA1_NW2_ROW_MAJOR = require( './fixtures/na1_nw2_row_major.json' ); +var NA1_NW2_SCALED_ROW_MAJOR = require( './fixtures/na1_nw2_scaled_row_major.json' ); +var NA2_NW1_CMAX_LT_SMIN_ROW_MAJOR = require( './fixtures/na2_nw1_cmax_lt_smin_row_major.json' ); +var NA2_NW1_ICMAX0_COL_MAJOR = require( './fixtures/na2_nw1_icmax0_col_major.json' ); +var NA2_NW1_ICMAX0_ROW_MAJOR = require( './fixtures/na2_nw1_icmax0_row_major.json' ); +var NA2_NW1_ICMAX1_COL_MAJOR = require( './fixtures/na2_nw1_icmax1_col_major.json' ); +var NA2_NW1_ICMAX1_ROW_MAJOR = require( './fixtures/na2_nw1_icmax1_row_major.json' ); +var NA2_NW1_ICMAX2_COL_MAJOR = require( './fixtures/na2_nw1_icmax2_col_major.json' ); +var NA2_NW1_ICMAX2_ROW_MAJOR = require( './fixtures/na2_nw1_icmax2_row_major.json' ); +var NA2_NW1_ICMAX3_COL_MAJOR = require( './fixtures/na2_nw1_icmax3_col_major.json' ); +var NA2_NW1_ICMAX3_ROW_MAJOR = require( './fixtures/na2_nw1_icmax3_row_major.json' ); +var NA2_NW1_POSTSCALED_ROW_MAJOR = require( './fixtures/na2_nw1_postscaled_row_major.json' ); +var NA2_NW1_SCALED_ROW_MAJOR = require( './fixtures/na2_nw1_scaled_row_major.json' ); +var NA2_NW1_TRANS_COL_MAJOR = require( './fixtures/na2_nw1_trans_col_major.json' ); +var NA2_NW1_TRANS_ROW_MAJOR = require( './fixtures/na2_nw1_trans_row_major.json' ); +var NA2_NW1_U22_PERTURBED_ROW_MAJOR = require( './fixtures/na2_nw1_u22_perturbed_row_major.json' ); +var NA2_NW2_CMAX_LT_SMIN_ROW_MAJOR = require( './fixtures/na2_nw2_cmax_lt_smin_row_major.json' ); +var NA2_NW2_ICMAX0_COL_MAJOR = require( './fixtures/na2_nw2_icmax0_col_major.json' ); +var NA2_NW2_ICMAX0_ROW_MAJOR = require( './fixtures/na2_nw2_icmax0_row_major.json' ); +var NA2_NW2_ICMAX0_UI11_DOMINANT_ROW_MAJOR = require( './fixtures/na2_nw2_icmax0_ui11_dominant_row_major.json' ); +var NA2_NW2_ICMAX1_COL_MAJOR = require( './fixtures/na2_nw2_icmax1_col_major.json' ); +var NA2_NW2_ICMAX1_ROW_MAJOR = require( './fixtures/na2_nw2_icmax1_row_major.json' ); +var NA2_NW2_ICMAX2_COL_MAJOR = require( './fixtures/na2_nw2_icmax2_col_major.json' ); +var NA2_NW2_ICMAX2_ROW_MAJOR = require( './fixtures/na2_nw2_icmax2_row_major.json' ); +var NA2_NW2_ICMAX3_COL_MAJOR = require( './fixtures/na2_nw2_icmax3_col_major.json' ); +var NA2_NW2_ICMAX3_ROW_MAJOR = require( './fixtures/na2_nw2_icmax3_row_major.json' ); +var NA2_NW2_POSTSCALED_ROW_MAJOR = require( './fixtures/na2_nw2_postscaled_row_major.json' ); +var NA2_NW2_SCALED_ROW_MAJOR = require( './fixtures/na2_nw2_scaled_row_major.json' ); +var NA2_NW2_TRANS_COL_MAJOR = require( './fixtures/na2_nw2_trans_col_major.json' ); +var NA2_NW2_TRANS_ROW_MAJOR = require( './fixtures/na2_nw2_trans_row_major.json' ); +var NA2_NW2_U22_PERTURBED_ROW_MAJOR = require( './fixtures/na2_nw2_u22_perturbed_row_major.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof dlaln2, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 17', function test( t ) { + t.strictEqual( dlaln2.length, 17, 'returns expected value' ); + t.end(); +}); + +tape( 'the function throws an error if provided a first argument which is not a valid order', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 2.0 ] ); + X = new Float64Array( 2 ); + out = new Float64Array( 2 ); + + values = [ + 'foo', + 'bar', + 'beep', + 'boop', + -5, + NaN, + true, + false, + null, + void 0, + [], + {}, + function noop() {} + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( value, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + }; + } +}); + +tape( 'the function throws an error if provided a second argument which is not a valid transpose operation', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 2.0 ] ); + X = new Float64Array( 2 ); + out = new Float64Array( 2 ); + + values = [ + 'foo', + 'bar', + 'beep', + 'boop', + -5, + NaN, + true, + false, + null, + void 0, + [], + {}, + function noop() {} + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( 'row-major', value, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + }; + } +}); + +tape( 'the function throws an error if provided a third argument which is not either 1 or 2', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 2.0 ] ); + X = new Float64Array( 2 ); + out = new Float64Array( 2 ); + + values = [ + -2, + -1, + 0, + 3, + 4 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( 'row-major', 'no-transpose', value, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + }; + } +}); + +tape( 'the function throws an error if provided a fourth argument which is not either 1 or 2', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 2.0 ] ); + X = new Float64Array( 2 ); + out = new Float64Array( 2 ); + + values = [ + -2, + -1, + 0, + 3, + 4 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( 'row-major', 'no-transpose', 2, value, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + }; + } +}); + +tape( 'the function throws an error if provided an eighth argument which is not a valid LDA value', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 2.0 ] ); + X = new Float64Array( 2 ); + out = new Float64Array( 2 ); + + values = [ + 0, + 1 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, value, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + }; + } +}); + +tape( 'the function throws an error if provided a twelfth argument which is not a valid LDB value (row-major)', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 3.0, 2.0, 4.0 ] ); + X = new Float64Array( 4 ); + out = new Float64Array( 2 ); + + values = [ + 0, + 1 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( 'row-major', 'no-transpose', 2, 2, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, value, 0.5, 0.5, X, 2, out ); + }; + } +}); + +tape( 'the function throws an error if provided a twelfth argument which is not a valid LDB value (column-major)', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 2.0 ] ); + X = new Float64Array( 2 ); + out = new Float64Array( 2 ); + + values = [ + 0, + 1 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( 'column-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, value, 0.5, 0.0, X, 2, out ); + }; + } +}); + +tape( 'the function throws an error if provided a sixteenth argument which is not a valid LDX value (row-major)', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 3.0, 2.0, 4.0 ] ); + X = new Float64Array( 4 ); + out = new Float64Array( 2 ); + + values = [ + 0, + 1 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( 'row-major', 'no-transpose', 2, 2, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 2, 0.5, 0.5, X, value, out ); + }; + } +}); + +tape( 'the function throws an error if provided a sixteenth argument which is not a valid LDX value (column-major)', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 2.0 ] ); + X = new Float64Array( 2 ); + out = new Float64Array( 2 ); + + values = [ + 0, + 1 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( 'column-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 2, 0.5, 0.0, X, value, out ); + }; + } +}); + +tape( 'the function solves a real 1x1 system (column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW1_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 1x1 system (perturbed, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW1_PERTURBED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 1x1 system (row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW1_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 1x1 system (scaled, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW1_SCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW2_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (perturbed, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW2_PERTURBED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (scaled, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW2_SCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (norm(C) < smin, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_CMAX_LT_SMIN_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C11, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX0_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C11, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX0_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C21, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX1_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C21, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX1_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C12, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX2_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C12, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C22, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX3_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C22, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX3_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (scaled to avoid overflow, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_POSTSCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (scaled, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_SCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (transposed, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_TRANS_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (transposed, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_TRANS_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (perturbed pivot, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_U22_PERTURBED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (norm(C) < smin, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_CMAX_LT_SMIN_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C11, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX0_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C11, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX0_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C11, imaginary part dominant, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX0_UI11_DOMINANT_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C21, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX1_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C21, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX1_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C12, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX2_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C12, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C22, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX3_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C22, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX3_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (scaled to avoid overflow, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_POSTSCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (scaled, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_SCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (transposed, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_TRANS_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (transposed, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_TRANS_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (perturbed pivot, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_U22_PERTURBED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.js new file mode 100644 index 000000000000..d90e940eab8b --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.js @@ -0,0 +1,82 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var proxyquire = require( 'proxyquire' ); +var IS_BROWSER = require( '@stdlib/assert/is-browser' ); +var dlaln2 = require( './../lib' ); + + +// VARIABLES // + +var opts = { + 'skip': IS_BROWSER +}; + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof dlaln2, '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 dlaln2.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 dlaln2 = proxyquire( './../lib', { + '@stdlib/utils/try-require': tryRequire + }); + + t.strictEqual( dlaln2, mock, 'returns expected value' ); + t.end(); + + function tryRequire() { + return mock; + } + + function mock() { + // Mock... + } +}); + +tape( 'if a native implementation is not available, the main export is a JavaScript implementation', opts, function test( t ) { + var dlaln2; + var main; + + main = require( './../lib/dlaln2.js' ); + + dlaln2 = proxyquire( './../lib', { + '@stdlib/utils/try-require': tryRequire + }); + + t.strictEqual( dlaln2, main, 'returns expected value' ); + t.end(); + + function tryRequire() { + return new Error( 'Cannot find module' ); + } +}); diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js new file mode 100644 index 000000000000..1409903592a0 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js @@ -0,0 +1,1525 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +/* eslint-disable max-len, id-length */ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Float64Array = require( '@stdlib/array/float64' ); +var dlaln2 = require( './../lib/ndarray.js' ); + + +// FIXTURES // + +var NA1_NW1_COL_MAJOR = require( './fixtures/na1_nw1_col_major.json' ); +var NA1_NW1_PERTURBED_ROW_MAJOR = require( './fixtures/na1_nw1_perturbed_row_major.json' ); +var NA1_NW1_ROW_MAJOR = require( './fixtures/na1_nw1_row_major.json' ); +var NA1_NW1_SCALED_ROW_MAJOR = require( './fixtures/na1_nw1_scaled_row_major.json' ); +var NA1_NW2_COL_MAJOR = require( './fixtures/na1_nw2_col_major.json' ); +var NA1_NW2_PERTURBED_ROW_MAJOR = require( './fixtures/na1_nw2_perturbed_row_major.json' ); +var NA1_NW2_ROW_MAJOR = require( './fixtures/na1_nw2_row_major.json' ); +var NA1_NW2_SCALED_ROW_MAJOR = require( './fixtures/na1_nw2_scaled_row_major.json' ); +var NA2_NW1_CMAX_LT_SMIN_ROW_MAJOR = require( './fixtures/na2_nw1_cmax_lt_smin_row_major.json' ); +var NA2_NW1_ICMAX0_COL_MAJOR = require( './fixtures/na2_nw1_icmax0_col_major.json' ); +var NA2_NW1_ICMAX0_ROW_MAJOR = require( './fixtures/na2_nw1_icmax0_row_major.json' ); +var NA2_NW1_ICMAX1_COL_MAJOR = require( './fixtures/na2_nw1_icmax1_col_major.json' ); +var NA2_NW1_ICMAX1_ROW_MAJOR = require( './fixtures/na2_nw1_icmax1_row_major.json' ); +var NA2_NW1_ICMAX2_COL_MAJOR = require( './fixtures/na2_nw1_icmax2_col_major.json' ); +var NA2_NW1_ICMAX2_ROW_MAJOR = require( './fixtures/na2_nw1_icmax2_row_major.json' ); +var NA2_NW1_ICMAX3_COL_MAJOR = require( './fixtures/na2_nw1_icmax3_col_major.json' ); +var NA2_NW1_ICMAX3_ROW_MAJOR = require( './fixtures/na2_nw1_icmax3_row_major.json' ); +var NA2_NW1_POSTSCALED_ROW_MAJOR = require( './fixtures/na2_nw1_postscaled_row_major.json' ); +var NA2_NW1_SCALED_ROW_MAJOR = require( './fixtures/na2_nw1_scaled_row_major.json' ); +var NA2_NW1_TRANS_COL_MAJOR = require( './fixtures/na2_nw1_trans_col_major.json' ); +var NA2_NW1_TRANS_ROW_MAJOR = require( './fixtures/na2_nw1_trans_row_major.json' ); +var NA2_NW1_U22_PERTURBED_ROW_MAJOR = require( './fixtures/na2_nw1_u22_perturbed_row_major.json' ); +var NA2_NW2_CMAX_LT_SMIN_ROW_MAJOR = require( './fixtures/na2_nw2_cmax_lt_smin_row_major.json' ); +var NA2_NW2_ICMAX0_COL_MAJOR = require( './fixtures/na2_nw2_icmax0_col_major.json' ); +var NA2_NW2_ICMAX0_ROW_MAJOR = require( './fixtures/na2_nw2_icmax0_row_major.json' ); +var NA2_NW2_ICMAX0_UI11_DOMINANT_ROW_MAJOR = require( './fixtures/na2_nw2_icmax0_ui11_dominant_row_major.json' ); +var NA2_NW2_ICMAX1_COL_MAJOR = require( './fixtures/na2_nw2_icmax1_col_major.json' ); +var NA2_NW2_ICMAX1_ROW_MAJOR = require( './fixtures/na2_nw2_icmax1_row_major.json' ); +var NA2_NW2_ICMAX2_COL_MAJOR = require( './fixtures/na2_nw2_icmax2_col_major.json' ); +var NA2_NW2_ICMAX2_ROW_MAJOR = require( './fixtures/na2_nw2_icmax2_row_major.json' ); +var NA2_NW2_ICMAX3_COL_MAJOR = require( './fixtures/na2_nw2_icmax3_col_major.json' ); +var NA2_NW2_ICMAX3_ROW_MAJOR = require( './fixtures/na2_nw2_icmax3_row_major.json' ); +var NA2_NW2_POSTSCALED_ROW_MAJOR = require( './fixtures/na2_nw2_postscaled_row_major.json' ); +var NA2_NW2_SCALED_ROW_MAJOR = require( './fixtures/na2_nw2_scaled_row_major.json' ); +var NA2_NW2_TRANS_COL_MAJOR = require( './fixtures/na2_nw2_trans_col_major.json' ); +var NA2_NW2_TRANS_ROW_MAJOR = require( './fixtures/na2_nw2_trans_row_major.json' ); +var NA2_NW2_U22_PERTURBED_ROW_MAJOR = require( './fixtures/na2_nw2_u22_perturbed_row_major.json' ); +var LARGE_STRIDES_NA1_NW2_ROW_MAJOR = require( './fixtures/large_strides/na1_nw2_row_major.json' ); +var LARGE_STRIDES_NA2_NW1_ICMAX1_COL_MAJOR = require( './fixtures/large_strides/na2_nw1_icmax1_col_major.json' ); +var LARGE_STRIDES_NA2_NW2_ICMAX2_ROW_MAJOR = require( './fixtures/large_strides/na2_nw2_icmax2_row_major.json' ); +var MIXED_STRIDES_NA1_NW2_ROW_MAJOR = require( './fixtures/mixed_strides/na1_nw2_row_major.json' ); +var MIXED_STRIDES_NA2_NW1_ICMAX1_COL_MAJOR = require( './fixtures/mixed_strides/na2_nw1_icmax1_col_major.json' ); +var MIXED_STRIDES_NA2_NW2_ICMAX2_ROW_MAJOR = require( './fixtures/mixed_strides/na2_nw2_icmax2_row_major.json' ); +var NEGATIVE_STRIDES_NA1_NW2_ROW_MAJOR = require( './fixtures/negative_strides/na1_nw2_row_major.json' ); +var NEGATIVE_STRIDES_NA2_NW1_ICMAX1_COL_MAJOR = require( './fixtures/negative_strides/na2_nw1_icmax1_col_major.json' ); +var NEGATIVE_STRIDES_NA2_NW2_ICMAX2_ROW_MAJOR = require( './fixtures/negative_strides/na2_nw2_icmax2_row_major.json' ); +var OFFSETS_NA1_NW2_ROW_MAJOR = require( './fixtures/offsets/na1_nw2_row_major.json' ); +var OFFSETS_NA2_NW1_ICMAX1_COL_MAJOR = require( './fixtures/offsets/na2_nw1_icmax1_col_major.json' ); +var OFFSETS_NA2_NW2_ICMAX2_ROW_MAJOR = require( './fixtures/offsets/na2_nw2_icmax2_row_major.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof dlaln2, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 24', function test( t ) { + t.strictEqual( dlaln2.length, 24, 'returns expected value' ); + t.end(); +}); + +tape( 'the function throws an error if provided a first argument which is not a valid transpose operation', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 2.0 ] ); + X = new Float64Array( 2 ); + out = new Float64Array( 2 ); + + values = [ + 'foo', + 'bar', + 'beep', + 'boop', + -5, + NaN, + true, + false, + null, + void 0, + [], + {}, + function noop() {} + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( value, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); + }; + } +}); + +tape( 'the function throws an error if provided a second argument which is not either 1 or 2', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 2.0 ] ); + X = new Float64Array( 2 ); + out = new Float64Array( 2 ); + + values = [ + -2, + -1, + 0, + 3, + 4 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( 'no-transpose', value, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); + }; + } +}); + +tape( 'the function throws an error if provided a third argument which is not either 1 or 2', function test( t ) { + var values; + var out; + var A; + var B; + var X; + var i; + + A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); + B = new Float64Array( [ 1.0, 2.0 ] ); + X = new Float64Array( 2 ); + out = new Float64Array( 2 ); + + values = [ + -2, + -1, + 0, + 3, + 4 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dlaln2( 'no-transpose', 2, value, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); + }; + } +}); + +tape( 'the function solves a real 1x1 system (column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW1_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 1x1 system (perturbed, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW1_PERTURBED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 1x1 system (row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW1_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 1x1 system (scaled, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW1_SCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW2_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (perturbed, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW2_PERTURBED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (scaled, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA1_NW2_SCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (norm(C) < smin, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_CMAX_LT_SMIN_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C11, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX0_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C11, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX0_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C21, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX1_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C21, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX1_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C12, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX2_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C12, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C22, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX3_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C22, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_ICMAX3_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (scaled to avoid overflow, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_POSTSCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (scaled, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_SCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (transposed, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_TRANS_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (transposed, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_TRANS_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (perturbed pivot, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW1_U22_PERTURBED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (norm(C) < smin, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_CMAX_LT_SMIN_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C11, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX0_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C11, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX0_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C11, imaginary part dominant, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX0_UI11_DOMINANT_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C21, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX1_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C21, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX1_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C12, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX2_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C12, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C22, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX3_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C22, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_ICMAX3_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (scaled to avoid overflow, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_POSTSCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (scaled, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_SCALED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (transposed, column-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_TRANS_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (transposed, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_TRANS_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (perturbed pivot, row-major)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NA2_NW2_U22_PERTURBED_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (row-major, large strides)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = LARGE_STRIDES_NA1_NW2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C21, column-major, large strides)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = LARGE_STRIDES_NA2_NW1_ICMAX1_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, large strides)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = LARGE_STRIDES_NA2_NW2_ICMAX2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (row-major, mixed strides)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = MIXED_STRIDES_NA1_NW2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C21, column-major, mixed strides)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = MIXED_STRIDES_NA2_NW1_ICMAX1_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, mixed strides)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = MIXED_STRIDES_NA2_NW2_ICMAX2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (row-major, negative strides)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NEGATIVE_STRIDES_NA1_NW2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C21, column-major, negative strides)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NEGATIVE_STRIDES_NA2_NW1_ICMAX1_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, negative strides)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = NEGATIVE_STRIDES_NA2_NW2_ICMAX2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 1x1 system (row-major, offsets)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = OFFSETS_NA1_NW2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a real 2x2 system (pivot=C21, column-major, offsets)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = OFFSETS_NA2_NW1_ICMAX1_COL_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); + +tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, offsets)', function test( t ) { + var expectedOut; + var expectedX; + var data; + var info; + var out; + var A; + var B; + var X; + + data = OFFSETS_NA2_NW2_ICMAX2_ROW_MAJOR; + + A = new Float64Array( data.A ); + B = new Float64Array( data.B ); + X = new Float64Array( data.X ); + out = new Float64Array( data.out ); + + info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + expectedX = new Float64Array( data.X_out ); + expectedOut = new Float64Array( data.out_out ); + + t.strictEqual( info, data.info, 'returns expected value' ); + t.deepEqual( X, expectedX, 'returns expected value' ); + t.deepEqual( out, expectedOut, 'returns expected value' ); + t.end(); +}); From 391a0e89f5851a46e1338377ae069754bc2f3173 Mon Sep 17 00:00:00 2001 From: Ujjwal Verma Date: Mon, 14 Sep 2026 20:30:10 +0530 Subject: [PATCH 2/6] fix: address lint and example errors --- .../@stdlib/lapack/base/dlaln2/README.md | 4 ++ .../@stdlib/lapack/base/dlaln2/docs/repl.txt | 56 ++++++++++--------- .../lapack/base/dlaln2/docs/types/index.d.ts | 28 +++------- .../lapack/base/dlaln2/docs/types/test.ts | 8 --- .../@stdlib/lapack/base/dlaln2/lib/base.js | 7 +-- .../@stdlib/lapack/base/dlaln2/lib/dlaln2.js | 7 +-- .../@stdlib/lapack/base/dlaln2/lib/index.js | 14 ++--- .../@stdlib/lapack/base/dlaln2/lib/ndarray.js | 7 +-- 8 files changed, 51 insertions(+), 80 deletions(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md b/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md index b4b77e863108..144679c3d75d 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md @@ -62,6 +62,8 @@ This routine is used by [LAPACK][lapack] eigenvector routines (e.g., `dtrevc`) t var dlaln2 = require( '@stdlib/lapack/base/dlaln2' ); ``` + + #### dlaln2( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, X, LDX, out ) Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`. @@ -167,6 +169,8 @@ var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A1, 2, 1.0, 1 // out0 => [ 0.0, 1.0, ~1.391 ] ``` + + #### dlaln2.ndarray( trans, NA, NW, smin, ca, A, sa1, sa2, oa, d1, d2, B, sb1, sb2, ob, wr, wi, X, sx1, sx2, ox, out, so, oo ) Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A` using alternative indexing semantics. diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt index ede5316243d6..feb1b82fe6b0 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt @@ -1,5 +1,5 @@ -{{alias}}( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, X, LDX, out ) +{{alias}}(order,trans, NA,NW, smin,ca, A,LDA, d1,d2, B,LDB, wr,wi, X,LDX, out) Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`. @@ -94,7 +94,7 @@ > var out = new {{alias:@stdlib/array/float64}}( 2 ); > var ord = 'row-major'; > var tr = 'no-transpose'; - > {{alias}}( ord, tr, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ) + > {{alias}}(ord,tr, 2,1, 0.1,1.0, A,2, 1.0,1.0, B,1, 0.5,0.0, X,1, out) 0 > X [ ~-0.087, ~1.391 ] @@ -102,9 +102,9 @@ [ 1.0, ~1.391 ] -{{alias}}.ndarray( trans, NA, NW, smin, ca, A, sa1, sa2, oa, d1, d2, B, sb1, sb2, ob, wr, wi, X, sx1, sx2, ox, out, so, oo ) - Solves a system of the form `(ca*A - w*D) X = s*B` or - `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A` +{{alias}}.ndarray(t,n,m,s,c,A,a1,a2,oa,d,e,B,b1,b2,ob,wr,wi,X,x1,x2,ox,o,so,oo) + Solves a system of the form `(c*A - w*D) X = s*B` or + `(c*A^T - w*D) X = s*B` with possible scaling and perturbation of `A` using alternative indexing semantics. While typed array views mandate a view offset based on the underlying @@ -113,47 +113,47 @@ Parameters ---------- - trans: string + t: string Specifies whether `A` should be transposed. Must be either 'no-transpose' or 'transpose'. - NA: integer + n: integer Size of the matrix `A`. Must be either `1` or `2`. - NW: integer + m: integer `1` if `w` is real and `2` if `w` is complex. - smin: number + s: number Desired lower bound on the singular values of `A`. - ca: number + c: number Coefficient by which `A` is multiplied. A: Float64Array Input matrix. - sa1: integer + a1: integer Stride of the first dimension of `A`. - sa2: integer + a2: integer Stride of the second dimension of `A`. oa: integer Starting index for `A`. - d1: number + d: number First diagonal element of `D`. - d2: number - Second diagonal element of `D`. Not used if `NA = 1`. + e: number + Second diagonal element of `D`. Not used if `n = 1`. B: Float64Array Right-hand side matrix. - sb1: integer + b1: integer Stride of the first dimension of `B`. - sb2: integer + b2: integer Stride of the second dimension of `B`. ob: integer @@ -163,47 +163,49 @@ Real part of `w`. wi: number - Imaginary part of `w`. Not used if `NW = 1`. + Imaginary part of `w`. Not used if `m = 1`. X: Float64Array Output matrix. - sx1: integer + x1: integer Stride of the first dimension of `X`. - sx2: integer + x2: integer Stride of the second dimension of `X`. ox: integer Starting index for `X`. - out: Float64Array + o: Float64Array Two-element output array containing the scaling factor and the infinity-norm of `X`, respectively. so: integer - Stride length for `out`. + Stride length for `o`. oo: integer - Starting index for `out`. + Starting index for `o`. Returns ------- info: integer - Status code. `1` if `ca*A - w*D` had to be perturbed; `0` otherwise. + Status code. `1` if `c*A - w*D` had to be perturbed; `0` otherwise. Examples -------- > var A = new {{alias:@stdlib/array/float64}}( [ 5.0, 1.0, 1.0, 2.0 ] ); > var B = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0 ] ); > var X = new {{alias:@stdlib/array/float64}}( 2 ); - > var out = new {{alias:@stdlib/array/float64}}( 2 ); + > var o = new {{alias:@stdlib/array/float64}}( 2 ); > var tr = 'no-transpose'; - > {{alias}}.ndarray( tr, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ) + > var d = 1.0; + > var w = 0.5; + > {{alias}}.ndarray(tr,2,1,0.1,1.0,A,1,2,0,d,d,B,1,2,0,w,0.0,X,1,2,0,o,1,0) 0 > X [ ~-0.087, ~1.391 ] - > out + > o [ 1.0, ~1.391 ] See Also diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts index a491a5783a22..2500663fa5b4 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts @@ -66,11 +66,8 @@ interface Routine { * var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); * // returns 0 * - * var s = out[ 0 ]; - * // returns 1.0 - * - * var xnorm = out[ 1 ]; - * // returns ~1.3913 + * // X => [ ~-0.087, ~1.391 ] + * // out => [ 1.0, ~1.391 ] */ ( order: Layout, trans: TransposeOperation, NA: number, NW: number, smin: number, ca: number, A: Float64Array, lda: number, d1: number, d2: number, B: Float64Array, ldb: number, wr: number, wi: number, X: Float64Array, ldx: number, out: Float64Array ): number; @@ -121,11 +118,8 @@ interface Routine { * var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); * // returns 0 * - * var s = out[ 0 ]; - * // returns 1.0 - * - * var xnorm = out[ 1 ]; - * // returns ~1.3913 + * // X => [ ~-0.087, ~1.391 ] + * // out => [ 1.0, ~1.391 ] */ ndarray( trans: TransposeOperation, NA: number, NW: number, smin: number, ca: number, A: Float64Array, strideA1: number, strideA2: number, offsetA: number, d1: number, d2: number, B: Float64Array, strideB1: number, strideB2: number, offsetB: number, wr: number, wi: number, X: Float64Array, strideX1: number, strideX2: number, offsetX: number, out: Float64Array, strideOut: number, offsetOut: number ): number; } @@ -170,11 +164,8 @@ interface Routine { * var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); * // returns 0 * -* var s = out[ 0 ]; -* // returns 1.0 -* -* var xnorm = out[ 1 ]; -* // returns ~1.3913 +* // X => [ ~-0.087, ~1.391 ] +* // out => [ 1.0, ~1.391 ] * * @example * var Float64Array = require( '@stdlib/array/float64' ); @@ -187,11 +178,8 @@ interface Routine { * var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); * // returns 0 * -* var s = out[ 0 ]; -* // returns 1.0 -* -* var xnorm = out[ 1 ]; -* // returns ~1.3913 +* // X => [ ~-0.087, ~1.391 ] +* // out => [ 1.0, ~1.391 ] */ declare var dlaln2: Routine; diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts index a2135b7ef53e..3590d108d50a 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts @@ -128,7 +128,6 @@ import dlaln2 = require( './index' ); // The compiler throws an error if the function is provided a seventh argument which is not a Float64Array... { - const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); const out = new Float64Array( 2 ); @@ -194,7 +193,6 @@ import dlaln2 = require( './index' ); // The compiler throws an error if the function is provided an eleventh argument which is not a Float64Array... { const A = new Float64Array( 4 ); - const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); const out = new Float64Array( 2 ); dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, '5', 1, 0.5, 0.0, X, 1, out ); // $ExpectError @@ -260,7 +258,6 @@ import dlaln2 = require( './index' ); { const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); - const X = new Float64Array( 2 ); const out = new Float64Array( 2 ); dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, '5', 1, out ); // $ExpectError dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, 5, 1, out ); // $ExpectError @@ -294,7 +291,6 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, '5' ); // $ExpectError dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, 5 ); // $ExpectError dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, true ); // $ExpectError @@ -423,7 +419,6 @@ import dlaln2 = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a Float64Array... { - const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); const out = new Float64Array( 2 ); @@ -521,7 +516,6 @@ import dlaln2 = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a twelfth argument which is not a Float64Array... { const A = new Float64Array( 4 ); - const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); const out = new Float64Array( 2 ); dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, '5', 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError @@ -619,7 +613,6 @@ import dlaln2 = require( './index' ); { const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); - const X = new Float64Array( 2 ); const out = new Float64Array( 2 ); dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, '5', 1, 2, 0, out, 1, 0 ); // $ExpectError dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, 5, 1, 2, 0, out, 1, 0 ); // $ExpectError @@ -685,7 +678,6 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, '5', 1, 0 ); // $ExpectError dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, 5, 1, 0 ); // $ExpectError dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, true, 1, 0 ); // $ExpectError diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js index d442843a22a1..0d9d3f0e7854 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js @@ -117,11 +117,8 @@ function isTransposed( str ) { * var info = dlaln2( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); * // returns 0 * -* var s = out[ 0 ]; -* // returns 1.0 -* -* var xnorm = out[ 1 ]; -* // returns ~1.3913 +* // X => [ ~-0.087, ~1.391 ] +* // out => [ 1.0, ~1.391 ] */ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, out, strideOut, offsetOut ) { // eslint-disable-line max-len, max-params var u22abs; diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js index 995697574153..87b0a8cc1670 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js @@ -80,11 +80,8 @@ var base = require( './base.js' ); * var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); * // returns 0 * -* var s = out[ 0 ]; -* // returns 1.0 -* -* var xnorm = out[ 1 ]; -* // returns ~1.3913 +* // X => [ ~-0.087, ~1.391 ] +* // out => [ 1.0, ~1.391 ] */ function dlaln2( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, X, LDX, out ) { // eslint-disable-line max-params var sa1; diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js index cef793793fdf..892588296d4c 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js @@ -35,11 +35,8 @@ * var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); * // returns 0 * -* var s = out[ 0 ]; -* // returns 1.0 -* -* var xnorm = out[ 1 ]; -* // returns ~1.3913 +* // X => [ ~-0.087, ~1.391 ] +* // out => [ 1.0, ~1.391 ] * * @example * var Float64Array = require( '@stdlib/array/float64' ); @@ -53,11 +50,8 @@ * var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); * // returns 0 * -* var s = out[ 0 ]; -* // returns 1.0 -* -* var xnorm = out[ 1 ]; -* // returns ~1.3913 +* // X => [ ~-0.087, ~1.391 ] +* // out => [ 1.0, ~1.391 ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js index 9857b8e5ebd1..1f3420325582 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js @@ -81,11 +81,8 @@ var base = require( './base.js' ); * var info = dlaln2( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); * // returns 0 * -* var s = out[ 0 ]; -* // returns 1.0 -* -* var xnorm = out[ 1 ]; -* // returns ~1.3913 +* // X => [ ~-0.087, ~1.391 ] +* // out => [ 1.0, ~1.391 ] */ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, out, strideOut, offsetOut ) { // eslint-disable-line max-params if ( !isTransposeOperation( trans ) ) { From 81dc366d7927e86c7fbfbb3b994f5b4bccc289ca Mon Sep 17 00:00:00 2001 From: Ujjwal Verma Date: Mon, 14 Sep 2026 20:34:24 +0530 Subject: [PATCH 3/6] fix: apply suggestion Signed-off-by: Ujjwal Verma --- lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js index 4a29ec8bbb5b..b7054d578e4a 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js @@ -16,7 +16,6 @@ * limitations under the License. */ - /* eslint-disable max-len, id-length */ 'use strict'; From b51b46a57e2b71ff3cbdaaa9350dd6526d37b873 Mon Sep 17 00:00:00 2001 From: Ujjwal Verma Date: Mon, 14 Sep 2026 20:40:45 +0530 Subject: [PATCH 4/6] fix: apply suggestion Signed-off-by: Ujjwal Verma --- lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js index 1409903592a0..a201ad5f0a35 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js @@ -16,7 +16,6 @@ * limitations under the License. */ - /* eslint-disable max-len, id-length */ 'use strict'; From ce91430d86031b045f0b40e96e3e220f1d71d75a Mon Sep 17 00:00:00 2001 From: Ujjwal Verma Date: Mon, 14 Sep 2026 20:47:22 +0530 Subject: [PATCH 5/6] fix: order variable declarations by length --- .../lapack/base/dlaln2/benchmark/benchmark.js | 13 +++++++++---- .../base/dlaln2/benchmark/benchmark.ndarray.js | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js index f9f69369eaea..66e5761a6120 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js @@ -58,11 +58,16 @@ var opts = { * @returns {Function} benchmark function */ function createBenchmark( order, NA, NW ) { - var out = new Float64Array( 2 ); - var A = uniform( NA*NA, 1.0, 10.0, opts ); - var B = uniform( NA*NW, 1.0, 10.0, opts ); - var X = new Float64Array( NA*NW ); + var out; var ld; + var A; + var B; + var X; + + out = new Float64Array( 2 ); + A = uniform( NA*NA, 1.0, 10.0, opts ); + B = uniform( NA*NW, 1.0, 10.0, opts ); + X = new Float64Array( NA*NW ); if ( order === 'row-major' ) { ld = NW; } else { diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js index 2e5654f89951..edc8bb530271 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js @@ -58,14 +58,19 @@ var opts = { * @returns {Function} benchmark function */ function createBenchmark( order, NA, NW ) { - var out = new Float64Array( 2 ); - var A = uniform( NA*NA, 1.0, 10.0, opts ); - var B = uniform( NA*NW, 1.0, 10.0, opts ); - var X = new Float64Array( NA*NW ); + var out; var sa1; var sa2; var sb1; var sb2; + var A; + var B; + var X; + + out = new Float64Array( 2 ); + A = uniform( NA*NA, 1.0, 10.0, opts ); + B = uniform( NA*NW, 1.0, 10.0, opts ); + X = new Float64Array( NA*NW ); if ( order === 'row-major' ) { sa1 = NA; sa2 = 1; From a702b3252f1f9566bdbb4839f9224589b48ad4f1 Mon Sep 17 00:00:00 2001 From: Ujjwal Verma Date: Wed, 16 Sep 2026 09:44:55 +0530 Subject: [PATCH 6/6] refactor: write scale, xnorm, and info to separate output arrays --- .../@stdlib/lapack/base/dlaln2/README.md | 120 +- .../lapack/base/dlaln2/benchmark/benchmark.js | 15 +- .../dlaln2/benchmark/benchmark.ndarray.js | 15 +- .../@stdlib/lapack/base/dlaln2/docs/repl.txt | 115 +- .../lapack/base/dlaln2/docs/types/index.d.ts | 88 +- .../lapack/base/dlaln2/docs/types/test.ts | 961 ++++++++------ .../lapack/base/dlaln2/examples/index.js | 14 +- .../@stdlib/lapack/base/dlaln2/lib/base.js | 149 ++- .../@stdlib/lapack/base/dlaln2/lib/dlaln2.js | 26 +- .../@stdlib/lapack/base/dlaln2/lib/index.js | 26 +- .../@stdlib/lapack/base/dlaln2/lib/ndarray.js | 31 +- .../large_strides/na1_nw2_row_major.json | 32 +- .../na2_nw1_icmax1_col_major.json | 32 +- .../na2_nw2_icmax2_row_major.json | 32 +- .../mixed_strides/na1_nw2_row_major.json | 24 +- .../na2_nw1_icmax1_col_major.json | 24 +- .../na2_nw2_icmax2_row_major.json | 24 +- .../test/fixtures/na1_nw1_col_major.json | 24 +- .../fixtures/na1_nw1_perturbed_row_major.json | 24 +- .../test/fixtures/na1_nw1_row_major.json | 24 +- .../fixtures/na1_nw1_scaled_row_major.json | 24 +- .../test/fixtures/na1_nw2_col_major.json | 24 +- .../fixtures/na1_nw2_perturbed_row_major.json | 24 +- .../test/fixtures/na1_nw2_row_major.json | 24 +- .../fixtures/na1_nw2_scaled_row_major.json | 24 +- .../na2_nw1_cmax_lt_smin_row_major.json | 24 +- .../fixtures/na2_nw1_icmax0_col_major.json | 24 +- .../fixtures/na2_nw1_icmax0_row_major.json | 24 +- .../fixtures/na2_nw1_icmax1_col_major.json | 24 +- .../fixtures/na2_nw1_icmax1_row_major.json | 24 +- .../fixtures/na2_nw1_icmax2_col_major.json | 24 +- .../fixtures/na2_nw1_icmax2_row_major.json | 24 +- .../fixtures/na2_nw1_icmax3_col_major.json | 24 +- .../fixtures/na2_nw1_icmax3_row_major.json | 24 +- .../na2_nw1_postscaled_row_major.json | 24 +- .../fixtures/na2_nw1_scaled_row_major.json | 24 +- .../fixtures/na2_nw1_trans_col_major.json | 24 +- .../fixtures/na2_nw1_trans_row_major.json | 24 +- .../na2_nw1_u22_perturbed_row_major.json | 24 +- .../na2_nw2_cmax_lt_smin_row_major.json | 24 +- .../fixtures/na2_nw2_icmax0_col_major.json | 24 +- .../fixtures/na2_nw2_icmax0_row_major.json | 24 +- ...a2_nw2_icmax0_ui11_dominant_row_major.json | 24 +- .../fixtures/na2_nw2_icmax1_col_major.json | 24 +- .../fixtures/na2_nw2_icmax1_row_major.json | 24 +- .../fixtures/na2_nw2_icmax2_col_major.json | 24 +- .../fixtures/na2_nw2_icmax2_row_major.json | 24 +- .../fixtures/na2_nw2_icmax3_col_major.json | 24 +- .../fixtures/na2_nw2_icmax3_row_major.json | 24 +- .../na2_nw2_postscaled_row_major.json | 24 +- .../fixtures/na2_nw2_scaled_row_major.json | 24 +- .../fixtures/na2_nw2_trans_col_major.json | 24 +- .../fixtures/na2_nw2_trans_row_major.json | 24 +- .../na2_nw2_u22_perturbed_row_major.json | 24 +- .../negative_strides/na1_nw2_row_major.json | 24 +- .../na2_nw1_icmax1_col_major.json | 24 +- .../na2_nw2_icmax2_row_major.json | 24 +- .../fixtures/offsets/na1_nw2_row_major.json | 30 +- .../offsets/na2_nw1_icmax1_col_major.json | 30 +- .../offsets/na2_nw2_icmax2_row_major.json | 30 +- .../lapack/base/dlaln2/test/test.dlaln2.js | 909 ++++++++++---- .../lapack/base/dlaln2/test/test.ndarray.js | 1113 ++++++++++++----- 62 files changed, 3249 insertions(+), 1551 deletions(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md b/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md index 144679c3d75d..8f8a4e6df2f4 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/README.md @@ -64,7 +64,7 @@ var dlaln2 = require( '@stdlib/lapack/base/dlaln2' ); -#### dlaln2( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, X, LDX, out ) +#### dlaln2( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, X, LDX, scale, xnorm, info ) Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`. @@ -72,17 +72,20 @@ Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` w ```javascript var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); var B = new Float64Array( [ 1.0, 2.0 ] ); var X = new Float64Array( 2 ); -var out = new Float64Array( 2 ); - -var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); -// returns 0 +var scale = new Float64Array( 1 ); +var xnorm = new Float64Array( 1 ); +var info = new Int32Array( 1 ); +dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // X => [ ~-0.087, ~1.391 ] -// out => [ 1.0, ~1.391 ] +// scale => [ 1.0 ] +// xnorm => [ ~1.391 ] +// info => [ 0 ] ``` The function has the following parameters: @@ -103,25 +106,29 @@ The function has the following parameters: - **wi**: imaginary part of `w`. Not used if `NW = 1`. - **X**: output matrix stored in linear memory as a [`Float64Array`][mdn-float64array]. - **LDX**: stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`). Must be at least `NW` when `order` is `'row-major'` and at least `NA` when `order` is `'column-major'`. -- **out**: two-element output [`Float64Array`][mdn-float64array] containing the scaling factor `s` and the infinity-norm of `X`, respectively. +- **scale**: [`Float64Array`][mdn-float64array] containing a single element which is overwritten by the scaling factor `s`. +- **xnorm**: [`Float64Array`][mdn-float64array] containing a single element which is overwritten by the infinity-norm of `X`. +- **info**: [`Int32Array`][mdn-int32array] containing a single element which is overwritten by a status code. -If `ca*A - w*D` is nearly singular, the function perturbs it and returns a non-zero status code. +If `ca*A - w*D` is nearly singular, the function perturbs it and sets the status code to `1`. ```javascript var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); // A singular matrix: var A = new Float64Array( [ 1.0, 2.0, 2.0, 4.0 ] ); var B = new Float64Array( [ 1.0, 2.0 ] ); var X = new Float64Array( 2 ); -var out = new Float64Array( 2 ); - -var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.0, 0.0, X, 1, out ); -// returns 1 +var scale = new Float64Array( 1 ); +var xnorm = new Float64Array( 1 ); +var info = new Int32Array( 1 ); +dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.0, 0.0, X, 1, scale, xnorm, info ); // X => [ 0.0, 0.5 ] +// info => [ 1 ] ``` When `w` is complex (`NW = 2`), the columns of `B` and `X` hold the real and imaginary parts, respectively. @@ -130,17 +137,20 @@ When `w` is complex (`NW = 2`), the columns of `B` and `X` hold the real and ima ```javascript var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); var B = new Float64Array( [ 1.0, 3.0, 2.0, 4.0 ] ); var X = new Float64Array( 4 ); -var out = new Float64Array( 2 ); - -var info = dlaln2( 'row-major', 'no-transpose', 2, 2, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 2, 0.5, 0.5, X, 2, out ); -// returns 0 +var scale = new Float64Array( 1 ); +var xnorm = new Float64Array( 1 ); +var info = new Int32Array( 1 ); +dlaln2( 'row-major', 'no-transpose', 2, 2, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 2, 0.5, 0.5, X, 2, scale, xnorm, info ); // X => [ ~0.14, ~0.076, ~0.331, ~2.726 ] -// out => [ 1.0, ~3.057 ] +// scale => [ 1.0 ] +// xnorm => [ ~3.057 ] +// info => [ 0 ] ``` Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views. @@ -149,29 +159,34 @@ Note that indexing is relative to the first index. To introduce an offset, use [ ```javascript var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); // Initial arrays... var A0 = new Float64Array( [ 0.0, 5.0, 1.0, 1.0, 2.0 ] ); var B0 = new Float64Array( [ 0.0, 1.0, 2.0 ] ); var X0 = new Float64Array( 3 ); -var out0 = new Float64Array( 3 ); +var scale0 = new Float64Array( 2 ); +var xnorm0 = new Float64Array( 2 ); +var info0 = new Int32Array( 2 ); // Create offset views... var A1 = new Float64Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 ); // start at 2nd element var B1 = new Float64Array( B0.buffer, B0.BYTES_PER_ELEMENT*1 ); // start at 2nd element var X1 = new Float64Array( X0.buffer, X0.BYTES_PER_ELEMENT*1 ); // start at 2nd element -var out1 = new Float64Array( out0.buffer, out0.BYTES_PER_ELEMENT*1 ); // start at 2nd element - -var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A1, 2, 1.0, 1.0, B1, 1, 0.5, 0.0, X1, 1, out1 ); -// returns 0 +var scale1 = new Float64Array( scale0.buffer, scale0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var xnorm1 = new Float64Array( xnorm0.buffer, xnorm0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var info1 = new Int32Array( info0.buffer, info0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A1, 2, 1.0, 1.0, B1, 1, 0.5, 0.0, X1, 1, scale1, xnorm1, info1 ); // X0 => [ 0.0, ~-0.087, ~1.391 ] -// out0 => [ 0.0, 1.0, ~1.391 ] +// scale0 => [ 0.0, 1.0 ] +// xnorm0 => [ 0.0, ~1.391 ] +// info0 => [ 0, 0 ] ``` -#### dlaln2.ndarray( trans, NA, NW, smin, ca, A, sa1, sa2, oa, d1, d2, B, sb1, sb2, ob, wr, wi, X, sx1, sx2, ox, out, so, oo ) +#### dlaln2.ndarray( trans, NA, NW, smin, ca, A, sa1, sa2, oa, d1, d2, B, sb1, sb2, ob, wr, wi, X, sx1, sx2, ox, scale, os, xnorm, on, info, oi ) Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A` using alternative indexing semantics. @@ -179,17 +194,20 @@ Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` w ```javascript var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); var B = new Float64Array( [ 1.0, 2.0 ] ); var X = new Float64Array( 2 ); -var out = new Float64Array( 2 ); - -var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); -// returns 0 +var scale = new Float64Array( 1 ); +var xnorm = new Float64Array( 1 ); +var info = new Int32Array( 1 ); +dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // X => [ ~-0.087, ~1.391 ] -// out => [ 1.0, ~1.391 ] +// scale => [ 1.0 ] +// xnorm => [ ~1.391 ] +// info => [ 0 ] ``` The function has the following parameters: @@ -215,9 +233,12 @@ The function has the following parameters: - **sx1**: stride of the first dimension of `X`. - **sx2**: stride of the second dimension of `X`. - **ox**: starting index for `X`. -- **out**: two-element output [`Float64Array`][mdn-float64array] containing the scaling factor `s` and the infinity-norm of `X`, respectively. -- **so**: stride length for `out`. -- **oo**: starting index for `out`. +- **scale**: [`Float64Array`][mdn-float64array] containing an element which is overwritten by the scaling factor `s`. +- **os**: index of the element in `scale`. +- **xnorm**: [`Float64Array`][mdn-float64array] containing an element which is overwritten by the infinity-norm of `X`. +- **on**: index of the element in `xnorm`. +- **info**: [`Int32Array`][mdn-int32array] containing an element which is overwritten by a status code. +- **oi**: index of the element in `info`. While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, @@ -225,17 +246,20 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the ```javascript var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); var A = new Float64Array( [ 0.0, 0.0, 5.0, 1.0, 1.0, 2.0 ] ); var B = new Float64Array( [ 0.0, 0.0, 1.0, 2.0 ] ); var X = new Float64Array( 4 ); -var out = new Float64Array( 4 ); - -var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1, 2, 1.0, 1.0, B, 1, 2, 2, 0.5, 0.0, X, 1, 2, 2, out, 1, 2 ); -// returns 0 +var scale = new Float64Array( 2 ); +var xnorm = new Float64Array( 2 ); +var info = new Int32Array( 2 ); +dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1, 2, 1.0, 1.0, B, 1, 2, 2, 0.5, 0.0, X, 1, 2, 2, scale, 1, xnorm, 1, info, 1 ); // X => [ 0.0, 0.0, ~-0.087, ~1.391 ] -// out => [ 0.0, 0.0, 1.0, ~1.391 ] +// scale => [ 0.0, 1.0 ] +// xnorm => [ 0.0, ~1.391 ] +// info => [ 0, 0 ] ``` @@ -246,9 +270,11 @@ var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1, 2, 1.0, 1 ## Notes -- Both functions overwrite `X` and `out`. +- Both functions overwrite `X`, `scale`, `xnorm`, and `info`. + +- Both functions return `X`. -- Both functions return a status code indicating whether `ca*A - w*D` had to be perturbed. A status code indicates the following conditions: +- The status code written to `info` indicates whether `ca*A - w*D` had to be perturbed. A status code indicates the following conditions: - `0`: no perturbation was necessary. - `1`: `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin`. @@ -269,6 +295,7 @@ var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1, 2, 1.0, 1 ```javascript var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); var ndarray2array = require( '@stdlib/ndarray/base/to-array' ); var shape2strides = require( '@stdlib/ndarray/base/shape2strides' ); var dlaln2 = require( '@stdlib/lapack/base/dlaln2' ); @@ -286,15 +313,18 @@ console.log( ndarray2array( A, shape, strides, 0, order ) ); var B = new Float64Array( [ 1.0, 3.0, 2.0, 4.0 ] ); console.log( ndarray2array( B, shape, strides, 0, order ) ); -// Allocate an output matrix `X` and an output array for the scaling factor and the infinity-norm of `X`: +// Allocate an output matrix `X` and output arrays for the scaling factor, the infinity-norm of `X`, and the status code: var X = new Float64Array( 4 ); -var out = new Float64Array( 2 ); +var scale = new Float64Array( 1 ); +var xnorm = new Float64Array( 1 ); +var info = new Int32Array( 1 ); // Solve (A - (0.5 + 0.5i) I) X = s B: -var info = dlaln2( order, 'no-transpose', 2, 2, 1.0e-3, 1.0, A, strides[ 0 ], 1.0, 1.0, B, strides[ 0 ], 0.5, 0.5, X, strides[ 0 ], out ); -console.log( info ); +dlaln2( order, 'no-transpose', 2, 2, 1.0e-3, 1.0, A, strides[ 0 ], 1.0, 1.0, B, strides[ 0 ], 0.5, 0.5, X, strides[ 0 ], scale, xnorm, info ); console.log( ndarray2array( X, shape, strides, 0, order ) ); -console.log( out ); +console.log( scale ); +console.log( xnorm ); +console.log( info ); ``` @@ -389,6 +419,8 @@ TODO [mdn-float64array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array +[mdn-int32array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array + [mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js index 66e5761a6120..c8fa81f064e2 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var uniform = require( '@stdlib/random/array/uniform' ); var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; @@ -58,13 +59,17 @@ var opts = { * @returns {Function} benchmark function */ function createBenchmark( order, NA, NW ) { - var out; + var scale; + var xnorm; + var info; var ld; var A; var B; var X; - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); A = uniform( NA*NA, 1.0, 10.0, opts ); B = uniform( NA*NW, 1.0, 10.0, opts ); X = new Float64Array( NA*NW ); @@ -87,13 +92,13 @@ function createBenchmark( order, NA, NW ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - z = dlaln2( order, 'no-transpose', NA, NW, 1.0e-3, 1.0, A, NA, 1.0, 1.0, B, ld, 0.5, 0.5, X, ld, out ); - if ( isnan( z ) ) { + z = dlaln2( order, 'no-transpose', NA, NW, 1.0e-3, 1.0, A, NA, 1.0, 1.0, B, ld, 0.5, 0.5, X, ld, scale, xnorm, info ); + if ( isnan( z[ 0 ] ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnan( out[ 1 ] ) ) { + if ( isnan( xnorm[ 0 ] ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js index edc8bb530271..c187c2230dd5 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/benchmark/benchmark.ndarray.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var uniform = require( '@stdlib/random/array/uniform' ); var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; @@ -58,7 +59,9 @@ var opts = { * @returns {Function} benchmark function */ function createBenchmark( order, NA, NW ) { - var out; + var scale; + var xnorm; + var info; var sa1; var sa2; var sb1; @@ -67,7 +70,9 @@ function createBenchmark( order, NA, NW ) { var B; var X; - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); A = uniform( NA*NA, 1.0, 10.0, opts ); B = uniform( NA*NW, 1.0, 10.0, opts ); X = new Float64Array( NA*NW ); @@ -96,13 +101,13 @@ function createBenchmark( order, NA, NW ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - z = dlaln2( 'no-transpose', NA, NW, 1.0e-3, 1.0, A, sa1, sa2, 0, 1.0, 1.0, B, sb1, sb2, 0, 0.5, 0.5, X, sb1, sb2, 0, out, 1, 0 ); - if ( isnan( z ) ) { + z = dlaln2( 'no-transpose', NA, NW, 1.0e-3, 1.0, A, sa1, sa2, 0, 1.0, 1.0, B, sb1, sb2, 0, 0.5, 0.5, X, sb1, sb2, 0, scale, 0, xnorm, 0, info, 0 ); + if ( isnan( z[ 0 ] ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnan( out[ 1 ] ) ) { + if ( isnan( xnorm[ 0 ] ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt index feb1b82fe6b0..c1b7c436fc31 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/repl.txt @@ -1,5 +1,5 @@ -{{alias}}(order,trans, NA,NW, smin,ca, A,LDA, d1,d2, B,LDB, wr,wi, X,LDX, out) +{{alias}}(ord,tr,NA,NW,smin,ca,A,LDA,d1,d2,B,LDB,wr,wi,X,LDX,scale,xnorm,info) Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A`. @@ -15,18 +15,17 @@ overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. - The function writes the scaling factor `s` and the infinity-norm of `X` to - the first and second elements of `out`, respectively. - - The function returns `1` if `ca*A - w*D` had to be perturbed to make its - smallest (or only) singular value greater than `smin` and `0` otherwise. + The function writes the scaling factor `s` to `scale`, the infinity-norm of + `X` to `xnorm`, and a status code to `info`. The status code is `1` if + `ca*A - w*D` had to be perturbed to make its smallest (or only) singular + value greater than `smin` and `0` otherwise. Parameters ---------- - order: string + ord: string Storage layout. Must be either 'row-major' or 'column-major'. - trans: string + tr: string Specifies whether `A` should be transposed. Must be either 'no-transpose' or 'transpose'. @@ -60,8 +59,8 @@ LDB: integer Stride of the first dimension of `B` (a.k.a., leading dimension of the - matrix `B`). Must be at least `NW` when `order` is `'row-major'` and at - least `NA` when `order` is `'column-major'`. + matrix `B`). Must be at least `NW` when `ord` is `'row-major'` and at + least `NA` when `ord` is `'column-major'`. wr: number Real part of `w`. @@ -74,35 +73,47 @@ LDX: integer Stride of the first dimension of `X` (a.k.a., leading dimension of the - matrix `X`). Must be at least `NW` when `order` is `'row-major'` and at - least `NA` when `order` is `'column-major'`. + matrix `X`). Must be at least `NW` when `ord` is `'row-major'` and at + least `NA` when `ord` is `'column-major'`. + + scale: Float64Array + Array containing a single element which is overwritten by the scaling + factor. - out: Float64Array - Two-element output array containing the scaling factor and the - infinity-norm of `X`, respectively. + xnorm: Float64Array + Array containing a single element which is overwritten by the + infinity-norm of `X`. + + info: Int32Array + Array containing a single element which is overwritten by the status + code. Returns ------- - info: integer - Status code. `1` if `ca*A - w*D` had to be perturbed; `0` otherwise. + X: Float64Array + Output matrix. Examples -------- > var A = new {{alias:@stdlib/array/float64}}( [ 5.0, 1.0, 1.0, 2.0 ] ); > var B = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0 ] ); > var X = new {{alias:@stdlib/array/float64}}( 2 ); - > var out = new {{alias:@stdlib/array/float64}}( 2 ); + > var sc = new {{alias:@stdlib/array/float64}}( 1 ); + > var xn = new {{alias:@stdlib/array/float64}}( 1 ); + > var info = new {{alias:@stdlib/array/int32}}( 1 ); > var ord = 'row-major'; > var tr = 'no-transpose'; - > {{alias}}(ord,tr, 2,1, 0.1,1.0, A,2, 1.0,1.0, B,1, 0.5,0.0, X,1, out) - 0 - > X + > {{alias}}(ord,tr,2,1,0.1,1.0,A,2,1.0,1.0,B,1,0.5,0.0,X,1,sc,xn,info) [ ~-0.087, ~1.391 ] - > out - [ 1.0, ~1.391 ] + > sc + [ 1.0 ] + > xn + [ ~1.391 ] + > info + [ 0 ] -{{alias}}.ndarray(t,n,m,s,c,A,a1,a2,oa,d,e,B,b1,b2,ob,wr,wi,X,x1,x2,ox,o,so,oo) +{{alias}}.ndarray(t,n,m,s,c,A,a1,a2,f,d,e,B,b1,b2,g,r,i,X,x1,x2,h,S,j,N,k,I,l) Solves a system of the form `(c*A - w*D) X = s*B` or `(c*A^T - w*D) X = s*B` with possible scaling and perturbation of `A` using alternative indexing semantics. @@ -138,7 +149,7 @@ a2: integer Stride of the second dimension of `A`. - oa: integer + f: integer Starting index for `A`. d: number @@ -156,13 +167,13 @@ b2: integer Stride of the second dimension of `B`. - ob: integer + g: integer Starting index for `B`. - wr: number + r: number Real part of `w`. - wi: number + i: number Imaginary part of `w`. Not used if `m = 1`. X: Float64Array @@ -174,39 +185,53 @@ x2: integer Stride of the second dimension of `X`. - ox: integer + h: integer Starting index for `X`. - o: Float64Array - Two-element output array containing the scaling factor and the - infinity-norm of `X`, respectively. + S: Float64Array + Array containing an element which is overwritten by the scaling factor. - so: integer - Stride length for `o`. + j: integer + Index of the element in `S`. - oo: integer - Starting index for `o`. + N: Float64Array + Array containing an element which is overwritten by the infinity-norm + of `X`. + + k: integer + Index of the element in `N`. + + I: Int32Array + Array containing an element which is overwritten by the status code. + + l: integer + Index of the element in `I`. Returns ------- - info: integer - Status code. `1` if `c*A - w*D` had to be perturbed; `0` otherwise. + X: Float64Array + Output matrix. Examples -------- > var A = new {{alias:@stdlib/array/float64}}( [ 5.0, 1.0, 1.0, 2.0 ] ); > var B = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0 ] ); > var X = new {{alias:@stdlib/array/float64}}( 2 ); - > var o = new {{alias:@stdlib/array/float64}}( 2 ); - > var tr = 'no-transpose'; + > var S = new {{alias:@stdlib/array/float64}}( 1 ); + > var N = new {{alias:@stdlib/array/float64}}( 1 ); + > var I = new {{alias:@stdlib/array/int32}}( 1 ); + > var t = 'no-transpose'; + > var s = 0.1; > var d = 1.0; > var w = 0.5; - > {{alias}}.ndarray(tr,2,1,0.1,1.0,A,1,2,0,d,d,B,1,2,0,w,0.0,X,1,2,0,o,1,0) - 0 - > X + > {{alias}}.ndarray(t,2,1,s,d,A,1,2,0,d,d,B,1,2,0,w,0.0,X,1,2,0,S,0,N,0,I,0) [ ~-0.087, ~1.391 ] - > o - [ 1.0, ~1.391 ] + > S + [ 1.0 ] + > N + [ ~1.391 ] + > I + [ 0 ] See Also -------- diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts index 2500663fa5b4..58e42d33a285 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/index.d.ts @@ -33,8 +33,7 @@ interface Routine { * * - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. * - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. - * - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. - * - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. + * - The function writes the scaling factor `s` to `scale`, the infinity-norm of `X` to `xnorm`, and a status code to `info`. The status code is `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. * * @param order - storage layout * @param trans - specifies whether `A` should be transposed @@ -52,24 +51,29 @@ interface Routine { * @param wi - imaginary part of `w` (not used if `NW = 1`) * @param X - output matrix * @param ldx - stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`) - * @param out - output array containing the scaling factor and the infinity-norm of `X` - * @returns status code + * @param scale - array containing a single element which is overwritten by the scaling factor + * @param xnorm - array containing a single element which is overwritten by the infinity-norm of `X` + * @param info - array containing a single element which is overwritten by the status code + * @returns `X` * * @example * var Float64Array = require( '@stdlib/array/float64' ); + * var Int32Array = require( '@stdlib/array/int32' ); * * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); * var B = new Float64Array( [ 1.0, 2.0 ] ); * var X = new Float64Array( 2 ); - * var out = new Float64Array( 2 ); - * - * var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); - * // returns 0 + * var scale = new Float64Array( 1 ); + * var xnorm = new Float64Array( 1 ); + * var info = new Int32Array( 1 ); * + * dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); * // X => [ ~-0.087, ~1.391 ] - * // out => [ 1.0, ~1.391 ] + * // scale => [ 1.0 ] + * // xnorm => [ ~1.391 ] + * // info => [ 0 ] */ - ( order: Layout, trans: TransposeOperation, NA: number, NW: number, smin: number, ca: number, A: Float64Array, lda: number, d1: number, d2: number, B: Float64Array, ldb: number, wr: number, wi: number, X: Float64Array, ldx: number, out: Float64Array ): number; + ( order: Layout, trans: TransposeOperation, NA: number, NW: number, smin: number, ca: number, A: Float64Array, lda: number, d1: number, d2: number, B: Float64Array, ldb: number, wr: number, wi: number, X: Float64Array, ldx: number, scale: Float64Array, xnorm: Float64Array, info: Int32Array ): Float64Array; /** * Solves a system of the form `(ca*A - w*D) X = s*B` or `(ca*A^T - w*D) X = s*B` with possible scaling and perturbation of `A` using alternative indexing semantics, where `A` is an `NA` by `NA` real matrix (`NA` is 1 or 2), `ca` is a real scalar, `D` is an `NA` by `NA` real diagonal matrix, and `w` is a real or complex scalar. @@ -78,8 +82,7 @@ interface Routine { * * - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. * - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. - * - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. - * - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. + * - The function writes the scaling factor `s` to `scale`, the infinity-norm of `X` to `xnorm`, and a status code to `info`. The status code is `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. * * @param trans - specifies whether `A` should be transposed * @param NA - size of the matrix `A` (either `1` or `2`) @@ -102,26 +105,32 @@ interface Routine { * @param strideX1 - stride of the first dimension of `X` * @param strideX2 - stride of the second dimension of `X` * @param offsetX - starting index for `X` - * @param out - output array containing the scaling factor and the infinity-norm of `X` - * @param strideOut - stride length for `out` - * @param offsetOut - starting index for `out` - * @returns status code + * @param scale - array containing an element which is overwritten by the scaling factor + * @param offsetScale - index of the element in `scale` + * @param xnorm - array containing an element which is overwritten by the infinity-norm of `X` + * @param offsetXnorm - index of the element in `xnorm` + * @param info - array containing an element which is overwritten by the status code + * @param offsetInfo - index of the element in `info` + * @returns `X` * * @example * var Float64Array = require( '@stdlib/array/float64' ); + * var Int32Array = require( '@stdlib/array/int32' ); * * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); * var B = new Float64Array( [ 1.0, 2.0 ] ); * var X = new Float64Array( 2 ); - * var out = new Float64Array( 2 ); - * - * var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); - * // returns 0 + * var scale = new Float64Array( 1 ); + * var xnorm = new Float64Array( 1 ); + * var info = new Int32Array( 1 ); * + * dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); * // X => [ ~-0.087, ~1.391 ] - * // out => [ 1.0, ~1.391 ] + * // scale => [ 1.0 ] + * // xnorm => [ ~1.391 ] + * // info => [ 0 ] */ - ndarray( trans: TransposeOperation, NA: number, NW: number, smin: number, ca: number, A: Float64Array, strideA1: number, strideA2: number, offsetA: number, d1: number, d2: number, B: Float64Array, strideB1: number, strideB2: number, offsetB: number, wr: number, wi: number, X: Float64Array, strideX1: number, strideX2: number, offsetX: number, out: Float64Array, strideOut: number, offsetOut: number ): number; + ndarray( trans: TransposeOperation, NA: number, NW: number, smin: number, ca: number, A: Float64Array, strideA1: number, strideA2: number, offsetA: number, d1: number, d2: number, B: Float64Array, strideB1: number, strideB2: number, offsetB: number, wr: number, wi: number, X: Float64Array, strideX1: number, strideX2: number, offsetX: number, scale: Float64Array, offsetScale: number, xnorm: Float64Array, offsetXnorm: number, info: Int32Array, offsetInfo: number ): Float64Array; } /** @@ -131,8 +140,7 @@ interface Routine { * * - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. * - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. -* - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. -* - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. +* - The function writes the scaling factor `s` to `scale`, the infinity-norm of `X` to `xnorm`, and a status code to `info`. The status code is `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. * * @param order - storage layout * @param trans - specifies whether `A` should be transposed @@ -150,36 +158,44 @@ interface Routine { * @param wi - imaginary part of `w` (not used if `NW = 1`) * @param X - output matrix * @param ldx - stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`) -* @param out - output array containing the scaling factor and the infinity-norm of `X` -* @returns status code +* @param scale - array containing a single element which is overwritten by the scaling factor +* @param xnorm - array containing a single element which is overwritten by the infinity-norm of `X` +* @param info - array containing a single element which is overwritten by the status code +* @returns `X` * * @example * var Float64Array = require( '@stdlib/array/float64' ); +* var Int32Array = require( '@stdlib/array/int32' ); * * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); * var B = new Float64Array( [ 1.0, 2.0 ] ); * var X = new Float64Array( 2 ); -* var out = new Float64Array( 2 ); -* -* var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); -* // returns 0 +* var scale = new Float64Array( 1 ); +* var xnorm = new Float64Array( 1 ); +* var info = new Int32Array( 1 ); * +* dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); * // X => [ ~-0.087, ~1.391 ] -* // out => [ 1.0, ~1.391 ] +* // scale => [ 1.0 ] +* // xnorm => [ ~1.391 ] +* // info => [ 0 ] * * @example * var Float64Array = require( '@stdlib/array/float64' ); +* var Int32Array = require( '@stdlib/array/int32' ); * * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); * var B = new Float64Array( [ 1.0, 2.0 ] ); * var X = new Float64Array( 2 ); -* var out = new Float64Array( 2 ); -* -* var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); -* // returns 0 +* var scale = new Float64Array( 1 ); +* var xnorm = new Float64Array( 1 ); +* var info = new Int32Array( 1 ); * +* dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); * // X => [ ~-0.087, ~1.391 ] -* // out => [ 1.0, ~1.391 ] +* // scale => [ 1.0 ] +* // xnorm => [ ~1.391 ] +* // info => [ 0 ] */ declare var dlaln2: Routine; diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts index 3590d108d50a..ace542f1bf3e 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/docs/types/test.ts @@ -21,13 +21,15 @@ import dlaln2 = require( './index' ); // TESTS // -// The function returns a number... +// The function returns a Float64Array... { const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectType number + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectType Float64Array } // The compiler throws an error if the function is provided a first argument which is not a valid layout... @@ -35,15 +37,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 5, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( true, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( false, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( null, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( void 0, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( [], 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( {}, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( ( x: number ): number => x, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 5, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( true, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( false, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( null, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( void 0, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( [], 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( {}, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( ( x: number ): number => x, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a second argument which is not a valid transpose operation... @@ -51,15 +55,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 5, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', true, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', false, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', null, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', void 0, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', [], 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', {}, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', ( x: number ): number => x, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 5, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', true, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', false, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', null, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', void 0, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', [], 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', {}, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', ( x: number ): number => x, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a third argument which is not a number... @@ -67,15 +73,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', '5', 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', true, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', false, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', null, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', void 0, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', [], 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', {}, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', ( x: number ): number => x, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', '5', 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', true, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', false, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', null, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', void 0, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', [], 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', {}, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', ( x: number ): number => x, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a fourth argument which is not a number... @@ -83,15 +91,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, '5', 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, true, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, false, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, null, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, void 0, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, [], 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, {}, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, ( x: number ): number => x, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, '5', 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, true, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, false, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, null, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, void 0, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, [], 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, {}, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, ( x: number ): number => x, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a fifth argument which is not a number... @@ -99,15 +109,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, '5', 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, true, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, false, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, null, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, void 0, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, [], 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, {}, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, ( x: number ): number => x, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, '5', 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, true, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, false, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, null, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, void 0, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, [], 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, {}, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, ( x: number ): number => x, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a sixth argument which is not a number... @@ -115,31 +127,35 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, '5', A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, true, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, false, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, null, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, void 0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, [], A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, {}, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, ( x: number ): number => x, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, '5', A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, true, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, false, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, null, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, void 0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, [], A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, {}, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, ( x: number ): number => x, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a seventh argument which is not a Float64Array... { const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, '5', 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, 5, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, true, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, false, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, null, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, void 0, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, [], 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, {}, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, ( x: number ): number => x, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, '5', 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, 5, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, true, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, false, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, null, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, void 0, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, [], 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, {}, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, ( x: number ): number => x, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided an eighth argument which is not a number... @@ -147,15 +163,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, '5', 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, true, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, false, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, null, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, void 0, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, [], 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, {}, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, ( x: number ): number => x, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, '5', 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, true, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, false, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, null, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, void 0, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, [], 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, {}, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, ( x: number ): number => x, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a ninth argument which is not a number... @@ -163,15 +181,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, '5', 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, true, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, false, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, null, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, void 0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, [], 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, {}, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, ( x: number ): number => x, 1.0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, '5', 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, true, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, false, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, null, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, void 0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, [], 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, {}, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, ( x: number ): number => x, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a tenth argument which is not a number... @@ -179,31 +199,35 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, '5', B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, true, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, false, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, null, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, void 0, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, [], B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, {}, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, ( x: number ): number => x, B, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, '5', B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, true, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, false, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, null, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, void 0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, [], B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, {}, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, ( x: number ): number => x, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided an eleventh argument which is not a Float64Array... { const A = new Float64Array( 4 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, '5', 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, 5, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, true, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, false, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, null, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, void 0, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, [], 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, {}, 1, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, ( x: number ): number => x, 1, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, '5', 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, 5, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, true, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, false, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, null, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, void 0, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, [], 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, {}, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, ( x: number ): number => x, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a twelfth argument which is not a number... @@ -211,15 +235,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, '5', 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, true, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, false, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, null, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, void 0, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, [], 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, {}, 0.5, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, ( x: number ): number => x, 0.5, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, '5', 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, true, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, false, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, null, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, void 0, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, [], 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, {}, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, ( x: number ): number => x, 0.5, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a thirteenth argument which is not a number... @@ -227,15 +253,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, '5', 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, true, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, false, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, null, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, void 0, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, [], 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, {}, 0.0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, ( x: number ): number => x, 0.0, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, '5', 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, true, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, false, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, null, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, void 0, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, [], 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, {}, 0.0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, ( x: number ): number => x, 0.0, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a fourteenth argument which is not a number... @@ -243,31 +271,35 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, '5', X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, true, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, false, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, null, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, void 0, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, [], X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, {}, X, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, ( x: number ): number => x, X, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, '5', X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, true, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, false, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, null, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, void 0, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, [], X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, {}, X, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, ( x: number ): number => x, X, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a fifteenth argument which is not a Float64Array... { const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, '5', 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, 5, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, true, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, false, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, null, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, void 0, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, [], 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, {}, 1, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, ( x: number ): number => x, 1, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, '5', 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, 5, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, true, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, false, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, null, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, void 0, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, [], 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, {}, 1, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, ( x: number ): number => x, 1, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a sixteenth argument which is not a number... @@ -275,15 +307,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, '5', out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, true, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, false, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, null, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, void 0, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, [], out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, {}, out ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, ( x: number ): number => x, out ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, '5', scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, true, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, false, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, null, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, void 0, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, [], scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, {}, scale, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, ( x: number ): number => x, scale, xnorm, info ); // $ExpectError } // The compiler throws an error if the function is provided a seventeenth argument which is not a Float64Array... @@ -291,15 +325,53 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, '5' ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, 5 ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, true ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, false ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, null ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, void 0 ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, [] ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, {} ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, ( x: number ): number => x ); // $ExpectError + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, '5', xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, 5, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, true, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, false, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, null, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, void 0, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, [], xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, {}, xnorm, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, ( x: number ): number => x, xnorm, info ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eighteenth argument which is not a Float64Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const scale = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, '5', info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, 5, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, true, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, false, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, null, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, void 0, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, [], info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, {}, info ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, ( x: number ): number => x, info ); // $ExpectError +} + +// The compiler throws an error if the function is provided a nineteenth argument which is not an Int32Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, '5' ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, 5 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, true ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, false ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, null ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, void 0 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, [] ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, {} ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided an unsupported number of arguments... @@ -307,7 +379,9 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); dlaln2( ); // $ExpectError dlaln2( 'row-major' ); // $ExpectError dlaln2( 'row-major', 'no-transpose' ); // $ExpectError @@ -325,16 +399,20 @@ import dlaln2 = require( './index' ); dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0 ); // $ExpectError dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X ); // $ExpectError dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1 ); // $ExpectError - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out, 10 ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm ); // $ExpectError + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info, 10 ); // $ExpectError } -// Attached to main export is an `ndarray` method which returns a number... +// Attached to main export is an `ndarray` method which returns a Float64Array... { const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectType number + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectType Float64Array } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a valid transpose operation... @@ -342,15 +420,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 5, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( true, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( false, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( null, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( void 0, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( [], 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( {}, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( ( x: number ): number => x, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 5, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( true, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( false, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( null, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( void 0, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( [], 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( {}, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( ( x: number ): number => x, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a second argument which is not a number... @@ -358,15 +438,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', '5', 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', true, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', false, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', null, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', void 0, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', [], 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', {}, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', ( x: number ): number => x, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', '5', 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', true, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', false, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', null, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', void 0, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', [], 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', {}, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', ( x: number ): number => x, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a third argument which is not a number... @@ -374,15 +456,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, '5', 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, true, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, false, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, null, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, void 0, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, [], 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, {}, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, ( x: number ): number => x, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, '5', 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, true, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, false, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, null, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, void 0, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, [], 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, {}, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, ( x: number ): number => x, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number... @@ -390,15 +474,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, '5', 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, true, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, false, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, null, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, void 0, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, [], 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, {}, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, ( x: number ): number => x, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, '5', 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, true, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, false, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, null, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, void 0, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, [], 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, {}, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, ( x: number ): number => x, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number... @@ -406,31 +492,35 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, '5', A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, true, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, false, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, null, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, void 0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, [], A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, {}, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, ( x: number ): number => x, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, '5', A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, true, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, false, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, null, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, void 0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, [], A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, {}, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, ( x: number ): number => x, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a Float64Array... { const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, '5', 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, 5, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, true, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, false, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, null, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, void 0, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, [], 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, {}, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, ( x: number ): number => x, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, '5', 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, 5, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, true, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, false, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, null, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, void 0, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, [], 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, {}, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, ( x: number ): number => x, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number... @@ -438,15 +528,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, '5', 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, true, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, false, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, null, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, void 0, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, [], 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, {}, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, ( x: number ): number => x, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, '5', 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, true, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, false, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, null, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, void 0, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, [], 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, {}, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, ( x: number ): number => x, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a number... @@ -454,15 +546,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, '5', 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, true, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, false, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, null, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, void 0, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, [], 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, {}, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, ( x: number ): number => x, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, '5', 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, true, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, false, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, null, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, void 0, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, [], 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, {}, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, ( x: number ): number => x, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a ninth argument which is not a number... @@ -470,15 +564,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, '5', 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, true, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, false, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, null, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, void 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, [], 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, {}, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, ( x: number ): number => x, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, '5', 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, true, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, false, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, null, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, void 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, [], 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, {}, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, ( x: number ): number => x, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a tenth argument which is not a number... @@ -486,15 +582,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, '5', 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, true, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, false, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, null, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, void 0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, [], 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, {}, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, ( x: number ): number => x, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, '5', 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, true, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, false, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, null, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, void 0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, [], 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, {}, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, ( x: number ): number => x, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an eleventh argument which is not a number... @@ -502,31 +600,35 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, '5', B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, true, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, false, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, null, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, void 0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, [], B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, {}, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, ( x: number ): number => x, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, '5', B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, true, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, false, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, null, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, void 0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, [], B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, {}, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, ( x: number ): number => x, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a twelfth argument which is not a Float64Array... { const A = new Float64Array( 4 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, '5', 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, 5, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, true, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, false, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, null, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, void 0, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, [], 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, {}, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, ( x: number ): number => x, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, '5', 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, 5, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, true, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, false, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, null, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, void 0, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, [], 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, {}, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, ( x: number ): number => x, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a thirteenth argument which is not a number... @@ -534,15 +636,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, '5', 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, true, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, false, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, null, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, void 0, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, [], 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, {}, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, ( x: number ): number => x, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, '5', 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, true, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, false, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, null, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, void 0, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, [], 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, {}, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, ( x: number ): number => x, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fourteenth argument which is not a number... @@ -550,15 +654,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, '5', 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, true, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, false, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, null, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, void 0, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, [], 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, {}, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, ( x: number ): number => x, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, '5', 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, true, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, false, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, null, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, void 0, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, [], 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, {}, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, ( x: number ): number => x, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fifteenth argument which is not a number... @@ -566,15 +672,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, '5', 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, true, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, false, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, null, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, void 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, [], 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, {}, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, ( x: number ): number => x, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, '5', 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, true, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, false, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, null, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, void 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, [], 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, {}, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, ( x: number ): number => x, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a sixteenth argument which is not a number... @@ -582,15 +690,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, '5', 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, true, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, false, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, null, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, void 0, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, [], 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, {}, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, ( x: number ): number => x, 0.0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, '5', 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, true, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, false, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, null, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, void 0, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, [], 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, {}, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, ( x: number ): number => x, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a seventeenth argument which is not a number... @@ -598,31 +708,35 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, '5', X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, true, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, false, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, null, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, void 0, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, [], X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, {}, X, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, ( x: number ): number => x, X, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, '5', X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, true, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, false, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, null, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, void 0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, [], X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, {}, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, ( x: number ): number => x, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an eighteenth argument which is not a Float64Array... { const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, '5', 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, 5, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, true, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, false, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, null, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, void 0, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, [], 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, {}, 1, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, ( x: number ): number => x, 1, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, '5', 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, 5, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, true, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, false, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, null, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, void 0, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, [], 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, {}, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, ( x: number ): number => x, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a nineteenth argument which is not a number... @@ -630,15 +744,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, '5', 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, true, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, false, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, null, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, void 0, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, [], 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, {}, 2, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, ( x: number ): number => x, 2, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, '5', 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, true, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, false, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, null, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, void 0, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, [], 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, {}, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, ( x: number ): number => x, 2, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a twentieth argument which is not a number... @@ -646,15 +762,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, '5', 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, true, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, false, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, null, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, void 0, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, [], 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, {}, 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, ( x: number ): number => x, 0, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, '5', 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, true, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, false, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, null, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, void 0, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, [], 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, {}, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, ( x: number ): number => x, 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a twenty-first argument which is not a number... @@ -662,15 +780,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, '5', out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, true, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, false, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, null, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, void 0, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, [], out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, {}, out, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, ( x: number ): number => x, out, 1, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, '5', scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, true, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, false, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, null, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, void 0, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, [], scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, {}, scale, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, ( x: number ): number => x, scale, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a twenty-second argument which is not a Float64Array... @@ -678,15 +798,17 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, '5', 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, 5, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, true, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, false, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, null, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, void 0, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, [], 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, {}, 1, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, '5', 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, 5, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, true, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, false, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, null, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, void 0, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, [], 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, {}, 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, ( x: number ): number => x, 0, xnorm, 0, info, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a twenty-third argument which is not a number... @@ -694,31 +816,89 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, '5', 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, true, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, false, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, null, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, void 0, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, [], 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, {}, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, ( x: number ): number => x, 0 ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, '5', xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, true, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, false, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, null, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, void 0, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, [], xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, {}, xnorm, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, ( x: number ): number => x, xnorm, 0, info, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-fourth argument which is not a Float64Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const scale = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, '5', 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, 5, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, true, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, false, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, null, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, void 0, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, [], 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, {}, 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, ( x: number ): number => x, 0, info, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-fifth argument which is not a number... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, '5', info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, true, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, false, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, null, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, void 0, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, [], info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, {}, info, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, ( x: number ): number => x, info, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-sixth argument which is not an Int32Array... +{ + const A = new Float64Array( 4 ); + const B = new Float64Array( 2 ); + const X = new Float64Array( 2 ); + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, '5', 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, 5, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, true, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, false, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, null, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, void 0, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, [], 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, {}, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, ( x: number ): number => x, 0 ); // $ExpectError } -// The compiler throws an error if the `ndarray` method is provided a twenty-fourth argument which is not a number... +// The compiler throws an error if the `ndarray` method is provided a twenty-seventh argument which is not a number... { const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, '5' ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, true ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, false ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, null ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, void 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, [] ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, {} ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, ( x: number ): number => x ); // $ExpectError + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, '5' ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, true ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, false ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, null ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, void 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, [] ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, {} ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... @@ -726,7 +906,9 @@ import dlaln2 = require( './index' ); const A = new Float64Array( 4 ); const B = new Float64Array( 2 ); const X = new Float64Array( 2 ); - const out = new Float64Array( 2 ); + const scale = new Float64Array( 1 ); + const xnorm = new Float64Array( 1 ); + const info = new Int32Array( 1 ); dlaln2.ndarray( ); // $ExpectError dlaln2.ndarray( 'no-transpose' ); // $ExpectError dlaln2.ndarray( 'no-transpose', 2 ); // $ExpectError @@ -749,7 +931,10 @@ import dlaln2 = require( './index' ); dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1 ); // $ExpectError dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2 ); // $ExpectError dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1 ); // $ExpectError - dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0, 10 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0 ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info ); // $ExpectError + dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0, 10 ); // $ExpectError } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/examples/index.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/examples/index.js index ff735e5adc92..9f7b6cb462c3 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/examples/index.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/examples/index.js @@ -19,6 +19,7 @@ 'use strict'; var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); var ndarray2array = require( '@stdlib/ndarray/base/to-array' ); var shape2strides = require( '@stdlib/ndarray/base/shape2strides' ); var dlaln2 = require( './../lib' ); @@ -36,12 +37,15 @@ console.log( ndarray2array( A, shape, strides, 0, order ) ); var B = new Float64Array( [ 1.0, 3.0, 2.0, 4.0 ] ); console.log( ndarray2array( B, shape, strides, 0, order ) ); -// Allocate an output matrix `X` and an output array for the scaling factor and the infinity-norm of `X`: +// Allocate an output matrix `X` and output arrays for the scaling factor, the infinity-norm of `X`, and the status code: var X = new Float64Array( 4 ); -var out = new Float64Array( 2 ); +var scale = new Float64Array( 1 ); +var xnorm = new Float64Array( 1 ); +var info = new Int32Array( 1 ); // Solve (A - (0.5 + 0.5i) I) X = s B: -var info = dlaln2( order, 'no-transpose', 2, 2, 1.0e-3, 1.0, A, strides[ 0 ], 1.0, 1.0, B, strides[ 0 ], 0.5, 0.5, X, strides[ 0 ], out ); -console.log( info ); +dlaln2( order, 'no-transpose', 2, 2, 1.0e-3, 1.0, A, strides[ 0 ], 1.0, 1.0, B, strides[ 0 ], 0.5, 0.5, X, strides[ 0 ], scale, xnorm, info ); console.log( ndarray2array( X, shape, strides, 0, order ) ); -console.log( out ); +console.log( scale ); +console.log( xnorm ); +console.log( info ); diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js index 0d9d3f0e7854..1a0f3622f0a1 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/base.js @@ -75,8 +75,7 @@ function isTransposed( str ) { * * - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. * - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. -* - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. -* - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. +* - The function writes the scaling factor `s` to `scale`, the infinity-norm of `X` to `xnorm`, and a status code to `info`. The status code is `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. * - In the interests of speed, the function does not validate input arguments. * * @private @@ -101,33 +100,37 @@ function isTransposed( str ) { * @param {integer} strideX1 - stride of the first dimension of `X` * @param {integer} strideX2 - stride of the second dimension of `X` * @param {NonNegativeInteger} offsetX - starting index for `X` -* @param {Float64Array} out - output array containing the scaling factor and the infinity-norm of `X` -* @param {integer} strideOut - stride length for `out` -* @param {NonNegativeInteger} offsetOut - starting index for `out` -* @returns {integer} status code +* @param {Float64Array} scale - array containing an element which is overwritten by the scaling factor +* @param {NonNegativeInteger} offsetScale - index of the element in `scale` +* @param {Float64Array} xnorm - array containing an element which is overwritten by the infinity-norm of `X` +* @param {NonNegativeInteger} offsetXnorm - index of the element in `xnorm` +* @param {Int32Array} info - array containing an element which is overwritten by the status code +* @param {NonNegativeInteger} offsetInfo - index of the element in `info` +* @returns {Float64Array} `X` * * @example * var Float64Array = require( '@stdlib/array/float64' ); +* var Int32Array = require( '@stdlib/array/int32' ); * * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); * var B = new Float64Array( [ 1.0, 2.0 ] ); * var X = new Float64Array( 2 ); -* var out = new Float64Array( 2 ); -* -* var info = dlaln2( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); -* // returns 0 +* var scale = new Float64Array( 1 ); +* var xnorm = new Float64Array( 1 ); +* var info = new Int32Array( 1 ); * +* dlaln2( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); * // X => [ ~-0.087, ~1.391 ] -* // out => [ 1.0, ~1.391 ] +* // scale => [ 1.0 ] +* // xnorm => [ ~1.391 ] +* // info => [ 0 ] */ -function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, out, strideOut, offsetOut ) { // eslint-disable-line max-len, max-params +function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, scale, offsetScale, xnorm, offsetXnorm, info, offsetInfo ) { // eslint-disable-line max-len, max-params var u22abs; var icmax; var smini; var bnorm; var cnorm; - var xnorm; - var scale; var ur11r; var ui11r; var ur12s; @@ -147,7 +150,6 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 var ci22; var lr21; var li21; - var info; var csr; var csi; var br1; @@ -167,12 +169,15 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 var ix3; var ix4; var piv; + var xn; + var st; + var s; var v; var j; smini = max( smin, SMLNUM ); - info = 0; - scale = 1.0; + st = 0; + s = 1.0; // Indices of `B(1,1)`, `B(2,1)`, `B(1,2)`, and `B(2,2)`: ib1 = offsetB; @@ -199,22 +204,23 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 if ( cnorm < smini ) { csr = smini; cnorm = smini; - info = 1; + st = 1; } // Check scaling for X = B / C... bnorm = abs( B[ ib1 ] ); if ( cnorm < 1.0 && bnorm > 1.0 ) { if ( bnorm > BIGNUM*cnorm ) { - scale = 1.0 / bnorm; + s = 1.0 / bnorm; } } // Compute X... - X[ ix1 ] = ( B[ ib1 ]*scale ) / csr; - xnorm = abs( X[ ix1 ] ); + X[ ix1 ] = ( B[ ib1 ]*s ) / csr; + xn = abs( X[ ix1 ] ); - out[ offsetOut ] = scale; - out[ offsetOut+strideOut ] = xnorm; - return info; + scale[ offsetScale ] = s; + xnorm[ offsetXnorm ] = xn; + info[ offsetInfo ] = st; + return X; } // Complex 1x1 system (w is complex)... @@ -228,22 +234,23 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 csr = smini; csi = 0.0; cnorm = smini; - info = 1; + st = 1; } // Check scaling for X = B / C... bnorm = abs( B[ ib1 ] ) + abs( B[ ib3 ] ); if ( cnorm < 1.0 && bnorm > 1.0 ) { if ( bnorm > BIGNUM*cnorm ) { - scale = 1.0 / bnorm; + s = 1.0 / bnorm; } } // Compute X... - dladiv( scale*B[ ib1 ], scale*B[ ib3 ], csr, csi, X, ix1, X, ix3 ); - xnorm = abs( X[ ix1 ] ) + abs( X[ ix3 ] ); + dladiv( s*B[ ib1 ], s*B[ ib3 ], csr, csi, X, ix1, X, ix3 ); + xn = abs( X[ ix1 ] ) + abs( X[ ix3 ] ); - out[ offsetOut ] = scale; - out[ offsetOut+strideOut ] = xnorm; - return info; + scale[ offsetScale ] = s; + xnorm[ offsetXnorm ] = xn; + info[ offsetInfo ] = st; + return X; } // 2x2 system... @@ -275,17 +282,18 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 bnorm = max( abs( B[ ib1 ] ), abs( B[ ib2 ] ) ); if ( smini < 1.0 && bnorm > 1.0 ) { if ( bnorm > BIGNUM*smini ) { - scale = 1.0 / bnorm; + s = 1.0 / bnorm; } } - temp = scale / smini; + temp = s / smini; X[ ix1 ] = temp * B[ ib1 ]; X[ ix2 ] = temp * B[ ib2 ]; - xnorm = temp * bnorm; + xn = temp * bnorm; - out[ offsetOut ] = scale; - out[ offsetOut+strideOut ] = xnorm; - return 1; + scale[ offsetScale ] = s; + xnorm[ offsetXnorm ] = xn; + info[ offsetInfo ] = 1; + return X; } // Gaussian elimination with complete pivoting... piv = IPIVOT[ icmax ]; @@ -300,7 +308,7 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 // If smaller pivot < SMINI, use SMINI... if ( abs( ur22 ) < smini ) { ur22 = smini; - info = 1; + st = 1; } if ( RSWAP[ icmax ] ) { br1 = B[ ib2 ]; @@ -313,11 +321,11 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 bbnd = max( abs( br1*( ur22*ur11r ) ), abs( br2 ) ); if ( bbnd > 1.0 && abs( ur22 ) < 1.0 ) { if ( bbnd >= BIGNUM*abs( ur22 ) ) { - scale = 1.0 / bbnd; + s = 1.0 / bbnd; } } - xr2 = ( br2*scale ) / ur22; - xr1 = ( ( scale*br1 )*ur11r ) - ( xr2*( ur11r*ur12 ) ); + xr2 = ( br2*s ) / ur22; + xr1 = ( ( s*br1 )*ur11r ) - ( xr2*( ur11r*ur12 ) ); if ( ZSWAP[ icmax ] ) { X[ ix1 ] = xr2; X[ ix2 ] = xr1; @@ -325,21 +333,22 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 X[ ix1 ] = xr1; X[ ix2 ] = xr2; } - xnorm = max( abs( xr1 ), abs( xr2 ) ); + xn = max( abs( xr1 ), abs( xr2 ) ); // Further scaling if norm(A) norm(X) > overflow... - if ( xnorm > 1.0 && cmax > 1.0 ) { - if ( xnorm > BIGNUM/cmax ) { + if ( xn > 1.0 && cmax > 1.0 ) { + if ( xn > BIGNUM/cmax ) { temp = cmax / BIGNUM; X[ ix1 ] *= temp; X[ ix2 ] *= temp; - xnorm *= temp; - scale *= temp; + xn *= temp; + s *= temp; } } - out[ offsetOut ] = scale; - out[ offsetOut+strideOut ] = xnorm; - return info; + scale[ offsetScale ] = s; + xnorm[ offsetXnorm ] = xn; + info[ offsetInfo ] = st; + return X; } // Complex 2x2 system (w is complex)... @@ -362,19 +371,20 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 bnorm = max( abs( B[ ib1 ] )+abs( B[ ib3 ] ), abs( B[ ib2 ] )+abs( B[ ib4 ] ) ); // eslint-disable-line max-len if ( smini < 1.0 && bnorm > 1.0 ) { if ( bnorm > BIGNUM*smini ) { - scale = 1.0 / bnorm; + s = 1.0 / bnorm; } } - temp = scale / smini; + temp = s / smini; X[ ix1 ] = temp * B[ ib1 ]; X[ ix2 ] = temp * B[ ib2 ]; X[ ix3 ] = temp * B[ ib3 ]; X[ ix4 ] = temp * B[ ib4 ]; - xnorm = temp * bnorm; + xn = temp * bnorm; - out[ offsetOut ] = scale; - out[ offsetOut+strideOut ] = xnorm; - return 1; + scale[ offsetScale ] = s; + xnorm[ offsetXnorm ] = xn; + info[ offsetInfo ] = 1; + return X; } // Gaussian elimination with complete pivoting... piv = IPIVOT[ icmax ]; @@ -420,7 +430,7 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 if ( u22abs < smini ) { ur22 = smini; ui22 = 0.0; - info = 1; + st = 1; } if ( RSWAP[ icmax ] ) { br2 = B[ ib1 ]; @@ -438,11 +448,11 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 bbnd = max( ( abs( br1 )+abs( bi1 ) ) * ( u22abs*( abs( ur11r )+abs( ui11r ) ) ), abs( br2 )+abs( bi2 ) ); // eslint-disable-line max-len if ( bbnd > 1.0 && u22abs < 1.0 ) { if ( bbnd >= BIGNUM*u22abs ) { - scale = 1.0 / bbnd; - br1 *= scale; - bi1 *= scale; - br2 *= scale; - bi2 *= scale; + s = 1.0 / bbnd; + br1 *= s; + bi1 *= s; + br2 *= s; + bi2 *= s; } } dladiv( br2, bi2, ur22, ui22, TMP, 0, TMP, 1 ); @@ -461,23 +471,24 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 X[ ix3 ] = xi1; X[ ix4 ] = xi2; } - xnorm = max( abs( xr1 )+abs( xi1 ), abs( xr2 )+abs( xi2 ) ); + xn = max( abs( xr1 )+abs( xi1 ), abs( xr2 )+abs( xi2 ) ); // Further scaling if norm(A) norm(X) > overflow... - if ( xnorm > 1.0 && cmax > 1.0 ) { - if ( xnorm > BIGNUM/cmax ) { + if ( xn > 1.0 && cmax > 1.0 ) { + if ( xn > BIGNUM/cmax ) { temp = cmax / BIGNUM; X[ ix1 ] *= temp; X[ ix2 ] *= temp; X[ ix3 ] *= temp; X[ ix4 ] *= temp; - xnorm *= temp; - scale *= temp; + xn *= temp; + s *= temp; } } - out[ offsetOut ] = scale; - out[ offsetOut+strideOut ] = xnorm; - return info; + scale[ offsetScale ] = s; + xnorm[ offsetXnorm ] = xn; + info[ offsetInfo ] = st; + return X; } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js index 87b0a8cc1670..f22c25eaa875 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/dlaln2.js @@ -40,8 +40,7 @@ var base = require( './base.js' ); * * - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. * - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. -* - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. -* - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. +* - The function writes the scaling factor `s` to `scale`, the infinity-norm of `X` to `xnorm`, and a status code to `info`. The status code is `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. * * @param {string} order - storage layout * @param {string} trans - specifies whether `A` should be transposed @@ -59,7 +58,9 @@ var base = require( './base.js' ); * @param {number} wi - imaginary part of `w` (not used if `NW = 1`) * @param {Float64Array} X - output matrix * @param {PositiveInteger} LDX - stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`) -* @param {Float64Array} out - output array containing the scaling factor and the infinity-norm of `X` +* @param {Float64Array} scale - array containing a single element which is overwritten by the scaling factor +* @param {Float64Array} xnorm - array containing a single element which is overwritten by the infinity-norm of `X` +* @param {Int32Array} info - array containing a single element which is overwritten by the status code * @throws {TypeError} first argument must be a valid order * @throws {TypeError} second argument must be a valid transpose operation * @throws {RangeError} third argument must be either `1` or `2` @@ -67,23 +68,26 @@ var base = require( './base.js' ); * @throws {RangeError} eighth argument must be a valid stride * @throws {RangeError} twelfth argument must be a valid stride * @throws {RangeError} sixteenth argument must be a valid stride -* @returns {integer} status code +* @returns {Float64Array} `X` * * @example * var Float64Array = require( '@stdlib/array/float64' ); +* var Int32Array = require( '@stdlib/array/int32' ); * * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); * var B = new Float64Array( [ 1.0, 2.0 ] ); * var X = new Float64Array( 2 ); -* var out = new Float64Array( 2 ); -* -* var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); -* // returns 0 +* var scale = new Float64Array( 1 ); +* var xnorm = new Float64Array( 1 ); +* var info = new Int32Array( 1 ); * +* dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); * // X => [ ~-0.087, ~1.391 ] -* // out => [ 1.0, ~1.391 ] +* // scale => [ 1.0 ] +* // xnorm => [ ~1.391 ] +* // info => [ 0 ] */ -function dlaln2( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, X, LDX, out ) { // eslint-disable-line max-params +function dlaln2( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, X, LDX, scale, xnorm, info ) { // eslint-disable-line max-params var sa1; var sa2; var sb1; @@ -133,7 +137,7 @@ function dlaln2( order, trans, NA, NW, smin, ca, A, LDA, d1, d2, B, LDB, wr, wi, sx1 = LDX; sx2 = 1; } - return base( trans, NA, NW, smin, ca, A, sa1, sa2, 0, d1, d2, B, sb1, sb2, 0, wr, wi, X, sx1, sx2, 0, out, 1, 0 ); + return base( trans, NA, NW, smin, ca, A, sa1, sa2, 0, d1, d2, B, sb1, sb2, 0, wr, wi, X, sx1, sx2, 0, scale, 0, xnorm, 0, info, 0 ); } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js index 892588296d4c..b66b9c83a8e3 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/index.js @@ -25,33 +25,39 @@ * * @example * var Float64Array = require( '@stdlib/array/float64' ); +* var Int32Array = require( '@stdlib/array/int32' ); * var dlaln2 = require( '@stdlib/lapack/base/dlaln2' ); * * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); * var B = new Float64Array( [ 1.0, 2.0 ] ); * var X = new Float64Array( 2 ); -* var out = new Float64Array( 2 ); -* -* var info = dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); -* // returns 0 +* var scale = new Float64Array( 1 ); +* var xnorm = new Float64Array( 1 ); +* var info = new Int32Array( 1 ); * +* dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); * // X => [ ~-0.087, ~1.391 ] -* // out => [ 1.0, ~1.391 ] +* // scale => [ 1.0 ] +* // xnorm => [ ~1.391 ] +* // info => [ 0 ] * * @example * var Float64Array = require( '@stdlib/array/float64' ); +* var Int32Array = require( '@stdlib/array/int32' ); * var dlaln2 = require( '@stdlib/lapack/base/dlaln2' ); * * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); * var B = new Float64Array( [ 1.0, 2.0 ] ); * var X = new Float64Array( 2 ); -* var out = new Float64Array( 2 ); -* -* var info = dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); -* // returns 0 +* var scale = new Float64Array( 1 ); +* var xnorm = new Float64Array( 1 ); +* var info = new Int32Array( 1 ); * +* dlaln2.ndarray( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); * // X => [ ~-0.087, ~1.391 ] -* // out => [ 1.0, ~1.391 ] +* // scale => [ 1.0 ] +* // xnorm => [ ~1.391 ] +* // info => [ 0 ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js index 1f3420325582..82c37c3036f5 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/lib/ndarray.js @@ -38,8 +38,7 @@ var base = require( './base.js' ); * * - If `w` is complex (`NW = 2`), `X` and `B` are `NA` by `2` matrices whose first column contains the real part and whose second column contains the imaginary part. * - `s` is a scaling factor (`<= 1`) chosen so that `X` can be computed without overflow. `X` is further scaled if necessary to assure that `norm(ca*A - w*D) * norm(X)` is less than overflow. -* - The function writes the scaling factor `s` and the infinity-norm of `X` to the first and second elements of `out`, respectively. -* - The function returns `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. +* - The function writes the scaling factor `s` to `scale`, the infinity-norm of `X` to `xnorm`, and a status code to `info`. The status code is `1` if `ca*A - w*D` had to be perturbed to make its smallest (or only) singular value greater than `smin` and `0` otherwise. * * @param {string} trans - specifies whether `A` should be transposed * @param {PositiveInteger} NA - size of the matrix `A` (either `1` or `2`) @@ -62,29 +61,35 @@ var base = require( './base.js' ); * @param {integer} strideX1 - stride of the first dimension of `X` * @param {integer} strideX2 - stride of the second dimension of `X` * @param {NonNegativeInteger} offsetX - starting index for `X` -* @param {Float64Array} out - output array containing the scaling factor and the infinity-norm of `X` -* @param {integer} strideOut - stride length for `out` -* @param {NonNegativeInteger} offsetOut - starting index for `out` +* @param {Float64Array} scale - array containing an element which is overwritten by the scaling factor +* @param {NonNegativeInteger} offsetScale - index of the element in `scale` +* @param {Float64Array} xnorm - array containing an element which is overwritten by the infinity-norm of `X` +* @param {NonNegativeInteger} offsetXnorm - index of the element in `xnorm` +* @param {Int32Array} info - array containing an element which is overwritten by the status code +* @param {NonNegativeInteger} offsetInfo - index of the element in `info` * @throws {TypeError} first argument must be a valid transpose operation * @throws {RangeError} second argument must be either `1` or `2` * @throws {RangeError} third argument must be either `1` or `2` -* @returns {integer} status code +* @returns {Float64Array} `X` * * @example * var Float64Array = require( '@stdlib/array/float64' ); +* var Int32Array = require( '@stdlib/array/int32' ); * * var A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); * var B = new Float64Array( [ 1.0, 2.0 ] ); * var X = new Float64Array( 2 ); -* var out = new Float64Array( 2 ); -* -* var info = dlaln2( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); -* // returns 0 +* var scale = new Float64Array( 1 ); +* var xnorm = new Float64Array( 1 ); +* var info = new Int32Array( 1 ); * +* dlaln2( 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); * // X => [ ~-0.087, ~1.391 ] -* // out => [ 1.0, ~1.391 ] +* // scale => [ 1.0 ] +* // xnorm => [ ~1.391 ] +* // info => [ 0 ] */ -function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, out, strideOut, offsetOut ) { // eslint-disable-line max-params +function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, scale, offsetScale, xnorm, offsetXnorm, info, offsetInfo ) { // eslint-disable-line max-params if ( !isTransposeOperation( trans ) ) { throw new TypeError( format( 'invalid argument. First argument must be one of the following: "%s". Value: `%s`.', join( transposeOperations(), '", "' ), trans ) ); } @@ -94,7 +99,7 @@ function dlaln2( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2 if ( NW !== 1 && NW !== 2 ) { throw new RangeError( format( 'invalid argument. Third argument must be either 1 or 2. Value: `%d`.', NW ) ); } - return base( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, out, strideOut, offsetOut ); + return base( trans, NA, NW, smin, ca, A, strideA1, strideA2, offsetA, d1, d2, B, strideB1, strideB2, offsetB, wr, wi, X, strideX1, strideX2, offsetX, scale, offsetScale, xnorm, offsetXnorm, info, offsetInfo ); } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na1_nw2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na1_nw2_row_major.json index db1294711b06..ff32ec8f5223 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na1_nw2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na1_nw2_row_major.json @@ -37,25 +37,31 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, - 9999, - 0, - 9999 + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 ], - "strideOut": 2, - "offsetOut": 0, + "offsetXnorm": 0, + "info": [ + 0 + ], + "offsetInfo": 0, "X_out": [ 1.8378378378378377, 9999, 0.9729729729729728, 9999 ], - "out_out": [ - 1, - 9999, - 2.8108108108108105, - 9999 + "scale_out": [ + 1 + ], + "xnorm_out": [ + 2.8108108108108105 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw1_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw1_icmax1_col_major.json index 86c4595a4495..ab9f4c0fc8ab 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw1_icmax1_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw1_icmax1_col_major.json @@ -43,25 +43,31 @@ "strideX2": 4, "offsetX": 0, "LDX": 2, - "out": [ - 0, - 9999, - 0, - 9999 + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ + 0 ], - "strideOut": 2, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0.11764705882352938, 9999, 0.9411764705882354, 9999 ], - "out_out": [ - 1, - 9999, - 0.9411764705882354, - 9999 + "scale_out": [ + 1 + ], + "xnorm_out": [ + 0.9411764705882354 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw2_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw2_icmax2_row_major.json index e50ad779022d..0696716fdebe 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw2_icmax2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/large_strides/na2_nw2_icmax2_row_major.json @@ -51,14 +51,18 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, - 9999, - 0, - 9999 + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 ], - "strideOut": 2, - "offsetOut": 0, + "offsetXnorm": 0, + "info": [ + 0 + ], + "offsetInfo": 0, "X_out": [ 2.2352941176470584, 9999, @@ -69,11 +73,13 @@ 0.5176470588235296, 9999 ], - "out_out": [ - 1, - 9999, - 5.2941176470588225, - 9999 + "scale_out": [ + 1 + ], + "xnorm_out": [ + 5.2941176470588225 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na1_nw2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na1_nw2_row_major.json index 0a62aa498158..def7faf93d3d 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na1_nw2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na1_nw2_row_major.json @@ -32,19 +32,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 1.8378378378378377, 0.9729729729729728 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 2.8108108108108105 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw1_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw1_icmax1_col_major.json index df9376499260..7f503181f020 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw1_icmax1_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw1_icmax1_col_major.json @@ -35,19 +35,29 @@ "strideX2": -2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0.11764705882352938, 0.9411764705882354 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 0.9411764705882354 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw2_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw2_icmax2_row_major.json index ee4023a2e514..b469033e64b9 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw2_icmax2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/mixed_strides/na2_nw2_icmax2_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 2, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ -0.3294117647058823, 0.5176470588235296, 2.2352941176470584, 3.058823529411764 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 5.2941176470588225 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_col_major.json index 834866192e58..dbb304128d57 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_col_major.json @@ -30,18 +30,28 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 2 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 2 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_perturbed_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_perturbed_row_major.json index f9612402a81f..17d949fbc560 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_perturbed_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_perturbed_row_major.json @@ -30,18 +30,28 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 2000 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 2000 ], - "info": 1 + "info_out": [ + 1 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_row_major.json index 90bb6b95091c..f11053d3d84f 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_row_major.json @@ -30,18 +30,28 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 2 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 2 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_scaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_scaled_row_major.json index 324e454d8726..c96a6f14ce18 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_scaled_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw1_scaled_row_major.json @@ -30,18 +30,28 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 9.999999999999999e+299 ], - "out_out": [ - 1e-10, + "scale_out": [ + 1e-10 + ], + "xnorm_out": [ 9.999999999999999e+299 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_col_major.json index 6b8cdede2c1a..1d263d4995ce 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_col_major.json @@ -32,19 +32,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 1.8378378378378377, 0.9729729729729728 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 2.8108108108108105 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_perturbed_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_perturbed_row_major.json index c6aacdc1d91b..1897fd26ac00 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_perturbed_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_perturbed_row_major.json @@ -32,19 +32,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 2000, 1000 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 3000 ], - "info": 1 + "info_out": [ + 1 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_row_major.json index fecbd1999c84..6361673e252f 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_row_major.json @@ -32,19 +32,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 1.8378378378378377, 0.9729729729729728 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 2.8108108108108105 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_scaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_scaled_row_major.json index 9f07642cd7e3..5ef8317889b7 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_scaled_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na1_nw2_scaled_row_major.json @@ -32,19 +32,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 4.9999999999999995e+299, 4.9999999999999995e+299 ], - "out_out": [ - 5e-11, + "scale_out": [ + 5e-11 + ], + "xnorm_out": [ 9.999999999999999e+299 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_cmax_lt_smin_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_cmax_lt_smin_row_major.json index 2d5e8bb8581a..6b0d4968baa8 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_cmax_lt_smin_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_cmax_lt_smin_row_major.json @@ -35,19 +35,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 100, 200 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 200 ], - "info": 1 + "info_out": [ + 1 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_col_major.json index 63eccce9ce81..3c3b1d2d4e46 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_col_major.json @@ -35,19 +35,29 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ -0.08695652173913043, 1.391304347826087 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 1.391304347826087 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_row_major.json index b75e6bda27f8..8e2e02c7714d 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax0_row_major.json @@ -35,19 +35,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ -0.08695652173913043, 1.391304347826087 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 1.391304347826087 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_col_major.json index 7956ad6dbd1d..30ea3424e071 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_col_major.json @@ -35,19 +35,29 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0.11764705882352938, 0.9411764705882354 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 0.9411764705882354 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_row_major.json index ab96990622ed..4a8a65d0ec84 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax1_row_major.json @@ -35,19 +35,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0.11764705882352938, 0.9411764705882354 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 0.9411764705882354 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_col_major.json index 2b660f874875..5b2fb43480c0 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_col_major.json @@ -35,19 +35,29 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 2, 0 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 2 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_row_major.json index 7f2df5808eba..f10770e49e3a 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax2_row_major.json @@ -35,19 +35,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 2, 0 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 2 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_col_major.json index 4d1e3df39fe7..67087a123dc4 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_col_major.json @@ -35,19 +35,29 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 2, 0 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 2 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_row_major.json index f7b221841069..28b37543aa33 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_icmax3_row_major.json @@ -35,19 +35,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 2, 0 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 2 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_postscaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_postscaled_row_major.json index 7d7313a34908..b6d499f63cab 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_postscaled_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_postscaled_row_major.json @@ -35,19 +35,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0, 445.0147717014402 ], - "out_out": [ - 4.450147717014403e-298, + "scale_out": [ + 4.450147717014403e-298 + ], + "xnorm_out": [ 445.0147717014402 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_scaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_scaled_row_major.json index b19f773c3cf5..c866a96e133a 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_scaled_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_scaled_row_major.json @@ -35,19 +35,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 1e-10, 9.999999999999999e+299 ], - "out_out": [ - 1e-10, + "scale_out": [ + 1e-10 + ], + "xnorm_out": [ 9.999999999999999e+299 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_col_major.json index a6498fdbea31..bd438e54d304 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_col_major.json @@ -35,19 +35,29 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0.09230769230769233, 0.43076923076923074 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 0.43076923076923074 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_row_major.json index 56d4f7e5d11e..9b3ca9db9858 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_trans_row_major.json @@ -35,19 +35,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0.09230769230769233, 0.43076923076923074 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 0.43076923076923074 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_u22_perturbed_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_u22_perturbed_row_major.json index 1f3b8e2336cd..337a882a5b08 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_u22_perturbed_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw1_u22_perturbed_row_major.json @@ -35,19 +35,29 @@ "strideX2": 1, "offsetX": 0, "LDX": 1, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0, 0.5 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 0.5 ], - "info": 1 + "info_out": [ + 1 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_cmax_lt_smin_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_cmax_lt_smin_row_major.json index eaedf10968dc..aa666914c195 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_cmax_lt_smin_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_cmax_lt_smin_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 100, 300, 200, 400 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 600 ], - "info": 1 + "info_out": [ + 1 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_col_major.json index 2f970f74fe78..a15f66967299 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_col_major.json @@ -39,21 +39,31 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0.14012738853503182, 0.3312101910828027, 0.07643312101910837, 2.7261146496815285 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 3.0573248407643314 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_row_major.json index 7c52f1ba5518..713e457dd1fb 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0.14012738853503182, 0.07643312101910837, 0.3312101910828027, 2.7261146496815285 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 3.0573248407643314 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_ui11_dominant_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_ui11_dominant_row_major.json index 58b9c6f3e994..f44f7fb41389 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_ui11_dominant_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax0_ui11_dominant_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ -0.17706992975481775, 0.213519318676807, -0.3383785028713907, 0.26846376840619035 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 0.6068422712775811 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_col_major.json index 100e13509a70..937e7f2b139e 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_col_major.json @@ -39,21 +39,31 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ -0.21176470588235302, 1.0823529411764707, 0.04705882352941171, 2.8705882352941177 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 3.9529411764705884 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_row_major.json index 48e8c5926782..f5af59c2d6f4 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax1_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ -0.21176470588235302, 0.04705882352941171, 1.0823529411764707, 2.8705882352941177 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 3.9529411764705884 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_col_major.json index e784d192914c..9cc0c796596f 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_col_major.json @@ -39,21 +39,31 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 2.2352941176470584, -0.3294117647058823, 3.058823529411764, 0.5176470588235296 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 5.2941176470588225 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_row_major.json index 85565470c7c3..ef0541ef655c 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax2_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 2.2352941176470584, 3.058823529411764, -0.3294117647058823, 0.5176470588235296 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 5.2941176470588225 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_col_major.json index 5e65464c2081..5cf76eebcffa 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_col_major.json @@ -39,21 +39,31 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ -2.5517241379310343, 0.9655172413793103, 2.6206896551724137, 0.4137931034482759 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 5.172413793103448 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_row_major.json index 19340abee39b..499e05ecf191 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_icmax3_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ -2.5517241379310343, 2.6206896551724137, 0.9655172413793103, 0.4137931034482759 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 5.172413793103448 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_postscaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_postscaled_row_major.json index 1ea7dace20a9..9328385618a4 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_postscaled_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_postscaled_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0, 0, 445.0147717014402, 445.0147717014402 ], - "out_out": [ - 4.450147717014403e-298, + "scale_out": [ + 4.450147717014403e-298 + ], + "xnorm_out": [ 890.0295434028804 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_scaled_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_scaled_row_major.json index 1027c9d5c580..4e65643a70e0 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_scaled_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_scaled_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 5e-11, 5e-11, 4.9999999999999995e+299, 4.9999999999999995e+299 ], - "out_out": [ - 5e-11, + "scale_out": [ + 5e-11 + ], + "xnorm_out": [ 9.999999999999999e+299 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_col_major.json index 9914b3ccfbc6..1df819c15410 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_col_major.json @@ -39,21 +39,31 @@ "strideX2": 2, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ -0.14605809128630703, 0.5726141078838174, 0.14771784232365154, 1.3526970954356845 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 1.925311203319502 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_row_major.json index 543af52c2a80..e65c80ff2cde 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_trans_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ -0.14605809128630703, 0.14771784232365154, 0.5726141078838174, 1.3526970954356845 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 1.925311203319502 ], - "info": 0 + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_u22_perturbed_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_u22_perturbed_row_major.json index 977f2e76b72d..025351ccf143 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_u22_perturbed_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/na2_nw2_u22_perturbed_row_major.json @@ -39,21 +39,31 @@ "strideX2": 1, "offsetX": 0, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": 1, - "offsetOut": 0, + "offsetInfo": 0, "X_out": [ 0, 1000, 0.5, -499 ], - "out_out": [ - 1, + "scale_out": [ + 1 + ], + "xnorm_out": [ 1000 ], - "info": 1 + "info_out": [ + 1 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na1_nw2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na1_nw2_row_major.json index 52e65fc944da..d48219010afa 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na1_nw2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na1_nw2_row_major.json @@ -32,19 +32,29 @@ "strideX2": -1, "offsetX": 1, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": -1, - "offsetOut": 1, + "offsetInfo": 0, "X_out": [ 0.9729729729729728, 1.8378378378378377 ], - "out_out": [ - 2.8108108108108105, + "scale_out": [ 1 ], - "info": 0 + "xnorm_out": [ + 2.8108108108108105 + ], + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw1_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw1_icmax1_col_major.json index b32250fb9973..6428bb982fca 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw1_icmax1_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw1_icmax1_col_major.json @@ -35,19 +35,29 @@ "strideX2": -2, "offsetX": 1, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": -1, - "offsetOut": 1, + "offsetInfo": 0, "X_out": [ 0.9411764705882354, 0.11764705882352938 ], - "out_out": [ - 0.9411764705882354, + "scale_out": [ 1 ], - "info": 0 + "xnorm_out": [ + 0.9411764705882354 + ], + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw2_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw2_icmax2_row_major.json index c38bc3d1ed40..5a7808868e55 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw2_icmax2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/negative_strides/na2_nw2_icmax2_row_major.json @@ -39,21 +39,31 @@ "strideX2": -1, "offsetX": 3, "LDX": 2, - "out": [ - 0, + "scale": [ + 0.0 + ], + "offsetScale": 0, + "xnorm": [ + 0.0 + ], + "offsetXnorm": 0, + "info": [ 0 ], - "strideOut": -1, - "offsetOut": 1, + "offsetInfo": 0, "X_out": [ 0.5176470588235296, -0.3294117647058823, 3.058823529411764, 2.2352941176470584 ], - "out_out": [ - 5.2941176470588225, + "scale_out": [ 1 ], - "info": 0 + "xnorm_out": [ + 5.2941176470588225 + ], + "info_out": [ + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na1_nw2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na1_nw2_row_major.json index e719cdb12ae4..31e75318f9c1 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na1_nw2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na1_nw2_row_major.json @@ -35,22 +35,36 @@ "strideX2": 1, "offsetX": 1, "LDX": 2, - "out": [ + "scale": [ + 9999.0, + 0.0 + ], + "offsetScale": 1, + "xnorm": [ + 9999.0, + 0.0 + ], + "offsetXnorm": 1, + "info": [ 9999, - 0, 0 ], - "strideOut": 1, - "offsetOut": 1, + "offsetInfo": 1, "X_out": [ 9999, 1.8378378378378377, 0.9729729729729728 ], - "out_out": [ - 9999, - 1, + "scale_out": [ + 9999.0, + 1 + ], + "xnorm_out": [ + 9999.0, 2.8108108108108105 ], - "info": 0 + "info_out": [ + 9999, + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw1_icmax1_col_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw1_icmax1_col_major.json index ee1c3cc3f3e7..66efdb9b0a2c 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw1_icmax1_col_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw1_icmax1_col_major.json @@ -38,22 +38,36 @@ "strideX2": 2, "offsetX": 1, "LDX": 2, - "out": [ + "scale": [ + 9999.0, + 0.0 + ], + "offsetScale": 1, + "xnorm": [ + 9999.0, + 0.0 + ], + "offsetXnorm": 1, + "info": [ 9999, - 0, 0 ], - "strideOut": 1, - "offsetOut": 1, + "offsetInfo": 1, "X_out": [ 9999, 0.11764705882352938, 0.9411764705882354 ], - "out_out": [ - 9999, - 1, + "scale_out": [ + 9999.0, + 1 + ], + "xnorm_out": [ + 9999.0, 0.9411764705882354 ], - "info": 0 + "info_out": [ + 9999, + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw2_icmax2_row_major.json b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw2_icmax2_row_major.json index 7823206d2909..007a8722bec7 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw2_icmax2_row_major.json +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/fixtures/offsets/na2_nw2_icmax2_row_major.json @@ -42,13 +42,21 @@ "strideX2": 1, "offsetX": 1, "LDX": 2, - "out": [ + "scale": [ + 9999.0, + 0.0 + ], + "offsetScale": 1, + "xnorm": [ + 9999.0, + 0.0 + ], + "offsetXnorm": 1, + "info": [ 9999, - 0, 0 ], - "strideOut": 1, - "offsetOut": 1, + "offsetInfo": 1, "X_out": [ 9999, 2.2352941176470584, @@ -56,10 +64,16 @@ -0.3294117647058823, 0.5176470588235296 ], - "out_out": [ - 9999, - 1, + "scale_out": [ + 9999.0, + 1 + ], + "xnorm_out": [ + 9999.0, 5.2941176470588225 ], - "info": 0 + "info_out": [ + 9999, + 0 + ] } diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js index b7054d578e4a..75dcda382eb9 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.dlaln2.js @@ -24,6 +24,7 @@ var tape = require( 'tape' ); var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); var dlaln2 = require( './../lib/dlaln2.js' ); @@ -76,14 +77,16 @@ tape( 'main export is a function', function test( t ) { t.end(); }); -tape( 'the function has an arity of 17', function test( t ) { - t.strictEqual( dlaln2.length, 17, 'returns expected value' ); +tape( 'the function has an arity of 19', function test( t ) { + t.strictEqual( dlaln2.length, 19, 'returns expected value' ); t.end(); }); tape( 'the function throws an error if provided a first argument which is not a valid order', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -92,7 +95,9 @@ tape( 'the function throws an error if provided a first argument which is not a A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 2.0 ] ); X = new Float64Array( 2 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ 'foo', @@ -117,14 +122,16 @@ tape( 'the function throws an error if provided a first argument which is not a function badValue( value ) { return function badValue() { - dlaln2( value, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + dlaln2( value, 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); }; } }); tape( 'the function throws an error if provided a second argument which is not a valid transpose operation', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -133,7 +140,9 @@ tape( 'the function throws an error if provided a second argument which is not a A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 2.0 ] ); X = new Float64Array( 2 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ 'foo', @@ -158,14 +167,16 @@ tape( 'the function throws an error if provided a second argument which is not a function badValue( value ) { return function badValue() { - dlaln2( 'row-major', value, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + dlaln2( 'row-major', value, 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); }; } }); tape( 'the function throws an error if provided a third argument which is not either 1 or 2', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -174,7 +185,9 @@ tape( 'the function throws an error if provided a third argument which is not ei A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 2.0 ] ); X = new Float64Array( 2 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ -2, @@ -191,14 +204,16 @@ tape( 'the function throws an error if provided a third argument which is not ei function badValue( value ) { return function badValue() { - dlaln2( 'row-major', 'no-transpose', value, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + dlaln2( 'row-major', 'no-transpose', value, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); }; } }); tape( 'the function throws an error if provided a fourth argument which is not either 1 or 2', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -207,7 +222,9 @@ tape( 'the function throws an error if provided a fourth argument which is not e A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 2.0 ] ); X = new Float64Array( 2 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ -2, @@ -224,14 +241,16 @@ tape( 'the function throws an error if provided a fourth argument which is not e function badValue( value ) { return function badValue() { - dlaln2( 'row-major', 'no-transpose', 2, value, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + dlaln2( 'row-major', 'no-transpose', 2, value, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); }; } }); tape( 'the function throws an error if provided an eighth argument which is not a valid LDA value', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -240,7 +259,9 @@ tape( 'the function throws an error if provided an eighth argument which is not A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 2.0 ] ); X = new Float64Array( 2 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ 0, @@ -254,14 +275,16 @@ tape( 'the function throws an error if provided an eighth argument which is not function badValue( value ) { return function badValue() { - dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, value, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, out ); + dlaln2( 'row-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, value, 1.0, 1.0, B, 1, 0.5, 0.0, X, 1, scale, xnorm, info ); }; } }); tape( 'the function throws an error if provided a twelfth argument which is not a valid LDB value (row-major)', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -270,7 +293,9 @@ tape( 'the function throws an error if provided a twelfth argument which is not A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 3.0, 2.0, 4.0 ] ); X = new Float64Array( 4 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ 0, @@ -284,14 +309,16 @@ tape( 'the function throws an error if provided a twelfth argument which is not function badValue( value ) { return function badValue() { - dlaln2( 'row-major', 'no-transpose', 2, 2, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, value, 0.5, 0.5, X, 2, out ); + dlaln2( 'row-major', 'no-transpose', 2, 2, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, value, 0.5, 0.5, X, 2, scale, xnorm, info ); }; } }); tape( 'the function throws an error if provided a twelfth argument which is not a valid LDB value (column-major)', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -300,7 +327,9 @@ tape( 'the function throws an error if provided a twelfth argument which is not A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 2.0 ] ); X = new Float64Array( 2 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ 0, @@ -314,14 +343,16 @@ tape( 'the function throws an error if provided a twelfth argument which is not function badValue( value ) { return function badValue() { - dlaln2( 'column-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, value, 0.5, 0.0, X, 2, out ); + dlaln2( 'column-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, value, 0.5, 0.0, X, 2, scale, xnorm, info ); }; } }); tape( 'the function throws an error if provided a sixteenth argument which is not a valid LDX value (row-major)', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -330,7 +361,9 @@ tape( 'the function throws an error if provided a sixteenth argument which is no A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 3.0, 2.0, 4.0 ] ); X = new Float64Array( 4 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ 0, @@ -344,14 +377,16 @@ tape( 'the function throws an error if provided a sixteenth argument which is no function badValue( value ) { return function badValue() { - dlaln2( 'row-major', 'no-transpose', 2, 2, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 2, 0.5, 0.5, X, value, out ); + dlaln2( 'row-major', 'no-transpose', 2, 2, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 2, 0.5, 0.5, X, value, scale, xnorm, info ); }; } }); tape( 'the function throws an error if provided a sixteenth argument which is not a valid LDX value (column-major)', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -360,7 +395,9 @@ tape( 'the function throws an error if provided a sixteenth argument which is no A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 2.0 ] ); X = new Float64Array( 2 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ 0, @@ -374,14 +411,18 @@ tape( 'the function throws an error if provided a sixteenth argument which is no function badValue( value ) { return function badValue() { - dlaln2( 'column-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 2, 0.5, 0.0, X, value, out ); + dlaln2( 'column-major', 'no-transpose', 2, 1, 1.0e-3, 1.0, A, 2, 1.0, 1.0, B, 2, 0.5, 0.0, X, value, scale, xnorm, info ); }; } }); tape( 'the function solves a real 1x1 system (column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -394,21 +435,31 @@ tape( 'the function solves a real 1x1 system (column-major)', function test( t ) A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 1x1 system (perturbed, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -421,21 +472,31 @@ tape( 'the function solves a real 1x1 system (perturbed, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 1x1 system (row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -448,21 +509,31 @@ tape( 'the function solves a real 1x1 system (row-major)', function test( t ) { A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 1x1 system (scaled, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -475,21 +546,31 @@ tape( 'the function solves a real 1x1 system (scaled, row-major)', function test A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -502,21 +583,31 @@ tape( 'the function solves a complex 1x1 system (column-major)', function test( A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (perturbed, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -529,21 +620,31 @@ tape( 'the function solves a complex 1x1 system (perturbed, row-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -556,21 +657,31 @@ tape( 'the function solves a complex 1x1 system (row-major)', function test( t ) A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (scaled, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -583,21 +694,31 @@ tape( 'the function solves a complex 1x1 system (scaled, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (norm(C) < smin, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -610,21 +731,31 @@ tape( 'the function solves a real 2x2 system (norm(C) < smin, row-major)', funct A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C11, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -637,21 +768,31 @@ tape( 'the function solves a real 2x2 system (pivot=C11, column-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C11, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -664,21 +805,31 @@ tape( 'the function solves a real 2x2 system (pivot=C11, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C21, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -691,21 +842,31 @@ tape( 'the function solves a real 2x2 system (pivot=C21, column-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C21, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -718,21 +879,31 @@ tape( 'the function solves a real 2x2 system (pivot=C21, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C12, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -745,21 +916,31 @@ tape( 'the function solves a real 2x2 system (pivot=C12, column-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C12, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -772,21 +953,31 @@ tape( 'the function solves a real 2x2 system (pivot=C12, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C22, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -799,21 +990,31 @@ tape( 'the function solves a real 2x2 system (pivot=C22, column-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C22, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -826,21 +1027,31 @@ tape( 'the function solves a real 2x2 system (pivot=C22, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (scaled to avoid overflow, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -853,21 +1064,31 @@ tape( 'the function solves a real 2x2 system (scaled to avoid overflow, row-majo A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (scaled, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -880,21 +1101,31 @@ tape( 'the function solves a real 2x2 system (scaled, row-major)', function test A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (transposed, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -907,21 +1138,31 @@ tape( 'the function solves a real 2x2 system (transposed, column-major)', functi A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (transposed, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -934,21 +1175,31 @@ tape( 'the function solves a real 2x2 system (transposed, row-major)', function A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (perturbed pivot, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -961,21 +1212,31 @@ tape( 'the function solves a real 2x2 system (perturbed pivot, row-major)', func A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (norm(C) < smin, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -988,21 +1249,31 @@ tape( 'the function solves a complex 2x2 system (norm(C) < smin, row-major)', fu A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C11, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1015,21 +1286,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C11, column-major)', func A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C11, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1042,21 +1323,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C11, row-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C11, imaginary part dominant, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1069,21 +1360,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C11, imaginary part domin A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C21, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1096,21 +1397,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C21, column-major)', func A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C21, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1123,21 +1434,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C21, row-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C12, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1150,21 +1471,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C12, column-major)', func A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C12, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1177,21 +1508,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C12, row-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C22, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1204,21 +1545,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C22, column-major)', func A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C22, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1231,21 +1582,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C22, row-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (scaled to avoid overflow, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1258,21 +1619,31 @@ tape( 'the function solves a complex 2x2 system (scaled to avoid overflow, row-m A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (scaled, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1285,21 +1656,31 @@ tape( 'the function solves a complex 2x2 system (scaled, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (transposed, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1312,21 +1693,31 @@ tape( 'the function solves a complex 2x2 system (transposed, column-major)', fun A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (transposed, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1339,21 +1730,31 @@ tape( 'the function solves a complex 2x2 system (transposed, row-major)', functi A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (perturbed pivot, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1366,14 +1767,20 @@ tape( 'the function solves a complex 2x2 system (perturbed pivot, row-major)', f A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, out ); + out = dlaln2( data.order, data.trans, data.NA, data.NW, data.smin, data.ca, A, data.LDA, data.d1, data.d2, B, data.LDB, data.wr, data.wi, X, data.LDX, scale, xnorm, info ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js index a201ad5f0a35..36257f5f49b7 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/lapack/base/dlaln2/test/test.ndarray.js @@ -24,6 +24,7 @@ var tape = require( 'tape' ); var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); var dlaln2 = require( './../lib/ndarray.js' ); @@ -88,14 +89,16 @@ tape( 'main export is a function', function test( t ) { t.end(); }); -tape( 'the function has an arity of 24', function test( t ) { - t.strictEqual( dlaln2.length, 24, 'returns expected value' ); +tape( 'the function has an arity of 27', function test( t ) { + t.strictEqual( dlaln2.length, 27, 'returns expected value' ); t.end(); }); tape( 'the function throws an error if provided a first argument which is not a valid transpose operation', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -104,7 +107,9 @@ tape( 'the function throws an error if provided a first argument which is not a A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 2.0 ] ); X = new Float64Array( 2 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ 'foo', @@ -129,14 +134,16 @@ tape( 'the function throws an error if provided a first argument which is not a function badValue( value ) { return function badValue() { - dlaln2( value, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); + dlaln2( value, 2, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); }; } }); tape( 'the function throws an error if provided a second argument which is not either 1 or 2', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -145,7 +152,9 @@ tape( 'the function throws an error if provided a second argument which is not e A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 2.0 ] ); X = new Float64Array( 2 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ -2, @@ -162,14 +171,16 @@ tape( 'the function throws an error if provided a second argument which is not e function badValue( value ) { return function badValue() { - dlaln2( 'no-transpose', value, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); + dlaln2( 'no-transpose', value, 1, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); }; } }); tape( 'the function throws an error if provided a third argument which is not either 1 or 2', function test( t ) { var values; - var out; + var scale; + var xnorm; + var info; var A; var B; var X; @@ -178,7 +189,9 @@ tape( 'the function throws an error if provided a third argument which is not ei A = new Float64Array( [ 5.0, 1.0, 1.0, 2.0 ] ); B = new Float64Array( [ 1.0, 2.0 ] ); X = new Float64Array( 2 ); - out = new Float64Array( 2 ); + scale = new Float64Array( 1 ); + xnorm = new Float64Array( 1 ); + info = new Int32Array( 1 ); values = [ -2, @@ -195,14 +208,18 @@ tape( 'the function throws an error if provided a third argument which is not ei function badValue( value ) { return function badValue() { - dlaln2( 'no-transpose', 2, value, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, out, 1, 0 ); + dlaln2( 'no-transpose', 2, value, 1.0e-3, 1.0, A, 1, 2, 0, 1.0, 1.0, B, 1, 2, 0, 0.5, 0.0, X, 1, 2, 0, scale, 0, xnorm, 0, info, 0 ); }; } }); tape( 'the function solves a real 1x1 system (column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -215,21 +232,31 @@ tape( 'the function solves a real 1x1 system (column-major)', function test( t ) A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 1x1 system (perturbed, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -242,21 +269,31 @@ tape( 'the function solves a real 1x1 system (perturbed, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 1x1 system (row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -269,21 +306,31 @@ tape( 'the function solves a real 1x1 system (row-major)', function test( t ) { A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 1x1 system (scaled, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -296,21 +343,31 @@ tape( 'the function solves a real 1x1 system (scaled, row-major)', function test A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -323,21 +380,31 @@ tape( 'the function solves a complex 1x1 system (column-major)', function test( A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (perturbed, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -350,21 +417,31 @@ tape( 'the function solves a complex 1x1 system (perturbed, row-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -377,21 +454,31 @@ tape( 'the function solves a complex 1x1 system (row-major)', function test( t ) A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (scaled, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -404,21 +491,31 @@ tape( 'the function solves a complex 1x1 system (scaled, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (norm(C) < smin, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -431,21 +528,31 @@ tape( 'the function solves a real 2x2 system (norm(C) < smin, row-major)', funct A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C11, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -458,21 +565,31 @@ tape( 'the function solves a real 2x2 system (pivot=C11, column-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C11, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -485,21 +602,31 @@ tape( 'the function solves a real 2x2 system (pivot=C11, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C21, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -512,21 +639,31 @@ tape( 'the function solves a real 2x2 system (pivot=C21, column-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C21, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -539,21 +676,31 @@ tape( 'the function solves a real 2x2 system (pivot=C21, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C12, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -566,21 +713,31 @@ tape( 'the function solves a real 2x2 system (pivot=C12, column-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C12, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -593,21 +750,31 @@ tape( 'the function solves a real 2x2 system (pivot=C12, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C22, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -620,21 +787,31 @@ tape( 'the function solves a real 2x2 system (pivot=C22, column-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C22, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -647,21 +824,31 @@ tape( 'the function solves a real 2x2 system (pivot=C22, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (scaled to avoid overflow, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -674,21 +861,31 @@ tape( 'the function solves a real 2x2 system (scaled to avoid overflow, row-majo A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (scaled, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -701,21 +898,31 @@ tape( 'the function solves a real 2x2 system (scaled, row-major)', function test A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (transposed, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -728,21 +935,31 @@ tape( 'the function solves a real 2x2 system (transposed, column-major)', functi A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (transposed, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -755,21 +972,31 @@ tape( 'the function solves a real 2x2 system (transposed, row-major)', function A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (perturbed pivot, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -782,21 +1009,31 @@ tape( 'the function solves a real 2x2 system (perturbed pivot, row-major)', func A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (norm(C) < smin, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -809,21 +1046,31 @@ tape( 'the function solves a complex 2x2 system (norm(C) < smin, row-major)', fu A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C11, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -836,21 +1083,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C11, column-major)', func A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C11, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -863,21 +1120,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C11, row-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C11, imaginary part dominant, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -890,21 +1157,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C11, imaginary part domin A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C21, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -917,21 +1194,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C21, column-major)', func A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C21, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -944,21 +1231,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C21, row-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C12, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -971,21 +1268,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C12, column-major)', func A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C12, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -998,21 +1305,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C12, row-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C22, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1025,21 +1342,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C22, column-major)', func A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C22, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1052,21 +1379,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C22, row-major)', functio A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (scaled to avoid overflow, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1079,21 +1416,31 @@ tape( 'the function solves a complex 2x2 system (scaled to avoid overflow, row-m A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (scaled, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1106,21 +1453,31 @@ tape( 'the function solves a complex 2x2 system (scaled, row-major)', function t A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (transposed, column-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1133,21 +1490,31 @@ tape( 'the function solves a complex 2x2 system (transposed, column-major)', fun A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (transposed, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1160,21 +1527,31 @@ tape( 'the function solves a complex 2x2 system (transposed, row-major)', functi A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (perturbed pivot, row-major)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1187,21 +1564,31 @@ tape( 'the function solves a complex 2x2 system (perturbed pivot, row-major)', f A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (row-major, large strides)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1214,21 +1601,31 @@ tape( 'the function solves a complex 1x1 system (row-major, large strides)', fun A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C21, column-major, large strides)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1241,21 +1638,31 @@ tape( 'the function solves a real 2x2 system (pivot=C21, column-major, large str A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, large strides)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1268,21 +1675,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, large str A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (row-major, mixed strides)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1295,21 +1712,31 @@ tape( 'the function solves a complex 1x1 system (row-major, mixed strides)', fun A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C21, column-major, mixed strides)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1322,21 +1749,31 @@ tape( 'the function solves a real 2x2 system (pivot=C21, column-major, mixed str A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, mixed strides)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1349,21 +1786,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, mixed str A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (row-major, negative strides)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1376,21 +1823,31 @@ tape( 'the function solves a complex 1x1 system (row-major, negative strides)', A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C21, column-major, negative strides)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1403,21 +1860,31 @@ tape( 'the function solves a real 2x2 system (pivot=C21, column-major, negative A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, negative strides)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1430,21 +1897,31 @@ tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, negative A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 1x1 system (row-major, offsets)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1457,21 +1934,31 @@ tape( 'the function solves a complex 1x1 system (row-major, offsets)', function A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a real 2x2 system (pivot=C21, column-major, offsets)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1484,21 +1971,31 @@ tape( 'the function solves a real 2x2 system (pivot=C21, column-major, offsets)' A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); }); tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, offsets)', function test( t ) { - var expectedOut; + var expectedScale; + var expectedXnorm; + var expectedInfo; var expectedX; + var scale; + var xnorm; var data; var info; var out; @@ -1511,14 +2008,20 @@ tape( 'the function solves a complex 2x2 system (pivot=C12, row-major, offsets)' A = new Float64Array( data.A ); B = new Float64Array( data.B ); X = new Float64Array( data.X ); - out = new Float64Array( data.out ); + scale = new Float64Array( data.scale ); + xnorm = new Float64Array( data.xnorm ); + info = new Int32Array( data.info ); - info = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, out, data.strideOut, data.offsetOut ); + out = dlaln2( data.trans, data.NA, data.NW, data.smin, data.ca, A, data.strideA1, data.strideA2, data.offsetA, data.d1, data.d2, B, data.strideB1, data.strideB2, data.offsetB, data.wr, data.wi, X, data.strideX1, data.strideX2, data.offsetX, scale, data.offsetScale, xnorm, data.offsetXnorm, info, data.offsetInfo ); expectedX = new Float64Array( data.X_out ); - expectedOut = new Float64Array( data.out_out ); + expectedScale = new Float64Array( data.scale_out ); + expectedXnorm = new Float64Array( data.xnorm_out ); + expectedInfo = new Int32Array( data.info_out ); - t.strictEqual( info, data.info, 'returns expected value' ); + t.strictEqual( out, X, 'returns expected value' ); t.deepEqual( X, expectedX, 'returns expected value' ); - t.deepEqual( out, expectedOut, 'returns expected value' ); + t.deepEqual( scale, expectedScale, 'returns expected value' ); + t.deepEqual( xnorm, expectedXnorm, 'returns expected value' ); + t.deepEqual( info, expectedInfo, 'returns expected value' ); t.end(); });