aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ref/fate/eval
blob: ed0d8bc1248084b870b362eec8dd7de9790070f3 (plain) (blame)
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Evaluating ''
'' -> nan

Evaluating '1;2'
'1;2' -> 2.000000

Evaluating '-20'
'-20' -> -20.000000

Evaluating '-PI'
'-PI' -> -3.141593

Evaluating '+PI'
'+PI' -> 3.141593

Evaluating '1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)'
'1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)' -> 12.700000

Evaluating '80G/80Gi'
'80G/80Gi' -> 0.931323

Evaluating '1k'
'1k' -> 1000.000000

Evaluating '1Gi'
'1Gi' -> 1073741824.000000

Evaluating '1gi'
'1gi' -> nan

Evaluating '1GiFoo'
'1GiFoo' -> nan

Evaluating '1k+1k'
'1k+1k' -> 2000.000000

Evaluating '1Gi*3foo'
'1Gi*3foo' -> nan

Evaluating 'foo'
'foo' -> nan

Evaluating 'foo('
'foo(' -> nan

Evaluating 'foo()'
'foo()' -> nan

Evaluating 'foo)'
'foo)' -> nan

Evaluating 'sin'
'sin' -> nan

Evaluating 'sin('
'sin(' -> nan

Evaluating 'sin()'
'sin()' -> nan

Evaluating 'sin)'
'sin)' -> nan

Evaluating 'sin 10'
'sin 10' -> nan

Evaluating 'sin(1,2,3)'
'sin(1,2,3)' -> nan

Evaluating 'sin(1 )'
'sin(1 )' -> 0.841471

Evaluating '1'
'1' -> 1.000000

Evaluating '1foo'
'1foo' -> nan

Evaluating 'bar + PI + E + 100f*2 + foo'
'bar + PI + E + 100f*2 + foo' -> nan

Evaluating '13k + 12f - foo(1, 2)'
'13k + 12f - foo(1, 2)' -> nan

Evaluating '1gi'
'1gi' -> nan

Evaluating '1Gi'
'1Gi' -> 1073741824.000000

Evaluating 'st(0, 123)'
'st(0, 123)' -> 123.000000

Evaluating 'st(1, 123); ld(1)'
'st(1, 123); ld(1)' -> 123.000000

Evaluating 'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)'
'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -> 4950.000000

Evaluating 'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)'
'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)' -> 144.000000

Evaluating 'while(0, 10)'
'while(0, 10)' -> nan

Evaluating 'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))'
'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))' -> 100.000000

Evaluating 'isnan(1)'
'isnan(1)' -> 0.000000

Evaluating 'isnan(NAN)'
'isnan(NAN)' -> 1.000000

Evaluating 'floor(NAN)'
'floor(NAN)' -> nan

Evaluating 'floor(123.123)'
'floor(123.123)' -> 123.000000

Evaluating 'floor(-123.123)'
'floor(-123.123)' -> -124.000000

Evaluating 'trunc(123.123)'
'trunc(123.123)' -> 123.000000

Evaluating 'trunc(-123.123)'
'trunc(-123.123)' -> -123.000000

Evaluating 'ceil(123.123)'
'ceil(123.123)' -> 124.000000

Evaluating 'ceil(-123.123)'
'ceil(-123.123)' -> -123.000000

Evaluating 'sqrt(1764)'
'sqrt(1764)' -> 42.000000

Evaluating 'isnan(sqrt(-1))'
'isnan(sqrt(-1))' -> 1.000000

Evaluating 'not(1)'
'not(1)' -> 0.000000

Evaluating 'not(NAN)'
'not(NAN)' -> 0.000000

Evaluating 'not(0)'
'not(0)' -> 1.000000

Evaluating 'pow(0,1.23)'
'pow(0,1.23)' -> 0.000000

Evaluating 'pow(PI,1.23)'
'pow(PI,1.23)' -> 4.087844

Evaluating 'PI^1.23'
'PI^1.23' -> 4.087844

Evaluating 'pow(-1,1.23)'
'pow(-1,1.23)' -> nan

Evaluating 'if(1, 2)'
'if(1, 2)' -> 2.000000

Evaluating 'ifnot(0, 23)'
'ifnot(0, 23)' -> 23.000000

Evaluating 'ifnot(1, NaN) + if(0, 1)'
'ifnot(1, NaN) + if(0, 1)' -> 0.000000

Evaluating 'taylor(1, 1)'
'taylor(1, 1)' -> 2.718282

Evaluating 'taylor(eq(mod(ld(1),4),1)-eq(mod(ld(1),4),3), PI/2, 1)'
'taylor(eq(mod(ld(1),4),1)-eq(mod(ld(1),4),3), PI/2, 1)' -> 1.000000

12.700000 == 12.7
0.931323 == 0.931322575