Re: [Haskell-cafe] How to use roots package?

2011-03-23 Thread Henning Thielemann
James Cook schrieb: Those are both options, as is to simply restart findRoot if it returns a 'Left' vaule. I personally would incline toward a custom driver function (findRoot). I should probably add one to the library that accepts a step limit and/or one that just iterates until

Re: [Haskell-cafe] How to use roots package?

2011-03-23 Thread James Cook
On Mar 23, 2011, at 6:57 PM, Henning Thielemann wrote: James Cook schrieb: Those are both options, as is to simply restart findRoot if it returns a 'Left' vaule. I personally would incline toward a custom driver function (findRoot). I should probably add one to the library that accepts a

Re: [Haskell-cafe] How to use roots package?

2011-03-20 Thread Artyom Kazak
Oh. I have taken a wrong approach to the problem. I have written Newton method with cutting precision if it's more than N digits, and it finds an answer practically in no time. But still, it's very good, thank you! ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] How to use roots package?

2011-03-20 Thread Edward Kmett
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:findZeroor if you

[Haskell-cafe] How to use roots package?

2011-03-18 Thread Artyom Kazak
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

Re: [Haskell-cafe] How to use roots package?

2011-03-18 Thread Antoine Latter
On Fri, Mar 18, 2011 at 6:39 PM, Artyom Kazak artyom.ka...@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

Re: [Haskell-cafe] How to use roots package?

2011-03-18 Thread James Cook
On Mar 18, 2011, at 7:39 PM, Artyom Kazak 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