(2021-10-15, 17:49)Lasse Deleuran Wrote: This is a continuation of this thread. The thread pointed out rounding errors in existing primitives.
Please note that it is generally a bad idea to use floating point arithmetic to get consistent results on different platforms.
Any approach, which do not rely on strict floating point math will result in a different result somewhere else.
JavaScript is a weakly typed language, from the design thought, there are no strict for floating point data types, so the precision error problem is especially prominent.
The Java 17 JDK changed its behaviour and is now using always strict floating point semantics.
For the C#/.net-Framework the problem exists, too.
(JDK 17) https://openjdk.org/jeps/306
https://gafferongames.com/post/floating_...terminism/
(floating point math in C#) https://stackoverflow.com/a/6685966