Bill Allombert on Mon, 15 Jun 2009 18:30:30 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Question about round() |
On Mon, Jun 15, 2009 at 09:54:15AM -0600, Kurt Foster wrote: > It occurred to me to wonder what round() did when the input has > fractional part == 1/2. Some examples indicated that if N is an > integer, > > round(N + 1/2) == ceil(N + 1/2). > > Is this generally the case? If N is a integer, then yes: ?round If x is in R, rounds x to the nearest integer (rounding to + oo in case of ties) Cheers, Bill.