Skip to content

[RFC]: add C implementation for math/base/special/heaviside #1891

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

Open
3 tasks done
gunjjoshi opened this issue Mar 14, 2024 · 4 comments · May be fixed by #6823
Open
3 tasks done

[RFC]: add C implementation for math/base/special/heaviside #1891

gunjjoshi opened this issue Mar 14, 2024 · 4 comments · May be fixed by #6823
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: Normal Normal priority concern or feature request. RFC Request for comments. Feature requests and proposed changes.

Comments

@gunjjoshi
Copy link
Member

gunjjoshi commented Mar 14, 2024

Description

This RFC proposes adding C implementation for math/base/special/heaviside.

double stdlib_base_heaviside( const double x, const string continuity )

Related Issues

Related issues #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:.
@gunjjoshi
Copy link
Member Author

gunjjoshi commented Mar 14, 2024

I would like to work on this. Also, for this, what type of interface must be used in addon.c ?

@kgryte kgryte added RFC Request for comments. Feature requests and proposed changes. Feature Issue or pull request for adding a new feature. Math Issue or pull request specific to math functionality. Accepted RFC feature request which has been accepted. priority: Normal Normal 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. labels Jul 9, 2024
@kgryte
Copy link
Member

kgryte commented Jul 9, 2024

The C interface should use an enum for the continuity, not a string. The enum should be defined in the heaviside header file. When going from JavaScript to C for testing, we would need to convert the JavaScript string to the corresponding enum value. Hence, the addon.c file should just use the DI_D interface.

@gururaj1512
Copy link
Member

@gunjjoshi, Noticed this issue has been open for a while. Would it be alright if I work on it to help move it forward?

@gunjjoshi
Copy link
Member Author

gunjjoshi commented Oct 15, 2024

@gunjjoshi, Noticed this issue has been open for a while. Would it be alright if I work on it to help move it forward?

Sure, @gururaj1512. Feel free to open a PR for this.

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: Normal Normal priority concern or feature request. RFC Request for comments. Feature requests and proposed changes.
Projects
None yet
3 participants