Yes, qualified by a fixed difference in calibration prior to rounding or truncating. IOW, for the case of generating an integer from a real number (which is what you are doing, up to shifting a decimal point), ROUND(X) = FLOOR(X + 0.5).My original post question only has to do with the question of whether rounding up and down vs truncating can produce the same result in a measurement process. The answer is yes.
171120-1537 EST
Besoeker:
There are many electricians that are involved in equipment that has problems of this type. It does not directly relate to NEC aspects, but it is something some electricians encounter, and it is a way to get individuals to think about problems.
171121-0952 EST
retirede:
In your post #16 you mentioned that Visual Basic added 5 and then truncated. That is what I described in post #15.
What do you mean by "true rounding function"? To me a rounding function is a function that takes some range of values and assigns to anything in that range a value that is of lesser resolution than the values in said range.
A bias can be added in this transformation to shift the range anywhere it is desired. Thus, a method that uses truncation can get the same result as a more elaborate procedure using comparisons. Addition combined with truncation is possibly faster and thus uses less computer resources.
.
We can correct for this problem by changing the rule for rounding 5 rounding "off" (keeping the number the same) in fifty percent of the roundings-even numbers followed by a 5. Then, on average, the roundings "off" will cancel out the roundings "up."
To slightly muddy the waters, there is odd/even rounding:...
Seems like if that matters, you probably shouldn't be rounding at all.
Sometimes it matters- financial transactions for one. Accounts only keep dollars and cents, so you want to avoid any bias created by rounding the tenths of cents.
...does what goes on inside the black box have anything to do with whether you call this "true rounding" or not?
Respectfully disagree.I say no, but then, I also still say that rounding or truncating being better depends on the application.
Respectfully disagree.
What application would benefit from calculations using 3 as a value for pi ?
Which you probably already have on your calculator or iPhone anyway.
I don't see how your question relates. Truncating or rounding is an independent issue from the resolution of doing either. Neither implies always going to a whole number, which would be arbitrary depending on the units used.
Pi is not a measurement, but a fixed ratio, whose full resolution (to the limit of the calculator, or at least several places of greater resolution than any of the measurements) would be used until the final result is achieved (which is then rounded or truncated, depending on the application).
It was a simple example to demonstrate the difference between rounding and truncating.
OK. The merits of one over the other.Was that ever in question?
And how did it do so?
Both do the same thing for numbers less than 5 in the next place.
OK. The merits of one over the other.
It was a simple example to demonstrate the difference between rounding and truncating.