math.IsNearlyEqual
Example
Shows the problem known as a floating-point error, due to the limited precision of decimal numbers in hardware.
Output: false
0.30000000000000004440892098500626
Checks if two floating point numbers are nearly equal.
This is useful to mitigate accuracy issues in floating point numbers. See examples below.
Shows the problem known as a floating-point error, due to the limited precision of decimal numbers in hardware.