commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (MATH-871) math3 SecantSolver can return Double.INFINITE
Date Mon, 15 Oct 2012 13:24:03 GMT

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

Gilles resolved MATH-871.
-------------------------

    Resolution: Cannot Reproduce

Please reopen with more precise information.
                
> math3 SecantSolver can return Double.INFINITE
> ---------------------------------------------
>
>                 Key: MATH-871
>                 URL: https://issues.apache.org/jira/browse/MATH-871
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Anthony Maidment
>            Priority: Minor
>
> In SecantSolver.doSolve(), I had a situation in which f0 and f1, from computeObjectiveValue()
on lines 77 & 78, were the same value.
> Then when it calculates the next appromixation at line 101:
> final double x = x1 - ((f1 * (x1 - x0)) / (f1 - f0));
> The denominator is then zero, and the next approximation is Double.INFINITE.
> I was able to work around this in this particular instance by relaxing the accuracy requirements
of the solver, although I haven't yet fully tested the downstream implications of this change.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message