Double equals zero

Note that the maxUIps value refers to the binary (or hex) representation. With that in mind, look at the hex representation of the numbers converted to the IEEE floating point representation:

3.1415926535897932 = 0x400921FB54442D18
3.141592653589795 = 0x400921FB54442D1C
Difference in last bytes (1C - 18) is 4
For maxUIps of 4: Equal but for maxUIps of 3: Not Equal

2.1415926535897932 = 0x400121FB54442D18
2.141592653589795 = 0x400121FB54442D1C
Difference in last bytes (1C - 18) is 4
For maxUIps of 4: Equal but for maxUIps of 3: Not Equal

1.1415926535897932 = 0x3FF243F6A8885A30
1.141592653589795 = 0x3FF243F6A8885A38
Difference in last bytes (38 - 30) is 8
For maxUIps of 4: Not Equal

0.1415926535897932 = 0x3FC21FB54442D183
0.141592653589795 = 0x3FC21FB54442D1C4
Difference in last bytes (C4 - 83) is 41
For maxUIps of 4: Not Equal

Google IEEE Floating Point converters to do your own conversions.

You’ll notice that the difference in the last bytes increases as you get closer to zero. The author of the blog post referenced in the Xojo Equals documentation states that “The ULPs based technique also breaks down near zero”. The post is well worth reading.

The same author also notes that “You just won’t believe how vastly, hugely, mind-bogglingly hard it [floating point math] is.”