Skip to content

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

@kgryte

Description

@kgryte

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. 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

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureIssue or pull request for adding a new feature.MathIssue or pull request specific to math functionality.RFCRequest for comments. Feature requests and proposed changes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions