Re: round()

Subject: Re: round()
From: pandeng@xxxxxxxxxxxx (Steve Schafer)
Date: Tue, 25 May 1999 14:54:55 GMT
On Tue, 25 May 1999 15:44:08 +0200, you wrote:

> Does anybody has an explanation why, in the halfway cases, the even number
>is the one to be returned (instead of the bigger one, as is usual and would
>be expected)?

This is sometimes called "banker's rounding." It's purpose is to
eliminate the slight bias that occurs when always rounding upwards.
The IEEE floating-point specification, which most CPUs adhere to,
specifies this type of rounding as the default behavior.

-Steve


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • round()
    • Jakob Fix - Tue, 25 May 1999 15:44:08 +0200
      • Steve Schafer - Tue, 25 May 1999 14:54:55 GMT <=