-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFloatNumberSyntax.v
55 lines (47 loc) · 954 Bytes
/
FloatNumberSyntax.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Require Import Floats.
Check 2%float.
Check 2.5%float.
Check (-2.5)%float.
(* Avoid exponents with less than three digits as they are usually
displayed with two digits (1e7 is displayed 1e+07) except on
Windows where three digits are used (1e+007). *)
Check 2.5e123%float.
Check (-2.5e-123)%float.
Check (2 + 2)%float.
Check (2.5 + 2.5)%float.
Open Scope float_scope.
Check 2.
Check 2.5.
Check (-2.5).
Check 2.5e123.
Check (-2.5e-123).
Check (2 + 2).
Check (2.5 + 2.5).
Check -0x1a.
Check 0xb.2c.
Check -0x1ae2.
Check 0xb.2cp2.
Check 0xb.2cp8.
Check -0xb.2cp-2.
Check 1e309.
Check -1e309.
Set Printing All.
Check 0.5.
Unset Printing All.
Check 0.5.
Unset Printing Float.
Check 0.5.
Set Printing Float.
Check 0.5.
Open Scope nat_scope.
Check 2.
Check 2%float.
Delimit Scope float_scope with flt.
Definition t := 2%float.
Print t.
Delimit Scope nat_scope with float.
Print t.
Check 2.
Close Scope nat_scope.
Check 2.
Close Scope float_scope.