Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hensel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krueger Jasmin
Hensel
Commits
4b3f78d5
Commit
4b3f78d5
authored
2 years ago
by
Krueger Jasmin
Browse files
Options
Downloads
Patches
Plain Diff
Hensel validation
parent
9703296f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
functions.jl
+41
-0
41 additions, 0 deletions
functions.jl
with
41 additions
and
0 deletions
functions.jl
+
41
−
0
View file @
4b3f78d5
...
...
@@ -696,3 +696,44 @@ function validate_a_posteriori_inverse_bivariate(q::PolyElem{T}, b::PolyElem{S},
print
(
"no convergence in "
,
tmax
,
" steps, last r = "
,
r
,
"
\n
"
)
(
r
,
tmax
,
string
(
"no convergence in "
,
tmax
,
" steps"
))
end
function
validate_Hensel
(
l
::
Int
,
f
::
PolyElem
,
g
::
PolyElem
,
h
::
PolyElem
)
#convert f,g,h to polynomials in Float64
fr
=
convert_balls_to_Float
(
f
)
gr
=
convert_balls_to_Float
(
g
)
hr
=
convert_balls_to_Float
(
h
)
dg
=
degree
(
g
)
dh
=
degree
(
h
)
#compute numerical solution
(
gstar
,
hstar
,
s
,
t
)
=
henseltruncate
(
l
,
fr
,
gr
,
hr
,
validation
=
false
)
gstar
=
convert_float_to_balls
(
gstar
)
hstar
=
convert_float_to_balls
(
hstar
)
#compute δ
(
q
,
R
)
=
fastdivrem
(
s
*
(
gstar
*
hstar
-
f
),
hstar
)
δg
=
t
*
e
+
q
*
g
BivPolMod!
(
δg
,
l
)
δh
=
R
δgmin
=
nonzeroMin
(
δg
)
ηg
=
deepcopy
(
δg
)
replace_zeros!
(
ηg
,
δgmin
,
degree
(
g
),
l
)
δhmin
=
nonzeroMin
(
δh
)
ηh
=
deepcopy
(
δh
)
replace_zeros!
(
ηh
,
δhmin
,
degree
(
h
),
l
)
δh
=
δh
+
ηh
δg
=
δg
+
ηg
#validation
rg
=
parent
(
g
)(
0
)
rh
=
parent
(
h
)(
0
)
for
t
in
1
:
tmax
(
Λg
,
Λh
)
=
Λ
(
rg
,
rh
)
rrg
=
Λg
*
rg
+
δg
rrg
=
trunc
(
rrg
,
dg
+
1
,
l
)
rrh
=
Λh
*
rh
+
δh
rrh
=
trunc
(
rrh
,
dh
+
1
,
l
)
if
(
isless_coefficientwise
(
rrg
-
rg
,
ηg
))
&&
(
isless_coefficientwise
(
rrh
-
rh
,
ηh
))
gstar
=
convert_polynomial_to_intervals
(
gstar
,
convert_balls_to_Float
(
rg
,
rounding
=
RoundUp
))
hstar
=
convert_polynomial_to_intervals
(
hstar
,
convert_balls_to_Float
(
rh
,
rounding
=
RoundUp
))
end
end
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment