Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP #83 - Matrix power via square decomposition #84

Closed
wants to merge 1 commit into from

Conversation

schillic
Copy link
Member

@schillic schillic commented Jan 27, 2020

Closes #83.

@schillic
Copy link
Member Author

This idea did not help much: there is almost no difference. Even the exact case is handled exactly in master.

Definitions

julia> B = IntervalMatrix([2.0±0 0.0±0; 0.0±0 3.0±0])
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
 [2, 2]  [0, 0]
 [0, 0]  [3, 3]

julia> C = [2.0 0.0; 0.0 3.0]
2×2 Array{Float64,2}:
 2.0  0.0
 0.0  3.0

julia> D = IntervalMatrix([2.0±0.1 0.0±0.1; 0.0±0.1 3.0±0.1])
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
  [1.89999, 2.10001]    [-0.100001, 0.100001]
 [-0.100001, 0.100001]   [2.89999, 3.10001]  

This branch

julia> all(mid(B^k) == C^k for k in 1:20)
true

julia> B^20
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
     [1.04857e+06, 1.04858e+06]  [0, 0]                        
 [0, 0]                              [3.48678e+09, 3.48679e+09]

julia> D^20
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
 [-6.62849e+07, 7.20312e+07]  [-7.01882e+08, 7.01882e+08]
 [-7.01882e+08, 7.01882e+08]   [1.58595e+09, 7.09085e+09]

julia> B^16
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
 [65536, 65536]  [0, 0]                        
         [0, 0]      [4.30467e+07, 4.30468e+07]

julia> D^16
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
 [-664454, 874628]                          [-7.49338e+06, 7.49338e+06]
               [-7.49338e+06, 7.49338e+06]   [2.32098e+07, 7.58084e+07]

master

julia> all(mid(B^k) == C^k for k in 1:20)
true

julia> B^20
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
     [1.04857e+06, 1.04858e+06]  [0, 0]                        
 [0, 0]                              [3.48678e+09, 3.48679e+09]

julia> D^20
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
 [-6.78684e+07, 7.20312e+07]  [-7.01882e+08, 7.01882e+08]
 [-7.01882e+08, 7.01882e+08]   [1.5767e+09, 7.09085e+09] 

julia> B^16
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
 [65536, 65536]  [0, 0]                        
         [0, 0]      [4.30467e+07, 4.30468e+07]

julia> D^16
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
 [-664454, 874628]                          [-7.49338e+06, 7.49338e+06]
               [-7.49338e+06, 7.49338e+06]   [2.32098e+07, 7.58084e+07]

@schillic schillic force-pushed the schillic/83 branch 3 times, most recently from c50de31 to c7d8d42 Compare January 27, 2020 16:11
@schillic schillic changed the title WIP #83 - Matrix power #83 - Matrix power Jan 27, 2020
@schillic schillic changed the title #83 - Matrix power #83 - Matrix power via square decomposition Feb 11, 2020
@schillic schillic changed the title #83 - Matrix power via square decomposition WIP #83 - Matrix power via square decomposition Feb 11, 2020
@schillic schillic marked this pull request as draft September 15, 2021 04:02
@schillic schillic closed this May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Matrix power via square decomposition
1 participant