Floating point numbers are not-precise and sometimes are not even deterministic. Below is a short explanation - of why so.
The major source of determinism in floating point calculations is IEEE 754 standard.
Most of the implementations adhere to IEEE 754 standard (more info about it here: https://en.wikipedia.org/wiki/IEEE_754-2008_revision)
C and C++ do not guarantee to adhere to IEEE 754 standard, therefore any software which was compiled using C/C++ may not necessarily adhere to IEEE 754
The best explanation (yet not 100% accurate or complete) of it is here: https://neerc.ifmo.ru/wiki/index.php?title=Представление_вещественных_чисел
And this cool video is also helpful: https://www.youtube.com/watch?v=RuKkePyo9zk
Sources of error in IEEE 754-compliant systems:
sin
/ cos
/ exp
, so their values can differ on different platforms (see https://www.appinf.com/download/FPIssues.pdf)