pmor
pmor

Reputation: 6276

FLT_HAS_SUBNORM is 0: what fpclassify(<subnormal>) shall return: FP_SUBNORMAL or FP_ZERO, or lead to UB?

Follow-up question for:

  1. FLT_HAS_SUBNORM is 0: does execution of fpclassify() with manually constructed subnormal lead to UB or lead to WDB returning FP_SUBNORMAL?
  2. If the presence of subnormal numbers is optional (HAS_SUBNORM), then why the presence of FP_SUBNORMAL is mandatory?

Question: in case of FLT_HAS_SUBNORM is 0 what fpclassify(<subnormal>) shall return: FP_SUBNORMAL or FP_ZERO, or lead to UB? Please, elaborate.

In other words: in case of FLT_HAS_SUBNORM is 0 shall the implementation have DAZ (Denormals Are Zero) property? (For the details see comment by user @njuffa in the link #1.) If yes / no, then shall this property be applied to all the operations involving FP numbers (objects), or to some operations involving FP numbers (objects)?

UPD20210825: Answer from the committee:

It is FP_ZERO.

Consequences:

  1. In case of FLT_HAS_SUBNORM is 0 shall the implementation have DAZ (Denormals Are Zero) property set to 1? Yes.
  2. Shall DAZ=1 be applied to all the operations involving FP numbers (objects)? In progress...

Upvotes: 1

Views: 106

Answers (0)

Related Questions