Download presentation
1
Lecture 2 Number Representation and accuracy
Normalized Floating Point Representation Significant Digits Accuracy and Precision Rounding and Chopping Reading assignment: Chapter 2 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
2
Representing Real Numbers
You are familiar with the decimal system Decimal System Base =10 , Digits(0,1,…9) Standard Representations EE 3561_Unit_1 (c)Al-Dhaifallah 1435
3
Normalized Floating Point Representation
No integral part, Advantage Efficient in representing very small or very large numbers EE 3561_Unit_1 (c)Al-Dhaifallah 1435
4
Binary System Binary System Base=2, Digits{0,1} EE 3561_Unit_1
(c)Al-Dhaifallah 1435
5
7-Bit Representation (sign: 1 bit, Mantissa 3bits,exponent 3 bits)
EE 3561_Unit_1 (c)Al-Dhaifallah 1435
6
Fact Number that have finite expansion in one numbering system may have an infinite expansion in another numbering system You can never represent 0.1 exactly in any computer EE 3561_Unit_1 (c)Al-Dhaifallah 1435
7
Representation Hypothetical Machine (real computers use ≥ 23 bit mantissa) Example: If a machine has 5 bits representation distributed as follows Mantissa 2 bits exponent 2 bit sign 1 bit Possible machine numbers (0.25=00001) (0.375= 01111) (1.5=00111) EE 3561_Unit_1 (c)Al-Dhaifallah 1435
8
Representation Gap near zero EE 3561_Unit_1 (c)Al-Dhaifallah 1435
9
Remarks Numbers that can be exactly represented are called machine numbers Difference between machine numbers is not uniform. So, sum of machine numbers is not necessarily a machine number = (not a machine number) EE 3561_Unit_1 (c)Al-Dhaifallah 1435
10
Significant Digits Significant digits are those digits that can be used with confidence. Length of green rectangle = 3.45 significant EE 3561_Unit_1 (c)Al-Dhaifallah 1435
11
Loss of Significance Mathematical operations may lead to reducing the number of significant digits E significant digits ─ E significant digits ────────────── E significant digits E-02 Subtracting nearly equal numbers causes loss of significance EE 3561_Unit_1 (c)Al-Dhaifallah 1435
12
Accuracy and Precision
Accuracy is related to closeness to the true value Precision is related to the closeness to other estimated values EE 3561_Unit_1 (c)Al-Dhaifallah 1435
13
Accuracy and Precision
Better Precision Accuracy is related to closeness to the true value Precision is related to the closeness to other estimated values Better accuracy EE 3561_Unit_1 (c)Al-Dhaifallah 1435
14
Rounding and Chopping Rounding (1.2) Chopping (1.1)
Rounding: Replace the number by the nearest machine number Chopping: Throw all extra digits True Rounding (1.2) Chopping (1.1) EE 3561_Unit_1 (c)Al-Dhaifallah 1435
15
Error Definitions True Error
can be computed if the true value is known EE 3561_Unit_1 (c)Al-Dhaifallah 1435
16
Error Definitions Estimated error
Used when the true value is not known EE 3561_Unit_1 (c)Al-Dhaifallah 1435
17
Notation We say the estimate is correct to n decimal digits if
We say the estimate is correct to n decimal digits rounded if EE 3561_Unit_1 (c)Al-Dhaifallah 1435
18
Summary Number that have finite expansion in one numbering system may
Number Representation Number that have finite expansion in one numbering system may have an infinite expansion in another numbering system. Normalized Floating Point Representation Efficient in representing very small or very large numbers Difference between machine numbers is not uniform Representation error depends on the number of bits used in the mantissa. EE 3561_Unit_1 (c)Al-Dhaifallah 1435
19
Summary Rounding Chopping Error Definitions: Absolute true error
True Percent relative error Estimated absolute error Estimated percent relative error EE 3561_Unit_1 (c)Al-Dhaifallah 1435
20
Lecture 3 Taylor Theorem
Motivation Taylor Theorem Examples Reading assignment: Chapter 4 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
21
Motivation We can easily compute expressions like b a 0.6
EE 3561_Unit_1 (c)Al-Dhaifallah 1435
22
Taylor Series EE 3561_Unit_1 (c)Al-Dhaifallah 1435
23
Taylor Series Example 1 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
24
Taylor Series Example 1 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
25
Taylor Series Example 2 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
26
EE 3561_Unit_1 (c)Al-Dhaifallah 1435
27
Convergence of Taylor Series (Observations, Example 1)
The Taylor series converges fast (few terms are needed) when x is near the point of expansion. If |x-c| is large then more terms are needed to get good approximation. EE 3561_Unit_1 (c)Al-Dhaifallah 1435
28
Taylor Series Example 3 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
29
Example 3 remarks Can we apply Taylor series for x>1??
How many terms are needed to get good approximation??? These questions will be answered using Taylor Theorem EE 3561_Unit_1 (c)Al-Dhaifallah 1435
30
Taylor Theorem (n+1) terms Truncated Taylor Series Reminder
EE 3561_Unit_1 (c)Al-Dhaifallah 1435
31
Taylor Theorem EE 3561_Unit_1 (c)Al-Dhaifallah 1435
32
Error Term EE 3561_Unit_1 (c)Al-Dhaifallah 1435
33
Example 4 (The Approximation Error)
EE 3561_Unit_1 (c)Al-Dhaifallah 1435
34
Example 5 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
35
Example 5 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
36
Example 5 Error term EE 3561_Unit_1 (c)Al-Dhaifallah 1435
37
Alternative form of Taylor Theorem
EE 3561_Unit_1 (c)Al-Dhaifallah 1435
38
Taylor Theorem Alternative forms
EE 3561_Unit_1 (c)Al-Dhaifallah 1435
39
Derivative Mean-Value Theorem
EE 3561_Unit_1 (c)Al-Dhaifallah 1435
40
Alternating Series Theorem
Alternating Series is special case of Taylor Series. This means that the error is less or equal to the magnitude of the first omitted term in the alternating series. EE 3561_Unit_1 (c)Al-Dhaifallah 1435
41
Alternating Series Example 6
EE 3561_Unit_1 (c)Al-Dhaifallah 1435
42
Remark In this course all angles are assumed to be in radian unless you are told otherwise EE 3561_Unit_1 (c)Al-Dhaifallah 1435
43
Maclurine series Find Maclurine Maclurine series expansion of cos (x)
Maclurine series is a special case of Taylor series with the center of expansion c = 0 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
44
Taylor Series Example 7 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
45
Taylor Series Example 8 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
46
Taylor Series Example 8 EE 3561_Unit_1 (c)Al-Dhaifallah 1435
47
Summary Taylor series expansion is very important in most numerical methods applications approximation remainder Remainder can be used to estimate approximation error or estimate the number of terms to achieve desirable accuracy EE 3561_Unit_1 (c)Al-Dhaifallah 1435
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.