-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Add double-factorial implementation #1112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hi there! 👋
And thank you for opening your first pull request! We will review it shortly. 🏃 💨
As discussed with regard to extension to complex numbers (https://en.wikipedia.org/wiki/Double_factorial#Extensions), the gamma approximation does not agree for even integers. As such, I am inclined to think we should stick with the "classic" definition. We could, in theory, extend to negative integers; however, I don't think there's an immediate use case, so leaving as restricted to nonnegative integers, seems fine with me. |
Additionally, I think that manually re-computing via a loop is fine. A look-up table would likely be a bit faster; however, a static table would significantly increase bundle sizes for what is likely to be a function which is not heavily used. |
This commit adds license to test.js per project requirements.
This commit (1) edits code to conform to style guide; changes 'let' to 'var', and returns NaN for bad input.
This commit fixes typo in variable name and edits to conform to style guide.
This commit deletes unused decimals code in benchmark.
As stated in short message.
This commit adds in repl.txt, a standard file not included when project was started.
As stated above.
To stop git from listing files as untraced in ../factorial directory.
no-verify commit per A. Reines as typescript linter is to be replaced.
This commit moves README.md from the wrong directory and corrects some lint errors.
Restore after inadvertently deleting.
This commit adds integers.json, used for testing factorial2. NB these values are not from Julia but hand calculated.
This file is copied and adapted from factorial directory.
As stated in commit header.
This commit corrects an error as said file should not have been in this directory in the first place.
Had added .gitignore but not needed all derived from inadvertent copying of files into wrong directory.
Decimals are removed as the input values are always expected to be integers, and, similarly, the return values for input values within range are also expected to be integers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks, @rgizz!
Resolves #44 .
Description
This pull request:
Related Issues
This pull request:
Questions
Should the implementation be extended to include all reals? Complex numbers?
Other
Prior art:
Checklist
@stdlib-js/reviewers