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

refactor: update math/base/special/rcbrt #2189

Merged
merged 3 commits into from
Apr 19, 2024
Merged

refactor: update math/base/special/rcbrt #2189

merged 3 commits into from
Apr 19, 2024

Conversation

gunjjoshi
Copy link
Member

@gunjjoshi gunjjoshi commented Apr 19, 2024

Description

What is the purpose of this pull request?

This pull request:

  • uses main.c instead of earlier rcbrt.c.
  • modifies javascript examples.
  • addresses minor style issues.

Related Issues

Does this pull request have any related issues?

None.

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.

Made changes according to what we did in rcbrtf. Along with that, renamed rcbrt.c to main.c to achieve standardization.

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 Apr 19, 2024
Signed-off-by: GUNJ JOSHI <[email protected]>
Signed-off-by: GUNJ JOSHI <[email protected]>
"libraries": [
"-lm"
],
"libraries": [],
Copy link
Member

Choose a reason for hiding this comment

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

This is likely fine, as we explicitly specify -lm in the make recipes.

y = rcbrt( x[i] );
if ( y === expected[i] ) {
t.equal( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
y = rcbrt( x[ i ] );
Copy link
Member

Choose a reason for hiding this comment

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

These changes are fine. Note, however, that, for the most part, we are not militant about this. By default, yes, we use spaces. But we also allow some flexibility depending on what aspects of the code should be visually emphasized. Can describe in more detail our "philosophy", if it can be called that, during a call. But regardless, I wouldn't go overboard with going out of your way to enforce spacing, so long as a file is consistent (e.g., nothing along the lines of [i ] or [ i], etc). Otherwise, you're likely to just create more work for yourself.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay. I understood this now. I was a bit doubtful about this, that in most of our packages, we do not have spaces here, which seems completely reasonable now.

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. Thanks, @gunjjoshi!

@kgryte kgryte merged commit 5d37de2 into stdlib-js:develop Apr 19, 2024
8 checks passed
@gunjjoshi gunjjoshi deleted the rcbrt branch June 11, 2024 03:12
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants