stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

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

Open gunjjoshi opened this issue 1 year ago • 4 comments

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

  • [X] I have read and understood the Code of Conduct.
  • [X] Searched for existing issues and pull requests.
  • [X] The issue name begins with RFC:.

gunjjoshi avatar Mar 14 '24 19:03 gunjjoshi

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

gunjjoshi avatar Mar 14 '24 19:03 gunjjoshi

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.

kgryte avatar Jul 09 '24 18:07 kgryte

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

gururaj1512 avatar Oct 15 '24 11:10 gururaj1512

@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.

gunjjoshi avatar Oct 15 '24 11:10 gunjjoshi

Hi @gunjjoshi , I have linked the PR to this issue like you asked. Can you review when you're free?

sahil20021008 avatar Apr 30 '25 15:04 sahil20021008