Limits in Numbers
Robots and Basic Engine Robots have different number formats. In Basic Engine Robots, the value stored in a variable is a double (binary64 as specified by the IEEE 754 standard). In Robots, variables store numbers in IEEE 754R decimal128 format, which uses 34 decimal digits and an exponent range of −2147483647 to +2147483648 (= 2^31). When storing values in a Robot, rounding may occur and you can expect some loss of precision. For example, if a number has more than 34 digits and the last one is .5, it is rounded off, so the .5 becomes .0. For example, 1234567890123456789012345678901234567890.0 becomes 1234567890123456789012345678901235000000. Integers can get large, but the number of significant figures can only be 34 digits.
You can use numbers up to: 9.9999999999…E2147483647 and numbers as small as 0.1E-2147483646. They are the largest and smallest numbers that you can convert from Text to Number, such as by writing “0.1E-2147483646”.number() in an expression. You can get higher numbers using multiplication, but it might cause an overflow error. The limits for our representation of Numbers gives you the following:
“9.9999999999…9E2147483647”.number() converts to 1.0E2147483648 if there are more than 34 digits in the number, but 9.9999999999…9E2147483647 if there are fewer than 34 digits.
“0.1E-2147483646”.number() converts to 1.0E-2147483647.