stdlib-js / stdlib-js/stdlib

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

未关闭
#729 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Feature Math RFC
主要语言
JavaScript
星标
6k
派生
1.3k
平均合并
1 天 3 小时
30 天内合并 PR
611

描述

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

贡献指南

打开贡献指南

调研方向

Start by reviewing the existing `@stdlib/math/base/special/erf` package and the linked msun `s_erff.c` reference. The proposed `@stdlib/math/base/special/erff` implementation should cover both JavaScript and C, use `float64ToFloat32` for JavaScript arithmetic, and produce matching results.

由索引模型根据 Issue 内容生成。

评估

技术栈
c, javascript
领域
tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。