Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C2DB934E for ; Wed, 28 Mar 2012 04:11:06 +0000 (UTC) Received: (qmail 8145 invoked by uid 500); 28 Mar 2012 04:11:05 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 7820 invoked by uid 500); 28 Mar 2012 04:11:05 -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 7807 invoked by uid 99); 28 Mar 2012 04:11:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2012 04:11:05 +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; Wed, 28 Mar 2012 04:11:03 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9483F34A6A6 for ; Wed, 28 Mar 2012 04:10:43 +0000 (UTC) Date: Wed, 28 Mar 2012 04:10:43 +0000 (UTC) From: =?utf-8?Q?S=C3=A9bastien_Brisard_=28Resolved=29_=28JIRA=29?= To: issues@commons.apache.org Message-ID: <1156402277.26753.1332907843623.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1186766933.21211.1330279008964.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (MATH-755) On the contract of FieldElement.divide(T) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-755?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] S=C3=A9bastien Brisard resolved MATH-755. ------------------------------------ Resolution: Fixed Actually fixed prior to the release of 3.0. =20 > On the contract of FieldElement.divide(T) > -------------------------------------------- > > Key: MATH-755 > URL: https://issues.apache.org/jira/browse/MATH-755 > Project: Commons Math > Issue Type: Improvement > Affects Versions: 3.0, 3.1 > Reporter: S=C3=A9bastien Brisard > Assignee: S=C3=A9bastien Brisard > Priority: Minor > Labels: exception, field > Fix For: 3.1 > > > As discussed on the mailing list: > {quote} > The contract of {{FieldElement.divide(T)}} states that an {{Arithmetic= Exception}} should be thrown if the parameter is zero. However, for this bo= undary case > * {{BigFraction}} throws {{ZeroException}} > * {{BigReal}} throws {{ArithmeticException}} > * {{Complex}} uses NaNs instead of exceptions > * {{Dfp}}, {{DfpDec}} use flags instead of exceptions > * {{Fraction}} throws {{MathArithmeticException}}. > {quote} > There is a need for some cleaning up, which will proceed in two steps > # in the {{FieldElement}} interface the statement that an exception must = be thrown will be removed. The rationale for this is that sometimes, an exc= eption is actually not wanted. For example, I'm using a wrapper around prim= itive {{double}}, and I want all boundary cases to be handled _exactly_ the= same way as the primitive operation "/"). > # the _same_ exception (if any) will be thrown by all implementations. Th= is will require to chose between {{ArithmeticException}}, {{MathArithmeticE= xception}} and {{ZeroException}}. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira