VERB_code_2.2
2
|
#include <iostream>
#include <iomanip>
#include <math.h>
#include <stdlib.h>
Go to the source code of this file.
Macros | |
#define | maxiter 5000 |
maximum number of iterations More... | |
#define | DBL_EPSILON 1e-15 |
some other epsilon and stuff More... | |
Functions | |
int | roots (double *a, int n, double *wr, double *wi) |
Extract individual real or complex roots from list of quadratic factors. More... | |
void | get_quads (double *a, int n, double *quad, double *x) |
Finds all roots of polynomial by first finding quadratic factors using Bairstow's method, then extracting roots from quadratics. Implements new algorithm for managing multiple roots.
Definition in file rroots.h.
int roots | ( | double * | a, |
int | n, | ||
double * | wr, | ||
double * | wi | ||
) |
Extract individual real or complex roots from list of quadratic factors.
Definition at line 15 of file rroots.cpp.
References DBL_EPSILON, and VC::m.
void get_quads | ( | double * | a, |
int | n, | ||
double * | quad, | ||
double * | x | ||
) |
Top level routine to manage the determination of all roots of the given polynomial 'a', returning the quadratic factors (and possibly one linear factor) in 'x'.
Definition at line 201 of file rroots.cpp.
References deflate(), diff_poly(), err, find_quad(), VC::m, maxiter, and recurse().