[Haskell-cafe] How to use roots package?
Edward Kmett
ekmett at gmail.com
Sun Mar 20 21:26:27 CET 2011
If your function has nice derivatives, you may want to look at the Newton
implementation in
http://hackage.haskell.org/packages/archive/ad/0.44.4/doc/html/Numeric-AD-Newton.html#v:findZero
<http://hackage.haskell.org/packages/archive/ad/0.44.4/doc/html/Numeric-AD-Newton.html#v:findZero>or
if you have enough derivatives, you can even move up to the next Householder
method at Numeric.AD.Halley.findZero
These have the benefit of using exact derivatives, and returning a stream of
successively better approximations.
-Edward
On Fri, Mar 18, 2011 at 7:39 PM, Artyom Kazak <artyom.kazak at gmail.com>wrote:
>
> Hi Café!
>
> roots (http://hackage.haskell.org/package/roots) is a package to solve
> equations like "f(x)==0".
>
> In RootFinder class there is an 'defaultNSteps' value, which is used as
> maximal count of iterations functions like findRoot and traceRoot can make.
> By default it is 250, but sometimes it's not enough. How can I use another
> value instead of 250? Should I write my own RootFinder instance, or findRoot
> function?
>
> Thanks in advance.
> — Artyom.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110320/47f43969/attachment.htm>
More information about the Haskell-Cafe
mailing list