-
-
Notifications
You must be signed in to change notification settings - Fork 999
Closed
Labels
AcceptedRFC feature request which has been accepted.RFC feature request which has been accepted.CIssue involves or relates to C.Issue involves or relates to C.FeatureIssue or pull request for adding a new feature.Issue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!A good first issue for new contributors!MathIssue or pull request specific to math functionality.Issue or pull request specific to math functionality.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: NormalNormal priority concern or feature request.Normal priority concern or feature request.
Description
Description
This RFC proposes adding native C implementation for @stdlib/math/base/special/fibonacci-index.
double stdlib_base_fibonacci_index( const double F );
Related Issues
Tracked in issue #649.
Questions
I am not sure about the method's signature. In the original JavaScript code, both the return type and the parameter are {NonNegativeInteger}. However, in some tests they take on the value NaN, which as far as I know does not exist for integer types in C. For this reason, I decided on using double, but please tell me if there is a more suitable solution.
Other
The implementation depends on the round function, which is addressed in #735. I can use the round method from C until the method is implemented in stdlib, and I can also contribute to implementing round.
Checklist
- I have read and understood the Code of Conduct.
- Searched for existing issues and pull requests.
- The issue name begins with
RFC:.
Metadata
Metadata
Assignees
Labels
AcceptedRFC feature request which has been accepted.RFC feature request which has been accepted.CIssue involves or relates to C.Issue involves or relates to C.FeatureIssue or pull request for adding a new feature.Issue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!A good first issue for new contributors!MathIssue or pull request specific to math functionality.Issue or pull request specific to math functionality.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: NormalNormal priority concern or feature request.Normal priority concern or feature request.