Question: Computes machine epsilon (m). Use a while loop to accomplish this. Start with m equaling 1. In each successive loop compute m = m /
Computes machine epsilon (m). Use a while loop to accomplish this. Start with m equaling 1. In each successive loop compute m = m / 2. Exit the loop when variable 1 + m equals 1. Multiply the result coming out of this loop by 2 and you have computed machine epsilon for your computer. This function should have the following structure:
def machEps():
epsilon = 1.0
return epsilon
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
