Commit c44edc0d authored by Lev Walkin's avatar Lev Walkin

take into account X696 Corrigendum 1 (05/2017)

parent 9854e669
......@@ -933,7 +933,7 @@ asn1f_real_range_from_WCOMPS(const char *dbg_name,
&& base->left.type == ARE_VALUE && base->right.type == ARE_VALUE
&& base->left.value == 2 && base->right.value == 2
&& exponent->left.type == ARE_VALUE && exponent->right.type == ARE_VALUE
&& exponent->left.value >= -126 && exponent->right.value <= 127) {
&& exponent->left.value >= -323 && exponent->right.value <= 292) {
range->narrowing = NARROW_FLOAT32;
} else /* X.696 #12.3 */
if(mantissa->left.type == ARE_VALUE && mantissa->right.type == ARE_VALUE
......@@ -942,7 +942,7 @@ asn1f_real_range_from_WCOMPS(const char *dbg_name,
&& base->left.type == ARE_VALUE && base->right.type == ARE_VALUE
&& base->left.value == 2 && base->right.value == 2
&& exponent->left.type == ARE_VALUE && exponent->right.type == ARE_VALUE
&& exponent->left.value >= -1022 && exponent->right.value <= 1023) {
&& exponent->left.value >= -1074 && exponent->right.value <= 971) {
range->narrowing = NARROW_FLOAT64;
}
......
......@@ -16,35 +16,35 @@ DEFINITIONS ::= BEGIN
Indirect-IEEE-binary32 ::= UnconstrainedREAL (WITH COMPONENTS {
mantissa (-16777215..16777215),
base (2), exponent (-126..126)})
base (2), exponent (-323..292)})
-- X.696 (08/2005) #12.2 and #12.3
-- IEEE 754 encoding single precision
IEEE-binary32-w ::= REAL (WITH COMPONENTS {
mantissa (-16777215..16777215),
base (2), exponent (-126..126)})
base (2), exponent (-323..292)})
IEEE-binary32-0w ::= REAL (0 | WITH COMPONENTS {
mantissa (-16777215..16777215),
base (2), exponent (-126..126)})
base (2), exponent (-323..292)})
IEEE-binary32-w0 ::= REAL (WITH COMPONENTS {
mantissa (-16777215..16777215),
base (2), exponent (-126..126)} | 0)
base (2), exponent (-323..292)} | 0)
-- IEEE 754 encoding double precision
IEEE-binary64-w ::= REAL (WITH COMPONENTS {
mantissa (-9007199254740991..9007199254740991),
base (2), exponent (-1022..1023)})
base (2), exponent (-1074..971)})
IEEE-binary64-0w ::= REAL (0 | WITH COMPONENTS {
mantissa (-9007199254740991..9007199254740991),
base (2), exponent (-1022..1023)})
base (2), exponent (-1074..971)})
IEEE-binary64-w0 ::= REAL (WITH COMPONENTS {
mantissa (-9007199254740991..9007199254740991),
base (2), exponent (-1022..1023)} | 0)
base (2), exponent (-1074..971)} | 0)
Test ::= SEQUENCE {
indirect-ieee-binary32 Indirect-IEEE-binary32,
......
-- Test the REAL (floating point) type.
T ::= REAL
T ::= REAL (WITH COMPONENTS { mantissa (-16777215..16777215), base (2), exponent (-126..126)})
T ::= REAL (WITH COMPONENTS { mantissa (-9007199254740991..9007199254740991), base (2), exponent (-1022..1023)})
T ::= Real32 Real32 ::= REAL (WITH COMPONENTS { mantissa (-16777215..16777215), base (2), exponent (-126..126)})
T ::= Real64 Real64 ::= REAL (WITH COMPONENTS { mantissa (-9007199254740991..9007199254740991), base (2), exponent (-1022..1023)})
T ::= REAL (WITH COMPONENTS { mantissa (-16384..16384), base (2), exponent (-10..10)})
T ::= REAL (WITH COMPONENTS { mantissa (-16777215..16777215), base (2), exponent (-323..292)})
T ::= REAL (WITH COMPONENTS { mantissa (-9007199254740991..9007199254740991), base (2), exponent (-1074..971)})
T ::= Real32 Real32 ::= REAL (WITH COMPONENTS { mantissa (-16777215..16777215), base (2), exponent (-323..292)})
T ::= Real64 Real64 ::= REAL (WITH COMPONENTS { mantissa (-9007199254740991..9007199254740991), base (2), exponent (-1074..971)})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment