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/lucasf #3348

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from

Conversation

aayush0325
Copy link
Member

@aayush0325 aayush0325 commented Dec 6, 2024

Progresses #649

Description

What is the purpose of this pull request?

This pull request:

  • adds math/base/special/lucasf

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.

This branch can further be rebased to include constants/float32/max-safe-nth-lucas macro from #3337 instead of using just 34 as it is.

Checklist

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


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review. bot: In Progress Pull request is currently awaiting automation. labels Dec 6, 2024
@stdlib-bot
Copy link
Contributor

@aayush0325, available slash commands include:

  • /stdlib check-files - Check for required files.
  • /stdlib update-copyright-years - Update copyright header years.
  • /stdlib lint-autofix - Auto-fix lint errors.
  • /stdlib merge - Merge changes from develop branch into this PR.
  • /stdlib rebase - Rebase this PR on top of develop branch.

@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Dec 6, 2024
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Dec 6, 2024

Coverage Report

Package Statements Branches Functions Lines
math/base/special/lucasf $\color{green}224/224$
$\color{green}+100.00\%$
$\color{green}10/10$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}224/224$
$\color{green}+100.00\%$

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

@aayush0325
Copy link
Member Author

/stdlib update-copyright-years

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Dec 6, 2024
@stdlib-bot
Copy link
Contributor

@aayush0325, slash command not recognized. Please use /stdlib help to view available commands.

@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Dec 6, 2024
@aayush0325
Copy link
Member Author

/stdlib update-copyright-years

@stdlib-bot stdlib-bot added bot: In Progress Pull request is currently awaiting automation. and removed bot: In Progress Pull request is currently awaiting automation. labels Dec 6, 2024
@gunjjoshi
Copy link
Member

@aayush0325 Thanks for working on this. Can you please update both JS and C benchmarks to pre-compute the values, outside the loop?

@aayush0325
Copy link
Member Author

got it, pushing soon.

@aayush0325
Copy link
Member Author

pushed

@aayush0325
Copy link
Member Author

/stdlib merge

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Dec 13, 2024
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Dec 13, 2024
@aayush0325
Copy link
Member Author

aayush0325 commented Dec 17, 2024

good afternoon @gunjjoshi. I've pushed the requested changes. However a linting error was stopping me from updating the description in lib/index.js to "Compute/Computes the nth Lucas number as a single-precision floating-point number." Please let me know how to proceed here.

@gunjjoshi
Copy link
Member

gunjjoshi commented Dec 17, 2024

@aayush0325 You don't have to use Compute/Computes everywhere. What I was trying to say was,
For files such as index.js, package.json, etc. we should use:

Compute the nth Lucas number as a single-precision floating-point number.

while, for the rest files, we should use:

Computes the nth Lucas number as a single-precision floating-point number.

@aayush0325
Copy link
Member Author

Ah, my bad. pushing the needed changes soon.

@aayush0325
Copy link
Member Author

Pushed, sorry for the misunderstanding.

@aayush0325 aayush0325 requested a review from gunjjoshi December 17, 2024 10:31
@aayush0325
Copy link
Member Author

I don't get why this is failing the linting tests this seems to run fine locally on the dev container @gunjjoshi

@aayush0325
Copy link
Member Author

/stdlib merge

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Dec 18, 2024
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Dec 18, 2024
@kgryte
Copy link
Member

kgryte commented Dec 19, 2024

/stdlib merge

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Dec 19, 2024
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Dec 19, 2024
@kgryte
Copy link
Member

kgryte commented Dec 19, 2024

/stdlib merge

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Dec 19, 2024
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Dec 19, 2024
#include "stdlib/math/base/napi/unary.h"

// cppcheck-suppress shadowFunction
STDLIB_MATH_BASE_NAPI_MODULE_I_F( stdlib_base_lucasf )
Copy link
Member

@gunjjoshi gunjjoshi Dec 20, 2024

Choose a reason for hiding this comment

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

Although we have used STDLIB_MATH_BASE_NAPI_MODULE_I_D in math/base/special/lucas, we can use STDLIB_MATH_BASE_NAPI_MODULE_I_I here and modify the function signature accordingly, as we have the API ready which accepts and returns an int32 value, but we don't have an API to accept int32 and return an int64 value, as in the case of lucas.

Copy link
Member

@gunjjoshi gunjjoshi Dec 20, 2024

Choose a reason for hiding this comment

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

@aayush0325 aayush0325 closed this Feb 16, 2025
@aayush0325 aayush0325 deleted the lucasf branch February 16, 2025 08:37
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Feb 16, 2025
@kgryte
Copy link
Member

kgryte commented Feb 16, 2025

@aayush0325 Did you mean to delete the lucasf branch?

@aayush0325 aayush0325 restored the lucasf branch February 16, 2025 09:18
@aayush0325 aayush0325 reopened this Feb 16, 2025
@aayush0325
Copy link
Member Author

@aayush0325 Did you mean to delete the lucasf branch?

was getting rid of the merged branches, this was a mistake 😅

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.

4 participants