Skip to content

[RFC]: Add C implementation for @stdlib/math/base/special/fibonacci-index #1756

Closed
@tudor-pagu

Description

@tudor-pagu

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

Labels

AcceptedRFC feature request which has been accepted.CIssue involves or relates to C.FeatureIssue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!MathIssue or pull request specific to math functionality.RFCRequest 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.priority: NormalNormal priority concern or feature request.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions