I am guessing this is a way to calculate epsilon; but, I am not sure.3) Given the initialization: double z1 = 1.0, z2 = z1/2; use z1,z2 as a two-point sliding window (i.e. z1=z2; z2=z1/2; slides the window) and write a loop to find the value of z1 such that 1 + z1 is greater than 1 but 1 + z2 is equal to 1.
How to (portably) get DBL_EPSILON in C/C++ - Stack Overflow
I kept getting the wrong value for epsilon; turns out the compiler optimizes the code and results in LDBL_EPSILON under MinGW GCC.
http://en.wikipedia.org/wiki/Machine...mation_using_C
Tim S.