Submitter:Fred J. Tydeman
Submission Date:2017-04-24
Document: WG14 N2151

Classes of finite numbers (as in 5.2.4.2.2#3):

For long double being a pair of doubles:

high-dbl  low-dbl
0.0       0.0          == zero
0.0       DBL_TRUE_MIN == sub-normal
1.0       0.0          == normal
DBL_MAX   DBL_MAX      == super-normal
1.0       DBL_TRUE_MIN == extra-normal
0.0       1.0          == un-normal
  

================

Things that would need changing if we want double-double added:

================


#include <stdio.h>
#include <float.h>
extern long double f(long double);
int main(void){
  long double y;
  long double x[10] = { ...some values... };

  for (int i=0; i < 10; i++ ){
    y = f(x[i]);
    if( (0.L < y) && (y < LDBL_TRUE_MIN) ) 
        printf("Total loss of precision: underflow");
    if( (LDBL_TRUE_MIN <= y) && (y < LDBL_MIN) )
        printf("Partial loss of precision: underflow");
    if( (LDBL_NORM_MAX < y) && (y <= LDBL_MAX) ) 
        printf("Partial loss of precision: overflow");
    if( (LDBL_MAX < y) )
        printf("Total loss of precision: overflow");
  }/* i */

  return 0;
}

My conclusion is we do not need to change C to better accomodate double-double beyond DRs 432 and 467 and adding LDBL_NORM_MAX.