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 math/base/assert/is-oddf #3316

Closed
wants to merge 25 commits into from

Conversation

aayush0325
Copy link
Member

@aayush0325 aayush0325 commented Dec 2, 2024

Resolves #3313

Description

What is the purpose of this pull request?

This pull request:

  • adds math/base/assert/is-oddf

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

There wasn't a macro for the addon of this particular function so I've just explicitly type-casted the double value to a float, is that correct? (please see src/addon.c)

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added the Math Issue or pull request specific to math functionality. label Dec 2, 2024
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Dec 2, 2024

Coverage Report

Package Statements Branches Functions Lines
math/base/assert/is-oddf $\color{green}161/161$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}161/161$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@gunjjoshi
Copy link
Member

@aayush0325 We should pre-compute the values for the C and JS benchmarks, as we do here: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/assert/is-evenf/benchmark

@gunjjoshi
Copy link
Member

There wasn't a macro for the addon of this particular function so I've just explicitly type-casted the double value to a float, is that correct? (please see src/addon.c)

@aayush0325 You can follow what we've done in https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/math/base/assert/is-evenf/src/addon.c. We've used available macros to avoid writing the whole logic again.

@aayush0325
Copy link
Member Author

thanks for reviewing @gunjjoshi ! i've pushed the requested changes.

@aayush0325 aayush0325 requested a review from gunjjoshi December 3, 2024 09:09
Signed-off-by: Gunj Joshi <[email protected]>
Signed-off-by: Gunj Joshi <[email protected]>
Signed-off-by: Gunj Joshi <[email protected]>
Signed-off-by: Gunj Joshi <[email protected]>
@gunjjoshi
Copy link
Member

Apart from one change to update JS examples, everything else looks good to me.

@aayush0325 aayush0325 requested a review from gunjjoshi December 3, 2024 14:54
@aayush0325 aayush0325 requested a review from gunjjoshi December 3, 2024 16:08
@kgryte kgryte added Feature Issue or pull request for adding a new feature. Needs Review A pull request which needs code review. labels Dec 3, 2024
@kgryte
Copy link
Member

kgryte commented Dec 3, 2024

Looks like this PR is a duplicate of #3125. @gunjjoshi Would you mind checking which PR we should proceed with?

@aayush0325
Copy link
Member Author

my apologies, closing this.

@aayush0325 aayush0325 closed this Dec 4, 2024
@aayush0325 aayush0325 deleted the is-oddf branch February 16, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issue or pull request for adding a new feature. Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: add math/base/assert/is-oddf
4 participants