SPUG:strange rounding problems

Alan alan at ufies.org
Thu Jan 30 16:33:43 CST 2003


Is this just the way that perl does it, or is this something that I
wasn't taught in school?

On Thu, Jan 30, 2003 at 05:24:01PM -0500, Adrian Hands wrote:
> Odd rounds up, even rounds down.
> e.g.:
> 
> 11.5 -> 12
> 12.5 -> 12
> 13.5 -> 14
> 14.5 -> 14
> 15.5 -> 15
> 
> This prevents skewing in favor of up.

-- 
Alan <alan at ufies.org> - http://arcterex.net
---------------------------------------------------------------------
"The only thing that experience teaches us is that experience teaches 
us nothing.	        -- Andre Maurois (Emile Herzog)



More information about the spug-list mailing list