Besides a loss of precision, there must also be some kind of special conversion behaviour that takes place when a double is cast as a float (e.g. clamping, etc). I have tried to find the C++ standard document(s), and the source code of the g++ compiler on Linux, but I have had no luck. I notice that the casting behaviour is identical on Windows as it is on Linux; the app gives the same results on both operating systems.
Any insight would be greatly appreciated. Thanks for your time.
I tried to do manual clamping, but I did not get the result that I’m looking for.