Skip to content

Commit 7aff2b5

Browse files
committed
fix: updates uniform to discrete-uniform
1 parent f201eee commit 7aff2b5

File tree

7 files changed

+21
-25
lines changed

7 files changed

+21
-25
lines changed

lib/node_modules/@stdlib/math/base/special/fibonacci-index/benchmark/benchmark.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var uniform = require( '@stdlib/random/array/uniform' );
25-
var floor = require( '@stdlib/math/base/special/floor' );
24+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
2625
var zeros = require( '@stdlib/array/base/zeros' );
2726
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2827
var fibonacci = require( '@stdlib/math/base/special/fibonacci' );
@@ -43,7 +42,7 @@ bench( pkg, function benchmark( b ) {
4342
FN[ i ] = fibonacci( i );
4443
}
4544

46-
x = floor( uniform( 100, 3.0, 78.0 ) );
45+
x = discreteUniform( 100, 3, 78 );
4746

4847
b.tic();
4948
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/math/base/special/fibonacci-index/benchmark/benchmark.native.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
25-
var uniform = require( '@stdlib/random/array/uniform' );
26-
var floor = require( '@stdlib/math/base/special/floor' );
25+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
2726
var zeros = require( '@stdlib/array/base/zeros' );
2827
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2928
var fibonacci = require( '@stdlib/math/base/special/fibonacci' );
@@ -52,7 +51,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5251
FN[ i ] = fibonacci( i );
5352
}
5453

55-
x = floor( uniform( 100, 3.0, 78.0 ) );
54+
x = discreteUniform( 100, 3, 78 );
5655

5756
b.tic();
5857
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/math/base/special/fibonacci-index/test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ tape( 'main export is a function', function test( t ) {
3737

3838
tape( 'if provided `NaN`, the function returns `NaN`', function test( t ) {
3939
var n = fibonacciIndex( NaN );
40-
t.strictEqual( isnan( n ), true, 'returns expected value when provided a NaN' );
40+
t.strictEqual( isnan( n ), true, 'returns expected value' );
4141
t.end();
4242
});
4343

lib/node_modules/@stdlib/math/base/special/fibonacci-index/test/test.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ tape( 'main export is a function', opts, function test( t ) {
4646

4747
tape( 'if provided `NaN`, the function returns `NaN`', opts, function test( t ) {
4848
var n = fibonacciIndex( NaN );
49-
t.strictEqual( isnan( n ), true, 'returns expected value when provided a NaN' );
49+
t.strictEqual( isnan( n ), true, 'returns expected value' );
5050
t.end();
5151
});
5252

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

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var uniform = require( '@stdlib/random/array/uniform' );
25-
var floor = require( '@stdlib/math/base/special/floor' );
24+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
2625
var round = require( '@stdlib/math/base/special/round' );
2726
var sqrt = require( '@stdlib/math/base/special/sqrt' );
2827
var pow = require( '@stdlib/math/base/special/pow' );
@@ -46,7 +45,7 @@ bench( pkg, function benchmark( b ) {
4645
var y;
4746
var i;
4847

49-
x = floor( uniform( 100, 0.0, 79.0 ) );
48+
x = discreteUniform( 100, 0, 79 );
5049

5150
b.tic();
5251
for ( i = 0; i < b.iterations; i++ ) {
@@ -72,7 +71,7 @@ bench( pkg+'::analytic', function benchmark( b ) {
7271
return round( pow( PHI, n ) / SQRT_5 );
7372
}
7473

75-
x = floor( uniform( 100, 0.0, 79.0 ) );
74+
x = discreteUniform( 100, 0, 79 );
7675

7776
b.tic();
7877
for ( i = 0; i < b.iterations; i++ ) {
@@ -94,7 +93,7 @@ bench( pkg+'::table', function benchmark( b ) {
9493
var y;
9594
var i;
9695

97-
x = floor( uniform( 100, 0.0, 79.0 ) );
96+
x = discreteUniform( 100, 0, 79 );
9897

9998
b.tic();
10099
for ( i = 0; i < b.iterations; i++ ) {
@@ -123,7 +122,7 @@ bench( pkg+'::naive_recursion', function benchmark( b ) {
123122
return fibonacci( n-1 ) + fibonacci( n-2 );
124123
}
125124

126-
x = floor( uniform( 100, 0.0, 40.0 ) ); // limit upper bound
125+
x = discreteUniform( 100, 0, 40 ); // limit upper bound
127126

128127
b.tic();
129128
for ( i = 0; i < b.iterations; i++ ) {
@@ -161,7 +160,7 @@ bench( pkg+'::recursion_memoized', function benchmark( b ) {
161160
return arr[ n ];
162161
}
163162

164-
x = floor( uniform( 100, 0.0, 40.0 ) ); // limit upper bound
163+
x = discreteUniform( 100, 0, 40 ); // limit upper bound
165164

166165
b.tic();
167166
for ( i = 0; i < b.iterations; i++ ) {
@@ -197,7 +196,7 @@ bench( pkg+'::naive_iterative', function benchmark( b ) {
197196
return arr[ n ];
198197
}
199198

200-
x = floor( uniform( 100, 0.0, 79.0 ) ); // limit upper bound
199+
x = discreteUniform( 100, 0, 79 ); // limit upper bound
201200

202201
b.tic();
203202
for ( i = 0; i < b.iterations; i++ ) {
@@ -235,7 +234,7 @@ bench( pkg+'::iterative', function benchmark( b ) {
235234
return b;
236235
}
237236

238-
x = floor( uniform( 100, 0.0, 79.0 ) );
237+
x = discreteUniform( 100, 0, 79 );
239238

240239
b.tic();
241240
for ( i = 0; i < b.iterations; i++ ) {
@@ -276,7 +275,7 @@ bench( pkg+'::iterative_memoized', function benchmark( b ) {
276275
return arr[ n ];
277276
}
278277

279-
x = floor( uniform( 100, 0.0, 79.0 ) );
278+
x = discreteUniform( 100, 0, 79 );
280279

281280
b.tic();
282281
for ( i = 0; i < b.iterations; i++ ) {
@@ -323,7 +322,7 @@ bench( pkg+'::iterative_doubling', function benchmark( b ) {
323322
return a + b;
324323
}
325324

326-
x = floor( uniform( 100, 0.0, 79.0 ) );
325+
x = discreteUniform( 100, 0, 79 );
327326

328327
b.tic();
329328
for ( i = 0; i < b.iterations; i++ ) {
@@ -387,7 +386,7 @@ bench( pkg+'::iterative_doubling_memoized', function benchmark( b ) {
387386
return a + b;
388387
}
389388

390-
x = floor( uniform( 100, 0.0, 79.0 ) );
389+
x = discreteUniform( 100, 0, 79 );
391390

392391
b.tic();
393392
for ( i = 0; i < b.iterations; i++ ) {

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
25-
var uniform = require( '@stdlib/random/array/uniform' );
26-
var floor = require( '@stdlib/math/base/special/floor' );
25+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
2726
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2827
var tryRequire = require( '@stdlib/utils/try-require' );
2928
var pkg = require( './../package.json' ).name;
@@ -44,7 +43,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
4443
var y;
4544
var i;
4645

47-
x = floor( uniform( 100, 0.0, 79.0 ) );
46+
x = discreteUniform( 100, 0, 79 );
4847

4948
b.tic();
5049
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/math/base/special/fibonacci/test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ tape( 'if provided a negative number, the function returns `NaN`', function test
5454

5555
tape( 'if provided positive infinity, the function returns `NaN`', function test( t ) {
5656
var v = fibonacci( PINF );
57-
t.strictEqual( isnan( v ), true, 'returns expected value when provided +infinity' );
57+
t.strictEqual( isnan( v ), true, 'returns expected value' );
5858
t.end();
5959
});
6060

6161
tape( 'if provided `NaN`, the function returns `NaN`', function test( t ) {
6262
var v = fibonacci( NaN );
63-
t.strictEqual( isnan( v ), true, 'returns expected value when provided a NaN' );
63+
t.strictEqual( isnan( v ), true, 'returns expected value' );
6464
t.end();
6565
});
6666

0 commit comments

Comments
 (0)