You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to identify roots of polynomials with suspected multiplicities over
14
14
`Float64` values, typically.
15
15
16
+
* `p`: a standard basis polynomial
17
+
* `method`: If `:direct` uses a method of Brehard, Poteaux, and Soudant to identify the multiplicity structure of the roots, if `:iterative` uses the Zeng method.
18
+
19
+
The keyword arguments can be used to adjust the floating-point tolerances.
20
+
21
+
Returns a named tuple with the identified roots (`values`), the corresponding multiplicities (`multiplicities`) and estimates for the condition number (`κ`) and the backward error (`‖p̃ - p‖_w`).
22
+
23
+
16
24
Example:
17
25
18
26
```jldoctest
@@ -25,9 +33,9 @@ julia> roots(p)
25
33
5-element Vector{ComplexF64}:
26
34
0.999999677417768 + 0.0im
27
35
1.0000003225831504 + 0.0im
28
-
1.4141705716005981 + 0.0im
29
-
1.4142350577588885 - 3.72273772278647e-5im
30
-
1.4142350577588885 + 3.72273772278647e-5im
36
+
1.4141705716005881 + 0.0im
37
+
1.4142350577588914 - 3.722737728087131e-5im
38
+
1.4142350577588914 + 3.722737728087131e-5im
31
39
32
40
julia> m = Polynomials.Multroot.multroot(p);
33
41
@@ -37,15 +45,19 @@ Dict{Float64, Int64} with 2 entries:
37
45
1.0 => 2
38
46
```
39
47
48
+
## Extended help
49
+
40
50
The algorithm has two stages. First it uses `pejorative_manifold` to
41
51
identify the number of distinct roots and their multiplicities. This
42
52
uses the fact if `p=Π(x-zᵢ)ˡⁱ`, `u=gcd(p, p′)`, and `u⋅v=p` then
43
53
`v=Π(x-zi)` is square free and contains the roots of `p` and `u` holds
44
-
the multiplicity details, which are identified by recursive usage of
45
-
`ncgd`, which identifies `u` and `v` above even if numeric
46
-
uncertainties are present.
54
+
the multiplicity details. The `:iterative` method of Zeng identifies
55
+
the multiplicities by recursive usage of `ncgd`, which identifies `u`
56
+
and `v` above even if numeric uncertainties are present. The, default,
57
+
`:direct` method of Brehard, Poteaux, and Soudant uses division and
58
+
does a better job for polynomials of larger degrees.
47
59
48
-
Second it uses `pejorative_root` to improve a set of initial guesses
60
+
Second the algorithm uses `pejorative_root` to improve a set of initial guesses
49
61
for the roots under the assumption the multiplicity structure is
50
62
correct using a Newton iteration scheme.
51
63
@@ -57,13 +69,14 @@ multiplicity structure:
57
69
`Polynomials.ngcd` to assess if a matrix is rank deficient by
58
70
comparing the smallest singular value to `θ ⋅ ‖p‖₂`.
59
71
60
-
* `ρ`: the initial residual tolerance, set to `1e-10`. This is passed
72
+
* `ρ`: the initial residual tolerance, set to `1e-13`. This is passed
61
73
to `Polynomials.ngcd`, the GCD finding algorithm as a measure for
62
-
the absolute tolerance multiplied by `‖p‖₂`.
74
+
the absolute tolerance multiplied by `‖p‖₂`. (For the `:iterative`
75
+
method, a suggested value is `1e-10`.
63
76
64
77
* `ϕ`: A scale factor, set to `100`. As the `ngcd` algorithm is called
65
-
recursively, this allows the residual tolerance to scale up to match
66
-
increasing numeric errors.
78
+
recursively for the `:iterative` method, this allows the residual tolerance
79
+
to scale up to match increasing numeric errors.
67
80
68
81
Returns a named tuple with
69
82
@@ -92,48 +105,82 @@ function multroot(p::Polynomials.StandardBasisPolynomial{T}; verbose=false,
0 commit comments