You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2013/11/05 14:53:24 UTC

[jira] [Resolved] (MATH-1058) Beta, LogNormalDistribution, WeibullDistribution give slightly wrong answer for extremely small args due to log/exp inaccuracy

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

Gilles resolved MATH-1058.
--------------------------

       Resolution: Fixed
    Fix Version/s: 3.3

Thanks.
Committed in revision 1538998.


> Beta, LogNormalDistribution, WeibullDistribution give slightly wrong answer for extremely small args due to log/exp inaccuracy
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MATH-1058
>                 URL: https://issues.apache.org/jira/browse/MATH-1058
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.2
>            Reporter: Sean Owen
>            Priority: Minor
>              Labels: exp, expm1, log, log1p
>             Fix For: 3.3
>
>         Attachments: MATH-1058.patch
>
>
> Background for those who aren't familiar: math libs like Math and FastMath have two mysterious methods, log1p and expm1. log1p(x) = log(1+x) and expm1(x) = exp(x)-1 mathetmatically, but can return a correct answer even when x was small, where floating-point error due to the addition/subtraction introduces a relatively large error.
> There are three instances in the code that can employ these specialized methods and gain a measurable improvement in accuracy. See patch and tests for an example -- try the tests without the code change to see the error.



--
This message was sent by Atlassian JIRA
(v6.1#6144)