And one additional point for you guys to remember:
DIM A AS DOUBLE
DIM b AS _FLOAT
A# = 0.12345678901234567890
b## = 0.12345678901234567890
PRINT A#
PRINT b##
I can’t stress this point enough: PRINT IS UNRELIABLE FOR VALUE COMPARISONS..
PRINT is probably the most complicated and overly convoluted piece of code in all of QB64. You want a nice headache?? Go into QB64.bas and libqb.cpp and try and decode how the BLEEP Galleon has it doing what it does. PRINT converts, inverts, reverts, exverts, introverts, unverts, and farts on whatever you send it, and then by some presto magicunknownicus it displays stuff to the screen — but that’s at whatever precision level PRINT wants to display it at.
x = 0.0000000000000000001 *might* print 0 to the screen, making you think, “OH! I went beyond precision limits!” Then you might write FOR I = 1 TO 10: x = x * 2: NEXT. At this point, when you get x, it might print something like 1D-8... If the internal value was actually 0, then 0 * 0 ten times would still be 0, but the answer doesn’t show that.
The internal value and the printed value aren’t always the same, just from however PRINT is doing what it does.
With the above, you might try “IF A# = b## THEN”, and find that the two values aren’t necessarily the same. A# may truncate the precision before b## does, giving you different values.
I’m not certain at what depth of precision the values change, but I’m certain I’ve experienced the issue in code before in the past. _FLOAT holds precision greater than PRINT displays, so you can’t always trust it as a value comparison tool.