Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 660256327F0 for ; Fri, 25 Jun 2010 20:07:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 50226-02 for ; Fri, 25 Jun 2010 23:07:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vw0-f46.google.com (mail-vw0-f46.google.com [209.85.212.46]) by mail.postgresql.org (Postfix) with ESMTP id 88A86632304 for ; Fri, 25 Jun 2010 20:07:44 -0300 (ADT) Received: by vws9 with SMTP id 9so4488767vws.19 for ; Fri, 25 Jun 2010 16:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=aQNCPqnbzjI0C5XDIU4a0aplWh0Rli3U5nE0+E9zndA=; b=weivZezpAPfgAlL09sA5226nlzw2X6wZ+sR7F9OIOoJeOK7EpYbTAj4E206Xc49nTF XPRPyV1wt7ASlrxAapOFUZf3U06mSZr5b1SaIFCtdNPIchy4VgbmgMHtPi+Xu2CoNi7S BNgrLrDXKp2dftXFdThjP9h3I3KvV6n1iyfik= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=jlF6dWSSczk3m/9Ofcr5slbUwKAtGwzbZ/0hXocl+wgU2i+sttP0CMqt9iXHdZUzg8 /oVNQ/bQsSy+FTbIXxvbLetj4Wi501v0gDaHOcfnnTa9iaLG+xv1ooBxiRkDo86Iqh55 1AMW1QxjQozEtBfA4OU35PccfeAvpmJci7ykU= Received: by 10.229.241.207 with SMTP id lf15mr949078qcb.134.1277507263104; Fri, 25 Jun 2010 16:07:43 -0700 (PDT) Received: from [192.168.1.100] (207-237-122-16.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com [207.237.122.16]) by mx.google.com with ESMTPS id i10sm72619741qcb.41.2010.06.25.16.07.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 25 Jun 2010 16:07:42 -0700 (PDT) Message-ID: <4C2536BC.4090306@gmail.com> Date: Fri, 25 Jun 2010 19:07:40 -0400 From: Lee Hachadoorian User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: Scott Marlowe CC: pgsql-sql@postgresql.org Subject: Re: Round integer division References: <4C25334D.4040805@gmail.com> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/98 X-Sequence-Number: 34289 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 have to be intentionally programmed that way? --Lee -- Lee Hachadoorian PhD Student, Geography Program in Earth & Environmental Sciences CUNY Graduate Center