Question

In: Computer Science

Explain the difference between truncation and rounding.How can one operation be made to perform the function...

Explain the difference between truncation and rounding.How can one operation be made to perform the function of the other?

Solutions

Expert Solution

Truncation: In this case, the remaining digits after the decimal is chopped off, thus for example 23.49 if chopped or truncated will be made to just 23.
Rounding: In this case, we have to round or made the given number to the closest number as mentioned or said so while rounding. Like if we have to round the decimal number 23.4589 to 2 decimal digits then it will be rounded to 23.46 as the digit after the 45 is 8 so 45 will be rounded to 46.

For rounding and truncation to work same, we need to round a number to the nearest integer and if the decimal digits after the decimal are less than 5. Then the truncation and rounding will work the same.
Like if want to round 23.45 to the nearest integer and truncate 23.45.
So both of them will make it 23.

That was a nice question to answer
Friend, If you have any doubts in understanding do let me know in the comment section. I will be happy to help you further.
Thanks


Related Solutions

explain the difference between the transient period, and the steady-state operation. with examples
explain the difference between the transient period, and the steady-state operation. with examples
explain the difference between classification of expenses by nature and by function.
explain the difference between classification of expenses by nature and by function.
describe the basic operation and componets of laser. in particular, explain. a) difference between a neon...
describe the basic operation and componets of laser. in particular, explain. a) difference between a neon lamp and helium-neon laser, b) why population inversion is necessary requirement to achieve lasing c)why laser light is coherent, monochromatic, polarized, and collimated, d) the methods for obtaining ultrashort laser pulses. what limits the pulse duration?
3.1. Explain the difference between the short-run and the long-run production function. Cite one example of...
3.1. Explain the difference between the short-run and the long-run production function. Cite one example of this difference in a business situation. (6) 3.2. Explain the relationship between the law of diminishing returns and the three stages of production using a graph showing total, marginal and average product. (10)
Explain the difference between the actual definition of a Riemann Integral of function f on the...
Explain the difference between the actual definition of a Riemann Integral of function f on the interval [a,b] and the conclusion of the FTOC Part 2.(Fundamental Theorem of Calculus Part 2)
Explain the difference between the actual definition of a Riemann Integral of function f on the...
Explain the difference between the actual definition of a Riemann Integral of function f on the interval [a,b] and the conclusion of the FTOC Part 2.(Fundamental Theorem of Calculus Part 2)
Explain the difference between a set that is well defined and one that is not. Give...
Explain the difference between a set that is well defined and one that is not. Give an example of a well-defined set. Name and describe your well-defined set using roster form and set-builder notation. Give an example of at least 1 subset. NO HANDWRITING PLEASE.
The human lungs can function satisfactorily up to a limit where the pressure difference between the...
The human lungs can function satisfactorily up to a limit where the pressure difference between the outside and inside of the lungs is 1/19 of an atmosphere. If a diver uses a snorkel for breathing, how far below the water can she swim? Assume the diver is in salt water whose density is 1044 kg/m3.
Explain the difference between a call option and a put option. Explain the difference between an...
Explain the difference between a call option and a put option. Explain the difference between an American option and European option. Find the value of a call option using the binomial option pricing formula for single period when given the following information: you have an option with 6 months until expiration, the payoff in the up scenario is $12, and the payoff in the down scenario is $0, the risk-free rate is 5%, the weight for the up scenario is...
3. What are the major difference between the assumption made by Say and those made by...
3. What are the major difference between the assumption made by Say and those made by Keynes?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT