File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
lib/node_modules/@stdlib/math/base/assert/is-oddf Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -86,15 +86,15 @@ bool = isOddf( NaN );
8686
8787` ` ` javascript
8888var randu = require( '@stdlib/random/base/randu' );
89- var round = require( '@stdlib/math/base/special/round ' );
89+ var roundf = require( '@stdlib/math/base/special/roundf ' );
9090var isOddf = require( '@stdlib/math/base/assert/is-oddf' );
9191
9292var bool;
9393var x;
9494var i;
9595
9696for ( i = 0; i < 100; i++ ) {
97- x = round ( randu() * 100.0 );
97+ x = roundf ( randu() * 100.0 );
9898 bool = isOddf( x );
9999 console.log( '%d is %s', x, ( bool ) ? 'odd' : 'not odd' );
100100}
Original file line number Diff line number Diff line change @@ -58,11 +58,11 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
5858 return NULL ;
5959 }
6060
61- float x ;
62- status = napi_get_value_float ( env , argv [ 0 ], & x );
61+ double x ;
62+ status = napi_get_value_double ( env , argv [ 0 ], & x );
6363 assert ( status == napi_ok );
6464
65- bool result = stdlib_base_is_oddf ( x );
65+ bool result = stdlib_base_is_oddf ( ( float ) x );
6666
6767 napi_value v ;
6868 status = napi_create_int32 ( env , (int32_t )result , & v );
You can’t perform that action at this time.
0 commit comments