stdlib-js / stdlib-js/stdlib

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

Abierto
#729 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Feature Math RFC
Lenguaje dominante
JavaScript
Estrellas
6k
Forks
1.3k
Merge medio
1 d 3 h
PR fusionados (30 d)
611

Descripción

### Description

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

The package is the single-precision analogue to `@stdlib/math/base/special/erf`. 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/erff`
Alias: `erff`

### 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:`.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.