Skip to content

add C implementation to @stdlib/math/base/special/ldexp #652

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

Merged
merged 60 commits into from
Dec 9, 2022
Merged

add C implementation to @stdlib/math/base/special/ldexp #652

merged 60 commits into from
Dec 9, 2022

Conversation

Pranavchiku
Copy link
Member

@Pranavchiku Pranavchiku commented Dec 4, 2022

Resolves #638

Checklist

  • update readme.md
  • include.gypi
  • binding.gyp
  • include/stdlib/math/base/special/
  • src
  • manifest.json
  • lib
  • examples
  • benchmark
  • test

@kgryte

@Pranavchiku
Copy link
Member Author

I am not much confident about the implementation of addon.c if you can check that would be of great help.

@kgryte
Copy link
Member

kgryte commented Dec 4, 2022

@Pranavchiku You need to refactor the addon.c file to handle two input arguments, not just one.

@kgryte kgryte added Enhancement Issue or pull request for enhancing existing functionality. Math Issue or pull request specific to math functionality. Native Addons Issue involves or relates to Node.js native add-ons. labels Dec 4, 2022
@Pranavchiku
Copy link
Member Author

@Pranavchiku You need to refactor the addon.c file to handle two input arguments, not just one.

I was thinking to wrap the frac and exp in <Float64Array>[frac, exp] and then pass it as a single argument.
Or should I go with passing 2 arguments separately?

@kgryte
Copy link
Member

kgryte commented Dec 4, 2022

Pass both separately. No need to pass as a separate array. We only pass arrays for base functions operating on numbers when we have multiple output arguments.

@Pranavchiku
Copy link
Member Author

I guess, we returned to original place !

The frexp updates were merged a couple of days ago (#651), so no need to merge from your local frexp2 branch.

It shows me lots of conflicts in different files, hence I chose to merge the existing frexp2 branch, but I didn't pull latest changes from upstream hence it had conflicts.

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.

The examples still need to be updated, but I can do this on my end.

@kgryte kgryte merged commit c996383 into stdlib-js:develop Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Issue or pull request for enhancing existing functionality. Math Issue or pull request specific to math functionality. Native Addons Issue involves or relates to Node.js native add-ons.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: add C implementation to @stdlib/math/base/special/ldexp
2 participants