#35 Big integer values are decoded as real

open
nobody
Reader (16)
6
2011-07-20
2011-07-20
jmar8692
No

When decoding integer value greater than Value::MaxUInt/10 == 429496729, the node is decoded as real value, although it could and should be decoded as unsigned integer.

This renders common testing for isIntegral() or isInt() almost useless, because you can't be ever sure if the type was not changed to real as a result of the big value. You would always have to use isReal() and convert the value back to integer.

IMHO, all this threshold stuff should be removed and integral values should be always treated as integers, unless they exceed the MaxInt/MaxUInt thresholds, off course.

Discussion

  • jmar8692
    jmar8692
    2011-07-20

    • priority: 5 --> 6