-
-
Notifications
You must be signed in to change notification settings - Fork 600
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 math/base/assert/is-composite
#1918
feat: add C implementation for math/base/assert/is-composite
#1918
Conversation
This commit if applied adds the C implementation to @stdlib/math/base/assert/is-composite package
working on the C examples and benchmarks! Edit: have fixed the .c file! Requesting you to review the PR. Thanks! Note: The current function checks if a number is composite using: return ( stdlib_base_is_integer( x ) && ( x > 1 ) && ( x != STDLIB_CONSTANT_FLOAT64_PINF ) && ( !stdlib_base_is_prime( x ) ) ); This is written according to the function written in ...
if(condition1){
return false;
}
... (using multiple if statements for filtering instead of performing |
Signed-off-by: Rutam <[email protected]>
Signed-off-by: Rutam <[email protected]>
Signed-off-by: Rutam <[email protected]>
lib/node_modules/@stdlib/math/base/assert/is-composite/benchmark/benchmark.native.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/assert/is-composite/manifest.json
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/assert/is-composite/src/main.c
Outdated
Show resolved
Hide resolved
Signed-off-by: Pranav <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks @performant23 !
lib/node_modules/@stdlib/math/base/assert/is-composite/lib/native.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/assert/is-composite/README.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Philipp Burckhardt <[email protected]>
This commit if applied adds the C implementation to
@stdlib/math/base/assert/is-composite
packageThis pull request:
@stdlib/math/base/assert/is-composite
Related Issues
This pull request:
@stdlib/math/base/assert/is-composite
#1901Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers