Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Project 02 Materials / C09_YourID_Exercise09

.docx
Скачиваний:
20
Добавлен:
14.10.2016
Размер:
1.26 Mб
Скачать

exercise 09: calculator values

Application Development

Name: <your name goes here>

Purpose: We want you to see that just storing a value is not enough. In order for the calculator project to work, we need to store additional information, such as the degree of uncertainty in the value (the error term) and the units being used to measure.

Perform each of the following activities. If you have questions, issues, or doubts, please ask for help and do not just guess!

For many numbers that scientists and engineers use, it is common to use three things: a value, an error term (to specify the amount of uncertainty with the value), and the units of measurement.

For example: 3.567 cm ± 0.001 cm.

Here 3.567 is the value, “± 0.001” is the amount of uncertainty (the error term) and “cm” is the units of measurement.

Addition:

Let us assume 2 numbers and add them:

1.56 cm ± 0.01 cm

1.45 cm ± 0.01 cm

The sum is: 3.01cm ± 0.02 cm

As you see here, after the addition both the values as well as the error terms are added and the units of measurement must be the same and it is used in the sum.

Using the same approach, add the following numbers:

  1. 4.001 cm ± 0.001cm + 4.023 cm ± 0.002cm

  1. 5.11 feet ± 0.01 feet + 5.210 feet ± 0.015 feet.

  1. 1.45 cm ± 0.01 cm + 2.4531 cm ± 0.0001 cm = ? Should the error term be “0.01” or “0.0101”? Explain why you believe it should this answer.

  1. Can you add 1.33 feet ± 0.01 feet + 6.25 feet ± 0.25 inches? If yes, show the answer and explain how you produced it. If not, explain why you are not able to add the values.

  1. Can we add 3.112 years ± 0.001 years + 2.131 kg ± 0.001 kg? If yes, show the answer and explain how you produced it. If not, explain why you are not able to add the values.

Subtraction

Let us now perform the subtraction operation.

4.56 cm ± 0.02 cm

1.45 cm ± 0.01 cm

The resulting difference is: 3.11 cm ± 0.03 cm

Here you subtract the values, but add the errors.

Using the same approach, subtract the following numbers:

  1. 1.45 cm ± 0.02 cm – 1.22 cm ± 0.01 cm.

  1. 5.41 feet ± 0.01 feet – 5.210 feet ± 0.001 feet.

  1. 1.23456 cm ± 0.00001cm – 1.23469 cm ± 0.00001cm. How many significant digits are there in the two values being subtracted? How many significant digits are there in the result?

  1. Can you compute 1.33 feet ± 0.01 feet – 6.25 inches ± 0.25 inches? If yes, show the result and explain. If not, explain why not.

Multiplication

From your reading about multiplication in the Precision handout, you should have learned that you cannot compute the error term by just adding the error terms of the operands as you do with addition or subtraction. The following is the algorithm that is recommended:

To compute the result's error term (rerrorTerm) we first need to compute the result, r:

r = a × b where a, b are the values of the input operands.

Then we need to compute the relative fraction of “a” (aerrorFraction) that is uncertain:

aerrorFraction = aerrorTerm / ⎢a ⎢

Next we compute the relative fraction of “b” (berrorFraction) that that is uncertain:

berrorFraction = berrorTerm / ⎢b ⎢

From these two, we then compute the result's error (rerrorTerm) and round it to one or two significant digits:

rerrorTerm = (aerrorFraction + berrorFraction) × ⎢r ⎢

Given the error term, we now can determine how many significant decimal places the result should have.

Using this algorithm for computing the error term, multiply the following numbers and provide the product, the error term, and the units:

  1. 1.23 cm ± 0.01cm × 1.26 cm ± 0.01cm

  1. 5.41 feet ± 0.03 feet × 2.21 feet ± 0.01feet

  1. Can you multiply 1.211 kg ± 0.001 kg × 1.34 m ± 0.02 m? If yes, give an explanation. If not, explain why not.

  1. 3.12 m/sec ± 0.01 m/sec × 2.15 sec ± 0.02 sec? Is it possible to do this multiplication? If yes, do the multiplication and explain what you did and why. If not, explain why not.

  1. 9.52 m/sec2 ± 0.01 m/sec2 × 3.50 sec ± 0.02 sec? Is possible to do this multiplication? If yes, explain what you did and why. If not, explain why not.

Division

For division we use the same algorithm for computing error term as in multiplication, but the process for computing the units is different. Based on your insight from the reading in the precision document, please divide the following numbers:

  1. 3.46 cm ± 0.01 cm / 1.26 cm ± 0.01cm

  1. 16.32 cm3 ± 0.01 cm3 / 8.5 cm ± 0.1cm

  1. 5.05 km ± 0.04 km / 19.11 cm ± 0.01 cm. Is possible to do this division? If so, what should the error term be for this and why? If not, why not?

  1. 1.55 m ± 0.01 m / 1.34 cm ± 0.02 cm? Is possible to do this division? If yes, explain what you did and why. If not, explain why not.

  1. 25.23 m ± 0.01 m / 3.25 sec ± 0.02 sec? Is possible to do this division? If yes, explain what you did and why. If not, explain why not.

  1. This is the end of the exercise. Save your work and upload this exercise to the LMS following the instructions given in Exercises 1 and 2. (Please be sure you have changed the name at the top of this document and properly renamed it to start with your StudentID before you began editing it, right?)

Congratulations! You have just completed the ninth exercise.

©iCarnegie - Distribution or copying without permission is prohibited.

Соседние файлы в папке Project 02 Materials