WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 0872aba

Browse files
committed
fix: add fii_f NAPI dependency to manifest.json
1 parent 0dbff21 commit 0872aba

File tree

1 file changed

+5
-3
lines changed
  • lib/node_modules/@stdlib/math/base/special/truncbf/benchmark

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* you may not use this file except in compliance with the License.
88
* You may obtain a copy of the License at
99
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* http://www.apache.org/licenses/LICENSE-2.0
1111
*
1212
* Unless required by applicable law or agreed to in writing, software
1313
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,6 +23,7 @@
2323
var bench = require( '@stdlib/bench' );
2424
var randu = require( '@stdlib/random/base/randu' );
2525
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
26+
var trunc = require( '@stdlib/math/base/special/trunc' );
2627
var pkg = require( './../package.json' ).name;
2728
var truncbf = require( './../lib' );
2829

@@ -58,8 +59,9 @@ bench( pkg+'::built-in', function benchmark( b ) {
5859
b.tic();
5960
for ( i = 0; i < b.iterations; i++ ) {
6061
x = (randu() * 100.0) - 50.0;
61-
// Use Math.trunc instead of just trunc:
62-
y = Math.trunc( x * 100.0 ) / 100.0;
62+
63+
// Use stdlib trunc instead of Math.trunc:
64+
y = trunc( x * 100.0 ) / 100.0;
6365
if ( isnanf( y ) ) {
6466
b.fail( 'should not return NaN' );
6567
}

0 commit comments

Comments
 (0)