summaryrefslogtreecommitdiff
path: root/tests/general/ck.std
blob: 4c42f81575943c79b88f5c8c44c418bcbc917f35 (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
This test of floating-point arithmetic is likely to show
differences from platform to platform because of differences
in floating-point precision and details of the routines that
convert floating-point numbers to strings.  If the values
produced in local tests are approximately the same in magnitude
as shown in the standard results, there's nothing to worry about.
In addition, some platforms may show 0.0 as "-0.0".  You can
ignore this if you wish.
Image(2.0) ----> "2.0"
string(2.0) ----> "2.0"
string(2.7) ----> "2.7"
string(".") ----> "."
string(".3") ----> ".3"
string("0.3") ----> "0.3"
string(" . 3") ----> " . 3"
string("e2") ----> "e2"
string("3e500") ----> "3e500"
type(1.0) ----> "real"
cset(2.0) ----> '.02'
cset(2.7) ----> '.27'
cset(".") ----> '.'
cset(".3") ----> '.3'
cset("0.3") ----> '.03'
cset(" . 3") ----> ' .3'
cset("e2") ----> '2e'
cset("3e500") ----> '035e'
+1.0 ----> 1.0
-1.0 ----> -1.0
real(2) ----> 2.0
real(2.0) ----> 2.0
real(2.7) ----> 2.7
real("2") ----> 2.0
real(" 2") ----> 2.0
real("2 ") ----> 2.0
real("+2") ----> 2.0
real("-2") ----> -2.0
real("- 2") ----> none
real(" -    2 ") ----> none
real("") ----> none
real("--2") ----> none
real(" ") ----> none
real("-") ----> none
real("+") ----> none
real(".") ----> none
real(".3") ----> 0.3
real("0.3") ----> 0.3
real(" . 3") ----> none
real("e2") ----> none
real("3e500") ----> none
real("7r4") ----> 4.0
real("4r7") ----> none
real("4r 7") ----> none
real("7r 4") ----> none
real("16rff") ----> 255.0
real("36rcat") ----> 15941.0
real("36Rcat") ----> 15941.0
real("36rCAT") ----> 15941.0
real("1r1") ----> none
integer(2.0) ----> 2
integer(2.7) ----> 2
integer(".") ----> none
integer(".3") ----> 0
integer("0.3") ----> 0
integer(" . 3") ----> none
numeric(2.0) ----> 2.0
numeric(2.7) ----> 2.7
numeric(".") ----> none
numeric(".3") ----> 0.3
numeric("0.3") ----> 0.3
numeric(" . 3") ----> none
real(2.0) ----> 2.0
real(2.7) ----> 2.7
real(".") ----> none
real(".3") ----> 0.3
real("0.3") ----> 0.3
real(" . 3") ----> none
abs(3.0) ----> 3.0
abs(0.0) ----> 0.0
abs(-3.0) ----> 3.0
36. % 7 ----> 1.0
36 % 7. ----> 1.0
36. % 7. ----> 1.0
-36. % 7 ----> -1.0
36 % -7. ----> 1.0
-36. % -7. ----> -1.0
36. * 9 ----> 324.0
36 * 9. ----> 324.0
36. * 9. ----> 324.0
-36. * 9 ----> -324.0
36 * -9. ----> -324.0
-36. * -9. ----> 324.0
36. / 9 ----> 4.0
36 / 9. ----> 4.0
36. / 9. ----> 4.0
-36. / 9 ----> -4.0
36 / -9. ----> -4.0
-36. / -9. ----> 4.0
36. + 9 ----> 45.0
36 + 9. ----> 45.0
36. + 9. ----> 45.0
-36. + 9 ----> -27.0
36 + -9. ----> 27.0
-36. + -9. ----> -45.0
1. < 1 ----> none
1 < 2. ----> 2.0
1. < 0. ----> none
-1 < 0. ----> 0.0
1. < -2 ----> none
-1 < -0. ----> 0.0
1. > 1 ----> none
1 > 2. ----> none
1. > 0. ----> 0.0
-1 > 0. ----> none
1. > -2 ----> -2.0
-1 > -0. ----> none
1. <= 1 ----> 1.0
1 <= 2. ----> 2.0
1. <= 0. ----> none
-1 <= 0. ----> 0.0
1. <= -2 ----> none
-1 <= -0. ----> 0.0
1. >= 1 ----> 1.0
1 >= 2. ----> none
1. >= 0. ----> 0.0
-1 >= 0. ----> none
1. >= -2 ----> -2.0
-1 >= -0. ----> none
1. = 1 ----> 1.0
1 = 2. ----> none
1. = 0. ----> none
-1 = 0. ----> none
1. = -2 ----> none
-1 = -0. ----> none
1. ~= 1 ----> none
1 ~= 2. ----> 2.0
1. ~= 0. ----> 0.0
-1 ~= 0. ----> 0.0
1. ~= -2 ----> -2.0
-1 ~= -0. ----> 0.0
36. ^ 9 ----> 1.015599e+14
36 ^ 9. ----> 1.015599e+14
36. ^ 9. ----> 1.015599e+14
-36. ^ 9 ----> -1.01559e+14
-36. ^ -9 ----> -9.84640e-15