I was calculating projections of normalized 2D points and accidentally I noticed that they were more accurate than when projecting the points without normalizing them. My code is in c++ and I compile with NDK for an android mobile which lacks of FPU (floating point unit).
Why do I gain accuracy in calculations with C++ when I first normalize the values so they are between 0 and 1?
Is it generally true in C++ that you gain accuracy in arithmetic if you work with variables that are between 0 and 1 or is it related to the case of compiling for an ARM device?
You have a misunderstanding of precision. Precision is basically the number of bits available to you for representing the mantissa of your number.
You may find that you seem to have more digits after the decimal point if you keep the scale between 0 and 1 but that’s not precision, which doesn’t change at all based on the scale or sign.
For example, single precision has 23 bits of precision whether your number is 0.5 or 1e38. Double precision has 52 bits of precision.
See this answer for more details on IEEE754 bit-level representation.