From issues-return-73414-archive-asf-public=cust-asf.ponee.io@commons.apache.org Fri Apr 12 01:48:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id B2CCB18065D for ; Fri, 12 Apr 2019 03:48:01 +0200 (CEST) Received: (qmail 50386 invoked by uid 500); 12 Apr 2019 01:48:00 -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 50375 invoked by uid 99); 12 Apr 2019 01:48:00 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Apr 2019 01:48:00 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 667AFE036B for ; Fri, 12 Apr 2019 01:48:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0907B24595 for ; Fri, 12 Apr 2019 01:48:00 +0000 (UTC) Date: Fri, 12 Apr 2019 01:48:00 +0000 (UTC) From: "Matt Juntunen (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEOMETRY-51) EpsilonDoublePrecisionContext allows negative & NaN epsilon MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GEOMETRY-51?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D168= 15892#comment-16815892 ]=20 Matt Juntunen commented on GEOMETRY-51: --------------------------------------- We should probably just check for this on construction and throw an {{Illeg= alArgumentException}}. Feel free to submit a PR on Github. > EpsilonDoublePrecisionContext allows negative & NaN epsilon > ----------------------------------------------------------- > > Key: GEOMETRY-51 > URL: https://issues.apache.org/jira/browse/GEOMETRY-51 > Project: Apache Commons Geometry > Issue Type: Bug > Reporter: Baljit Singh > Priority: Major > > EpsilonDoublePrecisionContext does not validate the epsilon to be positiv= e (0 or greater). The comparison is based on Precision.compareTo(double, do= uble, double), which itself calls Precision.equals(double, double, double),= which then compares using=C2=A0Math.abs(y - x) <=3D eps. If epsilon is neg= ative or NaN, the comparison is invalid. -- This message was sent by Atlassian JIRA (v7.6.3#76005)