If i set transform.position.z to 12.11 in the code or in the inspector then both results are 7 but if i move object by hand using the snap option to exacly position 12.11 the results are different. Looks like moving the object and snapping don’t show the correct location in the inspector at it is in reality.
Unfortunately 12.11 is an impossible number to represent as a binary floating point value. That is going to cause some discrepancies when various systems need to convert to/from it.
When you perform operations on hardcoded numbers in C# (“c / d” in your 2nd case), the operation is evaluated during compilation and replaced by the hardcoded result value in the compiled binary. The catch is that the C# compiler used by Unity seems to perform compile-time operations using doubles instead of floats, which have higher precision and thus produce slightly different values.