This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: T2-1City University of Hong Kong Electronic Engineering Semester B 2007-2008 EE3108 Engineering Analysis Tutorial 2 In this tutorial, we examine the manifestation of numerical errors in the real computations. Round-off errors and truncation errors are considered using the Matlab environment. I. Round-off errorsRecall from the lecture that the computer number line is discrete: All numbers from (2/1ε−) to (2/1ε+) are rounded to 1. We calculated that 161022.2−×=εfor the double-precision format. However, assuming that we do not know value of ε, we can still find it out by using the following algorithm. Using the above flowchart, please modify the following script file. Run the file and see if it gives the expected value of ε. %File: t0201 clear; epsilon=1; b=1+epsilon/2; %%%% % %%%% fprintf(['The epsilon for this machine is ' num2str(epsilon)]); EE 3108 Semster B 2007/2008 S C Chan Start ε := 1Does the computer think that b = 1?...
View Full Document
This note was uploaded on 01/11/2011 for the course EE 3108 taught by Professor Nelsonszechunchan during the Spring '07 term at City University of Hong Kong.
- Spring '07