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

Add Horner scheme #144

Merged
merged 1 commit into from
Feb 13, 2020
Merged

Add Horner scheme #144

merged 1 commit into from
Feb 13, 2020

Conversation

schillic
Copy link
Member

@schillic schillic commented Feb 12, 2020

This is basically the implementation by @mforets here.

(I observed that at some point the exponential remainder starts growing again, but this is not a problem of this PR → #145.)

julia> m = IntervalMatrix([-1.1..0.9 -4.1.. -3.9; 3.9..4.1 -1.1..0.9]);

julia> for K in [4, 6, 8, 20, 30]
           H = horner_scheme(m, K)
       end
K: 4
H: Interval{Float64}[[-6.59711, 16.4024] [-4.60191, 16.6734]; [-16.6734, 4.60191] [-6.59711, 16.4024]]
R: Interval{Float64}[[-107.653, 107.653] [-107.653, 107.653]; [-107.653, 107.653] [-107.653, 107.653]]
result: Interval{Float64}[[-114.25, 124.055] [-112.255, 124.326]; [-124.326, 112.255] [-114.25, 124.055]]
diam: [238.30443375030262 236.58025875030262; 236.58025875030262 238.30443375030262]
K: 6
H: Interval{Float64}[[-16.098, 11.2656] [-15.8269, 12.8829]; [-12.8829, 15.8269] [-16.098, 11.2656]]
R: Interval{Float64}[[-48.5097, 48.5097] [-48.5097, 48.5097]; [-48.5097, 48.5097] [-48.5097, 48.5097]]
result: Interval{Float64}[[-64.6077, 59.7752] [-64.3365, 61.3926]; [-61.3926, 64.3365] [-64.6077, 59.7752]]
diam: [124.38282465585809 125.72902259752476; 125.72902259752476 124.38282465585809]
K: 8
H: Interval{Float64}[[-16.9448, 18.0497] [-15.3549, 18.6421]; [-18.6421, 15.3549] [-16.9448, 18.0497]]
R: Interval{Float64}[[-14.8526, 14.8526] [-14.8526, 14.8526]; [-14.8526, 14.8526] [-14.8526, 14.8526]]
result: Interval{Float64}[[-31.7974, 32.9023] [-30.2075, 33.4947]; [-33.4947, 30.2075] [-31.7974, 32.9023]]
diam: [64.69952648085506 63.70205977610654; 63.70205977610654 64.69952648085506]
K: 20
H: Interval{Float64}[[-18.5586, 18.6197] [-17.1485, 19.3592]; [-19.3592, 17.1485] [-18.5586, 18.6197]]
R: Interval{Float64}[[-2.77417e-05, 2.77417e-05] [-2.77417e-05, 2.77417e-05]; [-2.77417e-05, 2.77417e-05] [-2.77417e-05, 2.77417e-05]]
result: Interval{Float64}[[-18.5586, 18.6197] [-17.1485, 19.3592]; [-19.3592, 17.1485] [-18.5586, 18.6197]]
diam: [37.17821738633965 36.507641933692234; 36.507641933692234 37.17821738633965]
K: 30
H: Interval{Float64}[[-18.5586, 18.6197] [-17.1485, 19.3592]; [-19.3592, 17.1485] [-18.5586, 18.6197]]
R: Interval{Float64}[[-452.145, 452.145] [-452.145, 452.145]; [-452.145, 452.145] [-452.145, 452.145]]
result: Interval{Float64}[[-470.704, 470.765] [-469.294, 471.504]; [-471.504, 469.294] [-470.704, 470.765]]
diam: [941.4678769593615 940.7973015555041; 940.7973015555041 941.4678769593615]

@schillic schillic changed the title Add Horner schema Add Horner scheme Feb 12, 2020
Copy link
Member

@mforets mforets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later it would be nice to export exp which combines the horner evaluation with the scaling and squaring method, as in section 4.3 of the paper.

src/exponential.jl Outdated Show resolved Hide resolved
src/exponential.jl Outdated Show resolved Hide resolved
@schillic schillic merged commit a913ce1 into master Feb 13, 2020
@schillic schillic deleted the schillic/Horner branch February 13, 2020 06:46
@schillic
Copy link
Member Author

Later it would be nice to export exp which combines the horner evaluation with the scaling and squaring method

I updated #120.

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.

2 participants