Download presentation

Presentation is loading. Please wait.

Published bySibyl Wilkinson Modified about 1 year ago

1
Errors and rounding

2
How tall are you? What is that in centimetres? So how tall are you in millimetres? Margin of error Sometimes acceptable What happens when we start doing operations though?

3
Move number to nearest ‘significand’ Easy. What about 0.5? Round-up Round to even, statistician’s rounding, banker’s rounding Rounding towards zero (truncating)

4
Do these calculations using the prices corrected to the nearest penny. How much do motorists pay for petrol in Hereford? Petrolprices.com take an average of the three prices given. If we have a 60 litre tank, how much does it cost to fill it? (Assume it is empty to start). What if we used ‘super’ to fill the same tank? What is the difference? What if we used diesel to fill the same-size tank? What is the difference? Now repeat the calculations but don’t correct the prices. Are your results the same?

5
How do you store a fraction in a computer? ½ easy = 0.5 1/3 more difficult = …33 How many bits are allocated (allowed) for one number? If no limit could use all of a computers memory on one fraction!

6
Most computers use IEEE standard for ‘floating point numbers’ Provides a way to store fractions in the space of an 8- byte number But, for most numbers it involves an approximation ‘rounding’ “correct” number to nearest whole number X decimal places X significant figures ‘truncation’ just cut number off at specified limit

7
Whole numbers = (x*1 + x*2+x*4+x*8+x*16etc) Can store any whole number Fractions = (x*1/2+x*1/4+x*1/8+x*1/16etc) How would you convey 1/10? Computers work to 15 decimal places.

8
Division = sharing Divide these 50 marbles between these 5 buckets

9
Division = sharing Divide these 50 marbles between these buckets:

10
Division by zero crashes programmes In spreadsheets it returns ‘error’ messages

11
Overflow Calculation returns value too large for storage location Too much memory is being used or required Underflow Calculation returns a value which is too small (ie too close to zero) {fractions are tricky} Flush to zero Gradual underflow; subnormal numbers

12
88% of spreadsheets have errors Research: Bad math rampant in family budgets and Harvard studies European Spreadsheet Risks Interest Group European Spreadsheet Risks Interest Group Peer review Software programs

13
Access this website: Eight of the worst spreadsheet blunders _the_Worst_Spreadsheet_Blunders?page=4&ta xonomyId=3000 _the_Worst_Spreadsheet_Blunders?page=4&ta xonomyId=3000 Take one of the stories: find out what happened explain it to the rest of the class what was the loss what was the lesson learnt?

14
Open excel Goto top left (A1) Enter 1 – copy value to 4 rows beneath Go to A1, go right 1 cell (B1) Enter 3 – copy value to 2 rows beneath Goto B4, enter 6, copy value to B5 Goto C1, enter “=A1/$B$1” Copy formula to C2 and C3

15
Add the result of C1,C2 and C3 in your head Note your answer Insert a row below row 3 Goto C4 Enter =sum(C1:C3) – is this the same as your result? Who is correct?

16
Copy the formula from C3 to C5 Is the result as expected? Absolute vs relative referencing

17
These happen in the real world with major consequences! Financial loss (corporate level) Job loss (individual level) Transcription Wrong sign Allowing access to wrong people, wrong version or at wrong time Using formatting to hide data instead of removing it Adding too many zeros Cut and paste Incorrect data (typo, transcription error) Incorrect formula (typo, cut & paste)

18
1. Convert to binary: 63, 15, 48, 7, Convert from binary to decimal: 1101, , , Convert to hexadecimal from decimal via binary: 15, 18, 33, 61, Find the errors in the spreadsheetspreadsheet 5. Use the following example to explain two’s complement: a) b) 2-1 (use this to explain why we use it, rather than sign & magnitude).

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google