diff --git a/lib/node_modules/@stdlib/blas/base/dsymv/test/test.dsymv.js b/lib/node_modules/@stdlib/blas/base/dsymv/test/test.dsymv.js index c0118a154b51..6da14e68879d 100644 --- a/lib/node_modules/@stdlib/blas/base/dsymv/test/test.dsymv.js +++ b/lib/node_modules/@stdlib/blas/base/dsymv/test/test.dsymv.js @@ -24,9 +24,8 @@ var tape = require( 'tape' ); var Float64Array = require( '@stdlib/array/float64' ); -var EPS = require( '@stdlib/constants/float64/eps' ); -var abs = require( '@stdlib/math/base/special/abs' ); var ones = require( '@stdlib/array/ones' ); +var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); var dsymv = require( './../lib/dsymv.js' ); @@ -37,7 +36,6 @@ var rxpyp = require( './fixtures/row_major_xpyp.json' ); var rxnyp = require( './fixtures/row_major_xnyp.json' ); var rxpyn = require( './fixtures/row_major_xpyn.json' ); var rxnyn = require( './fixtures/row_major_xnyn.json' ); - var cxoyt = require( './fixtures/column_major_xoyt.json' ); var cxpyp = require( './fixtures/column_major_xpyp.json' ); var cxnyp = require( './fixtures/column_major_xnyp.json' ); @@ -54,22 +52,14 @@ var cxnyn = require( './fixtures/column_major_xnyn.json' ); * @param {Object} t - test object * @param {Collection} actual - actual values * @param {Collection} expected - expected values -* @param {number} rtol - relative tolerance +* @param {NonNegativeInteger} ulp - maximum allowed ULP difference */ -function isApprox( t, actual, expected, rtol ) { - var delta; - var tol; +function isApprox( t, actual, expected, ulp ) { var i; t.strictEqual( actual.length, expected.length, 'returns expected value' ); for ( i = 0; i < expected.length; i++ ) { - if ( actual[ i ] === expected[ i ] ) { - t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' ); - } else { - delta = abs( actual[ i ] - expected[ i ] ); - tol = rtol * EPS * abs( expected[ i ] ); - t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' ); - } + t.strictEqual( isAlmostSameValue( actual[ i ], expected[ i ], ulp ), true, 'returns expected value' ); } } @@ -223,10 +213,13 @@ tape( 'the function throws an error if provided an invalid eleventh argument', f tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (row-major, sx=1, sy=1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( rxpyp.A ); x = new Float64Array( rxpyp.x ); y = new Float64Array( rxpyp.y ); @@ -235,7 +228,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( rxpyp.order, rxpyp.uplo, rxpyp.N, rxpyp.alpha, a, rxpyp.lda, x, rxpyp.strideX, rxpyp.beta, y, rxpyp.strideY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -243,10 +236,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (column-major, sx=1, sy=1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( cxpyp.A ); x = new Float64Array( cxpyp.x ); y = new Float64Array( cxpyp.y ); @@ -255,7 +251,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( cxpyp.order, cxpyp.uplo, cxpyp.N, cxpyp.alpha, a, cxpyp.lda, x, cxpyp.strideX, cxpyp.beta, y, cxpyp.strideY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -263,10 +259,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (row-major, sx=1, sy=2)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( rxoyt.A ); x = new Float64Array( rxoyt.x ); y = new Float64Array( rxoyt.y ); @@ -275,7 +274,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( rxoyt.order, rxoyt.uplo, rxoyt.N, rxoyt.alpha, a, rxoyt.lda, x, rxoyt.strideX, rxoyt.beta, y, rxoyt.strideY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -283,10 +282,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (column-major, sx=1, sy=2)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( cxoyt.A ); x = new Float64Array( cxoyt.x ); y = new Float64Array( cxoyt.y ); @@ -295,7 +297,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( cxoyt.order, cxoyt.uplo, cxoyt.N, cxoyt.alpha, a, cxoyt.lda, x, cxoyt.strideX, cxoyt.beta, y, cxoyt.strideY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -303,10 +305,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (row-major, sx=1, sy=-1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( rxpyn.A ); x = new Float64Array( rxpyn.x ); y = new Float64Array( rxpyn.y ); @@ -315,7 +320,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( rxpyn.order, rxpyn.uplo, rxpyn.N, rxpyn.alpha, a, rxpyn.lda, x, rxpyn.strideX, rxpyn.beta, y, rxpyn.strideY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -323,10 +328,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (column-major, sx=1, sy=-1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( cxpyn.A ); x = new Float64Array( cxpyn.x ); y = new Float64Array( cxpyn.y ); @@ -335,7 +343,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( cxpyn.order, cxpyn.uplo, cxpyn.N, cxpyn.alpha, a, cxpyn.lda, x, cxpyn.strideX, cxpyn.beta, y, cxpyn.strideY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -343,10 +351,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (row-major, sx=-1, sy=1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( rxnyp.A ); x = new Float64Array( rxnyp.x ); y = new Float64Array( rxnyp.y ); @@ -355,7 +366,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( rxnyp.order, rxnyp.uplo, rxnyp.N, rxnyp.alpha, a, rxnyp.lda, x, rxnyp.strideX, rxnyp.beta, y, rxnyp.strideY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -363,10 +374,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (column-major, sx=-1, sy=1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( cxnyp.A ); x = new Float64Array( cxnyp.x ); y = new Float64Array( cxnyp.y ); @@ -375,7 +389,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( cxnyp.order, cxnyp.uplo, cxnyp.N, cxnyp.alpha, a, cxnyp.lda, x, cxnyp.strideX, cxnyp.beta, y, cxnyp.strideY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -551,10 +565,13 @@ tape( 'when `α` is zero, the function scales the second input vector (column-ma tape( 'the function supports complex access patterns (row-major)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( rxnyn.A ); x = new Float64Array( rxnyn.x ); y = new Float64Array( rxnyn.y ); @@ -563,7 +580,7 @@ tape( 'the function supports complex access patterns (row-major)', function test out = dsymv( rxnyn.order, rxnyn.uplo, rxnyn.N, rxnyn.alpha, a, rxnyn.lda, x, rxnyn.strideX, rxnyn.beta, y, rxnyn.strideY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -571,10 +588,13 @@ tape( 'the function supports complex access patterns (row-major)', function test tape( 'the function supports complex access patterns (column-major)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( cxnyn.A ); x = new Float64Array( cxnyn.x ); y = new Float64Array( cxnyn.y ); @@ -583,7 +603,7 @@ tape( 'the function supports complex access patterns (column-major)', function t out = dsymv( cxnyn.order, cxnyn.uplo, cxnyn.N, cxnyn.alpha, a, cxnyn.lda, x, cxnyn.strideX, cxnyn.beta, y, cxnyn.strideY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); diff --git a/lib/node_modules/@stdlib/blas/base/dsymv/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/dsymv/test/test.ndarray.js index 70836b77a594..400de5bc86a7 100644 --- a/lib/node_modules/@stdlib/blas/base/dsymv/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/dsymv/test/test.ndarray.js @@ -24,9 +24,8 @@ var tape = require( 'tape' ); var Float64Array = require( '@stdlib/array/float64' ); -var EPS = require( '@stdlib/constants/float64/eps' ); -var abs = require( '@stdlib/math/base/special/abs' ); var ones = require( '@stdlib/array/ones' ); +var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); var dsymv = require( './../lib/ndarray.js' ); @@ -54,22 +53,14 @@ var cxnyn = require( './fixtures/column_major_xnyn.json' ); * @param {Object} t - test object * @param {Collection} actual - actual values * @param {Collection} expected - expected values -* @param {number} rtol - relative tolerance +* @param {NonNegativeInteger} ulp - maximum allowed ULP difference */ -function isApprox( t, actual, expected, rtol ) { - var delta; - var tol; +function isApprox( t, actual, expected, ulp ) { var i; t.strictEqual( actual.length, expected.length, 'returns expected value' ); for ( i = 0; i < expected.length; i++ ) { - if ( actual[ i ] === expected[ i ] ) { - t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' ); - } else { - delta = abs( actual[ i ] - expected[ i ] ); - tol = rtol * EPS * abs( expected[ i ] ); - t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' ); - } + t.strictEqual( isAlmostSameValue( actual[ i ], expected[ i ], ulp ), true, 'returns expected value' ); } } @@ -223,10 +214,13 @@ tape( 'the function throws an error if provided an invalid twelfth argument', fu tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (row-major, sx=1, sy=1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( rxpyp.A ); x = new Float64Array( rxpyp.x ); y = new Float64Array( rxpyp.y ); @@ -235,7 +229,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( rxpyp.order, rxpyp.uplo, rxpyp.N, rxpyp.alpha, a, rxpyp.lda, x, rxpyp.strideX, rxpyp.offsetX, rxpyp.beta, y, rxpyp.strideY, rxpyp.offsetY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -243,10 +237,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (column-major, sx=1, sy=1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( cxpyp.A ); x = new Float64Array( cxpyp.x ); y = new Float64Array( cxpyp.y ); @@ -255,7 +252,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( cxpyp.order, cxpyp.uplo, cxpyp.N, cxpyp.alpha, a, cxpyp.lda, x, cxpyp.strideX, cxpyp.offsetX, cxpyp.beta, y, cxpyp.strideY, cxpyp.offsetY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -263,10 +260,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (row-major, sx=1, sy=2)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( rxoyt.A ); x = new Float64Array( rxoyt.x ); y = new Float64Array( rxoyt.y ); @@ -275,7 +275,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( rxoyt.order, rxoyt.uplo, rxoyt.N, rxoyt.alpha, a, rxoyt.lda, x, rxoyt.strideX, rxoyt.offsetX, rxoyt.beta, y, rxoyt.strideY, rxoyt.offsetY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -283,10 +283,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (column-major, sx=1, sy=2)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( cxoyt.A ); x = new Float64Array( cxoyt.x ); y = new Float64Array( cxoyt.y ); @@ -295,7 +298,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( cxoyt.order, cxoyt.uplo, cxoyt.N, cxoyt.alpha, a, cxoyt.lda, x, cxoyt.strideX, cxoyt.offsetX, cxoyt.beta, y, cxoyt.strideY, cxoyt.offsetY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -303,10 +306,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (row-major, sx=1, sy=-1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( rxpyn.A ); x = new Float64Array( rxpyn.x ); y = new Float64Array( rxpyn.y ); @@ -315,7 +321,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( rxpyn.order, rxpyn.uplo, rxpyn.N, rxpyn.alpha, a, rxpyn.lda, x, rxpyn.strideX, rxpyn.offsetX, rxpyn.beta, y, rxpyn.strideY, rxpyn.offsetY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -323,10 +329,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (column-major, sx=1, sy=-1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( cxpyn.A ); x = new Float64Array( cxpyn.x ); y = new Float64Array( cxpyn.y ); @@ -335,7 +344,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( cxpyn.order, cxpyn.uplo, cxpyn.N, cxpyn.alpha, a, cxpyn.lda, x, cxpyn.strideX, cxpyn.offsetX, cxpyn.beta, y, cxpyn.strideY, cxpyn.offsetY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -343,10 +352,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (row-major, sx=-1, sy=1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( rxnyp.A ); x = new Float64Array( rxnyp.x ); y = new Float64Array( rxnyp.y ); @@ -355,7 +367,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( rxnyp.order, rxnyp.uplo, rxnyp.N, rxnyp.alpha, a, rxnyp.lda, x, rxnyp.strideX, rxnyp.offsetX, rxnyp.beta, y, rxnyp.strideY, rxnyp.offsetY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -363,10 +375,13 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y` where `alpha` and `beta` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` symmetric matrix (column-major, sx=-1, sy=1)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( cxnyp.A ); x = new Float64Array( cxnyp.x ); y = new Float64Array( cxnyp.y ); @@ -375,7 +390,7 @@ tape( 'the function performs the matrix-vector operation `y = alpha*A*x + beta*y out = dsymv( cxnyp.order, cxnyp.uplo, cxnyp.N, cxnyp.alpha, a, cxnyp.lda, x, cxnyp.strideX, cxnyp.offsetX, cxnyp.beta, y, cxnyp.strideY, cxnyp.offsetY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -551,10 +566,13 @@ tape( 'when `α` is zero, the function scales the second input vector (column-ma tape( 'the function supports complex access patterns (row-major)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( rxnyn.A ); x = new Float64Array( rxnyn.x ); y = new Float64Array( rxnyn.y ); @@ -563,7 +581,7 @@ tape( 'the function supports complex access patterns (row-major)', function test out = dsymv( rxnyn.order, rxnyn.uplo, rxnyn.N, rxnyn.alpha, a, rxnyn.lda, x, rxnyn.strideX, rxnyn.offsetX, rxnyn.beta, y, rxnyn.strideY, rxnyn.offsetY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); }); @@ -571,10 +589,13 @@ tape( 'the function supports complex access patterns (row-major)', function test tape( 'the function supports complex access patterns (column-major)', function test( t ) { var expected; var out; + var ULP; var a; var x; var y; + ULP = 0; + a = new Float64Array( cxnyn.A ); x = new Float64Array( cxnyn.x ); y = new Float64Array( cxnyn.y ); @@ -583,7 +604,7 @@ tape( 'the function supports complex access patterns (column-major)', function t out = dsymv( cxnyn.order, cxnyn.uplo, cxnyn.N, cxnyn.alpha, a, cxnyn.lda, x, cxnyn.strideX, cxnyn.offsetX, cxnyn.beta, y, cxnyn.strideY, cxnyn.offsetY ); t.strictEqual( out, y, 'returns expected value' ); - isApprox( t, y, expected, 2.0 ); + isApprox( t, y, expected, ULP ); t.end(); });