stdlib-js / stdlib

✨ Standard library for JavaScript and Node.js. ✨
https://stdlib.io
Apache License 2.0
4.32k stars 437 forks source link

[RFC]: add support for computing the complementary error function for single-precision floating-point numbers #730

Open kgryte opened 1 year ago

kgryte commented 1 year ago

Description

This RFC proposes adding support for computing the complementary error function for single-precision floating-point numbers.

The package is the single-precision analogue to @stdlib/math/base/special/erfc. Similar to that package, we can base our implementation on msun. The implementations for both JavaScript and C should follow the reference implementation.

For the JavaScript implementation, we'll need to make sure that we emulate float32 arithmetic by wrapping operation results with float64ToFloat32. This will mean noticeable performance degradation in JavaScript, but will ensure that the JavaScript and C implementations produce the same results.

Package: @stdlib/math/base/special/erfcf Alias: erfcf

Related Issues

None.

Questions

No.

Other

No.

Checklist

kohantikanath commented 1 month ago

Hi @kgryte,

Could you please assign this issue to me? I'd love to work on adding support for computing the complementary error function for single-precision floating-point numbers in the @stdlib/math/base/special/erfcf package.