stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

[RFC]: add `math/base/special/asinhf`

Open gunjjoshi opened this issue 10 months ago • 7 comments

Description

This RFC proposes adding math/base/special/asinhf, which would be the single-precision equivalent for math/base/special/asinh.

float stdlib_base_asinhf( const float x )

Related Issues

None.

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 Apr 06 '24 09:04 gunjjoshi

I would like to work on this.

gunjjoshi avatar Apr 06 '24 09:04 gunjjoshi

This requires log1pf, which must be implemented first. Our log1p is based on https://www.netlib.org/fdlibm/s_log1p.c, but I couldn't find the single-precision implementation for it. Is it there ? If not, what source must we then follow for log1pf ?

gunjjoshi avatar Apr 06 '24 10:04 gunjjoshi

FreeBSD has log1pf implementation : https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/s_log1pf.c?revision=367086&view=markup

gunjjoshi avatar Apr 06 '24 10:04 gunjjoshi

Use FreeBSD v12.2.0. Our log1p probably needs to be updated, as I imagine that the fdlibm implementation is somewhat out-of-date.

kgryte avatar Apr 06 '24 10:04 kgryte

log1pf, in turn, requires roundf. It isn't needed for the function's implementation, but is required at examples/index.js. Should I go ahead for roundf ?

gunjjoshi avatar Apr 06 '24 11:04 gunjjoshi

@gunjjoshi Yes, feel free to go ahead and create roundf. Now that round has a C implementation, this should hopefully be more straightforward.

kgryte avatar Jun 10 '24 02:06 kgryte

Great, @kgryte, I'll move ahead with roundf!

gunjjoshi avatar Jun 10 '24 03:06 gunjjoshi