Im having a problem, trying to set up a loop.
I have a value u, and I should check it for a tolerance of 10^-4, and depending on its value I use u for different computations.
My problem is writing a while loop to check for the tolerance.
I have while (u < tolerance), but if u is negative, it jumps out of the loop, although the accuracy(tolerance) still isnt correct. I am aiming for an accuracy of 10^-4.
How can I structure it to correctly check for the accuracy?
Thanks