Skip to content

Commit 74d03ec

Browse files
committed
fix: add randu import and fix line lengths in both benchmark files
1 parent 3007d44 commit 74d03ec

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/node_modules/@stdlib/math/base/special/croundnf/benchmark/benchmark.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ function createBenchmark( len ) {
8080

8181
b.tic();
8282
for ( i = 0; i < b.iterations; i++ ) {
83-
y = croundnf( new Complex64( xre[ i%len ], xim[ i%len ] ), n[ i%len ] );
83+
y = croundnf(
84+
new Complex64( xre[ i%len ], xim[ i%len ] ), n[ i%len ]
85+
);
8486
if ( isnanf( realf( y ) ) ) {
8587
b.fail( 'should not return NaN' );
8688
}

lib/node_modules/@stdlib/math/base/special/croundnf/benchmark/benchmark.native.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
25+
var randu = require( '@stdlib/random/base/randu' );
2526
var uniform = require( '@stdlib/random/array/uniform' );
2627
var filledarrayBy = require( '@stdlib/array/filled-by' );
2728
var floor = require( '@stdlib/math/base/special/floor' );
@@ -73,7 +74,7 @@ function createBenchmark( len ) {
7374
* @returns {integer} pseudorandom integer
7475
*/
7576
function discreteUniform() {
76-
return floor( ( Math.random()*10.0 ) - 5.0 );
77+
return floor( ( randu()*10.0 ) - 5.0 );
7778
}
7879

7980
/**

0 commit comments

Comments
 (0)