Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 49640 invoked from network); 2 Jun 2007 03:27:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jun 2007 03:27:38 -0000 Received: (qmail 40048 invoked by uid 500); 2 Jun 2007 03:27:40 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 39978 invoked by uid 500); 2 Jun 2007 03:27:40 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 39965 invoked by uid 99); 2 Jun 2007 03:27:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2007 20:27:40 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2007 20:27:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CCC6971418E for ; Fri, 1 Jun 2007 20:27:15 -0700 (PDT) Message-ID: <32492355.1180754835836.JavaMail.jira@brutus> Date: Fri, 1 Jun 2007 20:27:15 -0700 (PDT) From: "Phil Steitz (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Updated: (MATH-163) The evaluate method and the getResult method of class Variance give different results In-Reply-To: <13419986.1175178325766.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz updated MATH-163: ----------------------------- Fix Version/s: 1.2 > The evaluate method and the getResult method of class Variance give different results > ------------------------------------------------------------------------------------- > > Key: MATH-163 > URL: https://issues.apache.org/jira/browse/MATH-163 > Project: Commons Math > Issue Type: Bug > Affects Versions: 1.1 > Reporter: Nele Smeets > Fix For: 1.2 > > > Consider the following test code: > // construct an array of input values, containing infinity > double[] values = new double[] {1.0, 2.0, Double.POSITIVE_INFINITY}; > // find the variance using Variance.evaluate(double[]) > Variance var1 = new Variance(); > double value1 = var1.evaluate(values); > // find the variance using Variance.getResult() > Variance var2 = new Variance(); > var2.incrementAll(values); > double value2 = var2.getResult(); > // print out the results > System.out.println(value1); > System.out.println(value2); > This code prints out: > NaN > Infinity > So, we get two different variances, depending on the method we use. > (The same is true when we use Double.NEGATIVE_INFINITY as input value instead of Double.POSITIVE_INFINITY.) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org