[jira] [Updated] (NUMBERS-136) "log10" inconsistent with "log"

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (NUMBERS-136) "log10" inconsistent with "log"

ASF GitHub Bot (Jira)

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

Eric Barnhill updated NUMBERS-136:
----------------------------------
    Assignee: Eric Barnhill

> "log10" inconsistent with "log"
> -------------------------------
>
>                 Key: NUMBERS-136
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-136
>             Project: Commons Numbers
>          Issue Type: Bug
>          Components: complex
>            Reporter: Gilles Sadowski
>            Assignee: Eric Barnhill
>            Priority: Major
>             Fix For: 1.0
>
>
> For special cases (containing NaN or infinities), method {{log10}} does not return the same values as {{log()}} (cf. case commented out  below).
> {code}
>     @Test
>     public void testLog10Consistency() {
>         // Infinities should map to the same values as computed with "log()".
>         // Assertions.assertEquals(infInf.log(), infInf.log10());
>         Assertions.assertEquals(infNegInf.log(), infNegInf.log10());
>         Assertions.assertEquals(negInfInf.log(), negInfInf.log10());
>         // Assertions.assertEquals(infNaN.log(), infNaN.log10());
>         Assertions.assertEquals(negInfNaN.log(), negInfNaN.log10());
>         // Assertions.assertEquals(nanInf.log(), nanInf.log10());
>         Assertions.assertEquals(nanNegInf.log(), nanNegInf.log10());
>     }
> {code}
> To avoid duplication, I suggest that {{log10}} calls {{log}} as part of its implementation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)