You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Luc Maisonobe (JIRA)" <ji...@apache.org> on 2014/01/24 17:04:39 UTC

[jira] [Resolved] (MATH-1093) arcs set split covers full circle instead of being empty

     [ https://issues.apache.org/jira/browse/MATH-1093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luc Maisonobe resolved MATH-1093.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 3.3

Fixed in subversion repository as of r1561047.

> arcs set split covers full circle instead of being empty
> --------------------------------------------------------
>
>                 Key: MATH-1093
>                 URL: https://issues.apache.org/jira/browse/MATH-1093
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Luc Maisonobe
>             Fix For: 3.3
>
>
> When splitting an arcs set using an arc very close to one of the boundaries (but not at the boundary), the algorithm confuses cases for which end - start = 2pi from cases for which end - start = epsilon.
> The following test case shows such a failure:
> {code}
>     @Test
>     public void testSplitWithinEpsilon() {
>         double epsilon = 1.0e-10;
>         double a = 6.25;
>         double b = a - 0.5 * epsilon;
>         ArcsSet set = new ArcsSet(a - 1, a, epsilon);
>         Arc arc = new Arc(b, b + FastMath.PI, epsilon);
>         ArcsSet.Split split = set.split(arc);
>         Assert.assertEquals(set.getSize(), split.getPlus().getSize(),  epsilon);
>         Assert.assertNull(split.getMinus());
>     }
> {code}
> The last assertion (split.getMinus() being null) fails, as with current code split.getMinus() covers the full circle from 0 to 2pi.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)