Skip to content

Commit a830b82

Browse files
chore: refactoring benchmarks
1 parent 709fa52 commit a830b82

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var pow = require( '@stdlib/math/base/special/pow' );
3030
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
3131
var PHI = require( '@stdlib/constants/float32/phi' );
3232
var pkg = require( './../package.json' ).name;
33-
var FIBONACCI = require( './../lib/fibonacci.json' );
33+
var FIBONACCIF = require( './../lib/fibonaccif.json' );
3434
var fibonaccif = require( './../lib' );
3535

3636

@@ -80,7 +80,7 @@ bench( pkg+'::analytic', function benchmark( b ) {
8080
}
8181
}
8282
b.toc();
83-
if ( isnan( y ) ) {
83+
if ( isnanf( y ) ) {
8484
b.fail( 'should not return NaN' );
8585
}
8686
b.pass( 'benchmark finished' );
@@ -95,13 +95,13 @@ bench( pkg+'::table', function benchmark( b ) {
9595
b.tic();
9696
for ( i = 0; i < b.iterations; i++ ) {
9797
x = floorf( randu()*37.0 );
98-
y = FIBONACCI[ x ];
98+
y = FIBONACCIF[ x ];
9999
if ( isnanf( y ) ) {
100100
b.fail( 'should not return NaN' );
101101
}
102102
}
103103
b.toc();
104-
if ( isnan( y ) ) {
104+
if ( isnanf( y ) ) {
105105
b.fail( 'should not return NaN' );
106106
}
107107
b.pass( 'benchmark finished' );
@@ -129,13 +129,13 @@ bench( pkg+'::naive_recursion', function benchmark( b ) {
129129
}
130130
}
131131
b.toc();
132-
if ( isnan( y ) ) {
132+
if ( isnanf( y ) ) {
133133
b.fail( 'should not return NaN' );
134134
}
135135
b.pass( 'benchmark finished' );
136136
b.end();
137137
});
138-
f
138+
139139
bench( pkg+'::recursion_memoized', function benchmark( b ) {
140140
var arr;
141141
var N;

lib/node_modules/@stdlib/math/base/special/fibonaccif/docs/repl.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11

22
{{alias}}( n )
3-
Computes the nth Fibonacci number as a single-precision floating-point number.
3+
Computes the nth Fibonacci number as a single-precision
4+
floating-point number.
45

56
Fibonacci numbers follow the recurrence relation
67

7-
F_n = F_{n-1} + F_{n-2}
8+
F_n = F_{n-1} + F_{n-2}
89

910
with seed values F_0 = 0 and F_1 = 1.
1011

0 commit comments

Comments
 (0)