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/minf #2820

Merged
merged 2 commits into from
Aug 23, 2024
Merged

feat: add math/base/special/minf #2820

merged 2 commits into from
Aug 23, 2024

Conversation

gunjjoshi
Copy link
Member

Description

What is the purpose of this pull request?

This pull request:

float stdlib_base_minf( const float x, const float 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.

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 Aug 22, 2024
@kgryte kgryte added the Feature Issue or pull request for adding a new feature. label Aug 23, 2024
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

LGTM. Two things to note, @gunjjoshi:

  1. In general, we've moved away from test description messages like returns -0 and use the convention returns expected value. The rationale is that we'll eventually have our own in-house test runner which will provide a default error message. By standardizing around returns expected value (where appropriate), we'll make the migration process a bit easier.
  2. I refactored the benchmarks to pull values from a preallocated array, rather than generating them from within the loop. The rationale is that generating random values in the loop conflates value generation with the implementation being benchmarked. Ideally, our benchmark performance should be solely due to aspects of the implementation, not the PRNG. Going forward, it would be good to write benchmarks accordingly. Especially here, the observed performance is dominated by random value generation and not the actual implementation. We want to avoid this.

@kgryte kgryte merged commit ef703d6 into stdlib-js:develop Aug 23, 2024
15 checks passed
@kgryte kgryte mentioned this pull request Aug 23, 2024
1 task
@gunjjoshi
Copy link
Member Author

Thanks for clarifying this @kgryte! I'll be following these conventions from now on, and will update other open PRs accordingly.

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.

3 participants