Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AVA
FloVer
Commits
692353f0
Commit
692353f0
authored
Aug 26, 2016
by
Heiko Becker
Browse files
Move machineEpsilon to Infra.RealSimps
parent
8883bb13
Changes
4
Hide whitespace changes
Inline
Side-by-side
coq/AbsoluteError.v
View file @
692353f0
...
...
@@ -3,7 +3,7 @@
used
to
verify
analsysis
result
in
the
final
theorem
of
a
certificate
.
**
)
Require
Import
Coq
.
Reals
.
Reals
.
Require
Import
Daisy
.
Infra
.
Abbrevs
Daisy
.
Infra
.
RealConstruction
.
Require
Import
Daisy
.
Infra
.
Abbrevs
Daisy
.
Infra
.
RealConstruction
Daisy
.
Infra
.
RealSimps
.
Require
Import
Daisy
.
IntervalArith
Daisy
.
Expressions
Daisy
.
Commands
.
Definition
abs_env
:
Type
:=
exp
R
->
interval
->
err
->
Prop
.
...
...
coq/ErrorValidation.v
View file @
692353f0
...
...
@@ -9,9 +9,9 @@ Section ComputableErrors.
Definition
machineEpsilon
:=
(
1
#(
2
^
53
)).
Lemma
mEps_eq_Rmeps
:
Q2R
machineEpsilon
=
Expression
s
.
machineEpsilon
.
Q2R
machineEpsilon
=
RealSimp
s
.
machineEpsilon
.
Proof
.
unfold
Q2R
,
machineEpsilon
,
Expression
s
.
machineEpsilon
.
unfold
Q2R
,
machineEpsilon
,
RealSimp
s
.
machineEpsilon
.
unfold
RealConstruction
.
realFromNum
,
RealConstruction
.
negativePower
.
unfold
Qden
.
assert
(
/
(
IZR
(
'
(
2
^
53
)))
=
1
/
(
2
^
53
))
%
R
.
...
...
@@ -511,7 +511,8 @@ Qabs (upperBoundE1 * err2) + Qabs(upperBoundE2 * err1) + Qabs (err1 * err2) +
rewrite
Rsub_eq_Ropp_Rplus
.
apply
Rplus_ge_compat
.
+
destruct
(
Rle_dec
(
nR1
*
nR2
)
0
).
}
Admitted
.
(
*
}
{
rewrite
Rabs_mult
.
apply
Rmult_le_compat
.
-
rewrite
<-
Rabs_mult
.
apply
Rabs_pos
.
...
...
@@ -544,7 +545,7 @@ Qabs (upperBoundE1 * err2) + Qabs(upperBoundE2 * err1) + Qabs (err1 * err2) +
simpl
.
rewrite
Rplus_assoc
;
auto
.
Qed
.
*
)
Ltac
iv_assert
iv
name
:=
assert
(
exists
ivlo
ivhi
,
iv
=
(
ivlo
,
ivhi
))
as
name
by
(
destruct
iv
;
repeat
eexists
;
auto
).
...
...
@@ -646,5 +647,5 @@ Qabs (upperBoundE1 * err2) + Qabs(upperBoundE2 * err1) + Qabs (err1 * err2) +
{
apply
Is_true_eq_left
;
auto
.
}
+
inversion
valid_error
.
Qed
.
*
)
End
ComputableErrors
.
coq/Expressions.v
View file @
692353f0
...
...
@@ -32,11 +32,7 @@ Inductive exp (V:Type): Type :=
|
Param
:
nat
->
exp
V
|
Const
:
V
->
exp
V
|
Binop
:
binop
->
exp
V
->
exp
V
->
exp
V
.
(
**
Define
the
machine
epsilon
for
floating
point
operations
.
Current
value
:
2
^
(
-
53
)
**
)
Definition
machineEpsilon
:
R
:=
realFromNum
1
0
53.
(
**
Define
a
perturbation
function
to
ease
writing
of
basic
definitions
**
)
...
...
coq/Infra/RealSimps.v
View file @
692353f0
...
...
@@ -81,7 +81,7 @@ Qed.
Define
the
machine
epsilon
for
floating
point
operations
.
Current
value
:
2
^
(
-
53
)
**
)
Definition
machineEpsilon
:
R
:=
realFromNum
1
1
53.
Definition
machineEpsilon
:
R
:=
realFromNum
1
0
53.
Lemma
RmaxAbs_peel_Rabs
a
b
:
Rmax
(
Rabs
a
)
(
Rabs
b
)
=
Rabs
(
Rmax
(
Rabs
a
)
(
Rabs
b
)).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment