You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Eric Barnhill (JIRA)" <ji...@apache.org> on 2017/04/25 22:33:04 UTC

[jira] [Commented] (NUMBERS-16) Set tolerances in ComplexTest to zero?

    [ https://issues.apache.org/jira/browse/NUMBERS-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15983765#comment-15983765 ] 

Eric Barnhill commented on NUMBERS-16:
--------------------------------------

Tolerances of zero worked in all the relevant tests. This can be closed.

> Set tolerances in ComplexTest to zero?
> --------------------------------------
>
>                 Key: NUMBERS-16
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-16
>             Project: Commons Numbers
>          Issue Type: Improvement
>            Reporter: Eric Barnhill
>            Priority: Minor
>
> Considering the following JUnit test:
>     public void testConstructor() {
>         Complex z = new Complex(3.0, 4.0);
>         Assert.assertEquals(3.0, z.getReal(), 1.0e-5);
>         Assert.assertEquals(4.0, z.getImaginary(), 1.0e-5);
>     }
> That tolerance seems pretty high to me -- I sure would not want to work with a method that was not stabler than that, nor can I see a reason that the numbers would be exactly the same to the last place.
> Any reason not to set these tolerances to zero?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)