Boost logo

Boost Users :

Subject: Re: [Boost-users] all roots of a polynomial
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2018-02-26 09:32:46


> -----Original Message-----
> From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of mdebonis via Boost-users
> Sent: 22 February 2018 18:38
> To: boost-users_at_[hidden]
> Cc: mdebonis
> Subject: [Boost-users] all roots of a polynomial
>
> Hello,
>
> I found Boost while searching for a C++ library which can do accurate
> polynomial root finding. The problem is that the documentation does not make
> it very clear how to implement this tool.
>
> Does anyone by any chance have some sample code on implementing this feature
> or steer me in the direction of an example in the documentation? I would
> like to use the best decimal place accuracy (it appears that you can get
> 50-place here?)

The index of http://www.boost.org/doc/libs/1_66_0/libs/math/doc/html/index.html should help find

http://www.boost.org/doc/libs/1_66_0/libs/math/doc/html/root_finding.html

and

http://www.boost.org/doc/libs/1_66_0/libs/math/doc/html/math_toolkit/roots_deriv.html

is probably what you want.

(You may find Wolfram Alpha helpful if your finding derivatives is as rusty as mine).

You can get hundreds of decimal digits precision if that is your wish.

http://www.boost.org/doc/libs/1_66_0/libs/math/doc/html/math_toolkit/root_finding_examples/multiprecision_root.html

To install Boost, you just need to follow the basic instructions that install the header files .hpp onto your hard drive at your
chosen location.

(Boost.Math is header only, so you need not worry about building or downloading any libraries).

You should then be able to run the several examples.

Enjoy!

Paul

---
Paul A. Bristow
Prizet Farmhouse
Kendal UK LA8 8AB
+44 (0) 1539 561830

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net