stdlib-js / stdlib-js/stdlib

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

Aperta
#730 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Feature Math RFC
Lingua principale
JavaScript
Stelle
6k
Fork
1.3k
Merge medio
1g 3h
PR unite (30g)
611

Descrizione

### 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](https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/s_erff.c?view=markup). 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

- [X] I have read and understood the [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md).
- [X] Searched for existing issues and pull requests.
- [X] The issue name begins with `RFC:`.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.