@@ -469,28 +469,29 @@ end
469
469
end
470
470
471
471
@testset " multroot" begin
472
- for P in (Polynomial, ImmutablePolynomial, SparsePolynomial)
473
- rts = [1.0 , sqrt (2 ), sqrt (3 )]
474
- ls = [2 , 3 , 4 ]
475
- x = variable (P{Float64})
476
- p = prod ((x- z)^ l for (z,l) in zip (rts, ls))
477
- out = Polynomials. Multroot. multroot (p)
478
- @test all (out. values .≈ rts)
479
- @test all (out. multiplicities .≈ ls)
480
- @test out. ϵ <= sqrt (eps ())
481
- @test out. κ * out. ϵ < sqrt (eps ()) # small forward error
482
- # one for which the multiplicities are not correctly identified
483
- n = 4
484
- q = p^ n
485
- out = Polynomials. Multroot. multroot (q)
486
- @test out. κ * out. ϵ > sqrt (eps ()) # large forward error, l misidentified
487
- # with right manifold it does yield a small forward error
488
- zs′ = Polynomials. Multroot. pejorative_root (q, rts .+ 1e-4 * rand (3 ), n* ls)
489
- @test prod (Polynomials. Multroot. stats (q, zs′, n* ls)) < sqrt (eps ())
472
+ if VERSION >= v " 1.2.0" # same restriction as ngcd
473
+ for P in (Polynomial, ImmutablePolynomial, SparsePolynomial)
474
+ rts = [1.0 , sqrt (2 ), sqrt (3 )]
475
+ ls = [2 , 3 , 4 ]
476
+ x = variable (P{Float64})
477
+ p = prod ((x- z)^ l for (z,l) in zip (rts, ls))
478
+ out = Polynomials. Multroot. multroot (p)
479
+ @test all (out. values .≈ rts)
480
+ @test all (out. multiplicities .≈ ls)
481
+ @test out. ϵ <= sqrt (eps ())
482
+ @test out. κ * out. ϵ < sqrt (eps ()) # small forward error
483
+ # one for which the multiplicities are not correctly identified
484
+ n = 4
485
+ q = p^ n
486
+ out = Polynomials. Multroot. multroot (q)
487
+ @test out. κ * out. ϵ > sqrt (eps ()) # large forward error, l misidentified
488
+ # with right manifold it does yield a small forward error
489
+ zs′ = Polynomials. Multroot. pejorative_root (q, rts .+ 1e-4 * rand (3 ), n* ls)
490
+ @test prod (Polynomials. Multroot. stats (q, zs′, n* ls)) < sqrt (eps ())
491
+ end
490
492
end
491
493
end
492
494
493
-
494
495
@testset " Integrals and Derivatives" begin
495
496
# Integrals derivatives
496
497
for P in Ps
0 commit comments