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/fmod #2562

Merged
merged 5 commits into from
Jul 14, 2024
Merged

Conversation

gunjjoshi
Copy link
Member

@gunjjoshi gunjjoshi commented Jul 11, 2024

Resolves #2405.

Description

What is the purpose of this pull request?

This pull request:

  • adds math/base/special/fmod.
double stdlib_base_fmod( const double x, const double y );

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 implemented this in C, and have used % in javascript, as it shows similar behaviour. Do we need to implement fmod in javascript too?
  • Code coverage report:
Screenshot 2024-07-11 at 17 24 38

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 Jul 11, 2024
@gunjjoshi gunjjoshi marked this pull request as draft July 11, 2024 11:53
@gunjjoshi gunjjoshi marked this pull request as ready for review July 11, 2024 12:02
@kgryte kgryte added the Feature Issue or pull request for adding a new feature. label Jul 14, 2024
@kgryte kgryte requested a review from Planeshifter July 14, 2024 02:00
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.

C code tracks the reference implementation and I am not seeing any issues. Will merge shortly.

I have implemented this in C, and have used % in javascript, as it shows similar behaviour. Do we need to implement fmod in javascript too?

As discussed, I believe we are fine in defaulting to the native functionality in JS.

@Planeshifter Planeshifter merged commit 8558d86 into stdlib-js:develop Jul 14, 2024
8 checks passed
@gunjjoshi gunjjoshi deleted the fmod branch July 14, 2024 03:15
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: add math/base/special/fmod
4 participants