G***G 发帖数: 16778 | 1 someone say round(2.5)=2 is more scientifically accurate.
do you think so? | l***a 发帖数: 121 | 2 真无聊。这就是个约定俗称。R还有floor和ceil,round这样不是bug。你想怎么
truncate就用哪个。有什么好纠结的。 | D******n 发帖数: 2836 | 3 Sometimes its very annoying and error-prone if a language or a software is
trying to be "smarter".
I see what "round to nearest , ties to even" is coming from, but it messes
up with the "traditional/layman" standard.
which will give you unexpected outcome or bugs if you were originally going
with "layman standard".
I once migrated sth from SAS to R, and because of this round function i
spent quite some time trying to understand why outcome from two
implemntations were different.
Another example is, in some language or software or applications, they do
division by n-1 instead of n for std calculation. It also gives you
unexpected results. Of course when n is big, it doesnt matter.
【在 G***G 的大作中提到】 : someone say round(2.5)=2 is more scientifically accurate. : do you think so?
| a*******7 发帖数: 772 | |
|