On 2010-06-25, Lee Hachadoorian lee.hachadoor...@gmail.com wrote:
Is it documented anywhere that floating-point numbers round
scientifically, that is 0.5 rounds to the nearest even number?
That's swiss rounding. And no, as I understand it documented that
most arithmetic) is platform
On 2010-06-25, Lee Hachadoorian lee.hachadoor...@gmail.com wrote:
On 06/25/2010 07:00 PM, Scott Marlowe wrote:
That all floating point representations are approximate?
But if it's error due to approximation, shouldn't the result be random?
I tried this for a handful of larger numbers, and
Is it documented anywhere that floating-point numbers round
scientifically, that is 0.5 rounds to the nearest even number? Compare:
SELECT round(2.5::real), round(2.5::numeric), round(3.5::real),
round(3.5::numeric);
generates
2 | 3 | 4 | 4
I stumbled across this when I was trying to use
On Fri, Jun 25, 2010 at 6:53 PM, Lee Hachadoorian
lee.hachadoor...@gmail.com wrote:
Is it documented anywhere that floating-point numbers round
scientifically, that is 0.5 rounds to the nearest even number? Compare:
SELECT round(2.5::real), round(2.5::numeric), round(3.5::real),
On 06/25/2010 07:00 PM, Scott Marlowe wrote:
That all floating point representations are approximate?
But if it's error due to approximation, shouldn't the result be random?
I tried this for a handful of larger numbers, and it appears to
consistently round to the even number. Wouldn't that
On Friday 25 June 2010 3:53:01 pm Lee Hachadoorian wrote:
Is it documented anywhere that floating-point numbers round
scientifically, that is 0.5 rounds to the nearest even number? Compare:
SELECT round(2.5::real), round(2.5::numeric), round(3.5::real),
round(3.5::numeric);
generates
2 |
Thanks. That was a fairly recent post, too, but I couldn't come up with
the right keyword search to find it.
On 06/25/2010 07:25 PM, Adrian Klaver wrote:
On Friday 25 June 2010 3:53:01 pm Lee Hachadoorian wrote:
Is it documented anywhere that floating-point numbers round
scientifically,