[
https://issues.apache.org/jira/browse/MATH-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14699497#comment-14699497
]
Gilles commented on MATH-1256:
------------------------------
Hi.
bq. Do you throw an exception \[...\]
Yes.
I had started a thread on the project's ML (in case the issue had non-obvious
implications):
http://markmail.org/thread/62bpxwifl2lftvg5
You can browse through the modifications here:
https://git1-us-west.apache.org/repos/asf?p=commons-math.git
> Interval class upper and lower check
> ------------------------------------
>
> Key: MATH-1256
> URL: https://issues.apache.org/jira/browse/MATH-1256
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gunel Jahangirova
> Priority: Minor
> Fix For: 4.0, 3.6
>
>
> In class Interval, which is in the package
> org.apache.commons.math4.geometry.euclidean.oned it is possible to pass the
> value for variable upper less than the value of variable lower, which is
> logically incorrect and also causes the method getSize() to return negative
> value.
> For example:
> @Test
> public void test1() throws Throwable {
> Interval interval0 = new Interval(0.0, (-1.0));
> double double0 = interval0.getSize();
> assertEquals((-1.0), double0, 0.01D);
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)