Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 98523 invoked from network); 3 Apr 2011 14:34:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Apr 2011 14:34:46 -0000 Received: (qmail 47970 invoked by uid 500); 3 Apr 2011 14:34:45 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 47778 invoked by uid 500); 3 Apr 2011 14:34:45 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 47770 invoked by uid 99); 3 Apr 2011 14:34:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Apr 2011 14:34:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Apr 2011 14:34:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B94AC9079A for ; Sun, 3 Apr 2011 14:34:05 +0000 (UTC) Date: Sun, 3 Apr 2011 14:34:05 +0000 (UTC) From: "Luc Maisonobe (JIRA)" To: issues@commons.apache.org Message-ID: <2090073705.31215.1301841245755.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <775070392.31184.1301840165755.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (MATH-554) Vector3D.crossProduct is sensitive to numerical cancellation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Luc Maisonobe resolved MATH-554. -------------------------------- Resolution: Fixed fixed in subversion repository as of r1088316 > Vector3D.crossProduct is sensitive to numerical cancellation > ------------------------------------------------------------ > > Key: MATH-554 > URL: https://issues.apache.org/jira/browse/MATH-554 > Project: Commons Math > Issue Type: Bug > Affects Versions: 2.2 > Environment: Linux, Sun JDK 1.5.0.22 > Reporter: Luc Maisonobe > Assignee: Luc Maisonobe > Fix For: 3.0 > > > Cross product implementation uses the naive formulas (y1 z2 - y2 z1, ...). These formulas fail when vectors are almost colinear, like in the following example: > {code} > Vector3D v1 = new Vector3D(9070467121.0, 4535233560.0, 1); > Vector3D v2 = new Vector3D(9070467123.0, 4535233561.0, 1); > System.out.println(Vector3D.crossProduct(v1, v2)); > {code} > The previous code displays { -1, 2, 0 } instead of the correct answer { -1, 2, 1 } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira