From d91a54200067e06b0499f3612315d997f6de0dad Mon Sep 17 00:00:00 2001 From: nsz Date: Fri, 22 Jul 2011 23:26:40 +0200 Subject: [PATCH] manual n1256 fixes (annexes) --- n1256.html | 176 ++++++++++++++++++++--------------------------------- 1 file changed, 66 insertions(+), 110 deletions(-) diff --git a/n1256.html b/n1256.html index 30198be..7513496 100644 --- a/n1256.html +++ b/n1256.html @@ -21630,100 +21630,68 @@ If a length modifier appears with any conversion specifier other than as specifi This table is reproduced unchanged from ISO/IEC TR 10176:1998, produced by ISO/IEC JTC 1/SC 22/WG 20, except for the omission of ranges that are part of the basic character sets. - Latin: 00AA, 00BA, 00C0-00D6, 00D8-00F6, 00F8-01F5, 01FA-0217, -
+
+
Latin: 00AA, 00BA, 00C0-00D6, 00D8-00F6, 00F8-01F5, 01FA-0217, 0250-02A8, 1E00-1E9B, 1EA0-1EF9, 207F - - Greek: 0386, 0388-038A, 038C, 038E-03A1, 03A3-03CE, 03D0-03D6, -
+
Greek: 0386, 0388-038A, 038C, 038E-03A1, 03A3-03CE, 03D0-03D6, 03DA, 03DC, 03DE, 03E0, 03E2-03F3, 1F00-1F15, 1F18-1F1D, 1F20-1F45, 1F48-1F4D, 1F50-1F57, 1F59, 1F5B, 1F5D, 1F5F-1F7D, 1F80-1FB4, 1FB6-1FBC, 1FC2-1FC4, 1FC6-1FCC, 1FD0-1FD3, 1FD6-1FDB, 1FE0-1FEC, 1FF2-1FF4, 1FF6-1FFC - - Cyrillic: 0401-040C, 040E-044F, 0451-045C, 045E-0481, 0490-04C4, -
+
Cyrillic: 0401-040C, 040E-044F, 0451-045C, 045E-0481, 0490-04C4, 04C7-04C8, 04CB-04CC, 04D0-04EB, 04EE-04F5, 04F8-04F9 - - Armenian: 0531-0556, 0561-0587 - Hebrew: 05B0-05B9, 05BB-05BD, 05BF, 05C1-05C2, 05D0-05EA, -
+
Armenian: 0531-0556, 0561-0587 +
Hebrew: 05B0-05B9, 05BB-05BD, 05BF, 05C1-05C2, 05D0-05EA, 05F0-05F2 - - Arabic: 0621-063A, 0640-0652, 0670-06B7, 06BA-06BE, 06C0-06CE, -
+
Arabic: 0621-063A, 0640-0652, 0670-06B7, 06BA-06BE, 06C0-06CE, 06D0-06DC, 06E5-06E8, 06EA-06ED - - Devanagari: 0901-0903, 0905-0939, 093E-094D, 0950-0952, 0958-0963 - Bengali: 0981-0983, 0985-098C, 098F-0990, 0993-09A8, 09AA-09B0, -
+
Devanagari: 0901-0903, 0905-0939, 093E-094D, 0950-0952, 0958-0963 +
Bengali: 0981-0983, 0985-098C, 098F-0990, 0993-09A8, 09AA-09B0, 09B2, 09B6-09B9, 09BE-09C4, 09C7-09C8, 09CB-09CD, 09DC-09DD, 09DF-09E3, 09F0-09F1 - - Gurmukhi: 0A02, 0A05-0A0A, 0A0F-0A10, 0A13-0A28, 0A2A-0A30, -
+
Gurmukhi: 0A02, 0A05-0A0A, 0A0F-0A10, 0A13-0A28, 0A2A-0A30, 0A32-0A33, 0A35-0A36, 0A38-0A39, 0A3E-0A42, 0A47-0A48, 0A4B-0A4D, 0A59-0A5C, 0A5E, 0A74 - - Gujarati: 0A81-0A83, 0A85-0A8B, 0A8D, 0A8F-0A91, 0A93-0AA8, -
+
Gujarati: 0A81-0A83, 0A85-0A8B, 0A8D, 0A8F-0A91, 0A93-0AA8, 0AAA-0AB0, 0AB2-0AB3, 0AB5-0AB9, 0ABD-0AC5, 0AC7-0AC9, 0ACB-0ACD, 0AD0, 0AE0 - - Oriya: 0B01-0B03, 0B05-0B0C, 0B0F-0B10, 0B13-0B28, 0B2A-0B30, +
Oriya: 0B01-0B03, 0B05-0B0C, 0B0F-0B10, 0B13-0B28, 0B2A-0B30, -
                    0B32-0B33, 0B36-0B39, 0B3E-0B43, 0B47-0B48, 0B4B-0B4D,
                  0B5C-0B5D, 0B5F-0B61
-
- Tamil: 0B82-0B83, 0B85-0B8A, 0B8E-0B90, 0B92-0B95, 0B99-0B9A, -
+
Tamil: 0B82-0B83, 0B85-0B8A, 0B8E-0B90, 0B92-0B95, 0B99-0B9A, 0B9C, 0B9E-0B9F, 0BA3-0BA4, 0BA8-0BAA, 0BAE-0BB5, 0BB7-0BB9, 0BBE-0BC2, 0BC6-0BC8, 0BCA-0BCD - - Telugu: 0C01-0C03, 0C05-0C0C, 0C0E-0C10, 0C12-0C28, 0C2A-0C33, -
+
Telugu: 0C01-0C03, 0C05-0C0C, 0C0E-0C10, 0C12-0C28, 0C2A-0C33, 0C35-0C39, 0C3E-0C44, 0C46-0C48, 0C4A-0C4D, 0C60-0C61 - - Kannada: 0C82-0C83, 0C85-0C8C, 0C8E-0C90, 0C92-0CA8, 0CAA-0CB3, -
+
Kannada: 0C82-0C83, 0C85-0C8C, 0C8E-0C90, 0C92-0CA8, 0CAA-0CB3, 0CB5-0CB9, 0CBE-0CC4, 0CC6-0CC8, 0CCA-0CCD, 0CDE, 0CE0-0CE1 - - Malayalam: 0D02-0D03, 0D05-0D0C, 0D0E-0D10, 0D12-0D28, 0D2A-0D39, -
+
Malayalam: 0D02-0D03, 0D05-0D0C, 0D0E-0D10, 0D12-0D28, 0D2A-0D39, 0D3E-0D43, 0D46-0D48, 0D4A-0D4D, 0D60-0D61 - - Thai: 0E01-0E3A, 0E40-0E5B - Lao: 0E81-0E82, 0E84, 0E87-0E88, 0E8A, 0E8D, 0E94-0E97, -
+
Thai: 0E01-0E3A, 0E40-0E5B +
Lao: 0E81-0E82, 0E84, 0E87-0E88, 0E8A, 0E8D, 0E94-0E97, 0E99-0E9F, 0EA1-0EA3, 0EA5, 0EA7, 0EAA-0EAB, 0EAD-0EAE, 0EB0-0EB9, 0EBB-0EBD, 0EC0-0EC4, 0EC6, 0EC8-0ECD, 0EDC-0EDD - - Tibetan: 0F00, 0F18-0F19, 0F35, 0F37, 0F39, 0F3E-0F47, 0F49-0F69, -
+
Tibetan: 0F00, 0F18-0F19, 0F35, 0F37, 0F39, 0F3E-0F47, 0F49-0F69, 0F71-0F84, 0F86-0F8B, 0F90-0F95, 0F97, 0F99-0FAD, 0FB1-0FB7, 0FB9 - - Georgian: 10A0-10C5, 10D0-10F6 - Hiragana: 3041-3093, 309B-309C - Katakana: 30A1-30F6, 30FB-30FC - Bopomofo: 3105-312C - CJK Unified Ideographs: 4E00-9FA5 - Hangul: AC00-D7A3 - Digits: 0660-0669, 06F0-06F9, 0966-096F, 09E6-09EF, 0A66-0A6F, -
+
Georgian: 10A0-10C5, 10D0-10F6 +
Hiragana: 3041-3093, 309B-309C +
Katakana: 30A1-30F6, 30FB-30FC +
Bopomofo: 3105-312C +
CJK Unified Ideographs: 4E00-9FA5 +
Hangul: AC00-D7A3 +
Digits: 0660-0669, 06F0-06F9, 0966-096F, 09E6-09EF, 0A66-0A6F, 0AE6-0AEF, 0B66-0B6F, 0BE7-0BEF, 0C66-0C6F, 0CE6-0CEF, 0D66-0D6F, 0E50-0E59, 0ED0-0ED9, 0F20-0F33 - - Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1, +
Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1, -
                     02E0-02E4, 037A, 0559, 093D, 0B3D, 1FBE, 203F-2040, 2102,
                     2107, 210A-2113, 2115, 2118-211D, 2124, 2126, 2128, 212A-2131,
                     2133-2138, 2160-2182, 3005-3007, 3021-3029
-
+

Annex E

@@ -22214,61 +22182,39 @@ If a length modifier appears with any conversion specifier other than as specifi
 
 

F.8.2 Expression transformations

- x / 2 <-> x * 0.5 Although similar transformations involving inexact -

+
+
 x / 2 <-> x * 0.5    
Although similar transformations involving inexact constants generally do not yield numerically equivalent expressions, if the constants are exact then such transformations can be made on IEC 60559 machines and others that round perfectly. - - 1 * x and x / 1 -> x The expressions 1 * x, x / 1, and x are equivalent -
+
 1 * x and x / 1 -> x    
The expressions 1 * x, x / 1, and x are equivalent (on IEC 60559 machines, among others).317) - - x / x -> 1.0 The expressions x / x and 1.0 are not equivalent if x -
+
 x / x -> 1.0            
The expressions x / x and 1.0 are not equivalent if x can be zero, infinite, or NaN. - - x - y <-> x + (-y) The expressions x - y, x + (-y), and (-y) + x -
+
 x - y <-> x + (-y)   
The expressions x - y, x + (-y), and (-y) + x are equivalent (on IEC 60559 machines, among others). - - x - y <-> -(y - x) The expressions x - y and -(y - x) are not -
+
 x - y <-> -(y - x)   
The expressions x - y and -(y - x) are not equivalent because 1 - 1 is +0 but -(1 - 1) is -0 (in the default rounding direction).318) - - x - x -> 0.0 The expressions x - x and 0.0 are not equivalent if -
+
 x - x -> 0.0            
The expressions x - x and 0.0 are not equivalent if x is a NaN or infinite. - - 0 * x -> 0.0 The expressions 0 * x and 0.0 are not equivalent if -
+
 0 * x -> 0.0            
The expressions 0 * x and 0.0 are not equivalent if x is a NaN, infinite, or -0. - - x + 0->x The expressions x + 0 and x are not equivalent if x is -
+
 x + 0 -> x              
The expressions x + 0 and x are not equivalent if x is -0, because (-0) + (+0) yields +0 (in the default rounding direction), not -0. - - x - 0->x (+0) - (+0) yields -0 when rounding is downward -
+
 x - 0 -> x              
(+0) - (+0) yields -0 when rounding is downward (toward -(inf)), but +0 otherwise, and (-0) - (+0) always yields -0; so, if the state of the FENV_ACCESS pragma is ''off'', promising default rounding, then the implementation can replace x - 0 by x, even if x - - - -
                                           might be zero.
-
- -x <-> 0 - x The expressions -x and 0 - x are not equivalent if x -
+
 -x <-> 0 - x         
The expressions -x and 0 - x are not equivalent if x is +0, because -(+0) yields -0, but 0 - (+0) yields +0 (unless rounding is downward). - +

Footnotes

317) Strict support for signaling NaNs -- not required by this specification -- would invalidate these and @@ -22290,10 +22236,10 @@ If a length modifier appears with any conversion specifier other than as specifi

F.8.3 Relational operators

- x != x -> false The statement x != x is true if x is a NaN. - x == x -> true The statement x == x is false if x is a NaN. - x < y -> isless(x,y) (and similarly for <=, >, >=) Though numerically -

+
+
 x != x -> false          
The statement x != x is true if x is a NaN. +
 x == x -> true           
The statement x == x is false if x is a NaN. +
 x < y -> isless(x,y)  
(and similarly for <=, >, >=) Though numerically equal, these expressions are not equivalent because of side effects when x or y is a NaN and the state of the FENV_ACCESS pragma is ''on''. This transformation, @@ -22301,7 +22247,7 @@ If a length modifier appears with any conversion specifier other than as specifi cause the ''invalid'' floating-point exception for unordered cases, could be performed provided the state of the FENV_ACCESS pragma is ''off''. - +
The sense of relational operators shall be maintained. This includes handling unordered cases as expressed by the source code.

@@ -23309,7 +23255,7 @@ If a length modifier appears with any conversion specifier other than as specifi and the result, the result has the same sign as the argument.

The functions are continuous onto both sides of their branch cuts, taking into account the - sign of zero. For example, csqrt(-2 (+-) i0) = (+-)i(sqrt)2. ??? + sign of zero. For example, csqrt(-2 (+-) i0) = (+-)i(sqrt)(2).

Since complex and imaginary values are composed of real values, each function may be regarded as computing real values from real values. Except as noted, the functions treat @@ -23661,11 +23607,11 @@ If a length modifier appears with any conversion specifier other than as specifi only integer divide-by-zero need be detected.

The parameters for the integer data types can be accessed by the following: - maxint INT_MAX, LONG_MAX, LLONG_MAX, UINT_MAX, ULONG_MAX,

+ maxint        INT_MAX, LONG_MAX, LLONG_MAX, UINT_MAX, ULONG_MAX,
                ULLONG_MAX
-
minint INT_MIN, LONG_MIN, LLONG_MIN +

The parameter ''bounded'' is always true, and is not provided. The parameter ''minint'' is always 0 for the unsigned types, and is not provided for those types. @@ -23674,6 +23620,7 @@ If a length modifier appears with any conversion specifier other than as specifi

H.2.2.1 Integer operations

The integer operations on integer types are the following: +

  addI           x + y
  subI           x - y
  mulI           x * y
@@ -23687,6 +23634,7 @@ If a length modifier appears with any conversion specifier other than as specifi
  leqI           x <= y
  gtrI           x > y
  geqI           x >= y
+
where x and y are expressions of the same integer type.

H.2.3 Floating-point types

@@ -23701,21 +23649,26 @@ If a length modifier appears with any conversion specifier other than as specifi
H.2.3.1 Floating-point parameters

The parameters for a floating point data type can be accessed by the following: +

  r              FLT_RADIX
  p              FLT_MANT_DIG, DBL_MANT_DIG, LDBL_MANT_DIG
  emax           FLT_MAX_EXP, DBL_MAX_EXP, LDBL_MAX_EXP
  emin           FLT_MIN_EXP, DBL_MIN_EXP, LDBL_MIN_EXP
+

The derived constants for the floating point types are accessed by the following: +

  fmax          FLT_MAX, DBL_MAX, LDBL_MAX
  fminN         FLT_MIN, DBL_MIN, LDBL_MIN
  epsilon       FLT_EPSILON, DBL_EPSILON, LDBL_EPSILON
  rnd_style     FLT_ROUNDS
+
H.2.3.2 Floating-point operations

The floating-point operations on floating-point types are the following: +

  addF          x + y
  subF          x - y
  mulF          x * y
@@ -23724,9 +23677,7 @@ If a length modifier appears with any conversion specifier other than as specifi
  absF          fabsf(x), fabs(x), fabsl(x)
  exponentF     1.f+logbf(x), 1.0+logb(x), 1.L+logbl(x)
  scaleF        scalbnf(x, n), scalbn(x, n), scalbnl(x, n),
-
                scalblnf(x, li), scalbln(x, li), scalblnl(x, li)
-
intpartF modff(x, &y), modf(x, &y), modfl(x, &y) fractpartF modff(x, &y), modf(x, &y), modfl(x, &y) eqF x == y @@ -23735,6 +23686,7 @@ If a length modifier appears with any conversion specifier other than as specifi leqF x <= y gtrF x > y geqF x >= y +
where x and y are expressions of the same floating point type, n is of type int, and li is of type long int. @@ -23744,28 +23696,28 @@ If a length modifier appears with any conversion specifier other than as specifi that only one identifier for each is provided to map to LIA-1.

The FLT_ROUNDS parameter can be used to indicate the LIA-1 rounding styles: +

  truncate      FLT_ROUNDS == 0
 
  nearest        FLT_ROUNDS == 1
  other          FLT_ROUNDS != 0 && FLT_ROUNDS != 1
+
provided that an implementation extends FLT_ROUNDS to cover the rounding style used in all relevant LIA-1 operations, not just addition as in C.

H.2.4 Type conversions

The LIA-1 type conversions are the following type casts: - cvtI' -> I (int)i, (long int)i, (long long int)i,

+ cvtI' -> I      (int)i, (long int)i, (long long int)i,
                 (unsigned int)i, (unsigned long int)i,
                 (unsigned long long int)i
-
cvtF -> I (int)x, (long int)x, (long long int)x, -
                 (unsigned int)x, (unsigned long int)x,
                 (unsigned long long int)x
-
cvtI -> F (float)i, (double)i, (long double)i cvtF' -> F (float)x, (double)x, (long double)x +

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), @@ -23822,15 +23774,19 @@ If a length modifier appears with any conversion specifier other than as specifi C's <fenv.h> status flags are compatible with the LIA-1 indicators.

The following mapping is for floating-point types: +

  undefined                FE_INVALID, FE_DIVBYZERO
  floating_overflow         FE_OVERFLOW
  underflow                FE_UNDERFLOW
+

The floating-point indicator interrogation and manipulation operations are: +

  set_indicators          feraiseexcept(i)
  clear_indicators        feclearexcept(i)
  test_indicators         fetestexcept(i)
  current_indicators      fetestexcept(FE_ALL_EXCEPT)
+
where i is an expression of type int representing a subset of the LIA-1 indicators.

C allows an implementation to provide the following LIA-1 required behavior: at @@ -24976,9 +24932,9 @@ If a length modifier appears with any conversion specifier other than as specifi

Index

- ??? x ???, 3.18                                                    , (comma punctuator), 6.5.2, 6.7, 6.7.2.1, 6.7.2.2,
+ [^ x ^], 3.18                                                    , (comma punctuator), 6.5.2, 6.7, 6.7.2.1, 6.7.2.2,
                                                                      6.7.2.3, 6.7.8
- ??? x ???, 3.19                                                    - (subtraction operator), 6.5.6, F.3, G.5.2
+ [_ x _], 3.19                                                    - (subtraction operator), 6.5.6, F.3, G.5.2
  ! (logical negation operator), 6.5.3.3                         - (unary minus operator), 6.5.3.3, F.3
  != (inequality operator), 6.5.9                                -- (postfix decrement operator), 6.3.2.1, 6.5.2.4
  # operator, 6.10.3.2                                           -- (prefix decrement operator), 6.3.2.1, 6.5.3.1
-- 
2.20.1