diff --git a/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.main.js b/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.main.js index 6bc57498d164..962b10d71e5f 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.main.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.main.js @@ -22,8 +22,7 @@ var tape = require( 'tape' ); var Float32Array = require( '@stdlib/array/float32' ); -var EPS = require( '@stdlib/constants/float32/eps' ); -var abs = require( '@stdlib/math/base/special/abs' ); +var isAlmostSameValuef = require( '@stdlib/number/float32/base/assert/is-almost-same-value' ); var srotm = require( './../lib' ); @@ -36,22 +35,14 @@ var srotm = require( './../lib' ); * @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( isAlmostSameValuef( actual[ i ], expected[ i ], ulp ), true, 'returns expected value' ); } } @@ -104,8 +95,8 @@ tape( 'the function applies a modified Givens plane rotation (sx=1, sy=1)', func x = new Float32Array( xbuf ); y = new Float32Array( ybuf ); out = srotm.main( N[ i ], x, 1, y, 1, param ); - isApprox( t, x, xe[ i ], 5.0 ); - isApprox( t, y, ye[ i ], 5.0 ); + isApprox( t, x, xe[ i ], 1 ); + isApprox( t, y, ye[ i ], 0 ); t.strictEqual( out, y, 'returns expected value' ); } t.end(); @@ -146,8 +137,8 @@ tape( 'the function applies a modified Givens plane rotation (sx=2, sy=-2)', fun x = new Float32Array( xbuf ); y = new Float32Array( ybuf ); out = srotm.main( N[ i ], x, 2, y, -2, param ); - isApprox( t, x, xe[ i ], 10.0 ); - isApprox( t, y, ye[ i ], 10.0 ); + isApprox( t, x, xe[ i ], 0 ); + isApprox( t, y, ye[ i ], 1 ); t.strictEqual( out, y, 'returns expected value' ); } t.end(); @@ -188,8 +179,8 @@ tape( 'the function applies a modified Givens plane rotation (sx=-2, sy=1)', fun x = new Float32Array( xbuf ); y = new Float32Array( ybuf ); out = srotm.main( N[ i ], x, -2, y, 1, param ); - isApprox( t, x, xe[ i ], 10.0 ); - isApprox( t, y, ye[ i ], 10.0 ); + isApprox( t, x, xe[ i ], 1 ); + isApprox( t, y, ye[ i ], 2 ); t.strictEqual( out, y, 'returns expected value' ); } t.end(); @@ -230,8 +221,8 @@ tape( 'the function applies a plane rotation (sx=-1, sy=-2)', function test( t ) x = new Float32Array( xbuf ); y = new Float32Array( ybuf ); out = srotm.main( N[ i ], x, -1, y, -2, param ); - isApprox( t, x, xe[ i ], 4.0 ); - isApprox( t, y, ye[ i ], 4.0 ); + isApprox( t, x, xe[ i ], 1 ); + isApprox( t, y, ye[ i ], 0 ); t.strictEqual( out, y, 'returns expected value' ); } t.end(); @@ -277,8 +268,8 @@ tape( 'the `main` method applies a plane rotation', function test( t ) { 10.0 // 2 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 0 @@ -313,8 +304,8 @@ tape( 'the `main` method applies a plane rotation', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); @@ -359,8 +350,8 @@ tape( 'the `main` method supports an `x` stride', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 0 @@ -395,8 +386,8 @@ tape( 'the `main` method supports an `x` stride', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); @@ -441,8 +432,8 @@ tape( 'the `main` method supports a negative `x` stride', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 2 @@ -477,8 +468,8 @@ tape( 'the `main` method supports a negative `x` stride', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); @@ -523,8 +514,8 @@ tape( 'the `main` method supports a `y` stride', function test( t ) { 16.0 // 2 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 0 @@ -559,8 +550,8 @@ tape( 'the `main` method supports a `y` stride', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); @@ -605,8 +596,8 @@ tape( 'the `main` method supports a negative `y` stride', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 0 @@ -641,8 +632,8 @@ tape( 'the `main` method supports a negative `y` stride', function test( t ) { 2.0 // 0 ]); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); @@ -720,8 +711,8 @@ tape( 'the `main` method supports complex access patterns', function test( t ) { xe = new Float32Array( [ -0.9, -0.8, -0.5, 0.8, 0.9, -0.3, -0.4 ] ); ye = new Float32Array( [ 1.7, -0.9, 0.5, 0.7, -0.6, 0.2, 0.8 ] ); - isApprox( t, x, xe, 5.0 ); - isApprox( t, y, ye, 5.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); diff --git a/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.module.main.js b/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.module.main.js index c0f9c7af0a6d..ff8f41147449 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.module.main.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.module.main.js @@ -25,8 +25,7 @@ var tape = require( 'tape' ); var Memory = require( '@stdlib/wasm/memory' ); var Float32Array = require( '@stdlib/array/float32' ); -var EPS = require( '@stdlib/constants/float32/eps' ); -var abs = require( '@stdlib/math/base/special/abs' ); +var isAlmostSameValuef = require( '@stdlib/number/float32/base/assert/is-almost-same-value' ); var Module = require( './../lib' ).Module; @@ -39,22 +38,14 @@ var Module = require( './../lib' ).Module; * @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( isAlmostSameValuef( actual[ i ], expected[ i ], ulp ), true, 'returns expected value' ); } } @@ -115,8 +106,8 @@ tape( 'a module instance has a `main` method applies a modified Givens plane rot actualY = new Float32Array( 4 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 1 ); + isApprox( t, actualY, ye, 0 ); // Short datasets: xp = 0; @@ -138,8 +129,8 @@ tape( 'a module instance has a `main` method applies a modified Givens plane rot actualY = new Float32Array( 2 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 1 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -180,8 +171,8 @@ tape( 'a module instance has a `main` method applies a modified Givens plane rot actualY = new Float32Array( 7 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 1 ); t.end(); }); @@ -246,8 +237,8 @@ tape( 'a module instance has a `main` method which supports an `x` stride', func actualY = new Float32Array( 5 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -312,8 +303,8 @@ tape( 'a module instance has a `main` method which supports a negative `x` strid actualY = new Float32Array( 5 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -378,8 +369,8 @@ tape( 'a module instance has a `main` method which supports a `y` stride', funct actualY = new Float32Array( 5 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -444,8 +435,8 @@ tape( 'a module instance has a `main` method which supports a negative `y` strid actualY = new Float32Array( 5 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -583,8 +574,8 @@ tape( 'a module instance has a `main` method which supports complex access patte actualY = new Float32Array( 7 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); diff --git a/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.module.ndarray.js b/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.module.ndarray.js index 2fd8f43fc7f1..adcdd1207335 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.module.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.module.ndarray.js @@ -25,8 +25,7 @@ var tape = require( 'tape' ); var Memory = require( '@stdlib/wasm/memory' ); var Float32Array = require( '@stdlib/array/float32' ); -var EPS = require( '@stdlib/constants/float32/eps' ); -var abs = require( '@stdlib/math/base/special/abs' ); +var isAlmostSameValuef = require( '@stdlib/number/float32/base/assert/is-almost-same-value' ); var Module = require( './../lib' ).Module; @@ -39,22 +38,14 @@ var Module = require( './../lib' ).Module; * @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( isAlmostSameValuef( actual[ i ], expected[ i ], ulp ), true, 'returns expected value' ); } } @@ -115,8 +106,8 @@ tape( 'a module instance has an `ndarray` method applies a modified Givens plane actualY = new Float32Array( 4 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 1 ); + isApprox( t, actualY, ye, 0 ); // Short datasets: xp = 0; @@ -138,8 +129,8 @@ tape( 'a module instance has an `ndarray` method applies a modified Givens plane actualY = new Float32Array( 2 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 1 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -180,8 +171,8 @@ tape( 'a module instance has an `ndarray` method applies a modified Givens plane actualY = new Float32Array( 7 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 1 ); t.end(); }); @@ -246,8 +237,8 @@ tape( 'a module instance has an `ndarray` method which supports an `x` stride', actualY = new Float32Array( 5 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -312,8 +303,8 @@ tape( 'a module instance has an `ndarray` method which supports a negative `x` s actualY = new Float32Array( 5 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -366,8 +357,8 @@ tape( 'a module instance has an `ndarray` method which supports an `x` offset', actualY = new Float32Array( 5 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -432,8 +423,8 @@ tape( 'a module instance has an `ndarray` method which supports a `y` stride', f actualY = new Float32Array( 5 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -498,8 +489,8 @@ tape( 'a module instance has an `ndarray` method which supports a negative `y` s actualY = new Float32Array( 5 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -552,8 +543,8 @@ tape( 'a module instance has an `ndarray` method which supports a `y` offset', f actualY = new Float32Array( 5 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); @@ -691,8 +682,8 @@ tape( 'a module instance has an `ndarray` method which supports complex access p actualY = new Float32Array( 7 ); mod.read( yp, actualY ); - isApprox( t, actualX, xe, 2.0 ); - isApprox( t, actualY, ye, 2.0 ); + isApprox( t, actualX, xe, 0 ); + isApprox( t, actualY, ye, 0 ); t.end(); }); diff --git a/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.ndarray.js index 899bb05401df..ef50a7b95ee9 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/srotm/test/test.ndarray.js @@ -22,8 +22,7 @@ var tape = require( 'tape' ); var Float32Array = require( '@stdlib/array/float32' ); -var EPS = require( '@stdlib/constants/float32/eps' ); -var abs = require( '@stdlib/math/base/special/abs' ); +var isAlmostSameValuef = require( '@stdlib/number/float32/base/assert/is-almost-same-value' ); var srotm = require( './../lib' ); @@ -36,22 +35,14 @@ var srotm = require( './../lib' ); * @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( isAlmostSameValuef( actual[ i ], expected[ i ], ulp ), true, 'returns expected value' ); } } @@ -109,8 +100,8 @@ tape( 'the `ndarray` method applies a modified Givens plane rotation (sx=1, sy=1 x = new Float32Array( xbuf ); y = new Float32Array( ybuf ); out = srotm.ndarray( N[ i ], x, 1, ox[ i ], y, 1, oy[ i ], param ); - isApprox( t, x, xe[ i ], 5.0 ); - isApprox( t, y, ye[ i ], 5.0 ); + isApprox( t, x, xe[ i ], 1 ); + isApprox( t, y, ye[ i ], 0 ); t.strictEqual( out, y, 'returns expected value' ); } t.end(); @@ -156,8 +147,8 @@ tape( 'the `ndarray` method applies a modified Givens plane rotation (sx=2, sy=- x = new Float32Array( xbuf ); y = new Float32Array( ybuf ); out = srotm.ndarray( N[ i ], x, 2, ox[ i ], y, -2, oy[ i ], param ); - isApprox( t, x, xe[ i ], 10.0 ); - isApprox( t, y, ye[ i ], 10.0 ); + isApprox( t, x, xe[ i ], 0 ); + isApprox( t, y, ye[ i ], 1 ); t.strictEqual( out, y, 'returns expected value' ); } t.end(); @@ -203,8 +194,8 @@ tape( 'the `ndarray` method applies a modified Givens plane rotation (sx=-2, sy= x = new Float32Array( xbuf ); y = new Float32Array( ybuf ); out = srotm.ndarray( N[ i ], x, -2, ox[ i ], y, 1, oy[ i ], param ); - isApprox( t, x, xe[ i ], 10.0 ); - isApprox( t, y, ye[ i ], 10.0 ); + isApprox( t, x, xe[ i ], 1 ); + isApprox( t, y, ye[ i ], 2 ); t.strictEqual( out, y, 'returns expected value' ); } t.end(); @@ -250,8 +241,8 @@ tape( 'the `ndarray` method applies a plane rotation (sx=-1, sy=-2)', function t x = new Float32Array( xbuf ); y = new Float32Array( ybuf ); out = srotm.ndarray( N[ i ], x, -1, ox[ i ], y, -2, oy[ i ], param ); - isApprox( t, x, xe[ i ], 4.0 ); - isApprox( t, y, ye[ i ], 4.0 ); + isApprox( t, x, xe[ i ], 1 ); + isApprox( t, y, ye[ i ], 0 ); t.strictEqual( out, y, 'returns expected value' ); } t.end(); @@ -297,8 +288,8 @@ tape( 'the `ndarray` method applies a plane rotation', function test( t ) { 10.0 // 2 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 0 @@ -333,8 +324,8 @@ tape( 'the `ndarray` method applies a plane rotation', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); @@ -380,8 +371,8 @@ tape( 'the `ndarray` method supports an `x` stride', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 0 @@ -416,8 +407,8 @@ tape( 'the `ndarray` method supports an `x` stride', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); @@ -451,8 +442,8 @@ tape( 'the `ndarray` method supports an `x` offset', function test( t ) { xe = new Float32Array( [ 1.0, -16.0, -21.0, 4.0, 5.0 ] ); ye = new Float32Array( [ 10.0, 7.0, 14.0, 9.0, 10.0 ] ); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 1 @@ -487,8 +478,8 @@ tape( 'the `ndarray` method supports an `x` offset', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 2 @@ -523,8 +514,8 @@ tape( 'the `ndarray` method supports an `x` offset', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); @@ -569,8 +560,8 @@ tape( 'the `ndarray` method supports a `y` stride', function test( t ) { 16.0 // 2 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 0 @@ -605,8 +596,8 @@ tape( 'the `ndarray` method supports a `y` stride', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 1.0 ); - isApprox( t, y, ye, 1.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); @@ -640,8 +631,8 @@ tape( 'the `ndarray` method supports a `y` offset', function test( t ) { xe = new Float32Array( [ -20.0, -25.0, 3.0, 4.0, 5.0 ] ); ye = new Float32Array( [ 6.0, 9.0, 8.0, 13.0, 10.0 ] ); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 0 @@ -676,8 +667,8 @@ tape( 'the `ndarray` method supports a `y` offset', function test( t ) { 10.0 ]); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); x = new Float32Array([ 1.0, // 0 @@ -712,8 +703,8 @@ tape( 'the `ndarray` method supports a `y` offset', function test( t ) { 2.0 // 0 ]); - isApprox( t, x, xe, 2.0 ); - isApprox( t, y, ye, 2.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); }); @@ -791,8 +782,8 @@ tape( 'the `ndarray` method supports complex access patterns', function test( t xe = new Float32Array( [ -0.9, -0.8, -0.5, 0.8, 0.9, -0.3, -0.4 ] ); ye = new Float32Array( [ 1.7, -0.9, 0.5, 0.7, -0.6, 0.2, 0.8 ] ); - isApprox( t, x, xe, 5.0 ); - isApprox( t, y, ye, 5.0 ); + isApprox( t, x, xe, 0 ); + isApprox( t, y, ye, 0 ); t.end(); });