corrected to the best known range (fixed after X.696 Corrigendum 1)

This commit is contained in:
Lev Walkin 2017-10-11 00:37:27 -07:00
parent 83170fc089
commit f11ebf8a5b
2 changed files with 3 additions and 3 deletions

View File

@ -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 >= -323 && exponent->right.value <= 292) {
&& exponent->left.value >= -149 && exponent->right.value <= 104) {
range->narrowing = NARROW_FLOAT32;
} else /* X.696 #12.3 */
if(mantissa->left.type == ARE_VALUE && mantissa->right.type == ARE_VALUE

View File

@ -1,7 +1,7 @@
-- Test the REAL (floating point) type.
T ::= REAL
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 (-16777215..16777215), base (2), exponent (-149..104)})
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 ::= Real32 Real32 ::= REAL (WITH COMPONENTS { mantissa (-16777215..16777215), base (2), exponent (-149..104)})
T ::= Real64 Real64 ::= REAL (WITH COMPONENTS { mantissa (-9007199254740991..9007199254740991), base (2), exponent (-1074..971)})