it’s said that in Python all float values are calculated in double precision.
i hope it also means that the values are stored in double precision. but i am not sure.
and i am concerned that, in Panda3D, are the coordinates stored in double precision?
here is why i care about that:
in double precision, 900,000.0 is stored as 0x412B774000000000h, when the hex form is added 1h to 0x412B774000000001h, the float value is still 900,000.0 . only when hex form is added 5h to 0x412B774000000005, the float value becomes 900,000.000000001 . if 1 unit stands for 1 meter, the precision is 0.000001 millimeter.
in single float precision, 900,000.0 is store as 0x495BBA00h, when hex form is added 1h to 0x495BBA01h, the float value becomes 900,000.0625 , that is 6.25 centimeters (more than 2 inches)! this gap can easily be seen with human eye. there is no 900,000.03 meter in single float precision.
this problem becomes bigger on greater figures. and 900,000.0 meter is not yet a great figure on the planet earth.
today i found some phenomenon which may indicate that the coordinates of objects are not stored in double precision, or precision is lost in the process of calculation. as i am making a simulator program, visible inprecision is a big problem.
can someone confirm that the coordinates are stored in single float precision? and is there a way to change that?