Floating Point Arithmetic: Errors

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Listen to an AI-generated conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Which of the following represents the correct normalized floating point form of 0.009723 E9?

  • 0.9723 E11
  • 0.9723 E8
  • None of these
  • 0.9723 E7 (correct)

What is the correct normalized floating point form of 1.2375 E5?

  • 0.12375 E4
  • 0.1237 E6 (correct)
  • 0.1238 E6
  • None of these

What is the correct form of 0.12347891 after truncating the last 4 digits?

  • 0.1291
  • 0.1235
  • 0.7891
  • 0.1234 (correct)

What is the result of multiplying 0.1234 E75 by 0.1111 E37?

<p>0.1370 E111 (B)</p>
Signup and view all the answers

Which of the following formulas correctly calculates the relative error?

<p>Er = (x − xa) / x (A)</p>
Signup and view all the answers

Which of the following formulas correctly calculates the absolute error?

<p>Ea = |x - Xa | (B)</p>
Signup and view all the answers

What is the result of the addition: 0.5467 E2 + 0.7254 E2?

<p>0.1272 E3 (D)</p>
Signup and view all the answers

Convert 0.0456 E5 to normalized floating-point form.

<p>0.456 E4 (C)</p>
Signup and view all the answers

What is the truncation error when 3.14159265 is truncated to four decimal places?

<p>0.00009265 (D)</p>
Signup and view all the answers

What is the absolute error if x = 0.00234567 is rounded to four decimal places?

<p>0.433 × 10^-5 (A)</p>
Signup and view all the answers

If the actual value is 7.8956 and the approximated value is 7.89, what is the absolute error?

<p>0.0056 (D)</p>
Signup and view all the answers

What type of error occurs when digits are discarded from a number?

<p>Truncation Error (A)</p>
Signup and view all the answers

What is the correct result of subtracting 0.1234 E5 from 0.4567 E5?

<p>0.3333 E5 (D)</p>
Signup and view all the answers

What is the first step in adding floating-point numbers?

<p>Equate the exponents (C)</p>
Signup and view all the answers

Which of the following operations is performed on the mantissa during multiplication of floating-point numbers?

<p>Multiplication (B)</p>
Signup and view all the answers

When dividing floating point numbers, what operation is performed on the exponents?

<p>The exponent of the divisor is subtracted from the dividend (A)</p>
Signup and view all the answers

What is the result of normalizing 150.25 E2?

<p>0.15025 E5 (C)</p>
Signup and view all the answers

What is 0.0005678 truncated to 3 decimal places?

<p>0.000 (C)</p>
Signup and view all the answers

If x = 2.34567 and it's rounded off to two decimal places, what approximated value ($x_a$) should be used to calculate errors?

<p>2.35 (C)</p>
Signup and view all the answers

What is the result of 0.5555 E3 divided by 0.1111 E1?

<p>5.000 E2 (A)</p>
Signup and view all the answers

Flashcards

What is an Error?

The difference between the actual and approximate value from experimental observation or numerical computation.

What are Truncation Errors?

Errors that occur when digits from a number are discarded.

What is Round-off Error?

Occurs when digits are rounded off, adjusting the last remaining digit based on the truncated digit.

What is Normalized Floating Point Form?

Expressing a decimal number where the digit to the left of the decimal point is non-zero, using exponents.

Signup and view all the flashcards

Floating Point Addition Condition?

In floating point addition, exponents must be equal by adjusting the smaller value to match the larger exponent.

Signup and view all the flashcards

Floating Point Subtraction Condition?

In floating point subtraction, exponents must be equal by adjusting the smaller value to match the larger exponent.

Signup and view all the flashcards

Multiplication of Floating Point Numbers

Multiply mantissas and add exponents. The product should be in standard floating-point format.

Signup and view all the flashcards

Division of Floating Point Numbers

Divide mantissas and subtract exponents to obtain the quotient in standard form.

Signup and view all the flashcards

What is Absolute Error?

The positive difference between the actual and approximated value.

Signup and view all the flashcards

What is Relative Error?

The ratio of the error to the actual value of a variable.

Signup and view all the flashcards

Study Notes

Floating Point Arithmetic

  • Floating-point arithmetic involves operations on numbers represented in a format similar to scientific notation, consisting of a mantissa (or significand) and an exponent.

Errors in Floating Point Arithmetic

  • Errors can arise in floating-point arithmetic due to the limitations in representing real numbers with finite precision.
  • Types of errors include data errors, truncation errors, round-off errors, and computational errors.

Error Definition

  • Error represents the difference between the actual and approximate values.
  • Formula: Error (E) = Actual Value - Approximate Value or E = x - xa where x is the actual value and xa is the approximate value.

Truncation Error

  • Truncation error occurs when digits are discarded from a number.
  • This commonly happens when representing numbers in normalized floating-point form due to limited mantissa digits or during the conversion from one number system to another.
  • For instance, truncating 0.90012346 to four digits yields 0.9001.

Round-Off Error

  • Round-off error arises from rounding digits.
  • Rounding is akin to truncation but involves adjusting the last digit depending on the truncated digit.
  • If rounding to the nth decimal place, 1 is added to the nth digit if the (n+1)th digit is 5-9; otherwise, the nth digit remains unchanged.
  • Rounding 0.90012346 to four digits results in 0.9001.

Normalized Floating Point Form

  • Normalized floating-point form requires the digit to the left of the decimal point to be zero and the digit to the right should be non-zero.
  • The notation En means multiplication by 10 to the power n and abc E5 = abc × 10^5
  • In the number abc E5, 'abc' denotes the mantissa, while '5' represents the exponent.
  • 0.0312 E3 in normalized form is 0.312 E2.

Addition of Floating Point Numbers

  • For adding floating-point numbers, exponents must match, select the largest.
  • Express the addition in standard floating-point form.
  • For 0.3254 E2 + 0.5462 E5:
    • Convert 0.3254 E2 to 0.0003 E5, then 0.0003 E5 + 0.5462 E5 = 0.5465 E5

Subtraction of Floating Point Numbers

  • To subtract floating-point numbers, exponents should be equal (adjust to the larger of the two).
  • The subtraction should be converted into standard floating point form.
  • Subtract 0.7254 E5 from 0.7288 E5: 0.7288 E5 - 0.7254 E5 = 0.0034 E5 = 0.3400 E3.

Multiplication of Floating Point Numbers

  • Multiply the mantissa values and add the exponents.
  • The result should be expressed in standard floating-point format.
  • 0.6543 E5 multiplied by 0.2253 E3 gives (0.6543 × 0.2253) E(5 + 3) = 0.1474 E8.

Division of Floating Point Numbers

  • Divide the mantissa of the first number by the mantissa of the second.
  • The exponent of the second number is subtracted from the exponent of the first number.
  • The quotient is expressed in standard form.
  • 0.8888 E5 divided by 0.2000 E3 becomes (0.8888 ÷ 0.2000) E(5 - 3) = 4.4444 E2 = 0.4444 E3.

Absolute Error (EA)

  • Absolute error represents the positive difference between the actual and approximate values of an observation.
  • Formula: EA = |Actual Value - Approximated Value| or EA = |x - ​​xa| when x stands for true and xa stands for approximate.

Relative Error (ER)

  • Relative error is the ratio of the error to the actual value of a variable.
  • Formula: ER = (x - xa) / x, where x is the actual value and xa the approximated value.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Computer Arithmetic Quiz
5 questions
Floating Point Arithmetic Operations
18 questions
Use Quizgecko on...
Browser
Browser