Skip to content

Commit 18bc083

Browse files
committed
edits
1 parent 2b8a442 commit 18bc083

File tree

2 files changed

+21
-27
lines changed

2 files changed

+21
-27
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ julia:
1111
- 1.2
1212
- 1.3
1313
- 1.4
14+
- 1.5
1415
- nightly
1516

1617
notifications:

test/StandardBasis.jl

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -685,34 +685,30 @@ end
685685

686686

687687
# issue 240
688-
P = Polynomial
689-
690-
a = P([0.8457170323029561, 0.47175077674705257, 0.9775441940117577]);
691-
b = P([0.5410010714904849, 0.533604905984294]);
692-
d = P([0.5490673726445683, 0.15991109487875477]);
693-
@test degree(gcd(a*d,b*d)) == 0
694-
@test degree(gcd(a*d, b*d, atol=sqrt(eps()))) > 0
695-
if VERSION >= v"1.2.0"
696-
@test degree(gcd(a*d,b*d, method=:noda_sasaki)) == degree(d)
697-
@test degree(gcd(a*d,b*d, method=:numerical)) == degree(d)
698-
end
699-
700-
l,m,n = (5,5,5) # realiable, though for larger l,m,n only **usually** correct
701-
u,v,w = fromroots.(rand.((l,m,n)))
702-
@test degree(gcd(u*v, u*w, method=:numerical)) == degree(u)
688+
if VERSION >= v"1.2.0" # rank with keywords; require_one_based_indexing
703689

704-
# Example of Zeng
705-
x = variable(P{Float64})
706-
p = (x+10)*(x^9 + x^8/3 + 1)
707-
q = (x+10)*(x^9 + x^8/7 - 6//7)
690+
P = Polynomial
708691

709-
@test degree(gcd(p,q)) == 0
710-
if VERSION >= v"1.2.0"
692+
a = P([0.8457170323029561, 0.47175077674705257, 0.9775441940117577]);
693+
b = P([0.5410010714904849, 0.533604905984294]);
694+
d = P([0.5490673726445683, 0.15991109487875477]);
695+
@test degree(gcd(a*d,b*d)) == 0
696+
@test degree(gcd(a*d, b*d, atol=sqrt(eps()))) > 0
697+
@test degree(gcd(a*d,b*d, method=:noda_sasaki)) == degree(d)
698+
@test degree(gcd(a*d,b*d, method=:numerical)) == degree(d)
699+
l,m,n = (5,5,5) # realiable, though for larger l,m,n only **usually** correct
700+
u,v,w = fromroots.(rand.((l,m,n)))
701+
@test degree(gcd(u*v, u*w, method=:numerical)) == degree(u)
702+
703+
# Example of Zeng
704+
x = variable(P{Float64})
705+
p = (x+10)*(x^9 + x^8/3 + 1)
706+
q = (x+10)*(x^9 + x^8/7 - 6//7)
707+
708+
@test degree(gcd(p,q)) == 0
711709
(@test degree(gcd(p,q, method=:noda_sasaki)) == 1)
712710
@test degree(gcd(p,q, method=:numerical)) == 1
713-
end
714711

715-
if VERSION >= v"1.2.0"
716712
# more bits don't help Euclidean
717713
x = variable(P{BigFloat})
718714
p = (x+10)*(x^9 + x^8/3 + 1)
@@ -750,12 +746,9 @@ end
750746
q = (x-1) * (x-2) * (x-4)
751747
@test degree(gcd(p,q, method=:numerical)) == 2
752748
end
753-
754-
end
755-
749+
end
756750
end
757751

758-
759752
@testset "Showing" begin
760753

761754
p = Polynomial{Rational}([1, 4])

0 commit comments

Comments
 (0)