Support of larger integers than integer32

Automatically translated from English

While Reals are known to be unprecise, they are 100% accurate even for very large numbers, as long as they do not use a decimal point (=integers). 

Numbers up to 53 bit, or more exactly,  [-(2^53)+1, (2^53)-1], that is a range from −9,007,199,254,740,992 to 9,007,199,254,740,992, will be exactly represented.

More about Reals

If you look at the definition of Double-precision binary floating-point on Wikipedia, this is what you’ll find about the splitting and precision of the digits:

“The 53-bit significand precision gives from 15 to 17 significant decimal digits precision (2−53 ≈ 1.11 × 10−16). If a decimal string with at most 15 significant digits is converted to IEEE 754 double-precision representation and then converted back to a decimal string with the same number of digits, the final result should match the original string. If an IEEE 754 double-precision number is converted to a decimal string with at least 17 significant digits, and then converted back to double-precision representation, the final result must match the original number.”

Convert to string

While it was possible to do calculations on large numbers with the Real type for many years, converting to or from the text was limited to using 12-digit scientific notation, resulting in losing precision.

With 4D v19 R6, we have improved the accuracy and the conversion of a Real number (presenting an integer) into a Text.

The improvement of the conversion to string concerns the String() command and the JSON and XML commands returning numbers in string form.

Code Editor

For example, you can now type in the code editor:

and it will stay as-is instead of being formatted as:
Happy coding!

Vanessa Talbot

• Product Owner •

Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.

Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.