From derby-user-return-8262-apmail-db-derby-user-archive=db.apache.org@db.apache.org Wed Dec 19 10:08:24 2007 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 385 invoked from network); 19 Dec 2007 10:08:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Dec 2007 10:08:24 -0000 Received: (qmail 14257 invoked by uid 500); 19 Dec 2007 10:08:11 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 14232 invoked by uid 500); 19 Dec 2007 10:08:11 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 14221 invoked by uid 99); 19 Dec 2007 10:08:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2007 02:08:11 -0800 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 [217.206.42.18] (HELO mail.optrak.co.uk) (217.206.42.18) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2007 10:07:57 +0000 Received: from mercury.net.optrak.co.uk ([192.168.41.65]) by mail.optrak.co.uk with Microsoft SMTPSVC(6.0.3790.3959); Wed, 19 Dec 2007 10:07:49 +0000 Received: from 192.168.41.61 ([192.168.41.61] helo=mercury.net.optrak.co.uk) by ASSP-nospam; 19 Dec 2007 10:07:49 +0000 Received: from [192.168.41.87] ([192.168.41.87]) by mercury.net.optrak.co.uk with Microsoft SMTPSVC(6.0.3790.3959); Wed, 19 Dec 2007 10:07:49 +0000 Message-ID: <4768ED74.2010706@optrak.co.uk> Date: Wed, 19 Dec 2007 10:07:48 +0000 From: Mark Thornton User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Derby Discussion Subject: Re: Double.NaN in table? References: <419520.95409.qm@web30614.mail.mud.yahoo.com> <639980.73013.qm@web30608.mail.mud.yahoo.com> <830142bd0712182350i7fef1d47le0de72e13a20e5d1@mail.gmail.com> <4768DD9F.3020508@sun.com> <4768E314.4020607@sun.com> <830142bd0712190151s1595d71an89339f1bf8372103@mail.gmail.com> In-Reply-To: <830142bd0712190151s1595d71an89339f1bf8372103@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 19 Dec 2007 10:07:49.0091 (UTC) FILETIME=[025DAB30:01C84227] X-Virus-Checked: Checked by ClamAV on apache.org Andrew ``Bass'' Shcheglov wrote: > On Dec 19, 2007 12:23 PM, Thomas Nielsen wrote: > >> Looking at the derby code on the main trunk, I see the exception is >> intentional, as there is an explicit check for NaN values in >> NumberDataType.normalizeDOUBLE(). >> >> Not sure if this is another DB2 compatability issue/limitation or not. >> Maybe someone with deeper knowledge can give more details on this? >> > > > This is odd, > > for Oracle, for instance, fully supports IEEE 754 (since 10g): > > http://www.oracle.com/technology/sample_code/tutorials/jdbc10g/ieeedatatypes/files/IEEEDatatypes.pdf > http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/sql_elements003.htm > A few more data points. PostgreSQL supports it, but MySQL does not (they claim it is not supported in the SQL standard). SqlServer 2000 did allow NaN but with a host of bugs if you tried, SQL Server 2005 checks for NaN and rejects it. As far as I can remember versions of SQL Server prior to 2000 did not allow NaN. My SQL Standard handbook (1992) contains no mention of any of the special floating point values. Odd given that IEEE arithmetic had been around for quite a while by that date. Mark Thornton