Skip to content

Commit 2f1dc72

Browse files
committed
fix: bug fixing
1 parent 2ce1b69 commit 2f1dc72

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/node_modules/@stdlib/math/base/assert/is-oddf/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ bool = isOddf( NaN );
8686

8787
```javascript
8888
var randu = require( '@stdlib/random/base/randu' );
89-
var round = require( '@stdlib/math/base/special/round' );
89+
var roundf = require( '@stdlib/math/base/special/roundf' );
9090
var isOddf = require( '@stdlib/math/base/assert/is-oddf' );
9191
9292
var bool;
9393
var x;
9494
var i;
9595
9696
for ( 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
}

lib/node_modules/@stdlib/math/base/assert/is-oddf/src/addon.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 );

0 commit comments

Comments
 (0)