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/special/roundf #2725

Merged
merged 14 commits into from
Aug 8, 2024
Merged

Conversation

gunjjoshi
Copy link
Member

@gunjjoshi gunjjoshi commented Aug 1, 2024

Description

What is the purpose of this pull request?

This pull request:

float stdlib_base_roundf( const float x );

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

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

  • I have emulated the logic of the C implementation of math/base/special/round in the javascript implementation of roundf as well, rather than using a built-in function. I believe it would be great if we update math/base/special/round too, thus avoiding the built-in function.
  • I have used 8388608.0 as we're dealing with float, rather than 4503599627370496.0 as the extreme value.
  • Coverage report:
Screenshot 2024-08-01 at 23 55 00

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 Aug 1, 2024
@Planeshifter Planeshifter self-requested a review August 3, 2024 00:46
@Planeshifter Planeshifter added the Needs Review A pull request which needs code review. label Aug 3, 2024
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Copy link
Member

@Planeshifter Planeshifter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Planeshifter Planeshifter added Ready To Merge A pull request which is ready to be merged. and removed Needs Review A pull request which needs code review. labels Aug 8, 2024
@Planeshifter Planeshifter merged commit fabbf5a into stdlib-js:develop Aug 8, 2024
16 checks passed
gunjjoshi added a commit to gunjjoshi/stdlib that referenced this pull request Aug 21, 2024
PR-URL: stdlib-js#2725
Ref: stdlib-js#649 

---------

Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com>
Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Math Issue or pull request specific to math functionality. Ready To Merge A pull request which is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants