Round Off Errors
|
In this segment we’ll talk about round off errors. So, in order to talk about round off errors uh what we need to
do is we need to talk about where the errors come from in computation. So, we
talk about the errors which are inherent in numerical methods; so, the two
types of errors which are inherent in numerical methods one is the round off
error and another one is the truncation error. And it's important that we
understand the distinction between the two uh because sometimes they get
conflated with each other: so round off error comes from, caused by, it’s
caused by approximating numbers. Because if we cannot take a number and
represent it exactly it will have to be represented by an approximate number;
that's where the round off error comes from. Truncation error, which is a
separate lesson, comes from approximating mathematical processes. So, it's
important for you to understand that hey we have round off error here which
is caused by simply by approximating numbers. So, round off error is defined
as actual number and from that you subtract the representation of number. So,
a good example of that is one-third; let's suppose one-third we know that if
you write in decimal format, it will be written like this. Now if we say hey,
we want to represent one-third with only six significant digits let's suppose
then this will be the approximation of one third so if that's how it is
represented then the round of error will be one-third minus this number right
here. And that number will turn out to be six zeroes right here and then
we'll have three, three, three recurring from there. So that's how the round-off
error is taking place. Now round of error also takes place in irrational
numbers just pi, square root of two, and so on and so forth as well. That's
to be thought about. Also, what you got to think about is that since numbers
are not represented in base 10 in the computer, they are represented in base
2. So, let’s suppose I have 0.3 in base 10; this number here will have
infinite number of zeros and ones zero all ones after the radix point right
here. So, what that means is since the computer represents in base 2 and in
base 2 it will require infinite number of digits after the radix point you
can very well see then since the computer cannot have infinite number of bits
to represent the number there is going to be a difference between how 0.3 is
represented actually in the computer so there's going to be a difference and
that will be the round off error also. Also, for round off error you got to
think about two things: are you chopping a number or are you rounding, uh,
the number. So that's something which you will see in later lessons as well.
Chopping is where, for example, if you have a number like 0.3378 and somebody
says hey go ahead and write it up to three significant digits, you will write
0.333, that is chopping. If somebody says hey go ahead and use rounding, you
will say 0.334 because this digit here is 5 or more. So, that's why you will
there's a difference between these two things the chopping rounding but the
error which is caused by chopping or rounding is so called the round off
error and that's the end of this segment |