1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nadusha1986 [10]
3 years ago
5

Discuss a situation in which you might want to use a floating-point number with a fractional part for a loop control variable. W

hat are the pitfalls of using real numbers for the index variable in a for loop?
Computers and Technology
1 answer:
serious [3.7K]3 years ago
7 0

Answer:

1. When calculating the division of each number in some range of floating type number.

2. One cannot use real numbers for exact comparison. Two real numbers are rarely equal. Real numbers are have representational errors.

Explanation:

1. In structured programming, we make use of a floating-point number with a fractional part for a loop control variable. a given scenario is when we just want to calculate the division of each number in some range of floating type number. However, the downsides to using a floating-point number with a fractional part for a loop control variable are:

  • They can cause 'off-by-one' failure
  • A floating point number cannot represent all simple fractions exactly

2. The pitfalls of using real numbers for the index variable in a for loop:

  • Two real numbers are hardly equal
  • One cannot use real numbers for exact comparison
  • The existence of representational errors
You might be interested in
The physical parts of the computer that you can see and touch are called______.
Tatiana [17]
Physical parts of computer: Computer Hardware
5 0
2 years ago
A​ client-server application that requires nothing more than a browser is called​ ________.
goblinko [34]
Hello  <span>Tacobell5401</span>

 Answer: A​ client-server application that requires nothing more than a browser is called​  thin-client application


Hope this helps
-Chris
3 0
3 years ago
Read 2 more answers
In early Oklahoma, __________ tribes were most nomadic. A. hunting B. farming C. semi-sedentary D. agricultural Please select th
denpristay [2]

Answer:

A

Explanation:

They needed to follow the food/buffalo

5 0
2 years ago
Hardy doesn't have access to a work template, which is on the network server. What should he do?
Anton [14]

He should go to a desktop computer that is attached to the network server to access it

7 0
3 years ago
Read 2 more answers
if image size and resolution are the same, which file format, .jpg, .gif, .or .tiff, will give you the smallest file size?
dimaraw [331]
.jpg will be the smallest size
3 0
2 years ago
Read 2 more answers
Other questions:
  • This question involves the creation of user names for an online system. A user name is created based on a user’s first and last
    13·1 answer
  • Why do objects in the back seat move when the car turns
    11·1 answer
  • Do you need to know javascript to learn python?
    8·1 answer
  • Conduct online research to determine specific conflict-resolution and management techniques and skills that would be beneficial
    5·1 answer
  • How can i promote netiquette??​
    10·1 answer
  • A newspaper wants to estimate the proportion of Americans who will vote for Candidate A. A random sample of 1000 voters is selec
    14·1 answer
  • Write a C++ function using recursion that returns the Greatest Common Divisor of two integers. The greatest common divisor (gcd)
    14·1 answer
  • Describe the different
    12·1 answer
  • A letter of application should be written on:
    13·1 answer
  • What is meant by versatility in terms of features of computer?​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!