8000 Minor clarification on allowed rounding mode · Issue #830 · data-apis/array-api · GitHub
[go: up one dir, main page]

Skip to content
Minor clarification on allowed rounding mode #830
Closed
@hpkfft

Description

@hpkfft

The accuracy section of this standard states

The results of element-wise arithmetic operations ...
for floating-point operands must return the nearest representable value
according to IEEE 754-2019 and a supported rounding mode.

I believe this intends to allow (optionally, and not by default) the use of directed rounding, i.e., the IEEE 754-2019 rounding attributes roundTowardPositive, roundTowardNegative, and roundTowardZero.
However, directed rounding does not, in general, return the nearest representable value--only an attribute that rounds to nearest does that.
IEEE 754-2019 defines the term "correctly rounded", which I suggest is preferred here:

The results of element-wise arithmetic operations ...
for floating-point operands must return the correctly rounded value
according to IEEE 754-2019 and a supported rounding mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MaintenanceBug fix, typo fix, or general maintenance.Narrative ContentNarrative documentation content.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0