@@ -350,7 +350,7 @@ void _RunFunctionMatrixArrayTests(void)
350350 EidosAssertScriptSuccess_I (" tr(matrix(1:9, ncol=3));" , 1 + 5 + 9 );
351351 EidosAssertScriptSuccess_F (" tr(matrix(1.0:9, ncol=3));" , 1 + 5 + 9 );
352352 EidosAssertScriptSuccess_F (" tr(matrix(c(1.25, -7.8, 3.4, 6.1, 4.75, 8.2, -0.3, 8.6, -1.5), ncol=3));" , 1.25 + 4.75 + -1.5 );
353- EidosAssertScriptSuccess_L (" x = matrix(runif(100), ncol=10); abs (tr(x) - sum(diag(x))) < 1e-10 ;" , true ); // tolerance for SIMD
353+ EidosAssertScriptSuccess_L (" x = matrix(runif(100), ncol=10); allClose (tr(x), sum(diag(x)));" , true ); // tolerance for SIMD
354354 EidosAssertScriptSuccess_L (" x = matrix(rdunif(100, -1000, 1000), ncol=10); identical(tr(x), sum(diag(x)));" , true );
355355
356356 // upperTri()
@@ -377,15 +377,15 @@ void _RunFunctionMatrixArrayTests(void)
377377 EidosAssertScriptSuccess_L (" x = 1.0:12; y = matrix(x, nrow=3); identical(rowSums(y), c(22.0, 26, 30));" , true );
378378 EidosAssertScriptSuccess_L (" x = (rbinom(100, 1, 0.4) == 1); y = matrix(x, nrow=10); identical(rowSums(y), apply(y, 0, 'sum(applyValue);'));" , true );
379379 EidosAssertScriptSuccess_L (" x = rdunif(100, -1000, 1000); y = matrix(x, nrow=10); identical(rowSums(y), apply(y, 0, 'sum(applyValue);'));" , true );
380- EidosAssertScriptSuccess_L (" x = runif(100); y = matrix(x, nrow=10); all(abs( rowSums(y) - apply(y, 0, 'sum(applyValue);')) < 1e-10 );" , true ); // tolerance for SIMD
380+ EidosAssertScriptSuccess_L (" x = runif(100); y = matrix(x, nrow=10); allClose( rowSums(y), apply(y, 0, 'sum(applyValue);'));" , true ); // tolerance for SIMD
381381
382382 // colSums()
383383 EidosAssertScriptSuccess_L (" x = c(T,T,F,F,T,F,F,T,T,F,F,T); y = matrix(x, nrow=3); identical(colSums(y), c(2, 1, 2, 1));" , true );
384384 EidosAssertScriptSuccess_L (" x = 1:12; y = matrix(x, nrow=3); identical(colSums(y), c(6, 15, 24, 33));" , true );
385385 EidosAssertScriptSuccess_L (" x = 1.0:12; y = matrix(x, nrow=3); identical(colSums(y), c(6.0, 15, 24, 33));" , true );
386386 EidosAssertScriptSuccess_L (" x = (rbinom(100, 1, 0.4) == 1); y = matrix(x, nrow=10); identical(colSums(y), apply(y, 1, 'sum(applyValue);'));" , true );
387387 EidosAssertScriptSuccess_L (" x = rdunif(100, -1000, 1000); y = matrix(x, nrow=10); identical(colSums(y), apply(y, 1, 'sum(applyValue);'));" , true );
388- EidosAssertScriptSuccess_L (" x = runif(100); y = matrix(x, nrow=10); all(abs( colSums(y) - apply(y, 1, 'sum(applyValue);')) < 1e-10 );" , true ); // tolerance for SIMD
388+ EidosAssertScriptSuccess_L (" x = runif(100); y = matrix(x, nrow=10); allClose( colSums(y), apply(y, 1, 'sum(applyValue);'));" , true ); // tolerance for SIMD
389389}
390390
391391#pragma mark filesystem access
0 commit comments