@@ -6,42 +6,46 @@ using MatrixAlgebraKit: diagview
66using LinearAlgebra
77using GenericSchur
88
9- GenericFloats = (BigFloat, Complex{BigFloat})
10-
11- @testset " exponential! for T = $T " for T in GenericFloats
12- rng = StableRNG (123 )
13- m = 54
14-
15- A = randn (rng, T, m, m)
16- D, V = @constinferred eig_full (A)
17- algs = (MatrixFunctionViaEig (GS_QRIteration ()),)
18- expA_LA = @constinferred exponential (A)
19- @testset " algorithm $alg " for alg in algs
20- expA = @constinferred exponential! (copy (A))
21- expA2 = @constinferred exponential (A; alg = alg)
22- @test expA ≈ expA_LA
23- @test expA2 ≈ expA
24-
25- Dexp, Vexp = @constinferred eig_full (expA)
26- @test sort (diagview (Dexp); by = imag) ≈ sort (LinearAlgebra. exp .(diagview (D)); by = imag)
9+ is_buildkite = get (ENV , " BUILDKITE" , " false" ) == " true"
10+
11+ if ! is_buildkite
12+ GenericFloats = (BigFloat, Complex{BigFloat})
13+
14+ @testset " exponential! for T = $T " for T in GenericFloats
15+ rng = StableRNG (123 )
16+ m = 54
17+
18+ A = randn (rng, T, m, m)
19+ D, V = @constinferred eig_full (A)
20+ algs = (MatrixFunctionViaEig (GS_QRIteration ()),)
21+ expA_LA = @constinferred exponential (A)
22+ @testset " algorithm $alg " for alg in algs
23+ expA = @constinferred exponential! (copy (A))
24+ expA2 = @constinferred exponential (A; alg = alg)
25+ @test expA ≈ expA_LA
26+ @test expA2 ≈ expA
27+
28+ Dexp, Vexp = @constinferred eig_full (expA)
29+ @test sort (diagview (Dexp); by = imag) ≈ sort (LinearAlgebra. exp .(diagview (D)); by = imag)
30+ end
2731 end
28- end
2932
30- @testset " exponential! for T1 = $T1 , T2 = $T2 " for T1 in GenericFloats, T2 in GenericFloats
31- rng = StableRNG (123 )
32- m = 54
33+ @testset " exponential! for T1 = $T1 , T2 = $T2 " for T1 in GenericFloats, T2 in GenericFloats
34+ rng = StableRNG (123 )
35+ m = 54
3336
34- A = randn (rng, T1, m, m)
35- τ = randn (rng, T2)
37+ A = randn (rng, T1, m, m)
38+ τ = randn (rng, T2)
3639
37- D, V = @constinferred eig_full (A)
38- algs = (MatrixFunctionViaEig (GS_QRIteration ()),)
39- @testset " algorithm $alg " for alg in algs
40- expτA = @constinferred exponential! ((τ, copy (A)))
41- expτA2 = @constinferred exponential ((τ, A); alg)
42- @test expτA2 ≈ expτA
40+ D, V = @constinferred eig_full (A)
41+ algs = (MatrixFunctionViaEig (GS_QRIteration ()),)
42+ @testset " algorithm $alg " for alg in algs
43+ expτA = @constinferred exponential! ((τ, copy (A)))
44+ expτA2 = @constinferred exponential ((τ, A); alg)
45+ @test expτA2 ≈ expτA
4346
44- Dexp, Vexp = @constinferred eig_full (expτA)
45- @test sort (diagview (Dexp); by = x -> (imag (x), real (x))) ≈ sort (LinearAlgebra. exp .(diagview (D) .* τ); by = x -> (imag (x), real (x)))
47+ Dexp, Vexp = @constinferred eig_full (expτA)
48+ @test sort (diagview (Dexp); by = x -> (imag (x), real (x))) ≈ sort (LinearAlgebra. exp .(diagview (D) .* τ); by = x -> (imag (x), real (x)))
49+ end
4650 end
4751end
0 commit comments