Skip to content

RFC: add support for computing the double word product of two unsigned 32-bit integers #207

@kgryte

Description

@kgryte

Checklist

Please ensure the following tasks are completed before submitting a feature request.

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

Description

Description of the feature request.

This RFC proposes to add support for computing a double word product of two unsigned 32-bit integers. Adding support would partially address lack of 64-bit integer support in JavaScript (ignoring BigInt), which is necessary for, e.g., 32-bit integer multiplication, the product of which may exceed the maximum safe integer when evaluated in double-precision floating-point format.

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

The API would follow the convention set forth of providing an optional output argument:

/**
* @param {ArrayLikeObject} [out] - output array
* @param {uinteger32} a - first unsigned integer
* @param {uinteger32} b - second unsigned integer
* @returns {ArrayLikeObject} output array
*/
function uimuldw( [out,] a, b ) {
    // Implementation...
}

Related Issues

Does this feature request have any related issues?

No.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this feature request? This may include screenshots, references, sample output, and/or implementation notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureIssue or pull request for adding a new feature.Help WantedExtra attention is needed.MathIssue or pull request specific to math functionality.RFCRequest for comments. Feature requests and proposed changes.difficulty: 3Likely to be challenging but manageable.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions