Fixing rounding errors in primitives


Problem is harder than it seems
#8
(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
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Fix of 1-4ring5.dat - by Lasse Deleuran - 2021-10-15, 17:54
RE: Fix of 1-4ring5.dat - by Travis Cobbs - 2021-10-15, 18:20
RE: Fix of 1-4ring5.dat - by Lasse Deleuran - 2021-10-15, 18:30
RE: Fix of 1-4ring5.dat - by Lasse Deleuran - 2021-10-15, 20:06
Problem is harder than it seems - by Nils Schmidt - 2022-06-16, 7:22

Forum Jump:


Users browsing this thread: 1 Guest(s)