From user-return-24063-apmail-commons-user-archive=commons.apache.org@commons.apache.org Fri Feb 12 20:09:34 2010 Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 11745 invoked from network); 12 Feb 2010 20:09:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Feb 2010 20:09:34 -0000 Received: (qmail 72533 invoked by uid 500); 12 Feb 2010 20:09:32 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 72415 invoked by uid 500); 12 Feb 2010 20:09:32 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 72405 invoked by uid 99); 12 Feb 2010 20:09:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Feb 2010 20:09:32 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ted.dunning@gmail.com designates 209.85.216.185 as permitted sender) Received: from [209.85.216.185] (HELO mail-px0-f185.google.com) (209.85.216.185) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Feb 2010 20:09:25 +0000 Received: by pxi15 with SMTP id 15so1860094pxi.23 for ; Fri, 12 Feb 2010 12:09:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=kAPZa0SyblcCvwtHGHMvWSZWiiUOuY0ix20VqDWct/g=; b=FiXhzdhhdRTQdrn7eILjRrEun7lQxzfTFBHDy71hpDnQI2IZRv5MAGnYZCviIWk238 m1zRWXDW9DCQiE69gwL8Qk+iH8odGHs40vnNjWPkSRy8EOSN2B5ovI3KSCqmnYm20uBH Z0DIWS0pkmgdzn7gdaba5MDVAUZEjurfLhrsk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=Z8+XNw65UgcPhAQ6V7nRs9Bq5wAxe5BWb8Nw0ZVorD3hBYAsmd7u342U1ltIynizYP FdEMp423Iw3/dc5T7ApF+2kCZPqEHydojGKU47JtdC7WWMY9c2DyESygKyAEyJpm76mR vzVN2agmwi836Z8V0SCpVnrs6by4oX2U9H9PQ= MIME-Version: 1.0 Received: by 10.140.56.14 with SMTP id e14mr1290602rva.19.1266005345194; Fri, 12 Feb 2010 12:09:05 -0800 (PST) In-Reply-To: <03FEE575BFE70B4AA3BB5014DC59648B9F529E8310@HERMES8.ds.leeds.ac.uk> References: <1eabbac31002112129k6b5c6d03g95efa24f6681ec73@mail.gmail.com> <03FEE575BFE70B4AA3BB5014DC59648B9F529E8310@HERMES8.ds.leeds.ac.uk> From: Ted Dunning Date: Fri, 12 Feb 2010 12:08:45 -0800 Message-ID: Subject: Re: Why not BigDecimal? To: Commons Users List Content-Type: multipart/alternative; boundary=001636b2ac86e25268047f6cd6b6 --001636b2ac86e25268047f6cd6b6 Content-Type: text/plain; charset=UTF-8 It is not a precision issue. R and commons-math use different algorithms with the same underlying numerical implementation. It is even an open question which result is better. R has lots of credibility, but I have found cases where it lacked precision (and I coded up a patch that was accepted). Unbounded precision integers and rationals are very useful, but not usually for large scale numerical programming. Except in a very few cases, if you need more than 17 digits of precision, you have other very serious problems that precision won't help. On Fri, Feb 12, 2010 at 1:40 AM, Andy Turner wrote: > Interesting that this is a precision issue. I'm not surprised depending on > what you are doing, double precision may not be enough. It depends a lot on > how the calculations are broken into smaller parts. BigDecimal is > fantastically useful... > -- Ted Dunning, CTO DeepDyve --001636b2ac86e25268047f6cd6b6--