From user-return-7513-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Nov 11 01:01:23 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 37753 invoked from network); 11 Nov 2009 01:01:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Nov 2009 01:01:23 -0000 Received: (qmail 10070 invoked by uid 500); 11 Nov 2009 01:01:22 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 9997 invoked by uid 500); 11 Nov 2009 01:01:22 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 9987 invoked by uid 99); 11 Nov 2009 01:01:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 01:01:22 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.85.219.215] (HELO mail-ew0-f215.google.com) (209.85.219.215) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 01:01:13 +0000 Received: by ewy11 with SMTP id 11so736563ewy.11 for ; Tue, 10 Nov 2009 17:00:52 -0800 (PST) Received: by 10.213.104.10 with SMTP id m10mr911492ebo.62.1257901252620; Tue, 10 Nov 2009 17:00:52 -0800 (PST) Received: from unknown-00-26-08-ed-1d-a6.home (host86-165-40-10.range86-165.btcentralplus.com [86.165.40.10]) by mx.google.com with ESMTPS id 5sm2964166eyh.34.2009.11.10.17.00.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 10 Nov 2009 17:00:51 -0800 (PST) Subject: Re: Silent corruption of large numbers Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Noah Slater In-Reply-To: X-Noah: Awesome Date: Wed, 11 Nov 2009 01:00:49 +0000 Content-Transfer-Encoding: 7bit Message-Id: References: <4AF8797B.6090206@rogerbinns.com> <20091110200536.GA18411@uk.tiscali.com> <4AFA03EB.3070609@rogerbinns.com> <714754FC-3270-4E0A-99F5-CE88709BD2F6@tumbolia.org> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1076) X-Virus-Checked: Checked by ClamAV on apache.org On 11 Nov 2009, at 00:52, Adam Kocoloski wrote: > > Hi Noah, I think the part you're missing is that JavaScript does not > actually have integers. All numbers are internally represented > using double-precision floating point. So in fact a number that > looks like an integer can be corrupted. Easiest way to see this, as > Roger pointed out, is to try to enter something like > > 9223372036854775807 > > as the value for a field in Futon. You can't do it, Futon will > corrupt it and give you back > > 9223372036854776000 Isn't it just the case that there is a ceiling for representable integers, then?