Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Semantics of minNum and maxNum don't match IEEE 754-2008 for signaling NaNs #341

Open
@stoklund

Description

@stoklund

The IEEE 754-2008 operations minNum and maxNum suppress quiet NaNs, but they still propagate signaling NaNs, canonicalising them to qNaNs:

minNum(1.0, qNaN) -> 1.0
minNum(1.0, sNaN) -> qNaN

The ARMv8 vminnm and vmaxnm instructions have the same semantics (my emphasis):

It handles NaNs in consistence with the IEEE754-2008 specification. It returns the numerical operand when one operand is numerical and the other is a quiet NaN, but otherwise the result is identical to floating-point VMAX.

The minNum and maxNum operations currently in our specification don't distinguish between sNaNs and qNaNs. Given our approach to NaNs, it seems difficult to add the distinction.

I would suggest that we either:

  1. Rename minNum and maxNum to avoid confusion with the IEEE operations of the same name, or
  2. Remove the two functions from the specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions