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

[RFC]: add C implementation for math/base/special/gammaln #1988

Closed
3 tasks done
performant23 opened this issue Mar 22, 2024 · 12 comments · Fixed by #2636
Closed
3 tasks done

[RFC]: add C implementation for math/base/special/gammaln #1988

performant23 opened this issue Mar 22, 2024 · 12 comments · Fixed by #2636
Assignees
Labels
Accepted RFC feature request which has been accepted. C Issue involves or relates to C. difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. Feature Issue or pull request for adding a new feature. Math Issue or pull request specific to math functionality. priority: High High priority concern or feature request. RFC Request for comments. Feature requests and proposed changes. status: Blocked Issue or pull request which is current blocked.

Comments

@performant23
Copy link
Contributor

performant23 commented Mar 22, 2024

Description

This RFC proposes adding native C implementation for @stdlib/math/base/special/gammaln

double stdlib_base_gammaln ( const double x );

Related Issues

Issue Tracker: #649

Questions

No.

Other

No.

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.
@performant23
Copy link
Contributor Author

Hello, I am working on this issue!

@performant23
Copy link
Contributor Author

Hello, I just had a doubt regarding scripts/evalpoly.js. For reference, I checked out this PR and the changes into this file.
If I understand correctly, the goal is to extend the functionality to compile polynomial functions in C and insert them into a source file. We're inserting the function string between // BEGIN and // END, creating copts - options object for compileC, read the file and we write the compiled function into the file (using insert).

So basically we're evaluating these polynomials and inserting them into the source files (after compiling). I just wanted to know more on its role and usage on the C implementation and on the library in general since gammaln has a similar script for polynomials.

@kgryte, @Planeshifter

@xaman27x

This comment was marked as off-topic.

@performant23

This comment was marked as off-topic.

@kgryte

This comment was marked as off-topic.

@kgryte
Copy link
Member

kgryte commented Mar 24, 2024

@performant23 Your understanding is correct. You need to insert some markup into the C source file so that the script knows where to insert the equations. For generating the polynomial equations, rather than handwrite, we use code generation.

@kgryte kgryte added RFC Request for comments. Feature requests and proposed changes. Feature Issue or pull request for adding a new feature. Accepted RFC feature request which has been accepted. priority: High High priority concern or feature request. C Issue involves or relates to C. difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. Math Issue or pull request specific to math functionality. labels Mar 24, 2024
@xaman27x

This comment was marked as off-topic.

@kgryte

This comment was marked as off-topic.

@xaman27x

This comment was marked as off-topic.

@kgryte

This comment was marked as off-topic.

@performant23
Copy link
Contributor Author

Hi @kgryte, I request you to temporarily block this issue. I've just discovered an overlooked dependency in the C implementation of special/sinpi, which also relies on special/sin and special/cos. Apologies for not noticing this sooner. Realized this since I encountered an error during compilation and execution of the package.

@kgryte
Copy link
Member

kgryte commented Mar 24, 2024

@performant23 Thanks for the update. Will update the status.

@kgryte kgryte added the status: Blocked Issue or pull request which is current blocked. label Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted RFC feature request which has been accepted. C Issue involves or relates to C. difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. Feature Issue or pull request for adding a new feature. Math Issue or pull request specific to math functionality. priority: High High priority concern or feature request. RFC Request for comments. Feature requests and proposed changes. status: Blocked Issue or pull request which is current blocked.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants