Technical FAQs

Ask a Question

Unity Pro: real format limitation when adding small value to big value

The result of the addition of small real value to a big real value stay equal to the big real value (the result is frozen) or the result does not give rounded value. This behaviour comes from the "Real format" used : 32 bits. When the small value is becoming smaller than the precision of the big value the calculation is no more significant. In attachment the explanation on how to calculate the precision. Note: There is a risk of a wrong result when adding a very large and a very small value. The SATURATION function calculates the maximum REAL value (L, the saturation limit) that give a correct result when added to a very small REAL value (P, the precision). The function output gives the maximum REAL value (L) and a boolean error bit that indicates if the addition is OK (0) or not (1). EN and ENO can be configured as additional parameters.
Was this helpful?
What can we do to improve the information ?