ISO/ IEC JTC1/SC22/WG14 N816

    WG14/N816	  J11/98-015
    
    Changes to Annex H LIA
    
    
    [The page and paragraph numbers are based upon working draft
    January 30, 1998 that Larry gave me at the Frisco, CO,
    meeting.]
    
    In Annex H LIA:
    
    Thruout the annex, make sure all references to LIA are to
    changed to LIA-1. 
    
    In H.2 Types:
    
    add after ULP: (Unit in the Last Place). 
    
    add at the end of the sentance: (LIA-1 subclause 5.2.8). 
    
    In H.2.3.3 Rounding styles:
    
    Paragraph 1: change "types use" to "types to use". 
    
    In H.2.4 Type conversion:
    
    Replace paragraphs 2 thru 5 with:
    
    2 In the above conversions from floating to integer, the use
    of (cast)x can be replaced with (cast)round(x),
    (cast)rint(x), (cast)nearbyint(x), (cast)trunc(x),
    (cast)ceil(x), or (cast)floor(x).  In addition, C's
    floating-point to integer conversion functions, lrint(),
    llrint(), lround(), and llround() can be used.  They all
    meet LIA-1's requirements on floating to integer rounding
    for in-range values.  For out-of-range values, the
    conversions must silently wrap for the modulo types. 
    
    3 The fmod() function is useful for doing silent wrapping to
    unsigned integer types, eg, fmod( fabs(rint(x)), 65536.0 )
    or (0.0 <= (y = fmod( rint(x), 65536.0 )) ? y : 65536.0 + y)
    will compute an integer value in the range 0.0 to 65535.0
    which can then be cast to unsigned short.  But, the
    remainder() function is not useful for doing silent wrapping
    to signed integer types, eg, remainder( rint(x), 65536.0 )
    will compute an integer value in the range -32767.0 to
    +32768.0 which is not, in general, in the range of signed
    short. 
    
    4 C's conversions (casts) from floating-point to
    floating-point can meet LIA-1 requirements if an
    implementation uses round-to-nearest (IEC-559 default). 
    
    5 C's conversions (casts) from integer to floating-point can
    meet LIA-1 requirements if an implementation uses
    round-to-nearest. 
    
    In H.3.1 Notification alternatives:
    
    Paragraph 4, replace "User provided" with "User-provided". 
    
    In H.3.1.1 Indicators:
    
    Paragraph 3, replace "a LIA-1 indicator subset" with "a
    subset of the LIA-1 indicators". 
    
    Paragraph 5, replace "is making" with "makes". 
    
    In H.3.1.2 Traps:
    
    Replace paragraph 4 with:
    
    C supports signal handlers for SIGFPE and allows trapping of
    arithmetic exceptions.  When arithmetic exceptions do trap,
    C's signal-handler mechanism allows trap-and-terminate
    (either default implementation behavior or user replacement
    for it) or trap-and-resume, at the programmer's option.