The two loop invariants would be: 1.0 == total + delta * 2 and delta &gt; 0, so the while condition would never be false.<p>The amount of memory required to store the delta variable should be at least log_2(n) bits, where n is the iteration number.  This has to be true, regardless of the implementation details of bigFloat because delta has to take on n distinct values.  Eventually it exhausts the memory of the machine.<p>It seems pretty straightforward, unless your compiler is smart enough to see what&#x27;s going on and optimize the body of the loop away, in which case it wouldn&#x27;t terminate.