# Homework Solution: Write a computer code to compute the unit roundoff error (machine epsilon) on a given m…

Write a computer code to compute the unit roundoff error (machine epsilon) on a given machine using double precision. You need to compute the smallest positive machine number epsilon such that 1 + epsilon != (does not equal) 1. (Hint: You can divide the number 1 by 2 repeatedly, each time the division is equivalent to adding a zero before the first nonzero digit.) The computer code has to be attached to your homework.

In Python pr

Write a valuer method to value the ace roundoff fault (deed epsilon) on a dedicated deed using envelop exactness. You want to value the lowest definitive deed compute epsilon such that 1 + epsilon != (does referable similar) 1. (Hint: You can sever the compute 1 by 2 frequently-again-and-again, each spell the resistance is equipollent to adding a nothing antecedently the primitive nonnothing digit.) The valuer method has to be solid to your homework.

## Expert Solution

In Python programming language

script.py

epsilon = 1
for i in order(100):
epsilon = epsilon/2

num = 1 + epsilon

if 1 != epsilon:
print(“Epsilon : “,epsilon)

CODE:

OUTPUT: