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
u, v, w, θ′, κ = Polynomials.ngcd(u, derivative(u),
122
-
atol=ρ′, satol = θ*normp,
123
-
rtol = zT, srtol = zT,
124
-
minⱼ =degree(u) - nrts # truncate search
142
+
nu₂ =norm(u,2)
143
+
θ = θ * nu₂
144
+
ρ =max(ρ, ϕ * ρⱼ)
145
+
ρ′ = ρ * nu₂
146
+
u, v, w, ρⱼ, κ = Polynomials.ngcd(u, derivative(u),
147
+
satol = θ, srtol =zero(real(T)),
148
+
atol = ρ′, rtol =zero(real(T)),
149
+
minⱼ =degree(u) - nrts
125
150
)
126
-
127
-
rts =roots(v)
128
-
nrts =length(rts)
129
-
130
-
for z in rts
131
-
tmp, ind =findmin(abs.(zs .- z))
132
-
ls[ind] = ls[ind] +1
151
+
ρⱼ /= nu₂
152
+
nrts =degree(v)
153
+
for z ∈roots(v)
154
+
_, ind =findmin(abs.(zs .- z))
155
+
ls[ind] +=1
133
156
end
134
157
135
158
end
136
159
137
-
zs, ls # estimate for roots, multiplicities
160
+
ls
138
161
139
162
end
140
163
164
+
141
165
"""
142
166
pejorative_root(p, zs, ls; kwargs...)
143
167
144
168
Find a *pejorative* *root* for `p` given multiplicity structure `ls` and initial guess `zs`.
145
169
146
170
The pejorative manifold for a multplicity structure `l` is denoted `{Gₗ(z) | z ∈ Cᵐ}`. A pejorative
147
-
root is a least squares minimizer of `F(z) = W ⋅ [Gₗ(z) - a]`. Here `a ~ (p_{n-1}, p_{n-2}, …, p_1, p_0) / p_n` and `W` are weights given by `min(1, 1/|aᵢ|)`. When `l` is the mathematically correct structure, then `F` will be `0` for a pejorative root. If `l` is not correct, then the backward error `||p̃ - p||_w` is typically large, where `p̃ = Π (x-z̃ᵢ)ˡⁱ`.
171
+
root is a least squares minimizer of `F(z) = W ⋅ [Gₗ(z) - a]`. Here `a ~ (p_{n-1}, p_{n-2}, …, p_1, p_0) / p_n` and `W` are weights given by `min(1, 1/|aᵢ|)`. When `l` is the mathematically correct structure, then `F` will be `0` for a pejorative root. If `l` is not correct, then the backward error `‖p̃ - p‖_w` is typically large, where `p̃ = Π (x-z̃ᵢ)ˡⁱ`.
148
172
149
173
This follows Algorithm 1 of [Zeng](https://www.ams.org/journals/mcom/2005-74-250/S0025-5718-04-01692-8/S0025-5718-04-01692-8.pdf)
0 commit comments