Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add C implementation for number/float32/base/signbit #3399

Merged
merged 21 commits into from
Jan 14, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: src errors
Neerajpathak07 committed Dec 12, 2024
commit 4ddc96d26a9488b374718a73de2849023a7d9105
Original file line number Diff line number Diff line change
@@ -60,9 +60,12 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
}

float value;
status = napi_get_value_float( env, argv[ 0 ], &value );
double temp;
status = napi_get_value_double( env, argv[ 0 ], &temp );
assert( status == napi_ok );

value = (float)temp;

int8_t out = stdlib_base_float32_signbit( value );

napi_value v;

Unchanged files with check annotations Beta

// MAIN //
/**

Check failure on line 29 in lib/node_modules/@stdlib/number/float32/base/signbit/lib/native.js

GitHub Actions / Lint Changed Files

Encountered an error while running code: `toFloat32 is not defined`.Did you mean to include a `// throws <ReferenceError>` annotation instead of `// returns false`?

Check failure on line 29 in lib/node_modules/@stdlib/number/float32/base/signbit/lib/native.js

GitHub Actions / Lint Changed Files

Encountered an error while running code: `toFloat32 is not defined`.Did you mean to include a `// throws <ReferenceError>` annotation instead of `// returns true`?

Check failure on line 29 in lib/node_modules/@stdlib/number/float32/base/signbit/lib/native.js

GitHub Actions / Lint Changed Files

Encountered an error while running code: `toFloat32 is not defined`.Did you mean to include a `// throws <ReferenceError>` annotation instead of `// returns false`?

Check failure on line 29 in lib/node_modules/@stdlib/number/float32/base/signbit/lib/native.js

GitHub Actions / Lint Changed Files

Encountered an error while running code: `toFloat32 is not defined`.Did you mean to include a `// throws <ReferenceError>` annotation instead of `// returns true`?
* Returns a boolean indicating if the sign bit is on (true) or off (false).
*
* @private