Thom L. wrote:

Hmm…yeah, I figured that must be it, but I just didn’t expect it with

numbers of this scale. Thanks for the insight!

It isn’t about the magnitude of the numbers, it is about the unseen

bits.

You could produce examples of numbers with very large or very small

exponents and they are equally likely to have the sort of roundoff error

you experienced.

The only thing you can rely on with floating-point numbers is that the

same

sequence of operations, on the same platform, will produce numbers that

will agree with each other when compared later.

There are many packages now that use decimal instead of binary internal

storage to avoid this sort of thing, at the expense of execution speed

and

storage space. But an interesting fact about binary vs. decimal is that

projects that compute Pi to billions of places, now perform the entire

operation in decimal internally, because the time required to convert

the

result from binary to decimal at the end of the computation turned out

to

be a substantial percentage of the entire calculation time.