This First HW Is Posted in MS Word and PDF. Future HW Will Be in Mathematica and PDF
Total Page:16
File Type:pdf, Size:1020Kb
ECE 3340 HW 1 This first HW is posted in MS Word and PDF. Future HW will be in Mathematica and PDF. Problem 1 (20 pts) Use your computer calculator, or any computational software (e. g. Excel, MATLAB), including your own program in C++, Python, Java,… , but NOT Mathematica to do the follow:
1.1 Let x=1.5*10^308, y=1.2*10^308. Find x+y. Copy and paste your result (screen shot is fine). Explain your result. (Most of the credit is in the explanation, not just the result).
1.2 Let x=4*10^-308, y=3*10^-308. Find x-y. Copy and paste your result (screen shot is fine). Explain your result. (Most of the credit is in the explanation, not just the result).
Problem 2 (50 pts) In the class, we showed an Excel sheet similar to this: 1st column: x0 ranges from 3 to 1.5 2nd column: e0=x0*10^-15 And so on.
x0 e0=x0*10^-15 y=1+e0 e1=y-1 x1=e1*10^15 3 3E-15 1.00000000000000000000E+00 3.108624E-15 3.108624E+00 2.9 2.9E-15 1.00000000000000000000E+00 2.886580E-15 2.886580E+00 2.8 2.8E-15 1.00000000000000000000E+00 2.886580E-15 2.886580E+00 2.7 2.7E-15 1.00000000000000000000E+00 2.664535E-15 2.664535E+00 2.6 2.6E-15 1.00000000000000000000E+00 2.664535E-15 2.664535E+00 2.5 2.5E-15 1.00000000000000000000E+00 2.442491E-15 2.442491E+00 2.4 2.4E-15 1.00000000000000000000E+00 2.442491E-15 2.442491E+00 2.3 2.3E-15 1.00000000000000000000E+00 2.220446E-15 2.220446E+00 2.2 2.2E-15 1.00000000000000000000E+00 2.220446E-15 2.220446E+00 2.1 2.1E-15 1.00000000000000000000E+00 1.998401E-15 1.998401E+00 2 2E-15 1.00000000000000000000E+00 1.998401E-15 1.998401E+00 1.9 1.9E-15 1.00000000000000000000E+00 1.998401E-15 1.998401E+00 1.8 1.8E-15 1.00000000000000000000E+00 1.776357E-15 1.776357E+00 1.7 1.7E-15 1.00000000000000000000E+00 1.776357E-15 1.776357E+00 1.6 1.6E-15 1.00000000000000000000E+00 0.000000E+00 0.000000E+00 1.5 1.5E-15 1.00000000000000000000E+00 0.000000E+00 0.000000E+00
Finish the chart on your computer and plot x0 vs. x1. Show your plot (copy and paste as an image). Discuss at what value (smallest number relative to 1) that Excel flushes the number to zero. Take log2 of that smallest number. You can use Mathematica like this:
Problem 3 (30 pts)
Use the APP 1.0.3.1 on accuracy and precision to obtain the follow cases (4 cases) for each category of empirical measurements and numerical calculations. (4 cases for each means that you should have 8 charts) Show a case for:
- low accuracy, <= 0.5, low precision, <= 2.5 dB or LSB=bit 0
- high accuracy, =1, low precision,<= 1 dB or bit LSB=bit 0
- low accuracy<= 0.1, high precision>= 12 dB or LSB=bit 4
- high accuracy=1, high precision >= 12 dB or LSB=bit 4
Copy and paste for each case, labeled it properly with accuracy and precision. Do not mix cases of the two categories. Each category should have its own section.