Truncating refers to the procedure of reducing the number digits of a decimal number. Trunkating to, say, 4 decimal digits results in the number 3.14159 being changed to 3.1415. Any digits past the four digits are simply ignored. Note that this is not the same as rounding, where the value of the first digit discarded is significant. Rounding normally reduces the error compared to trunkating. For information, the text below considers rounding as opposed to trunkating.
Rounding a number
The generally accepted rule is if the the last digit in the number string to the right of the decimal point is 5, 6, 7, 8, or 9, then round the number immediately to the left up to the next larger number; if the last digit in the number string is 0, 1, 2, 3, or 4, leave the number immediately to the left as it is.
Let's look at an example to see how this would work.
Assume you're doing some math problems and your teacher says "Give me your answers rounded to four (4) digits past the decimal point."
Let us use the same number we trunkated above: 3.14159. As you can see, your number has five (5) numbers past the decimal point.
Look at the very last digit, or in our example the "9."
3.14159
Using the rule above, the 9 and round the 5 (the number immediately to the left of 9) to 6, and your answer is:
3.1416
Suppose, however, next your calculation resulted in a product of 15.70795. Again, look to the last digit - in this case, "5."
15.70795
Again, referring to the generally accepted rule, the 5 is dropped and 9 (the number immediately to the left of 5) is rounded up to 10. But, since we need only four (4) digits past the decimal point, then your answer becomes:
15.708
Last example: suppose your calculation result in a product of 21.99113. Look to the last digit - "3."
21.99113
Using the generally accepted rule, drop the 3 and leave the 1 (the number immediately to the left of 3) as it is. Your answer is:
21.9911
The number of bits in an integer is the number of times you can divide the integer by 2, truncating each result, before you reach zero.
Well, it certainly isn't a whole number. You have to specify according to what rule you want to get a whole number. Two common rules are: (a) Truncating; get the whole part (in this case 12), and discard the decimals. (b) Round to the nearest whole number; in this case the result would be 13.Well, it certainly isn't a whole number. You have to specify according to what rule you want to get a whole number. Two common rules are: (a) Truncating; get the whole part (in this case 12), and discard the decimals. (b) Round to the nearest whole number; in this case the result would be 13.Well, it certainly isn't a whole number. You have to specify according to what rule you want to get a whole number. Two common rules are: (a) Truncating; get the whole part (in this case 12), and discard the decimals. (b) Round to the nearest whole number; in this case the result would be 13.Well, it certainly isn't a whole number. You have to specify according to what rule you want to get a whole number. Two common rules are: (a) Truncating; get the whole part (in this case 12), and discard the decimals. (b) Round to the nearest whole number; in this case the result would be 13.
5 "Rounding" a number brings us to the nearest number that fits the requirement; in this case, to the "ones place", or integer value. If we were to round off the number 4.89 to the nearest tens, the answer would be "zero". A related concept to rounding is truncation, where you 'cut off" the decimals. So truncating the number 4.89 would give you "4".
Our number system is based on the number ten, and as a result, it is called the decimal system.
9
The number of bits in an integer is the number of times you can divide the integer by 2, truncating each result, before you reach zero.
If you truncate 3.8, you will get 3. Remember, while truncating you don't have to follow the rules of rounding off.
Well, it certainly isn't a whole number. You have to specify according to what rule you want to get a whole number. Two common rules are: (a) Truncating; get the whole part (in this case 12), and discard the decimals. (b) Round to the nearest whole number; in this case the result would be 13.Well, it certainly isn't a whole number. You have to specify according to what rule you want to get a whole number. Two common rules are: (a) Truncating; get the whole part (in this case 12), and discard the decimals. (b) Round to the nearest whole number; in this case the result would be 13.Well, it certainly isn't a whole number. You have to specify according to what rule you want to get a whole number. Two common rules are: (a) Truncating; get the whole part (in this case 12), and discard the decimals. (b) Round to the nearest whole number; in this case the result would be 13.Well, it certainly isn't a whole number. You have to specify according to what rule you want to get a whole number. Two common rules are: (a) Truncating; get the whole part (in this case 12), and discard the decimals. (b) Round to the nearest whole number; in this case the result would be 13.
true
5 "Rounding" a number brings us to the nearest number that fits the requirement; in this case, to the "ones place", or integer value. If we were to round off the number 4.89 to the nearest tens, the answer would be "zero". A related concept to rounding is truncation, where you 'cut off" the decimals. So truncating the number 4.89 would give you "4".
For the decimal number system . . . 'Ten'. For the binary number system . . . 'Two' For the octal number system . . . 'Eight' For the hexidecimal number system . . . 'Sixteen' . . etc.
{| |- | Aryabhatta's contribution to the number system |} {| |- | Aryabhatta's contribution to the number system |}
Our number system is based on the number ten, and as a result, it is called the decimal system.
Our number system of 0 to 9 is derived from the Hindu-Arabic numeral system.
9
The Arabic system
To round 95.25 to the nearest whole number, you look at the decimal. The decimal (0.25) is smaller than 0.5 (which could also be written as 0.50 if that helps you) and anything less than 0.5 (or 0.50, 0.500, 0.5000, etc) in the decimal portion is rounded 'down', also known as truncating. so, 95.25 rounded to the nearest whole number is 95.