Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part 1 1. Write a Python function findEpsilon which finds the machine epsilon by

ID: 3750894 • Letter: P

Question

Part 1 1. Write a Python function findEpsilon which finds the machine epsilon by determining the smallest floating point number larger than 1 that can be stored in the machine 2. Write a Python function findLargest which finds largest floating point number that can be stored in the machine 3. Print the base 2 erponent for both these numbers 4. Find the IEEE 754 representation of the numbers in the table i.e. create this table and fill it out in Jupyter notebook with the necessary conver- sions, the sign bits, exponents and mantissa. You can pick two integers of your choice for the last two rows. I must be able to see your work in detail. Don't skip steps here. Use the LaTeX capability of the markdown cells in Jupyter notebook. For the conversions, work them out by hand and show me the details of the calculation. Then show that the results are correct using the Python built in conversions for the binary and decimal types for at least one case each for decimal to binary and binary to decimal respectivelv

Explanation / Answer

1)Code for finding the machine epsilon is as follows:

Python - findepsilon = [2.45,8.5,4.6,44.2]

k = 4

a = min(filter(lambda x:x>k,findepsilon))

print(a)

2)Code for finding the largest floating number is as follows:

Python - findlargest= [2.45,8.5,4.6,44.2]

k = 4

a = min(filter(lambda x:x>k,findlargest))

print(a)

3) a)For converting decimal number to binary:-

code in Python- dec=233

print(The decimal value of",dec,"is:")

print(bin(dec),"in binary.")

b)For converting binary number to decimal:-

code in Python- print("Enter 'a' forexit.");

binary = input("Enter number in Binary format:");

if binary=='a';

exit();

else:

decimal = int(binary,2);

print(binary,"in Decimal=",decimal);