can run into errors of precision. We experienced this in the tasks we did when working with floating point numbers. ▪ There are two types of errors that we can calculate: – Absolute Error – Relative Error
difference between the exact value and the approximation. ▪ The relative error is the absolute error divided by the magnitude of the exact value. ▪ We represent this as a percentage relative error expressed in terms of per 100.
trying to represent the number: 8.910 in binary. ▪ The closest possible representation we can display is: 0.10001112 01002 ▪ The absolute error is the difference between the expected value of 8.910 and the representation above. ▪ Calculate the absolute error.
instance and we were expecting 5cm but we arrived at 3cm, then this is an error that is out by quite a distance. ▪ Alternatively if we were out by 2cm and we were expecting a result of 12000cm but arrived at 11998cm, relatively speaking we were not out my that much, hence the term relative error.
where we were trying to represent the number: 8.910 in binary. ▪ The closest possible representation we could display was: 0.10001112 01002 ▪ We calculated the absolute error and arrived at 0.025 ▪ The relative error is calculated as follows absolute error 0.025 expected 8.9 ▪ Ensure when you calculate the relative error, you convert it into a percentage by moving the decimal place two places to the right. = = 0.0028 = 0.28%